backbone_rails_extensions 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b244fa181595e50ec710100881a3032c9acfa28
4
- data.tar.gz: 10d952f50cef2341947fe09c54541ceddc94b21b
3
+ metadata.gz: 661086143f57c9aa2d26f678a0f2019f9503e2dd
4
+ data.tar.gz: c063ac2e3c884c5c651bb5bdbfc4730dd99ec8b3
5
5
  SHA512:
6
- metadata.gz: 6d4e316b0172de70670d61f3417b1ee0156d39da4bf55810a0ca7bdb6874fe726bf347c602cf2e405f53e4becae5126bfdbb7b8d65690ff3e847583c401f7e1a
7
- data.tar.gz: add6d5fce2914199fb5aa85748102ed48b92bd124fb51d0910190f3df912f756b462663f321879029bed1a7628e3aea044764df0cb062b53b89d6a18c34095a2
6
+ metadata.gz: d22a86a9172f80dbbd81146c82761d3c0fa0b593bfcc474855eaa63694b5576ef99980900a43f2d9e81cb9616eb6a9ac46a33051f384b19b8d4ea0bd137b5ca0
7
+ data.tar.gz: 35490e6dcb3f5f22c6656c79e26c9ffe8bd2537e15afe3c4bd3f8a2b94f47c78bceffef40f40551b36346afa7c4c7e1510ad566b5c0aaa405d4e0670f1ef5269
@@ -7,7 +7,7 @@ List.View.CollectionView = Backbone.View.extend({
7
7
  this.collection.off("add remove reset", this.render, this);
8
8
  this.collection.off("error", this.renderError, this);
9
9
  }
10
-
10
+
11
11
  this.collection = collection;
12
12
  if(this.collection) {
13
13
  this.collection.on("add remove reset", this.render, this);
@@ -16,12 +16,12 @@ List.View.CollectionView = Backbone.View.extend({
16
16
  }
17
17
  }
18
18
  },
19
-
19
+
20
20
  render: function() {
21
- throw "method not implemented";
21
+ throw "method not implemented";
22
22
  },
23
-
23
+
24
24
  renderError: function(data, response) {
25
- alert("An error occurred while fetching the records from the server.");
25
+ alert("An error occurred while fetching the records from the server.");
26
26
  }
27
- });
27
+ });
@@ -5,20 +5,20 @@ Loader.customizeBackboneSync = _.once(function() {
5
5
  var success = options.success,
6
6
  error = options.error,
7
7
  showLoader = _.has(options, "showLoader") ? options.showLoader : true;
8
-
8
+
9
9
  options.success = function() {
10
- success.apply(this, arguments);
10
+ if (success) { success.apply(this, arguments) };
11
11
  Loader.View.Base.hide();
12
12
  };
13
-
13
+
14
14
  options.error = function() {
15
- error.apply(this, arguments);
15
+ if (error) { error.apply(this, arguments) };
16
16
  Loader.View.Base.hide();
17
17
  };
18
-
18
+
19
19
  if(showLoader) Loader.View.Base.show();
20
20
  Backbone.sync.call(this, method, model, options);
21
21
  };
22
-
22
+
23
23
  Backbone.Model.prototype.sync = Backbone.Collection.prototype.sync = customSync;
24
- })
24
+ })
@@ -1,3 +1,3 @@
1
1
  module BackboneRailsExtensions
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backbone_rails_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Coroutine
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-07-22 00:00:00.000000000 Z
13
+ date: 2015-07-23 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: This gem provides a set of Backbone.js extensions commonly used in Coroutine
16
16
  projects. These extensions include simple collection views, paginated collection
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  version: '0'
67
67
  requirements: []
68
68
  rubyforge_project:
69
- rubygems_version: 2.4.8
69
+ rubygems_version: 2.4.6
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: This gem provides a set of Backbone.js extensions commonly used in Coroutine