diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-06-25 23:31:16 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-06-25 23:31:16 +0200 |
| commit | d58f7cf02dc0c5ce2df2f0db00361fe673074be8 (patch) | |
| tree | de5b7064e43255a471de4cb469a7db71bce3d328 /protected/extensions/extckeditor/assets/plugins/templates | |
| parent | 82f5b7dc1890c03ebec349225e76ea0b22ec6c1d (diff) | |
Änderungen das alles tut, editor, cms
Diffstat (limited to 'protected/extensions/extckeditor/assets/plugins/templates')
| -rw-r--r-- | protected/extensions/extckeditor/assets/plugins/templates/dialogs/templates.js | 7 | ||||
| -rw-r--r-- | protected/extensions/extckeditor/assets/plugins/templates/templates/default.js | 54 | ||||
| -rw-r--r-- | protected/extensions/extckeditor/assets/plugins/templates/templates/images/template1.gif | bin | 0 -> 375 bytes | |||
| -rw-r--r-- | protected/extensions/extckeditor/assets/plugins/templates/templates/images/template2.gif | bin | 0 -> 333 bytes | |||
| -rw-r--r-- | protected/extensions/extckeditor/assets/plugins/templates/templates/images/template3.gif | bin | 0 -> 422 bytes |
5 files changed, 61 insertions, 0 deletions
diff --git a/protected/extensions/extckeditor/assets/plugins/templates/dialogs/templates.js b/protected/extensions/extckeditor/assets/plugins/templates/dialogs/templates.js new file mode 100644 index 0000000..6e761e0 --- /dev/null +++ b/protected/extensions/extckeditor/assets/plugins/templates/dialogs/templates.js @@ -0,0 +1,7 @@ +/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+(function(){var a=CKEDITOR.document;CKEDITOR.dialog.add('templates',function(b){function c(k,l){k.setHtml('');for(var m=0,n=l.length;m<n;m++){var o=CKEDITOR.getTemplates(l[m]),p=o.imagesPath,q=o.templates,r=q.length;for(var s=0;s<r;s++){var t=q[s],u=d(t,p);u.setAttribute('aria-posinset',s+1);u.setAttribute('aria-setsize',r);k.append(u);}}};function d(k,l){var m=CKEDITOR.dom.element.createFromHtml('<a href="javascript:void(0)" tabIndex="-1" role="option" ><div class="cke_tpl_item"></div></a>'),n='<table style="width:350px;" class="cke_tpl_preview" role="presentation"><tr>';if(k.image&&l)n+='<td class="cke_tpl_preview_img"><img src="'+CKEDITOR.getUrl(l+k.image)+'"'+(CKEDITOR.env.ie6Compat?' onload="this.width=this.width"':'')+' alt="" title=""></td>';n+='<td style="white-space:normal;"><span class="cke_tpl_title">'+k.title+'</span><br/>';if(k.description)n+='<span>'+k.description+'</span>';n+='</td></tr></table>';m.getFirst().setHtml(n);m.on('click',function(){e(k.html);});return m;};function e(k){var l=CKEDITOR.dialog.getCurrent(),m=l.getValueOf('selectTpl','chkInsertOpt');if(m){b.on('contentDom',function(n){n.removeListener();l.hide();var o=new CKEDITOR.dom.range(b.document);o.moveToElementEditStart(b.document.getBody());o.select(1);setTimeout(function(){b.fire('saveSnapshot');},0);});b.fire('saveSnapshot');b.setData(k);}else{b.insertHtml(k);l.hide();}};function f(k){var l=k.data.getTarget(),m=g.equals(l);if(m||g.contains(l)){var n=k.data.getKeystroke(),o=g.getElementsByTag('a'),p;if(o){if(m)p=o.getItem(0);else switch(n){case 40:p=l.getNext();break;case 38:p=l.getPrevious();break;case 13:case 32:l.fire('click');}if(p){p.focus();k.data.preventDefault();}}}};CKEDITOR.skins.load(b,'templates');var g,h='cke_tpl_list_label_'+CKEDITOR.tools.getNextNumber(),i=b.lang.templates,j=b.config;return{title:b.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:'selectTpl',label:i.title,elements:[{type:'vbox',padding:5,children:[{id:'selectTplText',type:'html',html:'<span>'+i.selectPromptMsg+'</span>'},{id:'templatesList',type:'html',focus:true,html:'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="'+h+'">'+'<div class="cke_tpl_loading"><span></span></div>'+'</div>'+'<span class="cke_voice_label" id="'+h+'">'+i.options+'</span>'},{id:'chkInsertOpt',type:'checkbox',label:i.insertOption,'default':j.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var k=this.getContentElement('selectTpl','templatesList');
+g=k.getElement();CKEDITOR.loadTemplates(j.templates_files,function(){var l=(j.templates||'default').split(',');if(l.length){c(g,l);k.focus();}else g.setHtml('<div class="cke_tpl_empty"><span>'+i.emptyListMsg+'</span>'+'</div>');});this._.element.on('keydown',f);},onHide:function(){this._.element.removeListener('keydown',f);}};});})();
diff --git a/protected/extensions/extckeditor/assets/plugins/templates/templates/default.js b/protected/extensions/extckeditor/assets/plugins/templates/templates/default.js new file mode 100644 index 0000000..018ace6 --- /dev/null +++ b/protected/extensions/extckeditor/assets/plugins/templates/templates/default.js @@ -0,0 +1,54 @@ +/*
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.addTemplates('default',{imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath('templates')+'templates/images/'),
+ templates:[
+ /*{
+ title:'Image and Title',
+ image:'template1.gif',
+ description:'One main image with a title and text that surround the image.',
+ html:'<h3><img style="margin-right: 10px" height="100" width="100" align="left"/>Type the title here</h3><p>Type the text here</p>'
+ },
+ {
+ title:'Strange Template',
+ image:'template2.gif',
+ description:'A template that defines two colums, each one with a title, and some text.',
+ html:'<table cellspacing="0" cellpadding="0" style="width:100%" border="0"><tr><td style="width:50%"><h3>Title 1</h3></td><td></td><td style="width:50%"><h3>Title 2</h3></td></tr><tr><td>Text 1</td><td></td><td>Text 2</td></tr></table><p>More text goes here.</p>'
+ },*/
+ {
+ title:'Bild mit Text',
+ image:'template3.gif',
+ description:'Ein großes gestyltes Bild (links) und beliebiger Text',
+ html:'<img src="http://dummyimage.com/240x160/cccccc/fff.png" alt="" class="float-left bordered"/><p>Lorem ipsum dolor sit amet, <em>consectetuer adipiscing elit</em>. Nunc congue ipsum vestibulum libero. Aenean vitae justo. Nam eget tellus. Etiam convallis, est eu lobortis mattis, lectus tellus tempus felis, a ultricies erat ipsum at metus.</p>'
+ },
+ {
+ title:'Zwei gleiche Spalten',
+ image:'template3.gif',
+ description:'Zwei Spalten mit Text',
+ html:'<div class="ym-grid linearize-level-2">'+
+ '<div class="ym-g50 ym-gl">'+
+ '<div class="ym-gbox-left">'+
+ '<!-- content -->'+
+ '<h6>This is a nested column</h6>'+
+ '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>'+
+ '</div>'+
+ '</div>'+
+ '<div class="ym-g50 ym-gr">'+
+ '<div class="ym-gbox-right">'+
+ '<!-- content -->'+
+ '<h6>This is another nested column </h6>'+
+ '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>'+
+ '</div>'+
+ '</div>'+
+ '</div>'
+ }/*,
+ {
+ title:'Text and Table',
+ image:'template3.gif',
+ description:'A title with some text and a table.',
+ html:'<div style="width: 80%"><h3>Title goes here</h3><table style="width:150px;float: right" cellspacing="0" cellpadding="0" border="1"><caption style="border:solid 1px black"><strong>Table title</strong></caption></tr><tr><td> </td><td> </td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr></table><p>Type the text here</p></div>'
+ }*/
+ ]
+});
diff --git a/protected/extensions/extckeditor/assets/plugins/templates/templates/images/template1.gif b/protected/extensions/extckeditor/assets/plugins/templates/templates/images/template1.gif Binary files differnew file mode 100644 index 0000000..efdabbe --- /dev/null +++ b/protected/extensions/extckeditor/assets/plugins/templates/templates/images/template1.gif diff --git a/protected/extensions/extckeditor/assets/plugins/templates/templates/images/template2.gif b/protected/extensions/extckeditor/assets/plugins/templates/templates/images/template2.gif Binary files differnew file mode 100644 index 0000000..d1cebb3 --- /dev/null +++ b/protected/extensions/extckeditor/assets/plugins/templates/templates/images/template2.gif diff --git a/protected/extensions/extckeditor/assets/plugins/templates/templates/images/template3.gif b/protected/extensions/extckeditor/assets/plugins/templates/templates/images/template3.gif Binary files differnew file mode 100644 index 0000000..db41cb4 --- /dev/null +++ b/protected/extensions/extckeditor/assets/plugins/templates/templates/images/template3.gif |
