Commit 68ca2bcc authored by Roque Porchetto's avatar Roque Porchetto

Clean up and minor fix: check if navigator is online before syncro.

parent 7bf561c8
......@@ -121,9 +121,10 @@
}
});
})
/*.push(function () {
return gadget.state_parameter_dict.jio_storage.repair();
})*/;
.push(function () {
if (navigator.onLine)
return gadget.state_parameter_dict.jio_storage.repair();
});
})
.declareMethod('allDocs', function (option_dict) {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.43056.61332.5870</string> </value>
<value> <string>958.43097.40216.22715</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1492088925.5</float>
<float>1492091162.02</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -3,7 +3,7 @@
(function (self, caches, fetch) {
"use strict";
var CACHE_NAME = 'Thu, 12 July 2016 12:00:00 GMT',
var CACHE_NAME = 'Thu, 12 July 2016 12:00:02 GMT',
// Files required to make this app work offline
REQUIRED_FILES = [
'./',
......@@ -17,7 +17,6 @@
'gadget_translation.html',
'gadget_erp5_editor_panel.html',
'gadget_erp5_panel.html',
//'fif_custom_gadget_erp5_serviceworker.js',
'jiodev.js',
'rsvp.js',
'renderjs.js',
......@@ -30,7 +29,6 @@
'gadget_erp5_header.js',
'gadget_erp5_custom_jio.js',
'gadget_erp5_editor_panel.js',
//'gadget_panel.js',
'URI.js',
'erp5_launcher.js',
'gadget_erp5.css',
......@@ -42,18 +40,12 @@
'gadget_erp5_field_datetime.js',
'gadget_erp5_field_email.html',
'gadget_erp5_field_email.js',
//'font-awesome.min.css',
'gadget_erp5_field_file.html',
'gadget_erp5_field_file.js',
//'fontawesome-webfront.eot?v=4.2.0',
'gadget_erp5_field_float.html',
'gadget_erp5_field_float.js',
//'fontawesome-webfront.eot',
'gadget_erp5_field_gadget.html',
'gadget_erp5_field_gadget.js',
//'fontawesome-webfront.woff?v=4.2.0',
//'fontawesome-webfront.ttf?v=4.2.0',
//'fontawesome-webfront.svg?v=4.2.0',
'gadget_erp5_field_image.html',
'gadget_erp5_field_image.js',
'gadget_erp5_field_integer.html',
......@@ -160,120 +152,6 @@
'gadget_erp5_page_data_array.js',
'gadget_html5_element.html',
'gadget_html5_element.js'
],
OLD_REQUIRED_FILES = [
'./',
'https://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css',
'https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.eot?v=4.2.0',
'https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.eot?#iefix&v=4.2.0',
'https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.woff?v=4.2.0',
'https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.ttf?v=4.2.0',
'https://netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular',
'URI.js',
'erp5_launcher.js',
'gadget_erp5.css',
'gadget_erp5_editor_panel.html',
'gadget_erp5_editor_panel.js',
'gadget_erp5_field_checkbox.html',
'gadget_erp5_field_checkbox.js',
'gadget_erp5_field_datetime.html',
'gadget_erp5_field_datetime.js',
'gadget_erp5_field_email.html',
'gadget_erp5_field_email.js',
'gadget_erp5_field_file.html',
'gadget_erp5_field_file.js',
'gadget_erp5_field_float.html',
'gadget_erp5_field_float.js',
'gadget_erp5_field_gadget.html',
'gadget_erp5_field_gadget.js',
'gadget_erp5_field_image.html',
'gadget_erp5_field_image.js',
'gadget_erp5_field_integer.html',
'gadget_erp5_field_integer.js',
'gadget_erp5_field_list.html',
'gadget_erp5_field_list.js',
'gadget_erp5_field_listbox.html',
'gadget_erp5_field_listbox.js',
'gadget_erp5_field_multicheckbox.html',
'gadget_erp5_field_multicheckbox.js',
'gadget_erp5_field_multilist.html',
'gadget_erp5_field_multilist.js',
'gadget_erp5_field_multirelationstring.html',
'gadget_erp5_field_multirelationstring.js',
'gadget_erp5_field_radio.html',
'gadget_erp5_field_radio.js',
'gadget_erp5_field_readonly.html',
'gadget_erp5_field_readonly.js',
'gadget_erp5_field_relationstring.html',
'gadget_erp5_field_relationstring.js',
'gadget_erp5_field_string.html',
'gadget_erp5_field_string.js',
'gadget_erp5_field_password.html',
'gadget_erp5_field_password.js',
'gadget_erp5_field_textarea.html',
'gadget_erp5_field_textarea.js',
'gadget_erp5_form.html',
'gadget_erp5_form.js',
'gadget_erp5_header.html',
'gadget_erp5_header.js',
'gadget_erp5_jio.html',
'gadget_erp5_jio.js',
'gadget_erp5_page_action.html',
'gadget_erp5_page_action.js',
'gadget_erp5_page_form.html',
'gadget_erp5_page_form.js',
'gadget_erp5_page_front.html',
'gadget_erp5_page_front.js',
'gadget_erp5_page_history.html',
'gadget_erp5_page_history.js',
'gadget_erp5_page_jump.html',
'gadget_erp5_page_jump.js',
'gadget_erp5_page_logout.html',
'gadget_erp5_page_logout.js',
'gadget_erp5_page_preference.html',
'gadget_erp5_page_preference.js',
'gadget_erp5_page_relation_search.html',
'gadget_erp5_page_relation_search.js',
'gadget_erp5_page_search.html',
'gadget_erp5_page_search.js',
'gadget_erp5_page_tab.html',
'gadget_erp5_page_tab.js',
'gadget_erp5_page_worklist.html',
'gadget_erp5_page_worklist.js',
'gadget_erp5_panel.html',
'gadget_erp5_panel.js',
'gadget_erp5_pt_form_dialog.html',
'gadget_erp5_pt_form_dialog.js',
'gadget_erp5_pt_form_list.html',
'gadget_erp5_pt_form_list.js',
'gadget_erp5_pt_form_view.html',
'gadget_erp5_pt_form_view.js',
'gadget_erp5_pt_form_view_editable.html',
'gadget_erp5_pt_form_view_editable.js',
'gadget_erp5_pt_report_view.html',
'gadget_erp5_pt_report_view.js',
'gadget_erp5_router.html',
'gadget_erp5_router.js',
'gadget_erp5_relation_input.html',
'gadget_erp5_relation_input.js',
'gadget_erp5_search_editor.html',
'gadget_erp5_search_editor.js',
'gadget_erp5_searchfield.html',
'gadget_erp5_searchfield.js',
'gadget_erp5_sort_editor.html',
'gadget_erp5_sort_editor.js',
'gadget_global.js',
'gadget_erp5_global.js',
'gadget_jio.html',
'gadget_jio.js',
'gadget_translation.html',
'gadget_translation.js',
'gadget_translation_data.js',
'handlebars.js',
'i18next.js',
'jiodev.js',
'renderjs.js',
'rsvp.js'
];
self.addEventListener('install', function (event) {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.43061.52519.43417</string> </value>
<value> <string>958.43096.57622.53282</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1492089085.68</float>
<float>1492091094.27</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -28,7 +28,7 @@
return this.getUrlFor({command: 'display_stored_state', options: {jio_key: argument_list[0].options.jio_key}});
}
return this.getUrlFor.apply(this, argument_list);
})*/
})
.allowPublicAcquisition('getUrlParameter', function (argument_list) {
return this.getUrlParameter(argument_list)
.push(function (result) {
......@@ -37,7 +37,7 @@
}
return result;
});
})
})*/
.declareMethod("triggerSubmit", function () {
var argument_list = arguments;
return this.getDeclaredGadget('form_list')
......@@ -58,7 +58,7 @@
})
.push(function (form_gadget) {
var column_list = [
['translated_title', 'Title'],
['title', 'Title'],
['reference', 'Reference'],
['version', 'version'],
['description', 'Description'],
......@@ -77,11 +77,7 @@
"list_method": "portal_catalog",
//"query": "urn:jio:allDocs?query=portal_type%3A%22Data+Array%22+AND+validation_state%3A%22validated%22",
"query": "urn:jio:allDocs?query=portal_type%3A%22Data+Array%22",
/*
query: 'portal_type:"Data Array"' +
' AND validation_state:"validated"',
select_list: ["title", "reference"],
*/
//query: 'portal_type:"Data Array"'
"portal_type": [],
"search_column_list": column_list,
"sort_column_list": column_list,
......@@ -95,13 +91,13 @@
name: ""
}
}},
form_definition: {
group_list: [[
"bottom",
[["listbox"]]
]]
}
});
form_definition: {
group_list: [[
"bottom",
[["listbox"]]
]]
}
});
});
});
}(window, rJS));
\ No newline at end of file
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>958.42869.59925.11741</string> </value>
<value> <string>958.43096.9136.41608</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1492077486.56</float>
<float>1492091054.52</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment