Commit 4da7bc4a authored by Romain Courteaud's avatar Romain Courteaud

erp5_*: use renderJS.loopEventListener

parent d7e30910
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -235,4 +235,4 @@
}
}, false, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>968.34033.5348.45653</string> </value>
<value> <string>989.27525.21955.33160</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1530177764.85</float>
<float>1613145214.75</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -17,7 +17,7 @@
* along with DREAM. If not, see <http://www.gnu.org/licenses/>.
* ==========================================================================*/
/*global console, window, Node, RSVP, rJS, $, jsPlumb, Handlebars,
loopEventListener, promiseEventListener, DOMParser, Springy */
promiseEventListener, DOMParser, Springy */
/*jslint vars: true unparam: true nomen: true todo: true */
(function (RSVP, rJS, $, jsPlumb, Handlebars, loopEventListener, promiseEventListener, DOMParser, Springy) {
"use strict";
......@@ -867,4 +867,4 @@
]);
});
}(RSVP, rJS, $, jsPlumb, Handlebars, loopEventListener, promiseEventListener, DOMParser, Springy));
\ No newline at end of file
}(RSVP, rJS, $, jsPlumb, Handlebars, rJS.loopEventListener, promiseEventListener, DOMParser, Springy));
\ No newline at end of file
/*global window, rJS, RSVP, jIO, MediaSource,
loopEventListener
/*global window, rJS, RSVP, jIO, MediaSource
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS) {
(function (window, rJS, loopEventListener) {
"use strict";
rJS(window)
......@@ -172,4 +171,4 @@
true
);
});
}(window, rJS));
\ No newline at end of file
}(window, rJS, rJS.loopEventListener));
\ No newline at end of file
/*global window, rJS, RSVP, jIO, AudioContext,
URL, MediaSource, loopEventListener, document,
URL, MediaSource, document,
promiseEventListener, ArrayBuffer */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, AudioContext, URL, MediaSource, loopEventListener) {
......@@ -254,4 +254,4 @@
}
});
});
}(window, rJS, RSVP, AudioContext, URL, MediaSource, loopEventListener));
\ No newline at end of file
}(window, rJS, RSVP, AudioContext, URL, MediaSource, rJS.loopEventListener));
\ No newline at end of file
/*global window, rJS, RSVP, URL, Blob,
loopEventListener, document*/
/*global window, rJS, RSVP, URL, Blob, document*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, URL, loopEventListener) {
"use strict";
......@@ -134,4 +133,4 @@
}
});
});
}(window, rJS, RSVP, URL, loopEventListener));
\ No newline at end of file
}(window, rJS, RSVP, URL, rJS.loopEventListener));
\ No newline at end of file
/*global window, rJS, RSVP, echarts, loopEventListener */
/*global window, rJS, RSVP, echarts */
/*jslint nomen: true, indent: 2, unparam: true */
(function (window, rJS, RSVP, echarts, loopEventListener) {
"use strict";
......@@ -292,4 +292,4 @@
gadget.changeState({clickHandlerReady: true})
]);
});
}(window, rJS, RSVP, echarts, loopEventListener));
}(window, rJS, RSVP, echarts, rJS.loopEventListener));
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>983.46019.14276.42427</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1588756120.87</float>
<float>1613148110.9</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */
/*global window, rJS, Handlebars, jQuery, RSVP */
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {
"use strict";
......@@ -142,4 +142,4 @@
});
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
\ No newline at end of file
}(window, rJS, Handlebars, jQuery, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -276,7 +276,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>957.11997.57654.14353</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -294,7 +294,7 @@
</tuple>
<state>
<tuple>
<float>1486556869.31</float>
<float>1613148142.64</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -302,4 +302,4 @@
}
}, true, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -231,7 +231,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.9269.443.55364</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -249,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>1501746660.8</float>
<float>1613148177.99</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, URI, location,
loopEventListener, btoa */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP) {
"use strict";
function setjIODAVConfiguration(gadget) {
return gadget.getSetting("portal_type")
.push(function (portal_type) {
var old_date = new Date(),
configuration = {};
// We are looking for documents modified in the past 3 month
old_date = new Date(old_date.getFullYear(), old_date.getMonth() - 3);
configuration = {
type: "replicate",
// XXX This drop the signature lists...
query: {
query: 'portal_type:"' + portal_type + '" ',
// XX Synchonizing the whole module is too much, here is a way to start quietly
//+ 'AND local_roles: ("Owner") '
//+ 'AND validation_state: ("draft", "released_alive", "shared_alive", "published_alive") ',
limit: [0, 1234567890]
},
use_remote_post: false,
conflict_handling: 2,
check_local_modification: true,
check_local_creation: true,
check_local_deletion: true,
check_remote_modification: true,
check_remote_creation: true,
check_remote_deletion: true,
local_sub_storage: {
type: "mapping",
attachment_mapping_dict: {
'data': {
get: {uri_template: 'enclosure'},
put: {uri_template: 'enclosure'}
}
},
sub_storage: {
type: "query",
sub_storage: {
type: "uuid",
sub_storage: {
type: "indexeddb",
database: "officejs-dav"
}
}
}
},
remote_sub_storage: {
type: "mapping",
attachment_mapping_dict: {
'data': {
get: {uri_template: 'enclosure'},
put: {uri_template: 'enclosure'}
}
},
sub_storage: {
type: "query",
sub_storage: {
type: "drivetojiomapping",
sub_storage: {
type: "mapping",
mapping_dict: {
"portal_type": {
"equal": "type",
"value": {
"switch": {
"PDF": {
"equal": "pdf"
},
"Web Text": {
"equal": "txt"
}
}
}
}
},
sub_storage: {
type: "dav",
url: gadget.props.element.querySelector("input[name='dav_url']").value,
basic_login: btoa(gadget.props.element.querySelector("input[name='dav_username']").value
+ ':' + gadget.props.element.querySelector("input[name='dav_password']").value),
with_credentials: true
}
}
}
}
}
};
return gadget.setSetting('jio_storage_description', configuration);
})
.push(function () {
return gadget.setSetting('jio_storage_name', "DAV");
})
.push(function () {
return gadget.reload();
});
}
var gadget_klass = rJS(window);
gadget_klass
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
g.props.deferred = RSVP.defer();
return g.getSetting('jio_storage_name');
})
.push(function (jio_storage_name) {
if (jio_storage_name === "DAV") {
return g.getSetting('jio_storage_description')
.push(function (jio_storage_description) {
g.props.element.querySelector("input[name='dav_url']").value =
jio_storage_description.remote_sub_storage.sub_storage.sub_storage.url;
});
}
});
})
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("reload", "reload")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareMethod("render", function () {
var gadget = this;
return gadget.updateHeader({
title: "Connect To DAV Storage",
back_url: "#page=jio_configurator",
panel_action: false
}).push(function () {
return gadget.props.deferred.resolve();
});
})
/////////////////////////////////////////
// Form submit
/////////////////////////////////////////
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.promise;
})
.push(function () {
return loopEventListener(
gadget.props.element.querySelector('form'),
'submit',
true,
function () {
return setjIODAVConfiguration(gadget);
}
);
});
});
}(window, rJS, RSVP));
\ No newline at end of file
/*global window, rJS, RSVP, URI, location,
btoa */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP, loopEventListener) {
"use strict";
function setjIODAVConfiguration(gadget) {
return gadget.getSetting("portal_type")
.push(function (portal_type) {
var old_date = new Date(),
configuration = {};
// We are looking for documents modified in the past 3 month
old_date = new Date(old_date.getFullYear(), old_date.getMonth() - 3);
configuration = {
type: "replicate",
// XXX This drop the signature lists...
query: {
query: 'portal_type:"' + portal_type + '" ',
// XX Synchonizing the whole module is too much, here is a way to start quietly
//+ 'AND local_roles: ("Owner") '
//+ 'AND validation_state: ("draft", "released_alive", "shared_alive", "published_alive") ',
limit: [0, 1234567890]
},
use_remote_post: false,
conflict_handling: 2,
check_local_modification: true,
check_local_creation: true,
check_local_deletion: true,
check_remote_modification: true,
check_remote_creation: true,
check_remote_deletion: true,
local_sub_storage: {
type: "mapping",
attachment_mapping_dict: {
'data': {
get: {uri_template: 'enclosure'},
put: {uri_template: 'enclosure'}
}
},
sub_storage: {
type: "query",
sub_storage: {
type: "uuid",
sub_storage: {
type: "indexeddb",
database: "officejs-dav"
}
}
}
},
remote_sub_storage: {
type: "mapping",
attachment_mapping_dict: {
'data': {
get: {uri_template: 'enclosure'},
put: {uri_template: 'enclosure'}
}
},
sub_storage: {
type: "query",
sub_storage: {
type: "drivetojiomapping",
sub_storage: {
type: "mapping",
mapping_dict: {
"portal_type": {
"equal": "type",
"value": {
"switch": {
"PDF": {
"equal": "pdf"
},
"Web Text": {
"equal": "txt"
}
}
}
}
},
sub_storage: {
type: "dav",
url: gadget.props.element.querySelector("input[name='dav_url']").value,
basic_login: btoa(gadget.props.element.querySelector("input[name='dav_username']").value
+ ':' + gadget.props.element.querySelector("input[name='dav_password']").value),
with_credentials: true
}
}
}
}
}
};
return gadget.setSetting('jio_storage_description', configuration);
})
.push(function () {
return gadget.setSetting('jio_storage_name', "DAV");
})
.push(function () {
return gadget.reload();
});
}
var gadget_klass = rJS(window);
gadget_klass
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
g.props.deferred = RSVP.defer();
return g.getSetting('jio_storage_name');
})
.push(function (jio_storage_name) {
if (jio_storage_name === "DAV") {
return g.getSetting('jio_storage_description')
.push(function (jio_storage_description) {
g.props.element.querySelector("input[name='dav_url']").value =
jio_storage_description.remote_sub_storage.sub_storage.sub_storage.url;
});
}
});
})
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("reload", "reload")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareMethod("render", function () {
var gadget = this;
return gadget.updateHeader({
title: "Connect To DAV Storage",
back_url: "#page=jio_configurator",
panel_action: false
}).push(function () {
return gadget.props.deferred.resolve();
});
})
/////////////////////////////////////////
// Form submit
/////////////////////////////////////////
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.promise;
})
.push(function () {
return loopEventListener(
gadget.props.element.querySelector('form'),
'submit',
true,
function () {
return setjIODAVConfiguration(gadget);
}
);
});
});
}(window, rJS, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -69,7 +69,9 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -240,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.64653.18502.64853</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1485781872.54</float>
<float>1613148230.16</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -394,4 +394,4 @@
}
}, true, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -231,7 +231,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>979.60628.36308.55278</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -249,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>1574249684.83</float>
<float>1613148260.92</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, document, loopEventListener, RSVP */
/*global window, rJS, Handlebars, document, RSVP */
(function (window, rJS, Handlebars, document, loopEventListener, RSVP) {
"use strict";
......@@ -325,4 +325,4 @@
);
});
}(window, rJS, Handlebars, document, loopEventListener, RSVP));
\ No newline at end of file
}(window, rJS, Handlebars, document, rJS.loopEventListener, RSVP));
\ No newline at end of file
......@@ -220,7 +220,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.17525.46862.41420</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1509358444.14</float>
<float>1613148401.54</float>
<string>UTC</string>
</tuple>
</state>
......
/*globals window, rJS, Handlebars, RSVP, loopEventListener, console*/
/*globals window, rJS, Handlebars, RSVP, console*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, RSVP, rJS, Handlebars, loopEventListener) {
"use strict";
......@@ -224,4 +224,4 @@
});
});
}(window, RSVP, rJS, Handlebars, loopEventListener));
\ No newline at end of file
}(window, RSVP, rJS, Handlebars, rJS.loopEventListener));
\ No newline at end of file
......@@ -237,7 +237,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.44217.46814.8652</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -255,7 +255,7 @@
</tuple>
<state>
<tuple>
<float>1495027908.84</float>
<float>1613148429.19</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -314,4 +314,4 @@
}
}, true, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.18619.5978.10410</string> </value>
<value> <string>989.63663.64953.54152</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1522144773.61</float>
<float>1613148488.14</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, loopEventListener,
/*global window, rJS, RSVP,
jIO, document */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, jIO, RSVP) {
(function (window, rJS, jIO, RSVP, loopEventListener) {
"use strict";
var content_type = {
......@@ -151,4 +151,4 @@
});
});
});
}(window, rJS, jIO, RSVP));
}(window, rJS, jIO, RSVP, rJS.loopEventListener));
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.34361.37820.6144</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1522420374.86</float>
<float>1613148513.02</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, document, rJS, RSVP,
loopEventListener*/
/*global window, document, rJS, RSVP*/
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, document, RSVP) {
(function (window, rJS, document, RSVP, loopEventListener) {
"use strict";
function addLine(gadget, app_name, edited_app_dict) {
......@@ -54,4 +53,4 @@
});
})
}(window, rJS, document, RSVP));
\ No newline at end of file
}(window, rJS, document, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -237,7 +237,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>957.15063.30806.32119</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -255,7 +255,7 @@
</tuple>
<state>
<tuple>
<float>1486736144.05</float>
<float>1613148552.06</float>
<string>UTC</string>
</tuple>
</state>
......
/*globals window, RSVP, rJS, jIO, loopEventListener, URL, document */
/*globals window, RSVP, rJS, jIO, URL, document */
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
(function (window, RSVP, rJS, jIO, URL) {
(function (window, RSVP, rJS, jIO, URL, loopEventListener) {
"use strict";
var origin_url = (window.location.origin + window.location.pathname)
......@@ -226,4 +226,4 @@
});
});
}(window, RSVP, rJS, jIO, URL));
}(window, RSVP, rJS, jIO, URL, rJS.loopEventListener));
......@@ -258,7 +258,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>986.21093.7100.63419</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -276,7 +276,7 @@
</tuple>
<state>
<tuple>
<float>1600969351.28</float>
<float>1613148589.32</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, document, rJS, RSVP, URI, location, Handlebars
loopEventListener*/
/*global window, document, rJS, RSVP, URI, location, Handlebars*/
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP, Handlebars) {
(function (window, rJS, RSVP, Handlebars, loopEventListener) {
"use strict";
/////////////////////////////////////////////////////////////////
......@@ -138,4 +137,4 @@
});
}(window, rJS, RSVP, Handlebars));
}(window, rJS, RSVP, Handlebars, rJS.loopEventListener));
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>980.6862.7827.1604</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1574956283.0</float>
<float>1613148632.58</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, document, rJS, RSVP, URI, location,
loopEventListener*/
/*global window, document, rJS, RSVP, URI, location*/
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP) {
(function (window, rJS, RSVP, loopEventListener) {
"use strict";
function setCribConfiguration(gadget) {
......@@ -101,4 +100,4 @@
});
}(window, rJS, RSVP));
\ No newline at end of file
}(window, rJS, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -237,7 +237,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.2808.36471.12765</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -255,7 +255,7 @@
</tuple>
<state>
<tuple>
<float>1497451951.77</float>
<float>1613148671.51</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, URI, location,
loopEventListener, btoa */
/*global window, rJS, RSVP, URI, location, btoa */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP) {
(function (window, rJS, RSVP, loopEventListener) {
"use strict";
function setjIODAVConfiguration(gadget, options) {
......@@ -227,4 +226,4 @@
});
});
}(window, rJS, RSVP));
\ No newline at end of file
}(window, rJS, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.45561.47559.9591</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1515684204.48</float>
<float>1613148710.12</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, jIO, Handlebars, navigator, MediaRecorder, Blob, loopEventListener*/
/*global window, rJS, jIO, Handlebars, navigator, MediaRecorder, Blob*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS) {
"use strict";
......
......@@ -275,7 +275,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.3000.50774.61815</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -293,7 +293,7 @@
</tuple>
<state>
<tuple>
<float>1525337075.73</float>
<float>1613148813.68</float>
<string>UTC</string>
</tuple>
</state>
......
/*global document, window, rJS, RSVP, loopEventListener, navigator, MediaRecorder, Blob, setInterval, Promise */
/*global document, window, rJS, RSVP, navigator, MediaRecorder, Blob, setInterval, Promise */
/*jslint indent:2, maxlen: 80, nomen: true */
(function (window, rJS, RSVP) {
(function (window, rJS, RSVP, loopEventListener) {
"use strict";
function promiseMyStream(stream_options, callback) {
......@@ -186,4 +186,4 @@
return gadget.record();
});
});
}(window, rJS, RSVP));
\ No newline at end of file
}(window, rJS, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -248,7 +248,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>980.54461.59381.50158</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1577787866.92</float>
<float>1613148857.8</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -314,4 +314,4 @@
}
}, true, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -66,7 +66,9 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -154,52 +156,56 @@
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1562163551.28</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published</string> </value>
</item>
</dictionary>
</list>
</tuple>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1562163551.28</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
......@@ -207,58 +213,62 @@
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.54306.32835.10854</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1562160158.27</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1613148885.36</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
......@@ -266,58 +276,62 @@
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</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>1562159899.76</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</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>1562159899.76</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, rJS, RSVP, Handlebars, loopEventListener */
/*jslint nomen: true, indent: 2 */
(function (window, rJS, RSVP, Handlebars, loopEventListener) {
"use strict";
/////////////////////////////////////////////////////////////////
// templates
/////////////////////////////////////////////////////////////////
var gadget_klass = rJS(window),
templater = gadget_klass.__template_element,
listbox_widget_table = Handlebars.compile(
templater.getElementById("listbox-widget-table").innerHTML
);
Handlebars.registerPartial(
"listbox-widget-table-partial",
templater.getElementById("listbox-widget-table-partial").innerHTML
);
/////////////////////////////////////////////////////////////////
// some methods
/////////////////////////////////////////////////////////////////
gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
.ready(function (gadget) {
gadget.property_dict = {
render_deferred: RSVP.defer()
};
})
.ready(function (gadget) {
return gadget.getElement()
.push(function (element) {
gadget.property_dict.element = element;
});
})
/////////////////////////////////////////////////////////////////
// published methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("redirect", "redirect")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('render', function (option_dict) {
var gadget = this,
content = '',
k,
k_len,
search_list = [],
translated_column_list = [],
all_docs_result;
// store initial configuration
gadget.property_dict.option_dict = option_dict;
// Create the search query
if (option_dict.search) {
for (k = 0, k_len = option_dict.column_list.length; k < k_len; k += 1) {
search_list.push(option_dict.column_list[k].select + ':"%' + option_dict.search + '%"');
}
option_dict.query.query = '(' + search_list.join(' OR ') + ') AND ' + option_dict.query.query;
}
return gadget.jio_allDocs(option_dict.query)
.push(function (result) {
var promise_list = [],
i_len,
i;
all_docs_result = result;
for (i = 0, i_len = result.data.total_rows; i < i_len; i += 1) {
promise_list.push(gadget.getUrlFor({jio_key: result.data.rows[i].id, page: 'view'}));
}
return RSVP.all(promise_list);
})
.push(function (link_list) {
var row_list = [],
cell_list,
i_len,
i,
j_len,
j;
// build handlebars object
for (j = 0, j_len = all_docs_result.data.total_rows; j < j_len; j += 1) {
cell_list = [];
for (i = 0, i_len = option_dict.column_list.length; i < i_len; i += 1) {
cell_list.push({
"href": link_list[j],
"value": all_docs_result.data.rows[j].value[option_dict.column_list[i].select]
});
}
row_list.push({"cell_list": cell_list});
}
for (i = 0; i < option_dict.column_list.length; i += 1) {
translated_column_list.push(gadget.translate(option_dict.column_list[i].title));
}
return RSVP.all([
row_list,
RSVP.all(translated_column_list)
]);
})
.push(function (result_list) {
content += listbox_widget_table({
widget_theme : option_dict.widget_theme,
search: option_dict.search,
column_list: result_list[1],
row_list: result_list[0]
});
gadget.property_dict.element.querySelector(".custom-grid .ui-body-c")
.innerHTML = content;
gadget.property_dict.render_deferred.resolve();
});
})
/////////////////////////////////////////////////////////////////
// declared service
/////////////////////////////////////////////////////////////////
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.property_dict.render_deferred.promise;
})
.push(function () {
return loopEventListener(
gadget.property_dict.element.querySelector('form'),
'submit',
false,
function (evt) {
return gadget.redirect({
jio_key: gadget.property_dict.option_dict.jio_key || '',
page: gadget.property_dict.option_dict.search_page || '',
search: evt.target[0].value
});
}
);
});
});
}(window, rJS, RSVP, Handlebars, loopEventListener));
\ No newline at end of file
/*global window, rJS, RSVP, Handlebars */
/*jslint nomen: true, indent: 2 */
(function (window, rJS, RSVP, Handlebars, loopEventListener) {
"use strict";
/////////////////////////////////////////////////////////////////
// templates
/////////////////////////////////////////////////////////////////
var gadget_klass = rJS(window),
templater = gadget_klass.__template_element,
listbox_widget_table = Handlebars.compile(
templater.getElementById("listbox-widget-table").innerHTML
);
Handlebars.registerPartial(
"listbox-widget-table-partial",
templater.getElementById("listbox-widget-table-partial").innerHTML
);
/////////////////////////////////////////////////////////////////
// some methods
/////////////////////////////////////////////////////////////////
gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
.ready(function (gadget) {
gadget.property_dict = {
render_deferred: RSVP.defer()
};
})
.ready(function (gadget) {
return gadget.getElement()
.push(function (element) {
gadget.property_dict.element = element;
});
})
/////////////////////////////////////////////////////////////////
// published methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("redirect", "redirect")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('render', function (option_dict) {
var gadget = this,
content = '',
k,
k_len,
search_list = [],
translated_column_list = [],
all_docs_result;
// store initial configuration
gadget.property_dict.option_dict = option_dict;
// Create the search query
if (option_dict.search) {
for (k = 0, k_len = option_dict.column_list.length; k < k_len; k += 1) {
search_list.push(option_dict.column_list[k].select + ':"%' + option_dict.search + '%"');
}
option_dict.query.query = '(' + search_list.join(' OR ') + ') AND ' + option_dict.query.query;
}
return gadget.jio_allDocs(option_dict.query)
.push(function (result) {
var promise_list = [],
i_len,
i;
all_docs_result = result;
for (i = 0, i_len = result.data.total_rows; i < i_len; i += 1) {
promise_list.push(gadget.getUrlFor({jio_key: result.data.rows[i].id, page: 'view'}));
}
return RSVP.all(promise_list);
})
.push(function (link_list) {
var row_list = [],
cell_list,
i_len,
i,
j_len,
j;
// build handlebars object
for (j = 0, j_len = all_docs_result.data.total_rows; j < j_len; j += 1) {
cell_list = [];
for (i = 0, i_len = option_dict.column_list.length; i < i_len; i += 1) {
cell_list.push({
"href": link_list[j],
"value": all_docs_result.data.rows[j].value[option_dict.column_list[i].select]
});
}
row_list.push({"cell_list": cell_list});
}
for (i = 0; i < option_dict.column_list.length; i += 1) {
translated_column_list.push(gadget.translate(option_dict.column_list[i].title));
}
return RSVP.all([
row_list,
RSVP.all(translated_column_list)
]);
})
.push(function (result_list) {
content += listbox_widget_table({
widget_theme : option_dict.widget_theme,
search: option_dict.search,
column_list: result_list[1],
row_list: result_list[0]
});
gadget.property_dict.element.querySelector(".custom-grid .ui-body-c")
.innerHTML = content;
gadget.property_dict.render_deferred.resolve();
});
})
/////////////////////////////////////////////////////////////////
// declared service
/////////////////////////////////////////////////////////////////
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.property_dict.render_deferred.promise;
})
.push(function () {
return loopEventListener(
gadget.property_dict.element.querySelector('form'),
'submit',
false,
function (evt) {
return gadget.redirect({
jio_key: gadget.property_dict.option_dict.jio_key || '',
page: gadget.property_dict.option_dict.search_page || '',
search: evt.target[0].value
});
}
);
});
});
}(window, rJS, RSVP, Handlebars, rJS.loopEventListener));
\ No newline at end of file
......@@ -69,7 +69,9 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -240,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.64651.59655.13977</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1485779785.44</float>
<float>1613148911.65</float>
<string>UTC</string>
</tuple>
</state>
......
/*global RSVP, FileReader */
/*global RSVP, FileReader, renderJS */
/*jslint unparam: true */
(function(window, RSVP, FileReader) {
(function(window, RSVP, FileReader, renderJS) {
"use strict";
window.loopEventListener = function(target, type, useCapture, callback, allowDefault) {
//////////////////////////
// Infinite event listener (promise is never resolved)
// eventListener is removed when promise is cancelled/rejected
//////////////////////////
var handle_event_callback, callback_promise;
function cancelResolver() {
if (callback_promise !== undefined && typeof callback_promise.cancel === "function") {
callback_promise.cancel();
}
}
function canceller() {
if (handle_event_callback !== undefined) {
target.removeEventListener(type, handle_event_callback, useCapture);
}
cancelResolver();
}
function itsANonResolvableTrap(resolve, reject) {
handle_event_callback = function(evt) {
evt.stopPropagation();
if (allowDefault !== true) {
evt.preventDefault();
}
cancelResolver();
callback_promise = new RSVP.Queue().push(function() {
return callback(evt);
}).push(undefined, function(error) {
if (!(error instanceof RSVP.CancellationError)) {
canceller();
reject(error);
}
});
};
target.addEventListener(type, handle_event_callback, useCapture);
}
return new RSVP.Promise(itsANonResolvableTrap, canceller);
};
window.loopEventListener = renderJS.loopEventListener;
window.promiseEventListener = function(target, type, useCapture) {
//////////////////////////
// Resolve the promise as soon as the event is triggered
......@@ -72,4 +37,4 @@
reader.readAsText(file);
});
};
})(window, RSVP, FileReader);
\ No newline at end of file
})(window, RSVP, FileReader, renderJS);
\ No newline at end of file
......@@ -66,7 +66,9 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -237,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.13990.48049.16861</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -255,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1498122658.08</float>
<float>1613143912.35</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -343,4 +343,4 @@
}
}, true, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.39082.1332.7492</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1503907015.64</float>
<float>1613148971.79</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, URI, location,
loopEventListener, btoa, FB */
btoa, FB */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP, FB) {
"use strict";
......
......@@ -69,7 +69,9 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -240,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.22780.25314.60910</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1506432630.67</float>
<float>1613149010.8</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, document, rJS, RSVP, URI, location, Handlebars
loopEventListener*/
/*global window, document, rJS, RSVP, URI, location, Handlebars*/
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP, Handlebars) {
"use strict";
......
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.48398.15828.27938</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,8 +258,8 @@
</tuple>
<state>
<tuple>
<float>1507880576.48</float>
<string>GMT+9</string>
<float>1613149038.11</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -341,4 +341,4 @@
}
}, true, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.22807.3679.17032</string> </value>
<value> <string>989.27524.31537.13687</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1506429553.2</float>
<float>1613149076.39</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global document, window, rJS, Handlebars, RSVP, loopEventListener, Node */
/*global document, window, rJS, Handlebars, RSVP, Node */
(function (document, window, rJS, Handlebars, RSVP, loopEventListener, Node) {
"use strict";
......@@ -132,7 +132,7 @@
}
}, true, false);
}(document, window, rJS, Handlebars, RSVP, loopEventListener, Node));
}(document, window, rJS, Handlebars, RSVP, rJS.loopEventListener, Node));
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>982.50139.2900.54459</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1585159544.63</float>
<float>1613149194.55</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -311,4 +311,4 @@
}
}, true, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -263,7 +263,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.60628.55268.16093</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -281,7 +281,7 @@
</tuple>
<state>
<tuple>
<float>1535619185.93</float>
<float>1613394617.74</float>
<string>UTC</string>
</tuple>
</state>
......
/*global document, window, Option, rJS, RSVP, promiseEventListener, loopEventListener */
/*global document, window, Option, rJS, RSVP, promiseEventListener */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, promiseEventListener, loopEventListener) {
"use strict";
......@@ -344,4 +344,4 @@
});
});
}(window, rJS, RSVP, promiseEventListener, loopEventListener));
}(window, rJS, RSVP, promiseEventListener, rJS.loopEventListener));
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>985.27934.60177.32068</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1595449693.01</float>
<float>1613149261.83</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -281,4 +281,4 @@
}
}, true, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -69,7 +69,9 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -238,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>984.51645.41378.19729</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1601621295.36</float>
<float>1613149288.51</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -5,56 +5,7 @@
// modify an existing dialog, we do not have nice structure of a full
// renderjs web page
// horrible copy/paste, this code is now present in latest renderjs,
// until we can use it, just duplicate the code and remove it when
// renderjs is up to date
function loopEventListener(target, type, useCapture, callback) {
"use strict";
//////////////////////////
// Infinite event listener (promise is never resolved)
// eventListener is removed when promise is cancelled/rejected
//////////////////////////
var handle_event_callback,
callback_promise;
function cancelResolver() {
if ((callback_promise !== undefined) &&
(typeof callback_promise.cancel === "function")) {
callback_promise.cancel();
}
}
function canceller() {
if (handle_event_callback !== undefined) {
target.removeEventListener(type, handle_event_callback, useCapture);
}
cancelResolver();
}
function itsANonResolvableTrap(resolve, reject) {
handle_event_callback = function (evt) {
evt.stopPropagation();
evt.preventDefault();
cancelResolver();
callback_promise = new RSVP.Queue()
.push(function () {
return callback(evt);
})
.push(undefined, function (error) {
if (!(error instanceof RSVP.CancellationError)) {
canceller();
reject(error);
}
});
};
target.addEventListener(type, handle_event_callback, useCapture);
}
return new RSVP.Promise(itsANonResolvableTrap, canceller);
}
// end of horrible copy/paste
(function (rJS, jIO, Handlebars, RSVP, document, window) {
(function (rJS, jIO, Handlebars, RSVP, document, window, loopEventListener) {
"use strict";
rJS(window)
.ready(function (g) {
......@@ -159,4 +110,4 @@ function loopEventListener(target, type, useCapture, callback) {
}
return divergence_choice_list;
});
}(rJS, jIO, Handlebars, RSVP, document, window));
\ No newline at end of file
}(rJS, jIO, Handlebars, RSVP, document, window, rJS.loopEventListener));
\ No newline at end of file
......@@ -82,4 +82,4 @@
});
}
});
}(window, RSVP, rJS, loopEventListener, Handlebars));
\ No newline at end of file
}(window, RSVP, rJS, rJS.loopEventListener, Handlebars));
\ No newline at end of file
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.57258.37000.44407</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1485337559.65</float>
<float>1613393971.85</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -158,4 +158,4 @@
})]);
});
});
}(window, document, RSVP, rJS, Handlebars, loopEventListener, promiseEventListener, alertify));
\ No newline at end of file
}(window, document, RSVP, rJS, Handlebars, rJS.loopEventListener, promiseEventListener, alertify));
\ No newline at end of file
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.61403.55134.65177</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -268,8 +268,8 @@
</tuple>
<state>
<tuple>
<float>1524042108.18</float>
<string>GMT+2</string>
<float>1613394000.22</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -564,4 +564,4 @@
);
});
}(window, document, RSVP, rJS, Handlebars, loopEventListener, promiseEventListener, alertify));
}(window, document, RSVP, rJS, Handlebars, rJS.loopEventListener, promiseEventListener, alertify));
......@@ -235,7 +235,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>cedric.le.ninivin</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -249,7 +249,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.29556.33516.42052</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -267,7 +267,7 @@
</tuple>
<state>
<tuple>
<float>1502904411.77</float>
<float>1613394030.76</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -177,4 +177,4 @@
})
}(window, document, RSVP, rJS, Handlebars, promiseEventListener, loopEventListener, jQuery));
}(window, document, RSVP, rJS, Handlebars, promiseEventListener, rJS.loopEventListener, jQuery));
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.58658.21925.32853</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>1486391931.12</float>
<float>1613394057.18</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -331,4 +331,4 @@
});
})*/;
}(window, document, RSVP, rJS, Handlebars, loopEventListener, promiseEventListener, alertify));
}(window, document, RSVP, rJS, Handlebars, rJS.loopEventListener, promiseEventListener, alertify));
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.58658.21925.32853</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>1486473882.26</float>
<float>1613394086.14</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -340,4 +340,4 @@
});
})*/;
}(window, document, RSVP, rJS, Handlebars, loopEventListener, promiseEventListener, alertify));
}(window, document, RSVP, rJS, Handlebars, rJS.loopEventListener, promiseEventListener, alertify));
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.58658.21925.32853</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>1486473814.12</float>
<float>1613394114.93</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -57,4 +57,4 @@
});
});
});
}(window, rJS, RSVP, loopEventListener));
\ No newline at end of file
}(window, rJS, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.35720.16926.32802</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1484043513.07</float>
<float>1613394142.42</float>
<string>UTC</string>
</tuple>
</state>
......
/*globals window, RSVP, rJS*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, RSVP, rJS) {
(function (window, RSVP, rJS, loopEventListener) {
"use strict";
var gadget_klass = rJS(window),
source = gadget_klass.__template_element
......@@ -158,4 +158,4 @@
});
});
}(window, RSVP, rJS));
\ No newline at end of file
}(window, RSVP, rJS, rJS.loopEventListener));
\ No newline at end of file
......@@ -262,7 +262,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>cedric.le.ninivin</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -276,7 +276,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.60854.27381.38212</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -294,7 +294,7 @@
</tuple>
<state>
<tuple>
<float>1505399193.45</float>
<float>1613394176.86</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, document, rJS, RSVP, URI, location,
loopEventListener*/
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP) {
(function (window, rJS, RSVP, loopEventListener) {
"use strict";
function setERP5Configuration(gadget) {
......@@ -125,4 +125,4 @@
});
}(window, rJS, RSVP));
\ No newline at end of file
}(window, rJS, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -71,7 +71,9 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -244,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.51247.9185.33604</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,8 +264,8 @@
</tuple>
<state>
<tuple>
<float>1523433333.88</float>
<string>GMT+2</string>
<float>1613394220.78</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*global window, rJS, RSVP, URI, location,
loopEventListener, btoa */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP) {
(function (window, rJS, RSVP, loopEventListener) {
"use strict";
function setjIODAVConfiguration(gadget) {
......@@ -133,4 +133,4 @@
});
}(window, rJS, RSVP));
\ No newline at end of file
}(window, rJS, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -245,7 +245,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.51243.41162.51080</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -263,8 +263,8 @@
</tuple>
<state>
<tuple>
<float>1523438631.38</float>
<string>GMT+2</string>
<float>1613394264.25</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*global window, rJS, RSVP, URI, location,
loopEventListener, btoa */
btoa */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP) {
(function (window, rJS, RSVP, loopEventListener) {
"use strict";
function setjIOERP5Configuration(gadget) {
......@@ -172,4 +172,4 @@
});
});
}(window, rJS, RSVP));
\ No newline at end of file
}(window, rJS, RSVP, rJS.loopEventListener));
\ No newline at end of file
......@@ -245,7 +245,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.58919.23896.19148</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -263,8 +263,8 @@
</tuple>
<state>
<tuple>
<float>1524126116.01</float>
<string>GMT+2</string>
<float>1613394309.96</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*global window, rJS */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS) {
(function (window, rJS, loopEventListener) {
"use strict";
var gadget_klass = rJS(window),
......@@ -165,4 +165,4 @@
});
});
}(window, rJS));
\ No newline at end of file
}(window, rJS, rJS.loopEventListener));
\ No newline at end of file
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.7340.20565.20701</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1482502019.34</float>
<float>1613394345.83</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */
/*global window, rJS, Handlebars, jQuery, RSVP */
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {
"use strict";
......@@ -152,4 +152,4 @@
});
});
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
}(window, rJS, Handlebars, jQuery, RSVP, rJS.loopEventListener));
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.9633.57716.21742</string> </value>
<value> <string>990.2265.53403.36881</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,8 +251,8 @@
</tuple>
<state>
<tuple>
<float>1432198643.67</float>
<string>GMT</string>
<float>1613400566.32</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */
/*global window, rJS, Handlebars, jQuery, RSVP */
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {
"use strict";
......@@ -178,4 +178,4 @@
});
});
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
}(window, rJS, Handlebars, jQuery, RSVP, rJS.loopEventListener));
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.10686.32775.12612</string> </value>
<value> <string>990.2265.53403.36881</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,8 +251,8 @@
</tuple>
<state>
<tuple>
<float>1432201806.27</float>
<string>GMT</string>
<float>1613400465.11</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */
/*global window, rJS, Handlebars, jQuery, RSVP */
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {
"use strict";
......@@ -178,4 +178,4 @@
});
});
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
}(window, rJS, Handlebars, jQuery, RSVP, rJS.loopEventListener));
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.10732.49761.18961</string> </value>
<value> <string>990.2265.53403.36881</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,8 +251,8 @@
</tuple>
<state>
<tuple>
<float>1432203929.33</float>
<string>GMT</string>
<float>1613400406.13</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */
/*global window, rJS, Handlebars, jQuery, RSVP */
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {
"use strict";
......@@ -179,4 +179,4 @@
});
});
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
}(window, rJS, Handlebars, jQuery, RSVP, rJS.loopEventListener));
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.10881.65296.43776</string> </value>
<value> <string>990.2265.53403.36881</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,8 +251,8 @@
</tuple>
<state>
<tuple>
<float>1432213723.7</float>
<string>GMT</string>
<float>1613400232.85</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*global window, rJS, RSVP, jIO, Notification, document, loopEventListener */
/*global window, rJS, RSVP, jIO, Notification, document */
/*jslint indent: 2, maxerr: 3, nomen: true */
(function (window, rJS, RSVP, jIO, Notification, document, loopEventListener) {
"use strict";
......@@ -517,4 +517,4 @@
);
});
}(window, rJS, RSVP, jIO, Notification, document, loopEventListener));
\ No newline at end of file
}(window, rJS, RSVP, jIO, Notification, document, rJS.loopEventListener));
\ No newline at end of file
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>988.26490.15321.9130</string> </value>
<value> <string>990.2265.53403.36881</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1606985968.14</float>
<float>1613400013.68</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -237,4 +237,4 @@
}
}, false, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>968.4100.33585.63641</string> </value>
<value> <string>990.2265.53403.36881</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1528383004.79</float>
<float>1613399987.62</float>
<string>UTC</string>
</tuple>
</state>
......
/*globals window, document, RSVP, rJS, XMLHttpRequest, DOMParser, URL,
loopEventListener, history, console */
history, console */
/*jslint indent: 2, maxlen: 80*/
(function (window, document, RSVP, rJS, XMLHttpRequest, DOMParser, URL,
loopEventListener, history, console) {
......@@ -339,4 +339,4 @@
});
}(window, document, RSVP, rJS, XMLHttpRequest, DOMParser, URL,
loopEventListener, history, console));
\ No newline at end of file
rJS.loopEventListener, history, console));
\ No newline at end of file
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, document, loopEventListener, RSVP */
/*global window, rJS, Handlebars, document, RSVP */
(function (window, rJS, Handlebars, document, loopEventListener, RSVP) {
"use strict";
......@@ -340,4 +340,4 @@
);
});
}(window, rJS, Handlebars, document, loopEventListener, RSVP));
\ No newline at end of file
}(window, rJS, Handlebars, document, rJS.loopEventListener, RSVP));
\ No newline at end of file
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.11020.10144.28108</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,8 +251,8 @@
</tuple>
<state>
<tuple>
<float>1432220900.26</float>
<string>GMT</string>
<float>1613393789.25</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*global window, document, rJS, RSVP, jQuery, console, jQuery, XMLHttpRequest, loopEventListener, URI, location */
/*global window, document, rJS, RSVP, jQuery, console, jQuery, XMLHttpRequest, URI, location */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, document, rJS, RSVP, $, XMLHttpRequest, console, loopEventListener, location) {
"use strict";
......@@ -579,4 +579,4 @@
return listenHashChange(this);
});
}(window, document, rJS, RSVP, jQuery, XMLHttpRequest, console, loopEventListener, location));
\ No newline at end of file
}(window, document, rJS, RSVP, jQuery, XMLHttpRequest, console, rJS.loopEventListener, location));
\ No newline at end of file
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>981.40707.13352.51541</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,7 +251,7 @@
</tuple>
<state>
<tuple>
<float>1583327151.4</float>
<float>1613393757.76</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
(function (window, rJS, RSVP, loopEventListener) {
"use strict";
/////////////////////////////////////////////////////////////////
......@@ -254,4 +254,4 @@
return RSVP.all(loop_list);
});
}(window, rJS, RSVP));
}(window, rJS, RSVP, rJS.loopEventListener));
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.10945.22885.62037</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,8 +251,8 @@
</tuple>
<state>
<tuple>
<float>1432216457.85</float>
<string>GMT</string>
<float>1613393724.52</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */
/*global window, rJS, Handlebars, jQuery, RSVP */
(function (window, rJS, $, RSVP, Handlebars, loopEventListener) {
"use strict";
......@@ -119,4 +119,4 @@
});
});
}(window, rJS, jQuery, RSVP, Handlebars, loopEventListener));
}(window, rJS, jQuery, RSVP, Handlebars, rJS.loopEventListener));
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>943.11069.32567.1006</string> </value>
<value> <string>989.27549.43950.31078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,8 +251,8 @@
</tuple>
<state>
<tuple>
<float>1432553064.02</float>
<string>GMT</string>
<float>1613393677.35</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
/*global window, document, rJS, Handlebars, RSVP, Node */
(function (window, document, rJS, Handlebars, RSVP, Node, loopEventListener) {
"use strict";
......@@ -319,4 +319,4 @@
}
}, true, false);
}(window, document, rJS, Handlebars, RSVP, Node, loopEventListener));
}(window, document, rJS, Handlebars, RSVP, Node, rJS.loopEventListener));
......@@ -79,7 +79,9 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -248,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>971.37975.58604.24371</string> </value>
<value> <string>990.2265.53403.36881</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>1542039239.11</float>
<float>1613399146.3</float>
<string>UTC</string>
</tuple>
</state>
......
/*globals window, document, RSVP, rJS,
loopEventListener, jQuery, URI, location, XMLHttpRequest, console*/
jQuery, URI, location, XMLHttpRequest, console*/
/*jslint indent: 2, maxlen: 80*/
(function (window, document, RSVP, rJS, loopEventListener,
$, XMLHttpRequest, location, console) {
......@@ -586,5 +586,5 @@
);
});
}(window, document, RSVP, rJS, loopEventListener, jQuery,
}(window, document, RSVP, rJS, rJS.loopEventListener, jQuery,
XMLHttpRequest, location, console));
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.32253.34302.52394</string> </value>
<value> <string>989.27523.29749.43383</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1534152432.65</float>
<float>1613145989.48</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, RSVP, loopEventListener, document, jIO, URI, URL, Blob */
/*global window, rJS, RSVP, document, jIO, URI, URL, Blob */
/*jslint nomen: true, indent: 2 */
(function (window, rJS, RSVP, loopEventListener, document, jIO, URI, URL, Blob) {
"use strict";
......@@ -1224,4 +1224,4 @@
false
);
});
}(window, rJS, RSVP, loopEventListener, document, jIO, URI, URL, Blob));
\ No newline at end of file
}(window, rJS, RSVP, rJS.loopEventListener, document, jIO, URI, URL, Blob));
\ No newline at end of file
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>989.53404.33387.10564</string> </value>
<value> <string>989.58905.49586.62361</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1612533436.71</float>
<float>1613145957.49</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80*/
/*global window, RSVP, rJS*/
(function (window, RSVP, rJS) {
(function (window, RSVP, rJS, loopEventListener) {
"use strict";
......@@ -17,67 +17,6 @@
}
}
function loopEventListener(target, type, useCapture, callback,
prevent_default) {
//////////////////////////
// Infinite event listener (promise is never resolved)
// eventListener is removed when promise is cancelled/rejected
//////////////////////////
var handle_event_callback,
callback_promise;
if (prevent_default === undefined) {
prevent_default = true;
}
function cancelResolver() {
if ((callback_promise !== undefined) &&
(typeof callback_promise.cancel === "function")) {
callback_promise.cancel();
}
}
function canceller() {
if (handle_event_callback !== undefined) {
target.removeEventListener(type, handle_event_callback, useCapture);
}
cancelResolver();
}
function itsANonResolvableTrap(resolve, reject) {
var result;
handle_event_callback = function (evt) {
if (prevent_default) {
evt.stopPropagation();
evt.preventDefault();
}
cancelResolver();
try {
result = callback(evt);
} catch (e) {
result = RSVP.reject(e);
}
callback_promise = result;
new RSVP.Queue()
.push(function () {
return result;
})
.push(undefined, function (error) {
if (!(error instanceof RSVP.CancellationError)) {
canceller();
reject(error);
}
});
};
target.addEventListener(type, handle_event_callback, useCapture);
}
return new RSVP.Promise(itsANonResolvableTrap, canceller);
}
/* Initialization */
rJS(window)
......@@ -100,4 +39,4 @@
.declareAcquiredMethod("setQuery", "setQuery");
}(window, RSVP, rJS));
\ No newline at end of file
}(window, RSVP, rJS, rJS.loopEventListener));
\ No newline at end of file
......@@ -138,6 +138,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
......@@ -201,4 +207,67 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>989.63602.1604.56354</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1613145836.2</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, rJS, RSVP, jIO, Handlebars, document, FormData */
/*jslint nomen: true, maxlen:150, indent:2*/
(function (rJS, jIO, RSVP, window, Handlebars) {
(function (rJS, jIO, RSVP, window, Handlebars, loopEventListener) {
"use strict";
var gk = rJS(window),
run_source = gk.__template_element.getElementById('run').innerHTML,
run_template = Handlebars.compile(run_source);
function loopEventListener(target, type, useCapture, callback,
prevent_default) {
//////////////////////////
// Infinite event listener (promise is never resolved)
// eventListener is removed when promise is cancelled/rejected
//////////////////////////
var handle_event_callback,
callback_promise;
if (prevent_default === undefined) {
prevent_default = true;
}
function cancelResolver() {
if ((callback_promise !== undefined) &&
(typeof callback_promise.cancel === "function")) {
callback_promise.cancel();
}
}
function canceller() {
if (handle_event_callback !== undefined) {
target.removeEventListener(type, handle_event_callback, useCapture);
}
cancelResolver();
}
function itsANonResolvableTrap(resolve, reject) {
var result;
handle_event_callback = function (evt) {
if (prevent_default) {
evt.stopPropagation();
evt.preventDefault();
}
cancelResolver();
try {
result = callback(evt);
} catch (e) {
result = RSVP.reject(e);
}
callback_promise = result;
new RSVP.Queue()
.push(function () {
return result;
})
.push(undefined, function (error) {
if (!(error instanceof RSVP.CancellationError)) {
canceller();
reject(error);
}
});
};
target.addEventListener(type, handle_event_callback, useCapture);
}
return new RSVP.Promise(itsANonResolvableTrap, canceller);
}
function getLog(gadget) {
return jIO.util.ajax(
{
......@@ -178,4 +118,4 @@
);
});
});
}(rJS, jIO, RSVP, window, Handlebars));
\ No newline at end of file
}(rJS, jIO, RSVP, window, Handlebars, rJS.loopEventListener));
\ No newline at end of file
/*global window, document, rJS, CKEDITOR, RSVP*/
/*jslint nomen: true, maxlen:80, indent:2*/
(function (window, document, rJS, CKEDITOR, RSVP) {
(function (window, document, rJS, CKEDITOR, RSVP, loopEventListener) {
"use strict";
// erp5_globals is not in xhtml_style.
// Copy/Paste this function for now
function loopEventListener(target, type, useCapture, callback,
prevent_default) {
//////////////////////////
// Infinite event listener (promise is never resolved)
// eventListener is removed when promise is cancelled/rejected
//////////////////////////
var handle_event_callback,
callback_promise;
if (prevent_default === undefined) {
prevent_default = true;
}
function cancelResolver() {
if ((callback_promise !== undefined) &&
(typeof callback_promise.cancel === "function")) {
callback_promise.cancel();
}
}
function canceller() {
if (handle_event_callback !== undefined) {
target.removeEventListener(type, handle_event_callback, useCapture);
}
cancelResolver();
}
function itsANonResolvableTrap(resolve, reject) {
var result;
handle_event_callback = function (evt) {
if (prevent_default) {
evt.stopPropagation();
evt.preventDefault();
}
cancelResolver();
try {
result = callback(evt);
} catch (e) {
return reject(e);
}
callback_promise = new RSVP.Queue(result).push(undefined, reject);
};
target.addEventListener(type, handle_event_callback, useCapture);
}
return new RSVP.Promise(itsANonResolvableTrap, canceller);
}
// http://nightly.ckeditor.com/17-10-11-06-04/full/samples/toolbarconfigurator/index.html#advanced
var TOOLBAR_MOBILE = [
{name: 'basicstyles', items: ['Bold', 'Italic', 'Underline']},
......@@ -255,4 +203,4 @@
});
}(window, document, rJS, CKEDITOR, RSVP));
\ No newline at end of file
}(window, document, rJS, CKEDITOR, RSVP, rJS.loopEventListener));
\ No newline at end of file
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