Commit 0937f05c authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Drop jquery/jquerymobile dependencies

parent 5b8532f2
/*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>
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>942.62057.14260.21691</string> </value> <value> <string>952.10050.10314.60416</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,8 +252,8 @@ ...@@ -252,8 +252,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1431351348.13</float> <float>1467033785.24</float>
<string>GMT</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
/*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";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// TEMPLATE API // TEMPLATE API
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// panel_category_list_header // panel_category_list_header
// { // {
// "close_i18n": [SET], // "close_i18n": [SET],
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
// "type_i18n": [type of filter|create|...], // "type_i18n": [type of filter|create|...],
// "value_i18n": [value to create or filter for, eg. region:foo] // "value_i18n": [value to create or filter for, eg. region:foo]
// }] // }]
// panel_category_list_partial // panel_category_list_partial
// { // {
// "i18n": [category title], // "i18n": [category title],
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
// "i18n":" [text to display] // "i18n":" [text to display]
// }] // }]
// }] // }]
// } // }
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// some methods // some methods
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
var gadget_klass = rJS(window), var gadget_klass = rJS(window),
templater = gadget_klass.__template_element, templater = gadget_klass.__template_element,
// pre-compile // pre-compile
panel_category_list_header = Handlebars.compile( panel_category_list_header = Handlebars.compile(
templater.getElementById("panel-category-list-header").innerHTML templater.getElementById("panel-category-list-header").innerHTML
) )
...@@ -48,9 +48,9 @@ ...@@ -48,9 +48,9 @@
"category-taglist-partial", "category-taglist-partial",
templater.getElementById("category-taglist-partial").innerHTML templater.getElementById("category-taglist-partial").innerHTML
)*/; )*/;
gadget_klass gadget_klass
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// ready // ready
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
}) })
.push(function (my_panel_header) { .push(function (my_panel_header) {
panel_element.innerHTML = my_panel_header; panel_element.innerHTML = my_panel_header;
$(panel_element).enhanceWithin();
return gadget; return gadget;
}) })
.push(function () { .push(function () {
...@@ -104,17 +103,18 @@ ...@@ -104,17 +103,18 @@
.declareMethod('setPanelContent', function (my_option_dict) { .declareMethod('setPanelContent', function (my_option_dict) {
/* /*
so Romain requested to have a gadget depending on use case of this 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 panel. In our case it should be a domain tree and it should load a
certain amount or type of domains/categories certain amount or type of domains/categories
Alternatively we can load something else. Question is whether this Alternatively we can load something else. Question is whether this
should be a domain tree per ... app or if every domaintree can be should be a domain tree per ... app or if every domaintree can be
different depending on a parameter passed into intialization. different depending on a parameter passed into intialization.
Also, we must make clear that the content can be dumped to make space Also, we must make clear that the content can be dumped to make space
for new content! for new content!
Do this. Do this.
*/ */
return;
}) })
.declareMethod('togglePanel', function () { .declareMethod('togglePanel', function () {
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
function formSubmit() { function formSubmit() {
return gadget.togglePanel(); return gadget.togglePanel();
} }
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
return gadget.property_dict.defer.promise; return gadget.property_dict.defer.promise;
...@@ -169,33 +169,6 @@ ...@@ -169,33 +169,6 @@
} }
return RSVP.all(event_list); return RSVP.all(event_list);
}) })
}); });
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener)); }(window, rJS, Handlebars, RSVP, loopEventListener));
\ No newline at end of file
/*
.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
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>942.62105.59106.27904</string> </value> <value> <string>952.10051.63355.58214</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -245,8 +245,8 @@ ...@@ -245,8 +245,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1431354245.91</float> <float>1467033842.68</float>
<string>GMT</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
...@@ -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+IDx4On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b//2bM/2aZ/2Zm/2Yz/2YA/zP//zPM/zOZ/zNm/zMz/zMA/wD//wDM/wCZ/wBm/wAz/wAAzP//zP/MzP+ZzP9mzP8zzP8AzMz/zMzMzMyZzMxmzMwzzMwAzJn/zJnMzJmZzJlmzJkzzJkAzGb/zGbMzGaZzGZmzGYzzGYAzDP/zDPMzDOZzDNmzDMzzDMAzAD/zADMzACZzABmzAAzzAAAmf//mf/Mmf+Zmf9mmf8zmf8Amcz/mczMmcyZmcxmmcwzmcwAmZn/mZnMmZmZmZlmmZkzmZkAmWb/mWbMmWaZmWZmmWYzmWYAmTP/mTPMmTOZmTNmmTMzmTMAmQD/mQDMmQCZmQBmmQAzmQAAZv//Zv/MZv+ZZv9mZv8zZv8AZsz/ZszMZsyZZsxmZswzZswAZpn/ZpnMZpmZZplmZpkzZpkAZmb/ZmbMZmaZZmZmZmYzZmYAZjP/ZjPMZjOZZjNmZjMzZjMAZgD/ZgDMZgCZZgBmZgAzZgAAM///M//MM/+ZM/9mM/8zM/8AM8z/M8zMM8yZM8xmM8wzM8wAM5n/M5nMM5mZM5lmM5kzM5kAM2b/M2bMM2aZM2ZmM2YzM2YAMzP/MzPMMzOZMzNmMzMzMzMAMwD/MwDMMwCZMwBmMwAzMwAAAP//AP/MAP+ZAP9mAP8zAP8AAMz/AMzMAMyZAMxmAMwzAMwAAJn/AJnMAJmZAJlmAJkzAJkAAGb/AGbMAGaZAGZmAGYzAGYAADP/ADPMADOZADNmADMzADMAAAD/AADMAACZAABmAAAzAAAAHHa7K3/AOojESZHJWZvNaKTSd63Whrbblb/fpMjks9Howtrt4e320uTx8Pb6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdfKHSQAAAOh0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////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5nM/5mZ/5lm/5kz/5kA/2b//2bM/2aZ/2Zm/2Yz/2YA/zP//zPM/zOZ/zNm/zMz/zMA/wD//wDM/wCZ/wBm/wAz/wAAzP//zP/MzP+ZzP9mzP8zzP8AzMz/zMzMzMyZzMxmzMwzzMwAzJn/zJnMzJmZzJlmzJkzzJkAzGb/zGbMzGaZzGZmzGYzzGYAzDP/zDPMzDOZzDNmzDMzzDMAzAD/zADMzACZzABmzAAzzAAAmf//mf/Mmf+Zmf9mmf8zmf8Amcz/mczMmcyZmcxmmcwzmcwAmZn/mZnMmZmZmZlmmZkzmZkAmWb/mWbMmWaZmWZmmWYzmWYAmTP/mTPMmTOZmTNmmTMzmTMAmQD/mQDMmQCZmQBmmQAzmQAAZv//Zv/MZv+ZZv9mZv8zZv8AZsz/ZszMZsyZZsxmZswzZswAZpn/ZpnMZpmZZplmZpkzZpkAZmb/ZmbMZmaZZmZmZmYzZmYAZjP/ZjPMZjOZZjNmZjMzZjMAZgD/ZgDMZgCZZgBmZgAzZgAAM///M//MM/+ZM/9mM/8zM/8AM8z/M8zMM8yZM8xmM8wzM8wAM5n/M5nMM5mZM5lmM5kzM5kAM2b/M2bMM2aZM2ZmM2YzM2YAMzP/MzPMMzOZMzNmMzMzMzMAMwD/MwDMMwCZMwBmMwAzMwAAAP//AP/MAP+ZAP9mAP8zAP8AAMz/AMzMAMyZAMxmAMwzAMwAAJn/AJnMAJmZAJlmAJkzAJkAAGb/AGbMAGaZAGZmAGYzAGYAADP/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>
......
/*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>
......
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