| 1 | <?xml version="1.0" encoding="UTF-8"?>
|
|---|
| 2 | <dictionary>
|
|---|
| 3 | <item key="custom"/>
|
|---|
| 4 | <item key="data"><![CDATA[<xhtml tal:omit-tag="" tal:condition="python:not request.has_key('omitHtml')">
|
|---|
| 5 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|---|
| 6 | <html>
|
|---|
| 7 | <head>
|
|---|
| 8 | <link rel="stylesheet" type="text/css" href="/++resource++zms_/manage_page_style-min.css" />
|
|---|
| 9 | <script type="text/javascript" charset="UTF-8" src="/++resource++zms_/jquery/jquery-all.min.js"></script>
|
|---|
| 10 | <script type="text/javascript" charset="UTF-8" src="/++resource++zms_/jquery/ui/js/jquery-ui-1.8.13.custom.min.js"></script>
|
|---|
| 11 | <title>ZMS | Edit Template-Set</title>
|
|---|
| 12 | <meta http-equiv="content-type" content="text/html;charset=utf-8">
|
|---|
| 13 | </head>
|
|---|
| 14 |
|
|---|
| 15 | <!--
|
|---|
| 16 | ################################################################################
|
|---|
| 17 | ### Frameset
|
|---|
| 18 | ################################################################################
|
|---|
| 19 | -->
|
|---|
| 20 | <frameset tal:condition="python:not request.get('frametop') and not request.get('frameleft') and not request.get('framebottom')" cols="40%,60%">
|
|---|
| 21 | <frame name="left" tal:attributes="src python:'%s?frameleft=True&lang=%s'%(request.get('URL'),request.get('lang'))"/>
|
|---|
| 22 | <frame name="preview" tal:attributes="src here/absolute_url"/>
|
|---|
| 23 | </frameset>
|
|---|
| 24 |
|
|---|
| 25 | <!--
|
|---|
| 26 | ################################################################################
|
|---|
| 27 | ### Frame: Left // Template List
|
|---|
| 28 | ################################################################################
|
|---|
| 29 | -->
|
|---|
| 30 | <body tal:condition="python:request.get('frameleft')">
|
|---|
| 31 | <div>
|
|---|
| 32 |
|
|---|
| 33 | <style type="text/css">
|
|---|
| 34 | body {
|
|---|
| 35 | margin:0px;
|
|---|
| 36 | overflow-x:hidden;
|
|---|
| 37 | }
|
|---|
| 38 | div.collapsed {
|
|---|
| 39 | padding-left:16px!important;
|
|---|
| 40 | }
|
|---|
| 41 | div.Folder.collapsed, div.ZMS.collapsed, div.ZMSMetamodelProvider.collapsed {
|
|---|
| 42 | padding-left:16px!important;
|
|---|
| 43 | background:url(/p_/pl) top left no-repeat;
|
|---|
| 44 | }
|
|---|
| 45 | div.Folder, div.ZMS, div.ZMSMetamodelProvider {
|
|---|
| 46 | padding-left:16px!important;
|
|---|
| 47 | background:url(/p_/mi) top left no-repeat;
|
|---|
| 48 | }
|
|---|
| 49 | div#tabs {
|
|---|
| 50 | border-radius:0px;
|
|---|
| 51 | width:100%;
|
|---|
| 52 | }
|
|---|
| 53 | ul#tabitems {
|
|---|
| 54 | border-radius: 0px;
|
|---|
| 55 | border-bottom:1px solid #ccc;
|
|---|
| 56 | display:block;
|
|---|
| 57 | width:100%;
|
|---|
| 58 | background-color:#e8e8e8;
|
|---|
| 59 | /* silver */
|
|---|
| 60 | background-image: -moz-linear-gradient(center top , #A4A4A4 0px, #B1B1B1 4px, #FFFFFF 22px);
|
|---|
| 61 | }
|
|---|
| 62 | ul#tabitems li {
|
|---|
| 63 | border-color:#666;
|
|---|
| 64 | height:16px;
|
|---|
| 65 | }
|
|---|
| 66 | ul#tabitems li a {
|
|---|
| 67 | color:#333;
|
|---|
| 68 | margin-top:0px;
|
|---|
| 69 | padding-top:2px;
|
|---|
| 70 | }
|
|---|
| 71 | div#tabs div {
|
|---|
| 72 | padding-left:6px;
|
|---|
| 73 | overflow-x:hidden;
|
|---|
| 74 | white-space:nowrap;
|
|---|
| 75 | }
|
|---|
| 76 | .ui-tabs .ui-tabs-panel {
|
|---|
| 77 | padding: 8px 0px 0px px;
|
|---|
| 78 | }
|
|---|
| 79 | div#tabs div ul,
|
|---|
| 80 | div#tabs div ul li {
|
|---|
| 81 | padding:0px !important;
|
|---|
| 82 | margin:0px !important;
|
|---|
| 83 | list-style-type:none !important;
|
|---|
| 84 | list-style-position:outside !important;
|
|---|
| 85 | }
|
|---|
| 86 |
|
|---|
| 87 | #tabs-2 h1 {
|
|---|
| 88 | font-size:13px;
|
|---|
| 89 | }
|
|---|
| 90 | #tabs-2 p {
|
|---|
| 91 | max-width:450px !important;
|
|---|
| 92 | white-space:normal;
|
|---|
| 93 | }
|
|---|
| 94 | #tabs-2 pre {
|
|---|
| 95 | font-family: "Courier New", Courier, monospace !important;
|
|---|
| 96 | font-size:11px !important;
|
|---|
| 97 | }
|
|---|
| 98 | div.strong span {
|
|---|
| 99 | font-weight:bold;
|
|---|
| 100 | }
|
|---|
| 101 | .white {
|
|---|
| 102 | color:white;
|
|---|
| 103 | }
|
|---|
| 104 | .zmi-document-margin {
|
|---|
| 105 | overflow-x:hidden;
|
|---|
| 106 | }
|
|---|
| 107 | </style>
|
|---|
| 108 |
|
|---|
| 109 | <script type="text/javascript">
|
|---|
| 110 |
|
|---|
| 111 | ////////////////////////////////////////////////////////////////////////////////
|
|---|
| 112 | ///// Resize iframe
|
|---|
| 113 | ////////////////////////////////////////////////////////////////////////////////
|
|---|
| 114 |
|
|---|
| 115 | $(function() {
|
|---|
| 116 | initIframe();
|
|---|
| 117 | $(window).resize(function() {
|
|---|
| 118 | initIframe();
|
|---|
| 119 | });
|
|---|
| 120 | });
|
|---|
| 121 |
|
|---|
| 122 | function initIframe() {
|
|---|
| 123 | var ta = $("iframe");
|
|---|
| 124 | if (ta.length > 0) {
|
|---|
| 125 | var innerDims = getInnerDimensions();
|
|---|
| 126 | var pos = ta.offset();
|
|---|
| 127 | var newHeight =innerDims.height-pos.top-25;
|
|---|
| 128 | ta.css('height',newHeight);
|
|---|
| 129 | }
|
|---|
| 130 | }
|
|---|
| 131 |
|
|---|
| 132 | ////////////////////////////////////////////////////////////////////////////////
|
|---|
| 133 |
|
|---|
| 134 | function selectTab(i) {
|
|---|
| 135 | $("#tabs").tabs("select","tabs-"+i);
|
|---|
| 136 | }
|
|---|
| 137 |
|
|---|
| 138 | function removeContainerDiv(id) {
|
|---|
| 139 | $("div#_"+id).remove();
|
|---|
| 140 | }
|
|---|
| 141 |
|
|---|
| 142 | function initClick($s) {
|
|---|
| 143 | $s.click(function() {
|
|---|
| 144 | var $this = $(this);
|
|---|
| 145 | if ($this.hasClass("Folder") ||
|
|---|
| 146 | $this.hasClass("ZMS") ||
|
|---|
| 147 | $this.hasClass("ZMSMetamodelProvider")) {
|
|---|
| 148 | if ($this.hasClass("collapsed")) {
|
|---|
| 149 | $this.removeClass("collapsed");
|
|---|
| 150 | if ($("div.objectValues:first",$this.parent()).length>0) {
|
|---|
| 151 | $("div.objectValues:first",$this.parent()).show("normal");
|
|---|
| 152 | }
|
|---|
| 153 | else {
|
|---|
| 154 | var path = "";
|
|---|
| 155 | $this.parents("div.container").each(function() {
|
|---|
| 156 | path = "/" + $("div:first",this).attr("id") + path;
|
|---|
| 157 | });
|
|---|
| 158 | $.get("",{omitHtml:1,objectValues:path},function(result) {
|
|---|
| 159 | $this.parent().append('<'+'div class="objectValues ui-helper-hidden">'+handleObjectValues(result)+'<'+'/div>');
|
|---|
| 160 | initClick($("div.objectValues:first div.container div",$this.parent()));
|
|---|
| 161 | $this.parent().children("div.objectValues:first").show("normal");
|
|---|
| 162 | });
|
|---|
| 163 | }
|
|---|
| 164 | }
|
|---|
| 165 | else {
|
|---|
| 166 | $this.addClass("collapsed");
|
|---|
| 167 | $("div.objectValues:first",$this.parent()).hide("normal");
|
|---|
| 168 | }
|
|---|
| 169 | }
|
|---|
| 170 | else {
|
|---|
| 171 | $(".strong").removeClass("strong");
|
|---|
| 172 | $this.addClass("strong");
|
|---|
| 173 | var path = "";
|
|---|
| 174 | $this.parents("div.container").each(function() {
|
|---|
| 175 | path = "/" + $("div:first",this).attr("id") + path;
|
|---|
| 176 | });
|
|---|
| 177 | var href = $("iframe").attr("src");
|
|---|
| 178 | if (href.indexOf("&path=") > 0) {
|
|---|
| 179 | href = href.substr(0,href.indexOf("&path="));
|
|---|
| 180 | }
|
|---|
| 181 | href += "&path="+path;
|
|---|
| 182 | selectTab(1);
|
|---|
| 183 | $("iframe").attr("src",href);
|
|---|
| 184 | initIframe();
|
|---|
| 185 | }
|
|---|
| 186 | });
|
|---|
| 187 | }
|
|---|
| 188 |
|
|---|
| 189 | function handleObjectValues(result) {
|
|---|
| 190 | if (result.indexOf('<!DOCTYPE')>=0) {
|
|---|
| 191 | result = result.substr(result.indexOf('>')+1);
|
|---|
| 192 | }
|
|---|
| 193 | result = '<'+'?xml version="1.0"?>' + result;
|
|---|
| 194 | var $resultXML = $.parseXML(result);
|
|---|
| 195 | var objects = $("object",$resultXML);
|
|---|
| 196 | objects = objects.toArray().sort(function(a,b){
|
|---|
| 197 | if ($(a).attr("id") > $(b).attr("id")) {
|
|---|
| 198 | return 1;
|
|---|
| 199 | }
|
|---|
| 200 | else if ($(a).attr("id") < $(b).attr("id")) {
|
|---|
| 201 | return -1;
|
|---|
| 202 | }
|
|---|
| 203 | else {
|
|---|
| 204 | return 0;
|
|---|
| 205 | }
|
|---|
| 206 | });
|
|---|
| 207 | var html = '';
|
|---|
| 208 | html += '<'+'ul>';
|
|---|
| 209 | $(objects).each(function() {
|
|---|
| 210 | var $ob = $(this);
|
|---|
| 211 | html += '<'+'div id="_'+$ob.attr("id")+'" class="container">';
|
|---|
| 212 | html += '<'+'div id="'+$ob.attr("id")+'" class="'+$ob.attr("meta_type")+' collapsed">';
|
|---|
| 213 | html += '<'+'img src="'+$ob.attr("icon")+'" title="'+$ob.attr("meta_type")+'"/> ';
|
|---|
| 214 | html += '<'+'span class="form-small">'+$ob.attr("id")+($ob.attr("title")==$ob.attr("id")||$ob.attr("title")==''?'':' ('+$ob.attr("title")+')')+'<'+'/span> ';
|
|---|
| 215 | html += '<'+'/div>\n';
|
|---|
| 216 | html += '<'+'/div>\n';
|
|---|
| 217 | });
|
|---|
| 218 | html += '<'+'/ul>';
|
|---|
| 219 | return html;
|
|---|
| 220 | }
|
|---|
| 221 |
|
|---|
| 222 | $(function() {
|
|---|
| 223 | $.get("",{omitHtml:1,objectValues:""},function(result) {
|
|---|
| 224 | $("#tabs-0").html($("#tabs-0").html()+handleObjectValues(result));
|
|---|
| 225 | initClick($("#tabs-0 div.container div"));
|
|---|
| 226 | });
|
|---|
| 227 | $( "#tabs" ).tabs();
|
|---|
| 228 | });
|
|---|
| 229 |
|
|---|
| 230 | function handleShowFancybox(s, st, defaultHtml, title, text) {
|
|---|
| 231 | if ($(s).length == 0) {
|
|---|
| 232 | $("#tabs-1").append(defaultHtml);
|
|---|
| 233 | }
|
|---|
| 234 | $(st).text(text);
|
|---|
| 235 | pluginFancybox(s,function() {
|
|---|
| 236 | $.fancybox({
|
|---|
| 237 | 'href':s,
|
|---|
| 238 | 'title':title,
|
|---|
| 239 | 'autoDimensions':true,
|
|---|
| 240 | 'autoScale':false,
|
|---|
| 241 | 'transitionIn':'fade',
|
|---|
| 242 | 'transitionOut':'fade'
|
|---|
| 243 | });
|
|---|
| 244 | });
|
|---|
| 245 | }
|
|---|
| 246 |
|
|---|
| 247 | </script>
|
|---|
| 248 |
|
|---|
| 249 | <div id="zmi_header">
|
|---|
| 250 | <div class="zmi-document-margin">
|
|---|
| 251 | <div class="zmi_col_left">
|
|---|
| 252 | <img id="zmi_banner" src="/misc_/zms/spacer.gif" title="ZMS Publishing System" border="0" onclick="window.open('http://www.zms-publishing.com');"/>
|
|---|
| 253 | </div><!-- .zmi_col_left -->
|
|---|
| 254 | <div class="zmi_col_right form-small white">
|
|---|
| 255 | |
|
|---|
| 256 | <a href="manage_main" target="_top" tal:content="python:unicode(here.getZMILangStr('BACK'),'utf-8')">back</a>
|
|---|
| 257 | </div><!-- .zmi_col_right -->
|
|---|
| 258 | </div><!-- .zmi-document-margin -->
|
|---|
| 259 | </div><!-- #zmi_header -->
|
|---|
| 260 |
|
|---|
| 261 | <div id="tabs">
|
|---|
| 262 | <ul id="tabitems">
|
|---|
| 263 | <li><a href="#tabs-0">Templates</a></li>
|
|---|
| 264 | <li><a href="#tabs-1">Edit</a></li>
|
|---|
| 265 | <li><a href="#tabs-2">?</a></li>
|
|---|
| 266 | </ul>
|
|---|
| 267 | <div id="tabs-0">
|
|---|
| 268 | <div id="codeheader" >
|
|---|
| 269 | <div tal:define="global ob python:here.getAbsoluteHome()" class="zmi_col_left">
|
|---|
| 270 | <img tal:attributes="src ob/icon; title ob/meta_type" align="absmiddle"/>
|
|---|
| 271 | <span class="form-small" tal:content="ob/id">the id</span>
|
|---|
| 272 | </div>
|
|---|
| 273 | <div class="zmi_col_right">
|
|---|
| 274 | </div>
|
|---|
| 275 | </div>
|
|---|
| 276 | <div id="objectTree">
|
|---|
| 277 | </div>
|
|---|
| 278 | </div>
|
|---|
| 279 | <div id="tabs-1">
|
|---|
| 280 | <iframe border="0" style="padding:0px;margin:0px;overflow:hidden;border:0px !important;width:100%"
|
|---|
| 281 | tal:attributes="src python:'%s?framebottom=True&lang=%s'%(request.get('URL'),request.get('lang'))"></iframe>
|
|---|
| 282 | </div>
|
|---|
| 283 | <div id="tabs-2">
|
|---|
| 284 | <h1>ZMS TAL Editor 1.0.5</h1>
|
|---|
| 285 | <p class="form-small">Der ZMS TAL Editor ist eine ZMS-System-Erweiterung speziell für Web-Designer:
|
|---|
| 286 | optimale Gestaltungskontrolle durch das Nebeneinander von Code- und Vorschau-Fenster.
|
|---|
| 287 | Alle Code-Änderungen in CSS- oder Template-Dateien sind sofort in der Web-Ansicht sichtbar.
|
|---|
| 288 | Das linksseitige Code-Fenster hat zwei Tabs:<br />
|
|---|
| 289 | 1. <strong>Templates</strong>: Template-Browser zur Auswahl des zu bearbeitenden Templates<br />
|
|---|
| 290 | 2. <strong>Edit</strong>: Code-Editor für die Bearbeitung des per Template-Browser ausgewählten Templates
|
|---|
| 291 | <br /><br />
|
|---|
| 292 | Systemvoraussetzungen:<br />ZMS TAL Editor arbeitet nur mit modernen Browsern (Firefox empfohlen).
|
|---|
| 293 | </p>
|
|---|
| 294 | <pre class="form-small">
|
|---|
| 295 |
|
|---|
| 296 |
|
|---|
| 297 |
|
|---|
| 298 | This program is free software; you can redistribute it and/or
|
|---|
| 299 | modify it under the terms of the GNU General Public License
|
|---|
| 300 | as published by the Free Software Foundation; either version 2
|
|---|
| 301 | of the License, or (at your option) any later version.
|
|---|
| 302 |
|
|---|
| 303 | This program is distributed in the hope that it will be useful,
|
|---|
| 304 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 305 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 306 | GNU General Public License for more details.
|
|---|
| 307 |
|
|---|
| 308 | You should have received a copy of the GNU General Public License
|
|---|
| 309 | along with this program; if not, write to the Free Software
|
|---|
| 310 | Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
|---|
| 311 | MA 02111-1307, USA.
|
|---|
| 312 |
|
|---|
| 313 | © <span tal:omit-tag="" tal:content="python:here.ZopeTime().year()">the current year</span> SNTL Publishing, Berlin
|
|---|
| 314 |
|
|---|
| 315 | </pre>
|
|---|
| 316 |
|
|---|
| 317 | </div>
|
|---|
| 318 | </div>
|
|---|
| 319 |
|
|---|
| 320 | </div>
|
|---|
| 321 | </body>
|
|---|
| 322 |
|
|---|
| 323 | <!--
|
|---|
| 324 | ################################################################################
|
|---|
| 325 | ### Frame: Bottom // Code
|
|---|
| 326 | ################################################################################
|
|---|
| 327 | -->
|
|---|
| 328 | <body tal:condition="python:request.get('framebottom')">
|
|---|
| 329 | <span tal:omit-tag="" tal:condition="python:request.get('path')">
|
|---|
| 330 |
|
|---|
| 331 | <span tal:condition="python:request.has_key('path')" tal:define="global ob python:here.getHome()">
|
|---|
| 332 | <span tal:omit-tag="" tal:repeat="ob_id python:request['path'].split('/')[1:]">
|
|---|
| 333 | <span tal:omit-tag="" tal:define="global ob python:getattr(ob,ob_id)"></span>
|
|---|
| 334 | </span>
|
|---|
| 335 | </span>
|
|---|
| 336 |
|
|---|
| 337 | <div>
|
|---|
| 338 |
|
|---|
| 339 | <script type="text/javascript">
|
|---|
| 340 |
|
|---|
| 341 | ////////////////////////////////////////////////////////////////////////////////
|
|---|
| 342 | ///// Auto-Save
|
|---|
| 343 | ////////////////////////////////////////////////////////////////////////////////
|
|---|
| 344 |
|
|---|
| 345 | var custAutoSaveTimeout = null;
|
|---|
| 346 | var custAutoSaveIntervall = 1000;
|
|---|
| 347 | var custAutoSaveArr = {};
|
|---|
| 348 |
|
|---|
| 349 | function custAutoSave() {
|
|---|
| 350 | $('#debug').val("custAutoSave"+"\n"+$('#debug').val());
|
|---|
| 351 | // Upload file.
|
|---|
| 352 | if ($(".form-element-modified").attr("type")=="file") {
|
|---|
| 353 | $('#theuploadform').attr( "action", $("span#absolute_url").text()+"/"+$("span#action").text());
|
|---|
| 354 | $('#theuploadform').attr( "target", "postframe" )
|
|---|
| 355 | $('#theuploadform').submit();
|
|---|
| 356 | //need to get contents of the iframe
|
|---|
| 357 | $("#postframe").load(function(){
|
|---|
| 358 | var src = $("img#preview").attr("src");
|
|---|
| 359 | if (src.lastIndexOf("?") > 0) {
|
|---|
| 360 | src = src.substr(0,src.lastIndexOf("?"));
|
|---|
| 361 | }
|
|---|
| 362 | src += "?ts=" + escape(new Date());
|
|---|
| 363 | $("img#preview").attr("src",src);
|
|---|
| 364 | $(".form-element-modified").val("");
|
|---|
| 365 | $(".form-element-modified").removeClass("form-element-modified");
|
|---|
| 366 | window.parent.parent.preview.location.reload();
|
|---|
| 367 | });
|
|---|
| 368 | }
|
|---|
| 369 | // Submit form.
|
|---|
| 370 | else if ($(".form-element-modified").length > 0) {
|
|---|
| 371 | var els = $("textarea.form-element,input.form-element,select.form-element");
|
|---|
| 372 | var values = {};
|
|---|
| 373 | for (var i = 0; i < els.length; i++) {
|
|---|
| 374 | var $el = $(els[i]);
|
|---|
| 375 | var elid = $el.attr("name");
|
|---|
| 376 | values[elid] = $el.val();
|
|---|
| 377 | custAutoSaveArr[elid] = $el.val();
|
|---|
| 378 | if ($el.hasClass("form-element-modified") && !$el.hasClass("ui-helper-hidden")) {
|
|---|
| 379 | var coords = $el.offset();
|
|---|
| 380 | var html = '<'+'div class="zmiAutoSave form-small zmiNeutralColorLight0" style="position:absolute;left:'+Math.round(coords.left)+'px;top:'+Math.round(coords.top)+'px;">saving...<'+'/div>';
|
|---|
| 381 | $("body").append(html);
|
|---|
| 382 | }
|
|---|
| 383 | }
|
|---|
| 384 | // Post form.
|
|---|
| 385 | $('#debug').val("post.1"+$("#absolute_url").text()+"/pt_changePrefs"+"\n"+$('#debug').val());
|
|---|
| 386 | $.post($("span#absolute_url").text()+"/"+$("span#action").text(),values,function(result) {
|
|---|
| 387 | $('#debug').val("post.2"+"\n"+$('#debug').val());
|
|---|
| 388 | $("div.zmiAutoSave").remove();
|
|---|
| 389 | $(".form-element-modified").removeClass("form-element-modified");
|
|---|
| 390 | window.parent.parent.preview.location.reload();
|
|---|
| 391 | getObjectDetails();
|
|---|
| 392 | });
|
|---|
| 393 | }
|
|---|
| 394 | }
|
|---|
| 395 |
|
|---|
| 396 | function custAutoChange(el) {
|
|---|
| 397 | var elid = $(el).attr("name");
|
|---|
| 398 | $('#debug').val("custAutoSave("+elid+")"+"\n"+$('#debug').val());
|
|---|
| 399 | if (typeof elid != "undefined" && typeof custAutoSaveArr[elid] != "undefined") {
|
|---|
| 400 | if (custAutoSaveTimeout != null) {
|
|---|
| 401 | window.clearTimeout(custAutoSaveTimeout);
|
|---|
| 402 | }
|
|---|
| 403 | if (custAutoSaveArr[elid] == $(el).val()) {
|
|---|
| 404 | if ($(el).hasClass("form-element-modified")) {
|
|---|
| 405 | $(el).removeClass("form-element-modified");
|
|---|
| 406 | }
|
|---|
| 407 | }
|
|---|
| 408 | else {
|
|---|
| 409 | if (!$(el).hasClass("form-element-modified")) {
|
|---|
| 410 | $(el).addClass("form-element-modified");
|
|---|
| 411 | }
|
|---|
| 412 | custAutoSaveTimeout = window.setTimeout("custAutoSave()",custAutoSaveIntervall);
|
|---|
| 413 | }
|
|---|
| 414 | }
|
|---|
| 415 | }
|
|---|
| 416 |
|
|---|
| 417 | function getObjectDetails() {
|
|---|
| 418 | $("div#objectDetails").html("");
|
|---|
| 419 | var path = $("span#absolute_path").text();
|
|---|
| 420 | $.get("",{omitHtml:1,objectDetails:path},function(result) {
|
|---|
| 421 | var html = '';
|
|---|
| 422 | if (result.indexOf('<!DOCTYPE')>=0) {
|
|---|
| 423 | result = result.substr(result.indexOf('>')+1);
|
|---|
| 424 | }
|
|---|
| 425 | result = '<'+'?xml version="1.0"?>' + result;
|
|---|
| 426 | var $resultXML = $.parseXML(result);
|
|---|
| 427 | var $errors = $("errors",$resultXML);
|
|---|
| 428 | if ($errors.length > 0) {
|
|---|
| 429 | html += ''
|
|---|
| 430 | + '<'+'tr valign="top">'
|
|---|
| 431 | + '<'+'td class="form-label">Errors<'+'/td>'
|
|---|
| 432 | + '<'+'td class="form-text" style="background-color: #FFDDDD"><'+'pre>'+$errors.text()+'<'+'pre><'+'/td>'
|
|---|
| 433 | + '<'+'/tr>'
|
|---|
| 434 | ;
|
|---|
| 435 | }
|
|---|
| 436 | var $warnings = $("warnings",$resultXML);
|
|---|
| 437 | if ($warnings.length > 0) {
|
|---|
| 438 | html += ''
|
|---|
| 439 | + '<'+'tr valign="top">'
|
|---|
| 440 | + '<'+'td class="form-label">Warnings<'+'/td>'
|
|---|
| 441 | + '<'+'td class="form-text" style="background-color: #FFFFDD"><'+'pre>'+$warnings.text()+'<'+'pre><'+'/td>'
|
|---|
| 442 | + '<'+'/tr>'
|
|---|
| 443 | ;
|
|---|
| 444 | }
|
|---|
| 445 | if (html.length > 0) {
|
|---|
| 446 | html = ''
|
|---|
| 447 | + '<'+'table>'
|
|---|
| 448 | + html;
|
|---|
| 449 | + '<'+'/table>'
|
|---|
| 450 | ;
|
|---|
| 451 | }
|
|---|
| 452 | $("div#objectDetails").html(html);
|
|---|
| 453 | });
|
|---|
| 454 | }
|
|---|
| 455 |
|
|---|
| 456 | $(function() {
|
|---|
| 457 | $("textarea.form-element,input.form-element,select.form-element")
|
|---|
| 458 | .keydown( function (evt) { custAutoChange(this); })
|
|---|
| 459 | .keyup( function (evt) { custAutoChange(this); })
|
|---|
| 460 | .click( function (evt) { custAutoChange(this); })
|
|---|
| 461 | .change( function (evt) { custAutoChange(this); })
|
|---|
| 462 | .each(function() {
|
|---|
| 463 | var elid = $(this).attr("name");
|
|---|
| 464 | if (typeof elid != "undefined") {
|
|---|
| 465 | custAutoSaveArr[elid] = $(this).val();
|
|---|
| 466 | }
|
|---|
| 467 | })
|
|---|
| 468 | ;
|
|---|
| 469 | getObjectDetails();
|
|---|
| 470 | });
|
|---|
| 471 |
|
|---|
| 472 | ////////////////////////////////////////////////////////////////////////////////
|
|---|
| 473 | ///// Snippets
|
|---|
| 474 | ////////////////////////////////////////////////////////////////////////////////
|
|---|
| 475 |
|
|---|
| 476 | var snippets_arr = {};
|
|---|
| 477 | snippets_arr["Page Template"] = {};
|
|---|
| 478 | snippets_arr["Page Template"]["snippet_bodyContent"] = {title:'Body-Content', raw:
|
|---|
| 479 | '<'+'div id="content" tal'+':content="structure here/bodyContentZMSLib_page">\n'+
|
|---|
| 480 | '\tthe body-content\n'+
|
|---|
| 481 | '<'+'/div><'+'-- #content -->'};
|
|---|
| 482 | snippets_arr["Page Template"]["snippet_docTitle"] = {title:'Document-Title', raw:
|
|---|
| 483 | '<'+'div id="title" tal'+':content="python:here.getTitle(request)">\n'+
|
|---|
| 484 | '\tthe title\n'+
|
|---|
| 485 | '<'+'/div><!'+'-- #title -->'};
|
|---|
| 486 | snippets_arr["Page Template"]["snippet_macroNav"] = {title:'Macro-Navigation', raw:
|
|---|
| 487 | '<'+'nav tal'+':condition="python:here.getLevel()>0"\n'+
|
|---|
| 488 | '\t\ttal'+':content="structure\n'+
|
|---|
| 489 | ' python:here.getParentByLevel(1).getNavItems(here,request,\n'+
|
|---|
| 490 | ' {\'add_self\':False,\'deep\':True,\'complete\':False})">\n'+
|
|---|
| 491 | '\t<'+'ul>\n'+
|
|---|
| 492 | '\t\t<'+'li><'+'a href="">Lorem ipsum<'+'/a><'+'/li>\n'+
|
|---|
| 493 | '\t\t<'+'li><'+'a href="">Lorem ipsum<'+'/a><'+'/li>\n'+
|
|---|
| 494 | '\t\t<'+'li><'+'a href="">Lorem ipsum<'+'/a><'+'/li>\n'+
|
|---|
| 495 | '\t<'+'/ul>\n'+
|
|---|
| 496 | '<'+'/nav><!'+'-- #macro -->'};
|
|---|
| 497 | snippets_arr["Page Template"]["snippet_menuNav"] = {title:'Menu-Navigation', raw:
|
|---|
| 498 | '<'+'nav id="menu" tal'+':content="structure\n'+
|
|---|
| 499 | ' python:here.getDocumentElement().getNavItems(here,request,\n'+
|
|---|
| 500 | ' {\'add_self\':False,\'deep\':False,\'complete\':False})">\n'+
|
|---|
| 501 | '\t<'+'ul>\n'+
|
|---|
| 502 | '\t\t<'+'li><'+'a href="">Lorem ipsum<'+'/a><'+'/li>\n'+
|
|---|
| 503 | '\t\t<'+'li><'+'a href="">Lorem ipsum<'+'/a><'+'/li>\n'+
|
|---|
| 504 | '\t\t<'+'li><'+'a href="">Lorem ipsum<'+'/a><'+'/li>\n'+
|
|---|
| 505 | '\t<'+'/ul>\n'+
|
|---|
| 506 | '<'+'/nav><!'+'-- #menu -->'};
|
|---|
| 507 | snippets_arr["Page Template"]["snippet_microNav"] = {title:'Micro-Navigation', raw:
|
|---|
| 508 | '<'+'nav id="micro">\n'+
|
|---|
| 509 | '\t<'+'span tal'+':omit-tag="" tal'+':repeat="item context/breadcrumbs_obj_path">\n'+
|
|---|
| 510 | '\t\t» <'+'a tal'+':attributes="href python:item.getHref2IndexHtml(request)"\n'+
|
|---|
| 511 | '\t\ttal'+':content="python:item.getTitlealt(request)">the item<'+'/a>\n'+
|
|---|
| 512 | '\t<'+'/span>\n'+
|
|---|
| 513 | '<'+'/nav><'+'-- #micro -->'};
|
|---|
| 514 |
|
|---|
| 515 | $(function() {
|
|---|
| 516 | var undoable_transactions = parseInt($("span#undoable_transactions").text());
|
|---|
| 517 | $("#refresh_btn").show("normal");
|
|---|
| 518 | $("#delete_btn").show("normal");
|
|---|
| 519 | if (undoable_transactions > 0) {
|
|---|
| 520 | $("#undo_btn").show("normal");
|
|---|
| 521 | }
|
|---|
| 522 | var meta_type = $("span#meta_type").text();
|
|---|
| 523 | if (typeof snippets_arr[meta_type] != "undefined") {
|
|---|
| 524 | var options = '<'+'option value="">--- Snippets... ---<'+'/option>';
|
|---|
| 525 | for (var i in snippets_arr[meta_type]) {
|
|---|
| 526 | options += '<'+'option value="'+i+'">'+snippets_arr[meta_type][i]['title']+'<'+'/option>';
|
|---|
| 527 | }
|
|---|
| 528 | $("#snippets_select").html(options).change(function() {
|
|---|
| 529 | var meta_type = $("span#meta_type").text();
|
|---|
| 530 | var i = $(this).val();
|
|---|
| 531 | $(this).val("");
|
|---|
| 532 | var context = window.parent;
|
|---|
| 533 | var defaultHtml = ''
|
|---|
| 534 | + '<'+'div class="ui-helper-hidden">'
|
|---|
| 535 | + '<'+'div id="snippets_div">'
|
|---|
| 536 | + '<'+'pre>the snippet text<'+'pre>'
|
|---|
| 537 | + '<'+'/div>'
|
|---|
| 538 | + '<'+'/div>';
|
|---|
| 539 | context.handleShowFancybox(
|
|---|
| 540 | "#snippets_div",
|
|---|
| 541 | "#snippets_div>pre",
|
|---|
| 542 | defaultHtml,
|
|---|
| 543 | snippets_arr[meta_type][i]['title'],
|
|---|
| 544 | snippets_arr[meta_type][i]['raw']
|
|---|
| 545 | );
|
|---|
| 546 | })
|
|---|
| 547 | .show("normal");
|
|---|
| 548 | }
|
|---|
| 549 | });
|
|---|
| 550 |
|
|---|
| 551 | ////////////////////////////////////////////////////////////////////////////////
|
|---|
| 552 |
|
|---|
| 553 | function zmiRefreshBtnClick() {
|
|---|
| 554 | self.location.reload();
|
|---|
| 555 | }
|
|---|
| 556 |
|
|---|
| 557 | function zmiUndoBtnClick() {
|
|---|
| 558 | var abs_url = $("span#absolute_url").text();
|
|---|
| 559 | self.location.href = abs_url + "/manage_UndoForm";
|
|---|
| 560 | }
|
|---|
| 561 |
|
|---|
| 562 | function zmiDelBtnClick() {
|
|---|
| 563 | if (confirm(getZMILangStr('MSG_CONFIRM_DELOBJ'))) {
|
|---|
| 564 | var abs_url = $("span#absolute_url").text();
|
|---|
| 565 | var id = abs_url.substr(abs_url.lastIndexOf("/")+1);
|
|---|
| 566 | var values = {"ids:list":id};
|
|---|
| 567 | $.post(abs_url.substr(0,abs_url.lastIndexOf("/"))+"/manage_delObjects",values,function(result) {
|
|---|
| 568 | window.parent.selectTab(0);
|
|---|
| 569 | window.parent.removeContainerDiv(id);
|
|---|
| 570 | window.parent.parent.preview.location.reload();
|
|---|
| 571 | });
|
|---|
| 572 | }
|
|---|
| 573 | }
|
|---|
| 574 |
|
|---|
| 575 | </script>
|
|---|
| 576 |
|
|---|
| 577 | <style type="text/css">
|
|---|
| 578 | body {
|
|---|
| 579 | background-color:#E8E8E8;
|
|---|
| 580 | background-color:#FFFFFF;
|
|---|
| 581 | margin:0px;
|
|---|
| 582 | }
|
|---|
| 583 | div#codeheader {
|
|---|
| 584 | border-radius:0px;
|
|---|
| 585 | display:block;
|
|---|
| 586 | width:100%;
|
|---|
| 587 | background-color:#e8e8e8;
|
|---|
| 588 | background-color:#FFFFFF;
|
|---|
| 589 | border-bottom:1px solid #ccc;
|
|---|
| 590 | /* silver
|
|---|
| 591 | background-image: -moz-linear-gradient(center top , #A4A4A4 0px, #B1B1B1 4px, #FFFFFF 22px);
|
|---|
| 592 | */
|
|---|
| 593 | height:28px;
|
|---|
| 594 | }
|
|---|
| 595 | div#codeheader div.zmi_col_left {
|
|---|
| 596 | padding:0px 0px 0px 12px;
|
|---|
| 597 | }
|
|---|
| 598 | div#codeheader div.zmi_col_right {
|
|---|
| 599 | padding:2px 0px 0px 0px;
|
|---|
| 600 | }
|
|---|
| 601 | div.ace_gutter {
|
|---|
| 602 | width:32px !important;
|
|---|
| 603 | }
|
|---|
| 604 | </style>
|
|---|
| 605 |
|
|---|
| 606 | <div id="codeheader" >
|
|---|
| 607 | <table width="100%">
|
|---|
| 608 | <tr>
|
|---|
| 609 | <td>
|
|---|
| 610 | <table>
|
|---|
| 611 | <tr>
|
|---|
| 612 | <td>
|
|---|
| 613 | <img tal:attributes="src ob/icon; title ob/meta_type" align="absmiddle"/>
|
|---|
| 614 | <span class="form-label" tal:content="ob/id">the id</span>
|
|---|
| 615 | </td>
|
|---|
| 616 | <td>
|
|---|
| 617 | <ul class="zmi-icons ui-widget ui-helper-clearfix">
|
|---|
| 618 | <li id="refresh_btn" class="ui-helper-hidden ui-corner-all ui-state-default" tal:attributes="title python:unicode(here.getZMILangStr('BTN_REFRESH'),'utf-8')">
|
|---|
| 619 | <span class="ui-icon ui-icon-arrowrefresh-1-w" onclick="zmiRefreshBtnClick();"></span>
|
|---|
| 620 | </li>
|
|---|
| 621 | <li id="undo_btn" class="ui-helper-hidden ui-corner-all ui-state-default" tal:attributes="title python:unicode(here.getZMILangStr('BTN_UNDO'),'utf-8')">
|
|---|
| 622 | <span class="ui-icon ui-icon-arrowreturn-1-w" onclick="zmiUndoBtnClick();"></span>
|
|---|
| 623 | </li>
|
|---|
| 624 | <li id="delete_btn" class="ui-helper-hidden ui-corner-all ui-state-default" tal:attributes="title python:unicode(here.getZMILangStr('BTN_DELETE'),'utf-8')">
|
|---|
| 625 | <span class="ui-icon ui-icon-trash" onclick="zmiDelBtnClick();"></span>
|
|---|
| 626 | </li>
|
|---|
| 627 | </ul>
|
|---|
| 628 | </td>
|
|---|
| 629 | </tr>
|
|---|
| 630 | </table>
|
|---|
| 631 | </td>
|
|---|
| 632 | <td align="right">
|
|---|
| 633 | <select id="snippets_select" class="form-small ui-helper-hidden">
|
|---|
| 634 | </select>
|
|---|
| 635 | </td>
|
|---|
| 636 | </tr>
|
|---|
| 637 | </table>
|
|---|
| 638 | </div>
|
|---|
| 639 |
|
|---|
| 640 | <form onsubmit="return false;">
|
|---|
| 641 | <div class="ui-helper-hidden">
|
|---|
| 642 | <span id="meta_type" tal:content="ob/meta_type">the meta_type</span>
|
|---|
| 643 | <span id="absolute_url" tal:content="ob/absolute_url">the absolute_url</span>
|
|---|
| 644 | <span id="absolute_path" tal:content="python:ob.absolute_url()[len(here.getHome().absolute_url()):]">the absolute_path</span>
|
|---|
| 645 | <span id="undoable_transactions" tal:content="python:len(ob.undoable_transactions())">the number of undoable transactions</span>
|
|---|
| 646 | </div>
|
|---|
| 647 | <span tal:omit-tag="" tal:condition="python:ob.meta_type in ['DTML Document','DTML Method']">
|
|---|
| 648 | <div class="ui-helper-hidden">
|
|---|
| 649 | <span id="action">manage_edit</span>
|
|---|
| 650 | <label for="title">Title</label><input id="title" name="title" class="form-element" tal:attributes="value ob/title">
|
|---|
| 651 | </div>
|
|---|
| 652 | <textarea id="text" name="data:text" class="ui-helper-hidden form-element" tal:content="ob/raw" style="width:100%">The object</textarea>
|
|---|
| 653 | </span>
|
|---|
| 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'])">
|
|---|
| 655 | <div class="ui-helper-hidden">
|
|---|
| 656 | <span id="action">manage_edit</span>
|
|---|
| 657 | <label for="title">Title</label><input id="title" name="title" class="form-element" tal:attributes="value ob/title">
|
|---|
| 658 | <label for="content_type">Content-Type</label><input id="content_type" name="content_type" class="form-element" tal:attributes="value ob/content_type">
|
|---|
| 659 | </div>
|
|---|
| 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>
|
|---|
| 661 | </span>
|
|---|
| 662 | <span tal:omit-tag="" tal:condition="python:ob.meta_type=='Page Template'">
|
|---|
| 663 | <div class="ui-helper-hidden">
|
|---|
| 664 | <span id="action">pt_editAction</span>
|
|---|
| 665 | <label for="title">Title</label><input id="title" name="title" class="form-element" tal:attributes="value ob/title">
|
|---|
| 666 | <label for="content_type">Content-Type</label><input id="content_type" name="content_type" class="form-element" tal:attributes="value ob/content_type">
|
|---|
| 667 | <label for="expand">Expand</label><input id="expand" name="expand:int" class="form-element" tal:attributes="value ob/expand">
|
|---|
| 668 | </div>
|
|---|
| 669 | <textarea id="text" name="text:text" class="ui-helper-hidden form-element" tal:content="ob/read" style="width:100%">The object</textarea>
|
|---|
| 670 | </span>
|
|---|
| 671 | <span tal:omit-tag="" tal:condition="python:ob.meta_type=='Script (Python)'">
|
|---|
| 672 | <div class="ui-helper-hidden">
|
|---|
| 673 | <span id="action">ZPythonScriptHTML_editAction</span>
|
|---|
| 674 | <label for="title">Title</label><input id="title" name="title" class="form-element" tal:attributes="value ob/title">
|
|---|
| 675 | <label for="params">Parameter List</label><input id="params" name="params" class="form-element" tal:attributes="value ob/params">
|
|---|
| 676 | <label for="content_type">Content-Type</label><input id="content_type" name="content_type" class="form-element" value="python">
|
|---|
| 677 | </div>
|
|---|
| 678 | <textarea id="text" name="body:text" class="ui-helper-hidden form-element" tal:content="ob/read" style="width:100%">The object</textarea>
|
|---|
| 679 | </span>
|
|---|
| 680 | <div id="objectDetails"></div>
|
|---|
| 681 | <textarea id="debug" class="ui-helper-hidden"></textarea>
|
|---|
| 682 | </form>
|
|---|
| 683 |
|
|---|
| 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'])">
|
|---|
| 685 | <div class="ui-helper-hidden">
|
|---|
| 686 | <span id="action">manage_upload</span>
|
|---|
| 687 | <label for="title">Title</label><input id="title" name="title" class="form-element" tal:attributes="value ob/title">
|
|---|
| 688 | <label for="content_type">Content-Type</label><input id="content_type" name="content_type" class="form-element" tal:attributes="value ob/content_type">
|
|---|
| 689 | </div>
|
|---|
| 690 | <div id="iframe" class="ui-helper-hidden">
|
|---|
| 691 | <iframe name="postframe" id="postframe"></iframe>
|
|---|
| 692 | </div>
|
|---|
| 693 | <table>
|
|---|
| 694 | <tr>
|
|---|
| 695 | <td class="form-label">Content Type</td>
|
|---|
| 696 | <td class="form-element" tal:content="ob/content_type">the content-type</td>
|
|---|
| 697 | </tr>
|
|---|
| 698 | <tr tal:condition="python:ob.meta_type in ['Image','File'] and ob.content_type.startswith('image/')">
|
|---|
| 699 | <td class="form-label">Preview</td>
|
|---|
| 700 | <td class="form-element">
|
|---|
| 701 | <img id="preview" tal:attributes="src ob/absolute_url" alt="" style="border: 1px solid #000;margin:1px;background-image:url(/misc_/zms/bg_imgpreview.gif);"/>
|
|---|
| 702 | </td>
|
|---|
| 703 | </tr>
|
|---|
| 704 | <tr>
|
|---|
| 705 | <td class="form-label">File Size</td>
|
|---|
| 706 | <td class="form-element" tal:content="python:here.getDataSizeStr(ob.size)">the file-size</td>
|
|---|
| 707 | </tr>
|
|---|
| 708 | <tr>
|
|---|
| 709 | <td class="form-label">File Data</td>
|
|---|
| 710 | <td class="form-element"><input id="file" name="file" type="file" class="form-element"></td>
|
|---|
| 711 | </tr>
|
|---|
| 712 | </table>
|
|---|
| 713 | </form>
|
|---|
| 714 |
|
|---|
| 715 | <!--
|
|---|
| 716 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|---|
| 717 | +++ Ajax.org Cloud9 Editor
|
|---|
| 718 | +++ http://ace.ajax.org
|
|---|
| 719 | +++ @see $ZMS_HOME/plugins/www/ace.ajax.org
|
|---|
| 720 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|---|
| 721 | -->
|
|---|
| 722 | <div id="editor" class="zmiNeutralColorWhite" style="height: 96%; width: 100%">some text</div>
|
|---|
| 723 | <script type="text/javascript" charset="UTF-8" src="/++resource++zms_/ace.ajax.org/ace.js"></script>
|
|---|
| 724 | <script type="text/javascript" charset="UTF-8" src="/++resource++zms_/ace.ajax.org/theme-eclipse.js"></script>
|
|---|
| 725 | <script type="text/javascript" charset="UTF-8" src="/++resource++zms_/ace.ajax.org/mode-html.js"></script>
|
|---|
| 726 | <script type="text/javascript" charset="UTF-8" src="/++resource++zms_/ace.ajax.org/mode-css.js"></script>
|
|---|
| 727 | <script type="text/javascript" charset="UTF-8" src="/++resource++zms_/ace.ajax.org/mode-javascript.js"></script>
|
|---|
| 728 | <script type="text/javascript" charset="UTF-8" src="/++resource++zms_/ace.ajax.org/mode-python.js"></script>
|
|---|
| 729 | <script type="text/javascript" charset="UTF-8" src="/++resource++zms_/ace.ajax.org/mode-xml.js"></script>
|
|---|
| 730 | <script type="text/javascript">
|
|---|
| 731 | $(function() {
|
|---|
| 732 | if ($("textarea#text").length == 0) {
|
|---|
| 733 | $("#editor").hide();
|
|---|
| 734 | }
|
|---|
| 735 | else {
|
|---|
| 736 | // @see https://github.com/ajaxorg/ace/wiki/Embedding---API
|
|---|
| 737 | var editor = ace.edit("editor");
|
|---|
| 738 | var content_type = null;
|
|---|
| 739 | if ($("input#content_type")) {
|
|---|
| 740 | content_type = $("input#content_type").val();
|
|---|
| 741 | }
|
|---|
| 742 | if (content_type == null) {
|
|---|
| 743 | var absolute_url = $("span#absolute_url").text();
|
|---|
| 744 | var id = absolute_url.substr(absolute_url.lastIndexOf("/")+1);
|
|---|
| 745 | if (id.endsWith(".css")) {
|
|---|
| 746 | content_type = "text/css";
|
|---|
| 747 | }
|
|---|
| 748 | else if (id.endsWith(".js")) {
|
|---|
| 749 | content_type = "text/javascript";
|
|---|
| 750 | }
|
|---|
| 751 | else {
|
|---|
| 752 | content_type = "text/html";
|
|---|
| 753 | }
|
|---|
| 754 | }
|
|---|
| 755 | var Mode = null;
|
|---|
| 756 | if (content_type == "text/html") {
|
|---|
| 757 | Mode = require("ace/mode/html").Mode;
|
|---|
| 758 | }
|
|---|
| 759 | else if (content_type == "text/css" || content_type == "application/x-css") {
|
|---|
| 760 | Mode = require("ace/mode/css").Mode;
|
|---|
| 761 | }
|
|---|
| 762 | else if (content_type == "text/javascript" || content_type == "application/x-javascript") {
|
|---|
| 763 | Mode = require("ace/mode/javascript").Mode;
|
|---|
| 764 | }
|
|---|
| 765 | else if (content_type == "text/xml") {
|
|---|
| 766 | Mode = require("ace/mode/xml").Mode;
|
|---|
| 767 | }
|
|---|
| 768 | else if (content_type == "python") {
|
|---|
| 769 | Mode = require("ace/mode/python").Mode;
|
|---|
| 770 | }
|
|---|
| 771 | if (Mode != null) {
|
|---|
| 772 | editor.getSession().setMode(new Mode());
|
|---|
| 773 | }
|
|---|
| 774 | editor.setTheme("ace/theme/eclipse");
|
|---|
| 775 | editor.getSession().setValue($("textarea#text").val());
|
|---|
| 776 | editor.getSession().on("change",function() {
|
|---|
| 777 | custAutoChange($("textarea#text").val(editor.getSession().getValue()));
|
|---|
| 778 | });
|
|---|
| 779 | custAutoSaveArr["text"] = editor.getSession().getValue();
|
|---|
| 780 | }
|
|---|
| 781 | });
|
|---|
| 782 | </script>
|
|---|
| 783 |
|
|---|
| 784 | </div>
|
|---|
| 785 | </span>
|
|---|
| 786 | </body>
|
|---|
| 787 |
|
|---|
| 788 | <!--
|
|---|
| 789 | ################################################################################
|
|---|
| 790 | -->
|
|---|
| 791 |
|
|---|
| 792 | </html>
|
|---|
| 793 | </xhtml>
|
|---|
| 794 |
|
|---|
| 795 | <!--
|
|---|
| 796 | ################################################################################
|
|---|
| 797 | ### Object-Details
|
|---|
| 798 | ################################################################################
|
|---|
| 799 | -->
|
|---|
| 800 | <objectDetails tal:condition="python:request.has_key('objectDetails')" tal:define="global ob python:here.getAbsoluteHome(); path python:request.get('objectDetails')">
|
|---|
| 801 | <span tal:omit-tag="" tal:repeat="ob_id python:path.split('/')[1:]">
|
|---|
| 802 | <span tal:omit-tag="" tal:define="global ob python:getattr(ob,ob_id)"></span>
|
|---|
| 803 | </span>
|
|---|
| 804 | <span tal:omit-tag="" tal:condition="python:ob.meta_type=='Page Template'">
|
|---|
| 805 | <errors tal:condition="ob/pt_errors" tal:content="python:'\n'.join(ob.pt_errors())">the pt_errors</errors>
|
|---|
| 806 | </span>
|
|---|
| 807 | <span tal:omit-tag="" tal:condition="python:ob.meta_type=='Script (Python)'">
|
|---|
| 808 | <errors tal:condition="ob/errors" tal:content="python:'\n'.join(ob.errors)">the errors</errors>
|
|---|
| 809 | <warnings tal:condition="ob/warnings" tal:content="python:'\n'.join(ob.warnings)">the warnings</warnings>
|
|---|
| 810 | </span>
|
|---|
| 811 | </objectDetails>
|
|---|
| 812 |
|
|---|
| 813 | <!--
|
|---|
| 814 | ################################################################################
|
|---|
| 815 | ### Object-Values
|
|---|
| 816 | ################################################################################
|
|---|
| 817 | -->
|
|---|
| 818 | <objectValues tal:condition="python:request.has_key('objectValues')" tal:define="global context python:here.getAbsoluteHome()">
|
|---|
| 819 | <span tal:omit-tag="" tal:repeat="ob_id python:request['objectValues'].split('/')[1:]">
|
|---|
| 820 | <span tal:omit-tag="" tal:define="global context python:getattr(context,ob_id)"></span>
|
|---|
| 821 | </span>
|
|---|
| 822 | <span tal:omit-tag="" tal:repeat="ob python:context.objectValues(['DTML Method','DTML Document','Folder','Image','File','Script (Python)','Page Template','ZMS','ZMSMetamodelProvider'])">
|
|---|
| 823 | <object tal:condition="python:ob.title!='*** DO NOT DELETE OR MODIFY ***'" tal:attributes="icon ob/icon; title ob/title; id ob/id; meta_type ob/meta_type"/>
|
|---|
| 824 | </span>
|
|---|
| 825 | </objectValues>]]>
|
|---|
| 826 | </item>
|
|---|
| 827 | <item key="description"/>
|
|---|
| 828 | <item key="exec" type="int">0</item>
|
|---|
| 829 | <item key="id"><![CDATA[manage_editTemplateSet]]></item>
|
|---|
| 830 | <item key="meta_type"><![CDATA[Page Template]]></item>
|
|---|
| 831 | <item key="meta_types" type="list">
|
|---|
| 832 | <list>
|
|---|
| 833 | <item><![CDATA[ZMS]]></item>
|
|---|
| 834 | </list>
|
|---|
| 835 | </item>
|
|---|
| 836 | <item key="name"><![CDATA[Edit Template-Set...]]></item>
|
|---|
| 837 | <item key="roles" type="list">
|
|---|
| 838 | <list>
|
|---|
| 839 | <item><![CDATA[ZMSAdministrator]]></item>
|
|---|
| 840 | </list>
|
|---|
| 841 | </item>
|
|---|
| 842 | </dictionary> |
|---|