Commit a88c5183 authored by Ivan Tyagov's avatar Ivan Tyagov

Reorganize code.

User require.js to load dependencies.
Allow tabs to be switched using dynamic hashable routes.
parent 9cdeea19
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from json import dumps\n
return dumps(d)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>d</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_asJSON</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode>\074html\076\n
\074head\076\n
\074title tal:content="template/title"\076The title\074/title\076\n
\074meta http-equiv="content-type" content="text/html;charset=utf-8"\076\n
\074/head\076\n
\074body\076\n
\n
\074script type="text/javascript" language="javascript"\076\n
//\074![CDATA[\n
$(document).ready(function() {\n
gadget = RenderJs.getSelfGadget();\n
\n
// default tab should be openned fist\n
gadget.redirect = function () {\n
$.url.redirect(\'/\' + gadget.default_tab_url + \'/\');\n
};\n
\n
// default route\n
RenderJs.RouteGadget.add(\'\', gadget.redirect, 1);\n
\n
$.each(gadget.action_id_list, function(index, value) {\n
// add dynamic function to gadget that will take care to render tab using gadgets\n
gadget[value] = function () {\n
ERP5Form.openFormInTabbularGadget(gadget.tab_container_id, value);\n
};\n
//add dynamic route\n
RenderJs.RouteGadget.add(\'/\' + value + \'/\', gadget[value], 1);\n
});\n
});\n
//]]\076\n
\074/script\076\n
\n
\074/body\076\n
\074/html\076</unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_tabbular_form_renderer</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -46,13 +46,18 @@ ...@@ -46,13 +46,18 @@
current_form_id python: request.get(\'current_form_id\', \'view\');\n current_form_id python: request.get(\'current_form_id\', \'view\');\n
current_url python: \'%s/%s\' % (url, current_form_id);\n current_url python: \'%s/%s\' % (url, current_form_id);\n
current_action python: portal.ERP5Site_getCurrentAction(current_url, actions);\n current_action python: portal.ERP5Site_getCurrentAction(current_url, actions);\n
actions actions/object_view | python: [];">\n actions actions/object_view | python: [];\n
action_id_list python:[x[\'url\'].split(\'/\')[-1] for x in actions];\n
data_gadget_property python: {\'tab_container_id\': \'form_gadget\',\n
\'default_tab_url\': action_id_list[0],\n
\'action_id_list\': action_id_list}">\n
\n \n
\n \n
<!-- XXX: use portal_status_message gadget -->\n
<div id="portal_status_message" style="height:20px; display:none;">\n <div id="portal_status_message" style="height:20px; display:none;">\n
<p style="color:red; font-weight: bold;"></p>\n <p style="color:red; font-weight: bold;"></p>\n
</div>\n </div>\n
\n \n
<div class="document">\n <div class="document">\n
\n \n
<div class="actions">\n <div class="actions">\n
...@@ -62,16 +67,10 @@ ...@@ -62,16 +67,10 @@
<span class="description">Save</span>\n <span class="description">Save</span>\n
</button>\n </button>\n
\n \n
<script type="text/javascript"\n <!-- Test -->\n
tal:content="python:\'\'\'ERP5Form.setCurrentFormId(\'%s\');;\n <div data-gadget="erp5_tabbular_form_renderer"\n
RenderJs.TabbularGadget.addNewTabGadget(\n id="erp5_tabbular_form_renderer"\n
\'form_gadget\',\n tal:attributes="data-gadget-property python: here.Base_asJSON(data_gadget_property);"> </div>\n
\'gadget-%s\',\n
\'%s/Form_asRenderJSGadget\',\n
\'ERP5Form.update\',\n
\'Form_asJSON?form_id=%s\', false);;\n
\'\'\' %(current_form_id, current_form_id, current_form_id, current_form_id)">\n
</script>\n
\n \n
<!-- get all tabs from server -->\n <!-- get all tabs from server -->\n
<ul class="tabs">\n <ul class="tabs">\n
...@@ -80,8 +79,7 @@ ...@@ -80,8 +79,7 @@
tal:define="action_form python: action[\'url\'].split(\'/\')[-1]"\n tal:define="action_form python: action[\'url\'].split(\'/\')[-1]"\n
tal:attributes="id action_form;\n tal:attributes="id action_form;\n
class python: action == current_action and \'selected\' or \'not_selected\'">\n class python: action == current_action and \'selected\' or \'not_selected\'">\n
\n <a tal:attributes="href python: \'view#/%s/\' %action_form">\n
<a tal:attributes="onclick python: \'\'\'javascript: ERP5Form.openFormInTabbularGadget(\'form_gadget\', \'%s\');; return false ;;\'\'\' %(action_form)">\n
<span i18n:translate=""\n <span i18n:translate=""\n
i18n:domain="ui"\n i18n:domain="ui"\n
tal:content="action/name">action_name</span>\n tal:content="action/name">action_name</span>\n
...@@ -93,13 +91,13 @@ ...@@ -93,13 +91,13 @@
</div>\n </div>\n
\n \n
<div class="content editable">\n <div class="content editable">\n
\n \n
<!--Form rendered content goes here -->\n <!--Form rendered content goes here -->\n
<div id="form_gadget"></div>\n <div id="form_gadget"></div>\n
\n \n
</div>\n </div>\n
</div>\n </div>\n
\n \n
</div> </div>
]]></unicode> </value> ]]></unicode> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>lib</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts62754937.18</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>require-erp5.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>// JavaScript file that is used to load ERP5\'s JavaScript depenencies\n
require.config({\n
paths: {\n
"erp5_form": "lib/erp5_form",\n
route: "lib/route",\n
url: "lib/url",\n
jquery: "jquery/core/jquery",\n
renderjs: "jquery/plugin/renderjs/renderjs",\n
"jquery-ui": "jquery/ui/js/jquery-ui.min",\n
"jquery.jqGrid.src": "jquery/plugin/jqgrid/jquery.jqGrid.src",\n
"grid.locale-en": "jquery/plugin/jqgrid/i18n/grid.locale-en"\n
},\n
shim: {\n
erp5: ["jquery"],\n
erp5_xhtml_appearance: ["erp5"],\n
erp5_knowledge_box: ["jquery", "jquery-ui"],\n
route: ["jquery"],\n
url: ["jquery"],\n
"jquery-ui": ["jquery"],\n
"jquery.jqGrid.src": ["jquery"],\n
"grid.locale-en": ["jquery.jqGrid.src"]\n
}\n
});\n
\n
require(["erp5_xhtml_appearance", "erp5_knowledge_box", "erp5", "erp5_form",\n
"renderjs", "jquery", "jquery-ui", "route", "url",\n
"jquery.jqGrid.src", "grid.locale-en"],\n
function(domReady) {\n
RenderJs.init();\n
RenderJs.bindReady(function (){\n
$.url.onhashchange(function () {\n
//console.log("go to route", $.url.getPath());\n
RenderJs.RouteGadget.go($.url.getPath(),\n
function () {\n
//console.log("bad route");\n
// All routes have been deleted by fail.\n
// So recreate the default routes using RouteGadget\n
RenderJs.RouteGadget.init();\n
});\n
});\n
});\n
});\n
</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1474</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>anonymous_http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts62728867.75</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>require.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*\n
RequireJS 2.1.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\n
Available via the MIT or new BSD license.\n
see: http://github.com/jrburke/requirejs for details\n
*/\n
var requirejs,require,define;\n
(function(Y){function I(b){return"[object Function]"===L.call(b)}function J(b){return"[object Array]"===L.call(b)}function x(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function M(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function r(b,c){return da.call(b,c)}function i(b,c){return r(b,c)&&b[c]}function E(b,c){for(var d in b)if(r(b,d)&&c(b[d],d))break}function Q(b,c,d,i){c&&E(c,function(c,h){if(d||!r(b,h))i&&"string"!==typeof c?(b[h]||(b[h]={}),Q(b[h],\n
c,d,i)):b[h]=c});return b}function t(b,c){return function(){return c.apply(b,arguments)}}function Z(b){if(!b)return b;var c=Y;x(b.split("."),function(b){c=c[b]});return c}function F(b,c,d,i){c=Error(c+"\\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=i;d&&(c.originalError=d);return c}function ea(b){function c(a,f,v){var e,n,b,c,d,k,g,h=f&&f.split("/");e=h;var l=m.map,j=l&&l["*"];if(a&&"."===a.charAt(0))if(f){e=i(m.pkgs,f)?h=[f]:h.slice(0,h.length-1);f=a=e.concat(a.split("/"));\n
for(e=0;f[e];e+=1)if(n=f[e],"."===n)f.splice(e,1),e-=1;else if(".."===n)if(1===e&&(".."===f[2]||".."===f[0]))break;else 0<e&&(f.splice(e-1,2),e-=2);e=i(m.pkgs,f=a[0]);a=a.join("/");e&&a===f+"/"+e.main&&(a=f)}else 0===a.indexOf("./")&&(a=a.substring(2));if(v&&(h||j)&&l){f=a.split("/");for(e=f.length;0<e;e-=1){b=f.slice(0,e).join("/");if(h)for(n=h.length;0<n;n-=1)if(v=i(l,h.slice(0,n).join("/")))if(v=i(v,b)){c=v;d=e;break}if(c)break;!k&&(j&&i(j,b))&&(k=i(j,b),g=e)}!c&&k&&(c=k,d=g);c&&(f.splice(0,d,\n
c),a=f.join("/"))}return a}function d(a){z&&x(document.getElementsByTagName("script"),function(f){if(f.getAttribute("data-requiremodule")===a&&f.getAttribute("data-requirecontext")===k.contextName)return f.parentNode.removeChild(f),!0})}function y(a){var f=i(m.paths,a);if(f&&J(f)&&1<f.length)return d(a),f.shift(),k.require.undef(a),k.require([a]),!0}function g(a){var f,b=a?a.indexOf("!"):-1;-1<b&&(f=a.substring(0,b),a=a.substring(b+1,a.length));return[f,a]}function h(a,f,b,e){var n,u,d=null,h=f?f.name:\n
null,l=a,m=!0,j="";a||(m=!1,a="_@r"+(L+=1));a=g(a);d=a[0];a=a[1];d&&(d=c(d,h,e),u=i(p,d));a&&(d?j=u&&u.normalize?u.normalize(a,function(a){return c(a,h,e)}):c(a,h,e):(j=c(a,h,e),a=g(j),d=a[0],j=a[1],b=!0,n=k.nameToUrl(j)));b=d&&!u&&!b?"_unnormalized"+(M+=1):"";return{prefix:d,name:j,parentMap:f,unnormalized:!!b,url:n,originalName:l,isDefine:m,id:(d?d+"!"+j:j)+b}}function q(a){var f=a.id,b=i(j,f);b||(b=j[f]=new k.Module(a));return b}function s(a,f,b){var e=a.id,n=i(j,e);if(r(p,e)&&(!n||n.defineEmitComplete))"defined"===\n
f&&b(p[e]);else q(a).on(f,b)}function A(a,f){var b=a.requireModules,e=!1;if(f)f(a);else if(x(b,function(f){if(f=i(j,f))f.error=a,f.events.error&&(e=!0,f.emit("error",a))}),!e)l.onError(a)}function w(){R.length&&(fa.apply(G,[G.length-1,0].concat(R)),R=[])}function B(a,f,b){var e=a.map.id;a.error?a.emit("error",a.error):(f[e]=!0,x(a.depMaps,function(e,c){var d=e.id,h=i(j,d);h&&(!a.depMatched[c]&&!b[d])&&(i(f,d)?(a.defineDep(c,p[d]),a.check()):B(h,f,b))}),b[e]=!0)}function C(){var a,f,b,e,n=(b=1E3*m.waitSeconds)&&\n
k.startTime+b<(new Date).getTime(),c=[],h=[],g=!1,l=!0;if(!T){T=!0;E(j,function(b){a=b.map;f=a.id;if(b.enabled&&(a.isDefine||h.push(b),!b.error))if(!b.inited&&n)y(f)?g=e=!0:(c.push(f),d(f));else if(!b.inited&&(b.fetched&&a.isDefine)&&(g=!0,!a.prefix))return l=!1});if(n&&c.length)return b=F("timeout","Load timeout for modules: "+c,null,c),b.contextName=k.contextName,A(b);l&&x(h,function(a){B(a,{},{})});if((!n||e)&&g)if((z||$)&&!U)U=setTimeout(function(){U=0;C()},50);T=!1}}function D(a){r(p,a[0])||\n
q(h(a[0],null,!0)).init(a[1],a[2])}function H(a){var a=a.currentTarget||a.srcElement,b=k.onScriptLoad;a.detachEvent&&!V?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=k.onScriptError;(!a.detachEvent||V)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function K(){var a;for(w();G.length;){a=G.shift();if(null===a[0])return A(F("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));D(a)}}var T,W,k,N,U,m={waitSeconds:7,\n
baseUrl:"./",paths:{},pkgs:{},shim:{},map:{},config:{}},j={},X={},G=[],p={},S={},L=1,M=1;N={require:function(a){return a.require?a.require:a.require=k.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?a.exports:a.exports=p[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return m.config&&i(m.config,a.map.id)||{}},exports:p[a.map.id]}}};W=function(a){this.events=i(X,a.id)||{};this.map=a;this.shim=\n
i(m.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};W.prototype={init:function(a,b,c,e){e=e||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=t(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=e.ignore;e.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=\n
b)},fetch:function(){if(!this.fetched){this.fetched=!0;k.startTime=(new Date).getTime();var a=this.map;if(this.shim)k.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],t(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;S[a]||(S[a]=!0,k.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var e=this.exports,n=this.factory;\n
if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(I(n)){if(this.events.error)try{e=k.execCb(c,n,b,e)}catch(d){a=d}else e=k.execCb(c,n,b,e);this.map.isDefine&&((b=this.module)&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports));if(a)return a.requireMap=this.map,a.requireModules=[this.map.id],a.requireType="define",A(this.error=a)}else e=n;this.exports=e;if(this.map.isDefine&&\n
!this.ignore&&(p[c]=e,l.onResourceLoad))l.onResourceLoad(k,this.map,this.depMaps);delete j[c];this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=h(a.prefix);this.depMaps.push(d);s(d,"defined",t(this,function(e){var n,d;d=this.map.name;var v=this.map.parentMap?this.map.parentMap.name:null,g=k.makeRequire(a.parentMap,{enableBuildCallback:!0});\n
if(this.map.unnormalized){if(e.normalize&&(d=e.normalize(d,function(a){return c(a,v,!0)})||""),e=h(a.prefix+"!"+d,this.map.parentMap),s(e,"defined",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=i(j,e.id)){this.depMaps.push(e);if(this.events.error)d.on("error",t(this,function(a){this.emit("error",a)}));d.enable()}}else n=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),n.error=t(this,function(a){this.inited=!0;this.error=a;a.requireModules=\n
[b];E(j,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&delete j[a.map.id]});A(a)}),n.fromText=t(this,function(e,c){var d=a.name,u=h(d),v=O;c&&(e=c);v&&(O=!1);q(u);r(m.config,b)&&(m.config[d]=m.config[b]);try{l.exec(e)}catch(j){return A(F("fromtexteval","fromText eval for "+b+" failed: "+j,j,[b]))}v&&(O=!0);this.depMaps.push(u);k.completeLoad(d);g([d],n)}),e.load(a.name,g,n,m)}));k.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){this.enabling=this.enabled=!0;x(this.depMaps,t(this,function(a,\n
b){var c,e;if("string"===typeof a){a=h(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=i(N,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;s(a,"defined",t(this,function(a){this.defineDep(b,a);this.check()}));this.errback&&s(a,"error",this.errback)}c=a.id;e=j[c];!r(N,c)&&(e&&!e.enabled)&&k.enable(a,this)}));E(this.pluginMaps,t(this,function(a){var b=i(j,a.id);b&&!b.enabled&&k.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=\n
this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){x(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};k={config:m,contextName:b,registry:j,defined:p,urlFetched:S,defQueue:G,Module:W,makeModuleMap:h,nextTick:l.nextTick,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=m.pkgs,c=m.shim,e={paths:!0,config:!0,map:!0};E(a,function(a,b){e[b]?"map"===b?Q(m[b],a,!0,!0):Q(m[b],a,!0):m[b]=a});a.shim&&(E(a.shim,function(a,\n
b){J(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=k.makeShimExports(a);c[b]=a}),m.shim=c);a.packages&&(x(a.packages,function(a){a="string"===typeof a?{name:a}:a;b[a.name]={name:a.name,location:a.location||a.name,main:(a.main||"main").replace(ga,"").replace(aa,"")}}),m.pkgs=b);E(j,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=h(b))});if(a.deps||a.callback)k.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(Y,arguments));\n
return b||a.exports&&Z(a.exports)}},makeRequire:function(a,d){function g(e,c,u){var i,m;d.enableBuildCallback&&(c&&I(c))&&(c.__requireJsBuild=!0);if("string"===typeof e){if(I(c))return A(F("requireargs","Invalid require call"),u);if(a&&r(N,e))return N[e](j[a.id]);if(l.get)return l.get(k,e,a);i=h(e,a,!1,!0);i=i.id;return!r(p,i)?A(F("notloaded",\'Module name "\'+i+\'" has not been loaded yet for context: \'+b+(a?"":". Use require([])"))):p[i]}K();k.nextTick(function(){K();m=q(h(null,a));m.skipMap=d.skipMap;\n
m.init(e,c,u,{enabled:!0});C()});return g}d=d||{};Q(g,{isBrowser:z,toUrl:function(b){var d,f=b.lastIndexOf("."),h=b.split("/")[0];if(-1!==f&&(!("."===h||".."===h)||1<f))d=b.substring(f,b.length),b=b.substring(0,f);b=k.nameToUrl(c(b,a&&a.id,!0),d||".fake");return d?b:b.substring(0,b.length-5)},defined:function(b){return r(p,h(b,a,!1,!0).id)},specified:function(b){b=h(b,a,!1,!0).id;return r(p,b)||r(j,b)}});a||(g.undef=function(b){w();var c=h(b,a,!0),d=i(j,b);delete p[b];delete S[c.url];delete X[b];\n
d&&(d.events.defined&&(X[b]=d.events),delete j[b])});return g},enable:function(a){i(j,a.id)&&q(a).enable()},completeLoad:function(a){var b,c,d=i(m.shim,a)||{},h=d.exports;for(w();G.length;){c=G.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);D(c)}c=i(j,a);if(!b&&!r(p,a)&&c&&!c.inited){if(m.enforceDefine&&(!h||!Z(h)))return y(a)?void 0:A(F("nodefine","No define call for "+a,null,[a]));D([a,d.deps||[],d.exportsFn])}C()},nameToUrl:function(a,b){var c,d,h,g,k,j;if(l.jsExtRegExp.test(a))g=\n
a+(b||"");else{c=m.paths;d=m.pkgs;g=a.split("/");for(k=g.length;0<k;k-=1)if(j=g.slice(0,k).join("/"),h=i(d,j),j=i(c,j)){J(j)&&(j=j[0]);g.splice(0,k,j);break}else if(h){c=a===h.name?h.location+"/"+h.main:h.location;g.splice(0,k,c);break}g=g.join("/");g+=b||(/\\?/.test(g)?"":".js");g=("/"===g.charAt(0)||g.match(/^[\\w\\+\\.\\-]+:/)?"":m.baseUrl)+g}return m.urlArgs?g+((-1===g.indexOf("?")?"?":"&")+m.urlArgs):g},load:function(a,b){l.load(k,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===\n
a.type||ha.test((a.currentTarget||a.srcElement).readyState))P=null,a=H(a),k.completeLoad(a.id)},onScriptError:function(a){var b=H(a);if(!y(b.id))return A(F("scripterror","Script error",a,[b.id]))}};k.require=k.makeRequire();return k}var l,w,B,D,s,H,P,K,ba,ca,ia=/(\\/\\*([\\s\\S]*?)\\*\\/|([^:]|^)\\/\\/(.*)$)/mg,ja=/[^.]\\s*require\\s*\\(\\s*["\']([^\'"\\s]+)["\']\\s*\\)/g,aa=/\\.js$/,ga=/^\\.\\//;w=Object.prototype;var L=w.toString,da=w.hasOwnProperty,fa=Array.prototype.splice,z=!!("undefined"!==typeof window&&navigator&&\n
document),$=!z&&"undefined"!==typeof importScripts,ha=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,V="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),C={},q={},R=[],O=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(I(requirejs))return;q=requirejs;requirejs=void 0}"undefined"!==typeof require&&!I(require)&&(q=require,require=void 0);l=requirejs=function(b,c,d,y){var g,h="_";!J(b)&&"string"!==typeof b&&(g=b,J(c)?(b=c,c=d,d=y):b=[]);\n
g&&g.context&&(h=g.context);(y=i(C,h))||(y=C[h]=l.s.newContext(h));g&&y.configure(g);return y.require(b,c,d)};l.config=function(b){return l(b)};l.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=l);l.version="2.1.4";l.jsExtRegExp=/^\\/|:|\\?|\\.js$/;l.isBrowser=z;w=l.s={contexts:C,newContext:ea};l({});x(["toUrl","undef","defined","specified"],function(b){l[b]=function(){var c=C._;return c.require[b].apply(c,arguments)}});if(z&&(B=w.head=document.getElementsByTagName("head")[0],\n
D=document.getElementsByTagName("base")[0]))B=w.head=D.parentNode;l.onError=function(b){throw b;};l.load=function(b,c,d){var i=b&&b.config||{},g;if(z)return g=i.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),g.type=i.scriptType||"text/javascript",g.charset="utf-8",g.async=!0,g.setAttribute("data-requirecontext",b.contextName),g.setAttribute("data-requiremodule",c),g.attachEvent&&!(g.attachEvent.toString&&0>g.attachEvent.toString().indexOf("[native code"))&&\n
!V?(O=!0,g.attachEvent("onreadystatechange",b.onScriptLoad)):(g.addEventListener("load",b.onScriptLoad,!1),g.addEventListener("error",b.onScriptError,!1)),g.src=d,K=g,D?B.insertBefore(g,D):B.appendChild(g),K=null,g;$&&(importScripts(d),b.completeLoad(c))};z&&M(document.getElementsByTagName("script"),function(b){B||(B=b.parentNode);if(s=b.getAttribute("data-main"))return q.baseUrl||(H=s.split("/"),ba=H.pop(),ca=H.length?H.join("/")+"/":"./",q.baseUrl=ca,s=ba),s=s.replace(aa,""),q.deps=q.deps?q.deps.concat(s):\n
[s],!0});define=function(b,c,d){var i,g;"string"!==typeof b&&(d=c,c=b,b=null);J(c)||(d=c,c=[]);!c.length&&I(d)&&d.length&&(d.toString().replace(ia,"").replace(ja,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c));if(O){if(!(i=K))P&&"interactive"===P.readyState||M(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return P=b}),i=P;i&&(b||(b=i.getAttribute("data-requiremodule")),g=C[i.getAttribute("data-requirecontext")])}(g?\n
g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};l.exec=function(b){return eval(b)};l(q)}})(this);\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>14629</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>require.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts62728561.31</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>route.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global window, jQuery */\n
/*!\n
* route.js v1.0.0\n
*\n
* Copyright 2012, Romain Courteaud\n
* Dual licensed under the MIT or GPL Version 2 licenses.\n
*\n
* Date: Mon Jul 16 2012\n
*/\n
"use strict";\n
(function (window, $) {\n
\n
$.extend({\n
StatelessDeferred: function () {\n
var doneList = $.Callbacks("memory"),\n
promise = {\n
done: doneList.add,\n
\n
// Get a promise for this deferred\n
// If obj is provided, the promise aspect is added to the object\n
promise: function (obj) {\n
var i,\n
keys = [\'done\', \'promise\'];\n
if (obj === undefined) {\n
obj = promise;\n
} else {\n
for (i = 0; i < keys.length; i += 1) {\n
obj[keys[i]] = promise[keys[i]];\n
}\n
}\n
return obj;\n
}\n
},\n
deferred = promise.promise({});\n
\n
deferred.resolveWith = doneList.fireWith;\n
\n
// All done!\n
return deferred;\n
}\n
});\n
\n
var routes = [],\n
current_priority = 0,\n
methods = {\n
add: function (pattern, priority) {\n
var i = 0,\n
inserted = false,\n
length = routes.length,\n
dfr = $.StatelessDeferred(),\n
context = $(this),\n
escapepattern,\n
matchingpattern;\n
\n
if (priority === undefined) {\n
priority = 0;\n
}\n
if (pattern !== undefined) {\n
\n
// http://simonwillison.net/2006/Jan/20/escape/\n
escapepattern = pattern.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, "\\\\$&");\n
matchingpattern = escapepattern\n
.replace(/<int:\\w+>/g, "(\\\\d+)")\n
.replace(/<path:\\w+>/g, "(.+)")\n
.replace(/<\\w+>/g, "([^/]+)");\n
\n
while (!inserted) {\n
if ((i === length) || (priority >= routes[i][2])) {\n
routes.splice(i, 0, [new RegExp(\'^\' + matchingpattern + \'$\'), dfr, priority, context]);\n
inserted = true;\n
} else {\n
i += 1;\n
}\n
}\n
}\n
return dfr.promise();\n
},\n
go: function (path, min_priority) {\n
var dfr = $.Deferred(),\n
context = $(this),\n
result;\n
\n
if (min_priority === undefined) {\n
min_priority = 0;\n
}\n
setTimeout(function () {\n
var i = 0,\n
found = false,\n
slice_index = -1,\n
slice_priority = -1;\n
for (i = 0; i < routes.length; i += 1) {\n
if (slice_priority !== routes[i][2]) {\n
slice_priority = routes[i][2];\n
slice_index = i;\n
}\n
if (routes[i][2] < min_priority) {\n
break;\n
} else if (routes[i][0].test(path)) {\n
result = routes[i][0].exec(path);\n
dfr = routes[i][1];\n
context = routes[i][3];\n
current_priority = routes[i][2];\n
found = true;\n
break;\n
}\n
}\n
if (i === routes.length) {\n
slice_index = i;\n
}\n
if (slice_index > -1) {\n
routes = routes.slice(slice_index);\n
}\n
if (found) {\n
dfr.resolveWith(\n
context,\n
result.slice(1)\n
);\n
} else {\n
dfr.rejectWith(context);\n
}\n
});\n
return dfr.promise();\n
},\n
};\n
\n
\n
$.routereset = function () {\n
routes = [];\n
current_priority = 0;\n
};\n
\n
$.routepriority = function () {\n
return current_priority;\n
};\n
\n
$.fn.route = function (method) {\n
var result;\n
if (methods.hasOwnProperty(method)) {\n
result = methods[method].apply(\n
this,\n
Array.prototype.slice.call(arguments, 1)\n
);\n
} else {\n
$.error(\'Method \' + method +\n
\' does not exist on jQuery.route\');\n
}\n
return result;\n
};\n
\n
}(window, jQuery));\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3939</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>route.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts62728569.21</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>url.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*!\n
* url.js v1.0.0\n
*\n
* Copyright 2012, Romain Courteaud\n
* Dual licensed under the MIT or GPL Version 2 licenses.\n
*\n
* Date: Mon Jul 16 2012\n
*/\n
"use strict";\n
(function (window, $) {\n
\n
var hashchangeinitialized = false,\n
previousurl,\n
currentcallback,\n
getRawHash = function () {\n
return window.location.toString().split(\'#\')[1];\n
},\n
callbackwrapper = function () {\n
if (previousurl !== window.location.hash) {\n
previousurl = window.location.hash;\n
if (currentcallback !== undefined) {\n
currentcallback();\n
}\n
}\n
},\n
timeoutwrapper = function () {\n
callbackwrapper();\n
window.setTimeout(timeoutwrapper, 500);\n
};\n
\n
function UrlHandler() {}\n
\n
UrlHandler.prototype = {\n
\'generateUrl\': function (path, options) {\n
var pathhash,\n
hash = \'#\',\n
key;\n
if (path !== undefined) {\n
hash += encodeURIComponent(path);\n
}\n
hash = hash.replace(/%2F/g, \'/\');\n
pathhash = hash;\n
for (key in options) {\n
if (options.hasOwnProperty(key)) {\n
if (hash === pathhash) {\n
hash = hash + \'?\';\n
} else {\n
hash = hash + \'&\';\n
}\n
hash += encodeURIComponent(key) +\n
\'=\' + encodeURIComponent(options[key]);\n
}\n
}\n
return hash;\n
},\n
\n
\'go\': function (path, options) {\n
window.location.hash = this.generateUrl(path, options);\n
},\n
\n
\'redirect\': function (path, options) {\n
var host = window.location.protocol + \'//\' +\n
window.location.host +\n
window.location.pathname +\n
window.location.search;\n
window.location.replace(host + this.generateUrl(path, options));\n
// window.location.replace(window.location.href.replace(/#.*/, ""));\n
},\n
\n
\'getPath\': function () {\n
var hash = getRawHash(),\n
result = \'\';\n
if (hash !== undefined) {\n
result = decodeURIComponent(hash.split(\'?\')[0]);\n
}\n
return result;\n
},\n
\n
\'getOptions\': function () {\n
var options = {},\n
hash = getRawHash(),\n
subhashes,\n
subhash,\n
index,\n
keyvalue;\n
if (hash !== undefined) {\n
hash = hash.split(\'?\')[1];\n
if (hash !== undefined) {\n
subhashes = hash.split(\'&\');\n
for (index in subhashes) {\n
if (subhashes.hasOwnProperty(index)) {\n
subhash = subhashes[index];\n
if (subhash !== \'\') {\n
keyvalue = subhash.split(\'=\');\n
if (keyvalue.length === 2) {\n
options[decodeURIComponent(keyvalue[0])] =\n
decodeURIComponent(keyvalue[1]);\n
}\n
}\n
}\n
}\n
}\n
}\n
return options;\n
},\n
\n
\'onhashchange\': function (callback) {\n
previousurl = undefined;\n
currentcallback = callback;\n
\n
if (!hashchangeinitialized) {\n
if (window.onhashchange !== undefined) {\n
$(window).bind(\'hashchange\', callbackwrapper);\n
window.setTimeout(callbackwrapper);\n
} else {\n
timeoutwrapper();\n
}\n
hashchangeinitialized = true;\n
}\n
},\n
};\n
\n
// Expose to the global object\n
$.url = new UrlHandler();\n
\n
}(window, jQuery));\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3293</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>url.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
</div>\n </div>\n
</tal:block>\n </tal:block>\n
\n \n
<!-- XXX add portal_status_message gadget -->\n
<div tal:content="request/portal_status_message | nothing" id="transition_message"\n <div tal:content="request/portal_status_message | nothing" id="transition_message"\n
class="transition_message"/>\n class="transition_message"/>\n
\n \n
......
...@@ -34,128 +34,114 @@ ...@@ -34,128 +34,114 @@
</item> </item>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <unicode>\074tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n <value> <unicode encoding="cdata"><![CDATA[
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\076\n xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
\074tal:block tal:replace="nothing"\076\n <tal:block tal:replace="nothing">\n
\074!--\n <!--\n
IDEAS:\n IDEAS:\n
- Add callbacks to ERP5Form object (selection ?) to gather needed fields -\076 put them in http_parameter_list.\n - Add callbacks to ERP5Form object (selection ?) to gather needed fields -> put them in http_parameter_list.\n
--\076\n -->\n
\074/tal:block\076\n </tal:block>\n
\074tal:block metal:define-macro="master"\076\n <tal:block metal:define-macro="master">\n
\074tal:block tal:define="global_definitions_macros here/global_definitions/macros;\n <tal:block tal:define="global_definitions_macros here/global_definitions/macros;\n
subject_list subject_list | python:here.getProperty(\'subject_list\', []) or []"\076\n subject_list subject_list | python:here.getProperty(\'subject_list\', []) or []">\n
\074tal:block metal:use-macro="global_definitions_macros/header_definitions" /\076\n <tal:block metal:use-macro="global_definitions_macros/header_definitions" />\n
\074!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\076\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n
\074html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"\076\n <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n
\074head\076\n <head>\n
\074base tal:attributes="href python: \'%s/\' % (url, )" /\076\n <base tal:attributes="href python: \'%s/\' % (url, )" />\n
\074meta name="generator" content="ERP5 - Copyright (C) 2001 - 2008. All rights reserved." /\076\n <meta name="generator" content="ERP5 - Copyright (C) 2001 - 2008. All rights reserved." />\n
\074meta name="description" content=""\n <meta name="description" content=""\n
tal:attributes="content description | title | string:ERP5 Free Open Source ERP and CRM" /\076\n tal:attributes="content description | title | string:ERP5 Free Open Source ERP and CRM" />\n
\074meta name="keywords" content=""\n <meta name="keywords" content=""\n
tal:attributes="content python:\', \'.join(subject_list)" /\076\n tal:attributes="content python:\', \'.join(subject_list)" />\n
\074meta name="robots" content="index, follow" /\076\n <meta name="robots" content="index, follow" />\n
\074meta http-equiv="Content-Type" content="text/html; charset=utf-8" /\076\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n
\074meta http-equiv="Content-Script-Type" content="text/javascript" /\076\n <meta http-equiv="Content-Script-Type" content="text/javascript" />\n
\074meta http-equiv="Content-Style-Type" content="text/css" /\076\n <meta http-equiv="Content-Style-Type" content="text/css" />\n
\074title tal:define="title title | string:ERP5;\n <title tal:define="title title | string:ERP5;\n
header_title header_title | nothing"\n header_title header_title | nothing"\n
tal:content="python:header_title or \'%s | %s\' % (title, here.getPortalObject().title_or_id())"\076\074/title\076\n tal:content="python:header_title or \'%s | %s\' % (title, here.getPortalObject().title_or_id())"></title>\n
\074tal:block tal:repeat="css css_list"\076\n <tal:block tal:repeat="css css_list">\n
\074link tal:attributes="href css" type="text/css" rel="stylesheet" /\076\n <link tal:attributes="href css" type="text/css" rel="stylesheet" />\n
\074/tal:block\076\n </tal:block>\n
\074tal:block tal:replace="nothing"\076\n <tal:block tal:replace="nothing">\n
\074!-- Render each field\'s css and javascript. --\076\n <!-- Render each field\'s css and javascript. -->\n
\074/tal:block\076\n </tal:block>\n
\074tal:block tal:condition="python: form is not None"\076\n <tal:block tal:condition="python: form is not None">\n
\074tal:block tal:repeat="group python: [x for x in form.get_groups(include_empty=0) if x != \'hidden\']"\076\n <tal:block tal:repeat="group python: [x for x in form.get_groups(include_empty=0) if x != \'hidden\']">\n
\074tal:block tal:repeat="field python: form.get_fields_in_group(group)"\076\n <tal:block tal:repeat="field python: form.get_fields_in_group(group)">\n
\074tal:block tal:define="css python: field.render_css(REQUEST=request)"\076\n <tal:block tal:define="css python: field.render_css(REQUEST=request)">\n
\074style tal:condition="python: css is not None"\n <style tal:condition="python: css is not None"\n
tal:content="css"\n tal:content="css"\n
tal:attributes="type python:\'text/css\'"\076\n tal:attributes="type python:\'text/css\'">\n
\074/style\076\n </style>\n
\074/tal:block\076\n </tal:block>\n
\074tal:block tal:define="dummy python: js_list.extend(field.get_javascript_list(REQUEST=request))" /\076\n <tal:block tal:define="dummy python: js_list.extend(field.get_javascript_list(REQUEST=request))" />\n
\074/tal:block\076\n </tal:block>\n
\074/tal:block\076\n </tal:block>\n
\074/tal:block\076\n </tal:block>\n
\074tal:block tal:repeat="js js_list"\076\n
\074script tal:attributes="src js" type="text/javascript"\076\074/script\076\n
\074/tal:block\076\n
\n \n
\074!-- RenderJs added libraries (WIP, XXX: use requirejs) --\076\n <link rel="stylesheet" type="text/css" media="screen" href="gadget-style.css" />\n
\074script src="jquery/ui/js/jquery-ui.js" type="text/javascript"\076\074/script\076\n <link rel="stylesheet" type="text/css" media="screen" href="jquery/plugin/jqgrid/ui.jqgrid.css" />\n
\074link rel="stylesheet" type="text/css" media="screen" href="gadget-style.css" /\076\n <link rel="stylesheet" type="text/css" media="screen" href="jquery/ui/css/erp5-theme/jquery-ui.css" />\n
\074link rel="stylesheet" type="text/css" media="screen" href="jquery/plugin/jqgrid/ui.jqgrid.css" /\076\n
\074link rel="stylesheet" type="text/css" media="screen" href="jquery/ui/css/erp5-theme/jquery-ui.css" /\076\n
\074script type="text/javascript" src="jquery/plugin/jqgrid/i18n/grid.locale-en.js"\076\074/script\076\n
\074script type="text/javascript" src="jquery/plugin/jqgrid/jquery.jqGrid.src.js"\076\074/script\076\n
\074!--[if IE]\076\n
\074script type="text/javascript" src="jquery/plugin/jstorage/jquery.json-2.3.js"\076\074/script\076\n
\074!--\074![endif]--\076\n
\074script src="jquery/plugin/renderjs/renderjs.js"\076\074/script\076\n
\074script src="erp5_form.js"\076\074/script\076\n
\n \n
\074script type="text/javascript" language="javascript"\076\n <script data-main="lib/require-erp5.js"\n
//\074![CDATA[\n type="text/javascript"\n
$(document).ready(function() {\n src="lib/require.js"></script>\n
// we need to explicitly fire it\n
RenderJs.init();\n
});\n
//]]\076\n
\074/script\076\n
\n \n
\074link rel="icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" /\076\n <link rel="icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />\n
\074link rel="shortcut icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" /\076\n <link rel="shortcut icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />\n
\074tal:block metal:define-slot="head"\076\n <tal:block metal:define-slot="head">\n
\074!-- this is a placeholder for different extensions to head which could be required by web themes --\076\n <!-- this is a placeholder for different extensions to head which could be required by web themes -->\n
\074/tal:block\076\n </tal:block>\n
\074/head\076\n </head>\n
\074body tal:attributes="class body_css_class|nothing"\076\n <body tal:attributes="class body_css_class|nothing">\n
\074form id="main_form"\n <form id="main_form"\n
class="main_form"\n class="main_form"\n
onsubmit="changed=false; return true"\n onsubmit="changed=false; return true"\n
tal:attributes="enctype enctype | form/Form_getEnctype | nothing;\n tal:attributes="enctype enctype | form/Form_getEnctype | nothing;\n
action url;\n action url;\n
method python:str(path(\'form/method | string:post\')).lower()"\076\n method python:str(path(\'form/method | string:post\')).lower()">\n
\074fieldset id="hidden_fieldset" class="hidden_fieldset"\076\n <fieldset id="hidden_fieldset" class="hidden_fieldset">\n
\074input tal:condition="form_action | nothing"\n <input tal:condition="form_action | nothing"\n
id="hidden_button" class="hidden_button" type="submit" value="dummy"\n id="hidden_button" class="hidden_button" type="submit" value="dummy"\n
tal:attributes="name string:${form_action}:method" /\076\n tal:attributes="name string:${form_action}:method" />\n
\074tal:block metal:use-macro="global_definitions_macros/http_definitions" /\076\n <tal:block metal:use-macro="global_definitions_macros/http_definitions" />\n
\074/fieldset\076\n </fieldset>\n
\074tal:block metal:define-slot="layout"\076\n <tal:block metal:define-slot="layout">\n
\n \n
\074div id="bars" class="bars"\076\n <div id="bars" class="bars">\n
\n \n
\074div id="main_bar"\n <div id="main_bar"\n
data-gadget="ERP5Site_renderCachedNavigationBox"\076\074/div\076\n data-gadget="ERP5Site_renderCachedNavigationBox"></div>\n
\n \n
\074!-- XXX: make a gadget --\076\n <div id="context_bar" class="context_bar">\n
\074div id="context_bar" class="context_bar"\076\n <tal:block metal:define-slot="context_bar" />\n
\074tal:block metal:define-slot="context_bar" /\076\n </div>\n
\074/div\076\n
\n \n
\074/div\076\n </div>\n
\n \n
\074div id="status"\n <div id="status"\n
class="status"\n class="status"\n
data-gadget="status_gadget"\076\074/div\076\n data-gadget="status_gadget"></div>\n
\n \n
\074div id="master" class="master"\076\n <div id="master" class="master">\n
\074tal:block metal:define-slot="main" /\076\n <tal:block metal:define-slot="main" />\n
\074/div\076\n </div>\n
\n \n
\074/tal:block\076\n </tal:block>\n
\074/form\076\n </form>\n
\074/body\076\n </body>\n
\074/html\076\n </html>\n
\074/tal:block\076\n </tal:block>\n
\074/tal:block\076\n </tal:block>\n
\074/tal:block\076</unicode> </value> </tal:block>
]]></unicode> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
16 17
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment