X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fckeditor%2Fplugins%2Fforms%2Fdialogs%2Fselect.js;h=32d7d5db66c830efadb9467b5a892e0e7e28da98;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hp=e5e2a388a9ec4ec105422a5db9b9dd5a805e0a78;hpb=87ccff97601d522326f56184a41037278ad328c5;p=freeside.git diff --git a/httemplate/elements/ckeditor/plugins/forms/dialogs/select.js b/httemplate/elements/ckeditor/plugins/forms/dialogs/select.js index e5e2a388a..32d7d5db6 100644 --- a/httemplate/elements/ckeditor/plugins/forms/dialogs/select.js +++ b/httemplate/elements/ckeditor/plugins/forms/dialogs/select.js @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - For licensing, see LICENSE.html or http://ckeditor.com/license + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.dialog.add("select",function(c){function h(a,b,e,d,c){a=f(a);d=d?d.createElement("OPTION"):document.createElement("OPTION");if(a&&d&&"option"==d.getName())CKEDITOR.env.ie?(isNaN(parseInt(c,10))?a.$.options.add(d.$):a.$.options.add(d.$,c),d.$.innerHTML=0c?0:c).insertBeforeMe(d):a.append(d),d.setText(0b)return!1;a=a.getChild(b);a.setText(e);a.setValue(d);return a}function k(a){for(a=f(a);a.getChild(0)&&a.getChild(0).remove(););}function j(a,b,e){var a=f(a),d=g(a);if(0>d)return!1;b=d+b;b=0>b?0:b;b=b>=a.getChildCount()?a.getChildCount()-1:b;if(d==b)return!1;var d=a.getChild(d),c=d.getText(),o=d.getValue();d.remove();d=h(a,c,o,!e?null:e,b);i(a,b);return d}function g(a){return(a=f(a))?a.$.selectedIndex:-1} @@ -12,9 +12,9 @@ return""===this.getValue()||a.apply(this)},setup:function(a,b){"select"==a&&this "115px","100px"],children:[{type:"vbox",children:[{id:"txtOptName",type:"text",label:c.lang.forms.select.opText,style:"width:115px",setup:function(a){"clear"==a&&this.setValue("")}},{type:"select",id:"cmbName",label:"",title:"",size:5,style:"width:115px;height:75px",items:[],onChange:function(){var a=this.getDialog(),b=a.getContentElement("info","cmbValue"),e=a.getContentElement("info","txtOptName"),a=a.getContentElement("info","txtOptValue"),d=g(this);i(b,d);e.setValue(this.getValue());a.setValue(b.getValue())}, setup:function(a,b){"clear"==a?k(this):"option"==a&&h(this,b.getText(),b.getText(),this.getDialog().getParentEditor().document)},commit:function(a){var b=this.getDialog(),e=l(this),d=l(b.getContentElement("info","cmbValue")),c=b.getContentElement("info","txtValue").getValue();k(a);for(var f=0;f