[Freeswitch-svn] [commit] r10230 - in freeswitch/branches/gmaruzz: . Developer_Tips_files

Freeswitch SVN gmaruzz at freeswitch.org
Mon Nov 3 17:20:21 EST 2008


Author: gmaruzz
Date: Mon Nov  3 17:20:21 2008
New Revision: 10230

Added:
   freeswitch/branches/gmaruzz/Developer_Tips.html
   freeswitch/branches/gmaruzz/Developer_Tips_files/
   freeswitch/branches/gmaruzz/Developer_Tips_files/commonPrint.css
   freeswitch/branches/gmaruzz/Developer_Tips_files/index.php
   freeswitch/branches/gmaruzz/Developer_Tips_files/poweredby_mediawiki_88x31.png   (contents, props changed)
   freeswitch/branches/gmaruzz/Developer_Tips_files/wikibits.js

Log:
added svn instructions as a test

Added: freeswitch/branches/gmaruzz/Developer_Tips.html
==============================================================================
--- (empty file)
+++ freeswitch/branches/gmaruzz/Developer_Tips.html	Mon Nov  3 17:20:21 2008
@@ -0,0 +1,246 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en"><head>
+
+	
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+		<meta name="keywords" content="Developer Tips">
+<link rel="shortcut icon" href="http://wiki.freeswitch.org/favicon.ico">
+<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.freeswitch.org/opensearch_desc.php" title="FreeSWITCH Wiki (English)"><title>Developer Tips - FreeSWITCH Wiki</title>
+		
+		<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "/skins/monobook/main.css?9"; /*]]>*/</style>
+		<link rel="stylesheet" type="text/css" media="print" href="Developer_Tips_files/commonPrint.css"><!--[if lt IE 5.5000]><style type="text/css">@import "/skins/monobook/IE50Fixes.css";</style><![endif]--><!--[if IE 5.5000]><style type="text/css">@import "/skins/monobook/IE55Fixes.css";</style><![endif]--><!--[if IE 6]><style type="text/css">@import "/skins/monobook/IE60Fixes.css";</style><![endif]--><!--[if IE 7]><style type="text/css">@import "/skins/monobook/IE70Fixes.css?1";</style><![endif]--><!--[if lt IE 7]><script type="text/javascript" src="/skins/common/IEFixes.js"></script>
+		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
+		
+		
+		
+		
+		
+		
+		<script type="text/javascript">
+			var skin = "monobook";
+			var stylepath = "/skins";
+
+			var wgArticlePath = "/wiki/$1";
+			var wgScriptPath = "";
+			var wgServer = "http://wiki.freeswitch.org";
+                        
+			var wgCanonicalNamespace = "";
+			var wgNamespaceNumber = 0;
+			var wgPageName = "Developer_Tips";
+			var wgTitle = "Developer Tips";
+			var wgArticleId = 1682;
+			var wgIsArticle = true;
+                        
+			var wgUserName = null;
+			var wgUserLanguage = "en";
+			var wgContentLanguage = "en";
+		</script>
+		                
+		<script type="text/javascript" src="Developer_Tips_files/wikibits.js"><!-- wikibits js --></script>
+		<script type="text/javascript" src="Developer_Tips_files/index.php"><!-- site js --></script>
+		<style type="text/css">/*<![CDATA[*/
+ at import "/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
+ at import "/index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
+ at import "/index.php?title=-&action=raw&gen=css&maxage=18000";
+/*]]>*/</style><!-- Head Scripts --></head><body class="mediawiki ns-0 ltr">
+	<div id="globalWrapper">
+		<div id="column-content">
+	<div id="content">
+		<a name="top" id="top"></a>
+				<h1 class="firstHeading">Developer Tips</h1>
+		<div id="bodyContent">
+			<h3 id="siteSub">From FreeSWITCH Wiki</h3>
+			<div id="contentSub"></div>
+									<div id="jump-to-nav">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div>			<!-- start content -->
+			<p>This
+page is a collection of tips for how to begin as a Developer working on
+FreeSWITCH. It is assumed that if you're viewing this page, you have
+your own SVN branch and are wondering what to do with it.
+</p><p><br>
+</p>
+<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://wiki.freeswitch.org/index.php?title=Developer_Tips&amp;action=edit&amp;section=1" title="Edit section: Initial Checkout">edit</a>]</div><a name="Initial_Checkout"></a><h2> Initial Checkout </h2>
+<p>Assuming your branch is called 'mybranch' in the examples below.  Change 'mybranch' to be your actual branch name.
+</p>
+<pre>$ cd /usr/local/src
+$ svn co http://svn.freeswitch.org/svn/freeswitch/branches/mybranch freeswitch.mybranch
+$ cd freeswitch.mybranch
+
+$ svn merge http://svn.freeswitch.org/svn/freeswitch/branches/mybranch http://svn.freeswitch.org/svn/freeswitch/trunk
+</pre>
+<p>Determine what the trunk revision is that you just merged by typing
+"svn info" and looking at the Revision field. This is going to be
+critical information if you plan to keep your branch in sync with the
+main trunk as you develop it. For this example, we'll assume the trunk
+version is 4321.
+</p>
+<pre>$ svn commit -m "Initial commit of mybranch from trunk revision: 4321"
+</pre>
+<p>You now have a branch that contains a current copy of the trunk. You
+can now make changes locally to your branch to add new features, fix
+bugs, test patches, etc. Have fun!
+</p><p><br>
+</p>
+<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://wiki.freeswitch.org/index.php?title=Developer_Tips&amp;action=edit&amp;section=2" title="Edit section: Changing your branch">edit</a>]</div><a name="Changing_your_branch"></a><h2> Changing your branch </h2>
+<p>After you've made changes to the local copy of your branch, you can
+commit them to the SVN repository, so that other developers can test
+your changes, provide feedback, etc.
+</p><p>To commit your changes, the first thing you should do is clean
+up your local copy, by removing all compiled objects, output files,
+etc:
+</p>
+<pre>$ cd /usr/local/src/freeswitch.mybranch
+$ make distclean
+</pre>
+<p>Now, review the changes that you are about to commit:
+</p>
+<pre>$ svn diff
+[ ... Verbose output of modified files ... ]
+</pre>
+<p>Make sure that the output from the diff command is what you want to
+put into the SVN repository, that there are no stray files or such.
+Once you've verified this, go ahead and commit the changes. Include a
+brief message about what the changes are that you're comitting.
+</p>
+<pre>$ svn commit -m "Change to the foo.c file to fix bug in parsing the wibble input"
+[ ... SVN Commit output ... ]
+</pre>
+<p>Make sure there are no errors or other complaints from the SVN
+server. You can now tell others to look at your branch to test your
+code changes.
+</p>
+<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://wiki.freeswitch.org/index.php?title=Developer_Tips&amp;action=edit&amp;section=3" title="Edit section: Syncing with Trunk">edit</a>]</div><a name="Syncing_with_Trunk"></a><h2> Syncing with Trunk </h2>
+<p>As the main trunk is undergoing lots of changes, you may from to
+time want to pull changes from trunk into your branch. This can allow
+you to pull in bug fixes, feature enhancements, etc. This is important
+in making that any of your branch changes remain compatible with the
+main trunk. However, before syncing with the trunk <i>it is recommended that you commit your local changes in a seperate commit</i> -- this will ease the job of those who will eventually need to merge your branch into the trunk.
+</p><p>Remember that version that you logged in your initial commit
+message? This is where you need that version number. For this example,
+we're going to assume that this is the first time you are merging in
+trunk since you created your branch. Let's assume that the previous
+trunk version you merged is 4321.
+</p>
+<pre>$ cd /usr/local/src/freeswitch.mybranch
+$ svn merge http://svn.freeswitch.org/svn/freeswitch/trunk -r 4321:HEAD
+[ ... lots of merging ... ]
+</pre>
+<p>You've now pulled in changes from trunk into your branch, and
+retained your local changes. You have changes up through the most
+recent trunk revision ( as indicated by the HEAD in the merge command
+). Note what this version number actually is. You will need it later,
+for future merges in from trunk. Let assume that the current trunk
+version is 5222. </p>
+<pre>$ svn commit -m "Merge of trunk revisions 4321 to 5222 into mybranch" 
+</pre>
+<p>To see the previous commit messages, you can use the <i>svn log</i> command.  Note that this may be quite verbose.
+</p><p><b>NOTE:</b> Always log the revisions you are merging in the
+commit message, if you don't it could be a real headache later on to
+figure out what is from where and when it got there.
+</p>
+<!-- Saved in parser cache with key wiki:pcache:idhash:1682-0!1!0!!en!2 and timestamp 20081103082310 -->
+<div class="printfooter">
+Retrieved from "<a href="http://wiki.freeswitch.org/wiki/Developer_Tips">http://wiki.freeswitch.org/wiki/Developer_Tips</a>"</div>
+			<div id="catlinks"><p class="catlinks"><a href="http://wiki.freeswitch.org/index.php?title=Special:Categories&amp;article=Developer_Tips" title="Special:Categories">Category</a>: <span dir="ltr"><a href="http://wiki.freeswitch.org/index.php?title=Category:Development&amp;action=edit" class="new" title="Category:Development">Development</a></span></p></div>			<!-- end content -->
+			<div class="visualClear"></div>
+		</div>
+	</div>
+		</div>
+		<div id="column-one">
+	<div id="p-cactions" class="portlet">
+		<h5>Views</h5>
+		<ul>
+				 <li id="ca-nstab-main" class="selected"><a title="View the content page [alt-c]" accesskey="c" href="http://wiki.freeswitch.org/wiki/Developer_Tips">Article</a></li>
+				 <li id="ca-talk" class="new"><a title="Discussion about the content page [alt-t]" accesskey="t" href="http://wiki.freeswitch.org/index.php?title=Talk:Developer_Tips&amp;action=edit">Discussion</a></li>
+				 <li id="ca-edit"><a title="You can edit this page. Please use the preview button before saving. [alt-e]" accesskey="e" href="http://wiki.freeswitch.org/index.php?title=Developer_Tips&amp;action=edit">Edit</a></li>
+				 <li id="ca-history"><a title="Past versions of this page. [alt-h]" accesskey="h" href="http://wiki.freeswitch.org/index.php?title=Developer_Tips&amp;action=history">History</a></li>
+		</ul>
+	</div>
+	<div class="portlet" id="p-personal">
+		<h5>Personal tools</h5>
+		<div class="pBody">
+			<ul>
+				<li id="pt-login"><a title="You are encouraged to log in, it is not mandatory however. [alt-o]" accesskey="o" href="http://wiki.freeswitch.org/index.php?title=Special:Userlogin&amp;returnto=Developer_Tips">Log in / create account</a></li>
+			</ul>
+		</div>
+	</div>
+	<div title="Main Page" class="portlet" id="p-logo">
+		<a style="background-image: url(/skins/common/images/wiki.jpg);" href="http://wiki.freeswitch.org/wiki/Main_Page" title="Main Page"></a>
+	</div>
+	<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
+		<div class="portlet" id="p-Start Here">
+		<h5>Start Here</h5>
+		<div class="pBody">
+			<ul>
+				<li id="n-Download-FreeSWITCH"><a href="http://wiki.freeswitch.org/wiki/Download_FreeSWITCH">Download FreeSWITCH</a></li>
+				<li id="n-Installation-Guide"><a href="http://wiki.freeswitch.org/wiki/Installation_Guide">Installation Guide</a></li>
+				<li id="n-Getting-Started-Guide"><a href="http://wiki.freeswitch.org/wiki/Getting_Started_Guide">Getting Started Guide</a></li>
+			</ul>
+		</div>
+	</div>
+		<div class="portlet" id="p-Community">
+		<h5>Community</h5>
+		<div class="pBody">
+			<ul>
+				<li id="n-IRC"><a href="http://wiki.freeswitch.org/wiki/IRC">IRC</a></li>
+				<li id="n-Get-Involved"><a href="http://wiki.freeswitch.org/wiki/Misc_howcanhelp">Get Involved</a></li>
+			</ul>
+		</div>
+	</div>
+		<div class="portlet" id="p-Navigation">
+		<h5>Navigation</h5>
+		<div class="pBody">
+			<ul>
+				<li id="n-mainpage"><a title="Visit the Main Page [alt-z]" accesskey="z" href="http://wiki.freeswitch.org/wiki/Main_Page">Main Page</a></li>
+				<li id="n-Documentation"><a href="http://wiki.freeswitch.org/wiki/Documentation">Documentation</a></li>
+				<li id="n-Installation-Guide"><a href="http://wiki.freeswitch.org/wiki/Installation_Guide">Installation Guide</a></li>
+				<li id="n-Getting-Started-Guide"><a href="http://wiki.freeswitch.org/wiki/Getting_Started_Guide">Getting Started Guide</a></li>
+				<li title="About the project, what you can do, where to find things" id="n-portal"><a href="http://wiki.freeswitch.org/wiki/FreeSWITCH_Wiki:Community_Portal">Community portal</a></li>
+				<li title="Find background information on current events" id="n-currentevents"><a href="http://wiki.freeswitch.org/wiki/Current_events">Current events</a></li>
+				<li id="n-recentchanges"><a title="The list of recent changes in the wiki. [alt-r]" accesskey="r" href="http://wiki.freeswitch.org/wiki/Special:Recentchanges">Recent changes</a></li>
+				<li id="n-randompage"><a title="Load a random page [alt-x]" accesskey="x" href="http://wiki.freeswitch.org/wiki/Special:Random">Random page</a></li>
+				<li title="The place to find out." id="n-help"><a href="http://wiki.freeswitch.org/wiki/Help:Contents">Help</a></li>
+				<li title="Support us" id="n-sitesupport"><a href="http://wiki.freeswitch.org/wiki/FreeSWITCH_Wiki:Site_support">Donations</a></li>
+				<li id="n-How-Can-I-Help?"><a href="http://wiki.freeswitch.org/wiki/Misc_howcanhelp">How Can I Help?</a></li>
+				<li id="n-Download-FreeSWITCH"><a href="http://wiki.freeswitch.org/wiki/Download_FreeSWITCH">Download FreeSWITCH</a></li>
+			</ul>
+		</div>
+	</div>
+		<div id="p-search" class="portlet">
+		<h5><label for="searchInput">Search</label></h5>
+		<div id="searchBody" class="pBody">
+			<form action="/wiki/Special:Search" id="searchform"><div>
+				<input id="searchInput" name="search" accesskey="f" value="" type="text">
+				<input name="go" class="searchButton" id="searchGoButton" value="Go" type="submit">&nbsp;
+				<input name="fulltext" class="searchButton" value="Search" type="submit">
+			</div></form>
+		</div>
+	</div>
+	<div class="portlet" id="p-tb">
+		<h5>Toolbox</h5>
+		<div class="pBody">
+			<ul>
+				<li id="t-whatlinkshere"><a title="List of all wiki pages that link here [alt-j]" accesskey="j" href="http://wiki.freeswitch.org/index.php?title=Special:Whatlinkshere&amp;target=Developer_Tips">What links here</a></li>
+				<li id="t-recentchangeslinked"><a title="Recent changes in pages linked from this page [alt-k]" accesskey="k" href="http://wiki.freeswitch.org/index.php?title=Special:Recentchangeslinked&amp;target=Developer_Tips">Related changes</a></li>
+<li id="t-upload"><a title="Upload images or media files [alt-u]" accesskey="u" href="http://wiki.freeswitch.org/wiki/Special:Upload">Upload file</a></li>
+<li id="t-specialpages"><a title="List of all special pages [alt-q]" accesskey="q" href="http://wiki.freeswitch.org/wiki/Special:Specialpages">Special pages</a></li>
+				<li id="t-print"><a href="http://wiki.freeswitch.org/index.php?title=Developer_Tips&amp;printable=yes">Printable version</a></li>				<li id="t-permalink"><a href="http://wiki.freeswitch.org/index.php?title=Developer_Tips&amp;oldid=3557">Permanent link</a></li><li id="t-pdf"><a href="http://wiki.freeswitch.org/index.php?title=Special:PdfPrint&amp;page=Developer_Tips">Print as PDF</a></li>			</ul>
+		</div>
+	</div>
+		</div><!-- end of the left (by default at least) column -->
+			<div class="visualClear"></div>
+			<div id="footer">
+				<div id="f-poweredbyico"><a href="http://www.mediawiki.org/"><img src="Developer_Tips_files/poweredby_mediawiki_88x31.png" alt="MediaWiki"></a></div>
+			<ul id="f-list">
+				<li id="lastmod"> This page was last modified 20:44, 15 June 2007.</li>
+				<li id="viewcount">This page has been accessed 2,347 times.</li>
+				<li id="privacy"><a href="http://wiki.freeswitch.org/wiki/FreeSWITCH_Wiki:Privacy_policy" title="FreeSWITCH Wiki:Privacy policy">Privacy policy</a></li>
+				<li id="about"><a href="http://wiki.freeswitch.org/wiki/FreeSWITCH_Wiki:About" title="FreeSWITCH Wiki:About">About FreeSWITCH Wiki</a></li>
+				<li id="disclaimer"><a href="http://wiki.freeswitch.org/wiki/FreeSWITCH_Wiki:General_disclaimer" title="FreeSWITCH Wiki:General disclaimer">Disclaimers</a></li>
+			</ul>
+		</div>
+		
+	
+		<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
+</div>
+<!-- Served by tron.freeswitch.org in 0.227 secs. -->
+</body></html>
\ No newline at end of file

Added: freeswitch/branches/gmaruzz/Developer_Tips_files/commonPrint.css
==============================================================================
--- (empty file)
+++ freeswitch/branches/gmaruzz/Developer_Tips_files/commonPrint.css	Mon Nov  3 17:20:21 2008
@@ -0,0 +1,288 @@
+/*
+** MediaWiki Print style sheet for CSS2-capable browsers.
+** Copyright Gabriel Wicke, http://www.aulinx.de/
+**
+** Derived from the plone (http://plone.org/) styles
+** Copyright Alexander Limi
+*/
+
+/* Thanks to A List Apart (http://alistapart.com/) for useful extras */
+a.stub,
+a.new{ color:#ba0000; text-decoration:none; }
+
+#toc { 
+    /*border:1px solid #2f6fab;*/
+    border:1px solid #aaaaaa;
+    background-color:#f9f9f9;
+    padding:5px;
+}
+.tocindent {
+	margin-left: 2em;
+}
+.tocline {
+	margin-bottom: 0px;
+}
+.toctoggle, .editsection {
+	font-size: smaller;
+}
+
+/* images */
+div.floatright { 
+    float: right; 
+    margin: 0;
+    position:relative;
+    border: 0.5em solid White;
+    border-width: 0.5em 0 0.8em 1.4em;
+}
+div.floatright p { font-style: italic;} 
+div.floatleft { 
+    float: left; 
+    margin: 0.3em 0.5em 0.5em 0;
+    position:relative;
+    border: 0.5em solid White;
+    border-width: 0.5em 1.4em 0.8em 0;
+}
+div.floatleft p { font-style: italic; } 
+/* thumbnails */
+div.thumb {
+    margin-bottom: 0.5em;
+    border-style: solid; border-color: White;
+    width: auto;
+    overflow: hidden;
+}
+div.thumb div {
+    border:1px solid #cccccc;
+    padding: 3px !important;
+    background-color:#f9f9f9;
+    font-size: 94%;
+    text-align: center;
+}
+div.thumb div a img {
+    border:1px solid #cccccc;
+}
+div.thumb div div.thumbcaption {
+    border: none;
+    padding: 0.3em 0 0.1em 0;
+}
+div.magnify { display: none; }
+div.tright {
+    float: right;
+    border-width: 0.5em 0 0.8em 1.4em;
+}
+div.tleft {
+    float: left;
+    margin-right:0.5em;
+    border-width: 0.5em 1.4em 0.8em 0;
+}
+
+/* table standards */
+table.rimage {
+    float:right; 
+    width:1pt; 
+    position:relative;
+    margin-left:1em; 
+    margin-bottom:1em;
+    text-align:center;
+}
+
+body {
+    background: White;
+    /*font-size: 11pt !important;*/
+    color: Black;
+    margin: 0;
+    padding: 0;
+}
+
+.noprint,
+div#jump-to-nav,
+div.top,
+div#column-one,
+#colophon,
+.editsection,
+.toctoggle,
+.tochidden,
+div#f-poweredbyico,
+div#f-copyrightico,
+li#f-viewcount,
+li#f-about,
+li#f-disclaimer,
+li#f-privacy {
+    /* Hides all the elements irrelevant for printing */
+    display: none;
+}
+
+ul { 
+    list-style-type: square;
+}
+
+#content {
+    background: none;
+    border: none ! important;
+    font-size: 11pt;
+    padding: 0 ! important;
+    margin: 0 ! important;
+}
+#footer {
+	background : white;
+	color : black;
+    border-top: 1px solid black;
+}
+
+h1, h2, h3, h4, h5, h6
+{
+    font-weight: bold;
+}
+
+p, .documentDescription {
+    margin: 1em 0 ! important;
+    line-height: 1.2em;    
+}
+
+.tocindent p {
+	margin: 0 0 0 0 ! important;
+}
+
+pre {
+    border: 1pt dashed black;
+    white-space: pre;
+    font-size: 8pt;
+    overflow: auto;
+    padding: 1em 0;
+	background : white;
+	color : black;
+}
+
+table.listing,
+table.listing td {
+    border: 1pt solid black;
+    border-collapse: collapse;
+}
+
+a {
+    color: Black !important;
+    padding: 0 !important
+}
+
+a:link, a:visited {
+    color: #520;
+    background: transparent;
+    text-decoration: underline;
+}
+
+#content a.external.text:after, #content a.external.autonumber:after {
+    /* Expand URLs for printing */
+    content: " (" attr(href) ") ";
+}
+
+#globalWrapper {
+    width: 100% !important;
+    min-width: 0 !important;
+}
+
+#content {
+	background : white;
+	color : black;
+}
+
+#column-content {
+    margin: 0 !important;
+}
+
+#column-content #content {
+    padding: 1em;
+    margin: 0 !important;
+}
+/* MSIE/Win doesn't understand 'inherit' */
+a, a.external, a.new, a.stub {
+	color: black ! important;
+	text-decoration: none ! important;
+}
+
+/* Continue ... */
+a, a.external, a.new, a.stub {
+	color: inherit ! important;
+	text-decoration: inherit ! important;
+}
+
+img { border: none; }
+img.tex { vertical-align: middle; }
+span.texhtml { font-family: serif; }
+
+div.townBox {
+    position:relative;
+    float:right;
+    background:White;
+    margin-left:1em;
+    border: 1px solid gray;
+    padding:0.3em;
+    width: 200px;
+    overflow: hidden;
+    clear: right;
+}
+div.townBox dl {
+    padding: 0;
+    margin: 0 0 0.3em 0; 
+    font-size: 96%;
+}
+div.townBox dl dt {
+    background: none;
+    margin: 0.4em 0 0 0;
+}
+div.townBox dl dd {
+    margin: 0.1em 0 0 1.1em;
+    background-color: #f3f3f3;
+}
+
+#siteNotice { display: none; }
+
+table.gallery {
+        border:  1px solid #cccccc;
+        margin:  2px;
+        padding: 2px;
+        background-color:#ffffff;
+}
+
+table.gallery tr { 
+        vertical-align:top;
+}
+
+div.gallerybox {
+        border: 1px solid #cccccc;
+        margin: 2px;
+        background-color:#f9f9f9;
+        width:  150px;
+}
+
+div.gallerybox div.thumb {
+        text-align: center;
+        border: 1px solid #cccccc;
+        margin: 2px;
+}       
+
+div.gallerytext {
+        font-size: 94%;
+        padding: 2px 4px;
+}       
+
+/*
+** Diff rendering
+*/
+table.diff { background:white; }
+td.diff-otitle { background:#ffffff; }
+td.diff-ntitle { background:#ffffff; }
+td.diff-addedline {
+    background:#ccffcc;
+    font-size: smaller;
+    border: solid 2px black;
+}
+td.diff-deletedline {
+    background:#ffffaa;
+    font-size: smaller;
+    border: dotted 2px black;
+}
+td.diff-context {
+    background:#eeeeee;
+    font-size: smaller;
+}
+span.diffchange { color: silver; font-weight: bold; text-decoration: underline; }
+

Added: freeswitch/branches/gmaruzz/Developer_Tips_files/index.php
==============================================================================
--- (empty file)
+++ freeswitch/branches/gmaruzz/Developer_Tips_files/index.php	Mon Nov  3 17:20:21 2008
@@ -0,0 +1,52 @@
+/* generated javascript */var skin = 'monobook';
+var stylepath = '/skins';/* MediaWiki:Monobook */
+/* tooltips and access keys */
+var ta = new Object();
+ta['pt-userpage'] = new Array('.','My user page');
+ta['pt-anonuserpage'] = new Array('.','The user page for the ip you\'re editing as');
+ta['pt-mytalk'] = new Array('n','My talk page');
+ta['pt-anontalk'] = new Array('n','Discussion about edits from this ip address');
+ta['pt-preferences'] = new Array('','My preferences');
+ta['pt-watchlist'] = new Array('l','The list of pages you\'re monitoring for changes.');
+ta['pt-mycontris'] = new Array('y','List of my contributions');
+ta['pt-login'] = new Array('o','You are encouraged to log in, it is not mandatory however.');
+ta['pt-anonlogin'] = new Array('o','You are encouraged to log in, it is not mandatory however.');
+ta['pt-logout'] = new Array('o','Log out');
+ta['ca-talk'] = new Array('t','Discussion about the content page');
+ta['ca-edit'] = new Array('e','You can edit this page. Please use the preview button before saving.');
+ta['ca-addsection'] = new Array('+','Add a comment to this discussion.');
+ta['ca-viewsource'] = new Array('e','This page is protected. You can view its source.');
+ta['ca-history'] = new Array('h','Past versions of this page.');
+ta['ca-protect'] = new Array('=','Protect this page');
+ta['ca-delete'] = new Array('d','Delete this page');
+ta['ca-undelete'] = new Array('d','Restore the edits done to this page before it was deleted');
+ta['ca-move'] = new Array('m','Move this page');
+ta['ca-watch'] = new Array('w','Add this page to your watchlist');
+ta['ca-unwatch'] = new Array('w','Remove this page from your watchlist');
+ta['search'] = new Array('f','Search this wiki');
+ta['p-logo'] = new Array('','Main Page');
+ta['n-mainpage'] = new Array('z','Visit the Main Page');
+ta['n-portal'] = new Array('','About the project, what you can do, where to find things');
+ta['n-currentevents'] = new Array('','Find background information on current events');
+ta['n-recentchanges'] = new Array('r','The list of recent changes in the wiki.');
+ta['n-randompage'] = new Array('x','Load a random page');
+ta['n-help'] = new Array('','The place to find out.');
+ta['n-sitesupport'] = new Array('','Support us');
+ta['t-whatlinkshere'] = new Array('j','List of all wiki pages that link here');
+ta['t-recentchangeslinked'] = new Array('k','Recent changes in pages linked from this page');
+ta['feed-rss'] = new Array('','RSS feed for this page');
+ta['feed-atom'] = new Array('','Atom feed for this page');
+ta['t-contributions'] = new Array('','View the list of contributions of this user');
+ta['t-emailuser'] = new Array('','Send a mail to this user');
+ta['t-upload'] = new Array('u','Upload images or media files');
+ta['t-specialpages'] = new Array('q','List of all special pages');
+ta['ca-nstab-main'] = new Array('c','View the content page');
+ta['ca-nstab-user'] = new Array('c','View the user page');
+ta['ca-nstab-media'] = new Array('c','View the media page');
+ta['ca-nstab-special'] = new Array('','This is a special page, you can\'t edit the page itself.');
+ta['ca-nstab-project'] = new Array('a','View the project page');
+ta['ca-nstab-image'] = new Array('c','View the image page');
+ta['ca-nstab-mediawiki'] = new Array('c','View the system message');
+ta['ca-nstab-template'] = new Array('c','View the template');
+ta['ca-nstab-help'] = new Array('c','View the help page');
+ta['ca-nstab-category'] = new Array('c','View the category page');
\ No newline at end of file

Added: freeswitch/branches/gmaruzz/Developer_Tips_files/poweredby_mediawiki_88x31.png
==============================================================================
Binary file. No diff available.

Added: freeswitch/branches/gmaruzz/Developer_Tips_files/wikibits.js
==============================================================================
--- (empty file)
+++ freeswitch/branches/gmaruzz/Developer_Tips_files/wikibits.js	Mon Nov  3 17:20:21 2008
@@ -0,0 +1,764 @@
+// MediaWiki JavaScript support functions
+
+var clientPC = navigator.userAgent.toLowerCase(); // Get client info
+var is_gecko = ((clientPC.indexOf('gecko')!=-1) && (clientPC.indexOf('spoofer')==-1)
+                && (clientPC.indexOf('khtml') == -1) && (clientPC.indexOf('netscape/7.0')==-1));
+var is_safari = ((clientPC.indexOf('applewebkit')!=-1) && (clientPC.indexOf('spoofer')==-1));
+var is_khtml = (navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled ));
+if (clientPC.indexOf('opera') != -1) {
+	var is_opera = true;
+	var is_opera_preseven = (window.opera && !document.childNodes);
+	var is_opera_seven = (window.opera && document.childNodes);
+}
+
+// add any onload functions in this hook (please don't hard-code any events in the xhtml source)
+
+var doneOnloadHook;
+
+if (!window.onloadFuncts)
+	var onloadFuncts = [];
+
+function addOnloadHook(hookFunct) {
+	// Allows add-on scripts to add onload functions
+	onloadFuncts[onloadFuncts.length] = hookFunct;
+}
+
+function runOnloadHook() {
+	// don't run anything below this for non-dom browsers
+	if (doneOnloadHook || !(document.getElementById && document.getElementsByTagName))
+		return;
+
+	histrowinit();
+	unhidetzbutton();
+	tabbedprefs();
+	akeytt();
+	scrollEditBox();
+	setupCheckboxShiftClick();
+
+	// Run any added-on functions
+	for (var i = 0; i < onloadFuncts.length; i++)
+		onloadFuncts[i]();
+
+	doneOnloadHook = true;
+}
+
+function hookEvent(hookName, hookFunct) {
+	if (window.addEventListener)
+		addEventListener(hookName, hookFunct, false);
+	else if (window.attachEvent)
+		attachEvent("on" + hookName, hookFunct);
+}
+
+//note: all skins shoud call runOnloadHook() at the end of html output,
+//      so the below should be redundant. It's there just in case.
+hookEvent("load", runOnloadHook);
+
+// document.write special stylesheet links
+if (typeof stylepath != 'undefined' && typeof skin != 'undefined') {
+	if (is_opera_preseven) {
+		document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera6Fixes.css">');
+	} else if (is_opera_seven) {
+		document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera7Fixes.css">');
+	} else if (is_khtml) {
+		document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/KHTMLFixes.css">');
+	}
+}
+// Un-trap us from framesets
+if (window.top != window)
+	window.top.location = window.location;
+
+// for enhanced RecentChanges
+function toggleVisibility(_levelId, _otherId, _linkId) {
+	var thisLevel = document.getElementById(_levelId);
+	var otherLevel = document.getElementById(_otherId);
+	var linkLevel = document.getElementById(_linkId);
+	if (thisLevel.style.display == 'none') {
+		thisLevel.style.display = 'block';
+		otherLevel.style.display = 'none';
+		linkLevel.style.display = 'inline';
+	} else {
+		thisLevel.style.display = 'none';
+		otherLevel.style.display = 'inline';
+		linkLevel.style.display = 'none';
+	}
+}
+
+// page history stuff
+// attach event handlers to the input elements on history page
+function histrowinit() {
+	var hf = document.getElementById('pagehistory');
+	if (!hf)
+		return;
+	var lis = hf.getElementsByTagName('li');
+	for (var i = 0; i < lis.length; i++) {
+		var inputs = historyRadios(lis[i]);
+		if (inputs[0] && inputs[1]) {
+			inputs[0].onclick = diffcheck;
+			inputs[1].onclick = diffcheck;
+		}
+	}
+	diffcheck();
+}
+
+function historyRadios(parent) {
+	var inputs = parent.getElementsByTagName('input');
+	var radios = [];
+	for (var i = 0; i < inputs.length; i++) {
+		if (inputs[i].name == "diff" || inputs[i].name == "oldid")
+			radios[radios.length] = inputs[i];
+	}
+	return radios;
+}
+
+// check selection and tweak visibility/class onclick
+function diffcheck() {
+	var dli = false; // the li where the diff radio is checked
+	var oli = false; // the li where the oldid radio is checked
+	var hf = document.getElementById('pagehistory');
+	if (!hf)
+		return true;
+	var lis = hf.getElementsByTagName('li');
+	for (i=0;i<lis.length;i++) {
+		var inputs = historyRadios(lis[i]);
+		if (inputs[1] && inputs[0]) {
+			if (inputs[1].checked || inputs[0].checked) { // this row has a checked radio button
+				if (inputs[1].checked && inputs[0].checked && inputs[0].value == inputs[1].value)
+					return false;
+				if (oli) { // it's the second checked radio
+					if (inputs[1].checked) {
+						oli.className = "selected";
+						return false;
+					}
+				} else if (inputs[0].checked) {
+					return false;
+				}
+				if (inputs[0].checked)
+					dli = lis[i];
+				if (!oli)
+					inputs[0].style.visibility = 'hidden';
+				if (dli)
+					inputs[1].style.visibility = 'hidden';
+				lis[i].className = "selected";
+				oli = lis[i];
+			}  else { // no radio is checked in this row
+				if (!oli)
+					inputs[0].style.visibility = 'hidden';
+				else
+					inputs[0].style.visibility = 'visible';
+				if (dli)
+					inputs[1].style.visibility = 'hidden';
+				else
+					inputs[1].style.visibility = 'visible';
+				lis[i].className = "";
+			}
+		}
+	}
+	return true;
+}
+
+// generate toc from prefs form, fold sections
+// XXX: needs testing on IE/Mac and safari
+// more comments to follow
+function tabbedprefs() {
+	var prefform = document.getElementById('preferences');
+	if (!prefform || !document.createElement)
+		return;
+	if (prefform.nodeName.toLowerCase() == 'a')
+		return; // Occasional IE problem
+	prefform.className = prefform.className + 'jsprefs';
+	var sections = new Array();
+	var children = prefform.childNodes;
+	var seci = 0;
+	for (var i = 0; i < children.length; i++) {
+		if (children[i].nodeName.toLowerCase() == 'fieldset') {
+			children[i].id = 'prefsection-' + seci;
+			children[i].className = 'prefsection';
+			if (is_opera || is_khtml)
+				children[i].className = 'prefsection operaprefsection';
+			var legends = children[i].getElementsByTagName('legend');
+			sections[seci] = new Object();
+			legends[0].className = 'mainLegend';
+			if (legends[0] && legends[0].firstChild.nodeValue)
+				sections[seci].text = legends[0].firstChild.nodeValue;
+			else
+				sections[seci].text = '# ' + seci;
+			sections[seci].secid = children[i].id;
+			seci++;
+			if (sections.length != 1)
+				children[i].style.display = 'none';
+			else
+				var selectedid = children[i].id;
+		}
+	}
+	var toc = document.createElement('ul');
+	toc.id = 'preftoc';
+	toc.selectedid = selectedid;
+	for (i = 0; i < sections.length; i++) {
+		var li = document.createElement('li');
+		if (i == 0)
+			li.className = 'selected';
+		var a = document.createElement('a');
+		a.href = '#' + sections[i].secid;
+		a.onmousedown = a.onclick = uncoversection;
+		a.appendChild(document.createTextNode(sections[i].text));
+		a.secid = sections[i].secid;
+		li.appendChild(a);
+		toc.appendChild(li);
+	}
+	prefform.parentNode.insertBefore(toc, prefform.parentNode.childNodes[0]);
+	document.getElementById('prefsubmit').id = 'prefcontrol';
+}
+
+function uncoversection() {
+	var oldsecid = this.parentNode.parentNode.selectedid;
+	var newsec = document.getElementById(this.secid);
+	if (oldsecid != this.secid) {
+		var ul = document.getElementById('preftoc');
+		document.getElementById(oldsecid).style.display = 'none';
+		newsec.style.display = 'block';
+		ul.selectedid = this.secid;
+		var lis = ul.getElementsByTagName('li');
+		for (var i = 0; i< lis.length; i++) {
+			lis[i].className = '';
+		}
+		this.parentNode.className = 'selected';
+	}
+	return false;
+}
+
+// Timezone stuff
+// tz in format [+-]HHMM
+function checkTimezone(tz, msg) {
+	var localclock = new Date();
+	// returns negative offset from GMT in minutes
+	var tzRaw = localclock.getTimezoneOffset();
+	var tzHour = Math.floor( Math.abs(tzRaw) / 60);
+	var tzMin = Math.abs(tzRaw) % 60;
+	var tzString = ((tzRaw >= 0) ? "-" : "+") + ((tzHour < 10) ? "0" : "") + tzHour + ((tzMin < 10) ? "0" : "") + tzMin;
+	if (tz != tzString) {
+		var junk = msg.split('$1');
+		document.write(junk[0] + "UTC" + tzString + junk[1]);
+	}
+}
+
+function unhidetzbutton() {
+	var tzb = document.getElementById('guesstimezonebutton');
+	if (tzb)
+		tzb.style.display = 'inline';
+}
+
+// in [-]HH:MM format...
+// won't yet work with non-even tzs
+function fetchTimezone() {
+	// FIXME: work around Safari bug
+	var localclock = new Date();
+	// returns negative offset from GMT in minutes
+	var tzRaw = localclock.getTimezoneOffset();
+	var tzHour = Math.floor( Math.abs(tzRaw) / 60);
+	var tzMin = Math.abs(tzRaw) % 60;
+	var tzString = ((tzRaw >= 0) ? "-" : "") + ((tzHour < 10) ? "0" : "") + tzHour +
+		":" + ((tzMin < 10) ? "0" : "") + tzMin;
+	return tzString;
+}
+
+function guessTimezone(box) {
+	document.getElementsByName("wpHourDiff")[0].value = fetchTimezone();
+}
+
+function showTocToggle() {
+	if (document.createTextNode) {
+		// Uses DOM calls to avoid document.write + XHTML issues
+
+		var linkHolder = document.getElementById('toctitle')
+		if (!linkHolder)
+			return;
+
+		var outerSpan = document.createElement('span');
+		outerSpan.className = 'toctoggle';
+
+		var toggleLink = document.createElement('a');
+		toggleLink.id = 'togglelink';
+		toggleLink.className = 'internal';
+		toggleLink.href = 'javascript:toggleToc()';
+		toggleLink.appendChild(document.createTextNode(tocHideText));
+
+		outerSpan.appendChild(document.createTextNode('['));
+		outerSpan.appendChild(toggleLink);
+		outerSpan.appendChild(document.createTextNode(']'));
+
+		linkHolder.appendChild(document.createTextNode(' '));
+		linkHolder.appendChild(outerSpan);
+
+		var cookiePos = document.cookie.indexOf("hidetoc=");
+		if (cookiePos > -1 && document.cookie.charAt(cookiePos + 8) == 1)
+			toggleToc();
+	}
+}
+
+function changeText(el, newText) {
+	// Safari work around
+	if (el.innerText)
+		el.innerText = newText;
+	else if (el.firstChild && el.firstChild.nodeValue)
+		el.firstChild.nodeValue = newText;
+}
+
+function toggleToc() {
+	var toc = document.getElementById('toc').getElementsByTagName('ul')[0];
+	var toggleLink = document.getElementById('togglelink')
+
+	if (toc && toggleLink && toc.style.display == 'none') {
+		changeText(toggleLink, tocHideText);
+		toc.style.display = 'block';
+		document.cookie = "hidetoc=0";
+	} else {
+		changeText(toggleLink, tocShowText);
+		toc.style.display = 'none';
+		document.cookie = "hidetoc=1";
+	}
+}
+
+var mwEditButtons = [];
+var mwCustomEditButtons = []; // eg to add in MediaWiki:Common.js
+
+// this function generates the actual toolbar buttons with localized text
+// we use it to avoid creating the toolbar where javascript is not enabled
+function addButton(imageFile, speedTip, tagOpen, tagClose, sampleText) {
+	// Don't generate buttons for browsers which don't fully
+	// support it.
+	mwEditButtons[mwEditButtons.length] =
+		{"imageFile": imageFile,
+		 "speedTip": speedTip,
+		 "tagOpen": tagOpen,
+		 "tagClose": tagClose,
+		 "sampleText": sampleText};
+}
+
+// this function generates the actual toolbar buttons with localized text
+// we use it to avoid creating the toolbar where javascript is not enabled
+function mwInsertEditButton(parent, item) {
+	var image = document.createElement("img");
+	image.width = 23;
+	image.height = 22;
+	image.src = item.imageFile;
+	image.border = 0;
+	image.alt = item.speedTip;
+	image.title = item.speedTip;
+	image.style.cursor = "pointer";
+	image.onclick = function() {
+		insertTags(item.tagOpen, item.tagClose, item.sampleText);
+		return false;
+	}
+	
+	parent.appendChild(image);
+	return true;
+}
+
+function mwSetupToolbar() {
+	var toolbar = document.getElementById('toolbar');
+	if (!toolbar) return false;
+
+	var textbox = document.getElementById('wpTextbox1');
+	if (!textbox) return false;
+	
+	// Don't generate buttons for browsers which don't fully
+	// support it.
+	if (!document.selection && textbox.selectionStart == null)
+		return false;
+	
+	for (var i in mwEditButtons) {
+		mwInsertEditButton(toolbar, mwEditButtons[i]);
+	}
+	for (var i in mwCustomEditButtons) {
+		mwInsertEditButton(toolbar, mwCustomEditButtons[i]);
+	}
+	return true;
+}
+
+function escapeQuotes(text) {
+	var re = new RegExp("'","g");
+	text = text.replace(re,"\\'");
+	re = new RegExp("\\n","g");
+	text = text.replace(re,"\\n");
+	return escapeQuotesHTML(text);
+}
+
+function escapeQuotesHTML(text) {
+	var re = new RegExp('&',"g");
+	text = text.replace(re,"&amp;");
+	var re = new RegExp('"',"g");
+	text = text.replace(re,"&quot;");
+	var re = new RegExp('<',"g");
+	text = text.replace(re,"&lt;");
+	var re = new RegExp('>',"g");
+	text = text.replace(re,"&gt;");
+	return text;
+}
+
+// apply tagOpen/tagClose to selection in textarea,
+// use sampleText instead of selection if there is none
+// copied and adapted from phpBB
+function insertTags(tagOpen, tagClose, sampleText) {
+	if (document.editform)
+		var txtarea = document.editform.wpTextbox1;
+	else {
+		// some alternate form? take the first one we can find
+		var areas = document.getElementsByTagName('textarea');
+		var txtarea = areas[0];
+	}
+
+	// IE
+	if (document.selection  && !is_gecko) {
+		var theSelection = document.selection.createRange().text;
+		if (!theSelection)
+			theSelection=sampleText;
+		txtarea.focus();
+		if (theSelection.charAt(theSelection.length - 1) == " ") { // exclude ending space char, if any
+			theSelection = theSelection.substring(0, theSelection.length - 1);
+			document.selection.createRange().text = tagOpen + theSelection + tagClose + " ";
+		} else {
+			document.selection.createRange().text = tagOpen + theSelection + tagClose;
+		}
+
+	// Mozilla
+	} else if(txtarea.selectionStart || txtarea.selectionStart == '0') {
+		var replaced = false;
+		var startPos = txtarea.selectionStart;
+		var endPos = txtarea.selectionEnd;
+		if (endPos-startPos)
+			replaced = true;
+		var scrollTop = txtarea.scrollTop;
+		var myText = (txtarea.value).substring(startPos, endPos);
+		if (!myText)
+			myText=sampleText;
+		if (myText.charAt(myText.length - 1) == " ") { // exclude ending space char, if any
+			subst = tagOpen + myText.substring(0, (myText.length - 1)) + tagClose + " ";
+		} else {
+			subst = tagOpen + myText + tagClose;
+		}
+		txtarea.value = txtarea.value.substring(0, startPos) + subst +
+			txtarea.value.substring(endPos, txtarea.value.length);
+		txtarea.focus();
+		//set new selection
+		if (replaced) {
+			var cPos = startPos+(tagOpen.length+myText.length+tagClose.length);
+			txtarea.selectionStart = cPos;
+			txtarea.selectionEnd = cPos;
+		} else {
+			txtarea.selectionStart = startPos+tagOpen.length;
+			txtarea.selectionEnd = startPos+tagOpen.length+myText.length;
+		}
+		txtarea.scrollTop = scrollTop;
+
+	// All other browsers get no toolbar.
+	// There was previously support for a crippled "help"
+	// bar, but that caused more problems than it solved.
+	}
+	// reposition cursor if possible
+	if (txtarea.createTextRange)
+		txtarea.caretPos = document.selection.createRange().duplicate();
+}
+
+function akeytt() {
+	if (typeof ta == "undefined" || !ta)
+		return;
+	var pref = 'alt-';
+	if (is_safari || navigator.userAgent.toLowerCase().indexOf('mac') + 1
+		|| navigator.userAgent.toLowerCase().indexOf('konqueror') + 1 )
+		pref = 'control-';
+	if (is_opera)
+		pref = 'shift-esc-';
+
+	for (var id in ta) {
+		var n = document.getElementById(id);
+		if (n) {
+			var a = null;
+			var ak = '';
+			// Are we putting accesskey in it
+			if (ta[id][0].length > 0) {
+				// Is this object a object? If not assume it's the next child.
+
+				if (n.nodeName.toLowerCase() == "a") {
+					a = n;
+				} else {
+					a = n.childNodes[0];
+				}
+
+				if (a) {
+					a.accessKey = ta[id][0];
+					ak = ' ['+pref+ta[id][0]+']';
+				}
+			} else {
+				// We don't care what type the object is when assigning tooltip
+				a = n;
+				ak = '';
+			}
+
+			if (a) {
+				a.title = ta[id][1]+ak;
+			}
+		}
+	}
+}
+
+function setupRightClickEdit() {
+	if (document.getElementsByTagName) {
+		var divs = document.getElementsByTagName('div');
+		for (var i = 0; i < divs.length; i++) {
+			var el = divs[i];
+			if(el.className == 'editsection') {
+				addRightClickEditHandler(el);
+			}
+		}
+	}
+}
+
+function addRightClickEditHandler(el) {
+	for (var i = 0; i < el.childNodes.length; i++) {
+		var link = el.childNodes[i];
+		if (link.nodeType == 1 && link.nodeName.toLowerCase() == 'a') {
+			var editHref = link.getAttribute('href');
+
+			// find the following a
+			var next = el.nextSibling;
+			while (next.nodeType != 1)
+				next = next.nextSibling;
+
+			// find the following header
+			next = next.nextSibling;
+			while (next.nodeType != 1)
+				next = next.nextSibling;
+
+			if (next && next.nodeType == 1 &&
+				next.nodeName.match(/^[Hh][1-6]$/)) {
+				next.oncontextmenu = function() {
+					document.location = editHref;
+					return false;
+				}
+			}
+		}
+	}
+}
+
+function setupCheckboxShiftClick() {
+	if (document.getElementsByTagName) {
+		var uls = document.getElementsByTagName('ul');
+		var len = uls.length;
+		for (var i = 0; i < len; ++i) {
+			addCheckboxClickHandlers(uls[i]);
+		}
+	}
+}
+
+function addCheckboxClickHandlers(ul, start, finish) {
+	if (ul.checkboxHandlersTimer) {
+		clearInterval(ul.checkboxHandlersTimer);
+	}
+	if ( !ul.childNodes ) {
+		return;
+	}
+	var len = ul.childNodes.length;
+	if (len < 2) {
+		return;
+	}
+	start = start || 0;
+	finish = finish || start + 250;
+	if ( finish > len ) { finish = len; }
+	ul.checkboxes = ul.checkboxes || [];
+	ul.lastCheckbox = ul.lastCheckbox || null;
+	for (var i = start; i<finish; ++i) {
+		var child = ul.childNodes[i];
+		if ( child && child.childNodes && child.childNodes[0] ) {
+			var cb = child.childNodes[0];
+			if ( !cb.nodeName || cb.nodeName.toLowerCase() != 'input' ||
+			     !cb.type || cb.type.toLowerCase() != 'checkbox' ) {
+				return;
+			}
+			cb.index = ul.checkboxes.push(cb) - 1;
+			cb.container = ul;
+			cb.onmouseup = checkboxMouseupHandler;
+		}
+	}
+	if (finish < len) {
+	  var f=function(){ addCheckboxClickHandlers(ul, finish, finish+250); };
+	  ul.checkboxHandlersTimer=setInterval(f, 200);
+	}
+}
+
+function checkboxMouseupHandler(e) {
+	if (typeof e == 'undefined') {
+		e = window.event;
+	}
+	if ( !e.shiftKey || this.container.lastCheckbox === null ) {
+		this.container.lastCheckbox = this.index;
+		return true;
+	}
+	var endState = !this.checked;
+	if ( is_opera ) { // opera has already toggled the checkbox by this point
+		endState = !endState;
+	}
+	var start, finish;
+	if ( this.index < this.container.lastCheckbox ) {
+		start = this.index + 1;
+		finish = this.container.lastCheckbox;
+	} else {
+		start = this.container.lastCheckbox;
+		finish = this.index - 1;
+	}
+	for (var i = start; i <= finish; ++i ) {
+		this.container.checkboxes[i].checked = endState;
+	}
+	this.container.lastCheckbox = this.index;
+	return true;
+}
+
+function toggle_element_activation(ida,idb) {
+	if (!document.getElementById)
+		return;
+	document.getElementById(ida).disabled=true;
+	document.getElementById(idb).disabled=false;
+}
+
+function toggle_element_check(ida,idb) {
+	if (!document.getElementById)
+		return;
+	document.getElementById(ida).checked=true;
+	document.getElementById(idb).checked=false;
+}
+
+function fillDestFilename(id) {
+	if (!document.getElementById)
+		return;
+	var path = document.getElementById(id).value;
+	// Find trailing part
+	var slash = path.lastIndexOf('/');
+	var backslash = path.lastIndexOf('\\');
+	var fname;
+	if (slash == -1 && backslash == -1) {
+		fname = path;
+	} else if (slash > backslash) {
+		fname = path.substring(slash+1, 10000);
+	} else {
+		fname = path.substring(backslash+1, 10000);
+	}
+
+	// Capitalise first letter and replace spaces by underscores
+	fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace(/ /g, '_');
+
+	// Output result
+	var destFile = document.getElementById('wpDestFile');
+	if (destFile)
+		destFile.value = fname;
+}
+
+
+function considerChangingExpiryFocus() {
+	if (!document.getElementById)
+		return;
+	var drop = document.getElementById('wpBlockExpiry');
+	if (!drop)
+		return;
+	var field = document.getElementById('wpBlockOther');
+	if (!field)
+		return;
+	var opt = drop.value;
+	if (opt == 'other')
+		field.style.display = '';
+	else
+		field.style.display = 'none';
+}
+
+function scrollEditBox() {
+	var editBoxEl = document.getElementById("wpTextbox1");
+	var scrollTopEl = document.getElementById("wpScrolltop");
+	var editFormEl = document.getElementById("editform");
+
+	if (editBoxEl && scrollTopEl) {
+		if (scrollTopEl.value) editBoxEl.scrollTop = scrollTopEl.value;
+		editFormEl.onsubmit = function() {
+			document.getElementById("wpScrolltop").value = document.getElementById("wpTextbox1").scrollTop;
+		}
+	}
+}
+
+hookEvent("load", scrollEditBox);
+
+function allmessagesfilter() {
+	text = document.getElementById('allmessagesinput').value;
+	k = document.getElementById('allmessagestable');
+	if (!k) { return;}
+
+	var items = k.getElementsByTagName('span');
+
+	if ( text.length > allmessages_prev.length ) {
+		for (var i = items.length-1, j = 0; i >= 0; i--) {
+			j = allmessagesforeach(items, i, j);
+		}
+	} else {
+		for (var i = 0, j = 0; i < items.length; i++) {
+			j = allmessagesforeach(items, i, j);
+		}
+	}
+	allmessages_prev = text;
+}
+
+function allmessagesforeach(items, i, j) {
+	var hItem = items[i].getAttribute('id');
+	if (hItem.substring(0,17) == 'sp-allmessages-i-') {
+		if (items[i].firstChild && items[i].firstChild.nodeName == '#text' && items[i].firstChild.nodeValue.indexOf(text) != -1) {
+			var itemA = document.getElementById( hItem.replace('i', 'r1') );
+			var itemB = document.getElementById( hItem.replace('i', 'r2') );
+			if ( itemA.style.display != '' ) {
+				var s = "allmessageshider(\"" + hItem.replace('i', 'r1') + "\", \"" + hItem.replace('i', 'r2') + "\", '')";
+				var k = window.setTimeout(s,j++*5);
+			}
+		} else {
+			var itemA = document.getElementById( hItem.replace('i', 'r1') );
+			var itemB = document.getElementById( hItem.replace('i', 'r2') );
+			if ( itemA.style.display != 'none' ) {
+				var s = "allmessageshider(\"" + hItem.replace('i', 'r1') + "\", \"" + hItem.replace('i', 'r2') + "\", 'none')";
+				var k = window.setTimeout(s,j++*5);
+			}
+		}
+	}
+	return j;
+}
+
+
+function allmessageshider(idA, idB, cstyle) {
+	var itemA = document.getElementById( idA );
+	var itemB = document.getElementById( idB );
+	if (itemA) { itemA.style.display = cstyle; }
+	if (itemB) { itemB.style.display = cstyle; }
+}
+
+function allmessagesmodified() {
+	allmessages_modified = !allmessages_modified;
+	k = document.getElementById('allmessagestable');
+	if (!k) { return;}
+	var items = k.getElementsByTagName('tr');
+	for (var i = 0, j = 0; i< items.length; i++) {
+		if (!allmessages_modified ) {
+			if ( items[i].style.display != '' ) {
+				var s = "allmessageshider(\"" + items[i].getAttribute('id') + "\", null, '')";
+				var k = window.setTimeout(s,j++*5);
+			}
+		} else if (items[i].getAttribute('class') == 'def' && allmessages_modified) {
+			if ( items[i].style.display != 'none' ) {
+				var s = "allmessageshider(\"" + items[i].getAttribute('id') + "\", null, 'none')";
+				var k = window.setTimeout(s,j++*5);
+			}
+		}
+	}
+}
+
+function allmessagesshow() {
+	k = document.getElementById('allmessagesfilter');
+	if (k) { k.style.display = ''; }
+
+	allmessages_prev = '';
+	allmessages_modified = false;
+}
+
+hookEvent("load", allmessagesshow);
+hookEvent("load", mwSetupToolbar);



More information about the Freeswitch-svn mailing list