event refactor, landing on HEAD!
[freeside.git] / httemplate / elements / fckeditor / editor / filemanager / browser / default / js / common.js
1 /*\r
2  * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
3  * Copyright (C) 2003-2007 Frederico Caldeira Knabben\r
4  *\r
5  * == BEGIN LICENSE ==\r
6  *\r
7  * Licensed under the terms of any of the following licenses at your\r
8  * choice:\r
9  *\r
10  *  - GNU General Public License Version 2 or later (the "GPL")\r
11  *    http://www.gnu.org/licenses/gpl.html\r
12  *\r
13  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
14  *    http://www.gnu.org/licenses/lgpl.html\r
15  *\r
16  *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
17  *    http://www.mozilla.org/MPL/MPL-1.1.html\r
18  *\r
19  * == END LICENSE ==\r
20  *\r
21  * Common objects and functions shared by all pages that compose the\r
22  * File Browser dialog window.\r
23  */\r
24 \r
25 function AddSelectOption( selectElement, optionText, optionValue )\r
26 {\r
27         var oOption = document.createElement("OPTION") ;\r
28 \r
29         oOption.text    = optionText ;\r
30         oOption.value   = optionValue ;\r
31 \r
32         selectElement.options.add(oOption) ;\r
33 \r
34         return oOption ;\r
35 }\r
36 \r
37 var oConnector  = window.parent.oConnector ;\r
38 var oIcons              = window.parent.oIcons ;\r
39 \r
40 \r
41 function StringBuilder( value )\r
42 {\r
43     this._Strings = new Array( value || '' ) ;\r
44 }\r
45 \r
46 StringBuilder.prototype.Append = function( value )\r
47 {\r
48     if ( value )\r
49         this._Strings.push( value ) ;\r
50 }\r
51 \r
52 StringBuilder.prototype.ToString = function()\r
53 {\r
54     return this._Strings.join( '' ) ;\r
55 }