Commit 62c7c2fc authored by Romain Courteaud's avatar Romain Courteaud

Revert "WIP erp5_web_renderjs_ui: try to make the panel configurable"

This reverts commit ca0fe7b8.
parent 87a92165
......@@ -466,7 +466,7 @@ img {
/**********************************************
* Gadget: panel
**********************************************/
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] {
div[data-gadget-scope='panel'] {
background-color: #393939;
color: #FFFFFF;
width: 180pt;
......@@ -482,29 +482,29 @@ div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] {
transform: translate3d(0, 0, 0);
}
@media not screen and (min-width: 45em), only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] {
div[data-gadget-scope='panel'] {
box-shadow: 5px 0 5px rgba(0, 0, 0, 0.15);
}
}
@media not screen and (min-width: 45em), only screen and (min-width: 45em) and (max-width: 85em) {
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] {
div[data-gadget-scope='panel'] {
left: -186pt;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"].visible {
div[data-gadget-scope='panel'].visible {
transform: translate3d(186pt, 0, 0);
}
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-role="header"] {
div[data-gadget-scope='panel'] div[data-role="header"] {
display: flex;
justify-content: flex-start;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-role="header"] .panel_img {
div[data-gadget-scope='panel'] div[data-role="header"] .panel_img {
text-align: center;
flex: 1;
height: 30pt;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-role="header"] button,
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-role="header"] a {
div[data-gadget-scope='panel'] div[data-role="header"] button,
div[data-gadget-scope='panel'] div[data-role="header"] a {
width: 3em;
overflow: hidden;
text-indent: -9999px;
......@@ -514,49 +514,49 @@ div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[d
line-height: 30pt;
color: #FFFFFF;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-role="header"] button::before,
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-role="header"] a::before {
div[data-gadget-scope='panel'] div[data-role="header"] button::before,
div[data-gadget-scope='panel'] div[data-role="header"] a::before {
float: left;
text-indent: 0;
margin-left: 12pt;
}
@media not screen and (max-width: 85em) {
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-role="header"] button[data-i18n="Close"],
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-role="header"] a[data-i18n="Close"] {
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='panel'] div[data-role="header"] button[data-i18n="Close"],
div[data-role='page']:not(.desktop-panel-hidden) div[data-gadget-scope='panel'] div[data-role="header"] a[data-i18n="Close"] {
display: none;
}
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-gadget-scope='erp5_searchfield'] {
div[data-gadget-scope='panel'] div[data-gadget-scope='erp5_searchfield'] {
padding: 3pt 12pt;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-gadget-scope='erp5_searchfield'] button {
div[data-gadget-scope='panel'] div[data-gadget-scope='erp5_searchfield'] button {
color: #FFFFFF;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-gadget-scope='erp5_searchfield'] input[type="search"] {
div[data-gadget-scope='panel'] div[data-gadget-scope='erp5_searchfield'] input[type="search"] {
color: #FFFFFF !important;
background-color: #767676 !important;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] img {
div[data-gadget-scope='panel'] img {
text-align: left;
height: 100%;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-gadget-scope="erp5_checkbox"] {
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] {
padding: 3pt;
padding-left: 12pt;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-gadget-scope="erp5_checkbox"] label,
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-gadget-scope="erp5_checkbox"] span,
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-gadget-scope="erp5_checkbox"] input {
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] label,
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] span,
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] input {
cursor: pointer;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] div[data-gadget-scope="erp5_checkbox"] span {
div[data-gadget-scope='panel'] div[data-gadget-scope="erp5_checkbox"] span {
width: 24pt;
display: inline-block;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] ul:first-child {
div[data-gadget-scope='panel'] ul:first-child {
margin-top: 30pt;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] ul li a {
div[data-gadget-scope='panel'] ul li a {
color: #FFFFFF;
display: block;
padding: 1.5pt;
......@@ -565,29 +565,29 @@ div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] ul li
overflow: hidden;
white-space: nowrap;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] ul li a.active {
div[data-gadget-scope='panel'] ul li a.active {
color: #1F1F1F;
background-color: #FFFFFF;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] ul li a:hover,
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] ul li a:active {
div[data-gadget-scope='panel'] ul li a:hover,
div[data-gadget-scope='panel'] ul li a:active {
color: #FFFFFF;
background-color: #1F1F1F;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] ul li a::before {
div[data-gadget-scope='panel'] ul li a::before {
width: 24pt;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl {
div[data-gadget-scope='panel'] dl {
background-color: #767676;
color: #1F1F1F;
transform-origin: 50% 0;
transform: scaleY(0);
transition: transform 0.2s ease-out;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl:not(:empty) {
div[data-gadget-scope='panel'] dl:not(:empty) {
transform: scaleY(1);
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl dt {
div[data-gadget-scope='panel'] dl dt {
padding: 1.5pt;
padding-left: 12pt;
text-overflow: ellipsis;
......@@ -595,10 +595,10 @@ div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl dt
white-space: nowrap;
text-transform: uppercase;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl dt::before {
div[data-gadget-scope='panel'] dl dt::before {
width: 24pt;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl dd a {
div[data-gadget-scope='panel'] dl dd a {
color: #FFFFFF;
display: block;
padding: 1.5pt;
......@@ -608,16 +608,16 @@ div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl dd
white-space: nowrap;
padding-left: 36pt;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl dd a.active {
div[data-gadget-scope='panel'] dl dd a.active {
color: #1F1F1F;
background-color: #FFFFFF;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl dd a:hover,
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl dd a:active {
div[data-gadget-scope='panel'] dl dd a:hover,
div[data-gadget-scope='panel'] dl dd a:active {
color: #1F1F1F;
background-color: #FFFFFF;
}
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] dl dd a::before {
div[data-gadget-scope='panel'] dl dd a::before {
width: 24pt;
}
/**********************************************
......
......@@ -75,9 +75,7 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -246,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>990.6665.21066.20684</string> </value>
<value> <string>986.53918.32237.3225</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1613669436.36</float>
<float>1600941690.9</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -31,6 +31,32 @@
</head>
<body>
<div data-gadget-url="gadget_panel.html" data-gadget-scope="subpanel"></div>
<div>
<div data-role="header">
<div class="ui-btn-left">
<div class="ui-controlgroup-controls">
<button data-i18n="Close" class="ui-btn-icon-notext ui-icon-delete">Close</button>
</div>
</div>
<div class="panel_img">
<img alt="ERP5" src="gadget_erp5_panel.png"/>
</div>
</div>
<div>
<form>
<button type="submit" class="ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_searchfield.html"
data-gadget-scope="erp5_searchfield"
data-gadget-sandbox="public"></div>
</form>
<ul></ul>
<div data-gadget-url="gadget_erp5_field_multicheckbox.html"
data-gadget-scope="erp5_checkbox"
data-gadget-sandbox="public"></div>
<dl></dl>
</div>
</div>
</body>
</html>
\ No newline at end of file
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>990.6759.2839.30344</string> </value>
<value> <string>989.49479.12222.40430</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1613666958.38</float>
<float>1612876311.33</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint indent: 2, maxerr: 3 */
/*global window, rJS*/
(function (window, rJS) {
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, RSVP, Node, asBoolean , ensureArray*/
(function (window, document, rJS, RSVP, Node, asBoolean, ensureArray) {
"use strict";
function appendDt(fragment, dt_title, dt_icon,
action_list, href_list, index) {
// <dt class="ui-btn-icon-left ui-icon-eye">Views</dt>
// {{#each view_list}}
// <dd class="document-listview">
// <a class="{{class_name}}" href="{{href}}">{{title}}</a>
// </dd>
// {{/each}}
var dt_element = document.createElement('dt'),
dd_element,
a_element,
i;
dt_element.textContent = dt_title;
dt_element.setAttribute('class', 'ui-btn-icon-left ui-icon-' + dt_icon);
fragment.appendChild(dt_element);
for (i = 0; i < action_list.length; i += 1) {
dd_element = document.createElement('dd');
dd_element.setAttribute('class', 'document-listview');
a_element = document.createElement('a');
a_element.setAttribute('class', action_list[i].class_name);
a_element.href = href_list[index + i];
a_element.textContent = action_list[i].title;
dd_element.appendChild(a_element);
fragment.appendChild(dd_element);
}
}
rJS(window)
.setState({
visible: false
})
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
.declareAcquiredMethod("getUrlForList", "getUrlForList")
.declareAcquiredMethod("getTranslationList", "getTranslationList")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('toggle', function toggle() {
return this.getDeclaredGadget('subpanel')
.push(function (sub_gadget) {
return sub_gadget.toggle();
});
return this.changeState({
visible: !this.state.visible
});
})
.declareMethod('close', function close() {
return this.getDeclaredGadget('subpanel')
.push(function (sub_gadget) {
return sub_gadget.close();
});
return this.changeState({
visible: false
});
})
.declareMethod('render', function render(options) {
return this.getDeclaredGadget('subpanel')
.push(function (sub_gadget) {
return sub_gadget.render(options);
var erp5_document = options.erp5_document,
jio_key = options.jio_key,
view = options.view,
jump_view = options.jump_view,
visible = options.visible,
extra_menu_list = options.extra_menu_list,
display_workflow_list,
context = this,
workflow_list,
view_list,
action_list,
clone_list,
jump_list,
i;
if (visible === undefined) {
visible = context.state.visible;
}
if (options.display_workflow_list === undefined) {
display_workflow_list = true;
} else {
display_workflow_list = asBoolean(options.display_workflow_list);
}
if ((erp5_document !== undefined) && (jio_key !== undefined)) {
workflow_list = ensureArray(erp5_document._links.action_workflow);
view_list = ensureArray(erp5_document._links.action_object_view);
action_list = ensureArray(erp5_document._links.action_object_jio_action)
.concat(ensureArray(erp5_document._links.action_object_jio_button))
.concat(ensureArray(erp5_document._links.action_object_jio_fast_input));
clone_list = ensureArray(erp5_document._links.action_object_clone_action);
jump_list = ensureArray(erp5_document._links.action_object_jio_jump);
if (view === 'view') {
for (i = 0; i < view_list.length; i += 1) {
view_list[i].class_name = view_list[i].name === view ? 'active' : '';
}
} else {
for (i = 0; i < workflow_list.length; i += 1) {
workflow_list[i].class_name = workflow_list[i].href === view ? 'active' : '';
}
for (i = 0; i < view_list.length; i += 1) {
view_list[i].class_name = view_list[i].href === view ? 'active' : '';
}
for (i = 0; i < action_list.length; i += 1) {
action_list[i].class_name = action_list[i].href === view ? 'active' : '';
}
for (i = 0; i < clone_list.length; i += 1) {
clone_list[i].class_name = clone_list[i].href === view ? 'active' : '';
}
for (i = 0; i < jump_list.length; i += 1) {
jump_list[i].class_name = ((jump_list[i].href === jump_view) || (jump_list[i].href === view)) ? 'active' : '';
}
}
// Prevent has much as possible to modify the DOM panel
// stateChange prefer to compare strings
workflow_list = JSON.stringify(workflow_list);
view_list = JSON.stringify(view_list);
action_list = JSON.stringify(action_list);
clone_list = JSON.stringify(clone_list);
jump_list = JSON.stringify(jump_list);
}
if (extra_menu_list !== undefined) {
extra_menu_list = JSON.stringify(extra_menu_list);
}
return context.getUrlParameter('editable')
.push(function (editable) {
return context.changeState({
visible: visible,
display_workflow_list: display_workflow_list,
workflow_list: workflow_list,
view_list: view_list,
action_list: action_list,
clone_list: clone_list,
jump_list: jump_list,
global: true,
jio_key: jio_key,
view: view,
jump_view: jump_view,
editable: asBoolean(options.editable) || asBoolean(editable) || false,
extra_menu_list: extra_menu_list
});
});
})
.onStateChange(function onStateChange(modification_dict) {
var i,
context = this,
gadget = this,
workflow_list,
view_list,
action_list,
clone_list,
jump_list,
dl_fragment,
dl_element,
queue = new RSVP.Queue();
if (modification_dict.hasOwnProperty("visible")) {
if (this.state.visible) {
if (!this.element.classList.contains('visible')) {
this.element.classList.toggle('visible');
}
} else {
if (this.element.classList.contains('visible')) {
this.element.classList.remove('visible');
}
}
}
if (modification_dict.hasOwnProperty("global")) {
queue
.push(function () {
return context.getDeclaredGadget('erp5_searchfield');
})
.push(function (search_gadget) {
return search_gadget.render({
focus: false,
extended_search: ''
});
});
}
if (modification_dict.hasOwnProperty("editable")) {
queue
// Update the global links
.push(function () {
return RSVP.all([
context.getUrlForList([
{command: 'display'},
{command: 'display', options: {page: "front"}},
{command: 'display', options: {page: "worklist"}},
{command: 'display', options: {page: "history"}},
{command: 'display_stored_state', options: {page: "search"}},
{command: 'display', options: {page: "preference"}},
{command: 'display', options: {page: "logout"}}
]),
context.getTranslationList([
'Editable',
'Home',
'Modules',
'Worklists',
'History',
'Search',
'Preferences',
'Logout'
]),
context.getDeclaredGadget("erp5_checkbox")
]);
})
.push(function (result_list) {
var editable_value = [],
ul_fragment = document.createDocumentFragment(),
a_element,
li_element,
icon_and_key_list = [
'home', null,
'puzzle-piece', 'm',
'tasks', 'w',
'history', 'h',
'search', 's',
'sliders', null,
'power-off', 'o'
],
ul_element = context.element.querySelector("ul");
for (i = 0; i < result_list[0].length; i += 1) {
// <li><a href="URL" class="ui-btn-icon-left ui-icon-ICON" data-i18n="TITLE" accesskey="KEY"></a></li>
a_element = document.createElement('a');
li_element = document.createElement('li');
a_element.href = result_list[0][i];
a_element.setAttribute('class', 'ui-btn-icon-left ui-icon-' + icon_and_key_list[2 * i]);
if (icon_and_key_list[2 * i + 1] !== null) {
a_element.setAttribute('accesskey', icon_and_key_list[2 * i + 1]);
}
a_element.textContent = result_list[1][i + 1];
li_element.appendChild(a_element);
ul_fragment.appendChild(li_element);
}
while (ul_element.firstChild) {
ul_element.removeChild(ul_element.firstChild);
}
ul_element.appendChild(ul_fragment);
// Update the checkbox field value
if (context.state.editable) {
editable_value = ['editable'];
}
return result_list[2].render({field_json: {
editable: true,
name: 'editable',
key: 'editable',
hidden: false,
items: [[result_list[1][0], 'editable']],
'default': editable_value
}});
});
}
if ((this.state.global === true) &&
(modification_dict.hasOwnProperty("editable") ||
modification_dict.hasOwnProperty("view") ||
modification_dict.hasOwnProperty("jump_view") ||
modification_dict.hasOwnProperty("workflow_list") ||
modification_dict.hasOwnProperty("action_list") ||
modification_dict.hasOwnProperty("clone_list") ||
modification_dict.hasOwnProperty("jump_list") ||
modification_dict.hasOwnProperty("jio_key") ||
modification_dict.hasOwnProperty("view_list") ||
modification_dict.hasOwnProperty("extra_menu_list"))) {
dl_fragment = document.createDocumentFragment();
gadget.element.querySelector("dl").textContent = '';
if (this.state.view_list !== undefined) {
queue
.push(function () {
var parameter_list = [];
view_list = JSON.parse(gadget.state.view_list);
action_list = JSON.parse(gadget.state.action_list);
clone_list = JSON.parse(gadget.state.clone_list);
jump_list = JSON.parse(gadget.state.jump_list);
workflow_list = JSON.parse(gadget.state.workflow_list);
for (i = 0; i < view_list.length; i += 1) {
parameter_list.push({
command: 'display_with_history',
options: {
jio_key: gadget.state.jio_key,
view: view_list[i].href
}
});
}
for (i = 0; i < workflow_list.length; i += 1) {
parameter_list.push({
command: 'display_dialog_with_history',
options: {
jio_key: gadget.state.jio_key,
view: workflow_list[i].href
}
});
}
for (i = 0; i < action_list.length; i += 1) {
parameter_list.push({
command: 'display_dialog_with_history',
options: {
jio_key: gadget.state.jio_key,
view: action_list[i].href
}
});
}
for (i = 0; i < clone_list.length; i += 1) {
parameter_list.push({
command: 'display_dialog_with_history',
options: {
jio_key: gadget.state.jio_key,
view: clone_list[i].href,
editable: true
}
});
}
for (i = 0; i < jump_list.length; i += 1) {
parameter_list.push({
command: 'display_dialog_with_history',
options: {
jio_key: gadget.state.jio_key,
view: jump_list[i].href
}
});
}
return RSVP.all([
gadget.getUrlForList(parameter_list),
gadget.getTranslationList(['Views', 'Workflows', 'Actions',
'Jumps'])
]);
})
.push(function (result_list) {
appendDt(dl_fragment, result_list[1][0], 'eye',
view_list, result_list[0], 0);
if (gadget.state.display_workflow_list) {
// show Workflows only on document
appendDt(dl_fragment, result_list[1][1], 'random',
workflow_list, result_list[0], view_list.length);
}
appendDt(dl_fragment, result_list[1][2], 'cogs',
action_list.concat(clone_list), result_list[0],
view_list.length + workflow_list.length);
appendDt(dl_fragment, result_list[1][3], 'plane',
jump_list, result_list[0],
view_list.length + workflow_list.length +
action_list.length + clone_list.length);
});
}
if (gadget.state.hasOwnProperty("extra_menu_list") &&
gadget.state.extra_menu_list) {
queue
.push(function () {
return gadget.getTranslationList(['Global']);
})
.push(function (translation_list) {
var extra_menu_list = JSON.parse(gadget.state.extra_menu_list),
href_list = [];
for (i = 0; i < extra_menu_list.length; i += 1) {
extra_menu_list[i].class_name = extra_menu_list[i].active ? "active" : "";
href_list.push(extra_menu_list[i].href);
}
appendDt(dl_fragment, translation_list[0], 'globe',
extra_menu_list, href_list, 0);
});
}
}
queue
.push(function () {
if (dl_fragment) {
dl_element = gadget.element.querySelector("dl");
while (dl_element.firstChild) {
dl_element.removeChild(dl_element.firstChild);
}
dl_element.appendChild(dl_fragment);
}
});
return queue;
})
/////////////////////////////////////////////////////////////////
// declared services
/////////////////////////////////////////////////////////////////
.onEvent('click', function click(evt) {
if ((evt.target.nodeType === Node.ELEMENT_NODE) &&
(evt.target.tagName === 'BUTTON')) {
return this.toggle();
}
}, false, false)
.allowPublicAcquisition("notifyFocus", function notifyFocus() {
// All html5 fields in ERP5JS triggers this method when focus
// is triggered. This is usefull to display error text.
// But, in the case of panel, we don't need to handle anything.
return;
})
.allowPublicAcquisition("notifyBlur", function notifyFocus() {
// All html5 fields in ERP5JS triggers this method when blur
// is triggered now. This is usefull to display error text.
// But, in the case of panel, we don't need to handle anything.
return;
})
.allowPublicAcquisition('notifyChange', function notifyChange(
argument_list,
scope
) {
if (scope === 'erp5_checkbox') {
var context = this;
return context.getDeclaredGadget('erp5_checkbox')
.push(function (gadget) {
return gadget.getContent();
})
.push(function (result) {
var options = {editable: undefined};
if (result.editable.length === 1) {
options.editable = true;
}
return context.redirect({command: 'change', options: options}, true);
});
}
// Typing a search query should not modify the header status
return;
}, {mutex: 'changestate'})
.allowPublicAcquisition('notifyValid', function notifyValid() {
// Typing a search query should not modify the header status
return;
})
.onEvent('submit', function submit() {
var gadget = this,
search_gadget,
redirect_options = {
page: "search"
};
return gadget
.getDeclaredGadget("erp5_searchfield")
.push(function (declared_gadget) {
search_gadget = declared_gadget;
return search_gadget.getContent();
})
.push(function (data) {
if (data.search) {
redirect_options.extended_search = data.search;
}
// let the search gadget know its current state (value and focus)
// in order to be able to zero it out in the next Promise
// input gadget's state does not reflect immediate reality
// so we need to manage its state from the parent
return search_gadget.render({
extended_search: data.search,
focus: true
});
})
.push(function () {
// we want the search field in side panel to be empty and blured
return search_gadget.render({
extended_search: '',
focus: false // we don't want focus on the empty field for sure
});
})
.push(function () {
return gadget.redirect({command: 'store_and_display', options: redirect_options}, true);
});
});
}(window, rJS));
\ No newline at end of file
}, /*useCapture=*/false, /*preventDefault=*/true);
}(window, document, rJS, RSVP, Node, asBoolean, ensureArray));
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>990.26894.15626.38126</string> </value>
<value> <string>989.59257.5605.14267</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1614615293.14</float>
<float>1612884079.54</float>
<string>UTC</string>
</tuple>
</state>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Panel</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_panel.html">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_panel.js" type="text/javascript"></script>
</head>
<body>
<div>
<div data-role="header">
<div class="ui-btn-left">
<div class="ui-controlgroup-controls">
<button data-i18n="Close" class="ui-btn-icon-notext ui-icon-delete">Close</button>
</div>
</div>
<div class="panel_img">
<img alt="ERP5" src="gadget_erp5_panel.png"/>
</div>
</div>
<div>
<form>
<button type="submit" class="ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_searchfield.html"
data-gadget-scope="erp5_searchfield"
data-gadget-sandbox="public"></div>
</form>
<ul></ul>
<div data-gadget-url="gadget_erp5_field_multicheckbox.html"
data-gadget-scope="erp5_checkbox"
data-gadget-sandbox="public"></div>
<dl></dl>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" 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>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_panel.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_panel_html</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 Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget Panel</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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>1613665764.44</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>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<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>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>990.6770.44839.65450</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>1613667198.99</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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>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>1613665681.32</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, RSVP, Node, asBoolean , ensureArray*/
(function (window, document, rJS, RSVP, Node, asBoolean, ensureArray) {
"use strict";
function appendDt(fragment, dt_title, dt_icon,
action_list, href_list, index) {
// <dt class="ui-btn-icon-left ui-icon-eye">Views</dt>
// {{#each view_list}}
// <dd class="document-listview">
// <a class="{{class_name}}" href="{{href}}">{{title}}</a>
// </dd>
// {{/each}}
var dt_element = document.createElement('dt'),
dd_element,
a_element,
i;
dt_element.textContent = dt_title;
dt_element.setAttribute('class', 'ui-btn-icon-left ui-icon-' + dt_icon);
fragment.appendChild(dt_element);
for (i = 0; i < action_list.length; i += 1) {
dd_element = document.createElement('dd');
dd_element.setAttribute('class', 'document-listview');
a_element = document.createElement('a');
a_element.setAttribute('class', action_list[i].class_name);
a_element.href = href_list[index + i];
a_element.textContent = action_list[i].title;
dd_element.appendChild(a_element);
fragment.appendChild(dd_element);
}
}
rJS(window)
.setState({
visible: false
})
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
.declareAcquiredMethod("getUrlForList", "getUrlForList")
.declareAcquiredMethod("getTranslationList", "getTranslationList")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('toggle', function toggle() {
return this.changeState({
visible: !this.state.visible
});
})
.declareMethod('close', function close() {
return this.changeState({
visible: false
});
})
.declareMethod('render', function render(options) {
var erp5_document = options.erp5_document,
jio_key = options.jio_key,
view = options.view,
jump_view = options.jump_view,
visible = options.visible,
extra_menu_list = options.extra_menu_list,
display_workflow_list,
context = this,
workflow_list,
view_list,
action_list,
clone_list,
jump_list,
i;
if (visible === undefined) {
visible = context.state.visible;
}
if (options.display_workflow_list === undefined) {
display_workflow_list = true;
} else {
display_workflow_list = asBoolean(options.display_workflow_list);
}
if ((erp5_document !== undefined) && (jio_key !== undefined)) {
workflow_list = ensureArray(erp5_document._links.action_workflow);
view_list = ensureArray(erp5_document._links.action_object_view);
action_list = ensureArray(erp5_document._links.action_object_jio_action)
.concat(ensureArray(erp5_document._links.action_object_jio_button))
.concat(ensureArray(erp5_document._links.action_object_jio_fast_input));
clone_list = ensureArray(erp5_document._links.action_object_clone_action);
jump_list = ensureArray(erp5_document._links.action_object_jio_jump);
if (view === 'view') {
for (i = 0; i < view_list.length; i += 1) {
view_list[i].class_name = view_list[i].name === view ? 'active' : '';
}
} else {
for (i = 0; i < workflow_list.length; i += 1) {
workflow_list[i].class_name = workflow_list[i].href === view ? 'active' : '';
}
for (i = 0; i < view_list.length; i += 1) {
view_list[i].class_name = view_list[i].href === view ? 'active' : '';
}
for (i = 0; i < action_list.length; i += 1) {
action_list[i].class_name = action_list[i].href === view ? 'active' : '';
}
for (i = 0; i < clone_list.length; i += 1) {
clone_list[i].class_name = clone_list[i].href === view ? 'active' : '';
}
for (i = 0; i < jump_list.length; i += 1) {
jump_list[i].class_name = ((jump_list[i].href === jump_view) || (jump_list[i].href === view)) ? 'active' : '';
}
}
// Prevent has much as possible to modify the DOM panel
// stateChange prefer to compare strings
workflow_list = JSON.stringify(workflow_list);
view_list = JSON.stringify(view_list);
action_list = JSON.stringify(action_list);
clone_list = JSON.stringify(clone_list);
jump_list = JSON.stringify(jump_list);
}
if (extra_menu_list !== undefined) {
extra_menu_list = JSON.stringify(extra_menu_list);
}
return context.getUrlParameter('editable')
.push(function (editable) {
return context.changeState({
visible: visible,
display_workflow_list: display_workflow_list,
workflow_list: workflow_list,
view_list: view_list,
action_list: action_list,
clone_list: clone_list,
jump_list: jump_list,
global: true,
jio_key: jio_key,
view: view,
jump_view: jump_view,
editable: asBoolean(options.editable) || asBoolean(editable) || false,
extra_menu_list: extra_menu_list
});
});
})
.onStateChange(function onStateChange(modification_dict) {
var i,
context = this,
gadget = this,
workflow_list,
view_list,
action_list,
clone_list,
jump_list,
dl_fragment,
dl_element,
queue = new RSVP.Queue();
if (modification_dict.hasOwnProperty("visible")) {
if (this.state.visible) {
if (!this.element.classList.contains('visible')) {
this.element.classList.toggle('visible');
}
} else {
if (this.element.classList.contains('visible')) {
this.element.classList.remove('visible');
}
}
}
if (modification_dict.hasOwnProperty("global")) {
queue
.push(function () {
return context.getDeclaredGadget('erp5_searchfield');
})
.push(function (search_gadget) {
return search_gadget.render({
focus: false,
extended_search: ''
});
});
}
if (modification_dict.hasOwnProperty("editable")) {
queue
// Update the global links
.push(function () {
return RSVP.all([
context.getUrlForList([
{command: 'display'},
{command: 'display', options: {page: "front"}},
{command: 'display', options: {page: "worklist"}},
{command: 'display', options: {page: "history"}},
{command: 'display_stored_state', options: {page: "search"}},
{command: 'display', options: {page: "preference"}},
{command: 'display', options: {page: "logout"}}
]),
context.getTranslationList([
'Editable',
'Home',
'Modules',
'Worklists',
'History',
'Search',
'Preferences',
'Logout'
]),
context.getDeclaredGadget("erp5_checkbox")
]);
})
.push(function (result_list) {
var editable_value = [],
ul_fragment = document.createDocumentFragment(),
a_element,
li_element,
icon_and_key_list = [
'home', null,
'puzzle-piece', 'm',
'tasks', 'w',
'history', 'h',
'search', 's',
'sliders', null,
'power-off', 'o'
],
ul_element = context.element.querySelector("ul");
for (i = 0; i < result_list[0].length; i += 1) {
// <li><a href="URL" class="ui-btn-icon-left ui-icon-ICON" data-i18n="TITLE" accesskey="KEY"></a></li>
a_element = document.createElement('a');
li_element = document.createElement('li');
a_element.href = result_list[0][i];
a_element.setAttribute('class', 'ui-btn-icon-left ui-icon-' + icon_and_key_list[2 * i]);
if (icon_and_key_list[2 * i + 1] !== null) {
a_element.setAttribute('accesskey', icon_and_key_list[2 * i + 1]);
}
a_element.textContent = result_list[1][i + 1];
li_element.appendChild(a_element);
ul_fragment.appendChild(li_element);
}
while (ul_element.firstChild) {
ul_element.removeChild(ul_element.firstChild);
}
ul_element.appendChild(ul_fragment);
// Update the checkbox field value
if (context.state.editable) {
editable_value = ['editable'];
}
return result_list[2].render({field_json: {
editable: true,
name: 'editable',
key: 'editable',
hidden: false,
items: [[result_list[1][0], 'editable']],
'default': editable_value
}});
});
}
if ((this.state.global === true) &&
(modification_dict.hasOwnProperty("editable") ||
modification_dict.hasOwnProperty("view") ||
modification_dict.hasOwnProperty("jump_view") ||
modification_dict.hasOwnProperty("workflow_list") ||
modification_dict.hasOwnProperty("action_list") ||
modification_dict.hasOwnProperty("clone_list") ||
modification_dict.hasOwnProperty("jump_list") ||
modification_dict.hasOwnProperty("jio_key") ||
modification_dict.hasOwnProperty("view_list") ||
modification_dict.hasOwnProperty("extra_menu_list"))) {
dl_fragment = document.createDocumentFragment();
gadget.element.querySelector("dl").textContent = '';
if (this.state.view_list !== undefined) {
queue
.push(function () {
var parameter_list = [];
view_list = JSON.parse(gadget.state.view_list);
action_list = JSON.parse(gadget.state.action_list);
clone_list = JSON.parse(gadget.state.clone_list);
jump_list = JSON.parse(gadget.state.jump_list);
workflow_list = JSON.parse(gadget.state.workflow_list);
for (i = 0; i < view_list.length; i += 1) {
parameter_list.push({
command: 'display_with_history',
options: {
jio_key: gadget.state.jio_key,
view: view_list[i].href
}
});
}
for (i = 0; i < workflow_list.length; i += 1) {
parameter_list.push({
command: 'display_dialog_with_history',
options: {
jio_key: gadget.state.jio_key,
view: workflow_list[i].href
}
});
}
for (i = 0; i < action_list.length; i += 1) {
parameter_list.push({
command: 'display_dialog_with_history',
options: {
jio_key: gadget.state.jio_key,
view: action_list[i].href
}
});
}
for (i = 0; i < clone_list.length; i += 1) {
parameter_list.push({
command: 'display_dialog_with_history',
options: {
jio_key: gadget.state.jio_key,
view: clone_list[i].href,
editable: true
}
});
}
for (i = 0; i < jump_list.length; i += 1) {
parameter_list.push({
command: 'display_dialog_with_history',
options: {
jio_key: gadget.state.jio_key,
view: jump_list[i].href
}
});
}
return RSVP.all([
gadget.getUrlForList(parameter_list),
gadget.getTranslationList(['Views', 'Workflows', 'Actions',
'Jumps'])
]);
})
.push(function (result_list) {
appendDt(dl_fragment, result_list[1][0], 'eye',
view_list, result_list[0], 0);
if (gadget.state.display_workflow_list) {
// show Workflows only on document
appendDt(dl_fragment, result_list[1][1], 'random',
workflow_list, result_list[0], view_list.length);
}
appendDt(dl_fragment, result_list[1][2], 'cogs',
action_list.concat(clone_list), result_list[0],
view_list.length + workflow_list.length);
appendDt(dl_fragment, result_list[1][3], 'plane',
jump_list, result_list[0],
view_list.length + workflow_list.length +
action_list.length + clone_list.length);
});
}
if (gadget.state.hasOwnProperty("extra_menu_list") &&
gadget.state.extra_menu_list) {
queue
.push(function () {
return gadget.getTranslationList(['Global']);
})
.push(function (translation_list) {
var extra_menu_list = JSON.parse(gadget.state.extra_menu_list),
href_list = [];
for (i = 0; i < extra_menu_list.length; i += 1) {
extra_menu_list[i].class_name = extra_menu_list[i].active ? "active" : "";
href_list.push(extra_menu_list[i].href);
}
appendDt(dl_fragment, translation_list[0], 'globe',
extra_menu_list, href_list, 0);
});
}
}
queue
.push(function () {
if (dl_fragment) {
dl_element = gadget.element.querySelector("dl");
while (dl_element.firstChild) {
dl_element.removeChild(dl_element.firstChild);
}
dl_element.appendChild(dl_fragment);
}
});
return queue;
})
/////////////////////////////////////////////////////////////////
// declared services
/////////////////////////////////////////////////////////////////
.onEvent('click', function click(evt) {
if ((evt.target.nodeType === Node.ELEMENT_NODE) &&
(evt.target.tagName === 'BUTTON')) {
return this.toggle();
}
}, false, false)
.allowPublicAcquisition("notifyFocus", function notifyFocus() {
// All html5 fields in ERP5JS triggers this method when focus
// is triggered. This is usefull to display error text.
// But, in the case of panel, we don't need to handle anything.
return;
})
.allowPublicAcquisition("notifyBlur", function notifyFocus() {
// All html5 fields in ERP5JS triggers this method when blur
// is triggered now. This is usefull to display error text.
// But, in the case of panel, we don't need to handle anything.
return;
})
.allowPublicAcquisition('notifyChange', function notifyChange(
argument_list,
scope
) {
if (scope === 'erp5_checkbox') {
var context = this;
return context.getDeclaredGadget('erp5_checkbox')
.push(function (gadget) {
return gadget.getContent();
})
.push(function (result) {
var options = {editable: undefined};
if (result.editable.length === 1) {
options.editable = true;
}
return context.redirect({command: 'change', options: options}, true);
});
}
// Typing a search query should not modify the header status
return;
}, {mutex: 'changestate'})
.allowPublicAcquisition('notifyValid', function notifyValid() {
// Typing a search query should not modify the header status
return;
})
.onEvent('submit', function submit() {
var gadget = this,
search_gadget,
redirect_options = {
page: "search"
};
return gadget
.getDeclaredGadget("erp5_searchfield")
.push(function (declared_gadget) {
search_gadget = declared_gadget;
return search_gadget.getContent();
})
.push(function (data) {
if (data.search) {
redirect_options.extended_search = data.search;
}
// let the search gadget know its current state (value and focus)
// in order to be able to zero it out in the next Promise
// input gadget's state does not reflect immediate reality
// so we need to manage its state from the parent
return search_gadget.render({
extended_search: data.search,
focus: true
});
})
.push(function () {
// we want the search field in side panel to be empty and blured
return search_gadget.render({
extended_search: '',
focus: false // we don't want focus on the empty field for sure
});
})
.push(function () {
return gadget.redirect({command: 'store_and_display', options: redirect_options}, true);
});
}, /*useCapture=*/false, /*preventDefault=*/true);
}(window, document, rJS, RSVP, Node, asBoolean, ensureArray));
\ 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_panel.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_panel_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 Panel 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.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<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>1613665755.65</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>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<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>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>990.6748.34593.36113</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>1613665725.05</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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>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>1613665705.08</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -110,8 +110,6 @@ url_list = [
'gadget_erp5_panel.html',
'gadget_erp5_panel.js',
'gadget_erp5_panel.png',
'gadget_panel.html',
'gadget_panel.js',
'gadget_erp5_pt_embedded_form_render.html',
'gadget_erp5_pt_embedded_form_render.js',
'gadget_erp5_pt_form_dialog.html',
......
......@@ -590,7 +590,7 @@ img {
/**********************************************
* Gadget: panel
**********************************************/
div[data-gadget-scope='panel'] > div[data-gadget-url$="gadget_panel.html"] {
div[data-gadget-scope='panel'] {
background-color: @panelbackgroundcolor;
......
......@@ -13,7 +13,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block tal:define="check_configuration python: {'precache_reference': '../renderjs_runner/WebSection_getPrecacheManifest',
'gadget_count': 73}">
'gadget_count': 72}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUiInterface/macros/run_app_interface_check" />
</tal:block>
......
......@@ -1740,7 +1740,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='panel']/div[contains(@class, 'visible')]</td>
<td>//div[@data-gadget-scope='panel' and contains(@class, 'visible')]</td>
<td></td>
</tr>
<tr>
......
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