caboose-cms 0.3.24 → 0.3.25

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
- MTVlMDBhZjQ0MzU1OWEyMjUwNDcwZjNkMDE0MzJmMTU3NmQwYzcwZQ==
4
+ YmIzZmU0ZTNhYTRhNmQ5ODljZTc0ODk1NTk0MmQ0NTQ3MGRkNzdhYw==
5
5
  data.tar.gz: !binary |-
6
- NTE0NTFlMTgxYjMwZDZhYjI5Yjk5ZTVhMzBiMmYwODcyOWQzYTZhMA==
6
+ ZDNmYjZlNGIwNzdkNjJiOWQ1MDc0MWE3MTJiZTM5NTFhM2QzZGE5OA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- N2Q5ZTAxNzdkZDAwZDNhM2M4N2RkNGQxOWZlODlkZjIxM2VkZWM1YTE1YmI0
10
- MTQ5MTVkOTZhYWE3NjFlZThhZTgxYjkyZWIwOGQ4MTNmOTQ2ZjBjYTFhZGRh
11
- ZGFlNWM5ZTVlNWIyYjljYzA1OTcwYzMyM2I4NjRiYTdjMGIyNDQ=
9
+ Zjg0ODIyNjAxNzFmZGZmY2E4YTg0YTJiMmQxMWNhZWYxMTdkOTNhNTkyY2Zh
10
+ NDA5N2FhOTRmMDA4ZmJmNjZjZDM5YzE3M2U1YTk0MGRlNDEyMDI5Yjg0OWNi
11
+ YzFlMGQ1OGQ0Mjc2OTRmNGM1Yjc3Mjg5NmNkN2Q2NWM5MWM4OWU=
12
12
  data.tar.gz: !binary |-
13
- NGZjYzdmZTliMTM4NDYwZDI3MTAyNTRjMzY3MWU5MTY4YTBhM2FmZjEzYTcw
14
- YzcxZGZlNmUwODJlYTlkMWM5MDlhMjg5MDY1Njg2NTZiNTQzZDA3ODIxMWYy
15
- ZTQ2MTI0ZDk4ODAyOGI0MWY5Mjg2MTU3ZjA2Y2JmNzk2YjQ0NTY=
13
+ MTgwMjUzZWZhYWM5NGZlMzljZGQwNDQzNjBkNTNjZGNmYjc1MDFjYmIzMGQ5
14
+ YzRmMDQwNzIxMjM0MjUwZmEyZWE3MWZhMzY4NGFiMzA5ZTU3YWE4NGIxNjYx
15
+ MzAwYTNiN2FmMzE5Y2E0ZDFhNGMzYzZjZDA2NGY0MGRhYTgxZGE=
@@ -48,11 +48,12 @@ $(document).ready(function() {
48
48
  //$('#caboose_login' ).colorbox({ iframe: true, initialWidth: 400, initialHeight: 200, innerWidth: 400, innerHeight: 200, scrolling: false, transition: 'fade', closeButton: false, onComplete: fix_colorbox, opacity: 0.50 });
49
49
  //$('#caboose_register' ).colorbox({ iframe: true, initialWidth: 400, initialHeight: 324, innerWidth: 400, innerHeight: 324, scrolling: false, transition: 'fade', closeButton: false, onComplete: fix_colorbox, opacity: 0.50 });
50
50
  //$('#caboose_station' ).colorbox({ iframe: true, initialWidth: 200, initialHeight: 50, innerWidth: 200, innerHeight: 50, scrolling: false, transition: 'fade', closeButton: false, onComplete: fix_colorbox, opacity: 0.50 });
51
+ $('a.caboose_modal').each(function(i, a) { caboose_modal(a); });
51
52
  });
52
53
 
53
54
  function caboose_modal(el)
54
55
  {
55
- $('#'+el).colorbox({
56
+ $(typeof(el) == 'String' ? '#'+el : el).colorbox({
56
57
  iframe: true,
57
58
  initialWidth: 400,
58
59
  initialHeight: 200,
@@ -35,17 +35,23 @@ BoundCheckbox = BoundControl.extend({
35
35
  var cb = $('<input/>')
36
36
  .attr('id', this.el)
37
37
  .attr('type', 'checkbox')
38
- .attr('checked', this.attribute.value)
38
+ .attr('checked', this.attribute.value == 1)
39
39
  .on('change', function() {
40
40
  this2.save();
41
- });
41
+ });
42
+ $('#'+this.el+'_container').append(cb);
43
+
42
44
  if (this.attribute.align == 'right')
43
- cb.css('left', this.attribute.width - 10)
45
+ $('#'+this.el).css('left', this.attribute.width - 10)
44
46
  else if (this.attribute.align == 'center')
45
- cb.css('left', Math.floor($('#'+this.el+'_container').outerWidth()/2))
47
+ $('#'+this.el).css('left', Math.floor($('#'+this.el+'_container').outerWidth()/2))
46
48
  else // left
47
- cb.css('left', $('#'+this.placeholder).outerWidth() + 10)
48
- $('#'+this.el+'_container').append(cb);
49
+ {
50
+ //alert(this.placeholder);
51
+ //alert($('#'+this.placeholder).html());
52
+ //alert($('#'+this.placeholder).outerWidth());
53
+ $('#'+this.el).css('left', $('#'+this.placeholder).outerWidth(true) + 10);
54
+ }
49
55
 
50
56
  $('#'+this.el+'_container').append($('<input/>')
51
57
  .attr('type', 'text')
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.3.24'
2
+ VERSION = '0.3.25'
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.24
4
+ version: 0.3.25
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-01-27 00:00:00.000000000 Z
11
+ date: 2014-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails