caboose-cms 0.4.72 → 0.4.73

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
- OWQ2YWNkYzI0MTBjZjI1ZmYyNDRhYTE4NGE5ODA4ZDQ0MWRiMDBlMQ==
4
+ YTFiY2E2NjIxOWExYzgxMTEwY2FmNDFmNzMxNzFkN2JiMTUwOGU1Nw==
5
5
  data.tar.gz: !binary |-
6
- YWM0MWU1NTc0ZjE4NWIyNTA3NTI2ZDJlNjhlY2U3N2NjZWQ1ZmExOQ==
6
+ ZjUwZjlkZWEzOWQyNGU2Y2I2OWI5ZGY3NjQ5ZjM0ZTk5YjZmYTg4ZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NWQyNGIzYTJhNThmYjRiM2M0ZjQ0NjA3ZDU1ZGNiOTRlNzYyYzk2YWNjYTM4
10
- OGUxMzc2N2Q2ODVkOGViNjg0NjJkZjJmOTE5Yjk2MjJhZjQ5YjI5MTk1MDFm
11
- ZGRkMzE4YzJjY2U1MTY2ZmVmOWM3NjRmNmMyMWQwNjdiNjMxMzI=
9
+ YjhkZGQ4MzY5OTdjZTRiM2MxZjVjOGI2Y2I3NTNkNzQzOTE1OTBhZTg1MjRl
10
+ NmFiMmE1YzY5Nzg0ZGMxMzZiYTAxMzMxOTI2ZWU0NzUyNzQxOTZjYWQwMWNj
11
+ YmQzMmE4MDg3MDY4NjI5ZmJiNzUxMGU4OGIwOTdmY2IwNjUyYzI=
12
12
  data.tar.gz: !binary |-
13
- Yzk3NjQyZTQxZTAxNTM2OTBlMTA0MGQzYjFmZmIxZDhlMDkwNzYzOWNmYTM5
14
- MTE2OWNkNjVkOTcyYmEwYzM4MDcwNWFmMzMwNmQxZDNjNDZmYTU2ZDg3N2Fi
15
- MjZkMDRiNWI1Njk1ODE3ZDViMjAwZDczYWZhYmM5NjE0YmYwNzQ=
13
+ ZmJiYzZhYjE2MGVjYzgwOTNjZjkwZjIxNmMzY2VjMzllMjU5MjFjMjc3YTIw
14
+ MDYyMTg1NzA2NjM4MWYxMDc0NTkyNTlhZjFmODc0MTdhMGY4YjI4NmUwYzEz
15
+ OWEyMzUxMWVkOTkyMmFjNjZmMWE0YTE3NWQ0NjZkMWJjZjk3ZTQ=
@@ -32,8 +32,8 @@ ImagesController.prototype = {
32
32
  that.cat = resp;
33
33
  }
34
34
  });
35
- $('#message').empty();
36
- var ul = $('#media');
35
+ $('#message').empty();
36
+ var ul = $('<ul/>');
37
37
  if (this.cat.children.length > 0 || this.cat.images.count > 0)
38
38
  {
39
39
  $.each(this.cat.children, function(i, cat2) {
@@ -46,14 +46,17 @@ ImagesController.prototype = {
46
46
  });
47
47
  $.each(this.cat.images, function(i, mi) {
48
48
  ul.append($('<li/>').addClass('image').attr('id', 'image' + mi.id)
49
- .append($('<a/>').attr('href', '/admin/images/' + mi.id)
49
+ .append($('<a/>')
50
+ .attr('href', '/admin/images/' + mi.id)
50
51
  .css('background-image', mi.tiny_url)
51
52
  .append($('<span/>').addClass('name').html(mi.name))
52
53
  )
53
54
  );
54
55
  });
55
56
  }
56
- ul.replaceWith($('<p/>').html("This category is empty."));
57
+ else
58
+ ul = $('<p/>').html("This category is empty.");
59
+ $('#media').empty().append(ul);
57
60
  },
58
61
 
59
62
  // Adds a new media category
@@ -8,5 +8,4 @@
8
8
  //= require caboose/jquery.placeholder
9
9
  //= require caboose/modal_integration
10
10
  //= require caboose/main
11
- //= require_tree ../../templates
12
- //= require application
11
+ //= require_tree ../../templates
@@ -0,0 +1,53 @@
1
+
2
+ #media {
3
+ ul {
4
+ list-style: none; margin: 0; padding: 0;
5
+
6
+ li {
7
+ list-style: none; margin: 4px; padding: 0; float: left;
8
+ a {
9
+ display: block;
10
+ width: 150px;
11
+ height: 150px;
12
+ overflow: hidden;
13
+ border: #666 4px solid;
14
+ background-size: contain;
15
+ background-repeat: no-repeat;
16
+ background-position: center;
17
+ background-color: #666;
18
+ position: relative;
19
+ text-align: center;
20
+
21
+ span { color: #fff; text-decoration: none; }
22
+ span.name { display: block; background: #666; color: #fff; text-decoration: none !important; border: 0; }
23
+
24
+ &:hover {
25
+ background-color: #fff69f;
26
+ border-color: #fff69f;
27
+
28
+ span { background: #efefef; color: #000; }
29
+ span.name { background: #fff69f; color: #000; }
30
+ }
31
+
32
+ &.selected span,
33
+ &.selected:hover span { background: #fff69f; color: #000; border: #fff69f 1px solid; }
34
+ }
35
+ &.category {
36
+ a span.icon { display: block; padding: 10px 20px; font-size: 24pt; color: #fff; }
37
+ a:hover span.icon { background: #fff69f; color: #000; }
38
+ }
39
+ }
40
+ }
41
+ }
42
+
43
+ .progress {
44
+ max-width: 600px;
45
+ margin: 0.2em 0 0.2em 0;
46
+ .bar {
47
+ height: 1.2em;
48
+ padding: 0.2em;
49
+ color: white;
50
+ display: none;
51
+ }
52
+ }
53
+
@@ -12,8 +12,7 @@
12
12
  *= require caboose/fonts
13
13
  *= require caboose/page_bar_generator
14
14
  *= require caboose/caboose
15
- *= require caboose/model_binder
16
- *= require application
15
+ *= require caboose/model_binder
17
16
  */
18
17
 
19
18
  #cboxLoadedContent { margin-bottom: 0; }
@@ -25,7 +25,7 @@ module Caboose
25
25
 
26
26
  id = params[:media_category_id]
27
27
  cat = id ? MediaCategory.find(id) : MediaCategory.top_image_category(@site.id)
28
- render :json => cat.api_hash
28
+ render :json => cat.api_hash
29
29
  end
30
30
 
31
31
  # GET /admin/images/new
@@ -16,4 +16,8 @@ class Caboose::Site < ActiveRecord::Base
16
16
  return d.site_id
17
17
  end
18
18
 
19
+ def self.sanitize_name(name)
20
+ self.name = self.name.downcase.gsub(' ', '_')
21
+ end
22
+
19
23
  end
@@ -2,13 +2,15 @@
2
2
  <% if !@page.nil? && @page.title != 'Access Denied' %>
3
3
  <% content_for :js do %>
4
4
  <%= javascript_include_tag "caboose/application" %>
5
+ <%= javascript_include_tag @site.name == 'application' ? 'application' : "@site.name/application" %>
5
6
  <script>window.loggedIn = <%= logged_in?.to_json %></script>
6
7
  <% Caboose::javascripts.each do |js| %><%= javascript_include_tag(js) %><% end %>
7
8
  <% @page.linked_resources_map[:js].each do |r| %><%= javascript_include_tag r %><% end %>
8
9
  <%= yield :caboose_js %>
9
10
  <% end %>
10
11
  <% content_for :css do %>
11
- <%= stylesheet_link_tag('caboose/application') %>
12
+ <%= stylesheet_link_tag 'caboose/application' %>
13
+ <%= stylesheet_link_tag @site.name == 'application' ? 'application' : "@site.name/application" %>
12
14
  <% Caboose::stylesheets.each do |css| %><%= stylesheet_link_tag(css) %><% end %>
13
15
  <% @page.linked_resources_map[:css].each do |r| %><%= stylesheet_link_tag r %><% end %>
14
16
  <%= yield :caboose_css %>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.4.72'
2
+ VERSION = '0.4.73'
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.4.72
4
+ version: 0.4.73
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-08-08 00:00:00.000000000 Z
11
+ date: 2014-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - ! '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: sass-rails
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ! '>='
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
167
181
  description: CMS built on rails with love.
168
182
  email:
169
183
  - william@nine.is
@@ -232,7 +246,7 @@ files:
232
246
  - app/assets/javascripts/caboose/testing.js
233
247
  - app/assets/javascripts/tinymce/plugins/caboose/plugin.js
234
248
  - app/assets/stylesheets/caboose/admin.css
235
- - app/assets/stylesheets/caboose/admin_images_index.css
249
+ - app/assets/stylesheets/caboose/admin_images_index.css.scss
236
250
  - app/assets/stylesheets/caboose/admin_page_edit_content.css
237
251
  - app/assets/stylesheets/caboose/application.css
238
252
  - app/assets/stylesheets/caboose/bound_input.css
@@ -1,33 +0,0 @@
1
-
2
- ul.media { list-style: none; margin: 0; padding: 0; }
3
- ul.media li { list-style: none; margin: 4px; padding: 0; float: left; }
4
- ul.media a {
5
- display: block;
6
- width: 150px;
7
- height: 150px;
8
- overflow: hidden;
9
- border: #666 4px solid;
10
- background-size: contain;
11
- background-repeat: no-repeat;
12
- background-position: center;
13
- background-color: #666;
14
- position: relative;
15
- text-align: center;
16
- }
17
- ul.media a:hover {
18
- background-color: #fff69f;
19
- border-color: #fff69f;
20
- }
21
- ul.media li a span { color: #fff; text-decoration: none; }
22
- ul.media li a:hover span { background: #efefef; color: #000; }
23
- ul.media li a span.name { display: block; background: #666; color: #fff; text-decoration: none !important; border: 0; }
24
- ul.media li a:hover span.name { background: #fff69f; color: #000; }
25
-
26
- ul.media li a.selected span,
27
- ul.media li a.selected:hover span { background: #fff69f; color: #000; border: #fff69f 1px solid; }
28
-
29
- ul.media li.category a span.icon { display: block; padding: 10px 20px; font-size: 24pt; color: #fff; }
30
- ul.media li.category a:hover span.icon { background: #fff69f; color: #000; }
31
-
32
- .progress { max-width: 600px; margin: 0.2em 0 0.2em 0; }
33
- .progress .bar { height: 1.2em; padding: 0.2em; color: white; display: none; }