caboose-cms 0.3.62 → 0.3.63

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDFlM2FmNzJlZDJmN2MxZDdmMjM1NWVjMjdlYmRhYzRhZDNkY2I4ZA==
4
+ NGM1NjlmZmU1NWZjYTU1MjMzZTllZTBjZTMzMDI1ZTkxNmE3ODE4Yg==
5
5
  data.tar.gz: !binary |-
6
- MmQ2MTc1YjRlMzZmMzQ5NzIxYTY3YjhiNTQ5YjI3ZGVjMzA1Yzk3Mg==
6
+ OGQ5OWUwZGQxZjUxZTNkZWY5ZjRlZTBiNWYxNTlkOTcxM2NmMzQ1Mg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NjQ3NjgwMDlhMmNlZDM4MWRlZDEzNWM0ZmJiMzRkZjExNDMwMTE1NjNiMjhk
10
- NTVmYzdjNTdlNDExZWEzY2QzZDc5MjU0YzdhMzhmY2FmYjU2N2YzYjhiNjU1
11
- MmM5NTU3ZTNlZjNjNDA2NGViMGVhZjU1ZjNjNDFjMzgxOTdkOTg=
9
+ NWNmZWJhYTk2NjZkOTgzZGVjNWYxZGI2MWMzMjA5ODRjMzNiNzBiZDdkZWY3
10
+ YmJmNmQ4NDM5NzlkMzE3ZDE3OTEyOTMxNzE4MjdkYzkxY2JmMWI1MDlkMTEz
11
+ ZWY5NTc5YmZhNmIxMzc1YjYzNzQzZTUyOWQxNWU4ZjQzNGNiNjU=
12
12
  data.tar.gz: !binary |-
13
- ZGMwYTBjOWFjMzliM2VlNTc0ZDZhNTZlYmQ3MDI1MjNhZDE3NjdmYTk2MDY3
14
- OWNlOGJlZDAyZjQ4ODNmY2NkMDNhZjFmZmIzY2I1ZWYyNjdjMjRhZTEyYmE3
15
- ZDQwZjcwNjQxMzEwZjU2MDdlMDY4Y2M4YWRhZjMwYjBlYWQyMTQ=
13
+ MzkzYzVmODM4MTNhYzllZDY4OGQyZjhjYWUyYzdhODZkOGExMWFmZjg0MzU5
14
+ MmFkZjQwZTg0NDhhZjJiZDBmZTA1MGQwMTNiZTRhZjVhNTY1MGE1OGI1ZTE4
15
+ MTZiMThmMTFmOTQxYjA4ODYzYmExYzlmYTI0Zjc0YjYwYTFhZDA=
@@ -21,6 +21,7 @@ BoundCheckbox = BoundControl.extend({
21
21
  var this2 = this;
22
22
  $('#'+this.el).wrap($('<div/>')
23
23
  .attr('id', this.el + '_container')
24
+ .addClass('mb_container')
24
25
  .css('position', 'relative')
25
26
  );
26
27
  $('#'+this.el+'_container').empty();
@@ -28,7 +29,7 @@ BoundCheckbox = BoundControl.extend({
28
29
  {
29
30
  $('#'+this.el+'_container').append($('<div/>')
30
31
  .attr('id', this.placeholder)
31
- .addClass('placeholder')
32
+ .addClass('mb_placeholder')
32
33
  .append($('<span/>').html(this.attribute.nice_name + ': '))
33
34
  );
34
35
  }
@@ -58,7 +59,7 @@ BoundCheckbox = BoundControl.extend({
58
59
  .attr('id', this.el + '_background')
59
60
  .attr('disabled', true)
60
61
  //.css('background', '#fff')
61
- .addClass('checkbox_background')
62
+ .addClass('mb_checkbox_background')
62
63
  );
63
64
  if (this.attribute.width)
64
65
  $('#'+this.el+'_background').css('width' , this.attribute.width);
@@ -22,12 +22,13 @@ BoundCheckboxMultiple = BoundControl.extend({
22
22
  var this2 = this;
23
23
  $('#'+this.el).wrap($('<div/>')
24
24
  .attr('id', this.el + '_container')
25
+ .addClass('mb_container')
25
26
  .css('position', 'relative')
26
27
  );
27
28
  $('#'+this.el+'_container').empty();
28
29
  $('#'+this.el+'_container').append($('<div/>')
29
30
  .attr('id', this.placeholder)
30
- .addClass('placeholder')
31
+ .addClass('mb_placeholder')
31
32
  .append($('<span/>').html(this.attribute.nice_name + ': '))
32
33
  );
33
34
  $('#'+this.el+'_container').append($('<input/>')
@@ -22,7 +22,7 @@ BoundControl = Class.extend({
22
22
  {
23
23
  $('#'+this.el+'_container').prepend($('<div/>')
24
24
  .attr('id', this.el + '_check')
25
- .addClass('bound_input_check')
25
+ .addClass('mb_bound_input_check')
26
26
  .css('position', 'absolute')
27
27
  .css('top', 0)
28
28
  .css('left', w-h-1)
@@ -39,7 +39,7 @@ BoundControl = Class.extend({
39
39
  );
40
40
  }
41
41
  $('#'+this.el+'_check a')
42
- .addClass('loading')
42
+ .addClass('mb_loading')
43
43
  .css('margin-left', h);
44
44
  $('#'+this.el+'_check a').animate({ 'margin-left': 0 }, 300);
45
45
  },
@@ -16,7 +16,11 @@ BoundFile = BoundControl.extend({
16
16
  this.placeholder = this.el + '_placeholder';
17
17
 
18
18
  var this2 = this;
19
- $('#'+this.el).wrap($('<div/>').attr('id', this.el + '_container').css('position', 'relative'));
19
+ $('#'+this.el).wrap($('<div/>')
20
+ .attr('id', this.el + '_container')
21
+ .addClass('mb_container')
22
+ .css('position', 'relative')
23
+ );
20
24
  $('#'+this.el+'_container').empty();
21
25
 
22
26
  var tr = $('<tr/>');
@@ -25,7 +29,7 @@ BoundFile = BoundControl.extend({
25
29
  {
26
30
  tr.append($('<td/>')
27
31
  .attr('id', this.placeholder)
28
- .addClass('placeholder')
32
+ .addClass('mb_placeholder')
29
33
  .css('position', 'relative')
30
34
  .append($('<span/>').html(this.attribute.nice_name + ': '))
31
35
  );
@@ -20,7 +20,11 @@ BoundImage = BoundControl.extend({
20
20
  this.attribute.update_url = this.model.update_url;
21
21
 
22
22
  var this2 = this;
23
- $('#'+this.el).wrap($('<div/>').attr('id', this.el + '_container').css('position', 'relative'));
23
+ $('#'+this.el).wrap($('<div/>')
24
+ .attr('id', this.el + '_container')
25
+ .addClass('mb_container')
26
+ .css('position', 'relative')
27
+ );
24
28
  $('#'+this.el+'_container').empty();
25
29
 
26
30
  $('#'+this.el+'_container').append($('<img/>')
@@ -14,7 +14,11 @@ BoundRichText = BoundControl.extend({
14
14
 
15
15
  this.el = this.el ? this.el : this.model.name.toLowerCase() + '_' + this.model.id + '_' + this.attribute.name;
16
16
 
17
- $('#'+this.el).wrap($('<div/>').attr('id', this.el + '_container').css('position', 'relative'));
17
+ $('#'+this.el).wrap($('<div/>')
18
+ .attr('id', this.el + '_container')
19
+ .addClass('mb_container')
20
+ .css('position', 'relative')
21
+ );
18
22
  $('#'+this.el+'_container').empty();
19
23
  $('#'+this.el+'_container').append($('<textarea/>').attr('id', this.el).attr('class', 'tinymce').attr('placeholder', 'empty').val(this.attribute.value));
20
24
  //$('#'+this.el+'_container').append($('<div/>').attr('id', this.el + '_placeholder').addClass('placeholder').append($('<span/>').html(this.attribute.nice_name + ': ')));
@@ -19,6 +19,7 @@ BoundSelect = BoundControl.extend({
19
19
 
20
20
  $('#'+this.el).wrap($('<div/>')
21
21
  .attr('id', this.el + '_container')
22
+ .addClass('mb_container')
22
23
  .css('position', 'relative')
23
24
  );
24
25
  $('#'+this.el+'_container').empty();
@@ -26,16 +27,19 @@ BoundSelect = BoundControl.extend({
26
27
  {
27
28
  $('#'+this.el+'_container').append($('<div/>')
28
29
  .attr('id', this.placeholder)
29
- .addClass('placeholder')
30
+ .addClass('mb_placeholder')
30
31
  .append($('<span/>')
31
32
  .html(this.attribute.nice_name + ': ')
32
33
  )
33
34
  );
34
35
  }
36
+ var this2 = this;
35
37
  $('#'+this.el+'_container').append($('<input/>')
38
+ .attr('type', 'text')
36
39
  .attr('id', this.el)
40
+ .addClass('mb_fake_option')
37
41
  .attr('placeholder', this.attribute.empty_text)
38
- .on('focus', function() { this2.edit(); })
42
+ .click(function() { this2.edit(); })
39
43
  .val(this.attribute.text.length > 0 ? this.attribute.text : this.attribute.empty_text)
40
44
  );
41
45
  if (this.attribute.width)
@@ -55,17 +59,16 @@ BoundSelect = BoundControl.extend({
55
59
  //this.attribute.populate_options(function() {
56
60
  // this2.print_options(this2);
57
61
  //});
58
-
59
- var this2 = this;
62
+
60
63
  this.attribute.populate_options(function() {
61
64
  var select = $('<select/>')
62
65
  .attr('id', this2.el + '_select')
63
- .addClass('fake')
64
- .css('width', $('#'+this2.el).outerWidth())
66
+ .addClass('mb_fake')
67
+ .css('width', $('#'+this2.el).outerWidth())
65
68
  .on('change', function() {
66
69
  $('#'+this2.el).val($('#'+this2.el+'_select').val());
67
70
  this2.save();
68
- });
71
+ });
69
72
  // Make sure the existing value is in the list of options
70
73
  var exists = false;
71
74
  $.each(this2.attribute.options, function(i, option) {
@@ -127,8 +130,7 @@ BoundSelect = BoundControl.extend({
127
130
 
128
131
  },
129
132
 
130
- edit: function() {
131
-
133
+ edit: function() {
132
134
  },
133
135
 
134
136
  save: function() {
@@ -14,7 +14,11 @@ BoundText = BoundControl.extend({
14
14
  this[thing] = params[thing];
15
15
 
16
16
  this.el = this.el ? this.el : this.model.name.toLowerCase() + '_' + this.model.id + '_' + this.attribute.name;
17
- $('#'+this.el).wrap($('<div/>').attr('id', this.el + '_container').css('position', 'relative'));
17
+ $('#'+this.el).wrap($('<div/>')
18
+ .attr('id', this.el + '_container')
19
+ .addClass('mb_container')
20
+ .css('position', 'relative')
21
+ );
18
22
  $('#'+this.el+'_container').empty();
19
23
  $('#'+this.el+'_container').append($('<input/>')
20
24
  .attr('id', this.el)
@@ -25,7 +29,7 @@ BoundText = BoundControl.extend({
25
29
  );
26
30
 
27
31
  if (this.attribute.fixed_placeholder)
28
- $('#'+this.el+'_container').append($('<div/>').attr('id', this.el + '_placeholder').addClass('placeholder').append($('<span/>').html(this.attribute.nice_name + ': ')));
32
+ $('#'+this.el+'_container').append($('<div/>').attr('id', this.el + '_placeholder').addClass('mb_placeholder').append($('<span/>').html(this.attribute.nice_name + ': ')));
29
33
  if (this.attribute.width) $('#'+this.el).css('width' , this.attribute.width);
30
34
  if (this.attribute.fixed_placeholder)
31
35
  {
@@ -39,9 +43,9 @@ BoundText = BoundControl.extend({
39
43
  if (e.keyCode == 13) this2.save(); // Enter
40
44
 
41
45
  if ($('#'+this2.el).val() != this2.attribute.value_clean)
42
- $('#'+this2.el).addClass('dirty');
46
+ $('#'+this2.el).addClass('mb_dirty');
43
47
  else
44
- $('#'+this2.el).removeClass('dirty');
48
+ $('#'+this2.el).removeClass('mb_dirty');
45
49
  });
46
50
  $('#'+this.el).on('blur', function() {
47
51
  if (this2.save_attempts < 1)
@@ -14,10 +14,14 @@ BoundTextarea = BoundControl.extend({
14
14
 
15
15
  this.el = this.el ? this.el : this.model.name.toLowerCase() + '_' + this.model.id + '_' + this.attribute.name;
16
16
 
17
- $('#'+this.el).wrap($('<div/>').attr('id', this.el + '_container').css('position', 'relative'));
17
+ $('#'+this.el).wrap($('<div/>')
18
+ .attr('id', this.el + '_container')
19
+ .addClass('mb_container')
20
+ .css('position', 'relative')
21
+ );
18
22
  $('#'+this.el+'_container').empty();
19
23
  $('#'+this.el+'_container').append($('<textarea/>').attr('id', this.el).attr('placeholder', 'empty').val(this.attribute.value));
20
- $('#'+this.el+'_container').append($('<div/>').attr('id', this.el + '_placeholder').addClass('placeholder').append($('<span/>').html(this.attribute.nice_name + ': ')));
24
+ $('#'+this.el+'_container').append($('<div/>').attr('id', this.el + '_placeholder').addClass('mb_placeholder').append($('<span/>').html(this.attribute.nice_name + ': ')));
21
25
  if (this.attribute.width) $('#'+this.el).css('width' , this.attribute.width);
22
26
  if (this.attribute.height) $('#'+this.el).css('height' , this.attribute.height);
23
27
  var h = $('#'+this.el+'_placeholder').outerHeight();
@@ -31,10 +35,10 @@ BoundTextarea = BoundControl.extend({
31
35
  if ($('#'+this2.el).val() != this2.attribute.value_clean)
32
36
  {
33
37
  this2.show_controls();
34
- $('#'+this2.el).addClass('dirty');
38
+ $('#'+this2.el).addClass('mb_dirty');
35
39
  }
36
40
  else
37
- $('#'+this2.el).removeClass('dirty');
41
+ $('#'+this2.el).removeClass('mb_dirty');
38
42
  });
39
43
  $('#'+this.el).on('blur', function() { this2.save(); });
40
44
  },
@@ -46,7 +50,7 @@ BoundTextarea = BoundControl.extend({
46
50
  var this2 = this;
47
51
  $('#'+this.el+'_container').prepend($('<div/>')
48
52
  .attr('id', this.el + '_controls')
49
- .addClass('bound_textarea_controls')
53
+ .addClass('mb_bound_textarea_controls')
50
54
  .css('position', 'absolute')
51
55
  .css('top', 0)
52
56
  .css('left', w-148)
@@ -55,8 +59,8 @@ BoundTextarea = BoundControl.extend({
55
59
  .append($('<div/>')
56
60
  .css('width', 148)
57
61
  .css('margin-left', 148)
58
- .append($('<a/>').html('Save' ).addClass('save' ).css('width', 60).attr('href', '#').click(function(event) { event.preventDefault(); this2.save(); }))
59
- .append($('<a/>').html('Discard').addClass('discard').css('width', 80).attr('href', '#').click(function(event) { event.preventDefault(); this2.cancel(); }))
62
+ .append($('<a/>').html('Save' ).addClass('mb_save' ).css('width', 60).attr('href', '#').click(function(event) { event.preventDefault(); this2.save(); }))
63
+ .append($('<a/>').html('Discard').addClass('mb_discard').css('width', 80).attr('href', '#').click(function(event) { event.preventDefault(); this2.cancel(); }))
60
64
  )
61
65
  );
62
66
  $('#'+this.el+'_controls div').animate({ 'margin-left': 0 }, 300);
@@ -11,7 +11,8 @@
11
11
  *= require colorbox-rails
12
12
  *= require caboose/fonts
13
13
  *= require caboose/page_bar_generator
14
- *= require caboose/caboose
14
+ *= require caboose/caboose
15
+ *= require caboose/model_binder
15
16
  *= require application
16
17
  */
17
18
 
@@ -0,0 +1,118 @@
1
+
2
+ .mb_container {
3
+ width: 100%;
4
+ }
5
+
6
+ .mb_container div.mb_model_attribute_text {
7
+ color: #000;
8
+ }
9
+
10
+ .mb_container input[type=text],
11
+ .mb_container select,
12
+ .mb_container .mb_fake option,
13
+ .mb_container option {
14
+ font-size: 16px !important;
15
+ }
16
+
17
+ .mb_container input.mb_dirty,
18
+ .mb_container textarea.mb_dirty {
19
+ background: #fff799;
20
+ }
21
+
22
+ .mb_container select.mb_fake {
23
+ background: transparent;
24
+ position: absolute;
25
+ top: 0;
26
+ left: 0;
27
+ color: transparent;
28
+ background: transparent;
29
+ height: 50px !important;
30
+ }
31
+
32
+ .mb_container select.mb_fake option {
33
+ background: #fff;
34
+ color: #000;
35
+ }
36
+
37
+ .mb_container .mb_bound_input_check a,
38
+ .mb_container .mb_bound_input_cancel a {
39
+ border: 1px solid #ccc;
40
+ -moz-border-radius: 2px;
41
+ -webkit-border-radius: 2px;
42
+ border-radius: 2px;
43
+
44
+ font-size: 28px;
45
+ text-align: center;
46
+ background: #00cc00;
47
+ color: #fff;
48
+
49
+ display: block;
50
+ padding: 4px 0;
51
+ height: 34px;
52
+ }
53
+
54
+ .mb_container .mb_bound_input_check a.loading {
55
+ background-image: url(/assets/caboose/loading_green.gif);
56
+ background-color: #00cc00;
57
+ background-repeat: no-repeat;
58
+ background-position: 6px 5px;
59
+ color: rgba(255, 255, 255, 0.0);
60
+ }
61
+
62
+ .mb_container .mb_bound_textarea_controls a {
63
+ display: inline-block;
64
+ margin: 3px 0 0 1px;
65
+ padding: 8px 0 6px 0;
66
+ background: #ccc;
67
+ color: #000;
68
+ text-align: center;
69
+ border: #666 1px solid;
70
+ }
71
+
72
+ .mb_container .mb_bound_textarea_controls a.save { width: 60px; }
73
+ .mb_container .mb_bound_textarea_controls a.discard { width: 80px; }
74
+
75
+ div.mb_container div.mb_placeholder {
76
+ display: block;
77
+ margin: 0;
78
+ padding: 0 5px 0 0;
79
+ /*height: 34px;*/
80
+
81
+ position: absolute;
82
+ top: 12px;
83
+ left: 10px;
84
+ z-index: 19;
85
+ }
86
+
87
+ .mb_container .mb_placeholder span {
88
+ display: block;
89
+ font-size: 20px;
90
+ color: #757575;
91
+ }
92
+
93
+ .mb_container input[type='checkbox'] {
94
+ /*position: absolute;*/
95
+ top: 4px;
96
+ left: 0;
97
+ z-index: 19;
98
+
99
+ margin: 0;
100
+ padding: 0;
101
+ width: 20px;
102
+ }
103
+
104
+ .mb_container div.model_attribute_text {
105
+ color: #fff;
106
+ }
107
+
108
+ .mb_container .mb_model_attribute {
109
+ background: none repeat scroll 0 0 transparent;
110
+ display: block;
111
+ padding: 2px 4px;
112
+ text-decoration: none;
113
+ }
114
+
115
+ .mb_container .mb_clear {
116
+ clear: both;
117
+ line-height: 0;
118
+ }
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.3.62'
2
+ VERSION = '0.3.63'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.62
4
+ version: 0.3.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -193,6 +193,7 @@ files:
193
193
  - app/assets/stylesheets/caboose/fonts.css
194
194
  - app/assets/stylesheets/caboose/login.css
195
195
  - app/assets/stylesheets/caboose/modal.css
196
+ - app/assets/stylesheets/caboose/model_binder.css
196
197
  - app/assets/stylesheets/caboose/page_bar_generator.css
197
198
  - app/assets/stylesheets/caboose/register.css
198
199
  - app/assets/stylesheets/caboose/station_modal.css