Changeset 1709 for ZMS/trunk


Ignore:
Timestamp:
25.10.2011 17:46:52 (7 months ago)
Author:
zmsdev
Message:

added support for re-utilization of xstandard-styles in ckeditor

Location:
ZMS/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ZMS/trunk/dtml/object/manage_page_footer.dtml

    r1624 r1709  
    1010<div class="zmi_col_right"> 
    1111 <form action="<dtml-var URL>" method="get"> 
    12  <input type="hidden" name="lang" value="<dtml-var lang>"> 
     12 <input type="hidden" name="lang" value="<dtml-var "REQUEST.get('lang')">"> 
    1313 <select name="manage_lang" onchange="this.form.submit();"> 
    1414 <dtml-in "getLocale().get_manage_langs()"> 
  • ZMS/trunk/plugins/rte/ckeditor/manage_form.dtml

    r1689 r1709  
    9696                CKEDITOR.config.language = '<dtml-var "['EN','DE'][lang=='ger']">'; 
    9797                CKEDITOR.config.format_tags = '<dtml-var "getConfProperty('plugin.rte.ckeditor.FormatTags','p;h1;h2;h3;pre;address;div')">'; 
     98 
     99//////////////////////////////////////////////////////////////////////////////// 
     100// Contents-CSS 
     101//////////////////////////////////////////////////////////////////////////////// 
     102CKEDITOR.config.contentsCss = []; 
     103$("link[rel=stylesheet]").each(function() { 
     104                CKEDITOR.config.contentsCss.push($(this).attr("href")); 
     105        }); 
     106CKEDITOR.config.contentsCss.push('/++resource++zms_/ckeditor/contents.css'); 
     107 
     108//////////////////////////////////////////////////////////////////////////////// 
     109// Import XStandard styles 
     110//////////////////////////////////////////////////////////////////////////////// 
     111<dtml-if "'xstandard_styles' in getAbsoluteHome().objectIds()"> 
     112CKEDITOR.config.format_tags = ''; 
     113<dtml-let xml_styles="xmlParse(getXmlHeader()+xstandard_styles(_,_,meta_id=REQUEST.get('ZMS_INSERT',REQUEST.get('ZMS_THIS').getParentNode().meta_id)))"> 
     114<dtml-in "xmlNodeSet(xml_styles,'style')"> 
     115<dtml-let xml_style=sequence-item 
     116><dtml-call "REQUEST.set('style_id',None)"><dtml-in "xmlNodeSet(xml_style,'id')"><dtml-let node=sequence-item><dtml-if sequence-start><dtml-call "REQUEST.set('style_id',id_quote(node['cdata']))"></dtml-if></dtml-let></dtml-in 
     117><dtml-call "REQUEST.set('style_name',None)"><dtml-in "xmlNodeSet(xml_style,'name')"><dtml-let node=sequence-item><dtml-if sequence-start><dtml-call "REQUEST.set('style_name',node['cdata'])"></dtml-if></dtml-let></dtml-in 
     118><dtml-call "REQUEST.set('style_elt',None)"><dtml-in "xmlNodeSet(xml_style,'elt')"><dtml-let node=sequence-item><dtml-if sequence-start><dtml-call "REQUEST.set('style_element',node['cdata'])"></dtml-if></dtml-let></dtml-in 
     119><dtml-call "REQUEST.set('style_attrs',[])" 
     120><dtml-in "xmlNodeSet(xml_style,'attr')" 
     121        ><dtml-let node=sequence-item 
     122                ><dtml-in "xmlNodeSet(node,'name')" 
     123                        ><dtml-let nodeName=sequence-item 
     124                                ><dtml-call "REQUEST.set('style_attrs_nodeName',nodeName['cdata'])" 
     125                        ></dtml-let 
     126                ></dtml-in 
     127                ><dtml-in "xmlNodeSet(node,'value')" 
     128                        ><dtml-let nodeValue=sequence-item 
     129                                ><dtml-call "REQUEST.set('style_attrs_nodeValue',nodeValue['cdata'])" 
     130                        ></dtml-let 
     131                ></dtml-in 
     132                ><dtml-call "style_attrs.append((style_attrs_nodeName,style_attrs_nodeValue))" 
     133        ></dtml-let 
     134></dtml-in 
     135> 
     136CKEDITOR.config.format_tags += (CKEDITOR.config.format_tags.length==0?'':';')+'<dtml-var style_id>'; 
     137CKEDITOR.config.format_<dtml-var style_id> = { name : '<dtml-var style_name>', element : '<dtml-var style_element>' , attributes : { <dtml-var "' , '.join(map(lambda x: '\'%s\' : \'%s\''%x, style_attrs))"> } }; 
     138</dtml-let 
     139></dtml-in 
     140></dtml-let 
     141></dtml-if 
     142> 
     143//////////////////////////////////////////////////////////////////////////////// 
     144 
    98145                loadCkeditor( 'editor_'+id, { 
    99146                        <dtml-if "getConfProperty('plugin.rte.ckeditor.Config','')"> 
  • ZMS/trunk/plugins/www/ckeditor/contents.css

    r1686 r1709  
    1515        /* Remove the background color to make it transparent */ 
    1616        background-color: #fff; 
     17        background-image:url(/misc_/zms/spacer.gif)!important; 
    1718} 
    1819 
Note: See TracChangeset for help on using the changeset viewer.