From 2b9bbaf893a46eda004d43ab93500deb7874072a Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 3 Jun 2013 21:12:55 -0700 Subject: upgrade fckeditor to ckeditor, for IE10 compatibility, RT#22014 --- .../plugins/templates/dialogs/templates.css | 84 ++++++++++++++++++++++ .../plugins/templates/dialogs/templates.js | 10 +++ 2 files changed, 94 insertions(+) create mode 100644 httemplate/elements/ckeditor/plugins/templates/dialogs/templates.css create mode 100644 httemplate/elements/ckeditor/plugins/templates/dialogs/templates.js (limited to 'httemplate/elements/ckeditor/plugins/templates/dialogs') diff --git a/httemplate/elements/ckeditor/plugins/templates/dialogs/templates.css b/httemplate/elements/ckeditor/plugins/templates/dialogs/templates.css new file mode 100644 index 000000000..e226d7974 --- /dev/null +++ b/httemplate/elements/ckeditor/plugins/templates/dialogs/templates.css @@ -0,0 +1,84 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +.cke_tpl_list +{ + border: #dcdcdc 2px solid; + background-color: #ffffff; + overflow-y: auto; + overflow-x: hidden; + width: 100%; + height: 220px; +} + +.cke_tpl_item +{ + margin: 5px; + padding: 7px; + border: #eeeeee 1px solid; + *width: 88%; +} + +.cke_tpl_preview +{ + border-collapse: separate; + text-indent:0; + width: 100%; +} +.cke_tpl_preview td +{ + padding: 2px; + vertical-align: middle; +} +.cke_tpl_preview .cke_tpl_preview_img +{ + width: 100px; +} +.cke_tpl_preview span +{ + white-space: normal; +} + +.cke_tpl_title +{ + font-weight: bold; +} + +.cke_tpl_list a:hover .cke_tpl_item, +.cke_tpl_list a:focus .cke_tpl_item, +.cke_tpl_list a:active .cke_tpl_item +{ + border: #ff9933 1px solid; + background-color: #fffacd; +} + +.cke_tpl_list a:hover *, +.cke_tpl_list a:focus *, +.cke_tpl_list a:active * +{ + cursor: pointer; +} + +/* IE6 contextual selectors childs won't get :hover transition until, + the hover style of the link itself contains certain CSS declarations.*/ +.cke_browser_ie6 .cke_tpl_list a:active, +.cke_browser_ie6 .cke_tpl_list a:hover, +.cke_browser_ie6 .cke_tpl_list a:focus +{ + background-position: 0 0; +} + +.cke_hc .cke_tpl_list a:hover .cke_tpl_item, +.cke_hc .cke_tpl_list a:focus .cke_tpl_item, +.cke_hc .cke_tpl_list a:active .cke_tpl_item +{ + border-width: 3px; +} + +.cke_tpl_empty, .cke_tpl_loading +{ + text-align: center; + padding: 5px; +} diff --git a/httemplate/elements/ckeditor/plugins/templates/dialogs/templates.js b/httemplate/elements/ckeditor/plugins/templates/dialogs/templates.js new file mode 100644 index 000000000..390fdb61d --- /dev/null +++ b/httemplate/elements/ckeditor/plugins/templates/dialogs/templates.js @@ -0,0 +1,10 @@ +/* + Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +(function(){CKEDITOR.dialog.add("templates",function(c){function o(a,b){var k=CKEDITOR.dom.element.createFromHtml('
'),d='';a.image&&b&&(d+='');d+='");k.on("click",function(){p(a.html)});return k}function p(a){var b=CKEDITOR.dialog.getCurrent();b.getValueOf("selectTpl","chkInsertOpt")?(c.fire("saveSnapshot"),c.setData(a,function(){b.hide();var a=c.createRange();a.moveToElementEditStart(c.editable());a.select();setTimeout(function(){c.fire("saveSnapshot")},0)})):(c.insertHtml(a),b.hide())}function i(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+"dialogs/templates.css"));var g,h="cke_tpl_list_label_"+CKEDITOR.tools.getNextNumber(),f=c.lang.templates,l=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:""+f.selectPromptMsg+""},{id:"templatesList",type:"html",focus:!0,html:'
'+f.options+""},{id:"chkInsertOpt",type:"checkbox",label:f.insertOption, +"default":l.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var a=this.getContentElement("selectTpl","templatesList");g=a.getElement();CKEDITOR.loadTemplates(l.templates_files,function(){var b=(l.templates||"default").split(",");if(b.length){var c=g;c.setHtml("");for(var d=0,h=b.length;d'+f.emptyListMsg+"")});this._.element.on("keydown",i)},onHide:function(){this._.element.removeListener("keydown",i)}}})})(); \ No newline at end of file -- cgit v1.2.1