Commit fa144eee authored by Romain Courteaud's avatar Romain Courteaud

Drop erp5_xhtml_gadget_style

It is now replaced by erp5_web_renderjs_ui
parent 4774f87a
<?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>renderjs</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*! RenderJs v0.2 */
/*global console, require, $, localStorage, document, jIO */
/*jslint evil: true, white: true */
"use strict";
/*
* RenderJs - Generic Gadget library renderer.
* http://www.renderjs.org/documentation
*/
// by default RenderJs will render all gadgets when page is loaded
// still it's possible to override this and use explicit gadget rendering
var RENDERJS_ENABLE_IMPLICIT_GADGET_RENDERING = true;
// by default RenderJs will examine and bind all interaction gadgets
// available
var RENDERJS_ENABLE_IMPLICIT_INTERACTION_BIND = true;
// by default RenderJs will examine and create all routes
var RENDERJS_ENABLE_IMPLICIT_ROUTE_CREATE = true;
// fallback for IE
if (console === undefined || console.log === undefined) {
var console = {};
console.log = function () {};
}
var RenderJs = (function () {
// a variable indicating if current gadget loading is over or not
var is_ready = false, current_gadget;
function setSelfGadget (gadget) {
/*
* Only used internally to set current gadget being executed.
*/
current_gadget = gadget;
}
return {
init: function () {
/*
* Do all initialization
*/
if (RENDERJS_ENABLE_IMPLICIT_GADGET_RENDERING) {
RenderJs.bootstrap($('body'));
}
var root_gadget = RenderJs.GadgetIndex.getRootGadget();
if (RENDERJS_ENABLE_IMPLICIT_INTERACTION_BIND||RENDERJS_ENABLE_IMPLICIT_ROUTE_CREATE) {
// We might have a page without gadgets.
// Be careful, right now we can be in this case because
// asynchronous gadget loading is not finished
if (root_gadget !== undefined) {
RenderJs.bindReady(
function () {
if (RENDERJS_ENABLE_IMPLICIT_INTERACTION_BIND) {
// examine all Intaction Gadgets and bind accordingly
RenderJs.InteractionGadget.init();
}
if (RENDERJS_ENABLE_IMPLICIT_ROUTE_CREATE) {
// create all routes between gadgets
RenderJs.RouteGadget.init();
}
});
}
}
},
bootstrap: function (root) {
/*
* Load all gadgets for this DOM element
* (including recursively contained ones)
*/
var gadget_id, is_gadget;
gadget_id = root.attr("id");
is_gadget = root.attr("data-gadget") !== undefined;
// this will make RenderJs fire "ready" event when all gadgets are loaded.
RenderJs.setReady(false);
if (is_gadget && gadget_id !== undefined ) {
// bootstart root gadget only if it is indeed a gadget
RenderJs.loadGadget(root);
}
RenderJs.loadRecursiveGadget(root);
},
loadRecursiveGadget: function (root) {
/*
* Load all contained gadgets inside passed DOM element.
*/
var gadget_list, gadget, gadget_id, gadget_js;
gadget_list = root.find("[data-gadget]");
// register all gadget in advance so checkAndTriggerReady
// can have accurate information for list of all gadgets
gadget_list.each(function () {
gadget = $(this);
gadget_id = gadget.attr("id");
gadget_js = new RenderJs.Gadget(gadget_id, gadget);
RenderJs.GadgetIndex.registerGadget(gadget_js);
});
// Load chilren
gadget_list.each(function () {
RenderJs.loadGadget($(this));
});
},
setGadgetAndRecurse: function (gadget, data) {
/*
* Set gadget data and recursively load it in case it holds another
* gadgets.
*/
// set current gadget as being loaded so gadget instance itself knows which gadget it is
setSelfGadget(RenderJs.GadgetIndex.getGadgetById(gadget.attr("id")));
gadget.append(data);
// reset as no longer current gadget
setSelfGadget(undefined);
// a gadget may contain sub gadgets
RenderJs.loadRecursiveGadget(gadget);
},
getSelfGadget: function () {
/*
* Get current gadget being loaded
* This function must be used with care as it relies on Javascript nature of being a single
* threaded application. Currently current gadget is set in a global RenderJs variable
* before its HTML is inserted into DOM and if multiple threads were running (which is not the case currently)
* this could lead to reace conditions and unreliable getSelfGadget results.
* Additionally this function is available only at gadget's script load time - i.e.
* it can't be used in after that calls. In this case gagdget can save this value internally.
*/
return current_gadget;
},
loadGadget: function (gadget) {
/*
* Load gadget's SPECs from URL
*/
var url, gadget_id, gadget_property, cacheable, cache_id,
i, gadget_index, gadget_index_id,
app_cache, data, gadget_js, is_update_gadget_data_running;
url = gadget.attr("data-gadget");
gadget_id = gadget.attr("id");
gadget_js = RenderJs.GadgetIndex.getGadgetById(gadget_id);
gadget_index = RenderJs.GadgetIndex.getGadgetList();
if (gadget_js === undefined) {
// register gadget in javascript namespace if not already registered
gadget_js = new RenderJs.Gadget(gadget_id, gadget);
RenderJs.GadgetIndex.registerGadget(gadget_js);
}
if (gadget_js.isReady()) {
// avoid loading again gadget which was loaded before in same page
return ;
}
// update Gadget's instance with contents of "data-gadget-property"
gadget_property = gadget.attr("data-gadget-property");
if (gadget_property !== undefined) {
gadget_property = $.parseJSON(gadget_property);
$.each(gadget_property, function (key, value) {
gadget_js[key] = value;
});
}
if (url !== undefined && url !== "") {
cacheable = gadget.attr("data-gadget-cacheable");
cache_id = gadget.attr("data-gadget-cache-id");
if (cacheable !== undefined && cache_id !== undefined) {
cacheable = Boolean(parseInt(cacheable, 10));
}
//cacheable = false ; // to develop faster
if (cacheable) {
// get from cache if possible, use last part from URL as
// cache_key
app_cache = RenderJs.Cache.get(cache_id, undefined);
if (app_cache === undefined || app_cache === null) {
// not in cache so we pull from network and cache
$.ajax({
url: url,
yourCustomData: {
"gadget_id": gadget_id,
"cache_id": cache_id
},
success: function (data) {
cache_id = this.yourCustomData.cache_id;
gadget_id = this.yourCustomData.gadget_id;
RenderJs.Cache.set(cache_id, data);
RenderJs.GadgetIndex.getGadgetById(gadget_id).
setReady();
RenderJs.setGadgetAndRecurse(gadget, data);
RenderJs.checkAndTriggerReady();
RenderJs.updateGadgetData(gadget);
}
});
} else {
// get from cache
data = app_cache;
gadget_js.setReady();
this.setGadgetAndRecurse(gadget, data);
this.checkAndTriggerReady();
RenderJs.updateGadgetData(gadget);
}
} else {
// not to be cached
$.ajax({
url: url,
yourCustomData: {"gadget_id": gadget_id},
success: function (data) {
gadget_id = this.yourCustomData.gadget_id;
RenderJs.GadgetIndex.getGadgetById(gadget_id).
setReady();
RenderJs.setGadgetAndRecurse(gadget, data);
RenderJs.checkAndTriggerReady();
RenderJs.updateGadgetData(gadget);
}
});
}
}
else {
// gadget is an inline (InteractorGadget or one using
// data-gadget-source / data-gadget-handler) so no need
// to load it from network
is_update_gadget_data_running = RenderJs.updateGadgetData(gadget);
if (!is_update_gadget_data_running) {
// no update is running so gadget is basically ready
// if update is running then it should take care and set status
gadget_js.setReady();
}
RenderJs.checkAndTriggerReady();
}
},
isReady: function () {
/*
* Get rendering status
*/
return is_ready;
},
setReady: function (value) {
/*
* Update rendering status
*/
is_ready = value;
},
bindReady: function (ready_function) {
/*
* Bind a function on ready gadget loading.
*/
$("body").one("ready", ready_function);
},
checkAndTriggerReady: function () {
/*
* Trigger "ready" event only if all gadgets were marked as "ready"
*/
var is_gadget_list_loaded;
is_gadget_list_loaded = RenderJs.GadgetIndex.isGadgetListLoaded();
if (is_gadget_list_loaded) {
if (!RenderJs.isReady()) {
// backwards compatability with already written code
RenderJs.GadgetIndex.getRootGadget().getDom().
trigger("ready");
// trigger ready on root body element
$("body").trigger("ready");
// this set will make sure we fire this event only once
RenderJs.setReady(true);
}
}
return is_gadget_list_loaded;
},
updateGadgetData: function (gadget) {
/*
* Gadget can be updated from "data-gadget-source" (i.e. a json)
* and "data-gadget-handler" attributes (i.e. a namespace Javascript)
*/
var data_source, data_handler;
data_source = gadget.attr("data-gadget-source");
data_handler = gadget.attr("data-gadget-handler");
// acquire data and pass it to method handler
if (data_source !== undefined && data_source !== "") {
$.ajax({
url: data_source,
dataType: "json",
yourCustomData: {"data_handler": data_handler,
"gadget_id": gadget.attr("id")},
success: function (result) {
var data_handler, gadget_id;
data_handler = this.yourCustomData.data_handler;
gadget_id = this.yourCustomData.gadget_id;
if (data_handler !== undefined) {
// eval is not nice to use
eval(data_handler + "(result)");
gadget = RenderJs.GadgetIndex.getGadgetById(gadget_id);
// mark gadget as loaded and fire a check
// to see if all gadgets are loaded
gadget.setReady();
RenderJs.checkAndTriggerReady();
}
}
});
// asynchronous update happens and respective thread will update status
return true;
}
return false;
},
addGadget: function (dom_id, gadget_id, gadget, gadget_data_handler,
gadget_data_source, bootstrap) {
/*
* add new gadget and render it
*/
var html_string, tab_container, tab_gadget;
tab_container = $('#' + dom_id);
tab_container.empty();
html_string = [
'<div id="' + gadget_id + '"',
'data-gadget="' + gadget + '"',
'data-gadget-handler="' + gadget_data_handler + '" ',
'data-gadget-source="' + gadget_data_source + '"></div>'
].join('\n');
tab_container.append(html_string);
tab_gadget = tab_container.find('#' + gadget_id);
// render new gadget
if (bootstrap !== false) {
RenderJs.bootstrap(tab_container);
}
return tab_gadget;
},
Cache: (function () {
/*
* Generic cache implementation that can fall back to local
* namespace storage if no "modern" storage like localStorage
* is available
*/
return {
ROOT_CACHE_ID: 'APP_CACHE',
getCacheId: function (cache_id) {
/*
* We should have a way to 'purge' localStorage by setting a
* ROOT_CACHE_ID in all browser instances
*/
return this.ROOT_CACHE_ID + cache_id;
},
hasLocalStorage: function () {
/*
* Feature test if localStorage is supported
*/
var mod;
mod = 'localstorage_test_12345678';
try {
localStorage.setItem(mod, mod);
localStorage.removeItem(mod);
return true;
} catch (e) {
return false;
}
},
get: function (cache_id, default_value) {
/* Get cache key value */
cache_id = this.getCacheId(cache_id);
if (this.hasLocalStorage()) {
return this.LocalStorageCachePlugin.
get(cache_id, default_value);
}
//fallback to javscript namespace cache
return this.NameSpaceStorageCachePlugin.
get(cache_id, default_value);
},
set: function (cache_id, data) {
/* Set cache key value */
cache_id = this.getCacheId(cache_id);
if (this.hasLocalStorage()) {
this.LocalStorageCachePlugin.set(cache_id, data);
} else {
this.NameSpaceStorageCachePlugin.set(cache_id, data);
}
},
LocalStorageCachePlugin: (function () {
/*
* This plugin saves using HTML5 localStorage.
*/
return {
get: function (cache_id, default_value) {
/* Get cache key value */
if (localStorage.getItem(cache_id) !== null) {
return JSON.parse(localStorage.getItem(cache_id));
}
return default_value;
},
set: function (cache_id, data) {
/* Set cache key value */
localStorage.setItem(cache_id, JSON.stringify(data));
}
};
}()),
NameSpaceStorageCachePlugin: (function () {
/*
* This plugin saves within current page namespace.
*/
var namespace = {};
return {
get: function (cache_id, default_value) {
/* Get cache key value */
return namespace[cache_id];
},
set: function (cache_id, data) {
/* Set cache key value */
namespace[cache_id] = data;
}
};
}())
};
}()),
Gadget: function (gadget_id, dom) {
/*
* Javascript Gadget representation
*/
this.id = gadget_id;
this.dom = dom;
this.is_ready = false;
this.getId = function () {
return this.id;
};
this.getDom = function () {
return this.dom;
};
this.isReady = function () {
/*
* Return True if remote gadget is loaded into DOM.
*/
return this.is_ready;
};
this.setReady = function () {
/*
* Return True if remote gadget is loaded into DOM.
*/
this.is_ready = true;
};
this.remove = function () {
/*
* Remove gadget (including its DOM element).
*/
var gadget;
// unregister root from GadgetIndex
RenderJs.GadgetIndex.unregisterGadget(this);
// gadget might contain sub gadgets so before remove entire
// DOM we must unregister them from GadgetIndex
this.getDom().find("[data-gadget]").each( function () {
gadget = RenderJs.GadgetIndex.getGadgetById($(this).attr("id"));
RenderJs.GadgetIndex.unregisterGadget(gadget);
});
// remove root's entire DOM element
$(this.getDom()).remove();
};
},
TabbularGadget: (function () {
/*
* Generic tabular gadget
*/
var gadget_list = [];
return {
toggleVisibility: function (visible_dom) {
/*
* Set tab as active visually and mark as not active rest.
*/
$(".selected").addClass("not_selected");
$(".selected").removeClass("selected");
visible_dom.addClass("selected");
visible_dom.removeClass("not_selected");
},
addNewTabGadget: function (dom_id, gadget_id, gadget, gadget_data_handler,
gadget_data_source, bootstrap) {
/*
* add new gadget and render it
*/
var tab_gadget;
tab_gadget = RenderJs.addGadget(
dom_id, gadget_id, gadget, gadget_data_handler, gadget_data_source, bootstrap
);
// we should unregister all gadgets part of this TabbularGadget
$.each(gadget_list,
function (index, gadget_id) {
var gadget = RenderJs.GadgetIndex.getGadgetById(gadget_id);
gadget.remove();
// update list of root gadgets inside TabbularGadget
gadget_list.splice($.inArray(gadget_id, gadget_list), 1);
}
);
// add it as root gadget
gadget_list.push(tab_gadget.attr("id"));
}
};
}()),
GadgetIndex: (function () {
/*
* Generic gadget index placeholder
*/
var gadget_list = [];
return {
getGadgetIdListFromDom: function (dom) {
/*
* Get list of all gadget's ID from DOM
*/
var gadget_id_list = [];
$.each(dom.find('[data-gadget]'),
function (index, value) {
gadget_id_list.push($(value).attr("id"));}
);
return gadget_id_list;
},
setGadgetList: function (gadget_list_value) {
/*
* Set list of registered gadgets
*/
gadget_list = gadget_list_value;
},
getGadgetList: function () {
/*
* Return list of registered gadgets
*/
return gadget_list;
},
registerGadget: function (gadget) {
/*
* Register gadget
*/
if (RenderJs.GadgetIndex.getGadgetById(gadget.id) === undefined) {
// register only if not already added
gadget_list.push(gadget);
}
},
unregisterGadget: function (gadget) {
/*
* Unregister gadget
*/
var index = $.inArray(gadget, gadget_list);
if (index !== -1) {
gadget_list.splice(index, 1);
}
},
getGadgetById: function (gadget_id) {
/*
* Get gadget javascript representation by its Id
*/
var gadget;
gadget = undefined;
$(RenderJs.GadgetIndex.getGadgetList()).each(
function (index, value) {
if (value.getId() === gadget_id) {
gadget = value;
}
}
);
return gadget;
},
getRootGadget: function () {
/*
* Return root gadget (always first one in list)
*/
return this.getGadgetList()[0];
},
isGadgetListLoaded: function () {
/*
* Return True if all gadgets were loaded from network or
* cache
*/
var result;
result = true;
$(this.getGadgetList()).each(
function (index, value) {
if (value.isReady() === false) {
result = false;
}
}
);
return result;
}
};
}()),
GadgetCatalog : (function () {
/*
* Gadget catalog provides API to get list of gadgets from a repository
*/
var cache_id = "setGadgetIndexUrlList";
function updateGadgetIndexFromURL(url) {
// split to base and document url
var url_list = url.split('/'),
document_url = url_list[url_list.length-1],
d = url_list.splice($.inArray(document_url, url_list), 1),
base_url = url_list.join('/'),
web_dav = jIO.newJio({
"type": "dav",
"username": "",
"password": "",
"url": base_url});
web_dav.get(document_url,
function (err, response) {
RenderJs.Cache.set(url, response);
});
}
return {
updateGadgetIndex: function () {
/*
* Update gadget index from all configured remote repositories.
*/
$.each(RenderJs.GadgetCatalog.getGadgetIndexUrlList(),
function(index, value) {
updateGadgetIndexFromURL(value);
});
},
setGadgetIndexUrlList: function (url_list) {
/*
* Set list of Gadget Index repositories.
*/
// store in Cache (html5 storage)
RenderJs.Cache.set(cache_id, url_list);
},
getGadgetIndexUrlList: function () {
/*
* Get list of Gadget Index repositories.
*/
// get from Cache (html5 storage)
return RenderJs.Cache.get(cache_id, undefined);
},
getGadgetListThatProvide: function (service) {
/*
* Return list of all gadgets that providen a given service.
* Read this list from data structure created in HTML5 local
* storage by updateGadgetIndexFromURL
*/
// get from Cache stored index and itterate over it
// to find matching ones
var gadget_list = [];
$.each(RenderJs.GadgetCatalog.getGadgetIndexUrlList(),
function(index, url) {
// get repos from cache
var cached_repo = RenderJs.Cache.get(url);
$.each(cached_repo.gadget_list,
function(index, gadget) {
if ($.inArray(service, gadget.service_list) > -1) {
// gadget provides a service, add to list
gadget_list.push(gadget);
}
}
);
});
return gadget_list;
},
registerServiceList: function (gadget, service_list) {
/*
* Register a service provided by a gadget.
*/
}
};
}()),
InteractionGadget : (function () {
/*
* Basic gadget interaction gadget implementation.
*/
return {
init: function (force) {
/*
* Inspect DOM and initialize this gadget
*/
var dom_list, gadget_id;
if (force===1) {
// we explicitly want to re-init elements even if already this is done before
dom_list = $("div[data-gadget-connection]");
}
else {
// XXX: improve and save 'bound' on javascript representation of a gadget not DOM
dom_list = $("div[data-gadget-connection]")
.filter(function() { return $(this).data("bound") !== true; })
.data('bound', true );
}
dom_list.each(function (index, element) {
RenderJs.InteractionGadget.bind($(element));});
},
bind: function (gadget_dom) {
/*
* Bind event between gadgets.
*/
var gadget_id, gadget_connection_list,
createMethodInteraction = function (
original_source_method_id, source_gadget_id,
source_method_id, destination_gadget_id,
destination_method_id) {
var interaction = function () {
// execute source method
RenderJs.GadgetIndex.getGadgetById(
source_gadget_id)[original_source_method_id].
apply(null, arguments);
// call trigger so bind can be asynchronously called
RenderJs.GadgetIndex.getGadgetById(
destination_gadget_id).dom.trigger(source_method_id);
};
return interaction;
},
createTriggerInteraction = function (
destination_gadget_id, destination_method_id) {
var interaction = function () {
RenderJs.GadgetIndex.getGadgetById(
destination_gadget_id)[destination_method_id].
apply(null, arguments);
};
return interaction;
};
gadget_id = gadget_dom.attr("id");
gadget_connection_list = gadget_dom.attr("data-gadget-connection");
gadget_connection_list = $.parseJSON(gadget_connection_list);
$.each(gadget_connection_list, function (key, value) {
var source, source_gadget_id, source_method_id,
source_gadget, destination, destination_gadget_id,
destination_method_id, destination_gadget,
original_source_method_id;
source = value.source.split(".");
source_gadget_id = source[0];
source_method_id = source[1];
source_gadget = RenderJs.GadgetIndex.
getGadgetById(source_gadget_id);
destination = value.destination.split(".");
destination_gadget_id = destination[0];
destination_method_id = destination[1];
destination_gadget = RenderJs.GadgetIndex.
getGadgetById(destination_gadget_id);
if (source_gadget.hasOwnProperty(source_method_id)) {
// direct javascript use case
original_source_method_id = "original_" +
source_method_id;
source_gadget[original_source_method_id] =
source_gadget[source_method_id];
source_gadget[source_method_id] =
createMethodInteraction(
original_source_method_id,
source_gadget_id,
source_method_id,
destination_gadget_id,
destination_method_id
);
// we use html custom events for asyncronous method call so
// bind destination_gadget to respective event
destination_gadget.dom.bind(
source_method_id,
createTriggerInteraction(
destination_gadget_id, destination_method_id
)
);
}
else {
// this is a custom event attached to HTML gadget
// representation
source_gadget.dom.bind(
source_method_id,
createTriggerInteraction(
destination_gadget_id, destination_method_id
)
);
}
});
}
};
}()),
RouteGadget : (function () {
/*
* A gadget that defines possible routes (i.e. URL changes) between gadgets.
*/
var route_list = [];
return {
init: function () {
/*
* Inspect DOM and initialize this gadget
*/
$("div[data-gadget-route]").each(function (index, element) {
RenderJs.RouteGadget.route($(element));
});
},
route: function (gadget_dom) {
/*
* Create routes between gadgets.
*/
var body = $("body"),
handler_func, priority,
gadget_route_list = gadget_dom.attr("data-gadget-route");
gadget_route_list = $.parseJSON(gadget_route_list);
$.each(gadget_route_list, function (key, gadget_route) {
handler_func = function () {
var gadget_id = gadget_route.destination.split('.')[0],
method_id = gadget_route.destination.split('.')[1],
gadget = RenderJs.GadgetIndex.getGadgetById(gadget_id);
// set gadget value so getSelfGadget can work
setSelfGadget(gadget);
gadget[method_id].apply(null, arguments);
// reset as no longer needed
setSelfGadget(undefined);
};
// add route itself
priority = gadget_route.priority;
if (priority === undefined) {
// default is 1 -i.e.first level
priority = 1;
}
RenderJs.RouteGadget.add(gadget_route.source, handler_func, priority);
});
},
add: function (path, handler_func, priority) {
/*
* Add a route between path (hashable) and a handler function (part of Gadget's API).
*/
var body = $("body");
body
.route("add", path, 1)
.done(handler_func);
// save locally
route_list.push({"path": path,
"handler_func": handler_func,
"priority": priority});
},
go: function (path, handler_func, priority) {
/*
* Go a route.
*/
var body = $("body");
body
.route("go", path, priority)
.fail(handler_func);
},
remove: function (path) {
/*
* Remove a route.
*/
// XXX: implement remove a route when route.js supports it
},
getRouteList: function () {
/*
* Get list of all router
*/
return route_list;
}
};
}())
};
}());
\ No newline at end of file
<?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>__name__</string> </key>
<value> <string>renderjs.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>renderjs.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"use strict";var RENDERJS_ENABLE_IMPLICIT_GADGET_RENDERING=true;var RENDERJS_ENABLE_IMPLICIT_INTERACTION_BIND=true;var RENDERJS_ENABLE_IMPLICIT_ROUTE_CREATE=true;if(console===undefined||console.log===undefined){var console={};console.log=function(){}}var RenderJs=function(){var is_ready=false,current_gadget;function setSelfGadget(gadget){current_gadget=gadget}return{init:function(){if(RENDERJS_ENABLE_IMPLICIT_GADGET_RENDERING){RenderJs.bootstrap($("body"))}var root_gadget=RenderJs.GadgetIndex.getRootGadget();if(RENDERJS_ENABLE_IMPLICIT_INTERACTION_BIND||RENDERJS_ENABLE_IMPLICIT_ROUTE_CREATE){if(root_gadget!==undefined){RenderJs.bindReady(function(){if(RENDERJS_ENABLE_IMPLICIT_INTERACTION_BIND){RenderJs.InteractionGadget.init()}if(RENDERJS_ENABLE_IMPLICIT_ROUTE_CREATE){RenderJs.RouteGadget.init()}})}}},bootstrap:function(root){var gadget_id,is_gadget;gadget_id=root.attr("id");is_gadget=root.attr("data-gadget")!==undefined;RenderJs.setReady(false);if(is_gadget&&gadget_id!==undefined){RenderJs.loadGadget(root)}RenderJs.loadRecursiveGadget(root)},loadRecursiveGadget:function(root){var gadget_list,gadget,gadget_id,gadget_js;gadget_list=root.find("[data-gadget]");gadget_list.each(function(){gadget=$(this);gadget_id=gadget.attr("id");gadget_js=new RenderJs.Gadget(gadget_id,gadget);RenderJs.GadgetIndex.registerGadget(gadget_js)});gadget_list.each(function(){RenderJs.loadGadget($(this))})},setGadgetAndRecurse:function(gadget,data){setSelfGadget(RenderJs.GadgetIndex.getGadgetById(gadget.attr("id")));gadget.append(data);setSelfGadget(undefined);RenderJs.loadRecursiveGadget(gadget)},getSelfGadget:function(){return current_gadget},loadGadget:function(gadget){var url,gadget_id,gadget_property,cacheable,cache_id,i,gadget_index,gadget_index_id,app_cache,data,gadget_js,is_update_gadget_data_running;url=gadget.attr("data-gadget");gadget_id=gadget.attr("id");gadget_js=RenderJs.GadgetIndex.getGadgetById(gadget_id);gadget_index=RenderJs.GadgetIndex.getGadgetList();if(gadget_js===undefined){gadget_js=new RenderJs.Gadget(gadget_id,gadget);RenderJs.GadgetIndex.registerGadget(gadget_js)}if(gadget_js.isReady()){return}gadget_property=gadget.attr("data-gadget-property");if(gadget_property!==undefined){gadget_property=$.parseJSON(gadget_property);$.each(gadget_property,function(key,value){gadget_js[key]=value})}if(url!==undefined&&url!==""){cacheable=gadget.attr("data-gadget-cacheable");cache_id=gadget.attr("data-gadget-cache-id");if(cacheable!==undefined&&cache_id!==undefined){cacheable=Boolean(parseInt(cacheable,10))}if(cacheable){app_cache=RenderJs.Cache.get(cache_id,undefined);if(app_cache===undefined||app_cache===null){$.ajax({url:url,yourCustomData:{gadget_id:gadget_id,cache_id:cache_id},success:function(data){cache_id=this.yourCustomData.cache_id;gadget_id=this.yourCustomData.gadget_id;RenderJs.Cache.set(cache_id,data);RenderJs.GadgetIndex.getGadgetById(gadget_id).setReady();RenderJs.setGadgetAndRecurse(gadget,data);RenderJs.checkAndTriggerReady();RenderJs.updateGadgetData(gadget)}})}else{data=app_cache;gadget_js.setReady();this.setGadgetAndRecurse(gadget,data);this.checkAndTriggerReady();RenderJs.updateGadgetData(gadget)}}else{$.ajax({url:url,yourCustomData:{gadget_id:gadget_id},success:function(data){gadget_id=this.yourCustomData.gadget_id;RenderJs.GadgetIndex.getGadgetById(gadget_id).setReady();RenderJs.setGadgetAndRecurse(gadget,data);RenderJs.checkAndTriggerReady();RenderJs.updateGadgetData(gadget)}})}}else{is_update_gadget_data_running=RenderJs.updateGadgetData(gadget);if(!is_update_gadget_data_running){gadget_js.setReady()}RenderJs.checkAndTriggerReady()}},isReady:function(){return is_ready},setReady:function(value){is_ready=value},bindReady:function(ready_function){$("body").one("ready",ready_function)},checkAndTriggerReady:function(){var is_gadget_list_loaded;is_gadget_list_loaded=RenderJs.GadgetIndex.isGadgetListLoaded();if(is_gadget_list_loaded){if(!RenderJs.isReady()){RenderJs.GadgetIndex.getRootGadget().getDom().trigger("ready");$("body").trigger("ready");RenderJs.setReady(true)}}return is_gadget_list_loaded},updateGadgetData:function(gadget){var data_source,data_handler;data_source=gadget.attr("data-gadget-source");data_handler=gadget.attr("data-gadget-handler");if(data_source!==undefined&&data_source!==""){$.ajax({url:data_source,dataType:"json",yourCustomData:{data_handler:data_handler,gadget_id:gadget.attr("id")},success:function(result){var data_handler,gadget_id;data_handler=this.yourCustomData.data_handler;gadget_id=this.yourCustomData.gadget_id;if(data_handler!==undefined){eval(data_handler+"(result)");gadget=RenderJs.GadgetIndex.getGadgetById(gadget_id);gadget.setReady();RenderJs.checkAndTriggerReady()}}});return true}return false},addGadget:function(dom_id,gadget_id,gadget,gadget_data_handler,gadget_data_source,bootstrap){var html_string,tab_container,tab_gadget;tab_container=$("#"+dom_id);tab_container.empty();html_string=['<div id="'+gadget_id+'"','data-gadget="'+gadget+'"','data-gadget-handler="'+gadget_data_handler+'" ','data-gadget-source="'+gadget_data_source+'"></div>'].join("\n");tab_container.append(html_string);tab_gadget=tab_container.find("#"+gadget_id);if(bootstrap!==false){RenderJs.bootstrap(tab_container)}return tab_gadget},Cache:function(){return{ROOT_CACHE_ID:"APP_CACHE",getCacheId:function(cache_id){return this.ROOT_CACHE_ID+cache_id},hasLocalStorage:function(){var mod;mod="localstorage_test_12345678";try{localStorage.setItem(mod,mod);localStorage.removeItem(mod);return true}catch(e){return false}},get:function(cache_id,default_value){cache_id=this.getCacheId(cache_id);if(this.hasLocalStorage()){return this.LocalStorageCachePlugin.get(cache_id,default_value)}return this.NameSpaceStorageCachePlugin.get(cache_id,default_value)},set:function(cache_id,data){cache_id=this.getCacheId(cache_id);if(this.hasLocalStorage()){this.LocalStorageCachePlugin.set(cache_id,data)}else{this.NameSpaceStorageCachePlugin.set(cache_id,data)}},LocalStorageCachePlugin:function(){return{get:function(cache_id,default_value){if(localStorage.getItem(cache_id)!==null){return JSON.parse(localStorage.getItem(cache_id))}return default_value},set:function(cache_id,data){localStorage.setItem(cache_id,JSON.stringify(data))}}}(),NameSpaceStorageCachePlugin:function(){var namespace={};return{get:function(cache_id,default_value){return namespace[cache_id]},set:function(cache_id,data){namespace[cache_id]=data}}}()}}(),Gadget:function(gadget_id,dom){this.id=gadget_id;this.dom=dom;this.is_ready=false;this.getId=function(){return this.id};this.getDom=function(){return this.dom};this.isReady=function(){return this.is_ready};this.setReady=function(){this.is_ready=true};this.remove=function(){var gadget;RenderJs.GadgetIndex.unregisterGadget(this);this.getDom().find("[data-gadget]").each(function(){gadget=RenderJs.GadgetIndex.getGadgetById($(this).attr("id"));RenderJs.GadgetIndex.unregisterGadget(gadget)});$(this.getDom()).remove()}},TabbularGadget:function(){var gadget_list=[];return{toggleVisibility:function(visible_dom){$(".selected").addClass("not_selected");$(".selected").removeClass("selected");visible_dom.addClass("selected");visible_dom.removeClass("not_selected")},addNewTabGadget:function(dom_id,gadget_id,gadget,gadget_data_handler,gadget_data_source,bootstrap){var tab_gadget;tab_gadget=RenderJs.addGadget(dom_id,gadget_id,gadget,gadget_data_handler,gadget_data_source,bootstrap);$.each(gadget_list,function(index,gadget_id){var gadget=RenderJs.GadgetIndex.getGadgetById(gadget_id);gadget.remove();gadget_list.splice($.inArray(gadget_id,gadget_list),1)});gadget_list.push(tab_gadget.attr("id"))}}}(),GadgetIndex:function(){var gadget_list=[];return{getGadgetIdListFromDom:function(dom){var gadget_id_list=[];$.each(dom.find("[data-gadget]"),function(index,value){gadget_id_list.push($(value).attr("id"))});return gadget_id_list},setGadgetList:function(gadget_list_value){gadget_list=gadget_list_value},getGadgetList:function(){return gadget_list},registerGadget:function(gadget){if(RenderJs.GadgetIndex.getGadgetById(gadget.id)===undefined){gadget_list.push(gadget)}},unregisterGadget:function(gadget){var index=$.inArray(gadget,gadget_list);if(index!==-1){gadget_list.splice(index,1)}},getGadgetById:function(gadget_id){var gadget;gadget=undefined;$(RenderJs.GadgetIndex.getGadgetList()).each(function(index,value){if(value.getId()===gadget_id){gadget=value}});return gadget},getRootGadget:function(){return this.getGadgetList()[0]},isGadgetListLoaded:function(){var result;result=true;$(this.getGadgetList()).each(function(index,value){if(value.isReady()===false){result=false}});return result}}}(),GadgetCatalog:function(){var cache_id="setGadgetIndexUrlList";function updateGadgetIndexFromURL(url){var url_list=url.split("/"),document_url=url_list[url_list.length-1],d=url_list.splice($.inArray(document_url,url_list),1),base_url=url_list.join("/"),web_dav=jIO.newJio({type:"dav",username:"",password:"",url:base_url});web_dav.get(document_url,function(err,response){RenderJs.Cache.set(url,response)})}return{updateGadgetIndex:function(){$.each(RenderJs.GadgetCatalog.getGadgetIndexUrlList(),function(index,value){updateGadgetIndexFromURL(value)})},setGadgetIndexUrlList:function(url_list){RenderJs.Cache.set(cache_id,url_list)},getGadgetIndexUrlList:function(){return RenderJs.Cache.get(cache_id,undefined)},getGadgetListThatProvide:function(service){var gadget_list=[];$.each(RenderJs.GadgetCatalog.getGadgetIndexUrlList(),function(index,url){var cached_repo=RenderJs.Cache.get(url);$.each(cached_repo.gadget_list,function(index,gadget){if($.inArray(service,gadget.service_list)>-1){gadget_list.push(gadget)}})});return gadget_list},registerServiceList:function(gadget,service_list){}}}(),InteractionGadget:function(){return{init:function(force){var dom_list,gadget_id;if(force===1){dom_list=$("div[data-gadget-connection]")}else{dom_list=$("div[data-gadget-connection]").filter(function(){return $(this).data("bound")!==true}).data("bound",true)}dom_list.each(function(index,element){RenderJs.InteractionGadget.bind($(element))})},bind:function(gadget_dom){var gadget_id,gadget_connection_list,createMethodInteraction=function(original_source_method_id,source_gadget_id,source_method_id,destination_gadget_id,destination_method_id){var interaction=function(){RenderJs.GadgetIndex.getGadgetById(source_gadget_id)[original_source_method_id].apply(null,arguments);RenderJs.GadgetIndex.getGadgetById(destination_gadget_id).dom.trigger(source_method_id)};return interaction},createTriggerInteraction=function(destination_gadget_id,destination_method_id){var interaction=function(){RenderJs.GadgetIndex.getGadgetById(destination_gadget_id)[destination_method_id].apply(null,arguments)};return interaction};gadget_id=gadget_dom.attr("id");gadget_connection_list=gadget_dom.attr("data-gadget-connection");gadget_connection_list=$.parseJSON(gadget_connection_list);$.each(gadget_connection_list,function(key,value){var source,source_gadget_id,source_method_id,source_gadget,destination,destination_gadget_id,destination_method_id,destination_gadget,original_source_method_id;source=value.source.split(".");source_gadget_id=source[0];source_method_id=source[1];source_gadget=RenderJs.GadgetIndex.getGadgetById(source_gadget_id);destination=value.destination.split(".");destination_gadget_id=destination[0];destination_method_id=destination[1];destination_gadget=RenderJs.GadgetIndex.getGadgetById(destination_gadget_id);if(source_gadget.hasOwnProperty(source_method_id)){original_source_method_id="original_"+source_method_id;source_gadget[original_source_method_id]=source_gadget[source_method_id];source_gadget[source_method_id]=createMethodInteraction(original_source_method_id,source_gadget_id,source_method_id,destination_gadget_id,destination_method_id);destination_gadget.dom.bind(source_method_id,createTriggerInteraction(destination_gadget_id,destination_method_id))}else{source_gadget.dom.bind(source_method_id,createTriggerInteraction(destination_gadget_id,destination_method_id))}})}}}(),RouteGadget:function(){var route_list=[];return{init:function(){$("div[data-gadget-route]").each(function(index,element){RenderJs.RouteGadget.route($(element))})},route:function(gadget_dom){var body=$("body"),handler_func,priority,gadget_route_list=gadget_dom.attr("data-gadget-route");gadget_route_list=$.parseJSON(gadget_route_list);$.each(gadget_route_list,function(key,gadget_route){handler_func=function(){var gadget_id=gadget_route.destination.split(".")[0],method_id=gadget_route.destination.split(".")[1],gadget=RenderJs.GadgetIndex.getGadgetById(gadget_id);setSelfGadget(gadget);gadget[method_id].apply(null,arguments);setSelfGadget(undefined)};priority=gadget_route.priority;if(priority===undefined){priority=1}RenderJs.RouteGadget.add(gadget_route.source,handler_func,priority)})},add:function(path,handler_func,priority){var body=$("body");body.route("add",path,1).done(handler_func);route_list.push({path:path,handler_func:handler_func,priority:priority})},go:function(path,handler_func,priority){var body=$("body");body.route("go",path,priority).fail(handler_func)},remove:function(path){},getRouteList:function(){return route_list}}}()}}();
\ No newline at end of file
<?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>__name__</string> </key>
<value> <string>renderjs.min.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>renderjs.min.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2012-04-06 Ivan
* Initial commit
\ No newline at end of file
2012-2013 © Nexedi SA
\ No newline at end of file
erp5_jquery
erp5_jquery_plugin_json
\ No newline at end of file
This Business Template contains only static files of RenderJS library.
* http://www.renderjs.org/
\ No newline at end of file
portal_skins/erp5_jquery/jquery/plugin/renderjs
portal_skins/erp5_jquery/jquery/plugin/renderjs/**
\ No newline at end of file
erp5_jquery_plugin_renderjs
\ No newline at end of file
from Products.ERP5Form.ListBox import ListBoxHTMLRenderer
from Products.CMFCore.Expression import getExprContext
def getListBoxRenderer(self, field, REQUEST, render_prefix=None):
""" XXXX"""
return ListBoxHTMLRenderer(self, field, REQUEST, render_prefix)
def execExpression(self, expression):
"""
Allow exec <Products.CMFCore.Expression.Expression object ..> instances from
within restricted environment.
XXX: consider its security impact
"""
econtext = getExprContext(self)
return expression(econtext)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Extension Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>HTML5</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>extension.erp5.HTML5</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Extension Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1377844685.09</float>
<string>GMT+9</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>erp5_xhtml_gadget_core</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="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>_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>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>ERP5Site_contextBox</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block metal:define-macro="master">
<span id="jump" class="jump" metal:define-macro="jump">
<select name="select_jump"
onchange="submitAction(this.form,'Base_doJump')">
<option selected="selected" value=""
i18n:translate="" i18n:domain="ui">Jump...</option>
</select>
<button type="submit" name="Base_doJump:method" title="Jump"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description"
i18n:translate="" i18n:domain="ui">Jump</span>
</button>
</span>
<span class="separator"><!--separator--></span>
<span id="action" class="action" metal:define-macro="action">
<select name="select_action"
onchange="submitAction(this.form,'Base_doAction')">
<option selected="selected" value=""
i18n:translate="" i18n:domain="ui">Action...</option>
</select>
<button type="submit" name="Base_doAction:method" title="Action"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description">Action</span>
</button>
</span>
<span class="tool_buttons" metal:define-macro="tool_buttons">
<!-- XXX: exchange_actions seems to be bad condition -->
<span class="first"
tal:define="search_actions actions/object_search | nothing;
exchange_actions actions/object_exchange | nothing;
report_actions actions/object_report | nothing;
button_actions actions/object_button | nothing;
fast_input_actions actions/object_fast_input | nothing;
sort_actions actions/object_sort | nothing;
ui_actions actions/object_ui | nothing;
print_actions actions/object_print | nothing;
list_mode list_mode | nothing;
can_modify_portal_content python: portal.portal_membership.checkPermission('Modify portal content', here)">
<span class="separator"><!--separator--></span>
<tal:block tal:condition="list_mode">
<button class="cut" type="submit" name="Folder_cut:method" title="Cut"
i18n:attributes="title" i18n:domain="ui"
tal:condition="can_modify_portal_content">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Cut</span>
</button>
<button class="copy" type="submit" name="Folder_copy:method" title="Copy"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Copy</span>
</button>
<button class="paste" type="submit" name="Folder_paste:method" title="Paste"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Paste</span>
</button>
<span class="separator"><!--separator--></span>
</tal:block>
<button tal:condition="print_actions" class="print" type="submit" name="Folder_print:method" title="Print"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Print</span>
</button>
<button class="new" type="submit" title="New"
tal:attributes="name python: list_mode and 'Folder_create:method' or 'Base_createNewDocument:method'"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">New</span>
</button>
<button class="clone" type="submit" title="Clone"
name="Base_createCloneDocument:method"
tal:condition="not: list_mode"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Clone</span>
</button>
<button tal:condition="list_mode" class="delete" type="submit" name="Folder_deleteObjectList:method" title="Delete"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Delete</span>
</button>
<tal:block tal:condition="not: list_mode">
<tal:block tal:condition="request/selection_index | nothing">
<span class="separator"><!--separator--></span>
<a class="jump_first" title="First"
tal:attributes="href string:portal_selections/viewFirst?$http_parameters"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">First</span>
</a>
<a class="jump_previous" title="Previous"
tal:attributes="href string:portal_selections/viewPrevious?$http_parameters"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Previous</span>
</a>
<a class="list_mode" title="List Mode" tal:attributes="href python: here.portal_selections.getSelectionListUrlFor(request.get('selection_name', None))"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">List Mode</span>
</a>
<a class="jump_next" title="Next"
tal:attributes="href string:portal_selections/viewNext?$http_parameters"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Next</span>
</a>
<a class="jump_last" title="Last"
tal:attributes="href string:portal_selections/viewLast?$http_parameters"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Last</span>
</a>
</tal:block>
</tal:block>
<tal:block tal:condition="list_mode">
<span class="separator"><!--separator--></span>
<a tal:condition="search_actions" class="find" title="Find"
tal:attributes="href python: portal.ERP5Site_renderCustomLink(search_actions[0]['url'], http_parameter_list, dialog_category='object_search')"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Find</span>
</a>
<button class="show_all" type="submit" name="Folder_show:method" title="Show All"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Show All</span>
</button>
<button type="submit" name="Folder_filter:method" title="Filter"
tal:attributes="class python: here.portal_selections.getSelectionInvertModeFor(request.get('selection_name', None)) and 'filter_on' or 'filter';"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Filter</span>
</button>
<a tal:condition="sort_actions" class="sort" title="Sort"
tal:attributes="href python: portal.ERP5Site_renderCustomLink(sort_actions[0]['url'], http_parameter_list, dialog_category='object_sort')"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Sort</span>
</a>
</tal:block>
<span tal:condition="exchange_actions | report_actions"
class="separator"><!--separator--></span>
<button tal:condition="exchange_actions" class="import_export"
type="submit" name="Base_doExchange:method" title="Import / Export"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Import / Export</span>
</button>
<button tal:condition="report_actions" class="report" type="submit" name="Base_doReport:method" title="Report"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Report</span>
</button>
<a tal:condition="fast_input_actions" class="fast_input" title="Fast Input"
tal:attributes="href python: portal.ERP5Site_renderCustomLink(fast_input_actions[0]['url'], http_parameter_list, dialog_category='object_fast_input')"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Fast Input</span>
</a>
<tal:block tal:condition="button_actions">
<span class="separator"><!--separator--></span>
<tal:block tal:repeat="button_action button_actions">
<a tal:attributes="href python: '%s%s%s' % (button_action['url'], '?' in button_action['url'] and '&amp;' or '?', http_parameters)">
<img i18n:attributes="title" i18n:domain="ui"
tal:attributes="src button_action/icon;
title button_action/name;
alt button_action/name" />
</a>
</tal:block>
</tal:block>
<tal:block tal:condition="list_mode">
<tal:block tal:condition="ui_actions">
<span class="separator"><!--separator--></span>
<a class="configure" title="Configure"
tal:attributes="href python: portal.ERP5Site_renderCustomLink(ui_actions[0]['url'], http_parameter_list, dialog_category='object_ui')"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Configure</span>
</a>
</tal:block>
</tal:block>
</span>
<span class="second">
<a tal:condition="preferred_html_style_contextual_help"
class="jump_help" title="Help"
tal:attributes="href python: portal.ERP5Site_getHelpUrl(current_action=current_action, current_form_id=current_form_id, workflow_action=request.get('workflow_action'))"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Help</span>
</a>
<a tal:condition="preferred_html_style_developper_mode"
class="inspect_object" title="Inspect object" href="Base_viewInspectionReport"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Inspect Object</span>
</a>
<a tal:condition="here/hasActivity | nothing" class="activity_pending"
title="Activity Pending"
tal:attributes="href python: portal.portal_membership.checkPermission('View management screens', portal.portal_activities) and '%s/portal_activities/view' % (portal.portal_url()) or '#'"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description" i18n:translate="" i18n:domain="ui">Activity Pending</span>
</a>
</span>
</span>
<p class="clear"></p>
<script type="text/javascript">
//<![CDATA[
gadget = RenderJs.getSelfGadget();
gadget.render = ERP5UI.updateContextBox;
gadget.render();
//]]>
</script>
</tal:block>
</tal:block>
\ No newline at end of file
"""
Return action and modules links for ERP5's navigation
box.
"""
from json import dumps
portal= context.getPortalObject()
actions = context.Base_filterDuplicateActions(portal.portal_actions.listFilteredActionsFor(context))
preferred_html_style_developper_mode = portal.portal_preferences.getPreferredHtmlStyleDevelopperMode()
# XXX: use client side translation!
translate = context.Base_translateString
def unLazyActionList(action_list):
# convert to plain dict as list items are lazy calculated ActionInfo instances
fixed_action_list = []
for action in action_list:
d = {}
for k,v in action.items():
if k in ['url', 'title']:
if k == 'url':
# escape '&' as not possible use it in a JSON string
if type(v)!=type('s'):
# this is a tales expression so we need to calculate it
v = str(context.execExpression(v))
d[k] = v
fixed_action_list.append(d)
return fixed_action_list
result = {}
result['type_info_list'] = []
result['workflow_list'] = []
result['document_template_list'] = []
result['object_workflow_action_list'] = []
result['object_action_list'] = []
result['object_view_list'] = []
result['folder_action_list'] = []
result['object_jump_list'] = unLazyActionList(actions['object_jump'])
# add links to edit current portal type
if preferred_html_style_developper_mode:
type_info_list = []
type_info = portal.portal_types.getTypeInfo(context)
if type_info is not None:
type_info_list = [{"title": "-- %s --" %translate("Developer Mode"),
"url": ""},
{"title": "Edit Portal Type %s" %type_info.getPortalTypeName(),
"url": type_info.absolute_url()}]
result['type_info_list'] = type_info_list
# add links for workflows
if portal.portal_workflow.Base_getSourceVisibility():
workflow_list = portal.portal_workflow.getWorkflowValueListFor(context)
if workflow_list:
result['workflow_list'] = [{"title": "-- %s --" %translate("Workflows"),
"url": ""}]
result['workflow_list'].extend([{"title": x.title,
"url": "%s/manage_main" %x.absolute_url()} for x in workflow_list])
# allowed types to add
visible_allowed_content_type_list = context.getVisibleAllowedContentTypeList()
result['visible_allowed_content_type_list'] = [{"title": "Add %s" %x,
"url": "add %s" %x} for x in visible_allowed_content_type_list]
document_template_list = context.getDocumentTemplateList()
if document_template_list:
result['document_template_list'] = [{"title": "-- %s --" %translate("Templates"),
"url": ""}]
result['document_template_list'].extend([{"title": "Add %s" %x,
"url": "template %s" %x} for x in document_template_list])
# workflow actions
object_workflow_action_list = unLazyActionList(actions["workflow"])
if object_workflow_action_list:
result['object_workflow_action_list'] = [{"title": "-- %s --" %translate("Workflows"),
"url": ""}]
result['object_workflow_action_list'].extend([{"title": "%s" %x['title'],
"url": "workflow %s" %x['url']} for x in object_workflow_action_list])
# object actions
object_action_list = unLazyActionList(actions["object_action"])
if object_action_list:
result['object_action_list'] = [{"title": "-- %s --" %translate("Object"),
"url": ""}]
result['object_action_list'].extend([{"title": "%s" %x['title'],
"url": "object %s" %x['url']} for x in object_action_list])
# object_view
object_view_list = [i for i in actions["object_view"] if i['id']=='module_view']
object_view_list = unLazyActionList(object_view_list)
if object_view_list:
result['object_view_list'].extend([{"title": "%s" %x['title'],
"url": "object %s" %x['url']} for x in object_view_list])
# folder ones
folder_action_list = unLazyActionList(actions["folder"])
if folder_action_list:
result['folder_action_list'] = [{"title": "-- %s --" %translate("Folder"),
"url": ""}]
result['folder_action_list'].extend([{"title": "%s" %x['title'],
"url": "folder %s" %x['url']} for x in object_action_list])
# XXX: buttons
return dumps(result)
<?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>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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>id</string> </key>
<value> <string>ERP5Site_getContextBoxActionList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Return action and modules links for ERP5's navigation
box.
"""
from json import dumps
portal= context.getPortalObject()
def unLazyActionList(action_list):
# convert to plain dict as list items are lazy calculated ActionInfo instances
fixed_action_list = []
for action in action_list:
d = {}
for k,v in action.items():
if k in ['url', 'title']:
if k == 'url':
# escape '&' as not possible use it in a JSON string
if type(v)!=type('s'):
# this is a tales expression so we need to calculate it
v = str(context.execExpression(v))
d[k] = v
fixed_action_list.append(d)
return fixed_action_list
result = {}
module_list = portal.ERP5Site_getModuleItemList()
search_portal_type_list = portal.getPortalDocumentTypeList() + ('Person', 'Organisation',)
language_list = portal.Localizer.get_languages_map()
actions = portal.portal_actions.listFilteredActionsFor(context)
ordered_global_actions = context.getOrderedGlobalActionList(actions['global']);
user_actions = actions['user']
ordered_global_action_list = unLazyActionList(ordered_global_actions)
user_action_list = unLazyActionList(user_actions)
result['favourite_dict'] = {"ordered_global_action_list": ordered_global_action_list,
"user_action_list": user_action_list
}
result['module_list'] = module_list
result['language_list'] = language_list
result['search_portal_type_list'] = [ [x,x] for x in search_portal_type_list]
return dumps(result)
<?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>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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>id</string> </key>
<value> <string>ERP5Site_getNavigationBoxActionList</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>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>ERP5Site_navigationBox</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<span class="first">
<span id="favourites" class="favourites">
<select name="select_favorite"
onchange="submitAction(this.form,'Base_doFavorite')">
<option selected="selected" value=""
i18n:translate="" i18n:domain="ui">My Favourites</option>
</select>
<button type="submit" name="Base_doFavorite:method" title="Select Favourite"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description"
i18n:translate="" i18n:domain="ui">Select Favourite</span>
</button>
</span>
<span class="separator"><!--separator--></span>
<span id="modules" class="modules">
<select name="select_module"
onchange="submitAction(this.form,'Base_doModule')">
<option selected="selected" value="" i18n:translate="" i18n:domain="ui">Modules</option>
</select>
<button type="submit" name="Base_doModule:method" title="Select Module"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description"
i18n:translate="" i18n:domain="ui">Select Module</span>
</button>
</span>
</span>
<span class="second">
<span id="language" class="language">
<select name="select_language"
onchange="submitAction(this.form,'Base_doLanguage')">
<option value=""
i18n:translate="" i18n:domain="ui">My Language</option>
</select>
<button type="submit" name="Base_doLanguage:method" title="Select Language"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description"
i18n:translate="" i18n:domain="ui">Select Language</span>
</button>
</span>
<span class="separator"><!--separator--></span>
<span id="search" class="search" tal:define="search_default_text python:here.Base_translateString('Search')">
<input type="hidden" name="all_languages" value="1" />
<input class="quick_search_field" accesskey="4"
type="text" name="field_your_search_text"
value="Search"
tal:attributes="value string:${search_default_text};
onfocus string:if (this.value=='${search_default_text}') this.value='';"
onfocus="this.value='';"
onkeypress="submitFormOnEnter(event, this.form, 'ERP5Site_processAdvancedSearch');" />
<select size="1" class="input" name="field_your_search_portal_type">
<option value="" selected="selected" i18n:translate="" i18n:domain="ui">Everything</option>
<option value="all" i18n:translate="" i18n:domain="ui">All Documents</option>
</select>
<button type="submit" name="ERP5Site_processAdvancedSearch:method" title="Search"
i18n:attributes="title" i18n:domain="ui">
<span class="image"></span>
<span class="description"
i18n:translate="" i18n:domain="ui">Search</span>
</button>
</span>
</span>
<p class="clear"></p>
</tal:block>
<script type="text/javascript">
//<![CDATA[
gadget = RenderJs.getSelfGadget();
gadget.render = ERP5UI.updateNavigationBox;
gadget.render();
//]]>
</script>
\ No newline at end of file
return context.ERP5Site_viewQuickSearchResultList(
field_your_search_text = field_your_search_text,
field_your_search_portal_type = field_your_search_portal_type,
all_languages=all_languages)
<?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>_params</string> </key>
<value> <string>field_your_search_text=\'\', field_your_search_portal_type=None, all_languages=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_processAdvancedSearch</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>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>ERP5Site_renderBreadcrumb</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<div tal:define="portal here/getPortalObject;
portal_url portal/absolute_url;">
<div id="breadcrumb" class="breadcrumb">
<tal:block metal:use-macro="here/breadcrumb_render/macros/breadcrumb" />
</div>
<div id="logged_in_as" class="logged_in_as">
<tal:block tal:condition="not: portal/portal_membership/isAnonymousUser">
<span class="logged_txt" i18n:translate="" i18n:domain="ui">Logged In as :</span>
<tal:block tal:replace="python:portal.Base_getUserCaption()" />
</tal:block>
</div>
<p class="clear"></p>
<div data-gadget="ERP5Site_renderPortalStatusMessage"
tal:attributes="data-gadget string:${portal_url}/ERP5Site_renderPortalStatusMessage"
id="portal_status_message"></div>
</div>
\ No newline at end of file
from Products.ERP5Type.Cache import CachingMethod
navigation_box_render = context.ERP5Site_navigationBox
navigation_box_render = CachingMethod(navigation_box_render,
("ERP5Site_renderCachedNavigationBox",
context.portal_membership.getAuthenticatedMember().getIdOrUserName(),
context.Localizer.get_selected_language(),
context.portal_url(),
),cache_factory='erp5_ui_short')
return navigation_box_render()
<?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>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_renderNavigationBox</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>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>ERP5Site_renderPortalStatusMessage</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head>
</head>
<body>
<div class="transition_message"
id="transition_message"
style="display:none; color:red;font-weight:bold;"></div>
<script type="text/javascript" language="javascript">
//<![CDATA[
$(document).ready(function() {
var portal_status_message,
gadget = RenderJs.getSelfGadget();
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
);
};
gadget.showMessage = function (message, timeout) {
// show message in UI
var msg_element = $("#transition_message");
if (timeout===undefined) {
timeout = 4000;
}
msg_element.toggle();
msg_element.html(message);
window.setTimeout('$("#transition_message").toggle();', timeout);
};
// in some cases a message can be inside current URL as well
// so show it.
portal_status_message = getURLParameter("portal_status_message");
if (portal_status_message!==undefined && portal_status_message!==null && portal_status_message!=='null') {
gadget.showMessage(portal_status_message, 5000);
}
});
//]]>
</script>
</body>
</html>
\ No newline at end of file
"""
This script provides all required details of an ERP5 form + values
on respective context. Using these values a javascript client can construct
form at client side.
"""
from json import dumps
LIST_FIELDS = ["ListField", "ParallelListField"]
MARKER = ['', None]
result = {'form_data': {}, }
# use form_id to get list of keys we care for
form = getattr(context, form_id)
for field_id in form.get_field_ids():
base_field_id = field_id.replace("my_", "")
field = getattr(form, field_id)
original_field = field
if field.meta_type == "ProxyField":
field = field.getRecursiveTemplateField()
field_meta_type = field.meta_type
field_value = original_field.get_value("default")
field_dict = result['form_data'][field_id] = {}
field_dict['type'] = field_meta_type
field_dict['editable'] = original_field.get_value("editable")
field_dict['css_class'] = original_field.get_value("css_class")
field_dict['hidden'] = original_field.get_value("hidden")
field_dict['description'] = original_field.get_value("description")
field_dict['enabled'] = original_field.get_value("enabled")
field_dict['title'] = original_field.get_value("title")
field_dict['required'] = original_field.is_required()
field_dict['alternate_name'] = original_field.get_value("alternate_name")
# XXX: some fields have display_width some not (improve)
try:
field_dict['display_width'] = original_field.get_value("display_width")
except:
field_dict['display_width'] = None
if field_meta_type in ["DateTimeField"]:
if field_value not in MARKER:
field_value = field_value.millis()
field_dict['format'] = context.portal_preferences.getPreferredDateOrder('ymd')
# listbox
if field_meta_type in ["ListBox"]:
field_dict['listbox'] = {}
if render_client_side_listbox:
# client side can request its javascript representation so it can generate it using jqgrid
# or ask server generate its entire HTML
field_dict['type'] = 'ListBoxJavaScript'
field_dict['listbox']['lines'] = original_field.get_value("lines")
field_dict['listbox']['columns'] = [x for x in original_field.get_value("columns")]
field_dict['listbox']['listbox_data_url'] = "Listbox_asJSON"
else:
# server generates entire HTML
field_dict['listbox']['listbox_html'] = original_field.render()
if field_meta_type in LIST_FIELDS:
# form contains selects, pass list of selects' values and calculate default one?
field_dict['items'] = original_field.get_value("items")
if field_meta_type in ["FormBox"]:
# this is a special case as this field is part of another form's fields
formbox_target_id = original_field.get_value("formbox_target_id")
formbox_form = getattr(context, formbox_target_id)
# get all values
for formbox_field_id in formbox_form.get_field_ids():
formbox_field_id_field = getattr(formbox_form, formbox_field_id)
field_value = formbox_field_id_field.get_value("default") # only last wins ?
# add field value
field_dict['value'] = field_value
return dumps(result)
<?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>_params</string> </key>
<value> <string>form_id=None, render_client_side_listbox=0</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Form_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>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>Form_asRenderJSGadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="group_list here/Form_getGroupTitleAndId;
form_id here/getId;
portal here/getPortalObject;
portal_url portal/absolute_url">
<tal:block tal:repeat="group group_list">
<tal:block tal:define="gid group/gid;">
<fieldset tal:attributes="class python:gid +' editable';">
<tal:block tal:repeat="field python: here.get_fields_in_group(group['goid'])">
<tal:block tal:define="title field/title;
field_name python: 'field_%s' %field.getId();
proxied_field python: test(field.meta_type=='ProxyField', field.getRecursiveTemplateField(), field);
field_type python: proxied_field.meta_type;
is_listbox python: field_type=='ListBox'">
<div class="field">
<label tal:content="title" tal:condition="not:is_listbox"/>
<div class="input">
<!-- render gadget asynchronously -->
<div tal:attributes="data-gadget string:${portal_url}/gadgets/form/${field_type}/gadget?field_name=${field_name}&form_id=${form_id};
id string:${form_id}_${field_name};"></div>
</div>
</div>
</tal:block>
</tal:block>
</fieldset>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
"""
Save form on context.
"""
from json import dumps
from Products.Formulator.Errors import FormValidationError
from Products.CMFActivity.Errors import ActivityPendingError
request = context.REQUEST
# Prevent users who don't have rights to edit the object from
# editing it by calling the Base_edit script with correct
# parameters directly.
# XXX: implement it (above)
# Get the form
form = getattr(context,form_id)
edit_order = form.edit_order
try:
# Validate
form.validate_all_to_request(request, key_prefix=key_prefix)
except FormValidationError, validation_errors:
# Pack errors into the request
result = {}
result['field_errors'] = {}
field_errors = form.ErrorFields(validation_errors)
for key, value in field_errors.items():
result['field_errors'][key] = value.error_text
return dumps(result)
(kw, encapsulated_editor_list), action = context.Base_edit(form_id, silent_mode=1)
context.log(kw)
context.edit(REQUEST=request, edit_order=edit_order, **kw)
for encapsulated_editor in encapsulated_editor_list:
encapsulated_editor.edit(context)
# XXX: consider some kind of protocol ?
return dumps({})
<?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>_params</string> </key>
<value> <string>form_id, key_prefix = None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Form_save</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from json import dumps
REQUEST = context.REQUEST
form = getattr(context, form_id)
listbox = getattr(form, listbox_id)
lines = listbox.get_value("lines")
columns = listbox.get_value("columns")
listbox_renderer = context.getListBoxRenderer(listbox, REQUEST)
# listbox pagination for jqgrid
# XXX: jqgrid always sends page which makes server side slection be resetted
selection_name = listbox.get_value("selection_name")
page = REQUEST.get("page")
if page is not None:
page = int(page)
REQUEST.form['page_start'] = page
context.portal_selections.setPage(list_selection_name=selection_name, \
listbox_uid=[],
REQUEST=REQUEST)
#context.log ("Set page = %s %s" %(page, selection_name))
row_list= []
line_list = listbox_renderer.query()
for line in line_list:
value_line = line.getValueList()
row = {"id": value_line[0][0],
"cell": [x[1] for x in value_line]}
row_list.append(row)
# return real listbox data here by using form and context
listbox_max_lines = int(listbox_renderer.getMaxLineNumber())
total_pages = listbox_renderer.total_pages
total_line = int(listbox_renderer.total_size)
current_page = int(listbox_renderer.current_page) + 1
current_page_max = listbox_max_lines * current_page
current_page_start = (listbox_max_lines * (current_page - 1)) + 1
current_page_stop = (total_line < current_page_max) and total_line or current_page_max
#context.log("%s %s %s %s %s %s" %(listbox_max_lines, total_line, current_page,
# current_page_max, current_page_start, current_page_stop))
json = {"page": page,
"total": total_pages,
"records": total_line,
"rows":row_list}
return dumps(json)
<?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>_params</string> </key>
<value> <string>form_id, listbox_id="listbox"</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Listbox_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>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>context_box_render_wrapper</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block metal:use-macro="here/global_definitions/macros/header_definitions" />
<tal:block metal:use-macro="here/ERP5Site_contextBox/macros/master" />
\ No newline at end of file
<?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>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>
<html>
<head>
<title tal:content="template/title">The title</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
<body>
<script type="text/javascript" language="javascript">
//<![CDATA[
$(document).ready(function() {
gadget = RenderJs.getSelfGadget();
// default tab should be openned fist
gadget.redirect = function () {
$.url.redirect('/' + gadget.default_tab_url + '/');
};
// default route
RenderJs.RouteGadget.add('', gadget.redirect, 1);
$.each(gadget.action_id_list, function(index, value) {
// add dynamic function to gadget that will take care to render tab using gadgets
gadget[value] = function () {
ERP5Form.openFormInTabbularGadget(gadget.tab_container_id, value);
};
//add dynamic route
RenderJs.RouteGadget.add('/' + value + '/', gadget[value], 1);
});
});
//]]>
</script>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>execExpression</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>HTML5</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>execExpression</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="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>gadget-style-lib</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*
Form field renderer.
Note: This is an ERP5 form implementation for the moment.
*/
var ERP5Form = ( function () {
var CURRENT_FORM_ID = "";
return {
// elements marked with this class can be serialized to server
SERIALIZE_ABLE_CLASS_NAME: "serialize-able",
getCurrentFormId: function () {
/* Get current form ID (return hard coded one for now) */
return CURRENT_FORM_ID;
},
setCurrentFormId: function (form_id) {
/* Set current form ID (return hard coded one for now) */
CURRENT_FORM_ID = form_id;
},
getFieldId: function(field_id) {
/* Generate local form field id */
return "field_" + field_id;
},
updateField: function (dom, field_dict) {
/* General purpose field updater */
var editable;
editable = Boolean(field_dict.editable);
if (editable){
dom.val(field_dict.value);}
else{
// if field is not editable just show its value
dom.replaceWith(field_dict.value);
}
},
addOptionTagList: function (select_dom, item_list, field_value) {
/*
* Update select like dom element
*/
$.each(item_list, function (index, value){
if(value[1]===field_value) {
select_dom.append('<option selected value="' + value[1] + '">' + value[0] + '</option>');
}
else {
select_dom.append('<option value="' + value[1] + '">' + value[0] + '</option>');
}
});
},
addOptionTagDictList: function (select_dom, item_list) {
/*
* Update select like dom element now using dict in this format:
* [{'selected': True, 'id': 'en', 'title': 'English'},
* {'selected': False, 'id': 'fr', 'title': 'French'}]
*/
$.each(item_list, function (index, value){
if(value.selected===true) {
select_dom.append('<option selected value="' + value.id + '">' + value.title + '</option>');
}
else {
select_dom.append('<option value="' + value.id + '">' + value.title + '</option>');
}
});
},
BaseInputField: function (field_id, field_dict) {
/* HTML based input field */
var dom, display_width;
dom = $("[name=" + this.getFieldId(field_id) + "]");
this.updateField(dom, field_dict);
display_width = field_dict.display_width;
if (display_width){
dom.attr("size", display_width);}
return dom;
},
EditorField: function (field_id, field_dict) {
/* HTML based input field */
var dom;
dom = $("#" + this.getFieldId(field_id));
this.updateField(dom, field_dict);
return dom;
},
ListField: function (field_id, field_dict) {
/* Select field */
var field_value, select_dom;
field_value = field_dict.value;
select_dom = $("select[name=" + this.getFieldId(field_id) + "]");
this.addOptionTagList(select_dom, field_dict.items, field_value);
return select_dom;
},
ParallelListField: function (field_id, field_dict) {
/* mutiple select fields */
var tag_name = "subfield_field_" + field_id + "_default",
initial_select_dom = $("select[name="+ tag_name + "\\:list]"),
gadget = initial_select_dom.parent("div[data-gadget]"),
new_select_id;
// render first value in initial select box
ERP5Form.addOptionTagList(initial_select_dom, field_dict.items, field_dict.value[0]);
// render all other elements
$.each(field_dict.value, function (index, index_value) {
if (index !== 0) {
// we need to create dynamically a select box for all element except first
new_select_id = 'parallel_' + field_id + index;
gadget.append('<br/><select class="serialize-able" name=' + tag_name + ':list ' + 'id=' + new_select_id + '></select>');
ERP5Form.addOptionTagList($("#"+new_select_id), field_dict.items, index_value);
}
});
// add a new select with all values under main one with already selected
if (field_dict.value.length > 0) {
// we need to add another select if initial one is empty
new_select_id = 'parallel_last' + field_id;
gadget.append('<br/><select class="dynamic serialize-able" name=' + tag_name + ':list ' + 'id=' + new_select_id + '></select>');
ERP5Form.addOptionTagList($("#"+new_select_id), field_dict.items, '');
}
return initial_select_dom;
},
CheckBoxField: function (field_id, field_dict) {
/* CheckBoxField field */
var checked, checkbox_dom;
checked = Boolean(field_dict.value);
checkbox_dom = $("input[name=" + this.getFieldId(field_id) + "]");
if (checked) {
checkbox_dom.attr('checked', true);
}
return checkbox_dom;
},
TextAreaField: function (field_id, field_dict) {
/* TextArea field */
return this.BaseInputField(field_id, field_dict);
},
StringField: function (field_id, field_dict) {
/* String field */
return this.BaseInputField(field_id, field_dict);
},
IntegerField: function (field_id, field_dict) {
/* Int field */
return this.BaseInputField(field_id, field_dict);
},
PasswordField: function (field_id, field_dict) {
/* PasswordField field */
return this.BaseInputField(field_id, field_dict);
},
DateTimeField: function (field_id, field_dict) {
/* DateTimeField field */
var date, dom, date_format;
dom = $("[name=" + this.getFieldId(field_id) + "]");
date = field_dict.value;
date_format = field_dict['format'];
if (date_format==="dmy") {
// XXX: support more formats
date_format = 'dd/mm/yy';
}
date = new Date(date);
dom.datepicker({ dateFormat: date_format});
dom.datepicker('setDate', date);
return dom;
},
EmailField: function (field_id, field_dict) {
/* Email field */
return this.BaseInputField(field_id, field_dict);
},
FloatField: function (field_id, field_dict) {
/* Float field */
return this.BaseInputField(field_id, field_dict);
},
FormBox: function (field_id, field_dict) {
/* FormBox field */
// XXX: implement it to read all values and render properly
return this.BaseInputField(field_id, field_dict);
},
RelationStringField: function (field_id, field_dict) {
/* Relation field */
return this.BaseInputField(field_id, field_dict);
},
MultiRelationStringField: function (field_id, field_dict) {
/* MultiRelationStringField field */
// XXX: support multiple values
return this.BaseInputField(field_id, field_dict);
},
ImageField: function (field_id, field_dict) {
/* Image field */
var dom;
dom = $("img[name=" + this.getFieldId(field_id) + "]");
// XXX: image field should return details like quality, etc ...
dom.attr("src", field_dict.value + "?quality=75.0&display=thumbnail&format=png");
},
ListBox: function (field_id, field_dict) {
/*
* Listbox field rendered at server
*/
var listbox_id, navigation_id, listbox_table, current_form_id, listbox_dict,
listbox_data_url, colModel, column_title_list;
listbox_id = "field_" + field_id;
navigation_id = listbox_id + "_pager";
listbox_table = $("#"+listbox_id + "_table");
current_form_id = this.getCurrentFormId();
listbox_dict = field_dict.listbox;
listbox_data_url = listbox_dict.listbox_data_url;
$("#" + listbox_id + "_field").html(listbox_dict["listbox_html"]);
return;
},
ListBoxJavaScript: function (field_id, field_dict) {
/*
* Listbox field rendered entirely at client side using jqgrid plugin
*/
var listbox_id, navigation_id, listbox_table, current_form_id, listbox_dict,
listbox_data_url, colModel, column_title_list;
listbox_id = "field_" + field_id;
navigation_id = listbox_id + "_pager";
listbox_table = $("#"+listbox_id);
current_form_id = this.getCurrentFormId();
listbox_dict = field_dict.listbox;
listbox_data_url = listbox_dict.listbox_data_url;
colModel = [];
column_title_list = [];
$.each(listbox_dict.columns,
function(i, value){
var index, title, column;
index = value[0];
title = value[1];
column_title_list.push(title);
column = {'name': index,
'index': index,
'width': 185,
'align': 'left'};
colModel.push(column);
});
listbox_table.jqGrid({url:listbox_data_url + '?form_id=' + current_form_id + '&amps;listbox_id=' + field_id,
datatype: "json",
colNames: column_title_list,
colModel: colModel,
rowNum: listbox_dict.lines,
pager: '#'+navigation_id,
sortname: 'id',
viewrecords: true,
sortorder: "desc",
loadError : function(xhr, textStatus, errorThrown) {
// XXX: handle better than just alert.
alert("Error occurred during getting data from server.");
},
cmTemplate: {sortable:false}, // XXX: until we get list of sortable columns from server
caption: field_dict.title});
listbox_table.jqGrid('navGrid', '#'+navigation_id, {edit:false,add:false,del:false});
return listbox_table;
},
update: function(data) {
/* Update form values */
$.each(data.form_data,
function(field_id, field_dict){
var type=field_dict.type,
dom;
if(ERP5Form.hasOwnProperty(type)){
dom = ERP5Form[type](field_id, field_dict);
}
// add a class that these fields are editable so asJSON
// can serialize for for sending to server
if (dom!==undefined && dom!==null && field_dict.editable){
dom.addClass(ERP5Form.SERIALIZE_ABLE_CLASS_NAME);
}
// mark required fields visually
if (field_dict.required){
//dom.parent().parent().parent().children("label").css("font-weight", "bold");}
dom.parent().parent().parent().addClass("required-field");
}
});
},
save: function(){
/* save form to server*/
var form_value_dict, converted_value;
form_value_dict = {};
$("." + ERP5Form.SERIALIZE_ABLE_CLASS_NAME).each(function(index){
// DOM can change values, i.e. alter checkbox (on / off)
var element = $(this),
name = element.attr("name"),
value = element.val(),
type = element.attr("type"),
element_class = element.attr("class");
if (type === "checkbox") {
value = element.is(":checked");
if (value === true) {
converted_value=1;
}
if (value === false) {
converted_value=0;
}
value = converted_value;
}
if (element_class.indexOf("hasDatepicker") !== -1) {
// backend codes expects that date object is represented by
// three separate request parameters so created them here.
// XXX: we assume format is dd/mm/YYYY so read it from DateTimeGadget for this field
// which means we now must be able get hold of gadget and read it from there where
// fist it should be initialized!)
form_value_dict["subfield_" + name + "_year"] = value.substr(6,4);
form_value_dict["subfield_" + name + "_month"] = value.substr(3,2);
form_value_dict["subfield_" + name + "_day"] = value.substr(0,2);
}
// XXX: how to handle file uploads ?
// some values end with :list and we need to collect them all
if (/:list$/.test(name)) {
if (form_value_dict[name] === undefined) {
// init it
form_value_dict[name] = [];
//console.log("init", name);
}
form_value_dict[name].push(value);
//console.log("set", name, form_value_dict[name]);
}
else {
// single value
form_value_dict[name] = value;
}
});
//console.log(form_value_dict);
// add form_id as we need to know structure we're saving at server side
form_value_dict.form_id = ERP5Form.getCurrentFormId();
// validation happens at server side
$.ajax({url:'Form_save',
data: form_value_dict,
dataType: "json",
// it's important for Zope to have traditional way of encoding an URL
traditional: 1,
success: function (data) {
var field_errors;
field_errors = data.field_errors;
if (field_errors!==undefined){
//console.log(field_errors);
$.each(field_errors, function(index, value){
var dom, field;
dom = $("[name=" + ERP5Form.getFieldId(index) + "]");
dom.addClass("validation-failed");
field = dom.parent().parent();
if (field.children("span.error").length > 0){
// just update message
field.children("span.error").html(value);}
else{
// no validation error message exists
field.append('<span class="error">' + value + '</span>');}
}
);}
else{
// validation OK at server side
$("span.error").each(function(index) {
// delete validation messages
var element;
element = $(this);
element.remove();
// XXX: remove all rendered in red input classes
$(".validation-failed").each(function () {
$(this).removeClass("validation-failed");
});
});
// show a fading portal_status_message
RenderJs.GadgetIndex.getGadgetById('portal_status_message').showMessage("Saved", 1000);
}
}});
},
onTabClickHandler: function (form_id) {
/*
* When a tab gets clicked change url (part after '#') so router can detect
change and load proper gadget.
This function preserves all URL arguments.
*/
window.location = window.location.toString().split('#')[0] + '#/'+form_id + '/';
return false;
},
openFormInTabbularGadget: function (container_id, form_id) {
/*
* Open a new tab containing an ERP5 form using RenderJs's TabbularGadget API.
*/
if (RenderJs.GadgetIndex.getGadgetById('gadget-' + form_id) === undefined) {
// do not load already existing tab gadget
RenderJs.TabbularGadget.addNewTabGadget(
container_id,
'gadget-' + form_id,
form_id + '/Form_asRenderJSGadget',
'ERP5Form.update',
'Form_asJSON?form_id=' + form_id);
RenderJs.TabbularGadget.toggleVisibility($('#' + form_id));
ERP5Form.setCurrentFormId(form_id);
// when all gadgets are loaded adjust left and right side of forms to have same height
RenderJs.bindReady(function () {
setTimeout(function() {
var left_height = $('fieldset.left').height(),
right_height = $('fieldset.right').height();
if (right_height <= left_height) {
$('fieldset.right').height(left_height);
}
else {
$('fieldset.left').height(right_height);
}
}, 500);
});
}
}
};} ());
<?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>__name__</string> </key>
<value> <string>erp5_form.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
// Contains ERP5 UI's build javascript code
var ERP5UI = ( function () {
function addOptionTagDict(dom, list) {
$.each(list, function (index,value) {
if (value.url!==undefined) {
dom.append('<option value="' + value.url + '">' + value.title + '</option>');
}
else {
dom.append('<option disabled="disabled">-- ' + value.title + ' --</option>');
}
});
}
return {
updateNavigationBox: function () {
/*
* Used by navigation_box gadget. Added here to reduce number of .js files.
*/
$.ajax({
url: "ERP5Site_getNavigationBoxActionList",
dataType: "json",
success: function (data) {
var module_dom = $('select[name="select_module"]'),
search_type_dom = $('select[name="field_your_search_portal_type"]'),
language_dom = $('select[name="select_language"]'),
favorite_dom = $('select[name="select_favorite"]');
ERP5Form.addOptionTagList(module_dom, data.module_list, "");
ERP5Form.addOptionTagList(search_type_dom, data.search_portal_type_list, "");
ERP5Form.addOptionTagDictList(language_dom, data.language_list);
// add global actions
addOptionTagDict(favorite_dom, data.favourite_dict.ordered_global_action_list);
// add user action
favorite_dom.append('<option disabled="disabled">-- User --</option>');
addOptionTagDict(favorite_dom, data.favourite_dict.user_action_list);
}
});
},
updateContextBox: function () {
/*
* Used by context_box gadget. Added here to reduce number of .js files.
*/
$.ajax({
url: "ERP5Site_getContextBoxActionList",
dataType: "json",
success: function (data) {
var jump_dom = $('select[name="select_jump"]'),
action_dom = $('select[name="select_action"]');
console.log(data);
addOptionTagDict(jump_dom, data.object_jump_list);
addOptionTagDict(jump_dom, data.type_info_list);
addOptionTagDict(jump_dom, data.workflow_list);
addOptionTagDict(action_dom, data.visible_allowed_content_type_list);
addOptionTagDict(action_dom, data.document_template_list);
addOptionTagDict(action_dom, data.object_workflow_action_list);
addOptionTagDict(action_dom, data.object_action_list);
addOptionTagDict(action_dom, data.object_view_list);
addOptionTagDict(action_dom, data.folder_action_list);
}
});
}
}} ());
<?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>__name__</string> </key>
<value> <string>erp5_ui.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
// JavaScript file that is used to load ERP5's JavaScript depenencies
require.config({
paths: {
"erp5_form": "gadget-style-lib/erp5_form",
route: "gadget-style-lib/route",
url: "gadget-style-lib/url",
jquery: "jquery/core/jquery",
renderjs: "jquery/plugin/renderjs/renderjs",
"jquery-ui": "jquery/ui/js/jquery-ui.min",
"jquery.jqGrid.src": "jquery/plugin/jqgrid/jquery.jqGrid.src",
"grid.locale-en": "jquery/plugin/jqgrid/i18n/grid.locale-en"
},
shim: {
erp5: ["jquery"],
erp5_xhtml_appearance: ["erp5"],
erp5_knowledge_box: ["jquery", "jquery-ui"],
route: ["jquery"],
url: ["jquery"],
"jquery-ui": ["jquery"],
"jquery.jqGrid.src": ["jquery"],
"grid.locale-en": ["jquery.jqGrid.src"]
}
});
require(["erp5_xhtml_appearance", "erp5_knowledge_box", "erp5", "erp5_form", "erp5_ui",
"renderjs", "jquery", "jquery-ui", "route", "url",
"jquery.jqGrid.src", "grid.locale-en"],
function(domReady) {
RenderJs.init();
RenderJs.bindReady(function (){
$.url.onhashchange(function () {
//console.log("go to route", $.url.getPath());
RenderJs.RouteGadget.go($.url.getPath(),
function () {
//console.log("bad route");
// All routes have been deleted by fail.
// So recreate the default routes using RouteGadget
RenderJs.RouteGadget.init();
});
});
});
});
<?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>__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>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*
RequireJS 2.1.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
Available via the MIT or new BSD license.
see: http://github.com/jrburke/requirejs for details
*/
var requirejs,require,define;
(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],
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("/"));
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,
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:
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"===
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)&&
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])||
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,
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=
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]=
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;
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&&
!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});
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=
[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,
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=
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,
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));
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;
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];
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=
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"===
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&&
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=[]);
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],
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"))&&
!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):
[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?
g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};l.exec=function(b){return eval(b)};l(q)}})(this);
<?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>__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>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>require.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, jQuery */
/*!
* route.js v1.0.0
*
* Copyright 2012, Romain Courteaud
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Date: Mon Jul 16 2012
*/
"use strict";
(function (window, $) {
$.extend({
StatelessDeferred: function () {
var doneList = $.Callbacks("memory"),
promise = {
done: doneList.add,
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
promise: function (obj) {
var i,
keys = ['done', 'promise'];
if (obj === undefined) {
obj = promise;
} else {
for (i = 0; i < keys.length; i += 1) {
obj[keys[i]] = promise[keys[i]];
}
}
return obj;
}
},
deferred = promise.promise({});
deferred.resolveWith = doneList.fireWith;
// All done!
return deferred;
}
});
var routes = [],
current_priority = 0,
methods = {
add: function (pattern, priority) {
var i = 0,
inserted = false,
length = routes.length,
dfr = $.StatelessDeferred(),
context = $(this),
escapepattern,
matchingpattern;
if (priority === undefined) {
priority = 0;
}
if (pattern !== undefined) {
// http://simonwillison.net/2006/Jan/20/escape/
escapepattern = pattern.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
matchingpattern = escapepattern
.replace(/<int:\w+>/g, "(\\d+)")
.replace(/<path:\w+>/g, "(.+)")
.replace(/<\w+>/g, "([^/]+)");
while (!inserted) {
if ((i === length) || (priority >= routes[i][2])) {
routes.splice(i, 0, [new RegExp('^' + matchingpattern + '$'), dfr, priority, context]);
inserted = true;
} else {
i += 1;
}
}
}
return dfr.promise();
},
go: function (path, min_priority) {
var dfr = $.Deferred(),
context = $(this),
result;
if (min_priority === undefined) {
min_priority = 0;
}
setTimeout(function () {
var i = 0,
found = false,
slice_index = -1,
slice_priority = -1;
for (i = 0; i < routes.length; i += 1) {
if (slice_priority !== routes[i][2]) {
slice_priority = routes[i][2];
slice_index = i;
}
if (routes[i][2] < min_priority) {
break;
} else if (routes[i][0].test(path)) {
result = routes[i][0].exec(path);
dfr = routes[i][1];
context = routes[i][3];
current_priority = routes[i][2];
found = true;
break;
}
}
if (i === routes.length) {
slice_index = i;
}
if (slice_index > -1) {
routes = routes.slice(slice_index);
}
if (found) {
dfr.resolveWith(
context,
result.slice(1)
);
} else {
dfr.rejectWith(context);
}
});
return dfr.promise();
},
};
$.routereset = function () {
routes = [];
current_priority = 0;
};
$.routepriority = function () {
return current_priority;
};
$.fn.route = function (method) {
var result;
if (methods.hasOwnProperty(method)) {
result = methods[method].apply(
this,
Array.prototype.slice.call(arguments, 1)
);
} else {
$.error('Method ' + method +
' does not exist on jQuery.route');
}
return result;
};
}(window, jQuery));
<?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>__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>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>route.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*!
* url.js v1.0.0
*
* Copyright 2012, Romain Courteaud
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Date: Mon Jul 16 2012
*/
"use strict";
(function (window, $) {
var hashchangeinitialized = false,
previousurl,
currentcallback,
getRawHash = function () {
return window.location.toString().split('#')[1];
},
callbackwrapper = function () {
if (previousurl !== window.location.hash) {
previousurl = window.location.hash;
if (currentcallback !== undefined) {
currentcallback();
}
}
},
timeoutwrapper = function () {
callbackwrapper();
window.setTimeout(timeoutwrapper, 500);
};
function UrlHandler() {}
UrlHandler.prototype = {
'generateUrl': function (path, options) {
var pathhash,
hash = '#',
key;
if (path !== undefined) {
hash += encodeURIComponent(path);
}
hash = hash.replace(/%2F/g, '/');
pathhash = hash;
for (key in options) {
if (options.hasOwnProperty(key)) {
if (hash === pathhash) {
hash = hash + '?';
} else {
hash = hash + '&';
}
hash += encodeURIComponent(key) +
'=' + encodeURIComponent(options[key]);
}
}
return hash;
},
'go': function (path, options) {
window.location.hash = this.generateUrl(path, options);
},
'redirect': function (path, options) {
var host = window.location.protocol + '//' +
window.location.host +
window.location.pathname +
window.location.search;
window.location.replace(host + this.generateUrl(path, options));
// window.location.replace(window.location.href.replace(/#.*/, ""));
},
'getPath': function () {
var hash = getRawHash(),
result = '';
if (hash !== undefined) {
result = decodeURIComponent(hash.split('?')[0]);
}
return result;
},
'getOptions': function () {
var options = {},
hash = getRawHash(),
subhashes,
subhash,
index,
keyvalue;
if (hash !== undefined) {
hash = hash.split('?')[1];
if (hash !== undefined) {
subhashes = hash.split('&');
for (index in subhashes) {
if (subhashes.hasOwnProperty(index)) {
subhash = subhashes[index];
if (subhash !== '') {
keyvalue = subhash.split('=');
if (keyvalue.length === 2) {
options[decodeURIComponent(keyvalue[0])] =
decodeURIComponent(keyvalue[1]);
}
}
}
}
}
}
return options;
},
'onhashchange': function (callback) {
previousurl = undefined;
currentcallback = callback;
if (!hashchangeinitialized) {
if (window.onhashchange !== undefined) {
$(window).bind('hashchange', callbackwrapper);
window.setTimeout(callbackwrapper);
} else {
timeoutwrapper();
}
hashchangeinitialized = true;
}
},
};
// Expose to the global object
$.url = new UrlHandler();
}(window, jQuery));
<?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>__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>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>url.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
.document .content{
min-height:100px;
}
.required-field label{
font-weight: bold;
}
.validation-failed {
border: 1px solid red;
}
.center_left {
float:left;
width: 50%;
}
.center_right {
float: left;
margin-left: 0.5%;
width: 47.5%;
}
fieldset.left {
margin-right:0px;
}
fieldset.right {
width:47.5%;
margin-left:0.5%;
}
.center_left,
.center_right{
border: 1px solid #97B0D1;
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
margin-bottom: 5px;
}
//portal_status_gadget CSS
#portal_status_message p {
display:none;
color:red;
}
\ No newline at end of file
<?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>__name__</string> </key>
<value> <string>gadget-style.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></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="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>gadgets</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Portal Gadgets</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>form</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="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>CheckBoxField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="checkbox"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>DateTimeField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="text"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>EditorField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<div tal:attributes="id field_name"/>
</tal:block>
\ No newline at end of file
<?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>EmailField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="text"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>FileField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="file"
size="20"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>FloatField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="text"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>FormBox</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="text"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>ImageField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<img alt=""
src=""
tal:attributes="name field_name">
</tal:block>
\ No newline at end of file
<?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>IntegerField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="text"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>LinesField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<textarea
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>ListBox</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<div tal:attributes="id string:${field_name}_field">
<!-- Listbox content -->
<table tal:attributes="id string:${field_name}">
</table>
</div>
<div tal:attributes="id string:${field_name}_pager">
<!-- Listbox navigation -->
</div>
</tal:block>
\ No newline at end of file
<?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>ListField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<select tal:attributes="name field_name"
size="1">
</select>
</tal:block>
\ No newline at end of file
<?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>MultiRelationStringField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name;
field_name_stipped python: field_name.replace('field_', '');
form_id request/form_id | options/form_id;">
<textarea tal:attributes="name field_name"/>
<input type="image"
name="portal_selections/viewSearchRelatedDocumentDialog0:method"
value="update..." src="images/exec16.png">
<a tal:attributes="href string:Base_jumpToRelatedDocument?field_id=${field_name_stipped}&amp;form_id=${form_id}">
<img alt="jump" src="images/jump.png">
</a>
</tal:block>
\ No newline at end of file
<?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>ParallelListField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<select tal:attributes="name string:subfield_${field_name}_default:list"
size="1">
</select>
<input type="hidden"
value="0"
class="serialize-able"
tal:attributes="name string:default_subfield_${field_name}_default:list:int">
</tal:block>
\ No newline at end of file
<?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>PasswordField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="password"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>RadioField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="text"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>RelationStringField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name;
field_name_stipped python: field_name.replace('field_', '');
form_id request/form_id | options/form_id;">
<input type="text"
tal:attributes="name field_name"/>
<input type="image" name="portal_selections/viewSearchRelatedDocumentDialog0:method"
value="update..." src="images/exec16.png">
<a tal:attributes="href string:Base_jumpToRelatedDocument?field_id=${field_name_stipped}&amp;form_id=${form_id}">
<img alt="jump" src="images/jump.png">
</a>
</tal:block>
\ No newline at end of file
<?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>ReportBox</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<input type="text"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>StringField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name;">
<input type="text"
tal:attributes="name field_name"/>
</tal:block>
\ No newline at end of file
<?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>TextAreaField</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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="field_name request/field_name | options/field_name">
<textarea tal:attributes="name field_name" cols="30" rows="4"></textarea>
</tal:block>
\ No newline at end of file
<?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>tabular_gadget</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="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>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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!-- Content -->
<div class="master"
id="master"
tal:define="portal here/portal_url/getPortalObject;
portal_path portal_path | portal/absolute_url;
action_context python: portal.restrictedTraverse(request.get('object_path', '?'), here);
actions python: here.Base_filterDuplicateActions(portal.portal_actions.listFilteredActionsFor(action_context));
url action_context/absolute_url;
current_form_id python: request.get('current_form_id', 'view');
current_url python: '%s/%s' % (url, current_form_id);
current_action python: portal.ERP5Site_getCurrentAction(current_url, actions);
actions actions/object_view | python: [];
action_id_list python:[x['url'].split('/')[-1] for x in actions];
data_gadget_property python: {'tab_container_id': 'form_gadget',
'default_tab_url': action_id_list[0],
'action_id_list': action_id_list}">
<div class="document">
<div class="actions">
<button onclick="javascript:ERP5Form.save(); return false;"
title="Save" class="save" type="submit">
<span class="image"></span>
<span class="description">Save</span>
</button>
<div data-gadget="erp5_tabbular_form_renderer"
id="erp5_tabbular_form_renderer"
tal:attributes="data-gadget-property python: here.Base_asJSON(data_gadget_property);"> </div>
<!-- get all tabs from server -->
<ul class="tabs">
<tal:block tal:repeat="action actions">
<li style="cursor:pointer;"
tal:define="action_form python: action['url'].split('/')[-1]"
tal:attributes="id action_form;
class python: action == current_action and 'selected' or 'not_selected'">
<a tal:attributes="onclick python: '''javascript: return ERP5Form.onTabClickHandler('%s')''' %action_form">
<span i18n:translate=""
i18n:domain="ui"
tal:content="action/name">action_name</span>
</a>
</li>
</tal:block>
</ul>
</div>
<div class="content editable">
<!--Form rendered content goes here -->
<div id="form_gadget"></div>
</div>
</div>
</div>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>getListBoxRenderer</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>HTML5</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>getListBoxRenderer</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="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>31.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_xhtml_gadget_style</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="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>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>ERP5Site_view</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>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
tal:define="tab here/ERP5Site_getSelectedTab;
preferred_access_tab python:here.portal_preferences.getPreferredHtmlStyleAccessTab()">
<tal:block tal:condition="python:tab is not None and preferred_access_tab">
<tal:block tal:define="tab_renderer_form_object python: getattr(here, tab['renderer'], None)">
<metal:block use-macro="here/erp5_site_main_template/macros/master">
<!--
<metal:block fill-slot="tabs">
<tal:block tal:replace="structure python:here.ERP5Site_renderTabList(selected_tab=tab['id'])" />
</metal:block>
<metal:block fill-slot="content">
<tal:block tal:condition="tab_renderer_form_object"
tal:replace="structure python: tab_renderer_form_object()" />
<tal:block tal:condition="not: tab_renderer_form_object">
Server side error.
</tal:block>
</metal:block>
-->
</metal:block>
</tal:block>
</tal:block>
<tal:block tal:condition="python:tab is None or not preferred_access_tab">
<tal:block tal:replace="structure here/ERP5Site_viewClassicFrontPage" />
</tal:block>
</tal:block>
\ No newline at end of file
<?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>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_site_main_template</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<metal:block define-macro="master">
<tal:block tal:define="title here/Title;
enctype string:multipart/form-data;
portal context/portal_url/getPortalObject;">
<tal:block metal:use-macro="here/main_template/macros/master">
<tal:block metal:fill-slot="main">
<tal:block tal:condition="here/portal_membership/isAnonymousUser">
<tal:block tal:define="dummy python:request.RESPONSE.redirect('%s/login_form' % portal.absolute_url())" />
</tal:block>
<tal:block tal:condition="python:not here.portal_membership.isAnonymousUser()">
<div class="index_html">
<div class="document">
<tal:block tal:condition="python: here.getPortalObject().restrictedTraverse('portal_gadgets', None) is not None">
<tal:block tal:condition="exists:here/ERP5Site_viewHomeAreaRenderer"
tal:replace="structure python: here.ERP5Site_viewHomeAreaRenderer(create_default_pad=True,
make_security_check=True)" />
</tal:block>
</div>
</div>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
</metal:block>
</tal:block>
\ No newline at end of file
<?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>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>form_view</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block metal:define-macro="master">
<tal:block metal:use-macro="here/view_main/macros/master">
<tal:block metal:fill-slot="main">
<!--<tal:block metal:use-macro="here/form_render/macros/master" />-->
</tal:block>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
<?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>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>template_erp5_xhtml_style</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>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block tal:replace="nothing">
<!--
IDEAS:
- Add callbacks to ERP5Form object (selection ?) to gather needed fields -> put them in http_parameter_list.
-->
</tal:block>
<tal:block metal:define-macro="master">
<tal:block tal:define="global_definitions_macros here/global_definitions/macros;
portal here/getPortalObject;
portal_url portal/absolute_url;
subject_list subject_list | python:here.getProperty('subject_list', []) or []">
<tal:block metal:use-macro="global_definitions_macros/header_definitions" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<base tal:attributes="href python: '%s/' % (url, )" />
<meta name="generator" content="ERP5 - Copyright (C) 2001 - 2008. All rights reserved." />
<meta name="description" content=""
tal:attributes="content description | title | string:ERP5 Free Open Source ERP and CRM" />
<meta name="keywords" content=""
tal:attributes="content python:', '.join(subject_list)" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title tal:define="title title | string:ERP5;
header_title header_title | nothing"
tal:content="python:header_title or '%s | %s' % (title, here.getPortalObject().title_or_id())"></title>
<tal:block tal:repeat="css css_list">
<link tal:attributes="href css" type="text/css" rel="stylesheet" />
</tal:block>
<tal:block tal:replace="nothing">
<!-- Render each field's css and javascript. -->
</tal:block>
<tal:block tal:condition="python: form is not None">
<tal:block tal:repeat="group python: [x for x in form.get_groups(include_empty=0) if x != 'hidden']">
<tal:block tal:repeat="field python: form.get_fields_in_group(group)">
<tal:block tal:define="css python: field.render_css(REQUEST=request)">
<style tal:condition="python: css is not None"
tal:content="css"
tal:attributes="type python:'text/css'">
</style>
</tal:block>
<tal:block tal:define="dummy python: js_list.extend(field.get_javascript_list(REQUEST=request))" />
</tal:block>
</tal:block>
</tal:block>
<link rel="stylesheet" type="text/css" media="screen" href="gadget-style.css" />
<link rel="stylesheet" type="text/css" media="screen" href="jquery/plugin/jqgrid/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="jquery/ui/css/erp5-theme/jquery-ui.css" />
<script data-main="gadget-style-lib/require-erp5.js"
type="text/javascript"
src="gadget-style-lib/require.js"></script>
<link rel="icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />
<tal:block metal:define-slot="head">
<!-- this is a placeholder for different extensions to head which could be required by web themes -->
</tal:block>
</head>
<body tal:attributes="class body_css_class|nothing">
<form id="main_form"
class="main_form"
onsubmit="changed=false; return true"
tal:attributes="enctype enctype | form/Form_getEnctype | nothing;
action url;
method python:str(path('form/method | string:post')).lower()">
<fieldset id="hidden_fieldset" class="hidden_fieldset">
<input tal:condition="form_action | nothing"
id="hidden_button" class="hidden_button" type="submit" value="dummy"
tal:attributes="name string:${form_action}:method" />
<tal:block metal:use-macro="global_definitions_macros/http_definitions" />
</fieldset>
<tal:block metal:define-slot="layout">
<div id="bars" class="bars">
<div id="main_bar"
tal:attributes="data-gadget string:${portal_url}/ERP5Site_renderNavigationBox"></div>
<div id="context_bar" class="context_bar">
<tal:block metal:define-slot="context_bar" />
</div>
</div>
<div id="status"
class="status"
data-gadget="ERP5Site_renderBreadcrumb"></div>
<div id="master" class="master">
<tal:block metal:define-slot="main" />
</div>
</tal:block>
</form>
</body>
</html>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
<?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>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>view_main</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block metal:define-macro="master">
<tal:block
tal:define="object_uid here/getUid | nothing;
object_path here/getPath | nothing;
form nocall: form | nothing;
form_id form/id | template/id | nothing;
portal here/getPortalObject;
form_action python: form and form.action not in ('', None) and portal.portal_membership.checkPermission('Modify portal content', here) and form.action or nothing;
local_parameter_list local_parameter_list | python: {};
dummy python: local_parameter_list.update({'object_uid': object_uid, 'object_path': object_path, 'form_id': form_id});
title python: '%s - %s' % (portal.Base_translateString(template.title_or_id()), here.getTitle());">
<tal:block metal:use-macro="here/main_template/macros/master">
<tal:block metal:fill-slot="context_bar">
<div id="context_box_render"
data-gadget="context_box_render_wrapper"></div>
</tal:block>
<tal:block metal:fill-slot="main">
<div id="content"
tal:attributes="data-gadget string:gadgets/tabular_gadget/gadget?object_path=${object_path}&current_form_id=${form_id}"></div>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
2013-08-28 arnaud.fontaine
* ZODB Components: Migrate Documents, Extensions and Tests.
2012-03-02 Ivan
* Initial work
\ No newline at end of file
Nexedi SA 2012
\ No newline at end of file
erp5_jquery
erp5_jquery_ui
erp5_jquery_plugin_renderjs
erp5_jquery_plugin_jqgrid
\ No newline at end of file
Ajax-zation of ERP5 user interface.
This is still considered a work in progress.
extension.erp5.HTML5
\ No newline at end of file
erp5_xhtml_gadget_core
erp5_xhtml_gadget_style
\ No newline at end of file
erp5_xhtml_gadget_style
\ 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