Permalink
Browse files

Update binaries.

  • Loading branch information...
1 parent 06a2376 commit c054304f7a9a9fabf6511aeb00f5257c65ca4e4f @signalpoint committed Dec 9, 2016
Showing with 28 additions and 19 deletions.
  1. +21 −12 bin/drupalgap.js
  2. +7 −7 bin/drupalgap.min.js
View
@@ -1,4 +1,4 @@
-/*! drupalgap 2016-11-23 */
+/*! drupalgap 2016-12-09 */
// Initialize the drupalgap json object.
var drupalgap = drupalgap || drupalgap_init(); // Do not remove this line.
@@ -250,7 +250,7 @@ function _drupalgap_deviceready_options() {
drupalgap.connected = true;
module_invoke_all('device_connected');
- // If there is a has hash url present and it can be routed go directly to that page,
+ // If there is a hash url present and it can be routed go directly to that page,
// otherwise go to the app's front page.
var path = '';
if (window.location.hash.indexOf('#') != -1) {
@@ -1262,15 +1262,28 @@ function drupalgap_set_title(title) {
}
/**
+ * Returns true if the loader spinner is enabled, false otherwise. Defaults to true if no config for it is present.
+ * @returns {Boolean}
+ */
+function drupalgap_loader_enabled() {
+ return typeof drupalgap.settings.loader.enabled !== 'undefined' ?
+ drupalgap.settings.loader.enabled : true;
+}
+
+/**
+ * Toggle on or off the loader spinner, send true to turn it on, false to turn it off.
+ * @param {Boolean} enable
+ */
+function drupalgap_loader_enable(enable) {
+ drupalgap.settings.loader.enabled = enable;
+}
+
+/**
* Implements hook_services_preprocess().
* @param {Object} options
*/
function drupalgap_services_preprocess(options) {
- try {
- // Show the loading icon.
- drupalgap_loading_message_show();
- }
- catch (error) { console.log('drupalgap_services_preprocess - ' + error); }
+ if (drupalgap_loader_enabled()) { drupalgap_loading_message_show(); }
}
/**
@@ -1279,11 +1292,7 @@ function drupalgap_services_preprocess(options) {
* @param {Object} result
*/
function drupalgap_services_postprocess(options, result) {
- try {
- // Hide the loading icon.
- drupalgap_loading_message_hide();
- }
- catch (error) { console.log('drupalgap_services_postprocess - ' + error); }
+ if (drupalgap_loader_enabled()) { drupalgap_loading_message_hide(); }
}
/**
Oops, something went wrong.

0 comments on commit c054304

Please sign in to comment.