Commit bba62587 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Remove search and introduce a shortcut gadget at the panel

The global search is usefull, however it can lead to show several portal types which have no default view or documents that will make user confuse, so remove it until it actually works (previous UI had no search anyway).

Include a panel shortcut panel, which is usefull for include per master shortcuts to expose to links for quick request for example.
parent e2699175
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Panel Shortcut</title>
<!-- renderjs -->
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<!-- custom script -->
<script src="gadget_erp5_panel_shortcut.js"></script>
</head>
<body>
<div>
</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)
/////////////////////////////////////////////////////////////////
//
// This is a sample minimalist gadget to be overwritten on project
// level to include special links on the panel.
//
/////////////////////////////////////////////////////////////////
.declareMethod('render', function (options) {
return this.changeState(options);
})
.onStateChange(function () {
var gadget = this;
return gadget;
});
}(window, rJS));
\ No newline at end of file
......@@ -108,7 +108,7 @@
<value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n
# generated on Mon, 20 Fev 2017 15:16:00 GMT+0200\n
# generated on Mon, 23 Fev 2017 12:00:00 GMT+0200\n
CACHE:\n
favicon.ico\n
font-awesome/font-awesome-webfont.eot?v=4.6.3\n
......@@ -348,6 +348,8 @@ gadget_erp5_page_slapos.css\n
gadget_erp5_page_slapos.html\n
gadget_erp5_page_slapos.js\n
gadget_erp5_page_slapos_request_form.html\n
gadget_erp5_panel_shortcut.html\n
gadget_erp5_panel_shortcut.js\n
gadget_erp5_pt_form_slapos_index.html\n
gadget_erp5_pt_form_slapos_index.js\n
gadget_slapos_computer_map.html\n
......@@ -376,6 +378,7 @@ gadget_slapos_network_status.html\n
gadget_slapos_network_status.js\n
gadget_slapos_panel.html\n
gadget_slapos_panel.js\n
gadget_slapos_panel.png\n
gadget_slapos_payment_result.js\n
gadget_slapos_project_status.html\n
gadget_slapos_project_status.js\n
......@@ -525,7 +528,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.40966.21681.23671</string> </value>
<value> <string>965.45213.38458.27084</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -543,7 +546,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1519142802.96</float>
<float>1519397663.08</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -26,14 +26,6 @@
<script id="panel-template-body" type="text/x-handlebars-template">
<div class="ui-content">
<form class="dialog_form">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
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 data-role="listview" class="ui-listview" data-enhanced="true">
<li class="ui-first-child"><a href="#?editable=true" class="ui-btn ui-btn-icon-left ui-icon-home" data-i18n="Home" accesskey="h">Home</a></li>
<li><a href="{{person_href}}" class="ui-btn ui-btn-icon-left ui-icon-user" data-i18n="Account" accesskey="p">Account</a></li>
......@@ -52,9 +44,11 @@
<li class="ui-first-child"><a href="https://monitor.app.officejs.com/" class="ui-btn ui-btn-icon-left ui-icon-desktop" data-i18n="Access Monitor" target="_blank">Access Monitor</a></li>
</ul>
<dl></dl>
<div data-gadget-url="gadget_erp5_panel_shortcut.html"
data-gadget-scope="erp5_panel_shortcut"
data-gadget-sandbox="public"></div>
</div>
</script>
<!-- custom script -->
<script src="gadget_slapos_panel.js" type="text/javascript"></script>
......
......@@ -220,7 +220,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.17101.22275.7697</string> </value>
<value> <string>965.45193.17797.6212</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1513778881.51</float>
<float>1519396467.53</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -127,13 +127,13 @@
.push(function (my_translated_or_plain_html) {
tmp_element = document.createElement('div');
tmp_element.innerHTML = my_translated_or_plain_html;
return context.declareGadget('gadget_erp5_searchfield.html', {
scope: "erp5_searchfield",
element: tmp_element.querySelector('[data-gadget-scope="erp5_searchfield"]')
return context.declareGadget('gadget_erp5_panel_shortcut.html', {
scope: "gadget_erp5_panel_shortcut",
element: tmp_element.querySelector('[data-gadget-scope="erp5_panel_shortcut"]')
});
})
.push(function (search_gadget) {
return search_gadget.render({
.push(function (panel_shortcut) {
return panel_shortcut.render({
focus: false
});
})
......
......@@ -216,7 +216,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.57476.6529.32068</string> </value>
<value> <string>962.57491.46790.33894</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1508424222.79</float>
<float>1519396462.37</float>
<string>UTC</string>
</tuple>
</state>
......
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