drg_cms 0.6.1.11 → 0.7.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +260 -0
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +9 -5
  5. data/app/assets/javascripts/drg_cms/drg_cms.js +95 -34
  6. data/app/assets/javascripts/drg_cms/jquery.bpopup.js +372 -0
  7. data/app/assets/javascripts/drg_cms_application.js +1 -3
  8. data/app/assets/javascripts/drg_cms_cms.js +3 -4
  9. data/app/assets/stylesheets/drg_cms/drg_cms.css +37 -5
  10. data/app/assets/stylesheets/drg_cms/jstree.css +32 -27
  11. data/app/assets/stylesheets/drg_cms/select-multiple.css +6 -4
  12. data/app/controllers/cmsedit_controller.rb +22 -24
  13. data/app/controllers/dc_application_controller.rb +10 -9
  14. data/app/controllers/dc_common_controller.rb +14 -11
  15. data/app/controllers/dc_main_controller.rb +0 -1
  16. data/app/controls/dc_gallery_control.rb +46 -0
  17. data/app/controls/dc_image_control.rb +180 -0
  18. data/app/controls/dc_page_control.rb +3 -3
  19. data/app/controls/dc_poll_result_control.rb +7 -8
  20. data/app/controls/dc_report.rb +9 -4
  21. data/app/controls/design_element_settings_control.rb +88 -37
  22. data/app/forms/all_options.yml +18 -7
  23. data/app/forms/cms_menu.yml +10 -4
  24. data/app/forms/dc_category.yml +17 -8
  25. data/app/forms/dc_category_as_tree.yml +31 -0
  26. data/app/forms/dc_gallery.yml +1 -1
  27. data/app/forms/dc_image.yml +122 -0
  28. data/app/forms/dc_image_search.yml +72 -0
  29. data/app/forms/dc_page.yml +11 -8
  30. data/app/forms/dc_steps_template.yml +2 -1
  31. data/app/forms/help/dc_category_as_tree.en +4 -0
  32. data/app/forms/help/dc_category_as_tree.sl +5 -0
  33. data/app/helpers/cms_common_helper.rb +24 -16
  34. data/app/helpers/cms_edit_helper.rb +28 -35
  35. data/app/helpers/cms_helper.rb +21 -5
  36. data/app/helpers/cms_index_helper.rb +53 -38
  37. data/app/helpers/dc_application_helper.rb +95 -121
  38. data/app/helpers/dc_category_helper.rb +129 -0
  39. data/app/helpers/dc_image_helper.rb +127 -0
  40. data/app/models/concerns/dc_policy_rule_concern.rb +1 -1
  41. data/app/models/concerns/dc_user_concern.rb +12 -4
  42. data/app/models/dc_category.rb +62 -24
  43. data/app/models/dc_design.rb +5 -4
  44. data/app/models/dc_filter.rb +19 -18
  45. data/app/models/dc_image.rb +237 -0
  46. data/app/models/dc_internals.rb +5 -9
  47. data/app/models/dc_policy_role.rb +8 -8
  48. data/app/models/drgcms_form_fields/date_picker.rb +10 -12
  49. data/app/models/drgcms_form_fields/datetime_picker.rb +10 -11
  50. data/app/models/drgcms_form_fields/drgcms_field.rb +55 -30
  51. data/app/models/drgcms_form_fields/embedded.rb +11 -8
  52. data/app/models/drgcms_form_fields/journal_diff.rb +2 -2
  53. data/app/models/drgcms_form_fields/multitext_autocomplete.rb +51 -47
  54. data/app/models/drgcms_form_fields/select.rb +20 -14
  55. data/app/models/drgcms_form_fields/text_with_select.rb +5 -9
  56. data/app/models/drgcms_form_fields/tree_select.rb +20 -19
  57. data/app/renderers/dc_gallery_renderer.rb +10 -4
  58. data/app/renderers/dc_page_renderer.rb +7 -7
  59. data/app/renderers/dc_poll_renderer.rb +13 -12
  60. data/app/views/cmsedit/_edit_stuff.html.erb +1 -1
  61. data/app/views/cmsedit/edit.html.erb +1 -1
  62. data/app/views/cmsedit/index.html.erb +1 -1
  63. data/app/views/cmsedit/new.html.erb +1 -0
  64. data/app/views/layouts/content.html.erb +1 -1
  65. data/config/locales/drgcms_en.yml +16 -2
  66. data/config/locales/drgcms_sl.yml +15 -2
  67. data/config/locales/models_en.yml +33 -0
  68. data/config/locales/models_sl.yml +44 -1
  69. data/drg_cms.gemspec +3 -3
  70. data/lib/drg_cms/version.rb +1 -1
  71. data/lib/drg_cms.rb +19 -5
  72. data/lib/generators/convert_to_ar/USAGE +8 -0
  73. data/lib/generators/convert_to_ar/convert_to_ar_generator.rb +158 -0
  74. data/lib/tasks/dc_cleanup.rake +20 -42
  75. metadata +25 -14
  76. data/History.log +0 -109
  77. data/app/assets/javascripts/drg_cms/jquery.bpopup.min.js +0 -7
  78. data/app/views/layouts/__cmsedit.html.erb +0 -16
@@ -0,0 +1,372 @@
1
+ /*===================================================================================================================
2
+ * @name: bPopupy
3
+ * @type: jQuery
4
+ * @author: (c) Bjoern Klinggaard - @bklinggaard
5
+ * @demo: http://dinbror.dk/bpopup
6
+ * @version: 0.11.0
7
+ * @requires jQuery 1.4.3
8
+ *==================================================================================================================*/
9
+ ;(function($) {
10
+ 'use strict';
11
+
12
+ $.fn.bPopup = function(options, callback) {
13
+
14
+ if ($.isFunction(options)) {
15
+ callback = options;
16
+ options = null;
17
+ }
18
+
19
+ // OPTIONS
20
+ var o = $.extend({}, $.fn.bPopup.defaults, options);
21
+
22
+ // HIDE SCROLLBAR?
23
+ if (!o.scrollBar)
24
+ $('html').css('overflow', 'hidden');
25
+
26
+ // VARIABLES
27
+ var $popup = this
28
+ , d = $(document)
29
+ , w = window
30
+ , $w = $(w)
31
+ , wH = windowHeight()
32
+ , wW = windowWidth()
33
+ , prefix = '__b-popup'
34
+ , isIOS6X = (/OS 6(_\d)+/i).test(navigator.userAgent) // Used for a temporary fix for ios6 timer bug when using zoom/scroll
35
+ , buffer = 200
36
+ , popups = 0
37
+ , id
38
+ , inside
39
+ , fixedVPos
40
+ , fixedHPos
41
+ , fixedPosStyle
42
+ , vPos
43
+ , hPos
44
+ , height
45
+ , width
46
+ , debounce
47
+ , autoCloseTO
48
+ ;
49
+
50
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
51
+ // PUBLIC FUNCTION - call it: $(element).bPopup().close();
52
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
53
+ $popup.close = function() {
54
+ close();
55
+ };
56
+
57
+ $popup.reposition = function(animateSpeed) {
58
+ reposition(animateSpeed);
59
+ };
60
+
61
+ return $popup.each(function() {
62
+ if ($(this).data('bPopup')) return; //POPUP already exists?
63
+ init();
64
+ });
65
+
66
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
67
+ // HELPER FUNCTIONS - PRIVATE
68
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
69
+ function init() {
70
+ triggerCall(o.onOpen);
71
+ popups = ($w.data('bPopup') || 0) + 1, id = prefix + popups + '__',fixedVPos = o.position[1] !== 'auto', fixedHPos = o.position[0] !== 'auto', fixedPosStyle = o.positionStyle === 'fixed', height = $popup.outerHeight(true), width = $popup.outerWidth(true);
72
+ o.loadUrl ? createContent() : open();
73
+ };
74
+
75
+ function createContent() {
76
+ o.contentContainer = $(o.contentContainer || $popup);
77
+ switch (o.content) {
78
+ case ('iframe'):
79
+ var iframe = $('<iframe class="b-iframe" ' + o.iframeAttr +'></iframe>');
80
+ iframe.appendTo(o.contentContainer);
81
+ height = $popup.outerHeight(true);
82
+ width = $popup.outerWidth(true);
83
+ open();
84
+ iframe.attr('src', o.loadUrl); // setting iframe src after open due IE9 bug
85
+ triggerCall(o.loadCallback);
86
+ break;
87
+ case ('image'):
88
+ open();
89
+ $('<img />')
90
+ .on('load',function() {
91
+ triggerCall(o.loadCallback);
92
+ recenter($(this));
93
+ }).attr('src', o.loadUrl).hide().appendTo(o.contentContainer);
94
+ break;
95
+ default:
96
+ open();
97
+ $('<div class="b-ajax-wrapper"></div>')
98
+ .load(o.loadUrl, o.loadData, function(response, status, xhr) {
99
+ triggerCall(o.loadCallback, status);
100
+ recenter($(this));
101
+ }).hide().appendTo(o.contentContainer);
102
+ break;
103
+ }
104
+ };
105
+
106
+ function open(){
107
+ // MODAL OVERLAY
108
+ if (o.modal) {
109
+ $('<div class="b-modal '+id+'"></div>')
110
+ .css({backgroundColor: o.modalColor, position: 'fixed', top: 0, right:0, bottom:0, left: 0, opacity: 0, zIndex: o.zIndex + popups})
111
+ .appendTo(o.appendTo)
112
+ .fadeTo(o.speed, o.opacity);
113
+ }
114
+
115
+ // POPUP
116
+ calcPosition();
117
+ $popup
118
+ .data('bPopup', o).data('id',id)
119
+ .css({
120
+ 'left': o.transition == 'slideIn' || o.transition == 'slideBack' ? (o.transition == 'slideBack' ? d.scrollLeft() + wW : (hPos + width) *-1) : getLeftPos(!(!o.follow[0] && fixedHPos || fixedPosStyle))
121
+ , 'position': o.positionStyle || 'absolute'
122
+ , 'top': o.transition == 'slideDown' || o.transition == 'slideUp' ? (o.transition == 'slideUp' ? d.scrollTop() + wH : vPos + height * -1) : getTopPos(!(!o.follow[1] && fixedVPos || fixedPosStyle))
123
+ , 'z-index': o.zIndex + popups + 1
124
+ }).each(function() {
125
+ if(o.appending) {
126
+ $(this).appendTo(o.appendTo);
127
+ }
128
+ });
129
+ doTransition(true);
130
+ };
131
+
132
+ function close() {
133
+ if (o.modal) {
134
+ $('.b-modal.'+$popup.data('id'))
135
+ .fadeTo(o.speed, 0, function() {
136
+ $(this).remove();
137
+ });
138
+ }
139
+ // Clean up
140
+ unbindEvents();
141
+ clearTimeout(autoCloseTO);
142
+ // Close trasition
143
+ doTransition();
144
+
145
+ return false; // Prevent default
146
+ };
147
+
148
+ function reposition(animateSpeed){
149
+ wH = windowHeight();
150
+ wW = windowWidth();
151
+ inside = insideWindow();
152
+ if(inside.x || inside.y){
153
+ clearTimeout(debounce);
154
+ debounce = setTimeout(function(){
155
+ calcPosition();
156
+ animateSpeed = animateSpeed || o.followSpeed;
157
+ var css = {};
158
+ if(inside.x)
159
+ css.left = o.follow[0] ? getLeftPos(true) : 'auto';
160
+ if(inside.y)
161
+ css.top = o.follow[1] ? getTopPos(true) : 'auto';
162
+ $popup
163
+ .dequeue()
164
+ .each(function() {
165
+ if(fixedPosStyle) {
166
+ $(this).css({ 'left': hPos, 'top': vPos });
167
+ }
168
+ else {
169
+ $(this).animate(css, animateSpeed, o.followEasing);
170
+ }
171
+ });
172
+ }, 50);
173
+ }
174
+ };
175
+
176
+ //Eksperimental
177
+ function recenter(content){
178
+ var _width = content.width(), _height = content.height(), css = {};
179
+ o.contentContainer.css({height:_height,width:_width});
180
+
181
+ if (_height >= $popup.height()){
182
+ css.height = $popup.height();
183
+ }
184
+ if(_width >= $popup.width()){
185
+ css.width = $popup.width();
186
+ }
187
+ height = $popup.outerHeight(true)
188
+ , width = $popup.outerWidth(true);
189
+
190
+ calcPosition();
191
+ o.contentContainer.css({height:'auto',width:'auto'});
192
+
193
+ css.left = getLeftPos(!(!o.follow[0] && fixedHPos || fixedPosStyle)),
194
+ css.top = getTopPos(!(!o.follow[1] && fixedVPos || fixedPosStyle));
195
+
196
+ $popup
197
+ .animate(
198
+ css
199
+ , 250
200
+ , function() {
201
+ content.show();
202
+ inside = insideWindow();
203
+ }
204
+ );
205
+ };
206
+
207
+ function bindEvents() {
208
+ $w.data('bPopup', popups);
209
+ $popup.delegate('.bClose, .' + o.closeClass, 'click.'+id, close); // legacy, still supporting the close class bClose
210
+
211
+ if (o.modalClose) {
212
+ $('.b-modal.'+id).css('cursor', 'pointer').bind('click', close);
213
+ }
214
+
215
+ // Temporary disabling scroll/resize events on devices with IOS6+
216
+ // due to a bug where events are dropped after pinch to zoom
217
+ if (!isIOS6X && (o.follow[0] || o.follow[1])) {
218
+ $w.bind('scroll.'+id, function() {
219
+ if(inside.x || inside.y){
220
+ var css = {};
221
+ if(inside.x)
222
+ css.left = o.follow[0] ? getLeftPos(!fixedPosStyle) : 'auto';
223
+ if(inside.y)
224
+ css.top = o.follow[1] ? getTopPos(!fixedPosStyle) : 'auto';
225
+ $popup
226
+ .dequeue()
227
+ .animate(css, o.followSpeed, o.followEasing);
228
+ }
229
+ }).bind('resize.'+id, function() {
230
+ reposition();
231
+ });
232
+ }
233
+ if (o.escClose) {
234
+ d.bind('keydown.'+id, function(e) {
235
+ if (e.which == 27) { //escape
236
+ close();
237
+ }
238
+ });
239
+ }
240
+ };
241
+
242
+ function unbindEvents() {
243
+ if (!o.scrollBar) {
244
+ $('html').css('overflow', 'auto');
245
+ }
246
+ $('.b-modal.'+id).unbind('click');
247
+ d.unbind('keydown.'+id);
248
+ $w.unbind('.'+id).data('bPopup', ($w.data('bPopup')-1 > 0) ? $w.data('bPopup')-1 : null);
249
+ $popup.undelegate('.bClose, .' + o.closeClass, 'click.'+id, close).data('bPopup', null);
250
+ };
251
+
252
+ function doTransition(open) {
253
+ switch (open ? o.transition : o.transitionClose || o.transition) {
254
+ case "slideIn":
255
+ animate({
256
+ left: open ? getLeftPos(!(!o.follow[0] && fixedHPos || fixedPosStyle)) : d.scrollLeft() - (width || $popup.outerWidth(true)) - buffer
257
+ });
258
+ break;
259
+ case "slideBack":
260
+ animate({
261
+ left: open ? getLeftPos(!(!o.follow[0] && fixedHPos || fixedPosStyle)) : d.scrollLeft() + wW + buffer
262
+ });
263
+ break;
264
+ case "slideDown":
265
+ animate({
266
+ top: open ? getTopPos(!(!o.follow[1] && fixedVPos || fixedPosStyle)) : d.scrollTop() - (height || $popup.outerHeight(true)) - buffer
267
+ });
268
+ break;
269
+ case "slideUp":
270
+ animate({
271
+ top: open ? getTopPos(!(!o.follow[1] && fixedVPos || fixedPosStyle)) : d.scrollTop() + wH + buffer
272
+ });
273
+ break;
274
+ default:
275
+ //Hardtyping 1 and 0 to ensure opacity 1 and not 0.9999998
276
+ $popup.stop().fadeTo(o.speed, open ? 1 : 0, function(){onCompleteCallback(open);});
277
+ }
278
+
279
+ function animate(css){
280
+ $popup
281
+ .css({display: 'block',opacity: 1})
282
+ .animate(css, o.speed, o.easing, function(){ onCompleteCallback(open); });
283
+ };
284
+ };
285
+
286
+
287
+ function onCompleteCallback(open){
288
+ if(open){
289
+ bindEvents();
290
+ triggerCall(callback);
291
+ if(o.autoClose){
292
+ autoCloseTO = setTimeout(close, o.autoClose);
293
+ }
294
+ } else {
295
+ $popup.hide();
296
+ triggerCall(o.onClose);
297
+ if (o.loadUrl) {
298
+ o.contentContainer.empty();
299
+ $popup.css({height: 'auto', width: 'auto'});
300
+ }
301
+ }
302
+ };
303
+
304
+ function getLeftPos(includeScroll){
305
+ return includeScroll ? hPos + d.scrollLeft() : hPos;
306
+ };
307
+
308
+ function getTopPos(includeScroll){
309
+ return includeScroll ? vPos + d.scrollTop() : vPos;
310
+ };
311
+
312
+ function triggerCall(func, arg) {
313
+ $.isFunction(func) && func.call($popup, arg);
314
+ };
315
+
316
+ function calcPosition(){
317
+ vPos = fixedVPos ? o.position[1] : Math.max(0, ((wH- $popup.outerHeight(true)) / 2) - o.amsl)
318
+ , hPos = fixedHPos ? o.position[0] : (wW - $popup.outerWidth(true)) / 2
319
+ , inside = insideWindow();
320
+ };
321
+
322
+ function insideWindow(){
323
+ return {
324
+ x: wW > $popup.outerWidth(true),
325
+ y: wH > $popup.outerHeight(true)
326
+ }
327
+ };
328
+
329
+ function windowHeight(){
330
+ return $w.height();
331
+ };
332
+
333
+ function windowWidth(){
334
+ return $w.width();
335
+ };
336
+ };
337
+
338
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
339
+ // DEFAULT VALUES
340
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
341
+ $.fn.bPopup.defaults = {
342
+ amsl: 50
343
+ , appending: true
344
+ , appendTo: 'body'
345
+ , autoClose: false
346
+ , closeClass: 'b-close'
347
+ , content: 'ajax' // ajax, iframe or image
348
+ , contentContainer: false
349
+ , easing: 'swing'
350
+ , escClose: true
351
+ , follow: [true, true] // x, y
352
+ , followEasing: 'swing'
353
+ , followSpeed: 500
354
+ , iframeAttr: 'scrolling="no" frameborder="0"'
355
+ , loadCallback: false
356
+ , loadData: false
357
+ , loadUrl: false
358
+ , modal: true
359
+ , modalClose: true
360
+ , modalColor: '#000'
361
+ , onClose: false
362
+ , onOpen: false
363
+ , opacity: 0.7
364
+ , position: ['auto', 'auto'] // x, y,
365
+ , positionStyle: 'absolute'// absolute or fixed
366
+ , scrollBar: true
367
+ , speed: 250 // open & close speed
368
+ , transition: 'fadeIn' //transitions: fadeIn, slideDown, slideIn, slideBack
369
+ , transitionClose: false
370
+ , zIndex: 9997 // popup gets z-index 9999, modal overlay 9998
371
+ };
372
+ })(jQuery);
@@ -5,8 +5,6 @@
5
5
  // the compiled file.
6
6
  //
7
7
  //= require jquery3
8
- //= require drg_cms/jquery-migrate
9
8
  //= require jquery_ujs
10
9
  //= require drg_cms/drg_cms
11
- //= require drg_cms/jquery.bpopup.min
12
- //= #require_tree .
10
+ //= require drg_cms/jquery.bpopup
@@ -4,9 +4,8 @@
4
4
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
5
  // the compiled file.
6
6
 
7
- //= #require_self
8
- //= require jquery2
9
- //= require drg_cms/jquery-migrate.js
7
+ //= require_self
8
+ //= require jquery3
10
9
  //= require jquery_ujs
11
10
 
12
11
  //= require jquery-ui/widgets/tooltip
@@ -18,7 +17,7 @@
18
17
  //= require drg_cms/drg_cms
19
18
  //= require drg_cms/jquery.datetimepicker
20
19
 
21
- //= require drg_cms/jquery.bpopup.min
20
+ //= require drg_cms/jquery.bpopup
22
21
  //= require drg_cms/select-multiple
23
22
  //= require drg_cms/jstree.min
24
23
 
@@ -212,6 +212,13 @@ img { vertical-align:bottom; }
212
212
  .dc-image-preview img { max-height: 2rem; padding-left: 0.5rem;}
213
213
  .dc-image-preview img:hover { cursor: zoom-in;}
214
214
 
215
+ #dc-image-preview {
216
+ padding: 2px;
217
+ background-color: #fff;
218
+ filter: drop-shadow(0 0 1rem #000);
219
+ display: none;
220
+ }
221
+
215
222
  .text-with-select { width: 20px; }
216
223
 
217
224
  .no-borders {
@@ -396,7 +403,7 @@ border-radius: 1px;
396
403
  .dc-result-data.footer {
397
404
  border-top: 2px solid #222;
398
405
  color: #000;
399
- font-weight: bold;
406
+ font-weight: 600;
400
407
  background-color: #eee;
401
408
  }
402
409
 
@@ -548,6 +555,12 @@ display: inline-table;
548
555
  background-color: #444;
549
556
  }
550
557
 
558
+ .dc-inline-link.dc-link-ajax {
559
+ padding: initial;
560
+ border: none;
561
+ background: initial;
562
+ }
563
+
551
564
  .skip-next {
552
565
  text-align: center;
553
566
  border:1px solid #888;
@@ -721,7 +734,6 @@ display: inline-table;
721
734
  }
722
735
 
723
736
  .dc-form-label.dc-color-odd, .dc-form-label.dc-color-even {background-color: transparent;}
724
- .dc-form-field.dc-color-odd, .dc-form-field.dc-color-even {background-color: transparent;}
725
737
 
726
738
  .dc-align-left {
727
739
  text-align: left;
@@ -734,6 +746,8 @@ display: inline-table;
734
746
  text-align: left;
735
747
  padding: 4px 2px;
736
748
  z-index: 10;
749
+ white-space: nowrap;
750
+ text-overflow: fade;
737
751
  }
738
752
 
739
753
  .dc-form-field .action li {
@@ -878,6 +892,10 @@ display: flex;
878
892
  color: rgba(44, 142, 255, 1);
879
893
  }
880
894
 
895
+ .dc-popup-open:hover {
896
+ color: rgba(44, 142, 255, 1);
897
+ }
898
+
881
899
  /*** CMS toggle button */
882
900
  .cms-toggle {
883
901
  z-index: 1000000;
@@ -1166,16 +1184,18 @@ color: #000;
1166
1184
  border-radius: 2px;
1167
1185
  z-index: 100;
1168
1186
  list-style-type: none;
1169
- filter: drop-shadow(1px 1px 4px #eee);
1187
+ filter: drop-shadow(1px 1px 6px #ccc);
1170
1188
  }
1171
1189
 
1172
1190
  .drgcms_popmenu_class i {
1173
1191
  vertical-align: sub;
1174
1192
  color: rgba(44, 142, 255, 1);
1193
+ font-size: 22px;
1175
1194
  }
1176
1195
 
1177
1196
  .drgcms_popmenu_item {
1178
1197
  padding: 4px;
1198
+ font-size: 1.1em;
1179
1199
  }
1180
1200
 
1181
1201
  .drgcms_popmenu_item:hover {
@@ -1193,7 +1213,7 @@ color: #000;
1193
1213
  }
1194
1214
 
1195
1215
  #iframe_edit, #iframe_cms {
1196
- height: 1px;
1216
+ /* height: 1px;*/
1197
1217
  width: 100%;
1198
1218
  border: 0;
1199
1219
  margin-bottom: 0;
@@ -1576,13 +1596,25 @@ cursor: pointer;
1576
1596
  margin: 6px 4px 0 0;
1577
1597
  }
1578
1598
 
1599
+ .dc-image-preview-1 {
1600
+ right: 1rem;
1601
+ position: absolute;
1602
+ top: 5rem;
1603
+ max-height: 150px;
1604
+ max-width: 200px;
1605
+ }
1606
+
1607
+ #dc_image .dc-image-preview img {
1608
+ max-height: 150px;
1609
+ max-width: 200px;
1610
+ }
1611
+
1579
1612
  /****** MOBILE DEVICE *****/
1580
1613
  @media only screen and (max-device-width: 600px) {
1581
1614
  #body-cms {font-size: 11px;}
1582
1615
  #site-top div:nth-of-type(2) {padding-top: 0 !important;}
1583
1616
  .dc-title { font-size: 1.5em;}
1584
1617
 
1585
-
1586
1618
  .dc-form {
1587
1619
  border: none;
1588
1620
  border-top: 2px solid #888;
@@ -117,11 +117,9 @@
117
117
  .vakata-context,
118
118
  .vakata-context ul {
119
119
  margin: 0;
120
- padding: 2px;
121
120
  position: absolute;
122
- background: #f5f5f5;
123
- border: 1px solid #979797;
124
- box-shadow: 2px 2px 2px #999999;
121
+ background: #fff;
122
+ filter: drop-shadow(1px 1px 6px #ddd);
125
123
  }
126
124
  .vakata-context ul {
127
125
  list-style: none;
@@ -140,19 +138,20 @@
140
138
  }
141
139
  .vakata-context li > a {
142
140
  display: block;
143
- padding: 0 2em 0 2em;
141
+ padding: 4px;
144
142
  text-decoration: none;
145
143
  width: auto;
146
144
  color: black;
147
145
  white-space: nowrap;
148
- line-height: 2.4em;
149
- text-shadow: 1px 1px 0 white;
150
146
  border-radius: 1px;
151
147
  }
152
148
  .vakata-context li > a:hover {
153
149
  position: relative;
154
- background-color: #e8eff7;
155
- box-shadow: 0 0 2px #0a6aa1;
150
+ background-color: rgba(44, 142, 255, 1);
151
+ color: #fff;
152
+ }
153
+ .vakata-context li > a:hover > i {
154
+ color: #fff;
156
155
  }
157
156
  .vakata-context li > a.vakata-context-parent {
158
157
  background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");
@@ -164,8 +163,6 @@
164
163
  }
165
164
  .vakata-context .vakata-context-hover > a {
166
165
  position: relative;
167
- background-color: #e8eff7;
168
- box-shadow: 0 0 2px #0a6aa1;
169
166
  }
170
167
  .vakata-context .vakata-context-separator > a,
171
168
  .vakata-context .vakata-context-separator > a:hover {
@@ -177,7 +174,6 @@
177
174
  max-height: 1px;
178
175
  padding: 0;
179
176
  margin: 0 0 0 2.4em;
180
- border-left: 1px solid #e0e0e0;
181
177
  text-shadow: 0 0 0 transparent;
182
178
  box-shadow: 0 0 0 transparent;
183
179
  border-radius: 0;
@@ -195,25 +191,15 @@
195
191
  .vakata-context li > a > i {
196
192
  text-decoration: none;
197
193
  display: inline-block;
198
- width: 2.4em;
199
- height: 2.4em;
200
194
  background: transparent;
201
- margin: 0 0 0 -2em;
202
- vertical-align: top;
195
+ vertical-align: bottom;
203
196
  text-align: center;
204
- line-height: 2.4em;
197
+ color: rgba(44, 142, 255, 1);
205
198
  }
206
199
  .vakata-context li > a > i:empty {
207
- width: 2.4em;
208
- line-height: 2.4em;
209
200
  }
210
201
  .vakata-context li > a .vakata-contextmenu-sep {
211
202
  display: inline-block;
212
- width: 1px;
213
- height: 2.4em;
214
- background: white;
215
- margin: 0 0.5em 0 0;
216
- border-left: 1px solid #e2e3e3;
217
203
  }
218
204
  .vakata-context .vakata-contextmenu-shortcut {
219
205
  font-size: 0.8em;
@@ -233,9 +219,7 @@
233
219
  background-repeat: no-repeat;
234
220
  }
235
221
  .vakata-context-rtl .vakata-context-separator > a {
236
- margin: 0 2.4em 0 0;
237
222
  border-left: 0;
238
- border-right: 1px solid #e2e3e3;
239
223
  }
240
224
  .vakata-context-rtl .vakata-context-left ul {
241
225
  right: auto;
@@ -954,7 +938,8 @@
954
938
  margin-top: -10px;
955
939
  }
956
940
  }
957
- @media (max-width: 768px) {
941
+
942
+ @media (max-width: 600px) {
958
943
  .jstree-default-responsive {
959
944
  /*
960
945
  .jstree-open > .jstree-ocl,
@@ -1099,4 +1084,24 @@
1099
1084
  margin-left: 0;
1100
1085
  margin-right: 0;
1101
1086
  }
1087
+ }
1088
+
1089
+ /* edit categorise as tree */
1090
+ #catagories-as-tree {
1091
+ margin: 8px 4px;
1092
+ border-top: 2px solid #bbb;
1093
+ padding: 8px;
1094
+ background-color: #f8f8f8;
1095
+ }
1096
+
1097
+ #catagories-as-tree .jstree-anchor {
1098
+ padding: 2px 4px;
1099
+ font-weight: 400;
1100
+ }
1101
+
1102
+ #catagories-as-tree .mi-o {
1103
+ font-size: 22px;
1104
+ color: #666;
1105
+ padding-right: 4px;
1106
+ vertical-align: top;
1102
1107
  }
@@ -1,5 +1,6 @@
1
1
  .ms-container{
2
- max-width: 200px;
2
+ width: fit-content;
3
+ max-width: 600px;
3
4
  }
4
5
 
5
6
  .ms-container:after{
@@ -33,7 +34,7 @@
33
34
  -moz-border-radius: 1px;
34
35
  border-radius: 1px;
35
36
  position: relative;
36
- height: 200px;
37
+ max-height: 200px;
37
38
  padding: 0;
38
39
  overflow-y: auto;
39
40
  }
@@ -62,9 +63,9 @@
62
63
  }
63
64
 
64
65
  .ms-container .ms-selectable li.ms-elem-selectable{
65
- padding: 2px 10px;
66
+ padding: 3px 10px;
66
67
  color: #444;
67
- font-size: 14px;
68
+ /* font-size: 14px;*/
68
69
  }
69
70
 
70
71
  .ms-container .ms-selectable li:nth-child(odd) {
@@ -96,4 +97,5 @@
96
97
  .pull-right.ms-elem-selected{
97
98
  float: right;
98
99
  font-size: smaller;
100
+ padding-left: 4px;
99
101
  }