Changeset 1704


Ignore:
Timestamp:
24.10.2011 22:03:27 (7 months ago)
Author:
zmsdev
Message:

Edit template-set action: added support for multi-client sites, fixed files with special css/js content-types (requested by uni-cgn).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ZMS/trunk/import/manage_editTemplateSet.metacmd.xml

    r1690 r1704  
    267267        <div id="tabs-0"> 
    268268                <div id="codeheader" > 
    269                         <div tal:define="global ob python:here.getHome()" class="zmi_col_left"> 
     269                        <div tal:define="global ob python:here.getAbsoluteHome()" class="zmi_col_left"> 
    270270                                <img tal:attributes="src ob/icon; title ob/meta_type" align="absmiddle"/> 
    271271                                <span class="form-small" tal:content="ob/id">the id</span> 
    272272                        </div> 
    273                         <div class="zmi_col_right" > 
     273                        <div class="zmi_col_right"> 
    274274                        </div> 
    275275                </div> 
     
    282282        </div> 
    283283        <div id="tabs-2"> 
    284                 <h1>ZMS TAL Editor 1.0.3</h1> 
     284                <h1>ZMS TAL Editor 1.0.4</h1> 
    285285                <p class="form-small">Der ZMS TAL Editor ist eine ZMS-System-Erweiterung speziell f&uuml;r Web-Designer:  
    286286                optimale Gestaltungskontrolle durch das Nebeneinander von Code- und Vorschau-Fenster.  
     
    652652                                <textarea id="text" name="data:text" class="ui-helper-hidden form-element" tal:content="ob/raw" style="width:100%">The object</textarea> 
    653653                        </span> 
    654                         <span tal:omit-tag="" tal:condition="python:ob.meta_type=='File' and ob.content_type.startswith('text/')"> 
     654                        <span tal:omit-tag="" tal:condition="python:ob.meta_type=='File' and (ob.content_type.startswith('text/') or ob.content_type in ['application/x-css','application/x-javascript'])"> 
    655655                                <div class="ui-helper-hidden"> 
    656656                                        <span id="action">manage_edit</span> 
     
    658658                                        <label for="content_type">Content-Type</label><input id="content_type" name="content_type" class="form-element" tal:attributes="value ob/content_type"> 
    659659                                </div> 
    660                                 <textarea id="text" name="filedata:text" class="ui-helper-hidden form-element" tal:content="ob/data" style="width:100%">The object</textarea> 
     660                                <textarea id="text" name="filedata:text" class="ui-helper-hidden form-element" tal:content="python:unicode(str(ob.data),'utf-8')" style="width:100%">The object</textarea> 
    661661                        </span> 
    662662                        <span tal:omit-tag="" tal:condition="python:ob.meta_type=='Page Template'"> 
     
    682682                </form> 
    683683 
    684                 <form id="theuploadform" method="post" enctype="multipart/form-data" tal:condition="python:ob.meta_type in ['Image','File'] and not ob.content_type.startswith('text/')"> 
     684                <form id="theuploadform" method="post" enctype="multipart/form-data" tal:condition="python:ob.meta_type in ['Image','File'] and not (ob.content_type.startswith('text/') or ob.content_type in ['application/x-css','application/x-javascript'])"> 
    685685                        <div class="ui-helper-hidden"> 
    686686                                <span id="action">manage_upload</span> 
     
    757757                        Mode = require("ace/mode/html").Mode; 
    758758                } 
    759                 else if (content_type == "text/css") { 
     759                else if (content_type == "text/css" || content_type == "application/x-css") { 
    760760                        Mode = require("ace/mode/css").Mode; 
    761761                } 
    762                 else if (content_type == "text/javascript") { 
     762                else if (content_type == "text/javascript" || content_type == "application/x-javascript") { 
    763763                        Mode = require("ace/mode/javascript").Mode; 
    764764                } 
     
    798798################################################################################  
    799799--> 
    800 <objectDetails tal:condition="python:request.has_key('objectDetails')" tal:define="global ob python:here.getHome(); path python:request.get('objectDetails')"> 
     800<objectDetails tal:condition="python:request.has_key('objectDetails')" tal:define="global ob python:here.getAbsoluteHome(); path python:request.get('objectDetails')"> 
    801801        <span tal:omit-tag="" tal:repeat="ob_id python:path.split('/')[1:]"> 
    802802                <span tal:omit-tag="" tal:define="global ob python:getattr(ob,ob_id)"></span> 
     
    816816################################################################################  
    817817--> 
    818 <objectValues tal:condition="python:request.has_key('objectValues')" tal:define="global context python:here.getHome()"> 
     818<objectValues tal:condition="python:request.has_key('objectValues')" tal:define="global context python:here.getAbsoluteHome()"> 
    819819        <span tal:omit-tag="" tal:repeat="ob_id python:request['objectValues'].split('/')[1:]"> 
    820820                <span tal:omit-tag="" tal:define="global context python:getattr(context,ob_id)"></span> 
Note: See TracChangeset for help on using the changeset viewer.