source: trunk/filemanager/tp/ckeditor/plugins/forms/dialogs/hiddenfield.js @ 2000

Revision 2000, 1.3 KB checked in by amuller, 14 years ago (diff)

Ticket #597 - Implementação do módulo gerenciador de arquivos

Line 
1/*
2Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.html or http://ckeditor.com/license
4*/
5
6CKEDITOR.dialog.add('hiddenfield',function(a){return{title:a.lang.hidden.title,minWidth:350,minHeight:110,onShow:function(){var c=this;delete c.hiddenField;var b=c.getParentEditor().getSelection().getSelectedElement();if(b&&b.getName()=='input'&&b.getAttribute('type')=='checkbox'){c.hiddenField=b;c.setupContent(b);}},onOk:function(){var b,c=this.hiddenField,d=!c;if(d){b=this.getParentEditor();c=b.document.createElement('input');c.setAttribute('type','hidden');}if(d)b.insertElement(c);this.commitContent(c);},contents:[{id:'info',label:a.lang.hidden.title,title:a.lang.hidden.title,elements:[{id:'_cke_saved_name',type:'text',label:a.lang.hidden.name,'default':'',accessKey:'N',setup:function(b){this.setValue(b.getAttribute('_cke_saved_name')||b.getAttribute('name')||'');},commit:function(b){if(this.getValue())b.setAttribute('_cke_saved_name',this.getValue());else{b.removeAttribute('_cke_saved_name');b.removeAttribute('name');}}},{id:'value',type:'text',label:a.lang.hidden.value,'default':'',accessKey:'V',setup:function(b){this.setValue(b.getAttribute('value')||'');},commit:function(b){if(this.getValue())b.setAttribute('value',this.getValue());else b.removeAttribute('value');}}]}]};});
Note: See TracBrowser for help on using the repository browser.