caboose-cms 0.3.31 → 0.3.32

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
- NDI4ZDcyZjQ4MTY4MzNmNTg0NmQ0Yjc0NTJiNmZlMWNmMjhkZGFhYg==
4
+ MGE4OWQ5MjhhZTk1ZDM2MTBhNjU0MzQyNjc0ZjExNDcwMGE5ZmMxYw==
5
5
  data.tar.gz: !binary |-
6
- MTMyZTdhY2YwZWJhMDVjNDllMWFjMzE3YTExZWNlOWYwODY2ZDZhMA==
6
+ Y2Q1YjRkYzUwY2EzNzIyMzRhY2U2NWZkM2ExN2VmOGM0YjExM2MyYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MzJhOWVmYTg3N2I0YTMyZmM2NGU3MDU3Mzk5ZGExYTE5NDUzODYyMGI3YzE1
10
- MzViY2JlZGQ3NDI3YTc1YjE1YjRhNzlhNjhjNmU0Y2I3Y2IwYWVkY2Q2ZjRk
11
- NDMwYTRlYzI4NDUzZmY0MzJjMzY0MWY3MzZkYzY3ODFkMjU0MDM=
9
+ OTZlMTgxNzY0MjgwNjEzNDVhMGU2ZGM1YWI2YWYxY2FmYzhmZTUzNzVkNWU3
10
+ ODA4MzE3YTI0YWRkNzgzOGFhNGUzY2MxZDA2MTliYjMxMjVmYmJhMzRjYTI4
11
+ NTg5MzYyN2NmZWI0YWY5ZmNlN2NmYzJjYzg5YzlkNzkxYTUwMzI=
12
12
  data.tar.gz: !binary |-
13
- ZWVjMTY1YWFkZTM2MTZmZDYyYjc3OWUwNmRjMTUxNDJmMTM3YTkwNGUwOThh
14
- ZDk4Y2RmY2Q3NjVlNzA1YjA0MGY4NmRmMGRmYzE3OGYyOTQ2NjIwY2ZmNTM4
15
- Zjk1NjIxMGI4N2YxOTA0NjI3NzNjZDdkN2VhZjdmNjA1YmJmZTM=
13
+ MzMyZTk4MTc3ZjQ2MzQ2N2E5ZjIzZDU4YzYxYTgxMTI1MDM4OGY4MzdmMGIy
14
+ NzBkZWYwZWZmMTI1MmU1MTdkNmI3M2UzN2NlMWM4MWZlMThkMzY0MjdjNGFm
15
+ YjhlMDBiNWYxMzYxMmQyNzY3YTViY2YxNmFmOTFlZjkyOGZkNzk=
@@ -22,6 +22,8 @@ Attribute.prototype = {
22
22
  before_cancel: false,
23
23
  after_cancel: false,
24
24
  debug: false,
25
+ download_text: false,
26
+ upload_text: false,
25
27
 
26
28
  update_url: false,
27
29
  options_url: false,
@@ -31,12 +31,16 @@ BoundFile = BoundControl.extend({
31
31
  );
32
32
  }
33
33
 
34
- tr.append($('<td/>').append($('<a/>')
34
+ var td = $('<td/>').append($('<a/>')
35
35
  .attr('id', this.el + '_link')
36
36
  .attr('href', this.attribute.value)
37
- .html('Download current file')
37
+ .attr('target', '_blank')
38
+ .html(this.attribute.download_text ? this.attribute.download_text : 'Download current file')
38
39
  .css('margin-right', 10)
39
- ));
40
+ );
41
+ if (this.attribute.value == false)
42
+ td.css('display', 'none');
43
+ tr.append(td);
40
44
 
41
45
  tr.append($('<td/>').append($('<form/>')
42
46
  .attr('action', this.attribute.update_url)
@@ -48,10 +52,13 @@ BoundFile = BoundControl.extend({
48
52
  $('#'+this2.el+'_message').html("<p class='loading'>Uploading...</p>");
49
53
  $('#'+this2.el+'_iframe').on('load', function() { this2.post_upload(); });
50
54
  })
51
- .append($('<input/>').attr('type', 'hidden').attr('name', 'authenticity_token').val(this.binder.authenticity_token))
52
- .append($('<input/>').attr('type', 'button').val('Update ' + this.attribute.nice_name).click(function() {
55
+ .append($('<input/>').attr('type', 'hidden').attr('name', 'authenticity_token').val(this.binder.authenticity_token))
56
+ .append($('<a/>').attr('href', '#').html(this.attribute.upload_text ? this.attribute.upload_text : 'Update ' + this.attribute.nice_name).click(function() {
53
57
  $('#'+this2.el+'_container input[type="file"]').click();
54
- }))
58
+ }))
59
+ //.append($('<input/>').attr('type', 'button').val('Update ' + this.attribute.nice_name).click(function() {
60
+ // $('#'+this2.el+'_container input[type="file"]').click();
61
+ //}))
55
62
  .append($('<input/>')
56
63
  .attr('type', 'file')
57
64
  .attr('name', this.attribute.name)
@@ -96,7 +103,8 @@ BoundFile = BoundControl.extend({
96
103
  this.error(resp.error);
97
104
  else
98
105
  {
99
- $('#'+this.el+'_container a').attr('href', this.attribute.value);
106
+ $('#'+this.el+'_link').parent().css('display', 'block');
107
+ $('#'+this.el+'_link').attr('href', this.attribute.value);
100
108
  //$('#'+this.el+'_container img').attr('src', this.attribute.value);
101
109
  }
102
110
  },
@@ -190,7 +190,7 @@ select.fake option {
190
190
  }
191
191
 
192
192
  #modal_content input[type='checkbox'] {
193
- position: absolute;
193
+ /*position: absolute;*/
194
194
  top: 4px;
195
195
  left: 0;
196
196
  z-index: 19;
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.3.31'
2
+ VERSION = '0.3.32'
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.31
4
+ version: 0.3.32
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-02-10 00:00:00.000000000 Z
11
+ date: 2014-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails