redde 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,39 @@
1
1
  /*
2
2
  * jQuery UI Nested Sortable
3
- * v 1.3.4 / 28 apr 2011f
4
- * http://mjsarfatti.com/sandbox/nestedSortable
3
+ * v 1.3.5 / 21 jun 2012
4
+ * http://mjsarfatti.com/code/nestedSortable
5
5
  *
6
- * Depends:
6
+ * Depends on:
7
7
  * jquery.ui.sortable.js 1.8+
8
8
  *
9
- * License CC BY-SA 3.0
10
- * Copyright 2010-2011, Manuele J Sarfatti
9
+ * Copyright (c) 2010-2012 Manuele J Sarfatti
10
+ * Licensed under the MIT License
11
+ * http://www.opensource.org/licenses/mit-license.php
11
12
  */
12
13
 
13
14
  (function($) {
14
15
 
15
- $.widget("ui.nestedSortable", $.extend({}, $.ui.sortable.prototype, {
16
+ $.widget("mjs.nestedSortable", $.extend({}, $.ui.sortable.prototype, {
16
17
 
17
18
  options: {
18
19
  tabSize: 20,
19
- disableNesting: 'ui-nestedSortable-no-nesting',
20
- errorClass: 'ui-nestedSortable-error',
20
+ disableNesting: 'mjs-nestedSortable-no-nesting',
21
+ errorClass: 'mjs-nestedSortable-error',
22
+ doNotClear: false,
21
23
  listType: 'ol',
22
- maxLevels: 0
24
+ maxLevels: 0,
25
+ protectRoot: false,
26
+ rootID: null,
27
+ rtl: false,
28
+ isAllowed: function(item, parent) { return true; }
23
29
  },
24
30
 
25
31
  _create: function() {
26
32
  this.element.data('sortable', this.element.data('nestedSortable'));
33
+
34
+ if (!this.element.is(this.options.listType))
35
+ throw new Error('nestedSortable: Please check the listType option is set to your actual list type');
36
+
27
37
  return $.ui.sortable.prototype._create.apply(this, arguments);
28
38
  },
29
39
 
@@ -44,9 +54,11 @@
44
54
  this.lastPositionAbs = this.positionAbs;
45
55
  }
46
56
 
57
+ var o = this.options;
58
+
47
59
  //Do scrolling
48
60
  if(this.options.scroll) {
49
- var o = this.options, scrolled = false;
61
+ var scrolled = false;
50
62
  if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
51
63
 
52
64
  if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
@@ -80,6 +92,9 @@
80
92
  //Regenerate the absolute position used for position checks
81
93
  this.positionAbs = this._convertPositionTo("absolute");
82
94
 
95
+ // Find the top offset before rearrangement,
96
+ var previousTopOffset = this.placeholder.offset().top;
97
+
83
98
  //Set the helper position
84
99
  if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
85
100
  if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
@@ -117,16 +132,17 @@
117
132
  }
118
133
  }
119
134
 
120
- var parentItem = (this.placeholder[0].parentNode.parentNode
121
- && $(this.placeholder[0].parentNode.parentNode).closest('.ui-sortable').length)
122
- ? $(this.placeholder[0].parentNode.parentNode)
123
- : null,
135
+ var parentItem = (this.placeholder[0].parentNode.parentNode &&
136
+ $(this.placeholder[0].parentNode.parentNode).closest('.ui-sortable').length)
137
+ ? $(this.placeholder[0].parentNode.parentNode)
138
+ : null,
124
139
  level = this._getLevel(this.placeholder),
125
- childLevels = this._getChildLevels(this.helper),
126
- previousItem = this.placeholder[0].previousSibling ? $(this.placeholder[0].previousSibling) : null;
140
+ childLevels = this._getChildLevels(this.helper);
127
141
 
142
+ // To find the previous sibling in the list, keep backtracking until we hit a valid list item.
143
+ var previousItem = this.placeholder[0].previousSibling ? $(this.placeholder[0].previousSibling) : null;
128
144
  if (previousItem != null) {
129
- while (previousItem[0].nodeName.toLowerCase() != 'li' || previousItem[0] == this.currentItem[0]) {
145
+ while (previousItem[0].nodeName.toLowerCase() != 'li' || previousItem[0] == this.currentItem[0] || previousItem[0] == this.helper[0]) {
130
146
  if (previousItem[0].previousSibling) {
131
147
  previousItem = $(previousItem[0].previousSibling);
132
148
  } else {
@@ -136,27 +152,51 @@
136
152
  }
137
153
  }
138
154
 
139
- newList = document.createElement(o.listType);
155
+ // To find the next sibling in the list, keep stepping forward until we hit a valid list item.
156
+ var nextItem = this.placeholder[0].nextSibling ? $(this.placeholder[0].nextSibling) : null;
157
+ if (nextItem != null) {
158
+ while (nextItem[0].nodeName.toLowerCase() != 'li' || nextItem[0] == this.currentItem[0] || nextItem[0] == this.helper[0]) {
159
+ if (nextItem[0].nextSibling) {
160
+ nextItem = $(nextItem[0].nextSibling);
161
+ } else {
162
+ nextItem = null;
163
+ break;
164
+ }
165
+ }
166
+ }
167
+
168
+ var newList = document.createElement(o.listType);
140
169
 
141
170
  this.beyondMaxLevels = 0;
142
-
143
- // If the item is moved to the left, send it to its parent level
144
- if (parentItem != null && this.positionAbs.left < parentItem.offset().left) {
171
+
172
+ // If the item is moved to the left, send it to its parent's level unless there are siblings below it.
173
+ if (parentItem != null && nextItem == null &&
174
+ (o.rtl && (this.positionAbs.left + this.helper.outerWidth() > parentItem.offset().left + parentItem.outerWidth()) ||
175
+ !o.rtl && (this.positionAbs.left < parentItem.offset().left))) {
145
176
  parentItem.after(this.placeholder[0]);
146
177
  this._clearEmpty(parentItem[0]);
147
178
  this._trigger("change", event, this._uiHash());
148
179
  }
149
- // If the item is below another one and is moved to the right, make it a children of it
150
- else if (previousItem != null && this.positionAbs.left > previousItem.offset().left + o.tabSize) {
151
- this._isAllowed(previousItem, level+childLevels+1);
180
+ // If the item is below a sibling and is moved to the right, make it a child of that sibling.
181
+ else if (previousItem != null &&
182
+ (o.rtl && (this.positionAbs.left + this.helper.outerWidth() < previousItem.offset().left + previousItem.outerWidth() - o.tabSize) ||
183
+ !o.rtl && (this.positionAbs.left > previousItem.offset().left + o.tabSize))) {
184
+ this._isAllowed(previousItem, level, level+childLevels+1);
152
185
  if (!previousItem.children(o.listType).length) {
153
186
  previousItem[0].appendChild(newList);
154
187
  }
155
- previousItem.children(o.listType)[0].appendChild(this.placeholder[0]);
188
+ // If this item is being moved from the top, add it to the top of the list.
189
+ if (previousTopOffset && (previousTopOffset <= previousItem.offset().top)) {
190
+ previousItem.children(o.listType).prepend(this.placeholder);
191
+ }
192
+ // Otherwise, add it to the bottom of the list.
193
+ else {
194
+ previousItem.children(o.listType)[0].appendChild(this.placeholder[0]);
195
+ }
156
196
  this._trigger("change", event, this._uiHash());
157
197
  }
158
198
  else {
159
- this._isAllowed(parentItem, level+childLevels);
199
+ this._isAllowed(parentItem, level, level+childLevels);
160
200
  }
161
201
 
162
202
  //Post events to containers
@@ -180,24 +220,14 @@
180
220
 
181
221
  this.placeholder.removeClass(this.options.errorClass);
182
222
 
183
- if (this.options.revertOnError) {
184
- if (this.domPosition.prev) {
185
- $(this.domPosition.prev).after(this.placeholder);
186
- } else {
187
- $(this.domPosition.parent).prepend(this.placeholder);
188
- }
189
- this._trigger("revert", event, this._uiHash());
223
+ if (this.domPosition.prev) {
224
+ $(this.domPosition.prev).after(this.placeholder);
190
225
  } else {
191
- var parent = this.placeholder.parent().closest(this.options.items);
192
-
193
- for (var i = this.beyondMaxLevels - 1; i > 0; i--) {
194
- parent = parent.parent().closest(this.options.items);
195
- }
196
-
197
- parent.after(this.placeholder);
198
- this._trigger("change", event, this._uiHash());
226
+ $(this.domPosition.parent).prepend(this.placeholder);
199
227
  }
200
228
 
229
+ this._trigger("revert", event, this._uiHash());
230
+
201
231
  }
202
232
 
203
233
  // Clean last empty ul/ol
@@ -210,23 +240,24 @@
210
240
 
211
241
  },
212
242
 
213
- serialize: function(o) {
243
+ serialize: function(options) {
214
244
 
215
- var items = this._getItemsAsjQuery(o && o.connected),
216
- str = []; o = o || {};
245
+ var o = $.extend({}, this.options, options),
246
+ items = this._getItemsAsjQuery(o && o.connected),
247
+ str = [];
217
248
 
218
249
  $(items).each(function() {
219
250
  var res = ($(o.item || this).attr(o.attribute || 'id') || '')
220
251
  .match(o.expression || (/(.+)[-=_](.+)/)),
221
252
  pid = ($(o.item || this).parent(o.listType)
222
- .parent('li')
253
+ .parent(o.items)
223
254
  .attr(o.attribute || 'id') || '')
224
255
  .match(o.expression || (/(.+)[-=_](.+)/));
225
256
 
226
257
  if (res) {
227
- str.push((o.key || res[1] + '[' + (o.key && o.expression ? res[1] : res[2]) + ']')
258
+ str.push(((o.key || res[1]) + '[' + (o.key && o.expression ? res[1] : res[2]) + ']')
228
259
  + '='
229
- + (pid ? (o.key && o.expression ? pid[1] : pid[2]) : 'root'));
260
+ + (pid ? (o.key && o.expression ? pid[1] : pid[2]) : o.rootID));
230
261
  }
231
262
  });
232
263
 
@@ -238,51 +269,51 @@
238
269
 
239
270
  },
240
271
 
241
- toHierarchy: function(o) {
272
+ toHierarchy: function(options) {
242
273
 
243
- o = o || {};
244
- var sDepth = o.startDepthCount || 0,
274
+ var o = $.extend({}, this.options, options),
275
+ sDepth = o.startDepthCount || 0,
245
276
  ret = [];
246
277
 
247
- $(this.element).children('li').each(function () {
248
- var level = _recursiveItems($(this));
278
+ $(this.element).children(o.items).each(function () {
279
+ var level = _recursiveItems(this);
249
280
  ret.push(level);
250
281
  });
251
282
 
252
283
  return ret;
253
284
 
254
- function _recursiveItems(li) {
255
- var id = ($(li).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
285
+ function _recursiveItems(item) {
286
+ var id = ($(item).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
256
287
  if (id) {
257
- var item = {"id" : id[2]};
258
- if ($(li).children(o.listType).children('li').length > 0) {
259
- item.children = [];
260
- $(li).children(o.listType).children('li').each(function() {
261
- var level = _recursiveItems($(this));
262
- item.children.push(level);
288
+ var currentItem = {"id" : id[2]};
289
+ if ($(item).children(o.listType).children(o.items).length > 0) {
290
+ currentItem.children = [];
291
+ $(item).children(o.listType).children(o.items).each(function() {
292
+ var level = _recursiveItems(this);
293
+ currentItem.children.push(level);
263
294
  });
264
295
  }
265
- return item;
296
+ return currentItem;
266
297
  }
267
298
  }
268
299
  },
269
300
 
270
- toArray: function(o) {
301
+ toArray: function(options) {
271
302
 
272
- o = o || {};
273
- var sDepth = o.startDepthCount || 0,
303
+ var o = $.extend({}, this.options, options),
304
+ sDepth = o.startDepthCount || 0,
274
305
  ret = [],
275
306
  left = 2;
276
307
 
277
308
  ret.push({
278
- "item_id": 'root',
309
+ "item_id": o.rootID,
279
310
  "parent_id": 'none',
280
311
  "depth": sDepth,
281
312
  "left": '1',
282
- "right": ($('li', this.element).length + 1) * 2
313
+ "right": ($(o.items, this.element).length + 1) * 2
283
314
  });
284
315
 
285
- $(this.element).children('li').each(function () {
316
+ $(this.element).children(o.items).each(function () {
286
317
  left = _recursiveArray(this, sDepth + 1, left);
287
318
  });
288
319
 
@@ -296,9 +327,9 @@
296
327
  id,
297
328
  pid;
298
329
 
299
- if ($(item).children(o.listType).children('li').length > 0) {
330
+ if ($(item).children(o.listType).children(o.items).length > 0) {
300
331
  depth ++;
301
- $(item).children(o.listType).children('li').each(function () {
332
+ $(item).children(o.listType).children(o.items).each(function () {
302
333
  right = _recursiveArray($(this), depth, right);
303
334
  });
304
335
  depth --;
@@ -307,12 +338,12 @@
307
338
  id = ($(item).attr(o.attribute || 'id')).match(o.expression || (/(.+)[-=_](.+)/));
308
339
 
309
340
  if (depth === sDepth + 1) {
310
- pid = 'root';
341
+ pid = o.rootID;
311
342
  } else {
312
343
  var parentItem = ($(item).parent(o.listType)
313
- .parent('li')
314
- .attr(o.attribute || 'id'))
315
- .match(o.expression || (/(.+)[-=_](.+)/));
344
+ .parent(o.items)
345
+ .attr(o.attribute || 'id'))
346
+ .match(o.expression || (/(.+)[-=_](.+)/));
316
347
  pid = parentItem[2];
317
348
  }
318
349
 
@@ -329,7 +360,7 @@
329
360
  _clearEmpty: function(item) {
330
361
 
331
362
  var emptyList = $(item).children(this.options.listType);
332
- if (emptyList.length && !emptyList.children().length) {
363
+ if (emptyList.length && !emptyList.children().length && !this.options.doNotClear) {
333
364
  emptyList.remove();
334
365
  }
335
366
 
@@ -341,7 +372,8 @@
341
372
 
342
373
  if (this.options.listType) {
343
374
  var list = item.closest(this.options.listType);
344
- while (!list.is('.ui-sortable')) {
375
+ while (list && list.length > 0 &&
376
+ !list.is('.ui-sortable')) {
345
377
  level++;
346
378
  list = list.parent().closest(this.options.listType);
347
379
  }
@@ -363,28 +395,35 @@
363
395
  return depth ? result + 1 : result;
364
396
  },
365
397
 
366
- _isAllowed: function(parentItem, levels) {
367
- var o = this.options;
368
- // Are we trying to nest under a no-nest or are we nesting too deep?
369
- if (parentItem == null || !(parentItem.hasClass(o.disableNesting))) {
370
- if (o.maxLevels < levels && o.maxLevels != 0) {
398
+ _isAllowed: function(parentItem, level, levels) {
399
+ var o = this.options,
400
+ isRoot = $(this.domPosition.parent).hasClass('ui-sortable') ? true : false,
401
+ maxLevels = this.placeholder.closest('.ui-sortable').nestedSortable('option', 'maxLevels'); // this takes into account the maxLevels set to the recipient list
402
+
403
+ // Is the root protected?
404
+ // Are we trying to nest under a no-nest?
405
+ // Are we nesting too deep?
406
+ if (!o.isAllowed(this.currentItem, parentItem) ||
407
+ parentItem && parentItem.hasClass(o.disableNesting) ||
408
+ o.protectRoot && (parentItem == null && !isRoot || isRoot && level > 1)) {
371
409
  this.placeholder.addClass(o.errorClass);
372
- this.beyondMaxLevels = levels - o.maxLevels;
410
+ if (maxLevels < levels && maxLevels != 0) {
411
+ this.beyondMaxLevels = levels - maxLevels;
412
+ } else {
413
+ this.beyondMaxLevels = 1;
414
+ }
415
+ } else {
416
+ if (maxLevels < levels && maxLevels != 0) {
417
+ this.placeholder.addClass(o.errorClass);
418
+ this.beyondMaxLevels = levels - maxLevels;
373
419
  } else {
374
420
  this.placeholder.removeClass(o.errorClass);
375
421
  this.beyondMaxLevels = 0;
376
422
  }
377
- } else {
378
- this.placeholder.addClass(o.errorClass);
379
- if (o.maxLevels < levels && o.maxLevels != 0) {
380
- this.beyondMaxLevels = levels - o.maxLevels;
381
- } else {
382
- this.beyondMaxLevels = 1;
383
- }
384
423
  }
385
424
  }
386
425
 
387
426
  }));
388
427
 
389
- $.ui.nestedSortable.prototype.options = $.extend({}, $.ui.sortable.prototype.options, $.ui.nestedSortable.prototype.options);
390
- })(jQuery);
428
+ $.mjs.nestedSortable.prototype.options = $.extend({}, $.ui.sortable.prototype.options, $.mjs.nestedSortable.prototype.options);
429
+ })(jQuery);
@@ -8,7 +8,7 @@
8
8
  //= require redactor/toolbars/default
9
9
 
10
10
  //= require jquery.ui.sortable
11
- //=# require admin/jquery.ui.nestedSortable
11
+ //=# require admin/jquery.mjs.nestedSortable.js
12
12
 
13
13
  var lightBox;
14
14
 
@@ -0,0 +1,44 @@
1
+ .placeholder
2
+ background-color: #CCFF99
3
+ outline: 1px dashed green
4
+
5
+ .mjs-nestedSortable-error
6
+ background: #fbe3e4
7
+ outline: 1px dashed red
8
+
9
+ ol
10
+ padding-left: 30px
11
+
12
+ ol.sortable, ol.sortable ol
13
+ padding: 0
14
+ margin: 0
15
+ list-style-type: none
16
+
17
+ ol.sortable ol
18
+ margin: 0 0 0 25px
19
+
20
+ .sortable li div
21
+ background: image-url("admin/folder.png") no-repeat 0 2px
22
+ padding-left: 25px
23
+ cursor: move
24
+ position: relative
25
+ &:hover
26
+ background-color: #ffc
27
+ a
28
+ line-height: 20px
29
+ p
30
+ position: absolute
31
+ right: 0
32
+ margin: 0
33
+ line-height: 20px
34
+ z-index: 1
35
+ top: 0
36
+ a, img
37
+ display: inline-block
38
+ vertical-align: middle
39
+ line-height: 20px
40
+ a
41
+ text-decoration: none
42
+ color: #999
43
+ a.not-show
44
+ opacity: 0.4
@@ -35,18 +35,15 @@ module AdminHelper
35
35
  end
36
36
 
37
37
  def show_tree(c)
38
- html = ""
39
- html << "<li id=\"list_#{c.id}\"><div>#{link_to c.name, edit_admin_category_path(c)}<p>"
40
- html << " #{link_to "Удал",[:admin, c], data: { confirm: 'Точно удалить?' }, :method => :delete, class: "del"}</p></div>"
41
- unless c.children.empty?
42
- html << "<ol#{" class='sortable'" if c.id == 1}>"
43
- c.children.order('position').each do |ch|
44
- html << show_tree(ch)
38
+ link = link_to c.name, [:edit, :admin, c]
39
+ edit = link_to "Удал",[:admin, c], data: { confirm: 'Точно удалить?' }, :method => :delete, class: "del"
40
+ html = content_tag(:div, link + content_tag(:p, edit))
41
+ if c.children.any?
42
+ html << content_tag(:ol) do
43
+ raw c.children.map{|ch| show_tree(ch)}.join()
45
44
  end
46
- html << "</ol>"
47
45
  end
48
- html << "</li>"
49
- return raw(html)
46
+ content_tag :li, raw(html), id: "list_#{c.id}"
50
47
  end
51
48
 
52
49
  def sort_tree(url, maxLevels = 2)
@@ -64,12 +61,17 @@ module AdminHelper
64
61
  opacity: .6,
65
62
  placeholder: 'placeholder',
66
63
  revert: 250,
64
+ rootID: 'root',
67
65
  tabSize: 25,
68
66
  tolerance: 'pointer',
69
67
  toleranceElement: '> div',
70
68
  update: function(){
71
69
  var serialized = $(this).nestedSortable('serialize');
72
- $.ajax({url: '#{url}', data: serialized});
70
+ $.ajax({
71
+ method: 'POST',
72
+ url: '#{url}',
73
+ data: serialized
74
+ });
73
75
  }
74
76
  });
75
77
  });
@@ -1,5 +1,5 @@
1
1
  - content_for(:page_header) do
2
- %h1= index_header
2
+ %h1= tplural <%= model_name.demodulize %>
3
3
  %p= link_to "Добавить #{taccusative('<%= resource_name %>')}", [:new, :admin, :<%= resource_name %>]
4
4
 
5
5
  - unless @<%= plural_resource_name %>.empty?
data/lib/redde/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Redde
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redde
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Oleg Bovykin
@@ -9,118 +10,134 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-01-28 00:00:00.000000000 Z
13
+ date: 2014-02-11 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: jquery-rails
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
- - - '>='
20
+ - - ! '>='
19
21
  - !ruby/object:Gem::Version
20
22
  version: '0'
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
- - - '>='
28
+ - - ! '>='
26
29
  - !ruby/object:Gem::Version
27
30
  version: '0'
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: jquery-ui-rails
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
- - - '>='
36
+ - - ! '>='
33
37
  - !ruby/object:Gem::Version
34
38
  version: '0'
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
- - - '>='
44
+ - - ! '>='
40
45
  - !ruby/object:Gem::Version
41
46
  version: '0'
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: rails
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
- - - '>='
52
+ - - ! '>='
47
53
  - !ruby/object:Gem::Version
48
54
  version: '3.1'
49
55
  type: :development
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
- - - '>='
60
+ - - ! '>='
54
61
  - !ruby/object:Gem::Version
55
62
  version: '3.1'
56
63
  - !ruby/object:Gem::Dependency
57
64
  name: rspec-rails
58
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
59
67
  requirements:
60
- - - '>='
68
+ - - ! '>='
61
69
  - !ruby/object:Gem::Version
62
70
  version: '2.7'
63
71
  type: :development
64
72
  prerelease: false
65
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
66
75
  requirements:
67
- - - '>='
76
+ - - ! '>='
68
77
  - !ruby/object:Gem::Version
69
78
  version: '2.7'
70
79
  - !ruby/object:Gem::Dependency
71
80
  name: factory_girl_rails
72
81
  requirement: !ruby/object:Gem::Requirement
82
+ none: false
73
83
  requirements:
74
- - - '>='
84
+ - - ! '>='
75
85
  - !ruby/object:Gem::Version
76
86
  version: '2.7'
77
87
  type: :development
78
88
  prerelease: false
79
89
  version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
80
91
  requirements:
81
- - - '>='
92
+ - - ! '>='
82
93
  - !ruby/object:Gem::Version
83
94
  version: '2.7'
84
95
  - !ruby/object:Gem::Dependency
85
96
  name: guard-rspec
86
97
  requirement: !ruby/object:Gem::Requirement
98
+ none: false
87
99
  requirements:
88
- - - '>='
100
+ - - ! '>='
89
101
  - !ruby/object:Gem::Version
90
102
  version: '0'
91
103
  type: :development
92
104
  prerelease: false
93
105
  version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
94
107
  requirements:
95
- - - '>='
108
+ - - ! '>='
96
109
  - !ruby/object:Gem::Version
97
110
  version: '0'
98
111
  - !ruby/object:Gem::Dependency
99
112
  name: sqlite3
100
113
  requirement: !ruby/object:Gem::Requirement
114
+ none: false
101
115
  requirements:
102
- - - '>='
116
+ - - ! '>='
103
117
  - !ruby/object:Gem::Version
104
118
  version: '0'
105
119
  type: :development
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
108
123
  requirements:
109
- - - '>='
124
+ - - ! '>='
110
125
  - !ruby/object:Gem::Version
111
126
  version: '0'
112
127
  - !ruby/object:Gem::Dependency
113
128
  name: generator_spec
114
129
  requirement: !ruby/object:Gem::Requirement
130
+ none: false
115
131
  requirements:
116
- - - '>='
132
+ - - ! '>='
117
133
  - !ruby/object:Gem::Version
118
134
  version: '0'
119
135
  type: :development
120
136
  prerelease: false
121
137
  version_requirements: !ruby/object:Gem::Requirement
138
+ none: false
122
139
  requirements:
123
- - - '>='
140
+ - - ! '>='
124
141
  - !ruby/object:Gem::Version
125
142
  version: '0'
126
143
  description: Admin scaffold generator for redde projects
@@ -207,7 +224,7 @@ files:
207
224
  - lib/generators/redde/layout/templates/assets/images/admin/view.png
208
225
  - lib/generators/redde/layout/templates/assets/images/admin/view_mk.png
209
226
  - lib/generators/redde/layout/templates/assets/javascripts/admin.js
210
- - lib/generators/redde/layout/templates/assets/javascripts/admin/jquery.ui.nestedSortable.js
227
+ - lib/generators/redde/layout/templates/assets/javascripts/admin/jquery.mjs.nestedSortable.js
211
228
  - lib/generators/redde/layout/templates/assets/redactor/images/.keep
212
229
  - lib/generators/redde/layout/templates/assets/redactor/images/redactor/icons.png
213
230
  - lib/generators/redde/layout/templates/assets/redactor/images/redactor/plugins/file.html
@@ -233,7 +250,7 @@ files:
233
250
  - lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/partners.scss
234
251
  - lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/phead-tabs.sass
235
252
  - lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/photos.scss
236
- - lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/sortable.scss
253
+ - lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/sortable.sass
237
254
  - lib/generators/redde/layout/templates/assets/stylesheets/admin/default.scss
238
255
  - lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/input.sass
239
256
  - lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/table.scss
@@ -318,26 +335,33 @@ files:
318
335
  homepage: http://github.com/redde/redde
319
336
  licenses:
320
337
  - MIT
321
- metadata: {}
322
338
  post_install_message:
323
339
  rdoc_options: []
324
340
  require_paths:
325
341
  - lib
326
342
  required_ruby_version: !ruby/object:Gem::Requirement
343
+ none: false
327
344
  requirements:
328
- - - '>='
345
+ - - ! '>='
329
346
  - !ruby/object:Gem::Version
330
347
  version: '0'
348
+ segments:
349
+ - 0
350
+ hash: -3579218802794049855
331
351
  required_rubygems_version: !ruby/object:Gem::Requirement
352
+ none: false
332
353
  requirements:
333
- - - '>='
354
+ - - ! '>='
334
355
  - !ruby/object:Gem::Version
335
356
  version: '0'
357
+ segments:
358
+ - 0
359
+ hash: -3579218802794049855
336
360
  requirements: []
337
361
  rubyforge_project:
338
- rubygems_version: 2.0.14
362
+ rubygems_version: 1.8.24
339
363
  signing_key:
340
- specification_version: 4
364
+ specification_version: 3
341
365
  summary: Admin scaffold generator for redde projects
342
366
  test_files:
343
367
  - spec/dummy/.rspec
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: cc3d7f424511a702d9e9bf16a094083f3ebefd8e
4
- data.tar.gz: ecc04dd48b7cb5f90b05019174078e9deb83ff1a
5
- SHA512:
6
- metadata.gz: bdb1a73599c050b7321d6100e631a7b9419c02de0dbeab87e2013449359e2c4b720c764e6828155e5f9d94eba9ae7bd4b502f28ac5f3fa93482e482d51649206
7
- data.tar.gz: ae25347849265d4e437814c42b88a0997cf253bbaa685424fb914064d5e6cdfb3c646e9d28d0dfb5e6a5ee7038f48c8aacbcbad4892a568c5d011b133dbfaa5e
@@ -1,17 +0,0 @@
1
- .placeholder {background-color: #CCFF99; outline:1px dashed green;}
2
- .ui-nestedSortable-error {background:#fbe3e4; outline:1px dashed red;}
3
- ol {padding-left: 30px;}
4
- ol.sortable, ol.sortable ol { padding: 0;margin:0;list-style-type: none;}
5
- ol.sortable ol {margin: 0 0 0 25px;}
6
- .sortable li {}
7
- .sortable li div {
8
- background:url("admin/folder.png") no-repeat 0 2px; padding-left:25px; cursor: move; position:relative;
9
- &:hover {background-color:#ffc;}
10
- a {line-height:20px;}
11
- p {
12
- position:absolute; right:0; margin:0; line-height:20px; z-index:1; top:0;
13
- a, img {display:inline-block; vertical-align:middle; line-height:20px;}
14
- a {text-decoration:none; color:#999;}
15
- a.not-show {opacity:0.4;}
16
- }
17
- }