diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_html.html b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_html.html index e733b8489eb69e67076641ab936e3774de7ca513..34707cfcaf5edc705d030ecb37a6994ae333e019 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_html.html +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_html.html @@ -14,17 +14,15 @@ <form class="view-web-page-form"> - <div class="center"> - <div class="ui-field-contain"> + <div class="center"> + <div class="ui-field-contain"> <label data-i18n="Title:">Title:</label> <input type="text" name="title" value="{{title}}"> </div> <button type="submit" data-i18n="Save" style="display:none;">Save</button> - </div> + <div class="ui-field-contain"> - Â Â Â Â <fieldset data-role="collapsible"> - Â Â Â Â Â Â Â Â <legend>Extra Properties</legend> <div class="ui-field-contain"> <label data-i18n="Reference:">Reference:</label> @@ -46,8 +44,8 @@ <textarea name="description">{{description}}</textarea> </div> </div> + </div> - </fieldset> <div class='document-content'></div> </div> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_html.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_html.xml index 88fe7fedcf3b7eac04a6582e5127840a9b07e9e5..7cdb1407570c7d74ded166157ebb677a4196d68c 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_html.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_html.xml @@ -218,7 +218,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> @@ -232,7 +232,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.58608.59350.33075</string> </value> + <value> <string>954.38520.8745.1109</string> </value> </item> <item> <key> <string>state</string> </key> @@ -250,7 +250,7 @@ </tuple> <state> <tuple> - <float>1442858061.15</float> + <float>1476433509.51</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.html b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.html index ba0108229947967da3628bd174a7d7fb9814f8dc..b9744364bd9cd8fd5ffd4d9dd8fd99591a13d935 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.html +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.html @@ -21,6 +21,28 @@ </3> </section> </article> + + <article class="ui-content ui-body-c document-access"> + <section class="ui-content-header-plain"> + <h3 class="ui-content-title ui-body-c"> + <span class="ui-icon ui-icon-custom ui-icon-file-text-o"> </span> + Your Documents + </h3> + </section> + <section class="ui-body-c ui-content-section"> + <p style="color: red">Continue by <b>synchronizing</b> with your remote storage or <b>accessing</b> your documents</p> + <div class="ui-controlgroup ui-controlgroup-horizontal"> + <div class="ui-grid-a ui-responsive"> + <div class="ui-block-a"> + <a class="ui-btn" href="#page=sync&auto_repair=true" data-i18n="Synchronize">Synchronize</a> + </div> + <div class="ui-block-b"> + <a class="ui-btn" href="#page=document_list" data-i18n="Go to document List">Access document List</a> + </div> + </div> + </div> + </section> + </article> <article class="ui-content ui-body-c"> <section class="ui-content-header-plain"> @@ -52,27 +74,5 @@ <!--/div--> </section> </article> - - <article class="ui-content ui-body-c document-access"> - <section class="ui-content-header-plain"> - <h3 class="ui-content-title ui-body-c"> - <span class="ui-icon ui-icon-custom ui-icon-file-text-o"> </span> - Your Documents - </h3> - </section> - <section class="ui-body-c ui-content-section"> - <p style="color: red">Continue by <b>synchronizing</b> with your remote storage or <b>accessing</b> your documents</p> - <div class="ui-controlgroup ui-controlgroup-horizontal"> - <div class="ui-grid-a ui-responsive"> - <div class="ui-block-a"> - <a class="ui-btn" href="#page=sync" data-i18n="Synchronize">Synchronize</a> - </div> - <div class="ui-block-b"> - <a class="ui-btn" href="#page=document_list" data-i18n="Go to document List">Access document List</a> - </div> - </div> - </div> - </section> - </article> </body> </html> \ No newline at end of file diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml index 54a03fee1e8e66dc206db8e7446e3f7b97476171..a1bedb54e23560bfcdd821b66fecb7966494a837 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml @@ -220,7 +220,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> @@ -234,7 +234,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>947.12629.17894.55808</string> </value> + <value> <string>954.38531.13446.10769</string> </value> </item> <item> <key> <string>state</string> </key> @@ -252,7 +252,7 @@ </tuple> <state> <tuple> - <float>1448032104.14</float> + <float>1476434371.85</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_js.js b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_js.js index 1885a4fb7b6513e8a2a24c527e13051335bb3277..679bbfa7f694c36e343ce346c1ad35f17028db7d 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_js.js +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_js.js @@ -25,6 +25,9 @@ }) .push(function () { return gadget.reload(); + }) + .push(function () { + return gadget.redirect({page: 'sync', auto_repair: 'true'}); }); } diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_js.xml index 2ddeb7bd11a6117b2356b6e88f7f51919070e90f..1674253cb96cb2d3edb2cd1c91c1fc5b34f368e8 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_js.xml @@ -216,7 +216,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> @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>947.12629.17894.55808</string> </value> + <value> <string>954.38525.9614.27067</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1447936126.33</float> + <float>1476437867.08</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.js b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.js index 7b22081a20f1bbe95127b390c93a5eb8d1ebaa88..5e575eced8ebc716374f0a105b55de8406fe69e8 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.js +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.js @@ -60,6 +60,9 @@ }) .push(function () { return gadget.reload(); + }) + .push(function () { + return gadget.redirect({page: 'sync', auto_repair: 'true'}); }); } diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml index abea29055a4fee37d21cb94b82e891b41bfe8359..af1ebee79054bca426bf8e383df80be6610edb77 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml @@ -234,7 +234,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>947.53845.25131.55500</string> </value> + <value> <string>954.38524.51199.12134</string> </value> </item> <item> <key> <string>state</string> </key> @@ -252,7 +252,7 @@ </tuple> <state> <tuple> - <float>1450259852.52</float> + <float>1476437846.74</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_html.html b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_html.html index ad88f5a1f4d82431e133730a65716003f4f03720..e5b6354b124a475491a959b306fe278b97879e31 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_html.html +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_html.html @@ -30,7 +30,7 @@ <div class="ui-form"> <div class="ui-field-contain"> <label data-i18n="Connection URL:">Connection URL:</label> - <input type="url" name="erp5_url" required disabled/> + <input type="url" name="erp5_url" class="ui-focus" required disabled/> </div> <div class="select-storage ui-controlgroup ui-controlgroup-horizontal"> <div class="ui-grid-b ui-responsive"> @@ -56,7 +56,7 @@ <div class="ui-controlgroup ui-controlgroup-horizontal"> <div class="ui-grid-a ui-responsive"> <div class="ui-block-a"> - <a class="ui-btn" href="#page=sync" data-i18n="Synchronize">Synchronize</a> + <a class="ui-btn" href="#page=sync&auto_repair=true" data-i18n="Synchronize">Synchronize</a> </div> <div class="ui-block-b"> <a class="ui-btn" href="#page=document_list" data-i18n="Go to document List">Access document List</a> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_html.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_html.xml index 4092393eb539a0057d43367aed2f4710529efb39..17056da06d2955014a3e6c8ef82ea173972dcfce 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_html.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_html.xml @@ -259,7 +259,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>supercedriclen</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -273,7 +273,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>951.60950.25016.15394</string> </value> + <value> <string>954.38565.29657.34116</string> </value> </item> <item> <key> <string>state</string> </key> @@ -291,7 +291,7 @@ </tuple> <state> <tuple> - <float>1466162879.59</float> + <float>1476436854.76</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.js b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.js index 3b25f4c6933cbf47c031352f74563ba41d764f84..e35a74e3f67eeb32b0634c506ac2253bae5bc85f 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.js +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.js @@ -59,6 +59,9 @@ }) .push(function () { return gadget.reload(); + }) + .push(function () { + return gadget.redirect({page: 'sync', auto_repair: 'true'}); }); } @@ -163,6 +166,7 @@ erp5_url_input.value = erp5_url || "https://www.example.org"; erp5_url_input.removeAttribute("disabled"); erp5_url_input.parentNode.classList.remove('ui-state-disabled'); + erp5_url_input.focus(); }); }); diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.xml index 741575d8dfe7e870b319677f9d5acdfce4bfd87d..51c46475d6b96c4b64144bf14b94b0ea2dccc7d9 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.xml @@ -255,7 +255,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>supercedriclen</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -269,7 +269,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>951.61016.16868.60825</string> </value> + <value> <string>954.38591.30253.42973</string> </value> </item> <item> <key> <string>state</string> </key> @@ -287,7 +287,7 @@ </tuple> <state> <tuple> - <float>1466159556.89</float> + <float>1476438691.35</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.js b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.js index f18972e68f4e835fca99fbea81e4a1b755c7d1c0..dbdd2e00c92ed34ef86c377c1bef23c464b5107d 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.js +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.js @@ -9,9 +9,24 @@ templater.getElementById("page-template").innerHTML ); + function repair_and_redirect(gadget) { + gadget.props.element.querySelector("button").disabled = true; + return new RSVP.Queue() + .push(function () { + return gadget.repair() + }) + .push(function (result) { + if (result !== undefined && result.hasOwnProperty('redirect')){ + return gadget.redirect(result.redirect); + } + return gadget.redirect({}); + }); + } + gadget_klass .ready(function (g) { g.props = {}; + g.props.auto_repair = false; return g.getElement() .push(function (element) { g.props.element = element; @@ -22,6 +37,11 @@ .declareAcquiredMethod("translateHtml", "translateHtml") .declareMethod("render", function () { var gadget = this; + + if (arguments[0].auto_repair === "true") { + gadget.props.auto_repair = true; + } + return gadget.updateHeader({ title: "Synchronize" }) @@ -39,6 +59,10 @@ .declareService(function () { var gadget = this; + if (gadget.props.auto_repair === true) { + return repair_and_redirect(gadget); + } + return new RSVP.Queue() .push(function () { return promiseEventListener( @@ -48,16 +72,7 @@ ); }) .push(function () { - gadget.props.element.querySelector("button") - .disabled = true; - - return gadget.repair(); - }) - .push(function (result) { - if (result !== undefined && result.hasOwnProperty('redirect')){ - return gadget.redirect(result.redirect); - } - return gadget.redirect({}); + return repair_and_redirect(gadget); }); }); diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.xml index 5b040a41ad7721a5f1a007912ce9d0a3d57ab387..c90cabde8e4149a949811eeb82fa671a2fe640e4 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_sync_js.xml @@ -214,7 +214,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> @@ -228,7 +228,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.58607.65382.65228</string> </value> + <value> <string>954.38795.35440.52684</string> </value> </item> <item> <key> <string>state</string> </key> @@ -246,7 +246,7 @@ </tuple> <state> <tuple> - <float>1442858160.45</float> + <float>1476450033.82</float> <string>UTC</string> </tuple> </state>