Commit 1996934a authored by Roque Porchetto's avatar Roque Porchetto

All UI changes added (website, webpages, etc)

parent 0e9f0ddf
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>DATA ARRAY Gadget</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script id="data-array-content" class="contact-list-template" type="text/x-handlebars-template">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"></div>
<div class="ui-block-b">
<ul data-role="listview" data-inset="true">
{{#each array_list}}
<li>
{{this}}
</li>
{{/each}}
</ul>
</div>
<div class="ui-block-c"></div>
</div>
</script>
</head>
<!--
<script src="ndarray.js"></script>
<script src="handlebars.js"></script>
<script src="gadget_erp5_pt_form_view.js" type="text/javascript"></script>
-->
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_data_array.js"></script>
<body>
<div data-gadget-url="gadget_erp5_pt_form_view.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
</body>
</html>
\ No newline at end of file
/*global window, rJS */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, calculatePageTitle, jIO) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_get", "jio_get")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.allowPublicAcquisition('updateHeader', function (argument_list) {
console.log("argumens:");
console.log(argument_list);
var header_dict = {
page_title: this.state.document_title,
selection_url: argument_list[0].selection_url,
next_url: argument_list[0].next_url,
previous_url: argument_list[0].previous_url
};
return this.updateHeader(header_dict);
})
.onStateChange(function () {
var gadget = this;
return gadget.getDeclaredGadget('form_view')
.push(function (form_gadget) {
return form_gadget.render({
erp5_document: {"_embedded": {"_view": {
"my_title" : {
"description": "The name of a document in ERP5",
"title": "Title",
"default": gadget.state.document_title,
"css_class": "",
"editable": 1,
"hidden": 0,
"key": "field_my_title",
"required": 0,
"type": "StringField"
},
"my_reference" : {
"description": "Reference of a page, should be unique to retrieve a page easily",
"title": "Reference",
"default": gadget.state.reference,
"css_class": "",
"editable": 1,
"hidden": 0,
"key": "field_my_reference",
"required": 0,
"type": "StringField"
},
"my_state" : {
"description": "The current state of the document.",
"title": "State",
"default": "Validated",
"css_class": "",
"editable": 1,
"hidden": 0,
"key": "field_my_state",
"required": 0,
"type": "StringField"
}
/*var column_list = [
['translated_title', 'Title'],
];*/
/*"listbox": {
"query": "urn:jio:allDocs?query=portal_type%3A%22Data+Array%22+AND+validation_state%3A%22validated%22",
//query: 'portal_type:"Data Array"' +
// ' AND validation_state:"validated"',
//select_list: ["title", "reference"],
}*/
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [
[
"left",
[["my_title"], ["my_reference"]]
],
[
"right",
[["my_state"]]
]
]
}
});
});
})
.declareMethod("render", function (options) {
var gadget = this;
return gadget.jio_get(options.jio_key)
.push(function (result) {
return gadget.changeState({"document_title" : result.title,
"reference" : result.reference});
});
});
}(window, rJS, RSVP, calculatePageTitle, jIO));
<!DOCTYPE html>
<html>
<!--
data-i18n=Title
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 PT Frontpage</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_FIF_page_front.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_erp5_pt_form_list.html"
data-gadget-scope="form_list"
data-gadget-sandbox="public">
</div>
</body>
</html>
\ No newline at end of file
/*global window, rJS */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.allowPublicAcquisition('updateHeader', function () {
return;
})
.allowPublicAcquisition('getUrlFor', function (argument_list) {
if (argument_list[0].command === 'index') {
return this.getUrlFor({command: 'index', options: {jio_key: argument_list[0].options.jio_key, page: "data_array"}});
}
return this.getUrlFor.apply(this, argument_list);
})
/*.allowPublicAcquisition('getUrlFor', function (argument_list) {
if (argument_list[0].command === 'index') {
return this.getUrlFor({command: 'display_stored_state', options: {jio_key: argument_list[0].options.jio_key}});
}
return this.getUrlFor.apply(this, argument_list);
})*/
.allowPublicAcquisition('getUrlParameter', function (argument_list) {
return this.getUrlParameter(argument_list)
.push(function (result) {
if ((result === undefined) && (argument_list[0] === 'field_listbox_sort_list:json')) {
return [['title', 'ascending']];
}
return result;
});
})
.declareMethod("triggerSubmit", function () {
var argument_list = arguments;
return this.getDeclaredGadget('form_list')
.push(function (gadget) {
return gadget.triggerSubmit.apply(gadget, argument_list);
});
})
.declareMethod("render", function () {
var gadget = this,
header_dict = {
page_title: 'Modules',
filter_action: true
};
return gadget.updateHeader(header_dict)
.push(function () {
return gadget.getDeclaredGadget('form_list');
})
.push(function (form_gadget) {
var column_list = [
['translated_title', 'Title'],
['reference', 'Reference'],
['version', 'version'],
['description', 'Description'],
['translated_validation_state_title', 'State']
];
return form_gadget.render({
erp5_document: {"_embedded": {"_view": {
"listbox": {
"column_list": column_list,
"show_anchor": 0,
"default_params": {},
"editable": 1,
"editable_column_list": [],
"key": "field_listbox",
"lines": 3,
"list_method": "portal_catalog",
"query": "urn:jio:allDocs?query=portal_type%3A%22Data+Array%22+AND+validation_state%3A%22validated%22",
/*
query: 'portal_type:"Data Array"' +
' AND validation_state:"validated"',
select_list: ["title", "reference"],
*/
"portal_type": [],
"search_column_list": column_list,
"sort_column_list": column_list,
"title": "Data Arrays",
"type": "ListBox"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}},
form_definition: {
group_list: [[
"bottom",
[["listbox"]]
]]
}
});
});
});
}(window, rJS));
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Fif Data Graph</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="dygraph.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_fifdata.js" type="text/javascript"></script>
</head>
<body>
<!--
<div data-gadget-url="gadget_fif_data_array_list.html"
data-gadget-scope="gadget_fif_data_array_list"
data-gadget-sandbox="public">
</div>
-->
<div data-gadget-url="gadget_FIF_page_front.html"
data-gadget-scope="gadget_FIF_page_front"
data-gadget-sandbox="public">
</div>
</body>
</html>
\ No newline at end of file
/*global window, rJS, RSVP, URI */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, URI, Dygraph) {
"use strict";
var ARRAY_VALUE_LENGTH = 8;
rJS(window)
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareMethod("render", function () {
var gadget = this;
var data_array_list = 1;
return new RSVP.Queue()
/*.push(function () {
return gadget.jio_allDocs({
query: 'portal_type:"Data Array"' +
' AND validation_state:"validated"',
select_list: ["title", "reference"],
limit: [0, 1000000]
});
})
.push(function (list) {
data_array_list = list;
return gadget.getDeclaredGadget("gadget_fif_data_array_list");
//RSVP.all([
//gadget.getDeclaredGadget("gadget_fif_data_array_list")
//]);
})
.push(function (my_gadget) {
return my_gadget.render(data_array_list);
})*/
.push(function (list) {
data_array_list = list;
return gadget.getDeclaredGadget("gadget_FIF_page_front");
})
.push(function (my_gadget) {
return my_gadget.render();
})
.push(function () {
return gadget.updateHeader({
page_title: 'FifData'
});
})
.push(undefined, function (error) {
console.log("FIF_GADGET: ERROR ");
console.log(error);
throw error;
});
});
}(window, rJS, RSVP, URI, Dygraph));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Section" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>__before_publishing_traverse__</string> </key>
<value>
<object>
<klass>
<global name="MultiHook" module="ZPublisher.BeforeTraverse"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_defined_in_class</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_hookname</string> </key>
<value> <string>__before_publishing_traverse__</string> </value>
</item>
<item>
<key> <string>_list</string> </key>
<value>
<list>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</list>
</value>
</item>
<item>
<key> <string>_prior</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>__before_traverse__</string> </key>
<value>
<dictionary>
<item>
<key>
<tuple>
<int>99</int>
<string>ERP5 Web Section/connection</string>
</tuple>
</key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>caching_policy/no-cache</string>
</tuple>
</value>
</item>
<item>
<key> <string>container_layout</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>content_layout</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>empty_criterion_valid</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>connection</string> </value>
</item>
<item>
<key> <string>layout_configuration_form_id</string> </key>
<value> <string>WebSection_viewRenderJSPreference</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Section</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>skin_selection_name</string> </key>
<value> <string>RJS</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Connection</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="WebSectionTraversalHook" module="Products.ERP5.Document.WebSection"/>
</pickle>
<pickle>
<dictionary/>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
erp5_web_renderjs_ui
\ No newline at end of file
web_site_module/fif_data_runner
web_page_module/fif_*
\ No newline at end of file
web_site_module/fif_data_runner
web_page_module/fif_*
\ No newline at end of file
web_page_module/fif_*
web_site_module/fif_data_runner
web_site_module/fif_data_runner/**
\ 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