X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=plugins%2Ftemplates%2Fdialogs%2Ftemplates.js;h=63ffeaa3a7add2a4600f1a96be7efcd70e953940;hp=cc5c688c86df75a8c04b85434ea76b05a38bcd0c;hb=7cd80714081a8ffdf4a1a8d2c72f120ed5ef3d6d;hpb=8761695d9b70afe75905deaac88f78c1f8aeb32d diff --git a/plugins/templates/dialogs/templates.js b/plugins/templates/dialogs/templates.js index cc5c688..63ffeaa 100644 --- a/plugins/templates/dialogs/templates.js +++ b/plugins/templates/dialogs/templates.js @@ -3,4 +3,4 @@ Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ -(function(){var a=CKEDITOR.document,b='cke'+CKEDITOR.tools.getNextNumber();function c(f,g){var h=a.getById(b);h.setHtml('');for(var i=0;i';j+=''+g.title+'
';if(g.description)j+=''+g.description+'';j+='';i.setHtml(j);i.on('mouseover',function(){i.addClass('cke_tpl_hover');});i.on('mouseout',function(){i.removeClass('cke_tpl_hover');});i.on('click',function(){e(f,g.html);});return i;};function e(f,g){var h=CKEDITOR.dialog.getCurrent(),i=h.getValueOf('selectTpl','chkInsertOpt');if(i)f.setData(g);else f.insertHtml(g);h.hide();};CKEDITOR.dialog.add('templates',function(f){CKEDITOR.skins.load(f,'templates');var g=false;return{title:f.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:'selectTpl',label:f.lang.templates.title,elements:[{type:'vbox',padding:5,children:[{type:'html',html:''+f.lang.templates.selectPromptMsg+''},{type:'html',html:'
'+'
'+'
'},{id:'chkInsertOpt',type:'checkbox',label:f.lang.templates.insertOption,'default':f.config.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){CKEDITOR.loadTemplates(f.config.templates_files,function(){var h=f.config.templates.split(',');if(h.length)c(f,h);else{var i=a.getById(b);i.setHtml('
'+f.lang.templates.emptyListMsg+''+'
');}});}};});})(); +(function(){var a=CKEDITOR.document,b='cke'+CKEDITOR.tools.getNextNumber();function c(f,g){var h=a.getById(b);h.setHtml('');for(var i=0;i';j+=''+g.title+'
';if(g.description)j+=''+g.description+'';j+='';i.setHtml(j);i.on('mouseover',function(){i.addClass('cke_tpl_hover');});i.on('mouseout',function(){i.removeClass('cke_tpl_hover');});i.on('click',function(){e(f,g.html);});return i;};function e(f,g){var h=CKEDITOR.dialog.getCurrent(),i=h.getValueOf('selectTpl','chkInsertOpt');if(i){f.on('contentDom',function(j){j.removeListener();h.hide();var k=new CKEDITOR.dom.range(f.document);k.moveToElementEditStart(f.document.getBody());k.select(true);});f.setData(g);}else{f.insertHtml(g);h.hide();}};CKEDITOR.dialog.add('templates',function(f){CKEDITOR.skins.load(f,'templates');var g=false;return{title:f.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:'selectTpl',label:f.lang.templates.title,elements:[{type:'vbox',padding:5,children:[{type:'html',html:''+f.lang.templates.selectPromptMsg+''},{type:'html',html:'
'+'
'+'
'},{id:'chkInsertOpt',type:'checkbox',label:f.lang.templates.insertOption,'default':f.config.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){CKEDITOR.loadTemplates(f.config.templates_files,function(){var h=f.config.templates.split(',');if(h.length)c(f,h);else{var i=a.getById(b);i.setHtml('
'+f.lang.templates.emptyListMsg+''+'
');}});}};});})();