marionette.modal 1.0.0.6 → 1.0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@
3
3
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
4
4
 
5
5
  describe('Backbone.Marionette.Modals', function() {
6
- var layout, modal, myLayout, _ref, _ref1;
6
+ var BackboneModal, MarionetteModal, layout, myLayout, _ref, _ref1, _ref2;
7
7
  myLayout = {};
8
8
  layout = (function(_super) {
9
9
  __extends(layout, _super);
@@ -27,25 +27,25 @@
27
27
  return layout;
28
28
 
29
29
  })(Backbone.Marionette.Layout);
30
- modal = (function(_super) {
31
- __extends(modal, _super);
30
+ BackboneModal = (function(_super) {
31
+ __extends(BackboneModal, _super);
32
32
 
33
- function modal() {
34
- _ref1 = modal.__super__.constructor.apply(this, arguments);
33
+ function BackboneModal() {
34
+ _ref1 = BackboneModal.__super__.constructor.apply(this, arguments);
35
35
  return _ref1;
36
36
  }
37
37
 
38
- modal.prototype.viewContainer = 'div';
38
+ BackboneModal.prototype.viewContainer = 'div';
39
39
 
40
- modal.prototype.cancelEl = '.close';
40
+ BackboneModal.prototype.cancelEl = '.close';
41
41
 
42
- modal.prototype.submitEl = '.submit';
42
+ BackboneModal.prototype.submitEl = '.submit';
43
43
 
44
- modal.prototype.template = function() {
44
+ BackboneModal.prototype.template = function() {
45
45
  return '<a id="id"></a><div></div><a class="close"></a><a class="submit"></a>';
46
46
  };
47
47
 
48
- modal.prototype.views = {
48
+ BackboneModal.prototype.views = {
49
49
  'click #id': {
50
50
  view: function() {
51
51
  return '<p>html</p>';
@@ -53,13 +53,46 @@
53
53
  }
54
54
  };
55
55
 
56
- modal.prototype.cancel = function() {};
56
+ BackboneModal.prototype.cancel = function() {};
57
57
 
58
- modal.prototype.submit = function() {};
58
+ BackboneModal.prototype.submit = function() {};
59
59
 
60
- return modal;
60
+ return BackboneModal;
61
61
 
62
62
  })(Backbone.Modal);
63
+ MarionetteModal = (function(_super) {
64
+ __extends(MarionetteModal, _super);
65
+
66
+ function MarionetteModal() {
67
+ _ref2 = MarionetteModal.__super__.constructor.apply(this, arguments);
68
+ return _ref2;
69
+ }
70
+
71
+ MarionetteModal.prototype.viewContainer = 'div';
72
+
73
+ MarionetteModal.prototype.cancelEl = '.close';
74
+
75
+ MarionetteModal.prototype.submitEl = '.submit';
76
+
77
+ MarionetteModal.prototype.template = function() {
78
+ return '<a id="id"></a><div></div><a class="close"></a><a class="submit"></a>';
79
+ };
80
+
81
+ MarionetteModal.prototype.views = {
82
+ 'click #id': {
83
+ view: function() {
84
+ return '<p>html</p>';
85
+ }
86
+ }
87
+ };
88
+
89
+ MarionetteModal.prototype.cancel = function() {};
90
+
91
+ MarionetteModal.prototype.submit = function() {};
92
+
93
+ return MarionetteModal;
94
+
95
+ })(Marionette.Modal);
63
96
  myLayout = new layout();
64
97
  describe('#show', function() {
65
98
  it('should stack a modal view', function() {
@@ -9,7 +9,7 @@ describe 'Backbone.Marionette.Modals', ->
9
9
  selector: '#modals'
10
10
  regionType: Backbone.Marionette.Modals
11
11
 
12
- class modal extends Backbone.Modal
12
+ class BackboneModal extends Backbone.Modal
13
13
  viewContainer: 'div'
14
14
  cancelEl: '.close'
15
15
  submitEl: '.submit'
@@ -19,7 +19,18 @@ describe 'Backbone.Marionette.Modals', ->
19
19
  view: -> '<p>html</p>'
20
20
  cancel: ->
21
21
  submit: ->
22
-
22
+
23
+ class MarionetteModal extends Marionette.Modal
24
+ viewContainer: 'div'
25
+ cancelEl: '.close'
26
+ submitEl: '.submit'
27
+ template: -> '<a id="id"></a><div></div><a class="close"></a><a class="submit"></a>'
28
+ views:
29
+ 'click #id':
30
+ view: -> '<p>html</p>'
31
+ cancel: ->
32
+ submit: ->
33
+
23
34
  myLayout = new layout()
24
35
 
25
36
  describe '#show', ->
@@ -29,14 +40,12 @@ describe 'Backbone.Marionette.Modals', ->
29
40
 
30
41
  it 'should disable modals with zIndex < modal', ->
31
42
 
32
-
33
43
  describe '#close', ->
34
44
  it 'should only close the last modal', ->
35
45
  myLayout.modals.close()
36
46
  expect(myLayout.modals.zIndex).toBe(0)
37
47
 
38
48
  it 'should enable the last modal', ->
39
-
40
49
 
41
50
  describe '#closeAll', ->
42
51
  it 'should close all the modals', ->
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marionette.modal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.6
4
+ version: 1.0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Smith