X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=plugins%2Fforms%2Fdialogs%2Fbutton.js;h=16ea8465fb24f13aaef3abc50d624e9c9f58ff52;hp=f4c6465660a89e6c4f44264dd6a4335576bf900a;hb=26ea9b471a69b563dfa9fb7c9c8d97db8e56de0e;hpb=53700a2c9aa44599d0a74cb0e0b5e5fbdead0fcd diff --git a/plugins/forms/dialogs/button.js b/plugins/forms/dialogs/button.js index f4c6465..16ea846 100644 --- a/plugins/forms/dialogs/button.js +++ b/plugins/forms/dialogs/button.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 + For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.dialog.add("button",function(b){function d(a){var b=this.getValue();b?(a.attributes[this.id]=b,"name"==this.id&&(a.attributes["data-cke-saved-name"]=b)):(delete a.attributes[this.id],"name"==this.id&&delete a.attributes["data-cke-saved-name"])}return{title:b.lang.forms.button.title,minWidth:350,minHeight:150,onShow:function(){delete this.button;var a=this.getParentEditor().getSelection().getSelectedElement();a&&a.is("input")&&a.getAttribute("type")in{button:1,reset:1,submit:1}&&(this.button= a,this.setupContent(a))},onOk:function(){var a=this.getParentEditor(),b=this.button,d=!b,c=b?CKEDITOR.htmlParser.fragment.fromHtml(b.getOuterHtml()).children[0]:new CKEDITOR.htmlParser.element("input");this.commitContent(c);var e=new CKEDITOR.htmlParser.basicWriter;c.writeHtml(e);c=CKEDITOR.dom.element.createFromHtml(e.getHtml(),a.document);d?a.insertElement(c):(c.replace(b),a.getSelection().selectElement(c))},contents:[{id:"info",label:b.lang.forms.button.title,title:b.lang.forms.button.title,elements:[{id:"name",