...
 
Commits (34)
Showing 109 changed files with 3318 additions and 474 deletions
Changes
=======
0.4.65 (2019-10-30)
-------------------
* erp5.util:
- testnode: Allow to run scalability tests against already existing instance
0.4.64 (2019-10-10)
-------------------
......
......@@ -87,7 +87,8 @@ document_content = removeEmptyDetails(document.getTextContent())
document_theme = getThemeFromFirstFollowUpProduct(document_reference)
document_title = document.getTitle()
document_description = document.getDescription()
document_creation_year = document.getCreationDate().strftime('%Y')
document_creation_date = document.getCreationDate()
document_creation_year = document_creation_date.strftime('%Y') if document_creation_date else ''
document_theme_logo_url = "NXD-Media.Logo." + document_theme.capitalize()
document_theme_logo = context.restrictedTraverse(document_theme_logo_url)
document_claim = document_theme_logo.getDescription()
......
......@@ -28,7 +28,7 @@
# Cloudooo uses zip= argument, which is also a python builtin
# pylint: disable=redefined-builtin
from Products.ERP5OOo.Document.OOoDocument import OOoServerProxy
from Products.ERP5.Document.Document import DocumentConversionServerProxy
from base64 import b64encode, b64decode
from zExceptions import Unauthorized
......@@ -45,7 +45,7 @@ def convertDocumentByConversionServer(
if REQUEST is not None:
raise Unauthorized
proxy = OOoServerProxy(self)
proxy = DocumentConversionServerProxy(self)
return b64decode(
proxy.convertFile(
b64encode(data),
......
......@@ -56,8 +56,8 @@ leaflet_title = leaflet.getTitle()
leaflet_relative_url = leaflet.getRelativeUrl()
leaflet_language = leaflet.getLanguage()
leaflet_creation_date = leaflet.getCreationDate()
leaflet_date = leaflet_creation_date.strftime('%Y-%b')
leaflet_year = leaflet_creation_date.strftime('%Y')
leaflet_date = leaflet_creation_date.strftime('%Y-%b') if leaflet_creation_date else blank
leaflet_year = leaflet_creation_date.strftime('%Y') if leaflet_creation_date else blank
leaflet_reference = leaflet.getReference()
leaflet_version = leaflet.getVersion() or "001"
leaflet_aggregate_list = []
......
......@@ -60,7 +60,7 @@ release_creation_date = release.getCreationDate()
release_modification_date = release.getModificationDate()
release_aggregate_list = []
release_relative_url = release.getRelativeUrl()
release_creation_year = release_creation_date.strftime('%Y')
release_creation_year = release_creation_date.strftime('%Y') if release_creation_date else blank
#release_creation_month = release_creation_date.strftime('%b')
#release_date = ''.join([release_creation_month, "-", release_creation_year])
release_reference = release.getReference()
......
......@@ -201,7 +201,8 @@ doc_content = removeEmptyDetails(doc_dirty_content)
doc_title = doc.getShortTitle() or doc.getTitle()
doc_language = doc.getLanguage()
doc_description = doc.getDescription()
doc_creation_year = doc.getCreationDate().strftime('%Y')
doc_creation_date = doc.getCreationDate()
doc_creation_year = doc_creation_date.strftime('%Y') if doc_creation_date else blank
doc_version = doc.getVersion() or "001"
doc_reference = doc.getReference()
doc_relative_url = doc.getRelativeUrl()
......
......@@ -63,4 +63,4 @@ for image_url in image_url_list:
if format not in MARKER and quality not in MARKER:
# format is mandatory if it's missing then anyway URL request will fail so
# don't bother create an activity
document.activate(priority=4, tag="conversion").Base_callPreConvert(**convert_kw)
document.activate(priority=4, tag="conversion", activity="SQLQueue").Base_callPreConvert(**convert_kw)
......@@ -30,6 +30,9 @@
console.log("getGraphDataAndParameterFromConfiguration 1 configuration_dict", configuration_dict);
graph_data_and_parameter.data_list = [];
graph_data_and_parameter.layout = {modeBarButtonsToRemove: ['sendDataToCloud']};
if (configuration_dict.title !== undefined) {
graph_data_and_parameter.layout.title = configuration_dict.title;
}
function setCurrentData(axis_data) {
console.log("setCurrentData, axis_data", axis_data);
......
......@@ -120,6 +120,7 @@
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("getSettingList", "getSettingList")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
......@@ -134,14 +135,9 @@
app_actions,
app_view,
default_view;
return RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getSetting('app_view_reference'),
gadget.getSetting('default_view_reference'),
gadget.getSetting('app_actions')
]);
})
return gadget.getSettingList(['app_view_reference',
'default_view_reference',
'app_actions'])
.push(function (result_list) {
app_view = result_list[0];
default_view = result_list[1];
......@@ -240,14 +236,9 @@
app_allowed_sub_types,
form_info,
error;
return RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getSetting(portal_type_dict_setting),
gadget.getSetting("portal_skin_folder"),
gadget.getSetting("app_allowed_sub_types")
]);
})
return gadget.getSettingList([portal_type_dict_setting,
'portal_skin_folder',
'app_allowed_sub_types'])
.push(function (result_list) {
app_allowed_sub_types = result_list[2];
if (!result_list[1]) {
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.26807.33358.5717</string> </value>
<value> <string>979.7531.30512.46370</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1568651276.38</float>
<float>1571065275.72</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -12,6 +12,11 @@
<!-- custom script -->
<script src="gadget_erp5_page_ojs_local_controller.js" type="text/javascript"></script>
<div data-gadget-url="gadget_officejs_common_util.html"
data-gadget-scope="common_util"
data-gadget-sandbox="public">
</div>
</head>
<body>
</body>
......
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.15823.10779.36625</string> </value>
<value> <string>979.7467.57626.53282</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1563811084.56</float>
<float>1571061400.65</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -3,6 +3,46 @@
(function (document, window, rJS, RSVP, jIO, console) {
"use strict";
var warmup_gadget_done = false,
warmup_list = [
//officejs gadgets
'gadget_officejs_form_view.html',
'gadget_officejs_common_util.html',
'gadget_erp5_label_field.html',
'gadget_html5_element.html',
'gadget_erp5_field_datetime.html',
'gadget_erp5_field_string.html',
'gadget_erp5_form.html',
'gadget_erp5_field_float.html',
'gadget_erp5_field_listbox.html',
// Used in panel
'gadget_translation.html',
'gadget_erp5_panel.html',
'gadget_erp5_header.html',
'gadget_erp5_searchfield.html',
'gadget_erp5_field_multicheckbox.html',
'gadget_html5_input.html',
//following elements should be split in at list 2 groups (doclist and doc)
'gadget_erp5_pt_form_list',
'gadget_erp5_pt_form_view.html',
//
'gadget_erp5_pt_form_view_editable.html',
'gadget_erp5_field_textarea.html',
'gadget_erp5_field_gadget.html',
'gadget_html5_textarea.html',
'gadget_editor.html'
];
function warmupGadgetList(gadget, url_list) {
var i;
for (i = 0; i < url_list.length; i += 1) {
// No need to check the result, as it will fail later
// when rJS will try to instanciate one of this gadget
rJS.declareGadgetKlass(rJS.getAbsoluteURL(url_list[i],
gadget.__path));
}
}
rJS(window)
/////////////////////////////////////////////////////////////////
......@@ -11,7 +51,7 @@
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("jio_put", "jio_put")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("getSettingList", "getSettingList")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
......@@ -25,15 +65,20 @@
gadget_util,
jio_document,
portal_type,
parent_portal_type,
current_version,
index;
current_version = window.location.href.replace(window.location.hash, "");
index = current_version.indexOf(window.location.host) +
window.location.host.length;
current_version = current_version.substr(index);
return gadget.getSetting("migration_version")
.push(function (migration_version) {
if (migration_version !== current_version) {
return gadget.getSettingList(["migration_version",
"app_view_reference",
"parent_portal_type"])
.push(function (setting_list) {
app_view = options.action || setting_list[1];
parent_portal_type = setting_list[2];
if (setting_list[0] !== current_version) {
//if app version has changed, force storage selection
return gadget.redirect({
'command': 'display',
......@@ -45,14 +90,14 @@
}
})
.push(function () {
return RSVP.all([
gadget.declareGadget("gadget_officejs_common_util.html"),
gadget.getSetting('app_view_reference')
]);
if (!warmup_gadget_done) {
warmupGadgetList(gadget, warmup_list);
warmup_gadget_done = true;
}
return gadget.getDeclaredGadget("common_util");
})
.push(function (result_list) {
gadget_util = result_list[0];
app_view = options.action || result_list[1];
.push(function (result) {
gadget_util = result;
return gadget.jio_get(options.jio_key);
})
.push(function (result) {
......@@ -63,7 +108,7 @@
}, function (error) {
// instaceof error is Object, so use status_code and undefined jio_key
if (error.status_code === 400 && !options.jio_key) {
return gadget.getSetting('parent_portal_type');
return parent_portal_type;
}
throw error;
})
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.57300.17773.6331</string> </value>
<value> <string>979.7618.39284.59767</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1570117898.93</float>
<float>1571070879.6</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -175,6 +175,13 @@
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("getContent", function (argument_list) {
return this.getDeclaredGadget('erp5_pt_gadget')
.push(function (child_gadget) {
return child_gadget.getContent();
});
})
.declareMethod("triggerSubmit", function (argument_list) {
var gadget = this, child_gadget, content_dict;
return gadget.getDeclaredGadget('erp5_pt_gadget')
......@@ -306,13 +313,10 @@
}}
];
erp5_document = form_json.erp5_document;
return RSVP.all([
gadget.getUrlForList(url_for_parameter_list)
]);
return gadget.getUrlForList(url_for_parameter_list);
})
.push(function (result_list) {
var url_list = result_list[0],
header_dict = { "page_title": page_title };
.push(function (url_list) {
var header_dict = { "page_title": page_title };
if (options.form_type === 'dialog') {
//TODO: find correct url
header_dict.cancel_url = url_list[6];
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.63202.6561.35293</string> </value>
<value> <string>979.7520.54247.47189</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1570539644.03</float>
<float>1571065315.5</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -86,13 +86,14 @@
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("getSettingList", "getSettingList")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod('getUrlFor', 'getUrlFor')
.declareMethod('updateConfiguration', function (appcache_storage, origin_url,
.declareMethod('updateConfiguration', function (jio_appchache_options, origin_url,
migration_version, current_version,
storage_name) {
var appcache_storage = jIO.createJIO(jio_appchache_options);
if (!appcache_storage) { return; }
var gadget = this,
document_id_list = [origin_url,
......@@ -142,15 +143,10 @@
previous_storage_name,
index,
origin_url = window.location.href;
return RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getSetting('configuration_manifest'),
gadget.getSetting('jio_storage_name'),
gadget.getSetting('previous_storage_name'),
gadget.getSetting('migration_version')
]);
})
return gadget.getSettingList(['configuration_manifest',
'jio_storage_name',
'previous_storage_name',
'migration_version'])
.push(function (result_list) {
selected_storage_name = result_list[1];
previous_storage_name = result_list[2];
......@@ -204,14 +200,14 @@
if (result_list[0] === undefined) { return; }
if (selected_storage_name === undefined) { return; }
gadget.state_parameter_dict.jio_storage_name = selected_storage_name;
appcache_storage = jIO.createJIO(jio_appchache_options);
current_version = window.location.href.replace(window.location.hash, "");
index = current_version.indexOf(window.location.host) + window.location.host.length;
current_version = current_version.substr(index);
if (migration_version !== current_version ||
previous_storage_name !== selected_storage_name) {
return gadget.updateConfiguration(appcache_storage, origin_url, migration_version,
current_version, selected_storage_name);
return gadget.updateConfiguration(jio_appchache_options, origin_url,
migration_version, current_version,
selected_storage_name);
}
})
.push(undefined, function (error) {
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>979.3132.57631.22818</string> </value>
<value> <string>979.7652.21916.23961</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1570799816.86</float>
<float>1571071046.04</float>
<string>UTC</string>
</tuple>
</state>
......
/*
-------------------------------------------------------------------------
----------------------------- Dygraph -----------------------------------
-------------------------------------------------------------------------
*/
body .dygraph-legend {
left: 15%;
top: 5%;
}
body .dygraph-legend > span {
display: block;
}
/*
-------------------------------------------------------------------------
----------------------------- Masonry -----------------------------------
-------------------------------------------------------------------------
*/
.ui-masonry-container {
margin-top: -5em;
margin-top: -5em;
}
.ui-masonry-container > ul {
margin: 1.5em 0;
......@@ -156,15 +169,15 @@
position: relative;
}
.custom-software-profile-image-wrapper img {
max-height: 100%;
max-width: 100%;
max-height: 100%;
max-width: 100%;
width: auto;
height: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
padding: .25em;
-moz-box-sizing: border-box;
......@@ -173,7 +186,7 @@
}
@media (max-width: 40em) {
.custom-software-profile-image-wrapper {
margin: 0 auto;
margin: 0 auto;
}
}
......@@ -292,15 +305,15 @@
padding-top: 80vh;
}
.ui-banner-section img {
/* max-height: 100%; */
max-width: 100%;
/* max-height: 100%; */
max-width: 100%;
width: auto;
height: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
z-index: -1;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
......@@ -366,7 +379,51 @@ div[data-gadget-scope='header'] .ui-header {
.document_table table tbody tr th:not(:first-child) {
text-align: right;
}
/* break lines... hacky */
.financial_listbox .document_table tbody tr td:not(:first-of-type) a {
display: table-caption;
text-align: left;
padding: 0;
margin: 0;
}
@media (max-width: 45em) {
.financial_listbox .document_table tbody tr td:not(:first-of-type) a {
display: block;
}
.financial_listbox .document_table table tbody tr {
height: auto;
}
.document_table table tbody tr td:first-child ~ th:not(:last-child) a:not(:empty):after, .document_table table tbody tr th:first-child ~ th:not(:last-child) a:not(:empty):after, .document_table
table tbody tr td:first-child ~ td:not(:last-child) a:not(:empty):after, .document_table table tbody tr th:first-child ~ td:not(:last-child) a:not(:empty):after, .document_table table tbody tr td:first-child ~ th:not(:last-child) label:not(:empty):after, .document_table table tbody tr th:first-child ~ th:not(:last-child) label:not(:empty):after, .document_table table tbody tr td:first-child ~ td:not(:last-child) label:not(:empty):after, .document_table table tbody tr th:first-child ~ td:not(:last-child) label:not(:empty):after {
content: none;
}
.document_table table tbody tr td:first-child ~ th, .document_table table tbody tr th:first-child ~ th, .document_table table tbody tr td:first-child ~ td, .document_table table tbody tr th:first-child ~ td {
display: inherit;
}
.financial_listbox tbody tr td:not(:first-child) {
margin-left: 5em;
}
.financial_listbox tbody tr td:nth-child(2):before {
content: "Staff";
position: absolute;
left: .5em;
}
.financial_listbox tbody tr td:nth-child(3):before {
content: "Assets";
position: absolute;
left: .5em;
}
.financial_listbox tbody tr td:nth-child(4):before {
content: "Revenues";
position: absolute;
left: .5em;
}
.financial_listbox tbody tr td:nth-child(5):before {
content: "Earnings";
position: absolute;
left: .5em;
}
}
/* align header and background colors */
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button, div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a,
div[data-gadget-scope='header'] .ui-header h1 {
......@@ -416,7 +473,10 @@ div[data-gadget-scope='panel'] {
padding: 0 1em;
display: block;
}
.ui-custom-content a {
text-decoration: underline;
color: lightblue;
}
......
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Graph</title>
<link rel="stylesheet" href="dygraph.css" />
<link rel="stylesheet" href="gadget_erp5_afs.css" />
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<script src="dygraph.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_afs_dygraph.js" type="text/javascript"></script>
</head>
<body>
<div class="dygraph-multibar dygraph-fullsize-chart chart"></div>
</body>
</html>
\ No newline at end of file
/*globals window, RSVP, rJS, Dygraph, Date, Object, Intl*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, RSVP, rJS, Dygraph, Date, Object, Intl) {
"use strict";
// Darken a color
function darkenColor(colorStr) {
// Defined in dygraph-utils.js
var color = Dygraph.toRGB_(colorStr);
color.r = Math.floor((255 + color.r) / 2);
color.g = Math.floor((255 + color.g) / 2);
color.b = Math.floor((255 + color.b) / 2);
return 'rgb(' + color.r + ',' + color.g + ',' + color.b + ')';
}
function multiColumnBarPlotter(e) {
var g,
ctx,
set,
y_bottom,
min_sep,
j,
points,
sep,
sets,
bar_width,
fillColors,
strokeColors,
i,
k,
l,
m,
p,
center_x,
x_left;
if (e.seriesIndex !== 0) {
return;
}
g = e.dygraph;
ctx = e.drawingContext;
sets = e.allSeriesPoints;
y_bottom = e.dygraph.toDomYCoord(0);
min_sep = Infinity;
// Find the minimum separation between x-values.
// This determines the bar width.
for (j = 0; j < sets.length; j += 1) {
points = sets[j];
for (i = 1; i < points.length; i++) {
sep = points[i].canvasx - points[i - 1].canvasx;
if (sep < min_sep) {
min_sep = sep;
}
}
}
bar_width = Math.floor(2.0 / 3 * min_sep);
fillColors = [];
strokeColors = g.getColors();
for (m = 0; m < strokeColors.length; m += 1) {
fillColors.push(darkenColor(strokeColors[m]));
}
for (k = 0; k < sets.length; k += 1) {
ctx.fillStyle = fillColors[k];
ctx.strokeStyle = strokeColors[k];
for (l = 0; l < sets[k].length; l += 1) {
p = sets[k][l];
center_x = p.canvasx;
x_left = center_x - (bar_width / 2) * (1 - k / (sets.length - 1));
ctx.fillRect(
x_left,
p.canvasy,
bar_width / sets.length,
y_bottom - p.canvasy
);
ctx.strokeRect(
x_left,
p.canvasy,
bar_width / sets.length,
y_bottom - p.canvasy
);
}
}
}
function prepDataSet(my_data) {
return Object.keys(my_data).map(function (year) {
var reported_year = my_data[year];
return [
new Date(year + "/6/30"),
reported_year.total_assets.value,
reported_year.revenues.value,
reported_year.earnings.value,
reported_year.staff.value
];
});
}
function getElem(my_element, my_selector) {
return my_element.querySelector(my_selector);
}
rJS(window)
.ready(function (gadget) {
gadget.property_dict = {
"graph_wrapper": getElem(gadget.element, ".dygraph-multibar"),
"graph": null,
"deferred": new RSVP.defer()
};
// disable zoom
Dygraph.prototype.doZoomY_ = function () {
return;
};
Dygraph.prototype.doZoomX_ = function () {
return;
};
})
.declareMethod("render", function (options) {
var gadget = this,
dict = gadget.property_dict;
return dict.deferred.resolve(options.data);
})
.declareMethod("renderGraph", function (my_data) {
var gadget = this;
var dict = gadget.property_dict;
dict.graph = new Dygraph(
dict.graph_wrapper,
prepDataSet(my_data),
{
dateWindow: [ Date.parse("2016/01/01"), Date.parse("2019/01/01")],
legend: 'always',
drawPoints: true,
title: 'Aggregate Financial Performance',
width: "auto",
height: 720,
maxNumberWidth: 20,
includeZero: true,
plotter: multiColumnBarPlotter,
axes : {
x : {
axisLabelFormatter: function (d) {
return d.getFullYear();
},
valueFormatter: function (ms) {
return new Date(ms).getFullYear();
}
},
y: {
axisLabelWidth: 100,
valueFormatter: function (value) {
return new Intl.NumberFormat('en-EN', {
style: 'currency',
currency: 'EUR',
minimumFractionDigits: "0"
}).format(value);
}
},
y2: {
labelsKMB: true,
axisLabelWidth: 100,
independentTicks: true
}
},
labels: ["Year", "Total Assets", "Revenues", "Earnings", "Staff"],
series: {
"Staff": {
axis: "y2"
}
}
}
);
})
.declareService(function () {
var gadget = this,
dict = gadget.property_dict;
return new RSVP.Queue()
.push(function () {
return dict.deferred.promise;
})
.push(function (my_data) {
return gadget.renderGraph(my_data);
});
});
}(window, RSVP, rJS, Dygraph, Date, Object, Intl));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_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>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_afs_dygraph.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Dygraph generator</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_erp5_afs_dygraph_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget AFS Page Dygraph JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</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>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</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>1567690871.98</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.57267.40535.56064</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</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>1570115778.54</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</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>1567690654.66</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>959.45138.58632.4420</string> </value>
<value> <string>978.57314.3759.273</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1496066128.63</float>
<float>1570118702.65</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -35,6 +35,7 @@
<li class="ui-first-child"><a href="{{directory_href}}" class="ui-btn ui-btn-icon-left ui-icon-table" data-i18n="Directory" accesskey="d">Directory</a></li>
<li><a href="{{publisher_statistic_href}}" class="ui.btn ui-btn-icon-left ui-icon-trophy" data-i18n="Statistics" accesskey="t">Statistics</a></li>
<li><a href="{{publisher_href}}" class="ui-btn ui-btn-icon-left ui-icon-university" data-i18n="Publishers" accesskey="a">Publishers</a></li>
<li><a href="{{financial_href}}" class="ui-btn ui-btn-icon-left ui-icon-euro" data-i18n="Financial Data" accesskey="f">Financial Data</a></li>
<li><a href="{{software_href}}" class="ui-btn ui-btn-icon-left ui-icon-cube" data-i18n="Software Products" accesskey="p">Software Products</a></li>
<li class="ui-last-child"><a href="{{success_case_href}}" class="ui-btn ui-btn-icon-left ui-icon-book" data-i18n="Success Cases" accesskey="s">Success Cases</a></li>
<!--div>
......@@ -65,7 +66,8 @@
<!--li class="ui-last-child"><a href="{{logout_href}}" class="ui-btn ui-btn-icon-left ui-icon-power-off" data-i18n="Logout" accesskey="o">Logout</a></li -->
</ul>
<br/>
<p class="ui-custom-content">Powered by: <br/><a href="http://fdl-lef.org">Fond de Dotation du Libre</a>.</p>
<p class="ui-custom-content">Powered by: <br/><a href="http://fdl-lef.org">Fonds de Dotation du Libre</a></p>
<p class="ui-custom-content">Contribute on: <br/><a href="https://github.com/Fonds-de-Dotation-du-Libre/awesome-free-software">Awesome Free Software (on Github)</a></p>
</div>
</script>
......@@ -76,6 +78,6 @@
<body>
<div class="jqm-navmenu-panel"></div>
</body>
</html>
\ No newline at end of file
......@@ -52,7 +52,8 @@
g.getUrlFor({command: 'display', options: {page: "afs_publisher_statistic"}}),
g.getUrlFor({command: 'display', options: {page: "afs_publisher_list"}}),
g.getUrlFor({command: 'display', options: {page: "afs_software_list"}}),
g.getUrlFor({command: 'display', options: {page: "afs_success_case_list"}})
g.getUrlFor({command: 'display', options: {page: "afs_success_case_list"}}),
g.getUrlFor({command: 'display', options: {page: "afs_financial_list"}})
]);
})
.push(function (all_result) {
......@@ -63,6 +64,7 @@
"directory_href": all_result[0],
"publisher_statistic_href": all_result[1],
"publisher_href": all_result[2],
"financial_href": all_result[5],
"software_href": all_result[3],
"success_case_href": all_result[4]
});
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>959.45262.19816.34594</string> </value>
<value> <string>978.13614.57660.49134</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1496066838.57</float>
<float>1567689087.36</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -8,13 +8,15 @@
// NOTE: requires Website Layout Configuration CSP modification
// => connect-src 'self' https://raw.githubusercontent.com https://api.github.com data:;
// NOTE: moved repo
//https://api.github.com/repos/Fonds-de-Dotation-du-Libre/awesome-free-software
//https://api.github.com/repos/Nexedi/awesome-free-software
//https://api.github.com/repos/Nexedi/awesome-free-software/contents/?ref=master
//https://api.github.com/repos/Nexedi/awesome-free-software/contents/alfresco.json
//https://raw.githubusercontent.com/Nexedi/awesome-free-software/master/alfresco.json
this._href = spec.href || 'https://api.github.com/repos/';
this._user = spec.user || 'Nexedi';
this._user = spec.user || 'Fonds-de-Dotation-du-Libre';
this._repo = spec.repo || 'awesome-free-software';
}
......
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Financial Data</title>
<link rel="stylesheet" href="gadget_erp5_afs.css" />
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_afs_financial_list.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_erp5_afs_dygraph.html"
data-gadget-scope="dygraph"
data-gadget-sandbox="public">
</div>
<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
/*globals window, RSVP, rJS*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, RSVP, rJS) {
"use strict";
rJS(window)
.declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.allowPublicAcquisition('updateHeader', function () {
return;
})
.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("render", function () {
var gadget = this,
kpi_data;
return new RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.updateHeader({page_title: "Financial Data"}),
gadget.getUrlParameter("extended_search")
]);
})
.push(function () {
return RSVP.all([
gadget.getDeclaredGadget("dygraph"),
gadget.getDeclaredGadget("form_list"),
gadget.jio_allDocs({
query: 'portal_type: "kpi"',
select_list: ['data']
})
]);
})
.push(function (response_list) {
var column_list = [
//['logo', 'Logo'],
['title', 'Title'],
['staff', 'Staff'],
['total_assets', 'Total Assets'],
['revenues', 'Revenues'],
['earnings', 'Earnings']
];
return RSVP.all([
response_list[0].render({
data: response_list[2].data.rows[0].value.data
}),
response_list[1].render({
erp5_document: {
"_embedded": {
"_view": {
"listbox": {
"column_list": column_list,
"show_anchor": 0,
"default_params": {},
"editable": 0,
"key": "field_listbox",
"lines": 20,
"css_class": "financial_listbox",
"list_method": "portal_catalog",
"query": 'urn:jio:allDocs?query=' + 'portal_type:' +
'"publisher"',
"portal_type": [],
"search_column_list": column_list,
"sort_column_list": column_list,
"sort_on": ["title", "ascending"],
"title": "Documents",
"type": "ListBox"
}
}
},
"_links": {"type": { name: ""}}
},
form_definition: {
group_list: [
[
"bottom",
[["listbox"]]
],
[
"hidden",
["listbox_modification_date"]
]
]
}
})
]);
});
});
}(window, RSVP, rJS));
\ No newline at end of file
......@@ -52,7 +52,7 @@
} else {
software.success_case_list = software.success_case_list
.filter(function (entry) {
if (!!EMPTY.includes(entry.title)) {
if (!EMPTY.includes(entry.title)) {
return entry;
}
});
......@@ -80,7 +80,6 @@
);
}
});
return new RSVP.Queue()
.push(function () {
return RSVP.all(wiki_list);
......
......@@ -70,19 +70,19 @@
}
}
},
form_definition: {
group_list: [
[
"bottom",
[["listbox"]]
],
[
"hidden",
["listbox_modification_date"]
form_definition: {
group_list: [
[
"bottom",
[["listbox"]]
],
[
"hidden",
["listbox_modification_date"]
]
]
]
}
});
}
});
});
});
}(window, RSVP, rJS));
\ No newline at end of file
......@@ -337,7 +337,7 @@
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'self\'; img-src \'self\' https://images.unsplash.com * data:; media-src \'self\' blob:; connect-src \'self\' https://api.unsplash.com https://en.wikipedia.org https://fr.wikipedia.org https://raw.githubusercontent.com https://api.github.com data:; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' data:; frame-src \'self\' data:</string> </value>
<value> <string>default-src \'self\'; img-src \'self\' https://images.unsplash.com * data:; media-src \'self\' blob:; connect-src \'self\' https://api.unsplash.com https://en.wikipedia.org https://fr.wikipedia.org https://raw.githubusercontent.com https://api.github.com data:; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
</item>
<item>
<key> <string>configuration_default_view_action_reference</string> </key>
......@@ -600,7 +600,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>3</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -614,7 +614,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>959.30886.17996.5358</string> </value>
<value> <string>978.15528.13706.25002</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -632,7 +632,7 @@
</tuple>
<state>
<tuple>
<float>1495226845.13</float>
<float>1567697804.89</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -245,6 +245,31 @@
<td>//div[contains(@class, 'custom-success-story-image-wrapper')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Menu']</td>
<td></td>