Commit 336384d8 authored by Jérome Perrin's avatar Jérome Perrin

Merge remote-tracking branch 'upstream/master' into zope4py2

parents 6ded7299 b523913c
......@@ -34,7 +34,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareMethod("render", function (options) {
var gadget = this;
......@@ -139,5 +139,5 @@
save_action: true
});
});
});
}, {mutex: 'render'});
}(window, rJS, RSVP));
\ 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>
......@@ -246,7 +248,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.40804.27282.46165</string> </value>
<value> <string>1005.28363.57004.238</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1503577300.12</float>
<float>1672905960.69</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -18,7 +18,7 @@
/////////////////////////////////////////////////////////////////
.declareMethod('triggerSubmit', function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareMethod("render", function () {
var gadget = this;
......@@ -44,7 +44,7 @@
)).href
});
});
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -248,7 +248,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.52328.26727.8140</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1514905729.94</float>
<float>1672735984.79</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -28,7 +28,7 @@
jio_key: options.jio_key,
doc: options.doc
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this;
......@@ -49,7 +49,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -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>
......@@ -226,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>
......@@ -240,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.37366.56810.48998</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1507217051.45</float>
<float>1672735611.35</float>
<string>UTC</string>
</tuple>
</state>
......
/*global document, window, rJS, RSVP, jIO, console */
/*global document, window, rJS, jIO, console */
/*jslint nomen: true, indent: 2, maxerr: 10, maxlen: 80 */
(function (document, window, rJS, RSVP, jIO, console) {
(function (document, window, rJS, jIO, console) {
"use strict";
rJS(window)
......@@ -115,7 +115,7 @@
}
throw error;
});
})
}, {mutex: 'render'})
.onStateChange(function () {
var fragment = document.createElement('div'),
......@@ -131,15 +131,10 @@
}
gadget.element.appendChild(fragment);
return gadget.declareGadget(view_gadget_url,
{element: fragment, scope: 'form_view'})
{element: fragment,
scope: 'officejs_form_view'})
.push(function (form_view_gadget) {
return form_view_gadget.render(gadget.state);
}, function (error) {
console.log(error);
return gadget.notifySubmitted({
message: "Error rendering view",
status: "error"
});
})
.push(function () {
return gadget.updatePanel({
......@@ -176,10 +171,10 @@
.declareMethod("triggerSubmit", function () {
var argument_list = arguments;
return this.getDeclaredGadget('form_view')
return this.getDeclaredGadget('officejs_form_view')
.push(function (view_gadget) {
return view_gadget.triggerSubmit(argument_list);
});
});
}, {mutex: 'render'});
}(document, window, rJS, RSVP, jIO, console));
\ No newline at end of file
}(document, window, rJS, jIO, console));
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1001.7199.47519.37307</string> </value>
<value> <string>1005.39859.38086.29457</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1658943004.35</float>
<float>1673426666.06</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -74,7 +74,7 @@
page_title: "Import"
});
});
})
}, {mutex: 'render'})
.declareMethod("triggerSubmit", function () {
var gadget = this;
......@@ -83,9 +83,8 @@
return form_gadget.getContent();
})
.push(function (doc) {
debugger;
return gadget.jio_put(gadget.state.jio_key, doc);
});
});
}, {mutex: 'render'});
}(window, rJS, RSVP));
......@@ -231,7 +231,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.1356.43876.49698</string> </value>
<value> <string>1005.28353.40730.58436</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -249,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>1497364640.96</float>
<float>1672735657.15</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -197,7 +197,7 @@
if (!content_dict) { return; }
return handleSubmit(gadget, child_gadget, content_dict);
});
})
}, {mutex: 'render'})
.declareMethod("render", function (options) {
var gadget = this,
......@@ -237,7 +237,7 @@
}
}
return gadget.changeState(state_dict);
})
}, {mutex: 'render'})
.onStateChange(function onStateChange() {
var fragment = document.createElement('div'),
......
......@@ -275,7 +275,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>979.7520.54247.47189</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -293,7 +293,7 @@
</tuple>
<state>
<tuple>
<float>1571065315.5</float>
<float>1672736671.72</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -23,7 +23,7 @@
jio_key: options.jio_key,
doc: options.doc
});
})
}, {mutex: 'render'})
.onEvent('change', function (event) {
var gadget = this;
......@@ -82,7 +82,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.57547.51724.61252</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1504582352.71</float>
<float>1672735738.4</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -33,7 +33,7 @@
return gadget.changeState({
title: 'Untitled Document'
});
})
}, {mutex: 'render'})
.declareMethod('putIntoDB', function (data, portal_type, parent_relative_url) {
var gadget = this,
......@@ -100,7 +100,7 @@
})
]);
});
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>989.27524.31537.13687</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1613148513.02</float>
<float>1672737034.05</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -24,7 +24,7 @@
jio_key: options.jio_key,
doc: options.doc
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this;
......@@ -45,7 +45,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>986.53108.46138.3464</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1600891646.9</float>
<float>1672736991.67</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -25,7 +25,7 @@
jio_key: options.jio_key,
doc: options.doc
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this, data;
......@@ -55,7 +55,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this, data;
......
......@@ -223,7 +223,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>
......@@ -237,7 +237,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.50226.4174.59904</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -255,7 +255,7 @@
</tuple>
<state>
<tuple>
<float>1515766769.91</float>
<float>1672736003.06</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -48,7 +48,7 @@
});
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this,
......@@ -90,7 +90,7 @@
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -245,7 +245,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>980.55724.32706.34986</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -263,7 +263,7 @@
</tuple>
<state>
<tuple>
<float>1577801225.85</float>
<float>1672736927.35</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -50,7 +50,7 @@
});
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this,
......@@ -92,7 +92,7 @@
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this,
......
......@@ -245,7 +245,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>980.55724.18905.19933</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -263,7 +263,7 @@
</tuple>
<state>
<tuple>
<float>1577801156.98</float>
<float>1672736913.84</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -57,7 +57,7 @@
});
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this;
......@@ -83,7 +83,7 @@
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -245,7 +245,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>980.55652.32652.26572</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -263,7 +263,7 @@
</tuple>
<state>
<tuple>
<float>1577798197.49</float>
<float>1672736722.89</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -47,7 +47,7 @@
next_url: url_list[2]
});
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this,
......@@ -90,7 +90,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this,
......
......@@ -245,7 +245,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>980.54461.59381.50158</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -263,7 +263,7 @@
</tuple>
<state>
<tuple>
<float>1577801044.1</float>
<float>1672736899.56</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -52,7 +52,7 @@
next_url: url_list[2]
});
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this,
......@@ -85,7 +85,7 @@
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this,
......
......@@ -245,7 +245,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>980.55722.32852.65126</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -263,7 +263,7 @@
</tuple>
<state>
<tuple>
<float>1577801407.55</float>
<float>1672736940.37</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -29,7 +29,7 @@
jio_key: options.jio_key,
doc: options.doc
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this;
......@@ -72,7 +72,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.48813.59167.24098</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1523286693.67</float>
<float>1672736193.2</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -23,7 +23,7 @@
jio_key: options.jio_key,
doc: options.doc
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this;
......@@ -44,7 +44,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -263,7 +263,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>
......@@ -277,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.54546.48173.5239</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>1516028950.41</float>
<float>1672736169.01</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -23,7 +23,7 @@
jio_key: options.jio_key,
doc: options.doc
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this;
......@@ -44,7 +44,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -222,7 +222,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>
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.48513.5538.10342</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1515766909.33</float>
<float>1672736156.3</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -23,7 +23,7 @@
jio_key: options.jio_key,
doc: options.doc
});
})
}, {mutex: 'render'})
.onEvent('submit', function () {
var gadget = this;
......@@ -44,7 +44,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>970.25590.5129.16691</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1537449382.82</float>
<float>1672736397.58</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -147,7 +147,7 @@
}
return gadget.changeState(state_options);
});
})
}, {mutex: 'render'})
.onStateChange(function () {
var fragment = document.createElement('div'),
......@@ -173,7 +173,7 @@
.push(function (gadget) {
return gadget.triggerSubmit();
});
})
}, {mutex: 'render'})
.allowPublicAcquisition('submitContent', function (options) {
var gadget = this,
......
......@@ -275,7 +275,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.1942.40980.22510</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -293,7 +293,7 @@
</tuple>
<state>
<tuple>
<float>1601668958.25</float>
<float>1672737010.72</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -123,7 +123,7 @@
submit_action: true
});
});
})
}, {mutex: 'render'})
/////////////////////////////////////////
// Form submit
......@@ -141,7 +141,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareService(function () {
var gadget = this;
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>989.27524.31537.13687</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1613148710.12</float>
<float>1672737160.08</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -185,7 +185,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareMethod('render', function () {
var gadget = this;
......@@ -198,7 +198,7 @@
panel_action: false
});
});
})
}, {mutex: 'render'})
.declareService(function () {
var gadget = this;
......
......@@ -277,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.9115.54748.426</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>1563788084.53</float>
<float>1672736639.88</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -77,7 +77,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareMethod("render", function () {
var gadget = this;
......@@ -139,5 +139,5 @@
selection_url: url_list[0]
});
});
});
}, {mutex: 'render'});
}(document, window, rJS, RSVP));
......@@ -245,7 +245,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>980.54461.59381.50158</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -263,7 +263,7 @@
</tuple>
<state>
<tuple>
<float>1577787578.24</float>
<float>1672736706.83</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -124,7 +124,7 @@
url: url
});
});
})
}, {mutex: 'render'})
/////////////////////////////////////////
// Form submit
......@@ -142,7 +142,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>981.42114.58215.33843</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1580919827.44</float>
<float>1672736958.41</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -84,7 +84,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareMethod("render", function (options) {
var gadget = this;
......@@ -103,7 +103,7 @@
download_format: options.download_format
});
});
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this, format_list;
......
......@@ -248,7 +248,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.57642.21478.16725</string> </value>
<value> <string>1002.50599.55503.34918</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1655144983.16</float>
<float>1672737212.24</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -123,7 +123,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareMethod("render", function () {
var gadget = this;
......@@ -133,7 +133,7 @@
upload: window.JSON.parse(upload_dict)
});
});
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -248,7 +248,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.46490.21150.57958</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1534779925.16</float>
<float>1672736384.63</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -95,7 +95,7 @@
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareMethod("render", function () {
var gadget = this;
......@@ -105,7 +105,7 @@
upload: window.JSON.parse(upload_dict)
});
});
})
}, {mutex: 'render'})
.onStateChange(function () {
var gadget = this;
......
......@@ -248,7 +248,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>970.54532.18415.44100</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1539165482.38</float>
<float>1672736425.26</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -87,7 +87,7 @@
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareMethod("render", function () {
var gadget = this;
......@@ -250,5 +250,5 @@
save_action: true
});
});
});
}, {mutex: 'render'});
}(window, rJS, RSVP));
\ No newline at end of file
......@@ -277,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.57527.47460.49561</string> </value>
<value> <string>1005.28365.27264.750</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>1504594646.29</float>
<float>1672735767.63</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -44,7 +44,7 @@
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
}, {mutex: 'render'})
.declareMethod("render", function () {
var gadget = this;
......@@ -97,5 +97,5 @@
save_action: true
});
});
});
}, {mutex: 'render'});
}(window, rJS, RSVP));
\ No newline at end of file
......@@ -277,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.48466.36064.7714</string> </value>
<value> <string>991.25773.59047.44168</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,8 +295,8 @@
</tuple>
<state>
<tuple>
<float>1507883016.44</float>
<string>GMT+9</string>
<float>1672735802.12</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -407,7 +407,7 @@
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://content.dropboxapi.com https://api.dropboxapi.com mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net *.nexedi.net https://netdna.bootstrapcdn.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://content.dropboxapi.com https://api.dropboxapi.com mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net *.nexedi.net https://netdna.bootstrapcdn.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
</item>
<item>
<key> <string>configuration_default_view_action_reference</string> </key>
......@@ -661,7 +661,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.11689.44498.47257</string> </value>
<value> <string>998.17699.36537.24439</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -679,7 +679,7 @@
</tuple>
<state>
<tuple>
<float>1640886274.36</float>
<float>1672916321.43</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -367,7 +367,7 @@
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://content.dropboxapi.com https://api.dropboxapi.com mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net *.nexedi.net https://netdna.bootstrapcdn.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://content.dropboxapi.com https://api.dropboxapi.com mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net *.nexedi.net https://netdna.bootstrapcdn.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
</item>
<item>
<key> <string>configuration_default_jio_document_page_gadget_url</string> </key>
......@@ -637,7 +637,7 @@ WebSection_getPDFViewerPrecacheManifestList</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.11689.44498.47257</string> </value>
<value> <string>998.17699.36537.24439</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -655,7 +655,7 @@ WebSection_getPDFViewerPrecacheManifestList</string> </value>
</tuple>
<state>
<tuple>
<float>1640886288.57</float>
<float>1672916351.73</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -407,7 +407,7 @@
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://content.dropboxapi.com https://api.dropboxapi.com mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net *.nexedi.net https://netdna.bootstrapcdn.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://content.dropboxapi.com https://api.dropboxapi.com mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net *.nexedi.net https://netdna.bootstrapcdn.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
</item>
<item>
<key> <string>configuration_default_view_action_reference</string> </key>
......@@ -724,7 +724,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.11689.44498.47257</string> </value>
<value> <string>1005.30256.57009.42069</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -742,7 +742,7 @@
</tuple>
<state>
<tuple>
<float>1640885786.61</float>
<float>1672851601.51</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -34,6 +34,7 @@
<td>link=Local is Enough</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>link=Add</td>
......@@ -45,6 +46,7 @@
<td>link=Add</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>store</td>
<td>My cloud</td>
......@@ -75,17 +77,21 @@
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>link=Add</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Save 2nd Bookmark -->
<tr>
<td>click</td>
<td>link=Add</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>store</td>
<td>My blog</td>
......@@ -116,6 +122,9 @@
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Verify Search -->
<tr>
<td>waitForElementPresent</td>
......@@ -184,6 +193,7 @@
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//h1[@class='test-script-title']</td>
......@@ -200,6 +210,7 @@
<td>${base_url}/web_site_module/${install_url}/</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Search']</td>
......@@ -230,6 +241,7 @@
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>identifier=title</td>
......@@ -250,6 +262,7 @@
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>link=Add</td>
......@@ -286,6 +299,7 @@
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//h1[@class='test-script-title']</td>
......@@ -313,6 +327,7 @@
<td>//a[@data-i18n='Preferences']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='auto_redirect']</td>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_query_commands_out_of_sync</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_and_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3" tal:content="template/title_and_id"></td>
</tr>
</thead>
<tbody>
<tr>
<td>open</td>
<td tal:content="string: ${here/portal_url}/erp5_sql_connection/ZMySQLDAConnection_viewQueryBrowser"></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>css=div.monaco-editor.vs</td>
<td></td>
</tr>
<tr>
<td>assertEval</td>
<td>
selenium.browserbot.getCurrentWindow().monaco_editor.trigger('', 'type', {'text': 'select 1+1; select "boom"'})
</td>
<td>null</td>
</tr>
<tr>
<td>click</td>
<td>//button[@name="Query"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, "noty_message")]/span[@class="noty_text" and contains(text(), "Error")]</td>
<td></td>
</tr>
<tr>
<td>assertEval</td>
<td>
selenium.browserbot.getCurrentWindow().monaco_editor.trigger('', 'editor.action.smartSelect.expand');
selenium.browserbot.getCurrentWindow().monaco_editor.trigger('', 'editor.action.deleteLines');
selenium.browserbot.getCurrentWindow().monaco_editor.trigger('', 'type', {'text': 'select 1+1'})
</td>
<td>null</td>
</tr>
<tr>
<td>click</td>
<td>//button[@name="Query"]</td>
<td></td>
</tr>
<tr>
<td>waitForText</td>
<td>xpath=(//div[contains(@class, "handsontable")]//th//span[@class="colHeader"])[2]</td>
<td>1+1</td>
</tr>
<tr>
<td>assertText</td>
<td>//div[contains(@class, "handsontable")]//tbody/tr/td</td>
<td>2</td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
/*globals window, document, RSVP, rJS,
URI, location, XMLHttpRequest, console, navigator, Event,
URL, domsugar*/
/*jslint indent: 2, maxlen: 80*/
/*jslint indent: 2, maxlen: 80, unparam: true*/
(function (window, document, RSVP, rJS,
XMLHttpRequest, location, console, navigator, Event,
URL, domsugar) {
......@@ -506,8 +506,13 @@
// XXX Those methods may be directly integrated into the header,
// as it handles the submit triggering
.allowPublicAcquisition('notifySubmitting', function notifySubmitting(
argument_list
argument_list,
scope
) {
if (scope === undefined) {
// If sub gadget has been dropped, no need to keep notification
return;
}
return RSVP.all([
route(this, "header", 'notifySubmitting'),
this.deferChangeState({
......@@ -518,8 +523,13 @@
]);
})
.allowPublicAcquisition('notifySubmitted', function notifySubmitted(
argument_list
argument_list,
scope
) {
if (scope === undefined) {
// If sub gadget has been dropped, no need to keep notification
return;
}
return RSVP.all([
route(this, "header", 'notifySubmitted'),
this.deferChangeState({
......@@ -531,8 +541,13 @@
]);
})
.allowPublicAcquisition('notifyChange', function notifyChange(
argument_list
argument_list,
scope
) {
if (scope === undefined) {
// If sub gadget has been dropped, no need to keep notification
return;
}
return RSVP.all([
route(this, "header", 'notifyChange'),
this.deferChangeState({
......@@ -606,7 +621,12 @@
return route(this, 'router', 'getCommandUrlForDict', param_list);
})
.allowPublicAcquisition("updateHeader", function updateHeader(param_list) {
.allowPublicAcquisition("updateHeader", function updateHeader(param_list,
scope) {
if (scope === undefined) {
// If sub gadget has been dropped, no need to keep notification
return;
}
initHeaderOptions(this);
var text_list = [],
key,
......@@ -631,28 +651,46 @@
});
})
.allowPublicAcquisition("updatePanel", function updatePanel(param_list) {
.allowPublicAcquisition("updatePanel", function updatePanel(param_list,
scope) {
if (scope === undefined) {
// If sub gadget has been dropped, no need to keep notification
return;
}
var gadget = this;
initPanelOptions(gadget);
gadget.props.panel_argument_list = param_list[0];
})
.allowPublicAcquisition('refreshHeaderAndPanel',
function acquireRefreshHeaderAndPanel() {
function acquireRefreshHeaderAndPanel(ignore, scope) {
if (scope === undefined) {
// If sub gadget has been dropped, no need to keep notification
return;
}
return refreshHeaderAndPanel(this, true);
})
.allowPublicAcquisition('hidePanel', function hidePanel(param_list) {
return hideDesktopPanel(this, param_list[0]);
})
.allowPublicAcquisition('triggerPanel', function triggerPanel() {
.allowPublicAcquisition('triggerPanel', function triggerPanel(ignore,
scope) {
if (scope === undefined) {
// If sub gadget has been dropped, no need to keep notification
return;
}
// Force calling panel toggle
return this.deferChangeState({
panel_visible: new Date().getTime()
});
})
.allowPublicAcquisition('renderEditorPanel',
function renderEditorPanel(param_list) {
function renderEditorPanel(param_list, scope) {
if (scope === undefined) {
// If sub gadget has been dropped, no need to keep notification
return;
}
return this.deferChangeState({
// Force calling editor panel render
editor_panel_render_timestamp: new Date().getTime(),
......@@ -703,8 +741,13 @@
});
})
.allowPublicAcquisition("triggerMaximize", function maximize(
param_list
param_list,
scope
) {
if (scope === undefined) {
// If sub gadget has been dropped, nothing to maximize
return;
}
return triggerMaximize(this, param_list[0]);
})
/////////////////////////////////////////////////////////////////
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>995.60357.5039.47650</string> </value>
<value> <string>1005.39881.44610.14899</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1639487214.66</float>
<float>1673426576.41</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -992,19 +992,32 @@ if (typeof document.contains !== 'function') {
this._latest_promise = null;
};
function doNothing() {
return;
}
Mutex.prototype = {
constructor: Mutex,
lockAndRun: function lockMutexAndRun(callback) {
var previous_promise = this._latest_promise;
var previous_promise = this._latest_promise,
returned_promise;
if (previous_promise === null) {
this._latest_promise = RSVP.resolve(callback());
} else {
this._latest_promise = this._latest_promise
return this._latest_promise;
}
returned_promise = previous_promise
.always(function () {
return callback();
});
}
return this._latest_promise;
// Do not return latest promise, to not allow external caller
// to explicitely cancel it,
// ie, ensure next promise is triggered only when ALL previous
// promised are finished (not only the single previous one)
this._latest_promise = RSVP.all([
previous_promise.always(doNothing),
returned_promise.always(doNothing)
]);
return returned_promise;
}
};
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>998.17699.36537.24439</string> </value>
<value> <string>1004.26548.30757.41045</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1668780748.06</float>
<float>1673362285.2</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -33,7 +33,7 @@
// Display the error message in the portal_status location
// As renderJS does not report which element is failing while loading
// a gadget
var error_element = document.getElementById('transition_message');
var error_element = document.querySelector('.transition_message');
error_element.textContent = error + '. ' + error_element.textContent;
}
......
......@@ -992,19 +992,32 @@ if (typeof document.contains !== 'function') {
this._latest_promise = null;
};
function doNothing() {
return;
}
Mutex.prototype = {
constructor: Mutex,
lockAndRun: function lockMutexAndRun(callback) {
var previous_promise = this._latest_promise;
var previous_promise = this._latest_promise,
returned_promise;
if (previous_promise === null) {
this._latest_promise = RSVP.resolve(callback());
} else {
this._latest_promise = this._latest_promise
return this._latest_promise;
}
returned_promise = previous_promise
.always(function () {
return callback();
});
}
return this._latest_promise;
// Do not return latest promise, to not allow external caller
// to explicitely cancel it,
// ie, ensure next promise is triggered only when ALL previous
// promised are finished (not only the single previous one)
this._latest_promise = RSVP.all([
previous_promise.always(doNothing),
returned_promise.always(doNothing)
]);
return returned_promise;
}
};
......
......@@ -115,7 +115,8 @@ from Products.ERP5Type.Utils import str2bytes
hosed_connection = (
CR.SERVER_GONE_ERROR,
CR.SERVER_LOST
CR.SERVER_LOST,
CR.COMMANDS_OUT_OF_SYNC
)
query_syntax_error = (
......@@ -404,7 +405,12 @@ class DB(TM):
else:
LOG('ZMySQLDA', ERROR, 'query failed: %s' % (query,))
raise
except ProgrammingError:
except ProgrammingError as m:
if (allow_reconnect or not self._use_TM) and \
m[0] in hosed_connection:
self._forceReconnection()
self.db.query(query)
else:
LOG('ZMySQLDA', ERROR, 'query failed: %s' % (query,))
raise
try:
......
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