aboutsummaryrefslogtreecommitdiff
path: root/release/plugins/templates
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-01-25 17:45:33 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-01-25 18:00:33 +0100
commit7adcb81e4f83f98c468889aaa5a85558ba88c770 (patch)
tree0d6ede733777b29060b48df4afaa2c64bfbae276 /release/plugins/templates
downloadconnexionswing-ckeditor-component-7adcb81e4f83f98c468889aaa5a85558ba88c770.tar.gz
connexionswing-ckeditor-component-7adcb81e4f83f98c468889aaa5a85558ba88c770.tar.zst
connexionswing-ckeditor-component-7adcb81e4f83f98c468889aaa5a85558ba88c770.zip
Initial commit4.5.6
Diffstat (limited to 'release/plugins/templates')
-rw-r--r--release/plugins/templates/dialogs/templates.css84
-rw-r--r--release/plugins/templates/dialogs/templates.js10
-rw-r--r--release/plugins/templates/templates/default.js7
-rw-r--r--release/plugins/templates/templates/images/template1.gifbin0 -> 375 bytes
-rw-r--r--release/plugins/templates/templates/images/template2.gifbin0 -> 333 bytes
-rw-r--r--release/plugins/templates/templates/images/template3.gifbin0 -> 422 bytes
6 files changed, 101 insertions, 0 deletions
diff --git a/release/plugins/templates/dialogs/templates.css b/release/plugins/templates/dialogs/templates.css
new file mode 100644
index 00000000..7fc4a1bc
--- /dev/null
+++ b/release/plugins/templates/dialogs/templates.css
@@ -0,0 +1,84 @@
1/*
2Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.md or http://ckeditor.com/license
4*/
5
6.cke_tpl_list
7{
8 border: #dcdcdc 2px solid;
9 background-color: #ffffff;
10 overflow-y: auto;
11 overflow-x: hidden;
12 width: 100%;
13 height: 220px;
14}
15
16.cke_tpl_item
17{
18 margin: 5px;
19 padding: 7px;
20 border: #eeeeee 1px solid;
21 *width: 88%;
22}
23
24.cke_tpl_preview
25{
26 border-collapse: separate;
27 text-indent:0;
28 width: 100%;
29}
30.cke_tpl_preview td
31{
32 padding: 2px;
33 vertical-align: middle;
34}
35.cke_tpl_preview .cke_tpl_preview_img
36{
37 width: 100px;
38}
39.cke_tpl_preview span
40{
41 white-space: normal;
42}
43
44.cke_tpl_title
45{
46 font-weight: bold;
47}
48
49.cke_tpl_list a:hover .cke_tpl_item,
50.cke_tpl_list a:focus .cke_tpl_item,
51.cke_tpl_list a:active .cke_tpl_item
52{
53 border: #ff9933 1px solid;
54 background-color: #fffacd;
55}
56
57.cke_tpl_list a:hover *,
58.cke_tpl_list a:focus *,
59.cke_tpl_list a:active *
60{
61 cursor: pointer;
62}
63
64/* IE Quirks contextual selectors children will not get :hover transition until
65 the hover style of the link itself contains certain CSS declarations. */
66.cke_browser_quirks .cke_tpl_list a:active,
67.cke_browser_quirks .cke_tpl_list a:hover,
68.cke_browser_quirks .cke_tpl_list a:focus
69{
70 background-position: 0 0;
71}
72
73.cke_hc .cke_tpl_list a:hover .cke_tpl_item,
74.cke_hc .cke_tpl_list a:focus .cke_tpl_item,
75.cke_hc .cke_tpl_list a:active .cke_tpl_item
76{
77 border-width: 3px;
78}
79
80.cke_tpl_empty, .cke_tpl_loading
81{
82 text-align: center;
83 padding: 5px;
84}
diff --git a/release/plugins/templates/dialogs/templates.js b/release/plugins/templates/dialogs/templates.js
new file mode 100644
index 00000000..2ae7143c
--- /dev/null
+++ b/release/plugins/templates/dialogs/templates.js
@@ -0,0 +1,10 @@
1/*
2 Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.md or http://ckeditor.com/license
4*/
5(function(){CKEDITOR.dialog.add("templates",function(c){function r(a,b){var m=CKEDITOR.dom.element.createFromHtml('\x3ca href\x3d"javascript:void(0)" tabIndex\x3d"-1" role\x3d"option" \x3e\x3cdiv class\x3d"cke_tpl_item"\x3e\x3c/div\x3e\x3c/a\x3e'),d='\x3ctable style\x3d"width:350px;" class\x3d"cke_tpl_preview" role\x3d"presentation"\x3e\x3ctr\x3e';a.image&&b&&(d+='\x3ctd class\x3d"cke_tpl_preview_img"\x3e\x3cimg src\x3d"'+CKEDITOR.getUrl(b+a.image)+'"'+(CKEDITOR.env.ie6Compat?' onload\x3d"this.width\x3dthis.width"':
6"")+' alt\x3d"" title\x3d""\x3e\x3c/td\x3e');d+='\x3ctd style\x3d"white-space:normal;"\x3e\x3cspan class\x3d"cke_tpl_title"\x3e'+a.title+"\x3c/span\x3e\x3cbr/\x3e";a.description&&(d+="\x3cspan\x3e"+a.description+"\x3c/span\x3e");d+="\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e";m.getFirst().setHtml(d);m.on("click",function(){t(a.html)});return m}function t(a){var b=CKEDITOR.dialog.getCurrent();b.getValueOf("selectTpl","chkInsertOpt")?(c.fire("saveSnapshot"),c.setData(a,function(){b.hide();var a=c.createRange();
7a.moveToElementEditStart(c.editable());a.select();setTimeout(function(){c.fire("saveSnapshot")},0)})):(c.insertHtml(a),b.hide())}function k(a){var b=a.data.getTarget(),c=g.equals(b);if(c||g.contains(b)){var d=a.data.getKeystroke(),f=g.getElementsByTag("a"),e;if(f){if(c)e=f.getItem(0);else switch(d){case 40:e=b.getNext();break;case 38:e=b.getPrevious();break;case 13:case 32:b.fire("click")}e&&(e.focus(),a.data.preventDefault())}}}var h=CKEDITOR.plugins.get("templates");CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(h.path+
8"dialogs/templates.css"));var g,h="cke_tpl_list_label_"+CKEDITOR.tools.getNextNumber(),f=c.lang.templates,n=c.config;return{title:c.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:"selectTpl",label:f.title,elements:[{type:"vbox",padding:5,children:[{id:"selectTplText",type:"html",html:"\x3cspan\x3e"+f.selectPromptMsg+"\x3c/span\x3e"},{id:"templatesList",type:"html",focus:!0,html:'\x3cdiv class\x3d"cke_tpl_list" tabIndex\x3d"-1" role\x3d"listbox" aria-labelledby\x3d"'+
9h+'"\x3e\x3cdiv class\x3d"cke_tpl_loading"\x3e\x3cspan\x3e\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e\x3cspan class\x3d"cke_voice_label" id\x3d"'+h+'"\x3e'+f.options+"\x3c/span\x3e"},{id:"chkInsertOpt",type:"checkbox",label:f.insertOption,"default":n.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var a=this.getContentElement("selectTpl","templatesList");g=a.getElement();CKEDITOR.loadTemplates(n.templates_files,function(){var b=(n.templates||"default").split(",");
10if(b.length){var c=g;c.setHtml("");for(var d=0,h=b.length;d<h;d++)for(var e=CKEDITOR.getTemplates(b[d]),k=e.imagesPath,e=e.templates,q=e.length,l=0;l<q;l++){var p=r(e[l],k);p.setAttribute("aria-posinset",l+1);p.setAttribute("aria-setsize",q);c.append(p)}a.focus()}else g.setHtml('\x3cdiv class\x3d"cke_tpl_empty"\x3e\x3cspan\x3e'+f.emptyListMsg+"\x3c/span\x3e\x3c/div\x3e")});this._.element.on("keydown",k)},onHide:function(){this._.element.removeListener("keydown",k)}}})})(); \ No newline at end of file
diff --git a/release/plugins/templates/templates/default.js b/release/plugins/templates/templates/default.js
new file mode 100644
index 00000000..ff30d1f6
--- /dev/null
+++ b/release/plugins/templates/templates/default.js
@@ -0,0 +1,7 @@
1/*
2 Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.md or http://ckeditor.com/license
4*/
5CKEDITOR.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:'\x3ch3\x3e\x3cimg src\x3d" " alt\x3d"" style\x3d"margin-right: 10px" height\x3d"100" width\x3d"100" align\x3d"left" /\x3eType the title here\x3c/h3\x3e\x3cp\x3eType the text here\x3c/p\x3e'},{title:"Strange Template",image:"template2.gif",description:"A template that defines two colums, each one with a title, and some text.",
6html:'\x3ctable cellspacing\x3d"0" cellpadding\x3d"0" style\x3d"width:100%" border\x3d"0"\x3e\x3ctr\x3e\x3ctd style\x3d"width:50%"\x3e\x3ch3\x3eTitle 1\x3c/h3\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd style\x3d"width:50%"\x3e\x3ch3\x3eTitle 2\x3c/h3\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3eText 1\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3eText 2\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3cp\x3eMore text goes here.\x3c/p\x3e'},{title:"Text and Table",image:"template3.gif",description:"A title with some text and a table.",
7html:'\x3cdiv style\x3d"width: 80%"\x3e\x3ch3\x3eTitle goes here\x3c/h3\x3e\x3ctable style\x3d"width:150px;float: right" cellspacing\x3d"0" cellpadding\x3d"0" border\x3d"1"\x3e\x3ccaption style\x3d"border:solid 1px black"\x3e\x3cstrong\x3eTable title\x3c/strong\x3e\x3c/caption\x3e\x3ctr\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3cp\x3eType the text here\x3c/p\x3e\x3c/div\x3e'}]}); \ No newline at end of file
diff --git a/release/plugins/templates/templates/images/template1.gif b/release/plugins/templates/templates/images/template1.gif
new file mode 100644
index 00000000..efdabbeb
--- /dev/null
+++ b/release/plugins/templates/templates/images/template1.gif
Binary files differ
diff --git a/release/plugins/templates/templates/images/template2.gif b/release/plugins/templates/templates/images/template2.gif
new file mode 100644
index 00000000..d1cebb3a
--- /dev/null
+++ b/release/plugins/templates/templates/images/template2.gif
Binary files differ
diff --git a/release/plugins/templates/templates/images/template3.gif b/release/plugins/templates/templates/images/template3.gif
new file mode 100644
index 00000000..db41cb4f
--- /dev/null
+++ b/release/plugins/templates/templates/images/template3.gif
Binary files differ