caboose-cms 0.9.99 → 0.9.100

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/caboose/admin_main.js +11 -0
  3. data/app/assets/javascripts/caboose/block_content_controller_dragdrop.js +1 -1
  4. data/app/assets/javascripts/caboose/block_modal_controllers/block_dd_modal_controller.js +4 -4
  5. data/app/assets/javascripts/caboose/block_modal_controllers/block_modal_controller.js +3 -3
  6. data/app/assets/javascripts/caboose/model/bound_checkbox.js +1 -1
  7. data/app/assets/javascripts/caboose/model/bound_textarea.js +1 -1
  8. data/app/assets/stylesheets/caboose/admin_crumbtrail.css.scss +49 -45
  9. data/app/assets/stylesheets/caboose/admin_edit_page_content_dragdrop.scss +4 -0
  10. data/app/assets/stylesheets/caboose/admin_main.css +127 -37
  11. data/app/assets/stylesheets/caboose/checkout.css.scss +2 -1
  12. data/app/assets/stylesheets/caboose/fonts.css +1 -16
  13. data/app/assets/stylesheets/caboose/modal_main.css +5 -12
  14. data/app/assets/stylesheets/caboose/model_binder.css +7 -5
  15. data/app/assets/stylesheets/caboose/product_options.css.scss +2 -1
  16. data/app/assets/stylesheets/caboose/station_sidebar.css +12 -6
  17. data/app/controllers/caboose/application_controller.rb +5 -1
  18. data/app/controllers/caboose/pages_controller.rb +15 -0
  19. data/app/controllers/caboose/posts_controller.rb +1 -0
  20. data/app/views/caboose/blocks/admin_edit_advanced.html.erb +30 -27
  21. data/app/views/caboose/pages/_admin_header.html.erb +4 -3
  22. data/app/views/caboose/pages/admin_edit_general.html.erb +8 -7
  23. data/app/views/caboose/posts/admin_edit_categories.html.erb +3 -0
  24. data/app/views/caboose/posts/admin_index.html.erb +6 -0
  25. data/app/views/layouts/caboose/admin.html.erb +25 -3
  26. data/lib/caboose/engine.rb +4 -4
  27. data/lib/caboose/version.rb +1 -1
  28. metadata +2 -4
  29. data/app/assets/fonts/avenir-medium.eot +0 -0
  30. data/app/assets/fonts/avenir-medium.ttf +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bcb43ee42297f6edac0105f9f046c8566dfbb194
4
- data.tar.gz: e88484b1ef1c225c7dc7f40f9ec01d59e260cf5d
3
+ metadata.gz: 1679adede6e539a9e7e39e9c3c339a6eb536a25c
4
+ data.tar.gz: 75b38ec8f5e7ae4f8453b0c4e76f3f266c17c36a
5
5
  SHA512:
6
- metadata.gz: fdc595faed0cd1db2c3be9669ef730d155554b7f555b356aa50d6f5328a6bb56d2f5217d87457e531ce741137ef786722023d35939e64f59c268e44241b941da
7
- data.tar.gz: 0b8f1b5033f6c20cfe782f8a2eb72e697bb09276d54c2efee3d13df0029fe69b8f2a30c541084f799eb3877353b19805b7b70c3d61cadf6ab464bd460a5d2532
6
+ metadata.gz: d7de69fa6d419f72f8d2611efc426f530eee6dd6817fe74b5ef5e420f1661448689426ddce4f4864524fa75f3e9aeded294a2b893a30d3dc3cdc7e9fd95d8929
7
+ data.tar.gz: b22afc388a84540611f3c4cf5a9ddde26babb33d51ebb7231c329fa89ea95432128f89039926f09c05b5105d68b3a0d9de720031dd43d48dd4583ced6be29a49
@@ -19,3 +19,14 @@ function add_to_crumbtrail(href, text)
19
19
  c.append(' > ');
20
20
  c.append($('<a/>').attr('href', href).html(text));
21
21
  }
22
+
23
+ $(window).load(function() {
24
+ $("#top_nav ul.quick > li").mouseenter(function() {
25
+ $(this).find("ul").show();
26
+ $(this).children('a, span').addClass('hovered');
27
+ });
28
+ $("#top_nav ul.quick > li").mouseleave(function() {
29
+ $(this).find("ul").hide();
30
+ $(this).children('a, span').removeClass('hovered');
31
+ });
32
+ });
@@ -386,7 +386,7 @@ BlockContentController.prototype = {
386
386
  add_handles_to_block: function(block_id) {
387
387
  var that = this;
388
388
  var el = $('#block_' + block_id);
389
- if (el.length > 0) {
389
+ if (el.length > 0 && block_id.indexOf('constrain') < 0 && block_id.indexOf('full_width') < 0 && block_id.indexOf('_value_') < 0) {
390
390
  if ( el.attr('id').indexOf('_value') >= 0 || el.children('.drag_handle').length > 0 )
391
391
  return true;
392
392
  if ( el.parents('.content_body').length > 0 ) {
@@ -163,8 +163,8 @@ var BlockModalController = ModalController.extend({
163
163
 
164
164
  var b = that.block;
165
165
  $('#modal_content').empty()
166
- .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_block_type_id' )))
167
- .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_parent_id' )))
166
+ // .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_block_type_id' )))
167
+ // .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_parent_id' )))
168
168
  .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_constrain' )))
169
169
  .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_full_width' )))
170
170
  $('#modal_controls').empty()
@@ -185,8 +185,8 @@ var BlockModalController = ModalController.extend({
185
185
  update_url: that.block_url(b),
186
186
  authenticity_token: that.authenticity_token,
187
187
  attributes: [
188
- { name: 'block_type_id' , nice_name: 'Block type' , type: 'select' , value: b.block_type.id , text: b.block_type.name , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.block_type.id = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }, options_url: '/admin/block-types/options' },
189
- { name: 'parent_id' , nice_name: 'Parent ID' , type: 'select' , value: b.parent_id , text: b.parent ? b.parent.title : '' , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.parent_id = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }, options_url: '/admin/' + (that.page_id ? 'pages/' + that.page_id : 'posts/' + that.post_id) + '/block-options' },
188
+ // { name: 'block_type_id' , nice_name: 'Block type' , type: 'select' , value: b.block_type.id , text: b.block_type.name , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.block_type.id = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }, options_url: '/admin/block-types/options' },
189
+ // { name: 'parent_id' , nice_name: 'Parent ID' , type: 'select' , value: b.parent_id , text: b.parent ? b.parent.title : '' , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.parent_id = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }, options_url: '/admin/' + (that.page_id ? 'pages/' + that.page_id : 'posts/' + that.post_id) + '/parentblock-options?block_id=' + b.id },
190
190
  { name: 'constrain' , nice_name: 'Constrain' , type: 'checkbox' , value: b.constrain ? 1 : 0 , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.constrain = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }},
191
191
  { name: 'full_width' , nice_name: 'Full Width' , type: 'checkbox' , value: b.full_width ? 1 : 0 , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.full_width = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }}
192
192
  ]
@@ -163,7 +163,7 @@ var BlockModalController = ModalController.extend({
163
163
 
164
164
  var b = that.block;
165
165
  $('#modal_content').empty()
166
- .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_block_type_id' )))
166
+ // .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_block_type_id' )))
167
167
  .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_parent_id' )))
168
168
  .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_constrain' )))
169
169
  .append($('<p/>').append($('<div/>').attr('id', 'block_' + b.id + '_full_width' )))
@@ -185,8 +185,8 @@ var BlockModalController = ModalController.extend({
185
185
  update_url: that.block_url(b),
186
186
  authenticity_token: that.authenticity_token,
187
187
  attributes: [
188
- { name: 'block_type_id' , nice_name: 'Block type' , type: 'select' , value: b.block_type.id , text: b.block_type.name , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.block_type.id = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }, options_url: '/admin/block-types/options' },
189
- { name: 'parent_id' , nice_name: 'Parent ID' , type: 'select' , value: b.parent_id , text: b.parent ? b.parent.title : '' , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.parent_id = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }, options_url: '/admin/' + (that.page_id ? 'pages/' + that.page_id : 'posts/' + that.post_id) + '/block-options' },
188
+ // { name: 'block_type_id' , nice_name: 'Block type' , type: 'select' , value: b.block_type.id , text: b.block_type.name , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.block_type.id = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }, options_url: '/admin/block-types/options' },
189
+ { name: 'parent_id' , nice_name: 'Parent ID' , type: 'select' , value: b.parent_id , text: b.parent ? b.parent.title : '' , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.parent_id = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }, options_url: '/admin/' + (that.page_id ? 'pages/' + that.page_id : 'posts/' + that.post_id) + '/parentblock-options?block_id=' + b.id },
190
190
  { name: 'constrain' , nice_name: 'Constrain' , type: 'checkbox' , value: b.constrain ? 1 : 0 , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.constrain = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }},
191
191
  { name: 'full_width' , nice_name: 'Full Width' , type: 'checkbox' , value: b.full_width ? 1 : 0 , width: 400, fixed_placeholder: true, after_update: function() { that.parent_controller.render_blocks(); that.block.full_width = this.value; }, after_cancel: function() { that.parent_controller.render_blocks(); }, on_load: function() { that.modal.autosize(); }}
192
192
  ]
@@ -36,7 +36,7 @@ BoundCheckbox = BoundControl.extend({
36
36
  var cb = $('<input/>')
37
37
  .attr('id', this.el)
38
38
  .attr('type', 'checkbox')
39
- .attr('checked', this.attribute.value == 1)
39
+ .attr('checked', (this.attribute.value == 1 || this.attribute.value == true || this.attribute.value == 'true' || this.attribute.value == '1'))
40
40
  .on('change', function() {
41
41
  this2.save();
42
42
  });
@@ -25,7 +25,7 @@ BoundTextarea = BoundControl.extend({
25
25
  $('#'+this.el+'_container').append($('<div/>').attr('id', this.el + '_placeholder').addClass('mb_placeholder').append($('<span/>').html(this.attribute.nice_name + ': ')));
26
26
  if (this.attribute.width) $('#'+this.el).css('width' , this.attribute.width);
27
27
  if (this.attribute.height) $('#'+this.el).css('height' , this.attribute.height);
28
- var h = $('#'+this.el+'_placeholder').outerHeight();
28
+ var h = $('#'+this.el+'_placeholder').outerHeight() + 6;
29
29
  $('#'+this.el).attr('placeholder', 'empty').css('padding-top', '+=' + h).css('height', '-=' + h);
30
30
 
31
31
  var this2 = this;
@@ -8,70 +8,74 @@ $current-text-color: #ccc;
8
8
 
9
9
  ul#crumbtrail {
10
10
  position: absolute;
11
- top: -42px;
12
- left: 54px;
11
+ top: -50px;
12
+ left: 50px;
13
13
  color: #fff;
14
-
15
- margin: 0 0 20px 0;
14
+ margin: 0;
16
15
  padding: 0;
17
16
  list-style: none;
18
17
  text-align: center;
19
-
18
+ height: 50px;
20
19
  li {
21
- margin: 0 5px;
20
+ margin: 0;
22
21
  padding: 0;
23
22
  list-style: none;
24
23
  display: inline;
25
-
26
24
  a {
27
25
  white-space: nowrap;
28
26
  display: inline-block;
29
27
  margin: 0;
30
- position: relative;
31
- height: 32px;
28
+ position: relative;
29
+ padding: 0 5px;
30
+ height: 50px;
31
+ line-height: 50px;
32
32
  background: $off-bg-color;
33
33
  color: $off-text-color;
34
34
  z-index: 20;
35
- text-decoration: none !important;
36
- span { display: block; padding: 7px 4px 0 5px; font-size: 10pt; }
35
+ text-decoration: none !important;
36
+ span {
37
+ display: block;
38
+ padding: 0;
39
+ font-size: 12px;
40
+ }
37
41
  }
38
42
  a:hover { background: $hover-bg-color; color: $hover-text-color; }
39
43
 
40
- a:before {
41
- content: ' ';
42
- height: 0;
43
- position: absolute;
44
- top: 0;
45
- left: -6px;
46
- width: 0;
47
- border: 16px solid transparent;
48
- border-width: 16px 6px;
49
- border-top-color: $off-bg-color;
50
- border-right-color: transparent;
51
- border-bottom-color: $off-bg-color;
52
- border-left-color: transparent;
53
- z-index: 19;
54
- }
55
- a:hover:before {
56
- border-top-color: $hover-bg-color;
57
- border-bottom-color: $hover-bg-color;
58
- }
44
+ // a:before {
45
+ // content: ' ';
46
+ // height: 0;
47
+ // position: absolute;
48
+ // top: 0;
49
+ // left: -6px;
50
+ // width: 0;
51
+ // border: 16px solid transparent;
52
+ // border-width: 16px 6px;
53
+ // border-top-color: $off-bg-color;
54
+ // border-right-color: transparent;
55
+ // border-bottom-color: $off-bg-color;
56
+ // border-left-color: transparent;
57
+ // z-index: 19;
58
+ // }
59
+ // a:hover:before {
60
+ // border-top-color: $hover-bg-color;
61
+ // border-bottom-color: $hover-bg-color;
62
+ // }
59
63
 
60
- a:after {
61
- content: ' ';
62
- height: 0;
63
- position: absolute;
64
- top: 0;
65
- right: -12px;
66
- width: 0;
67
- border: 16px solid transparent;
68
- border-width: 16px 6px;
69
- border-left-color: $off-bg-color;
70
- z-index: 19;
71
- }
72
- a:hover:after {
73
- border-left-color: $hover-bg-color;
74
- }
64
+ // a:after {
65
+ // content: ' ';
66
+ // height: 0;
67
+ // position: absolute;
68
+ // top: 0;
69
+ // right: -12px;
70
+ // width: 0;
71
+ // border: 16px solid transparent;
72
+ // border-width: 16px 6px;
73
+ // border-left-color: $off-bg-color;
74
+ // z-index: 19;
75
+ // }
76
+ // a:hover:after {
77
+ // border-left-color: $hover-bg-color;
78
+ // }
75
79
 
76
80
  &.current {
77
81
  a { background: $current-bg-color; color: $current-text-color; }
@@ -85,6 +85,10 @@
85
85
  font-weight: 300 !important;
86
86
  font-size: 15px !important;
87
87
  padding: 8px 6px 6px 6px;
88
+ &:focus {
89
+ outline-width: 0;
90
+ border-color: #28acc1;
91
+ }
88
92
  }
89
93
  label {
90
94
  font-family: 'Roboto' !important;
@@ -4,7 +4,8 @@
4
4
  body {
5
5
  margin: 0;
6
6
  padding: 0;
7
- font-family: "Avenir", serif;
7
+ font-family: "Roboto", serif;
8
+ font-weight: 400;
8
9
  }
9
10
 
10
11
  #cboxOverlay {
@@ -19,10 +20,10 @@ body {
19
20
  }
20
21
 
21
22
  #top_nav {
22
- background: #000;
23
- border-bottom: #333 1px solid;
23
+ background: #2d2d2d;
24
24
  height: 50px;
25
25
  position: relative;
26
+ text-align: center;
26
27
  }
27
28
 
28
29
  #top_nav .caboose_logo {
@@ -31,7 +32,12 @@ body {
31
32
  left: 0;
32
33
  width: 50px;
33
34
  height: 50px;
34
- background: url(/assets/caboose/caboose_logo_small.png);
35
+ display: block;
36
+ text-decoration: none;
37
+ background: url(/assets/caboose/caboose_logo.png);
38
+ background-size: 25px;
39
+ background-position: center center;
40
+ background-repeat: no-repeat;
35
41
  }
36
42
 
37
43
  #top_nav ul {
@@ -39,6 +45,18 @@ body {
39
45
  padding: 0 8px 0 0;
40
46
  list-style: none;
41
47
  text-align: right;
48
+ position: absolute;
49
+ right: 0;
50
+ top: 0;
51
+ height: 50px;
52
+ }
53
+
54
+ #top_nav ul.quick {
55
+ margin: 0;
56
+ list-style-type: none;
57
+ text-align: center;
58
+ position: static;
59
+ padding: 0;
42
60
  }
43
61
 
44
62
  #top_nav ul li {
@@ -46,19 +64,76 @@ body {
46
64
  padding: 0;
47
65
  list-style: none;
48
66
  display: inline-block;
67
+ position: relative;
49
68
  }
50
69
 
51
- #top_nav ul li a {
70
+ #top_nav ul li:hover, #top_nav ul li.hovered {
71
+ background: #000;
72
+ }
73
+
74
+ #top_nav ul li a, #top_nav ul li span {
52
75
  display: block;
53
- margin: 8px 4px;
54
- padding: 0 16px;
55
- border: #333 1px solid;
76
+ margin: 0;
77
+ padding: 0 20px;
78
+ color: #fff;
56
79
  text-decoration: none;
80
+ line-height: 51px;
81
+ border: 0;
82
+ font-family: "Roboto";
83
+ font-weight: 400;
84
+ background-color: transparent;
85
+ font-size: 14px;
86
+ cursor: pointer;
87
+ }
88
+
89
+ #top_nav ul li a > span {
90
+ padding: 0;
91
+ }
92
+
93
+ #colorbox:focus {
94
+ outline-width: 0 !important;
95
+ }
96
+
97
+ #top_nav ul li a:hover {
98
+ background: #000;
99
+ }
100
+
101
+ #top_nav ul li.hovered > a {
102
+ background: #000;
57
103
  }
58
104
 
59
- #top_nav ul li a { color: #ccc; border: #333 1px solid; background: #000; }
60
- #top_nav ul li a:hover { color: #fff; border: #444 1px solid; background: #000; }
61
- #top_nav ul li a:active { color: #fff; border: #666 1px solid; background: #333; }
105
+ #top_nav ul li ul {
106
+ position: absolute;
107
+ top: 50px;
108
+ left: 0;
109
+ width: 200px;
110
+ z-index: 999;
111
+ background: #2d2d2d;
112
+ height: auto;
113
+ text-align: left;
114
+ padding: 0;
115
+ display: none;
116
+ }
117
+
118
+ #top_nav ul li ul li {
119
+ display: block;
120
+ }
121
+
122
+ #top_nav ul li ul li a {
123
+ display: block;
124
+ line-height: 36px;
125
+ padding: 0 15px;
126
+ font-size: 14px;
127
+ }
128
+
129
+ @media all and (max-width: 900px) {
130
+ #top_nav ul li#nav_item_logout, li#nav_item_my-account {
131
+ display: none;
132
+ }
133
+ #top_nav ul li a, #top_nav ul li span {
134
+ padding: 0 10px;
135
+ }
136
+ }
62
137
 
63
138
  #content_wrapper {
64
139
  position: relative;
@@ -68,14 +143,20 @@ body {
68
143
  padding: 0 0 0 30px;
69
144
  }
70
145
 
146
+ h1,h2,h3,h4,h5,h6 {
147
+ font-weight: 400;
148
+ }
149
+
71
150
  #content h1 {
72
151
  margin: 0 0 20px -30px;
73
- padding: 40px 0 0 30px;
74
- height: 80px;
75
- background: #e1e1e1;
152
+ padding: 0 2% 0 50px;
153
+ height: 53px;
154
+ background: #dcdcdc;
76
155
  border-bottom: #aaa 1px solid;
77
- font-size: 36pt;
156
+ font-size: 25px;
157
+ line-height: 56px;
78
158
  overflow: hidden;
159
+ color: #2d2d2d;
79
160
  }
80
161
 
81
162
  #content h1.model_attribute_h1 {
@@ -141,20 +222,23 @@ div.model_attribute_text {
141
222
  }
142
223
 
143
224
  input, select, textarea {
144
- font-family: Helvetica, arial;
225
+ font-family: 'Roboto', arial;
226
+ font-weight: 400;
145
227
  border: 1px solid #ccc;
146
- -moz-border-radius: 2px;
147
- -webkit-border-radius: 2px;
148
- border-radius: 2px;
149
228
  padding: 6px 4px 4px 8px;
150
229
  height: 36px;
151
- font-size: 20px;
230
+ font-size: 15px;
152
231
  z-index: 20;
153
232
  }
154
233
 
234
+ input:focus, textarea:focus {
235
+ outline-width: 0;
236
+ border-color: #28acc1;
237
+ }
238
+
155
239
  input.dirty,
156
240
  textarea.dirty {
157
- background: #fff799;
241
+ background: #fffac5;
158
242
  }
159
243
 
160
244
  select {
@@ -274,11 +358,13 @@ select.fake option {
274
358
  }
275
359
 
276
360
  #content table.data th {
277
- background: #333;
278
- border: #333 1px solid;
361
+ background: #2d2d2d;
362
+ border: #2d2d2d 1px solid;
279
363
  color: #fff;
280
364
  margin: 0;
281
365
  padding: 0;
366
+ font-size: 14px;
367
+ font-weight: 400;
282
368
  }
283
369
 
284
370
  #content table.data th a {
@@ -298,9 +384,12 @@ select.fake option {
298
384
  background: #fff;
299
385
  border: #bdbdbd 1px solid;
300
386
  margin: 0;
301
- padding: 4px 10px 2px 10px;
387
+ padding: 7px 10px 6px 10px;
302
388
  font-size: 15px;
303
389
  }
390
+ #content table.data td table.checkbox_multiple td {
391
+ padding: 2px 8px 0 8px;
392
+ }
304
393
 
305
394
  #content table.data td.edit_button {
306
395
 
@@ -357,17 +446,15 @@ Page Bar Generator
357
446
 
358
447
  .page_links a {
359
448
  display: inline-block;
360
- margin: 0 2px;
361
- padding: 5px 8px 3px 8px;
362
-
363
- border: #333 1px solid;
364
- background: #333;
449
+ margin: 0 3px;
450
+ padding: 8px 10px;
451
+ background: #2d2d2d;
365
452
  color: #fff;
366
453
  text-decoration: none;
367
454
  }
368
455
 
369
456
  .page_links a:hover {
370
- background: #505050;
457
+ background: #000;
371
458
  color: #fff;
372
459
  }
373
460
 
@@ -377,11 +464,10 @@ Page Bar Generator
377
464
 
378
465
  .page_links span.current_page {
379
466
  display: inline-block;
380
- padding: 5px 8px 3px 8px;
381
-
382
- border: #333 1px solid;
467
+ padding: 8px 10px;
468
+ margin: 0 3px;
383
469
  background: #ccc;
384
- color: #000;
470
+ color: #2d2d2d;
385
471
  text-decoration: none;
386
472
  }
387
473
 
@@ -411,7 +497,7 @@ Page Bar Generator
411
497
  #htabs a {
412
498
  display: block;
413
499
  margin: 0;
414
- padding: 16px 12px 12px 12px;
500
+ padding: 14px 12px 12px 12px;
415
501
  text-decoration: none;
416
502
  background: #efefef;
417
503
  border-bottom: #ccc 1px solid;
@@ -499,7 +585,9 @@ Page Bar Generator
499
585
  background: #141516;
500
586
  color: #f7f7f7;
501
587
  text-align: center;
502
- padding: 0 15px;
588
+ font-family: "Roboto", Arial;
589
+ font-weight: 400;
590
+ padding: 1px 15px 0 15px;
503
591
  height: auto;
504
592
  display: inline-block;
505
593
  margin: 0 auto;
@@ -520,7 +608,9 @@ Page Bar Generator
520
608
  border: 1px solid #fff;
521
609
  color: #141516;
522
610
  text-align: center;
523
- padding: 0 15px;
611
+ font-family: "Roboto", Arial;
612
+ font-weight: 400;
613
+ padding: 1px 15px 0 15px;
524
614
  height: auto;
525
615
  display: inline-block;
526
616
  margin: 0 auto;
@@ -21,7 +21,8 @@
21
21
  }
22
22
 
23
23
  #checkout {
24
- font-family: 'Avenir';
24
+ font-family: 'Roboto';
25
+ font-weight: 400;
25
26
  min-height: 400px;
26
27
  > header {
27
28
  border-bottom: 1px solid #d0d0d0;
@@ -1,16 +1 @@
1
-
2
- @font-face {
3
- font-family: 'BigNoodleTitling';
4
- src: local('Big Noodle Titling'), url('/assets/caboose/fonts/big_noodle_titling.ttf') format('truetype');
5
- }
6
-
7
- @font-face {
8
- font-family: 'Avenir';
9
- src: url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.eot');
10
- src: url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.eot') format('embedded-opentype'),
11
- url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.woff') format('woff'),
12
- url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.ttf') format('truetype'),
13
- url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.svg') format('svg');
14
- font-weight: normal;
15
- font-style: normal;
16
- }
1
+ @import url('https://fonts.googleapis.com/css?family=Roboto:400,400i,700,700i');
@@ -4,16 +4,7 @@
4
4
 
5
5
  html { width: 100%; }
6
6
 
7
- @font-face {
8
- font-family: 'Avenir';
9
- src: url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.eot');
10
- src: url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.eot') format('embedded-opentype'),
11
- url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.woff') format('woff'),
12
- url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.ttf') format('truetype'),
13
- url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.svg') format('svg');
14
- font-weight: normal;
15
- font-style: normal;
16
- }
7
+ @import url('https://fonts.googleapis.com/css?family=Roboto:400,400i,700,700i');
17
8
 
18
9
  body {
19
10
  background: #111111;
@@ -21,7 +12,8 @@ body {
21
12
  padding: 0;
22
13
  color: #fff;
23
14
  width: 100%;
24
- font-family: "Avenir", Arial;
15
+ font-family: "Roboto", Arial;
16
+ font-weight: 400;
25
17
  }
26
18
 
27
19
  #modal_wrapper {
@@ -93,7 +85,8 @@ div.model_attribute_text {
93
85
  }
94
86
 
95
87
  input, select, textarea {
96
- font-family: "Avenir", Arial;
88
+ font-family: "Roboto", Arial;
89
+ font-weight: 400;
97
90
  border: 2px solid #ccc;
98
91
  background: #000;
99
92
  color: #fff;
@@ -21,12 +21,12 @@
21
21
  .mb_container select,
22
22
  .mb_container .mb_fake option,
23
23
  .mb_container option {
24
- font-size: 16px !important;
24
+ font-size: 15px !important;
25
25
  }
26
26
 
27
27
  .mb_container input.mb_dirty,
28
28
  .mb_container textarea.mb_dirty {
29
- background: #fff799 !important;
29
+ background: #fffac5 !important;
30
30
  color: #000 !important;
31
31
  }
32
32
 
@@ -90,8 +90,8 @@ div.mb_container div.mb_placeholder {
90
90
  /*height: 34px;*/
91
91
 
92
92
  position: absolute;
93
- top: 8px;
94
- left: 10px;
93
+ top: 10px;
94
+ left: 9px;
95
95
  z-index: 19;
96
96
  }
97
97
 
@@ -103,7 +103,9 @@ div.mb_container form.mb_file_form div.mb_placeholder {
103
103
 
104
104
  .mb_container .mb_placeholder span {
105
105
  display: block;
106
- font-size: 16px;
106
+ font-family: "Roboto", Arial;
107
+ font-weight: 400;
108
+ font-size: 15px;
107
109
  color: #757575;
108
110
  }
109
111
 
@@ -18,7 +18,8 @@
18
18
  cursor: pointer;
19
19
  display: block;
20
20
  float: left;
21
- font-family: 'Avenir';
21
+ font-family: 'Roboto';
22
+ font-weight: 400;
22
23
  padding: 6px 12px;
23
24
  margin: 0 6px 6px 0;
24
25
  &.selected {
@@ -19,7 +19,8 @@
19
19
  height: 100%;
20
20
  background: #e1e1e1;
21
21
  border: #aaa 1px solid;
22
- font-family: BigNoodleTitling, Tahoma;
22
+ font-family: 'Roboto', Arial;
23
+ font-weight: 400;
23
24
  }
24
25
 
25
26
  #caboose_station .caboose_logo {
@@ -86,7 +87,8 @@
86
87
  white-space: nowrap;
87
88
  overflow: hidden;
88
89
  */
89
- font-family: BigNoodleTitling, Tahoma;
90
+ font-family: 'Roboto', Arial;
91
+ font-weight: 400;
90
92
  font-size: 16px;
91
93
  color: #505050;
92
94
  background: #aaa;
@@ -154,7 +156,8 @@
154
156
  white-space: nowrap;
155
157
  overflow: hidden;
156
158
  */
157
- font-family: BigNoodleTitling, Tahoma;
159
+ font-family: 'Roboto', Arial;
160
+ font-weight: 400;
158
161
  font-size: 16px;
159
162
  }
160
163
 
@@ -165,7 +168,8 @@
165
168
  height: 34px;
166
169
  background: #e1e1e1;
167
170
  vertical-align: middle;
168
- font-family: BigNoodleTitling, Tahoma;
171
+ font-family: 'Roboto', Arial;
172
+ font-weight: 400;
169
173
  font-size: 16px;
170
174
  }
171
175
  #caboose_station ul.admin li a.top_level:hover span { color: #941403; }
@@ -204,7 +208,8 @@
204
208
  background-position: 0 0;
205
209
  width: 208px;
206
210
  height: 50px;
207
- font-family: BigNoodleTitling, Tahoma;
211
+ font-family: 'Roboto', Arial;
212
+ font-weight: 400;
208
213
  text-decoration: none;
209
214
  }
210
215
 
@@ -214,7 +219,8 @@
214
219
  padding: 16px 0 0 0;
215
220
  height: 34px;
216
221
 
217
- font-family: BigNoodleTitling, Tahoma;
222
+ font-family: 'Roboto', Arial;
223
+ font-weight: 400;
218
224
  font-size: 16px;
219
225
  }
220
226
  #caboose_station_wrapper a.close span { background: #e1e1e1; color: #505050; }
@@ -6,7 +6,7 @@ module Caboose
6
6
  helper_method :logged_in?
7
7
  helper :all
8
8
 
9
- @find_page = true
9
+ @find_page = true
10
10
 
11
11
  def before_before_action
12
12
 
@@ -51,9 +51,13 @@ module Caboose
51
51
  @page = Page.page_with_uri(request.host_with_port, request.fullpath)
52
52
  @crumb_trail = Caboose::Page.crumb_trail(@page)
53
53
  #end
54
+
55
+
54
56
 
55
57
  # Sets an instance variable of the logged in user
56
58
  @logged_in_user = logged_in_user
59
+
60
+ @nav = Caboose.plugin_hook('admin_nav', [], @logged_in_user, @page, @site)
57
61
 
58
62
  # Initialize the card
59
63
  init_cart if @site && @site.use_store && !@domain.under_construction
@@ -648,6 +648,12 @@ module Caboose
648
648
  Block.where("parent_id is null and page_id = ?", params[:id]).reorder(:sort_order).all.each do |b|
649
649
  admin_block_options_helper(options, b, "")
650
650
  end
651
+ when 'parentblock'
652
+ options = []
653
+ this_block = Block.find(params[:block_id])
654
+ Block.where("parent_id is null and page_id = ?", params[:id]).reorder(:sort_order).all.each do |b|
655
+ admin_parent_block_options_helper(options, b, "", this_block)
656
+ end
651
657
  end
652
658
  render :json => options
653
659
  end
@@ -665,6 +671,15 @@ module Caboose
665
671
  admin_block_options_helper(options, b2, "#{prefix} - ")
666
672
  end
667
673
  end
674
+
675
+ def admin_parent_block_options_helper(options, b, prefix, this_block)
676
+ if b.block_type.allow_child_blocks && (b.block_type.default_child_block_type_id.blank? || b.block_type.default_child_block_type_id == this_block.block_type_id)
677
+ options << { 'value' => b.id, 'text' => "#{prefix}#{b.title}" }
678
+ end
679
+ b.children.each do |b2|
680
+ admin_parent_block_options_helper(options, b2, "#{prefix} - ", this_block)
681
+ end
682
+ end
668
683
 
669
684
  end
670
685
  end
@@ -53,6 +53,7 @@ module Caboose
53
53
  'sort' => 'created_at',
54
54
  'desc' => true,
55
55
  'base_url' => '/admin/posts',
56
+ 'items_per_page' => 50,
56
57
  'use_url_params' => false
57
58
  })
58
59
  render :json => {
@@ -18,8 +18,8 @@ end
18
18
  <!--<h2 style='margin-top: 0; padding-top: 0;'>Edit <%= @block.name ? @block.name : @block.block_type.description %></h2>-->
19
19
  <h2 style='margin-top: 0; padding-top: 0;'><%= raw crumbs.reverse.join(' > ') %></h2>
20
20
  <div id='advanced'>
21
- <p><div id='block_<%= @block.id %>_block_type_id' ></div></p>
22
- <p><div id='block_<%= @block.id %>_parent_id' ></div></p>
21
+ <!-- <p><div id='block_<%= @block.id %>_block_type_id' ></div></p> -->
22
+ <!-- <p><div id='block_<%= @block.id %>_parent_id' ></div></p> -->
23
23
  <p><div id='block_<%= @block.id %>_constrain' ></div></p>
24
24
  <p><div id='block_<%= @block.id %>_full_width' ></div></p>
25
25
  </div>
@@ -52,31 +52,34 @@ $(document).ready(function() {
52
52
  update_url: '/admin/pages/<%= b.page_id %>/blocks/<%= b.id %>',
53
53
  <% end %>
54
54
  authenticity_token: '<%= form_authenticity_token %>',
55
- attributes: [{
56
- name: 'block_type_id',
57
- nice_name: 'Block type',
58
- type: 'select',
59
- value: <%= raw Caboose.json(b.block_type_id) %>,
60
- text: <%= raw Caboose.json(b.block_type.name) %>,
61
- width: 400,
62
- fixed_placeholder: true,
63
- options_url: '/admin/block-types/options',
64
- after_update: function() { parent.controller.render_blocks(); },
65
- after_cancel: function() { parent.controller.render_blocks(); },
66
- on_load: function() { that.modal.autosize(); }
67
- },{
68
- name: 'parent_id',
69
- nice_name: 'Parent ID',
70
- type: 'select',
71
- value: <%= raw Caboose.json(b.parent_id) %>,
72
- text: <%= raw Caboose.json(b.parent ? b.parent.title : '') %>,
73
- width: 400,
74
- fixed_placeholder: true,
75
- options_url: '/admin/pages/<%= b.page_id %>/block-options',
76
- after_update: function() { parent.controller.render_blocks(); },
77
- after_cancel: function() { parent.controller.render_blocks(); },
78
- on_load: function() { that.modal.autosize(); }
79
- },{
55
+ attributes: [
56
+ // {
57
+ // name: 'block_type_id',
58
+ // nice_name: 'Block type',
59
+ // type: 'select',
60
+ // value: <%= raw Caboose.json(b.block_type_id) %>,
61
+ // text: <%= raw Caboose.json(b.block_type.name) %>,
62
+ // width: 400,
63
+ // fixed_placeholder: true,
64
+ // options_url: '/admin/block-types/options',
65
+ // after_update: function() { parent.controller.render_blocks(); },
66
+ // after_cancel: function() { parent.controller.render_blocks(); },
67
+ // on_load: function() { that.modal.autosize(); }
68
+ // },
69
+ // {
70
+ // name: 'parent_id',
71
+ // nice_name: 'Parent ID',
72
+ // type: 'select',
73
+ // value: <%= raw Caboose.json(b.parent_id) %>,
74
+ // text: <%= raw Caboose.json(b.parent ? b.parent.title : '') %>,
75
+ // width: 400,
76
+ // fixed_placeholder: true,
77
+ // options_url: '/admin/pages/<%= b.page_id %>/parentblock-options?block_id=<%= b.id %>',
78
+ // after_update: function() { parent.controller.render_blocks(); },
79
+ // after_cancel: function() { parent.controller.render_blocks(); },
80
+ // on_load: function() { that.modal.autosize(); }
81
+ // },
82
+ {
80
83
  name: 'constrain',
81
84
  nice_name: 'Constrain',
82
85
  type: 'checkbox',
@@ -6,9 +6,10 @@ p.uri {
6
6
  border: #999 1px solid;
7
7
  padding: 10px;
8
8
  position: absolute;
9
- top: 67px;
10
- left: 0;
11
- height: 16px;
9
+ top: 8px;
10
+ left: 251px;
11
+ height: 17px;
12
+ margin: 0;
12
13
  }
13
14
 
14
15
  </style>
@@ -21,13 +21,14 @@
21
21
  <style type='text/css'>
22
22
 
23
23
  p.uri {
24
- background: #efefef;
25
- border: #999 1px solid;
26
- padding: 10px;
27
- position: absolute;
28
- top: 67px;
29
- left: 0;
30
- height: 16px;
24
+ background: #efefef;
25
+ border: #999 1px solid;
26
+ padding: 10px;
27
+ position: absolute;
28
+ top: 8px;
29
+ left: 251px;
30
+ height: 17px;
31
+ margin: 0;
31
32
  }
32
33
 
33
34
  div.field_with_explanation {
@@ -22,6 +22,9 @@
22
22
  top: 10px;
23
23
  margin-right: 5px;
24
24
  }
25
+ #content2 > p {
26
+ margin: 0 0 5px 0;
27
+ }
25
28
  </style>
26
29
  <% end %>
27
30
 
@@ -1,6 +1,12 @@
1
1
  <h1>Posts</h1>
2
2
  <div id='posts'></div>
3
3
 
4
+ <% content_for :caboose_css do %>
5
+ <style>
6
+ table.data {margin-right: 30px;}
7
+ </style>
8
+ <% end %>
9
+
4
10
  <% content_for :caboose_js do %>
5
11
  <%= javascript_include_tag 'caboose/model/all' %>
6
12
  <script type='text/javascript'>
@@ -50,10 +50,32 @@ end
50
50
  <body>
51
51
  <div id='header'>
52
52
  <div id='top_nav'>
53
- <div class='caboose_logo'></div>
53
+ <a href="/admin" class='caboose_logo'></a>
54
+ <ul class="quick">
55
+ <% i = 0 %>
56
+ <% @nav.each do |item| %>
57
+ <% id = item['id'].nil? ? i.to_s : item['id'] %>
58
+ <% href = item['href'].nil? ? '#' : item['href'] %>
59
+ <% modal = item['modal'].nil? ? false : item['modal'] %>
60
+ <li id='nav_item_<%= id %>'>
61
+ <% if href != "#" %><a href='<%= href %>'<%= raw (modal ? " rel='modal'" : "") %>><% end %>
62
+ <span class='icon'></span><span class='text'><%= item['text'] %></span>
63
+ <% if href != "#" %></a><% end %>
64
+ <% if (!item['children'].nil? && item['children'].count > 0) %>
65
+ <ul>
66
+ <% item['children'].each do |item2| %>
67
+ <% modal = item2['modal'].nil? ? false : item2['modal'] %>
68
+ <li><a href='<%= item2['href'] %>'<%= raw (modal ? " rel='modal'" : "") %>><%= item2['text'] %></a></li>
69
+ <% end %>
70
+ </ul>
71
+ <% end %>
72
+ </li>
73
+ <% i + 1 %>
74
+ <% end %>
75
+ </ul>
54
76
  <ul>
55
- <li class='back' ><a href='/' class="caboose-btn"><span><< Back to Site</span></a></li>
56
- <li class='cpanel' ><a href='/station' id='caboose_station' class='caboose_modal caboose-btn'><span>Menu</span></a></li>
77
+ <li class='back' ><a href='/' target="_blank" class="caboose-btn"><span>View Site</span></a></li>
78
+ <!-- <li class='cpanel' ><a href='/station' id='caboose_station' class='caboose_modal caboose-btn'><span>Menu</span></a></li> -->
57
79
  </ul>
58
80
  </div>
59
81
  </div>
@@ -129,10 +129,10 @@ module Caboose
129
129
  'plupload/*.xap',
130
130
 
131
131
  # Fonts
132
- 'caboose/fonts/avenir-medium.eot',
133
- 'caboose/fonts/avenir-medium.ttf',
134
- 'caboose/fonts/big_noodle_titling_oblique.ttf',
135
- 'caboose/fonts/big_noodle_titling.ttf',
132
+ # 'caboose/fonts/avenir-medium.eot',
133
+ # 'caboose/fonts/avenir-medium.ttf',
134
+ # 'caboose/fonts/big_noodle_titling_oblique.ttf',
135
+ # 'caboose/fonts/big_noodle_titling.ttf',
136
136
  'caboose/icons.txt'
137
137
 
138
138
  ]
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.99'
2
+ VERSION = '0.9.100'
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.9.99
4
+ version: 0.9.100
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-20 00:00:00.000000000 Z
11
+ date: 2017-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -483,8 +483,6 @@ files:
483
483
  - MIT-LICENSE
484
484
  - README.md
485
485
  - Rakefile
486
- - app/assets/fonts/avenir-medium.eot
487
- - app/assets/fonts/avenir-medium.ttf
488
486
  - app/assets/fonts/icomoon.eot
489
487
  - app/assets/fonts/icomoon.svg
490
488
  - app/assets/fonts/icomoon.ttf