Commit 1c31ea93 authored by Romain Courteaud's avatar Romain Courteaud

erp5_officejs: do not submit if render is not finished

parent c824b5ab
......@@ -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,7 +131,8 @@
}
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) {
......@@ -176,10 +177,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.28342.42231.36778</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1658943004.35</float>
<float>1672734165.2</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>
......
......@@ -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>
......
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