Commit ac5b6ae3 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Drop jquery/jquerymobile dependencies

parent 29a1b22f
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n CACHE MANIFEST\n
# generated on Tue, 12 July 2016 12:00:00 GMT\n # generated on Tue, 24 Jun 2016 16:00:00 GMT\n
# XXX + fonts\n # XXX + fonts\n
# images/ajax-loader.gif\n # images/ajax-loader.gif\n
CACHE:\n CACHE:\n
...@@ -167,7 +167,6 @@ gadget_erp5_header.html\n ...@@ -167,7 +167,6 @@ gadget_erp5_header.html\n
gadget_erp5_header.js\n gadget_erp5_header.js\n
gadget_erp5_jio.html\n gadget_erp5_jio.html\n
gadget_erp5_jio.js\n gadget_erp5_jio.js\n
gadget_erp5_latest.css\n
gadget_erp5_page_action.html\n gadget_erp5_page_action.html\n
gadget_erp5_page_action.js\n gadget_erp5_page_action.js\n
gadget_erp5_page_form.html\n gadget_erp5_page_form.html\n
...@@ -192,7 +191,6 @@ gadget_erp5_page_worklist.html\n ...@@ -192,7 +191,6 @@ gadget_erp5_page_worklist.html\n
gadget_erp5_page_worklist.js\n gadget_erp5_page_worklist.js\n
gadget_erp5_panel.html\n gadget_erp5_panel.html\n
gadget_erp5_panel.js\n gadget_erp5_panel.js\n
gadget_erp5_panel_configuration.html\n
gadget_erp5_pt_form_dialog.html\n gadget_erp5_pt_form_dialog.html\n
gadget_erp5_pt_form_dialog.js\n gadget_erp5_pt_form_dialog.js\n
gadget_erp5_pt_form_list.html\n gadget_erp5_pt_form_list.html\n
...@@ -205,8 +203,6 @@ gadget_erp5_pt_report_view.html\n ...@@ -205,8 +203,6 @@ gadget_erp5_pt_report_view.html\n
gadget_erp5_pt_report_view.js\n gadget_erp5_pt_report_view.js\n
gadget_erp5_router.html\n gadget_erp5_router.html\n
gadget_erp5_router.js\n gadget_erp5_router.js\n
gadget_erp5_relation_input.html\n
gadget_erp5_relation_input.js\n
gadget_erp5_search_editor.html\n gadget_erp5_search_editor.html\n
gadget_erp5_search_editor.js\n gadget_erp5_search_editor.js\n
gadget_erp5_searchfield.html\n gadget_erp5_searchfield.html\n
...@@ -223,9 +219,6 @@ gadget_translation_data.js\n ...@@ -223,9 +219,6 @@ gadget_translation_data.js\n
handlebars.js\n handlebars.js\n
i18next.js\n i18next.js\n
jiodev.js\n jiodev.js\n
jquery.js\n
jquerymobile.css\n
jquerymobile.js\n
renderjs.js\n renderjs.js\n
rsvp.js\n rsvp.js\n
NETWORK:\n NETWORK:\n
...@@ -360,7 +353,7 @@ NETWORK:\n ...@@ -360,7 +353,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.33120.45206.6075</string> </value> <value> <string>952.10055.10367.33638</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -378,7 +371,7 @@ NETWORK:\n ...@@ -378,7 +371,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1468331792.72</float> <float>1467035673.56</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -136,6 +136,12 @@ ...@@ -136,6 +136,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -157,7 +163,7 @@ ...@@ -157,7 +163,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>zope</string> </value> <value> <string>romain</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -179,8 +185,8 @@ ...@@ -179,8 +185,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1465381402.54</float> <float>1406898405.9</float>
<string>UTC</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
</object> </object>
...@@ -224,7 +230,7 @@ ...@@ -224,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.4548.25239.8192</string> </value> <value> <string>952.10134.56146.36130</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -242,7 +248,7 @@ ...@@ -242,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1466779724.5</float> <float>1467039078.03</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -254,4 +260,61 @@ ...@@ -254,4 +260,61 @@
</tuple> </tuple>
</pickle> </pickle>
</record> </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>romain</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>1405427673.27</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData> </ZopeData>
/*jslint indent: 2, maxerr: 3, nomen: true */ /*jslint indent: 2, maxerr: 3, nomen: true */
/*global window, rJS, RSVP, $ */ /*global window, rJS, RSVP */
(function (window, rJS, RSVP, $) { (function (window, rJS, RSVP) {
"use strict"; "use strict";
rJS(window) rJS(window)
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -15,20 +15,12 @@ ...@@ -15,20 +15,12 @@
.push(function (element) { .push(function (element) {
g.props.element = element; g.props.element = element;
g.props.container = element.querySelector(".jqm-navmenu-panel"); g.props.container = element.querySelector(".jqm-navmenu-panel");
g.props.jelement = $(g.props.container);
}); });
}) })
.ready(function (g) {
g.props.jelement.panel({
display: "overlay",
position: "right",
theme: "c"
});
})
.allowPublicAcquisition('trigger', function () { .allowPublicAcquisition('trigger', function () {
return this.props.jelement.panel("toggle"); this.props.element.classList.toggle('visible');
// return this.props.jelement.panel("toggle");
}) })
////////////////////////////////////////////// //////////////////////////////////////////////
// acquired method // acquired method
...@@ -36,10 +28,12 @@ ...@@ -36,10 +28,12 @@
//local method //local method
.declareMethod('close', function () { .declareMethod('close', function () {
var container = this.props.container; var container = this.props.container;
this.props.jelement.panel("close");
while (container.firstChild) { while (container.firstChild) {
container.removeChild(container.firstChild); container.removeChild(container.firstChild);
} }
if (this.props.element.classList.contains('visible')) {
this.props.element.classList.remove('visible');
}
}) })
.declareMethod('render', function (url, options) { .declareMethod('render', function (url, options) {
var gadget = this, var gadget = this,
...@@ -63,10 +57,9 @@ ...@@ -63,10 +57,9 @@
.push(function (result) { .push(function (result) {
var fragment = result[1]; var fragment = result[1];
gadget.props.container.appendChild(fragment); gadget.props.container.appendChild(fragment);
gadget.props.jelement.trigger("create"); gadget.props.element.classList.toggle('visible');
gadget.props.jelement.panel("toggle");
}); });
} }
gadget.props.jelement.panel("toggle"); gadget.props.element.classList.toggle('visible');
}); });
}(window, rJS, RSVP, $)); }(window, rJS, RSVP));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>946.64723.57071.20616</string> </value> <value> <string>952.10013.10460.65075</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1447071678.82</float> <float>1467031522.89</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<title>${application_title}</title> <title>${application_title}</title>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> <link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="jquerymobile.css">
<link rel="stylesheet" href="gadget_erp5.css"> <link rel="stylesheet" href="gadget_erp5.css">
<script data-renderjs-configuration="application_title" type="text/x-renderjs-configuration">${application_title}</script> <script data-renderjs-configuration="application_title" type="text/x-renderjs-configuration">${application_title}</script>
...@@ -18,8 +17,6 @@ ...@@ -18,8 +17,6 @@
<script data-renderjs-configuration="hateoas_url" type="text/x-renderjs-configuration">${hateoas_url}</script> <script data-renderjs-configuration="hateoas_url" type="text/x-renderjs-configuration">${hateoas_url}</script>
<script data-renderjs-configuration="frontpage_gadget" type="text/x-renderjs-configuration">${frontpage_gadget}</script> <script data-renderjs-configuration="frontpage_gadget" type="text/x-renderjs-configuration">${frontpage_gadget}</script>
<script src="jquery.js"></script>
<script src="jquerymobile.js"></script>
<script src="rsvp.js"></script> <script src="rsvp.js"></script>
<script src="renderjs.js"></script> <script src="renderjs.js"></script>
<script src="gadget_global.js" ></script> <script src="gadget_global.js" ></script>
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>946.64733.4438.11997</string> </value> <value> <string>952.1497.51502.20667</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1447067588.44</float> <float>1467031565.3</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*globals window, document, RSVP, rJS, /*globals window, document, RSVP, rJS,
loopEventListener, jQuery, URI, location, XMLHttpRequest, console*/ loopEventListener, URI, location, XMLHttpRequest, console*/
/*jslint indent: 2, maxlen: 80*/ /*jslint indent: 2, maxlen: 80*/
(function (window, document, RSVP, rJS, loopEventListener, (function (window, document, RSVP, rJS, loopEventListener,
$, XMLHttpRequest, location, console) { XMLHttpRequest, location, console) {
"use strict"; "use strict";
/////////////////////////////////////////////////////////////////
// Desactivate jQuery Mobile URL management
/////////////////////////////////////////////////////////////////
$.mobile.ajaxEnabled = false;
$.mobile.linkBindingEnabled = false;
$.mobile.hashListeningEnabled = false;
$.mobile.pushStateEnabled = false;
/* /*
if (navigator.hasOwnProperty('serviceWorker')) { if (navigator.hasOwnProperty('serviceWorker')) {
// Check if a ServiceWorker already controls the site on load // Check if a ServiceWorker already controls the site on load
...@@ -218,7 +210,6 @@ ...@@ -218,7 +210,6 @@
g.props = {}; g.props = {};
return g.getElement() return g.getElement()
.push(function (element) { .push(function (element) {
$(element).trigger("create");
g.props.loading_counter = 0; g.props.loading_counter = 0;
g.props.element = element; g.props.element = element;
g.props.content_element = element.querySelector('.gadget-content'); g.props.content_element = element.querySelector('.gadget-content');
...@@ -324,10 +315,7 @@ ...@@ -324,10 +315,7 @@
return gadget.getDeclaredGadget(MAIN_SCOPE) return gadget.getDeclaredGadget(MAIN_SCOPE)
.push(function (main) { .push(function (main) {
if (main.render !== undefined) { if (main.render !== undefined) {
return main.render(JSON.parse(gadget.props.m_options_string)) return main.render(JSON.parse(gadget.props.m_options_string));
.push(function () {
$(gadget.props.content_element).trigger("create");
});
} }
}, function () { }, function () {
return; return;
...@@ -519,8 +507,6 @@ ...@@ -519,8 +507,6 @@
content_container.appendChild(fragment); content_container.appendChild(fragment);
element.appendChild(content_container); element.appendChild(content_container);
$(element).trigger("create");
return updateHeader(gadget); return updateHeader(gadget);
// XXX Drop notification // XXX Drop notification
// return header_gadget.notifyLoaded(); // return header_gadget.notifyLoaded();
...@@ -572,5 +558,5 @@ ...@@ -572,5 +558,5 @@
); );
}); });
}(window, document, RSVP, rJS, loopEventListener, jQuery, }(window, document, RSVP, rJS, loopEventListener,
XMLHttpRequest, location, console)); XMLHttpRequest, location, console));
\ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.1266.16388.62907</string> </value> <value> <string>952.1547.59762.20957</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458731136.97</float> <float>1467031817.3</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -136,8 +136,8 @@ ...@@ -136,8 +136,8 @@
<div class="ui-controlgroup ui-controlgroup-horizontal ui-corner-all ui-paging-menu"> <div class="ui-controlgroup ui-controlgroup-horizontal ui-corner-all ui-paging-menu">
<div class="ui-controlgroup-controls"> <div class="ui-controlgroup-controls">
<a class="{{previous_classname}}" data-i18n="Previous" href="{{previous_url}}">Previous</a> <a class="{{previous_classname}}" data-i18n="Previous" href="{{previous_url}}">Previous</a>
<span class="ui-btn ui-disabled" data-i18n="{{record}}">{{record}}</span>
<a class="{{next_classname}}" data-i18n="Next" href="{{next_url}}">Next</a> <a class="{{next_classname}}" data-i18n="Next" href="{{next_url}}">Next</a>
<span class="ui-btn ui-disabled" data-i18n="{{record}}">{{record}}</span>
</div> </div>
</div> </div>
</th> </th>
...@@ -147,17 +147,17 @@ ...@@ -147,17 +147,17 @@
<script id="listbox-template" type="text/x-handlebars-template"> <script id="listbox-template" type="text/x-handlebars-template">
<div class="ui-table-header ui-header ui-bar-c ui-corner-all"> <div class="ui-table-header ui-header ui-bar-c ui-corner-all">
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left"> <h1 data-i18n="{{title}}" class="ui-title ui-override-theme">{{title}}</h1>
<div class="ui-controlgroup-controls"> <!--div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls"-->
<button data-rel="hide" data-i18n="Hide Rows" name="Hide" type="submit" class="submit responsive ui-last-child ui-btn ui-icon-eye ui-btn-icon-left {{hide_class}}">Hide Rows</button> <button data-rel="hide" data-i18n="Hide Rows" name="Hide" type="submit" class="submit responsive ui-last-child ui-btn ui-icon-eye ui-btn-icon-left {{hide_class}}">Hide Rows</button>
</div> <!--/div>
</div> </div>
<h1 data-i18n="{{title}}" class="ui-title ui-override-theme">{{title}}</h1>
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right"> <div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">
<div class="ui-controlgroup-controls"> <div class="ui-controlgroup-controls"-->
<button data-rel="Sort" data-i18n="Sort" name="Sort" type="submit" class="submit responsive ui-last-child ui-btn ui-icon-sort-amount-desc ui-btn-icon-left {{hide_sort}}">Sort</button> <button data-rel="Sort" data-i18n="Sort" name="Sort" type="submit" class="submit responsive ui-last-child ui-btn ui-icon-sort-amount-desc ui-btn-icon-left {{hide_sort}}">Sort</button>
</div> <!--/div>
</div> </div-->
</div> </div>
<table class="ui-responsive ui-body-c ui-table-inset"> <table class="ui-responsive ui-body-c ui-table-inset">
<thead class="ui-bar-inherit thead"></thead> <thead class="ui-bar-inherit thead"></thead>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>951.48046.6494.25736</string> </value> <value> <string>952.10020.33938.42018</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1468328152.64</float> <float>1467032548.63</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Panel Domain Tree</title>
<!-- renderjs -->
<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="gadget_global.js" type="text/javascript"></script>
<!-- panel -->
<script id="panel-category-list-header" type="text/x-handlbars-template">
<div data-role="header" class="ui-header ui-bar-inherit" role="banner">
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls"></div>
</div>
<h1 class="ui-title" data-i18n="{{i18n}}">Categories</h1>
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">
<div class="ui-controlgroup-controls">
<form action="#">
<input type="submit" value="[value]{{close_i18n}}" data-icon="delete" data-iconpos="notext" />
</form>
</div>
</div>
</div>
<div class="ui-content">
<form class="update_search_form" action="#">
<div class="ui-navbar ui-subheader ui-grid-container ui-body-inherit" role="navigation">
<ul class="ui-grid-a">
<li class="ui-block-a">
<button name='clear_category_list' data-i18n="{{clear_i18n}}" type='submit' class='responsive ui-btn ui-bar-inherit ui-btn-inherit ui-btn-icon-left ui-icon-trash-o ui-btn ui-first-child'>Delete</button>
</li>
<li class="ui-block-b">
<button name='update_category_list' data-i18n="{{update_i18n}}" type='submit' class='responsive ui-btn ui-bar-inherit ui-btn-inherit ui-btn-icon-left ui-icon-share-square-o ui-btn ui-last-child'>Update</button>
</li>
</ul>
</div>
</form>
{{#if tag_list}}
<div class="ui-controlgroup">
<div class="ui-controlgroup-controls">
{{#each taglist}}
<form class="update_search_from" action="#">
<button type="submit" name='update_category_list' data-i18n={{type_i18n}}={{value_i18n}} class="{{@first}}: {{ui-first-child }} {{@last}}: {{ui-last-child }} ui-btn ui-bar-inherit ui-btn-inherit ui-btn-icon-right ui-icon-delete">{{type_i18n}}={{value_i18n}}</button>
</form>
{{/each}}
</div>
</div>
{{/if}}
</div>
</script>
<!--
{{#if tag_list}}
<div class="ui-controlgroup">
<div class="ui-controlgroup-controls">
{{#each taglist}}
<form class="update_search_from" action="#">
<button type="submit" name='update_category_list' data-i18n={{type_i18n}}={{value_i18n}} class="{{@first}}: {{ui-first-child }} {{@last}}: {{ui-last-child }} ui-btn ui-bar-inherit ui-btn-inherit ui-btn-icon-right ui-icon-delete">{{type_i18n}}={{value_i18n}}</button>
</form>
{{/each}}
</div>
</div>
{{/if}}
{{#if tree}}
<ul class="ui-listview" data-enhanced="true">
{{> category-taglist-partial}}
</ul>
{{/if}}
</div>
-->
<!--
<script id="category-taglist-partial" type="text/x-handlebars-tempalte">
{{#each tree}}
{{#if tree}}
<li data-role="collapsible" data-enhanced="true" data-collapsed="true" data-collapsed-icon="plus" class="ui-li-has-checkbox ui-collapsible ui-collapsible-collapsed ui-li-static ui-body-inherit">
<h4 class="ui-collapsible-heading ui-collapsible-heading-collapsed ui-li-divider ui-li-has-icon">
<a class="ui-collapsible-heading-toggle ui-icon-plus ui-btn-icon-left ui-btn-inherit ui-link" href="#" data-i18n="[last]{{i18n}}">
<span data-i18n="gen.hint" class="ui-collapsible-heading-status"></span>
</a>
<div class="ui-checkbox">
<label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-notext ui-checkbox-on">{{search}}</label>
<input type="checkbox" data-iconpos="notext" name="{{this.search}}" data-cacheval="false">
</div>
</h4>
<div class="ui-collapsible-content ui-collapsible-content-collapsed" aria-hidden="true">
<ul data-role="listview" class="ui-listview" data-enhanced="true">
{{> category-taglist-partial}} {{! Recursively render the partial }}
</ul>
</div>
</li>
{{else}}
{{#if multiple}}
<li class="ui-li-has-checkboxradio ui-li-static ui-body-inherit" data-i18n="[node]{{i18n}}">
{{i18n}}
<div class="ui-checkbox">
<label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-notext ui-checkbox-on">&nbsp;</label>
<input type="checkbox" data-iconpos="notext" name="{{search}}" data-cacheval="false">
</div>
</li>
{{else}}
<li class="ui-li-has-checkboxradio ui-li-static ui-body-inherit" data-i18n="[node]{{i18n}}">
{{i18n}}
<div class="ui-checkbox">
<label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-notext ui-checkbox-on">&nbsp;</label>
<input type="checkbox" data-iconpos="notext" name="{{search}}" data-cacheval="false">
</div>
</li>
{{/if}}
{{/if}}
{{/each}}
</script>
-->
<!-- custom script -->
<script src="gadget_erp5_panel_configuration.js" type="text/javascript"></script>
</head>
<body>
<div class="jqm-configuration-panel"></div>
</body>
</html>
\ No newline at end of file
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {
"use strict";
/////////////////////////////////////////////////////////////////
// TEMPLATE API
/////////////////////////////////////////////////////////////////
// panel_category_list_header
// {
// "close_i18n": [SET],
// "i18n": [title],
// "clear_i18n": [SET],
// "update_i18n": [SET]
// "tag_list": [{
// "type_i18n": [type of filter|create|...],
// "value_i18n": [value to create or filter for, eg. region:foo]
// }]
// panel_category_list_partial
// {
// "i18n": [category title],
// "tree": [{
// "multiple": [true to make checkbox],
// "search": [search term, like "filter:region=France"],
// "i18n":" [text to display]
// }]
// }]
// }
/////////////////////////////////////////////////////////////////
// some methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Handlebars
/////////////////////////////////////////////////////////////////
var gadget_klass = rJS(window),
templater = gadget_klass.__template_element,
// pre-compile
panel_category_list_header = Handlebars.compile(
templater.getElementById("panel-category-list-header").innerHTML
)
/*
,panel_category_list_partial = Handlebars.registerPartial(
"category-taglist-partial",
templater.getElementById("category-taglist-partial").innerHTML
)*/;
gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
.ready(function (my_gadget) {
my_gadget.property_dict = {};
})
.ready(function (my_gadget) {
return my_gadget.getElement()
.push(function (my_element) {
my_gadget.property_dict.element = my_element;
my_gadget.property_dict.defer = new RSVP.defer();
my_gadget.property_dict.panel_element =
my_element.querySelector(".jqm-configuration-panel");
});
})
/////////////////////////////////////////////////////////////////
// acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareAcquiredMethod("changeLanguage", "changeLanguage")
.declareAcquiredMethod("getLanguageList", "getLanguageList")
.declareAcquiredMethod(
"whoWantToDisplayThisFrontPage",
"whoWantToDisplayThisFrontPage"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('setPanelHeader', function (my_option_dict) {
var gadget = this,
panel_element = gadget.property_dict.panel_element;
return new RSVP.Queue()
.push(function () {
return gadget.translateHtml(
panel_category_list_header(my_option_dict)
);
})
.push(function (my_panel_header) {
panel_element.innerHTML = my_panel_header;
$(panel_element).enhanceWithin();
return gadget;
})
.push(function () {
return gadget.property_dict.defer.resolve();
});
})
.declareMethod('setPanelContent', function (my_option_dict) {
/*
so Romain requested to have a gadget depending on use case of this
panel. In our case it should be a domain tree and it should load a
certain amount or type of domains/categories
Alternatively we can load something else. Question is whether this
should be a domain tree per ... app or if every domaintree can be
different depending on a parameter passed into intialization.
Also, we must make clear that the content can be dumped to make space
for new content!
Do this.
*/
})
.declareMethod('togglePanel', function () {
var gadget = this;
$(gadget.property_dict.panel_element).panel("toggle");
})
.declareMethod('render', function (my_option_dict) {
var gadget = this,
panel_element = gadget.property_dict.panel_element;
return new RSVP.Queue()
.push(function () {
$(panel_element).panel({
display: "overlay",
position: "right",
theme: "c"
});
});
})
/////////////////////////////////////////////////////////////////
// declared services
/////////////////////////////////////////////////////////////////
.declareService(function () {
var gadget = this,
$panel_element = $(gadget.property_dict.panel_element);
function formSubmit() {
return gadget.togglePanel();
}
return new RSVP.Queue()
.push(function () {
return gadget.property_dict.defer.promise;
})
.push(function () {
$panel_element.enhanceWithin();
var form_list = gadget.property_dict.element.querySelectorAll('form'),
event_list = [],
i,
len;
for (i = 0, len = form_list.length; i < len; i += 1) {
event_list[i] = loopEventListener(
form_list[i],
'submit',
false,
formSubmit
);
}
return RSVP.all(event_list);
})
});
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
/*
.push(function (my_panel_category_list) {
return gadget.factoryPanelCategoryList({
"theme": "a",
"position": "left",
"animate_class": "overlay",
"close_i18n": "gen.close",
"i18n": "gen.categories",
"clear_i18n": "gen.clear",
"update_i18n": "gen.update",
"tag_list": tag_list,
"tree": my_panel_category_list
});
})
.push(function (my_panel_content) {
return gadget.translateHtml(my_panel_content);
})
.push(function (my_translated_panel_content) {
return gadget.setPanel("panel_search", my_translated_panel_content);
});
*/
\ No newline at end of file
...@@ -10,16 +10,12 @@ ...@@ -10,16 +10,12 @@
<script src="renderjs.js" type="text/javascript"></script> <script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script> <script src="handlebars.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquerymobile.js" type="text/javascript"></script>
<script id="panel-template-header" type="text/x-handlebars-template"> <script id="panel-template-header" type="text/x-handlebars-template">
<div data-role="header" class="ui-bar-inherit"> <div data-role="header" class="ui-bar-inherit">
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left"> <div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls"> <div class="ui-controlgroup-controls">
<form action="#" method="post"> <button data-i18n="Close" class="ui-btn ui-btn-icon-notext ui-icon-delete">Close</button>
<input type="submit" data-i18n="[value]Close" data-icon="delete" data-iconpos="notext" value="Close" />
</form>
</div> </div>
</div> </div>
<img class="ui-title" alt="ERP5" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAAA/CAMAAADaDqrIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowMEM5NUE4MzQ5NjQxMUUzOUZEQUU2NUY1RTI1RjdCQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowMEM5NUE4NDQ5NjQxMUUzOUZEQUU2NUY1RTI1RjdCQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjAwQzk1QTgxNDk2NDExR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ADMzADMAAAD/AADMAACZAABmAAAzAAAAHHa7K3/AOojESZHJWZvNaKTSd63Whrbblb/fpMjks9Howtrt4e320uTx8Pb6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdfKHSQAAAOh0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ALItoLoAAAJkSURBVHja7NlZsqsgEABQ979C5kGGddxo4os0Q8BAynoFn0nUU23TNGRB9xzLdE3XdE3XdP2fLnIzF2VSrsYvC72HizAh9eZ5DVuOl15S4/jWwC+kDC8HPzCSJVHcRY8QXV2PwQuujUYTsYrvYlBv1yKLrsXHsPghnvR3Lazoip/JKuwpF8sm6/bY01Ow9CBlTXi53PNoRcUktEZT1NV1PIPnXAjtMJIMlzerFIzU1dVWF7aPj3Tetae4gjdxktG2et/qQjJ4kZFrv6ED4bK4eR1qduHzvEi4+PbGwD0EGu9CQQLFrv1F4jBc6BcuW3YhkPiPX1hOfxQvnHfh0HVMRqc4HuqiQf5k3mO6dq1s8Hx0H/Le5kq9YaNcxAcrZLpOvAv+ClcgNcZFtnrucd5Fwx4mXj0drnbBYXMuJmFDAV3Uhm4qlbHh3ddOrmholHNxFTVC+xTl2mf6pI4uVe4LwSp0DPGOmh/hAnM94bKZjkHlWuiLeV+cTab4luMKk82wy/Px2fLJskvKUk03hRf9RZ0wiYiZ4uVwVwTb9E71y0XboTYXGuTaa33Y47W5zBjXM3P11y7TfR2ycFdxyaW7uwSc5m0un9ix91m3TWJfW+1ijfW+wcVAfjS5dOP62LyvZZdcLHnA1MkFAtbgwq+Vm47po8OA1buwyy/a1ec5urzveAes2sV8kfW963mFaHNhlT0b6+Yi5+StchH1CtaK0ThXELDPLiyOPZHldzm/J1z9O/B14g7/K+DtkP7U8ivSeD4xaPCTSQvy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mAGYzAGYAADP/ADPMADOZADNmADMzADMAAAD/AADMAACZAABmAAAzAAAAHHa7K3/AOojESZHJWZvNaKTSd63Whrbblb/fpMjks9Howtrt4e320uTx8Pb6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdfKHSQAAAOh0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ALItoLoAAAJkSURBVHja7NlZsqsgEABQ979C5kGGddxo4os0Q8BAynoFn0nUU23TNGRB9xzLdE3XdE3XdP2fLnIzF2VSrsYvC72HizAh9eZ5DVuOl15S4/jWwC+kDC8HPzCSJVHcRY8QXV2PwQuujUYTsYrvYlBv1yKLrsXHsPghnvR3Lazoip/JKuwpF8sm6/bY01Ow9CBlTXi53PNoRcUktEZT1NV1PIPnXAjtMJIMlzerFIzU1dVWF7aPj3Tetae4gjdxktG2et/qQjJ4kZFrv6ED4bK4eR1qduHzvEi4+PbGwD0EGu9CQQLFrv1F4jBc6BcuW3YhkPiPX1hOfxQvnHfh0HVMRqc4HuqiQf5k3mO6dq1s8Hx0H/Le5kq9YaNcxAcrZLpOvAv+ClcgNcZFtnrucd5Fwx4mXj0drnbBYXMuJmFDAV3Uhm4qlbHh3ddOrmholHNxFTVC+xTl2mf6pI4uVe4LwSp0DPGOmh/hAnM94bKZjkHlWuiLeV+cTab4luMKk82wy/Px2fLJskvKUk03hRf9RZ0wiYiZ4uVwVwTb9E71y0XboTYXGuTaa33Y47W5zBjXM3P11y7TfR2ycFdxyaW7uwSc5m0un9ix91m3TWJfW+1ijfW+wcVAfjS5dOP62LyvZZdcLHnA1MkFAtbgwq+Vm47po8OA1buwyy/a1ec5urzveAes2sV8kfW963mFaHNhlT0b6+Yi5+StchH1CtaK0ThXELDPLiyOPZHldzm/J1z9O/B14g7/K+DtkP7U8ivSeD4xaPCTSQvy+YIfubZWzRgtRe1iMP+3mq7pmq7p6jv+BBgAPrgi/TzwWzkAAAAASUVORK5CYII="/>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.1430.15199.54101</string> </value> <value> <string>952.1567.4220.17373</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1466516646.25</float> <float>1467031987.88</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */ /*global window, rJS, Handlebars, RSVP, loopEventListener */
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) { (function (window, rJS, Handlebars, RSVP, loopEventListener) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -37,28 +37,20 @@ ...@@ -37,28 +37,20 @@
return g.getElement() return g.getElement()
.push(function (element) { .push(function (element) {
g.props.element = element; g.props.element = element;
g.props.jelement = $(element.querySelector("div"));
g.props.render_deferred = RSVP.defer(); g.props.render_deferred = RSVP.defer();
}); });
}) })
.ready(function (g) {
g.props.jelement.panel({
display: "overlay",
position: "left",
theme: "d"
// animate: false
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareMethod('toggle', function () { .declareMethod('toggle', function () {
this.props.jelement.panel("toggle"); this.props.element.classList.toggle('visible');
}) })
.declareMethod('close', function () { .declareMethod('close', function () {
this.props.jelement.panel("close"); if (this.props.element.classList.contains('visible')) {
this.props.element.classList.remove('visible');
}
}) })
.declareMethod('render', function () { .declareMethod('render', function () {
...@@ -89,8 +81,7 @@ ...@@ -89,8 +81,7 @@
return tmp; return tmp;
}) })
.push(function (my_translated_or_plain_html) { .push(function (my_translated_or_plain_html) {
g.props.jelement.html(my_translated_or_plain_html); g.props.element.querySelector("div").innerHTML = my_translated_or_plain_html;
g.props.jelement.trigger("create");
g.props.render_deferred.resolve(); g.props.render_deferred.resolve();
}); });
}) })
...@@ -110,8 +101,8 @@ ...@@ -110,8 +101,8 @@
}) })
.push(function () { .push(function () {
return loopEventListener( return loopEventListener(
panel_gadget.props.element.querySelector('form'), panel_gadget.props.element.querySelector('button'),
'submit', 'click',
false, false,
formSubmit formSubmit
); );
...@@ -119,4 +110,4 @@ ...@@ -119,4 +110,4 @@
}); });
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener)); }(window, rJS, Handlebars, RSVP, loopEventListener));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>947.3414.45097.15701</string> </value> <value> <string>952.1507.19232.15035</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1447406686.19</float> <float>1466524414.0</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, URI, jQuery */ /*global window, rJS, URI */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, URI, $) { (function (window, rJS, URI) {
"use strict"; "use strict";
var gadget_klass = rJS(window); var gadget_klass = rJS(window);
...@@ -135,9 +135,6 @@ ...@@ -135,9 +135,6 @@
element.removeChild(element.firstChild); element.removeChild(element.firstChild);
} }
element.appendChild(fragment); element.appendChild(fragment);
if (options.hasOwnProperty("form_validation_error")) {
$(element).trigger("create");
}
}); });
}); });
return queue; return queue;
...@@ -149,4 +146,4 @@ ...@@ -149,4 +146,4 @@
return this.render(options); return this.render(options);
}); });
}(window, rJS, URI, jQuery)); }(window, rJS, URI));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.10268.42242.60416</string> </value> <value> <string>952.10025.24641.8430</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1467046951.17</float> <float>1467032278.85</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*jslint indent: 2, maxerr: 3, maxlen: 100, nomen: true */ /*jslint indent: 2, maxerr: 3, maxlen: 100, nomen: true */
/*global window, document, rJS, RSVP, Handlebars, $, loopEventListener, /*global window, document, rJS, RSVP, Handlebars, loopEventListener,
QueryFactory, SimpleQuery, ComplexQuery, Query, console*/ QueryFactory, SimpleQuery, ComplexQuery, Query, console*/
(function (window, document, rJS, RSVP, Handlebars, $, loopEventListener, (function (window, document, rJS, RSVP, Handlebars, loopEventListener,
QueryFactory, SimpleQuery, ComplexQuery, Query, console) { QueryFactory, SimpleQuery, ComplexQuery, Query, console) {
"use strict"; "use strict";
var gadget_klass = rJS(window), var gadget_klass = rJS(window),
...@@ -132,7 +132,6 @@ ...@@ -132,7 +132,6 @@
}) })
.push(function (innerHTML) { .push(function (innerHTML) {
select_list[1].innerHTML = innerHTML; select_list[1].innerHTML = innerHTML;
$(select_list[1]).selectmenu('refresh');
if (isNumericComparison(event.target.value)) { if (isNumericComparison(event.target.value)) {
if (event.target.value.indexOf("date") !== -1) { if (event.target.value.indexOf("date") !== -1) {
input.setAttribute("type", "date"); input.setAttribute("type", "date");
...@@ -242,16 +241,11 @@ ...@@ -242,16 +241,11 @@
return RSVP.all(list); return RSVP.all(list);
}) })
.push(function (all_result) { .push(function (all_result) {
var innerHTML = "", var innerHTML = "";
select_list;
for (i = 0; i < all_result.length; i += 1) { for (i = 0; i < all_result.length; i += 1) {
innerHTML += all_result[i]; innerHTML += all_result[i];
} }
container.innerHTML = innerHTML; container.innerHTML = innerHTML;
select_list = container.querySelectorAll("select");
for (i = 0; i < select_list.length; i += 1) {
$(select_list[i]).selectmenu();
}
return listenToSelect(gadget, "auto"); return listenToSelect(gadget, "auto");
}); });
} }
...@@ -353,14 +347,8 @@ ...@@ -353,14 +347,8 @@
}) })
.push(function (template) { .push(function (template) {
var tmp = document.createElement("div"), var tmp = document.createElement("div"),
container = gadget.props.element.querySelector(".filter_item_container"), container = gadget.props.element.querySelector(".filter_item_container");
select_list,
i;
tmp.innerHTML = template; tmp.innerHTML = template;
select_list = tmp.querySelectorAll("select");
for (i = 0; i < select_list.length; i += 1) {
$(select_list[i]).selectmenu();
}
container.appendChild(tmp.querySelector("div")); container.appendChild(tmp.querySelector("div"));
return listenToSelect(gadget, class_value); return listenToSelect(gadget, class_value);
}); });
...@@ -379,5 +367,5 @@ ...@@ -379,5 +367,5 @@
); );
}); });
}(window, document, rJS, RSVP, Handlebars, $, loopEventListener, }(window, document, rJS, RSVP, Handlebars, loopEventListener,
QueryFactory, SimpleQuery, ComplexQuery, Query, console)); QueryFactory, SimpleQuery, ComplexQuery, Query, console));
\ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.2121.59518.17646</string> </value> <value> <string>952.10062.13895.62105</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455022145.56</float> <float>1467034494.63</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -14,24 +14,11 @@ ...@@ -14,24 +14,11 @@
<script src="gadget_erp5_searchfield.js"></script> <script src="gadget_erp5_searchfield.js"></script>
<script id="panel-template" type="text/x-handlebars-template"> <script id="panel-template" type="text/x-handlebars-template">
<div class="field_container"> <div class="ui-input-text ui-body-{{theme}} ui-input-has-icon ui-corner-all ui-shadow-inset ui-input-has-clear">
<div class="ui-field-contain"> <input type="search" data-enhanced="true" value="{{widget_value}}" name="search" {{widget_status_attribute}}>
<div class="bottom"> <button class="search_button ui-shadow-inset ui-btn ui-btn-inline ui-corner-all ui-btn-{{theme}} ui-btn-icon-notext ui-icon-search ui-override-theme ui-input-btn" data-role="button" data-enhanced="true" type="submit" />
<div class="ui-input-text ui-body-{{theme}} ui-input-has-icon ui-corner-all ui-shadow-inset ui-input-has-clear"> </div>
<input type="text" data-enhanced="true" value="{{widget_value}}" name="search" {{widget_status_attribute}} > </script>
<div class="ui-btn ui-input-clear ui-input-btn ui-corner-all ui-icon-times ui-btn-icon-notext" data-i18n="[node]header-submit">
- Submit<input data-enhanced="true" class="clear_button" type="submit" data-i18n="[value]header-submit" value="Submit" {{widget_status_attribute}} />
</div>
</div>
<div class="ui-shadow-inset ui-btn ui-btn-inline ui-corner-all ui-btn-{{theme}} ui-btn-icon-notext ui-icon-search ui-override-theme " >
<div class="ui-input-btn">
<input class="search_button" data-role="button" data-enhanced="true" type="submit" data-i18n="[value]" value=" ">
</div>
</div>
</div>
</div>
</div>
</script>
</head> </head>
<body> <body>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.28959.27081.52548</string> </value> <value> <string>952.1567.50811.55193</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1460449490.1</float> <float>1467032063.71</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -77,20 +77,6 @@ ...@@ -77,20 +77,6 @@
result[input.getAttribute('name')] = value; result[input.getAttribute('name')] = value;
return result; return result;
})
.declareService(function () {
var gadget = this,
clear_button = gadget.props.element.querySelector(".clear_button"),
search_input = gadget.props.element.querySelector("input");
return loopEventListener(
clear_button,
"click",
false,
function () {
search_input.value = "";
search_input.focus();
}
);
}); });
}(window, rJS, RSVP, Handlebars, loopEventListener)); }(window, rJS, RSVP, Handlebars, loopEventListener));
\ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.28962.48103.49971</string> </value> <value> <string>951.35286.47701.22630</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1460390605.12</float> <float>1466524830.34</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
'gadget_erp5_header.js', 'gadget_erp5_header.js',
'gadget_erp5_jio.html', 'gadget_erp5_jio.html',
'gadget_erp5_jio.js', 'gadget_erp5_jio.js',
'gadget_erp5_latest.css',
'gadget_erp5_page_action.html', 'gadget_erp5_page_action.html',
'gadget_erp5_page_action.js', 'gadget_erp5_page_action.js',
'gadget_erp5_page_form.html', 'gadget_erp5_page_form.html',
...@@ -87,7 +86,6 @@ ...@@ -87,7 +86,6 @@
'gadget_erp5_page_worklist.js', 'gadget_erp5_page_worklist.js',
'gadget_erp5_panel.html', 'gadget_erp5_panel.html',
'gadget_erp5_panel.js', 'gadget_erp5_panel.js',
'gadget_erp5_panel_configuration.html',
'gadget_erp5_pt_form_dialog.html', 'gadget_erp5_pt_form_dialog.html',
'gadget_erp5_pt_form_dialog.js', 'gadget_erp5_pt_form_dialog.js',
'gadget_erp5_pt_form_list.html', 'gadget_erp5_pt_form_list.html',
...@@ -118,9 +116,6 @@ ...@@ -118,9 +116,6 @@
'handlebars.js', 'handlebars.js',
'i18next.js', 'i18next.js',
'jiodev.js', 'jiodev.js',
'jquery.js',
'jquerymobile.css',
'jquerymobile.js',
'renderjs.js', 'renderjs.js',
'rsvp.js' 'rsvp.js'
]; ];
...@@ -191,4 +186,4 @@ ...@@ -191,4 +186,4 @@
}(self, caches, fetch)); }(self, caches, fetch));
\ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.33133.9116.24098</string> </value> <value> <string>952.5891.40125.8465</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1468419919.07</float> <float>1467035757.8</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, document, RSVP, loopEventListener, jQuery */ /*global window, rJS, document, RSVP, loopEventListener */
/*jslint indent: 2, maxerr: 3 */ /*jslint indent: 2, maxerr: 3 */
(function (window, rJS, document, RSVP, loopEventListener, $) { (function (window, rJS, document, RSVP, loopEventListener) {
"use strict"; "use strict";
rJS(window) rJS(window)
...@@ -58,24 +58,6 @@ ...@@ -58,24 +58,6 @@
} }
result[this.property_dict.name] = value; result[this.property_dict.name] = value;
return result; return result;
})
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.property_dict.textarea_deferred.promise;
})
.push(function (textarea) {
return loopEventListener(
textarea,
'focus',
false,
function () {
$(textarea).keyup();
}
);
});
}); });
}(window, rJS, document, RSVP, loopEventListener, jQuery)); }(window, rJS, document, RSVP, loopEventListener));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.24043.58938.21367</string> </value> <value> <string>952.10031.38084.59682</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456336348.49</float> <float>1467032882.44</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>erp5css.less</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/plain</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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