diff --git a/app/assets/js/start.js b/app/assets/js/start.js index 6708a0f4..b8309c47 100644 --- a/app/assets/js/start.js +++ b/app/assets/js/start.js @@ -32,14 +32,14 @@ $(function() { Messenger.options = { extraClasses: 'messenger-fixed messenger-on-top', theme: 'air' - } + }; // App setup window.CachetHQ = {}; - CachetHQ.Notifier = function () { + window.CachetHQ.Notifier = function () { this.notify = function (message, type, options) { - type = (typeof type === 'undefined' || type == 'error') ? 'error' : type; + type = (typeof type === 'undefined' || type === 'error') ? 'error' : type; var defaultOptions = { message: message, @@ -47,7 +47,7 @@ $(function() { showCloseButton: true }; - var options = _.extend(defaultOptions, options); + options = _.extend(defaultOptions, options); Messenger().post(options); }; @@ -90,7 +90,7 @@ $(function() { type: 'POST', data: $('form[name=componentList]').serializeObject(), success: function() { - (new CachetHQ.Notifier).notify('Components updated.', 'success'); + (new CachetHQ.Notifier()).notify('Components updated.', 'success'); } }); } @@ -104,14 +104,14 @@ $(function() { $.ajax({ async: true, - url: '/dashboard/api/components/' + formData['component_id'], + url: '/dashboard/api/components/' + formData.component_id, type: 'POST', data: formData, success: function(component) { - (new CachetHQ.Notifier).notify($form.data('messenger'), 'success'); + (new CachetHQ.Notifier()).notify($form.data('messenger'), 'success'); }, error: function(a, b, c) { - (new CachetHQ.Notifier).notify('Something went wrong updating the component.'); + (new CachetHQ.Notifier()).notify('Something went wrong updating the component.'); } }); }); diff --git a/public/build/js/all-215df44c.js b/public/build/js/all-5dbf816c.js similarity index 99% rename from public/build/js/all-215df44c.js rename to public/build/js/all-5dbf816c.js index 1a99b685..2c71ae88 100644 --- a/public/build/js/all-215df44c.js +++ b/public/build/js/all-5dbf816c.js @@ -12394,14 +12394,14 @@ $(function() { Messenger.options = { extraClasses: 'messenger-fixed messenger-on-top', theme: 'air' - } + }; // App setup window.CachetHQ = {}; - CachetHQ.Notifier = function () { + window.CachetHQ.Notifier = function () { this.notify = function (message, type, options) { - type = (typeof type === 'undefined' || type == 'error') ? 'error' : type; + type = (typeof type === 'undefined' || type === 'error') ? 'error' : type; var defaultOptions = { message: message, @@ -12409,7 +12409,7 @@ $(function() { showCloseButton: true }; - var options = _.extend(defaultOptions, options); + options = _.extend(defaultOptions, options); Messenger().post(options); }; @@ -12452,7 +12452,7 @@ $(function() { type: 'POST', data: $('form[name=componentList]').serializeObject(), success: function() { - (new CachetHQ.Notifier).notify('Components updated.', 'success'); + (new CachetHQ.Notifier()).notify('Components updated.', 'success'); } }); } @@ -12466,14 +12466,14 @@ $(function() { $.ajax({ async: true, - url: '/dashboard/api/components/' + formData['component_id'], + url: '/dashboard/api/components/' + formData.component_id, type: 'POST', data: formData, success: function(component) { - (new CachetHQ.Notifier).notify($form.data('messenger'), 'success'); + (new CachetHQ.Notifier()).notify($form.data('messenger'), 'success'); }, error: function(a, b, c) { - (new CachetHQ.Notifier).notify('Something went wrong updating the component.'); + (new CachetHQ.Notifier()).notify('Something went wrong updating the component.'); } }); }); diff --git a/public/build/js/all.js b/public/build/js/all.js index 1a99b685..2c71ae88 100644 --- a/public/build/js/all.js +++ b/public/build/js/all.js @@ -12394,14 +12394,14 @@ $(function() { Messenger.options = { extraClasses: 'messenger-fixed messenger-on-top', theme: 'air' - } + }; // App setup window.CachetHQ = {}; - CachetHQ.Notifier = function () { + window.CachetHQ.Notifier = function () { this.notify = function (message, type, options) { - type = (typeof type === 'undefined' || type == 'error') ? 'error' : type; + type = (typeof type === 'undefined' || type === 'error') ? 'error' : type; var defaultOptions = { message: message, @@ -12409,7 +12409,7 @@ $(function() { showCloseButton: true }; - var options = _.extend(defaultOptions, options); + options = _.extend(defaultOptions, options); Messenger().post(options); }; @@ -12452,7 +12452,7 @@ $(function() { type: 'POST', data: $('form[name=componentList]').serializeObject(), success: function() { - (new CachetHQ.Notifier).notify('Components updated.', 'success'); + (new CachetHQ.Notifier()).notify('Components updated.', 'success'); } }); } @@ -12466,14 +12466,14 @@ $(function() { $.ajax({ async: true, - url: '/dashboard/api/components/' + formData['component_id'], + url: '/dashboard/api/components/' + formData.component_id, type: 'POST', data: formData, success: function(component) { - (new CachetHQ.Notifier).notify($form.data('messenger'), 'success'); + (new CachetHQ.Notifier()).notify($form.data('messenger'), 'success'); }, error: function(a, b, c) { - (new CachetHQ.Notifier).notify('Something went wrong updating the component.'); + (new CachetHQ.Notifier()).notify('Something went wrong updating the component.'); } }); }); diff --git a/public/build/rev-manifest.json b/public/build/rev-manifest.json index 309e49ae..3f77ae06 100644 --- a/public/build/rev-manifest.json +++ b/public/build/rev-manifest.json @@ -1,4 +1,4 @@ { "css/all.css": "css/all-c5b65085.css", - "js/all.js": "js/all-215df44c.js" + "js/all.js": "js/all-5dbf816c.js" } \ No newline at end of file