From defe513bde7ba321d46d020cd586818b35985a58 Mon Sep 17 00:00:00 2001 From: jennylee Date: Fri, 22 Mar 2013 14:13:27 -0400 Subject: [PATCH 01/29] BUG 10953Report Table error with currency fields When having a process with some currency field (Real Number), and running a case before creating the RT, when you create the RT and saw the data inside it shows the number as integer. But when you run a case after creating the RT it shows the currency in good way (Real number). It was fixed. --- workflow/engine/controllers/pmTablesProxy.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workflow/engine/controllers/pmTablesProxy.php b/workflow/engine/controllers/pmTablesProxy.php index 0a6ccf585..ab5563b05 100755 --- a/workflow/engine/controllers/pmTablesProxy.php +++ b/workflow/engine/controllers/pmTablesProxy.php @@ -307,6 +307,8 @@ class pmTablesProxy extends HttpProxyController FieldsPeer::doDelete( $oCriteria ); } + $addTabData['ADD_TAB_UID'] = $addTabUid; + // Updating pmtable fields foreach ($columns as $i => $column) { $field = array ('FLD_UID' => $column->uid,'FLD_INDEX' => $i,'ADD_TAB_UID' => $addTabUid,'FLD_NAME' => $column->field_name,'FLD_DESCRIPTION' => $column->field_label,'FLD_TYPE' => $column->field_type,'FLD_SIZE' => $column->field_size == '' ? null : $column->field_size,'FLD_NULL' => $column->field_null ? 1 : 0,'FLD_AUTO_INCREMENT' => $column->field_autoincrement ? 1 : 0,'FLD_KEY' => $column->field_key ? 1 : 0,'FLD_FOREIGN_KEY' => 0,'FLD_FOREIGN_KEY_TABLE' => '','FLD_DYN_NAME' => $column->field_dyn,'FLD_DYN_UID' => $column->field_uid,'FLD_FILTER' => (isset( $column->field_filter ) && $column->field_filter) ? 1 : 0 From cbe2fbe871afd3e9e182b8f0dea82a7a69b48d3c Mon Sep 17 00:00:00 2001 From: ralph Date: Fri, 22 Mar 2013 15:52:26 -0400 Subject: [PATCH 02/29] Adding feature to coloring and check syntaxis on trigger editor. --- .../contrib/php/js/parsephphtmlmixed.js | 6 + .../codemirror/contrib/php/js/tokenizephp.js | 8 ++ gulliver/js/codemirror/css/phpcolors.css | 114 ++++++++++++++++++ gulliver/js/codemirror/js/editor.js | 4 +- .../engine/methods/triggers/triggers_Edit.php | 3 +- workflow/engine/skinEngine/base/config.xml | 6 +- .../engine/skinEngine/base/css/csscolors.css | 55 +++++++++ .../engine/skinEngine/base/css/phpcolors.css | 114 ++++++++++++++++++ .../xmlform/triggers/triggers_Edit.html | 4 +- .../engine/xmlform/triggers/triggers_Edit.xml | 55 ++++++--- 10 files changed, 346 insertions(+), 23 deletions(-) create mode 100755 gulliver/js/codemirror/css/phpcolors.css create mode 100755 workflow/engine/skinEngine/base/css/csscolors.css create mode 100755 workflow/engine/skinEngine/base/css/phpcolors.css diff --git a/gulliver/js/codemirror/contrib/php/js/parsephphtmlmixed.js b/gulliver/js/codemirror/contrib/php/js/parsephphtmlmixed.js index fa189c18c..7c23007c2 100755 --- a/gulliver/js/codemirror/contrib/php/js/parsephphtmlmixed.js +++ b/gulliver/js/codemirror/contrib/php/js/parsephphtmlmixed.js @@ -19,6 +19,8 @@ var PHPHTMLMixedParser = Editor.Parser = (function() { var htmlParser = XMLParser.make(stream), localParser = null, inTag = false, lastAtt = null, phpParserState = null; var iter = {next: top, copy: copy}; + if (Editor.Parser.options && Editor.Parser.options.parserConfig.phpOnly == true) + iter.next = local(PHPParser, "?>"); function top() { var token = htmlParser.next(); @@ -49,6 +51,10 @@ var PHPHTMLMixedParser = Editor.Parser = (function() { lastAtt = null; inTag = false; } + else if (token.type == "xml-text" && token.style == "xml-text") { + if (Editor.Parser.options && Editor.Parser.options.parserConfig.phpOnly == true) + iter.next = local(PHPParser, "?>"); + } return token; } function local(parser, tag) { diff --git a/gulliver/js/codemirror/contrib/php/js/tokenizephp.js b/gulliver/js/codemirror/contrib/php/js/tokenizephp.js index 39041dc29..70b683f89 100755 --- a/gulliver/js/codemirror/contrib/php/js/tokenizephp.js +++ b/gulliver/js/codemirror/contrib/php/js/tokenizephp.js @@ -956,6 +956,14 @@ var tokenizePHP = (function() { "SplQueue", "SplStack", "SQLite3", "SQLite3Result", "SQLite3Stmt", "SQLiteDatabase", "SQLiteException", "SQLiteResult", "SQLiteUnbuffered", "Svn", "SvnNode", "SvnWc", "SvnWcSchedule", "XSLTProcessor", "ZipArchive", + "PMFTaskCase","PMFTaskList","PMFUserList","PMFGroupList", + "PMFRoleList","PMFCaseList","PMFProcessList","PMFSendVariables", + "PMFDerivateCase","PMFNewCaseImpersonate","PMFNewCase","PMFPauseCase", + "PMFUnpauseCase","PMFAssignUserToGroup","PMFCreateUser","PMFUpdateUser", + "PMFInformationUser","generateCode","setCaseTrackerCode","jumping", + "PMFRedirectToStep","pauseCase","PMFSendMessage","PMFgetLabelOption", + "PMFGenerateOutputDocument","PMFGetUserEmailAddress","PMFGetNextAssignedUser","PMFDeleteCase", + "PMFCancelCase","PMFAddInputDocument","PMFAddCaseNote","PMFGetCaseNotes" ].forEach(function(element, index, array) { result[element] = token("t_string", "php-predefined-class"); }); diff --git a/gulliver/js/codemirror/css/phpcolors.css b/gulliver/js/codemirror/css/phpcolors.css new file mode 100755 index 000000000..43d4057b1 --- /dev/null +++ b/gulliver/js/codemirror/css/phpcolors.css @@ -0,0 +1,114 @@ +/* +Copyright (c) 2008-2009 Yahoo! Inc. All rights reserved. +The copyrights embodied in the content of this file are licensed by +Yahoo! Inc. under the BSD (revised) open source license + +@author Dan Vlad Dascalescu +*/ + +html { + cursor: text; +} + +.editbox { + margin: .4em; + padding: 0; + font-family: monospace; + font-size: 10pt; +} + +/*We should define specific styles for every element of the syntax. + the setting below will cause some annoying color to show through if we missed + defining a style for a token. This is also the "color" of the whitespace and + of the cursor. +*/ +pre.code, .editbox { + color: red; +} + +.editbox p { + margin: 0; +} + +span.php-punctuation { + color: blue; +} + +span.php-keyword { + color: #770088; + font-weight: bold; +} + +span.php-operator { + color: blue; +} + +/* __FILE__ etc.; http://php.net/manual/en/reserved.php */ +span.php-compile-time-constant { + color: #776088; + font-weight: bold; +} + +/* output of get_defined_constants(). Differs from http://php.net/manual/en/reserved.constants.php */ +span.php-predefined-constant { + color: darkgreen; + font-weight: bold; +} + +/* PHP reserved "language constructs"... echo() etc.; http://php.net/manual/en/reserved.php */ +span.php-reserved-language-construct { + color: green; + font-weight: bold; +} + +/* PHP built-in functions: glob(), chr() etc.; output of get_defined_functions()["internal"] */ +span.php-predefined-function { + color: green; +} + +/* PHP predefined classes: PDO, Exception etc.; output of get_declared_classes() and different from http://php.net/manual/en/reserved.classes.php */ +span.php-predefined-class { + color: green; +} + +span.php-atom { + color: #228811; +} + +/* class, interface, namespace or function names, but not $variables */ +span.php-t_string { + color: black; +} + +span.php-variable { + color: black; + font-weight: bold; +} + + +span.js-localvariable { + color: #004499; +} + +span.php-comment { + color: #AA7700; + font-stretch: condensed; +/* font-style: italic; This causes line height to slightly change, getting line numbers out of sync */ +} + +span.php-string-single-quoted { + color: #AA2222; +} +/* double quoted strings allow interpolation */ +span.php-string-double-quoted { + color: #AA2222; + font-weight: bold; +} + +span.syntax-error { + background-color: red; +} + +span.deprecated { + font-size: smaller; +} diff --git a/gulliver/js/codemirror/js/editor.js b/gulliver/js/codemirror/js/editor.js index fddd0939a..4732686d4 100755 --- a/gulliver/js/codemirror/js/editor.js +++ b/gulliver/js/codemirror/js/editor.js @@ -420,8 +420,10 @@ var Editor = (function(){ if (!Editor.Parser) throw "No parser loaded."; - if (options.parserConfig && Editor.Parser.configure) + if (options.parserConfig && Editor.Parser.configure) { Editor.Parser.configure(options.parserConfig); + Editor.Parser.options = options; + } if (!options.readOnly && !internetExplorer) select.setCursorPos(container, {node: null, offset: 0}); diff --git a/workflow/engine/methods/triggers/triggers_Edit.php b/workflow/engine/methods/triggers/triggers_Edit.php index ddbea6e5b..3d9a7ecb7 100755 --- a/workflow/engine/methods/triggers/triggers_Edit.php +++ b/workflow/engine/methods/triggers/triggers_Edit.php @@ -63,9 +63,10 @@ if (isset( $_GET['TRI_UID'] )) { $xmlform = 'triggers/triggersProperties'; $xmlform_action = '../triggers/triggers_Save'; } - G::LoadClass( 'xmlfield_InputPM' ); $G_PUBLISH = new Publisher(); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', $xmlform, '', $aFields, $xmlform_action ); +$oHeadPublisher =& headPublisher::getSingleton(); +$oHeadPublisher->addScriptFile('/js/codemirror/js/codemirror.js', 1); G::RenderPage( 'publish', 'raw' ); diff --git a/workflow/engine/skinEngine/base/config.xml b/workflow/engine/skinEngine/base/config.xml index ddcf56ea6..30e05b49e 100755 --- a/workflow/engine/skinEngine/base/config.xml +++ b/workflow/engine/skinEngine/base/config.xml @@ -17,6 +17,8 @@ + + @@ -49,7 +51,9 @@ + + - \ No newline at end of file + diff --git a/workflow/engine/skinEngine/base/css/csscolors.css b/workflow/engine/skinEngine/base/css/csscolors.css new file mode 100755 index 000000000..cd4b79e3c --- /dev/null +++ b/workflow/engine/skinEngine/base/css/csscolors.css @@ -0,0 +1,55 @@ +html { + cursor: text; +} + +.editbox { + margin: .4em; + padding: 0; + font-family: monospace; + font-size: 10pt; + color: black; +} + +pre.code, .editbox { + color: #666; +} + +.editbox p { + margin: 0; +} + +span.css-at { + color: #708; +} + +span.css-unit { + color: #281; +} + +span.css-value { + color: #708; +} + +span.css-identifier { + color: black; +} + +span.css-selector { + color: #11B; +} + +span.css-important { + color: #00F; +} + +span.css-colorcode { + color: #299; +} + +span.css-comment { + color: #A70; +} + +span.css-string { + color: #A22; +} diff --git a/workflow/engine/skinEngine/base/css/phpcolors.css b/workflow/engine/skinEngine/base/css/phpcolors.css new file mode 100755 index 000000000..43d4057b1 --- /dev/null +++ b/workflow/engine/skinEngine/base/css/phpcolors.css @@ -0,0 +1,114 @@ +/* +Copyright (c) 2008-2009 Yahoo! Inc. All rights reserved. +The copyrights embodied in the content of this file are licensed by +Yahoo! Inc. under the BSD (revised) open source license + +@author Dan Vlad Dascalescu +*/ + +html { + cursor: text; +} + +.editbox { + margin: .4em; + padding: 0; + font-family: monospace; + font-size: 10pt; +} + +/*We should define specific styles for every element of the syntax. + the setting below will cause some annoying color to show through if we missed + defining a style for a token. This is also the "color" of the whitespace and + of the cursor. +*/ +pre.code, .editbox { + color: red; +} + +.editbox p { + margin: 0; +} + +span.php-punctuation { + color: blue; +} + +span.php-keyword { + color: #770088; + font-weight: bold; +} + +span.php-operator { + color: blue; +} + +/* __FILE__ etc.; http://php.net/manual/en/reserved.php */ +span.php-compile-time-constant { + color: #776088; + font-weight: bold; +} + +/* output of get_defined_constants(). Differs from http://php.net/manual/en/reserved.constants.php */ +span.php-predefined-constant { + color: darkgreen; + font-weight: bold; +} + +/* PHP reserved "language constructs"... echo() etc.; http://php.net/manual/en/reserved.php */ +span.php-reserved-language-construct { + color: green; + font-weight: bold; +} + +/* PHP built-in functions: glob(), chr() etc.; output of get_defined_functions()["internal"] */ +span.php-predefined-function { + color: green; +} + +/* PHP predefined classes: PDO, Exception etc.; output of get_declared_classes() and different from http://php.net/manual/en/reserved.classes.php */ +span.php-predefined-class { + color: green; +} + +span.php-atom { + color: #228811; +} + +/* class, interface, namespace or function names, but not $variables */ +span.php-t_string { + color: black; +} + +span.php-variable { + color: black; + font-weight: bold; +} + + +span.js-localvariable { + color: #004499; +} + +span.php-comment { + color: #AA7700; + font-stretch: condensed; +/* font-style: italic; This causes line height to slightly change, getting line numbers out of sync */ +} + +span.php-string-single-quoted { + color: #AA2222; +} +/* double quoted strings allow interpolation */ +span.php-string-double-quoted { + color: #AA2222; + font-weight: bold; +} + +span.syntax-error { + background-color: red; +} + +span.deprecated { + font-size: smaller; +} diff --git a/workflow/engine/xmlform/triggers/triggers_Edit.html b/workflow/engine/xmlform/triggers/triggers_Edit.html index d892c1436..9209f7c45 100755 --- a/workflow/engine/xmlform/triggers/triggers_Edit.html +++ b/workflow/engine/xmlform/triggers/triggers_Edit.html @@ -35,8 +35,8 @@
- - \ No newline at end of file + diff --git a/workflow/engine/xmlform/triggers/triggers_Edit.xml b/workflow/engine/xmlform/triggers/triggers_Edit.xml index 82cb4418b..875499d96 100755 --- a/workflow/engine/xmlform/triggers/triggers_Edit.xml +++ b/workflow/engine/xmlform/triggers/triggers_Edit.xml @@ -14,11 +14,20 @@ Cancel - + Save - \ No newline at end of file + From 9ccd67025ae28418d6a79d1c4b7c9e5c70c3f115 Mon Sep 17 00:00:00 2001 From: ralph Date: Mon, 25 Mar 2013 11:01:48 -0400 Subject: [PATCH 03/29] Adding codeMirror Editor to Trigger custom and Trigger copy options. --- .../engine/methods/triggers/triggerCopy.php | 3 +- .../methods/triggers/triggers_EditCustom.php | 2 + .../engine/xmlform/triggers/triggerCopy.xml | 22 ++++++-- .../xmlform/triggers/triggersCustom.xml | 52 +++++++++++++------ 4 files changed, 57 insertions(+), 22 deletions(-) diff --git a/workflow/engine/methods/triggers/triggerCopy.php b/workflow/engine/methods/triggers/triggerCopy.php index d4d1edbd8..2c4693f3a 100644 --- a/workflow/engine/methods/triggers/triggerCopy.php +++ b/workflow/engine/methods/triggers/triggerCopy.php @@ -25,6 +25,7 @@ if (isset($_GET["TRI_UID"]) && !empty($_GET["TRI_UID"])) { $G_PUBLISH = new Publisher(); $G_PUBLISH->AddContent("xmlform", "xmlform", "triggers/triggerCopy", "", $arrayField, "../triggers/triggers_Save"); - +$oHeadPublisher =& headPublisher::getSingleton(); +$oHeadPublisher->addScriptFile('/js/codemirror/js/codemirror.js', 1); G::RenderPage("publish", "raw"); diff --git a/workflow/engine/methods/triggers/triggers_EditCustom.php b/workflow/engine/methods/triggers/triggers_EditCustom.php index fa6aa8ab2..11b697fb5 100755 --- a/workflow/engine/methods/triggers/triggers_EditCustom.php +++ b/workflow/engine/methods/triggers/triggers_EditCustom.php @@ -37,5 +37,7 @@ $xmlform = 'triggers/triggersCustom'; G::LoadClass( 'xmlfield_InputPM' ); $G_PUBLISH = new Publisher(); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', $xmlform, '', $aFields, '../triggers/triggers_Save' ); +$oHeadPublisher =& headPublisher::getSingleton(); +$oHeadPublisher->addScriptFile('/js/codemirror/js/codemirror.js', 1); G::RenderPage( 'publish', 'raw' ); diff --git a/workflow/engine/xmlform/triggers/triggerCopy.xml b/workflow/engine/xmlform/triggers/triggerCopy.xml index d45f947e7..555af8f72 100644 --- a/workflow/engine/xmlform/triggers/triggerCopy.xml +++ b/workflow/engine/xmlform/triggers/triggerCopy.xml @@ -26,7 +26,7 @@ - + - + Title of the new trigger - + Description of the new trigger - + Script - + Copy/Import and Save @@ -75,6 +75,15 @@ - + Save @@ -30,6 +30,15 @@ Date: Mon, 25 Mar 2013 12:07:48 -0400 Subject: [PATCH 04/29] BUG10870 - "A better trigger editor is needed" error: The current trigger editor has no syntax check Sol: Using CodeMirror as well as XMl editor, will give trigger editor the feature that it needs. + removing auto tabs at code begin. --- gulliver/js/codemirror/contrib/php/js/parsephp.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gulliver/js/codemirror/contrib/php/js/parsephp.js b/gulliver/js/codemirror/contrib/php/js/parsephp.js index 7d0ad1f3b..4280ee9b7 100755 --- a/gulliver/js/codemirror/contrib/php/js/parsephp.js +++ b/gulliver/js/codemirror/contrib/php/js/parsephp.js @@ -77,7 +77,11 @@ var PHPParser = Editor.Parser = (function() { function indentPHP(lexical) { return function(firstChars) { var firstChar = firstChars && firstChars.charAt(0), type = lexical.type; - var closing = firstChar == type; + if (type == "block") { + var closing = true; + } else { + var closing = firstChar == type; + } if (type == "form" && firstChar == "{") return lexical.indented; else if (type == "stat" || type == "form") From 948a5087d72a76ef003a8217672f5f26d5701b33 Mon Sep 17 00:00:00 2001 From: ralph Date: Tue, 26 Mar 2013 18:14:02 -0400 Subject: [PATCH 05/29] Enter php-hint --- gulliver/js/codemirror/addon/hint/php-hint.js | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 gulliver/js/codemirror/addon/hint/php-hint.js diff --git a/gulliver/js/codemirror/addon/hint/php-hint.js b/gulliver/js/codemirror/addon/hint/php-hint.js new file mode 100644 index 000000000..e0816709c --- /dev/null +++ b/gulliver/js/codemirror/addon/hint/php-hint.js @@ -0,0 +1,82 @@ +(function () { + var Pos = CodeMirror.Pos; + + function forEach(arr, f) { + for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); + } + + function arrayContains(arr, item) { + if (!Array.prototype.indexOf) { + var i = arr.length; + while (i--) { + if (arr[i] === item) { + return true; + } + } + return false; + } + return arr.indexOf(item) != -1; + } + + function scriptHint(editor, keywords, getToken, options) { + // Find the token at the cursor + var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token; + + if(token.string == "(") { + token = tprop = getToken(editor, Pos(cur.line, tprop.start)); + return {list: getCompletions(token.string, keywords, options), + from: Pos(cur.line, token.start), + to: Pos(cur.line, token.end + 1)}; + } + return {list: getCompletions(token.string, keywords, options), + from: Pos(cur.line, token.start), + to: Pos(cur.line, token.end)}; + } + + CodeMirror.phpHint = function(editor, options) { + return scriptHint(editor, phpPMFunctions, function (e, cur) {return e.getTokenAt(cur);}, options); + }; + + var getCurrentTimeFunction = ("getCurrentTime($name,$time) getCurrentTime($name)").split(" "); + var PMFNewCaseImpersonateFunction = ("PMFNewCaseImpersonate($date)").split(" "); + + var phpPMFunctions = ("formatDate getCurrentDate getCurrentTime literalDate capitalize lowerCase upperCase userInfo executeQuery orderGrid " + + "evaluateFunction PMFTaskCase PMFTaskList PMFUserList PMFGroupList PMFRoleList PMFCaseList PMFProcessList PMFSendVariables PMFDerivateCase " + + "PMFNewCaseImpersonate PMFNewCase PMFPauseCase PMFUnpauseCase PMFAssignUserToGroup PMFCreateUser PMFUpdateUser PMFInformationUser " + + "generateCode setCaseTrackerCode jumping PMFRedirectToStep pauseCase PMFSendMessage PMFgetLabelOption PMFGenerateOutputDocument " + + "PMFGetUserEmailAddress PMFGetNextAssignedUser PMFDeleteCase PMFCancelCase PMFAddInputDocument PMFAddCaseNote PMFGetCaseNotes").split(" "); + + var phpKeywords = ("break case catch continue debugger default delete do else false finally for function " + + "if in instanceof new null return switch throw true try typeof var void while with").split(" "); + + function getCompletions(functionName, keywords, options) { + + var found = []; + + function maybeAdd(str) {// for keywords ? + if ( str.indexOf(functionName) == 0 && !arrayContains(found, str)) { + found.push(str); + } + } + + function yesAdd(str) { + if ( !arrayContains(found, str)) { + found.push(str); + } + } + + if (functionName == "getCurrentTime") { + forEach( getCurrentTimeFunction, yesAdd); + } else if (functionName == "PMFNewCaseImpersonate") { + forEach( PMFNewCaseImpersonateFunction, yesAdd); + } else { + for(i=0;i Date: Wed, 27 Mar 2013 09:57:22 -0400 Subject: [PATCH 06/29] BUG 10920 "Add subtitles inside a drop-down" SOLVED - New feature, add subtitles inside a drop-down - Solved problem, added grouping elements in DropDowns - If a DropDown has enabled optgroup, an example with SQL would be the following: (SELECT 'optgroup1' AS UID, 'Users' AS NAME) UNION (SELECT USR.USR_UID AS UID, USR.USR_USERNAME AS NAME FROM USERS AS USR WHERE USR.USR_USERNAME <> '' AND USR.USR_USERNAME LIKE 'u%' ) UNION (SELECT 'optgroup2' AS UID, 'Countries' AS NAME) UNION (SELECT COUNTRY.IC_UID AS UID, COUNTRY.IC_NAME AS NAME FROM ISO_COUNTRY AS COUNTRY WHERE COUNTRY.IC_NAME LIKE 'b%' ) * Available from version ProcessMaker-2.0.47 (2.5.1) --- gulliver/js/form/core/form.js | 94 +++++-- gulliver/js/grid/core/grid.js | 206 ++++++++------- gulliver/js/maborak/core/maborak.js | 41 +-- gulliver/system/class.xmlform.php | 139 ++++++---- .../engine/methods/dynaforms/fields_Edit.php | 12 +- .../engine/methods/dynaforms/fields_Save.php | 5 + .../xmlform/dynaforms/fields/_options.xml | 14 +- .../xmlform/dynaforms/fields/dropdown.html | 238 +++++++++--------- .../xmlform/dynaforms/fields/dropdown.xml | 91 ++++++- 9 files changed, 531 insertions(+), 309 deletions(-) diff --git a/gulliver/js/form/core/form.js b/gulliver/js/form/core/form.js index 6c3115d6a..9959ec687 100755 --- a/gulliver/js/form/core/form.js +++ b/gulliver/js/form/core/form.js @@ -315,32 +315,12 @@ function G_DropDown( form, element, name ) var me=this; this.parent = G_Field; this.parent( form, element, name ); - this.setContent=function(content) { - var dd=me.element; - var browser = getBrowserClient(); - if ((browser.name=='msie') || ((browser.name == 'firefox') && (browser.version < 12))){ - while(dd.options.length>1) dd.remove(0); - } else { - for (var key in dd.options){ - dd.options[key] = null; - } - } - dd.options.length = 0; //Delete options - - // the remove function is no longer reliable - // while(dd.options.length>1) dd.remove(0); - for(var o=0;o