dynatree-rails 1.2.5 → 1.2.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc143706952222b9c7aabe573896e0f72d4966cd
4
- data.tar.gz: 73b8770cd91a5030ca8c3275d0a629a0f36a3a74
3
+ metadata.gz: d12cfedbe8350e09f9a774b9229827027cf96374
4
+ data.tar.gz: e54844751da774320a9765b99dcaf90d84287663
5
5
  SHA512:
6
- metadata.gz: 46db33e70c3f3b3e0c1aacc945cddfc53ab18746455e4aaa5a363e8e90680332d83b89f333458ef39f77cb0b879b65132d5cc876f53fb2a046a9e320bff0409b
7
- data.tar.gz: 3e6ac8c3f2420cefeda8fd0336998009cc938e82635da685763db7d72015eb43d88f853077e58be83473cdf535e26e770c0657c47f7ab0ca02ae40ad77afbcd4
6
+ metadata.gz: 0dea6bf8dbd54aa8f2d9d7d4933ab771d9f0bc4e865b12df73699b4b007d4d8ab2d0a1974c8e5284d7296bcc68d04d4d8d3a8ca8c9ed4a1ecececc5f38b38a27
7
+ data.tar.gz: 993a0da0d38d6dee5f148ecf534935099741c490c48b950194d252059c5a7b4c1776fd1e8862020c5e12f1f9432e86eae2c3d71aa1b81f9551b9d4ab81ef866f
data/README.md CHANGED
@@ -96,5 +96,5 @@ Dynatree is
96
96
 
97
97
  This code is:
98
98
 
99
- Copyright (c) 2012, GlebTV
99
+ Copyright (c) 2012-2014, Gleb Tv
100
100
  Dual licensed under the MIT or GPL Version 2 licenses.
@@ -2,15 +2,15 @@
2
2
  jquery.dynatree.js
3
3
  Dynamic tree view control, with support for lazy loading of branches.
4
4
 
5
- Copyright (c) 2006-2013, Martin Wendt (http://wwWendt.de)
5
+ Copyright (c) 2006-2014, Martin Wendt (http://wwWendt.de)
6
6
  Dual licensed under the MIT or GPL Version 2 licenses.
7
7
  http://code.google.com/p/dynatree/wiki/LicenseInfo
8
8
 
9
9
  A current version and some documentation is available at
10
10
  http://dynatree.googlecode.com/
11
11
 
12
- @version: DEVELOPMENT
13
- @date: DEVELOPMENT
12
+ @version: 1.2.6
13
+ @date: 2014-05-11T15:38
14
14
 
15
15
  @depends: jquery.js
16
16
  @depends: jquery.ui.core.js
@@ -500,13 +500,15 @@ DynaTreeNode.prototype = {
500
500
  },
501
501
  /** Return '/id1/id2/id3'. */
502
502
  getKeyPath: function(excludeSelf) {
503
- var path = [];
503
+ var path = [],
504
+ sep = this.tree.options.keyPathSeparator;
505
+
504
506
  this.visitParents(function(node){
505
507
  if(node.parent){
506
508
  path.unshift(node.data.key);
507
509
  }
508
510
  }, !excludeSelf);
509
- return "/" + path.join(this.tree.options.keyPathSeparator);
511
+ return sep + path.join(sep);
510
512
  },
511
513
 
512
514
  getParent: function() {
@@ -767,7 +769,7 @@ DynaTreeNode.prototype = {
767
769
  return "title";
768
770
  }else if( cn.className==cns.expander ){
769
771
  return "expander";
770
- }else if( cn.className==cns.checkbox ){
772
+ }else if( cn.className==cns.checkbox || cn.className==cns.radio ){
771
773
  return "checkbox";
772
774
  }else if( cn.className==cns.nodeIcon ){
773
775
  return "icon";
@@ -778,7 +780,7 @@ DynaTreeNode.prototype = {
778
780
  },
779
781
 
780
782
  getEventTargetType: function(event) {
781
- // Return the part of a node, that a click event occured on.
783
+ // Return the part of a node, that a click event occurred on.
782
784
  // Note: there is no check, if the event was fired on THIS node.
783
785
  var tcn = event && event.target ? event.target.className : "",
784
786
  cns = this.tree.options.classNames;
@@ -787,7 +789,7 @@ DynaTreeNode.prototype = {
787
789
  return "title";
788
790
  }else if( tcn.indexOf(cns.expander) >= 0 ){
789
791
  return "expander";
790
- }else if( tcn.indexOf(cns.checkbox) >= 0 ){
792
+ }else if( tcn.indexOf(cns.checkbox) >= 0 || tcn.indexOf(cns.radio) >= 0 ){
791
793
  return "checkbox";
792
794
  }else if( tcn.indexOf(cns.nodeIcon) >= 0 ){
793
795
  return "icon";
@@ -837,10 +839,10 @@ DynaTreeNode.prototype = {
837
839
  if( this.data.isStatusNode ){
838
840
  return;
839
841
  }
840
- if ( fireEvents && opts.onQueryActivate && opts.onQueryActivate.call(this.tree, flag, this) === false ){
841
- return; // Callback returned false
842
- }
843
842
  if( flag ) {
843
+ if ( fireEvents && opts.onQueryActivate && opts.onQueryActivate.call(this.tree, flag, this) === false ){
844
+ return; // Callback returned false
845
+ }
844
846
  // Activate
845
847
  if( this.tree.activeNode ) {
846
848
  if( this.tree.activeNode === this ){
@@ -1827,7 +1829,9 @@ DynaTreeNode.prototype = {
1827
1829
  success: function(data, textStatus, jqXHR){
1828
1830
  // <this> is the request options
1829
1831
  // self.tree.logDebug("appendAjax().success");
1830
- var prevPhase = self.tree.phase;
1832
+ var prevPhase = self.tree.phase,
1833
+ options = self.tree.options; // #473
1834
+
1831
1835
  self.tree.phase = "init";
1832
1836
  // postProcess is similar to the standard dataFilter hook,
1833
1837
  // but it is also called for JSONP
@@ -1907,7 +1911,7 @@ DynaTreeNode.prototype = {
1907
1911
  this.parent.childList.splice(pos, 1);
1908
1912
  }
1909
1913
  // Remove from source DOM parent
1910
- if(this.parent.ul){
1914
+ if(this.parent.ul && this.li){
1911
1915
  this.parent.ul.removeChild(this.li);
1912
1916
  }
1913
1917
 
@@ -1947,7 +1951,9 @@ DynaTreeNode.prototype = {
1947
1951
  // (Hidden, because it will be
1948
1952
  targetParent.ul = document.createElement("ul");
1949
1953
  targetParent.ul.style.display = "none";
1950
- targetParent.li.appendChild(targetParent.ul);
1954
+ if( targetParent.li ){
1955
+ targetParent.li.appendChild(targetParent.ul);
1956
+ }
1951
1957
  }
1952
1958
  // Issue 319: Add to target DOM parent (only if node was already rendered(expanded))
1953
1959
  if(this.li){
@@ -2774,8 +2780,8 @@ TODO: better?
2774
2780
  case "helper":
2775
2781
  // Only event and node argument is available
2776
2782
  var $helper = $("<div class='dynatree-drag-helper'><span class='dynatree-drag-helper-img' /></div>")
2777
- .append($(event.target).closest(".dynatree-title").clone());
2778
- // .append($(event.target).closest('a').clone());
2783
+ // .append($(event.target).closest(".dynatree-title").clone());
2784
+ .append(nodeTag.find(".dynatree-title").clone());
2779
2785
  // issue 244: helper should be child of scrollParent
2780
2786
  $("ul.dynatree-container", node.tree.divTree).append($helper);
2781
2787
  // $(node.tree.divTree).append($helper);
@@ -3090,9 +3096,9 @@ if(versionCompare($.ui.version, "1.8") < 0){
3090
3096
  */
3091
3097
  $.extend($.ui.dynatree, {
3092
3098
  /** @type {String} */
3093
- version: "DEVELOPMENT",
3099
+ version: "1.2.6",
3094
3100
  /** @type {String} */
3095
- buildType: "DEVELOP",
3101
+ buildType: "release",
3096
3102
  /** Expose class object as $.ui.dynatree._DynaTreeClass */
3097
3103
  _DynaTreeClass: DynaTree,
3098
3104
  /** Expose class object as $.ui.dynatree._DynaTreeNodeClass */
@@ -3221,6 +3227,7 @@ $.ui.dynatree.prototype.options = {
3221
3227
  expander: "dynatree-expander",
3222
3228
  connector: "dynatree-connector",
3223
3229
  checkbox: "dynatree-checkbox",
3230
+ radio: "dynatree-radio",
3224
3231
  nodeIcon: "dynatree-icon",
3225
3232
  title: "dynatree-title",
3226
3233
  noConnector: "dynatree-no-connector",
@@ -3241,7 +3248,7 @@ $.ui.dynatree.prototype.options = {
3241
3248
  partsel: "dynatree-partsel",
3242
3249
  lastsib: "dynatree-lastsib"
3243
3250
  },
3244
- debugLevel: 2, // 0:quiet, 1:normal, 2:debug
3251
+ debugLevel: 1, // 0:quiet, 1:normal, 2:debug
3245
3252
 
3246
3253
  // ------------------------------------------------------------------------
3247
3254
  lastentry: undefined
@@ -13,8 +13,8 @@ ul
13
13
  background-color: white
14
14
  border: 1px dotted gray
15
15
  overflow: auto
16
- height: 100%
17
- /* issue 263
16
+ /* height: 100%; /* issue 263, 470
17
+ min-height: 0%
18
18
  ul
19
19
  padding: 0 0 0 16px
20
20
  margin: 0
@@ -46,7 +46,7 @@ ul
46
46
 
47
47
  .ui-dynatree-disabled ul.dynatree-container
48
48
  opacity: 0.5
49
- /* filter: alpha(opacity=50); /* Yields a css warning
49
+ /* filter: alpha(opacity=50); /* Yields a css warning
50
50
  background-color: silver
51
51
 
52
52
  /*******************************************************************************
@@ -69,8 +69,8 @@ span
69
69
  #dynatree-drop-marker
70
70
  width: 16px
71
71
  height: 16px
72
- /* display: -moz-inline-box; /* @ FF 1+2 removed for issue 221
73
- /* -moz-box-align: start; /* issue 221
72
+ /* display: -moz-inline-box; /* @ FF 1+2 removed for issue 221
73
+ /* -moz-box-align: start; /* issue 221
74
74
  display: inline-block
75
75
  /* Required to make a span sizeable
76
76
  vertical-align: top
@@ -115,7 +115,7 @@ span
115
115
  /*******************************************************************************
116
116
  * Expander icon
117
117
  * Note: IE6 doesn't correctly evaluate multiples class names,
118
- * so we create combined class names that can be used in the CSS.
118
+ * so we create combined class names that can be used in the CSS.
119
119
  *
120
120
  * Prefix: dynatree-exp-
121
121
  * 1st character: 'e': expanded, 'c': collapsed
@@ -177,7 +177,7 @@ span.dynatree-radio
177
177
  /*******************************************************************************
178
178
  * Node type icon
179
179
  * Note: IE6 doesn't correctly evaluate multiples class names,
180
- * so we create combined class names that can be used in the CSS.
180
+ * so we create combined class names that can be used in the CSS.
181
181
  *
182
182
  * Prefix: dynatree-ico-
183
183
  * 1st character: 'e': expanded, 'c': collapsed
@@ -203,7 +203,7 @@ span.dynatree-icon
203
203
 
204
204
  .dynatree-statusnode-error span.dynatree-icon
205
205
  background-position: 0px -112px
206
- /* background-image: url("ltError.gif");
206
+ /* background-image: image-url("dynatree/skin-vista/ltError.gif");
207
207
 
208
208
  /*******************************************************************************
209
209
  * Node titles
@@ -212,9 +212,11 @@ span.dynatree-icon
212
212
  * Removed again for issue 165; (133 couldn't be reproduced)
213
213
 
214
214
  span.dynatree-node
215
- /* display: -moz-inline-box; /* issue 133, 165, 172, 192. removed for issue 221
216
- /* -moz-box-align: start; /* issue 221
217
- /* display: inline-block; /* Required to make a span sizeable
215
+ /* display: -moz-inline-box; /* issue 133, 165, 172, 192. removed for issue 221
216
+ /* -moz-box-align: start; /* issue 221
217
+ display: inline-block
218
+ /* issue 373 Required to make a span sizeable
219
+ vertical-align: top
218
220
 
219
221
  /* Remove blue color and underline from title links
220
222
 
@@ -225,7 +227,7 @@ ul.dynatree-container a
225
227
  vertical-align: top
226
228
  margin: 0px
227
229
  margin-left: 3px
228
- /* outline: 0; /* @ Firefox, prevent dotted border after click
230
+ /* outline: 0; /* @ Firefox, prevent dotted border after click
229
231
  /* Set transparent border to prevent jumping when active node gets a border
230
232
  * (we can do this, because this theme doesn't use vertical lines)
231
233
  border: 1px solid white
@@ -13,8 +13,8 @@ ul
13
13
  background-color: white
14
14
  border: 1px dotted gray
15
15
  overflow: auto
16
- height: 100%
17
- /* issue 263
16
+ /* height: 100%; /* issue 263, 470
17
+ min-height: 0%
18
18
  ul
19
19
  padding: 0 0 0 16px
20
20
  margin: 0
@@ -48,7 +48,7 @@ ul
48
48
 
49
49
  .ui-dynatree-disabled ul.dynatree-container
50
50
  opacity: 0.5
51
- /* filter: alpha(opacity=50); /* Yields a css warning
51
+ /* filter: alpha(opacity=50); /* Yields a css warning
52
52
  background-color: silver
53
53
 
54
54
  /*******************************************************************************
@@ -71,8 +71,8 @@ span
71
71
  #dynatree-drop-marker
72
72
  width: 16px
73
73
  height: 16px
74
- /* display: -moz-inline-box; /* @ FF 1+2 removed for issue 221
75
- /* -moz-box-align: start; /* issue 221
74
+ /* display: -moz-inline-box; /* @ FF 1+2 removed for issue 221
75
+ /* -moz-box-align: start; /* issue 221
76
76
  display: inline-block
77
77
  /* Required to make a span sizeable
78
78
  vertical-align: top
@@ -103,7 +103,7 @@ span
103
103
  /*******************************************************************************
104
104
  * Expander icon
105
105
  * Note: IE6 doesn't correctly evaluate multiples class names,
106
- * so we create combined class names that can be used in the CSS.
106
+ * so we create combined class names that can be used in the CSS.
107
107
  *
108
108
  * Prefix: dynatree-exp-
109
109
  * 1st character: 'e': expanded, 'c': collapsed
@@ -172,7 +172,7 @@ span.dynatree-radio
172
172
  /*******************************************************************************
173
173
  * Node type icon
174
174
  * Note: IE6 doesn't correctly evaluate multiples class names,
175
- * so we create combined class names that can be used in the CSS.
175
+ * so we create combined class names that can be used in the CSS.
176
176
  *
177
177
  * Prefix: dynatree-ico-
178
178
  * 1st character: 'e': expanded, 'c': collapsed
@@ -195,7 +195,7 @@ span.dynatree-icon
195
195
 
196
196
  .dynatree-statusnode-error span.dynatree-icon
197
197
  background-position: 0px -112px
198
- /* background-image: image-url("dynatree/skin/ltError.gif");
198
+ /* background-image: image-url("dynatree/skin/ltError.gif");
199
199
 
200
200
  /*******************************************************************************
201
201
  * Node titles
@@ -204,9 +204,11 @@ span.dynatree-icon
204
204
  * Removed again for issue 165; (133 couldn't be reproduced)
205
205
 
206
206
  span.dynatree-node
207
- /* display: -moz-inline-box; /* issue 133, 165, 172, 192. removed for issue 221
208
- /* -moz-box-align: start; /* issue 221
209
- /* display: inline-block; /* Required to make a span sizeable
207
+ /* display: -moz-inline-box; /* issue 133, 165, 172, 192. removed for issue 221
208
+ /* -moz-box-align: start; /* issue 221
209
+ display: inline-block
210
+ /* issue 373 Required to make a span sizeable
211
+ vertical-align: top
210
212
 
211
213
  /* Remove blue color and underline from title links
212
214
 
@@ -217,7 +219,7 @@ ul.dynatree-container a
217
219
  vertical-align: top
218
220
  margin: 0px
219
221
  margin-left: 3px
220
- /* outline: 0; /* @ Firefox, prevent dotted border after click
222
+ /* outline: 0; /* @ Firefox, prevent dotted border after click
221
223
  &:hover
222
224
  /* text-decoration: underline;
223
225
  background-color: #F2F7FD
@@ -247,6 +249,7 @@ span
247
249
  &.dynatree-focused a:link
248
250
  background-color: #EFEBDE
249
251
  /* gray
252
+ &.dynatree-has-children! a, &.dynatree-expanded! a
250
253
  &.dynatree-selected a
251
254
  color: green
252
255
  font-style: italic
@@ -290,7 +293,7 @@ div
290
293
  position: absolute
291
294
  background-position: 0 -128px
292
295
  margin: 0
293
- /* border: 1px solid red;
296
+ /* border: 1px solid red;
294
297
  &.dynatree-drop-after, &.dynatree-drop-before
295
298
  width: 64px
296
299
  background-position: 0 -144px
@@ -301,14 +304,22 @@ div
301
304
 
302
305
  span
303
306
  &.dynatree-drag-source
307
+ /* border: 1px dotted gray;
304
308
  background-color: #e0e0e0
305
309
  a
306
310
  color: gray
307
311
  &.dynatree-drop-target
312
+ /*border: 1px solid gray;
313
+ a!
308
314
  &.dynatree-drop-accept a
315
+ /*border: 1px solid green;
309
316
  background-color: #3169C6 !important
310
317
  color: white !important
318
+ /* @ IE6
311
319
  text-decoration: none
320
+ &.dynatree-drop-reject
321
+ /*border: 1px solid red;
322
+ &.dynatree-drop-after! a
312
323
  &.custom1 a
313
324
  background-color: maroon
314
325
  color: yellow
@@ -316,4 +327,4 @@ span
316
327
  /*** Target node while dragging cursor is over it ****************************
317
328
 
318
329
  /*******************************************************************************
319
- * Custom node classes (sample)
330
+ * Custom node classes (sample)
@@ -5,7 +5,7 @@ Gem::Specification.new do |gem|
5
5
  gem.authors = ["Gleb Tv"]
6
6
  gem.email = ["glebtv@gmail.com"]
7
7
  gem.description = %q{}
8
- gem.summary = %q{Dynatree integration for rails 3.1 asset pipeline}
8
+ gem.summary = %q{Dynatree integration for rails asset pipeline}
9
9
  gem.homepage = "https://github.com/glebtv/dynatree-rails"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
@@ -1,5 +1,5 @@
1
1
  module Dynatree
2
2
  module Rails
3
- VERSION = "1.2.5"
3
+ VERSION = "1.2.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynatree-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Tv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-31 00:00:00.000000000 Z
11
+ date: 2014-07-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ''
14
14
  email:
@@ -25,21 +25,21 @@ files:
25
25
  - MIT-License.txt
26
26
  - README.md
27
27
  - Rakefile
28
+ - app/assets/images/dynatree/skin-vista/icons.gif
29
+ - app/assets/images/dynatree/skin-vista/loading.gif
30
+ - app/assets/images/dynatree/skin/icons-rtl.gif
31
+ - app/assets/images/dynatree/skin/icons.gif
32
+ - app/assets/images/dynatree/skin/loading.gif
33
+ - app/assets/images/dynatree/skin/vline-rtl.gif
34
+ - app/assets/images/dynatree/skin/vline.gif
35
+ - app/assets/javascripts/dynatree/jquery.dynatree.js
36
+ - app/assets/stylesheets/dynatree/skin-vista.css.sass
37
+ - app/assets/stylesheets/dynatree/skin.css.sass
28
38
  - dynatree-rails.gemspec
29
39
  - lib/dynatree-rails.rb
30
40
  - lib/dynatree-rails/engine.rb
31
41
  - lib/dynatree-rails/renderer.rb
32
42
  - lib/dynatree-rails/version.rb
33
- - vendor/assets/images/dynatree/skin-vista/icons.gif
34
- - vendor/assets/images/dynatree/skin-vista/loading.gif
35
- - vendor/assets/images/dynatree/skin/icons-rtl.gif
36
- - vendor/assets/images/dynatree/skin/icons.gif
37
- - vendor/assets/images/dynatree/skin/loading.gif
38
- - vendor/assets/images/dynatree/skin/vline-rtl.gif
39
- - vendor/assets/images/dynatree/skin/vline.gif
40
- - vendor/assets/javascripts/dynatree/jquery.dynatree.js
41
- - vendor/assets/stylesheets/dynatree/skin-vista.sass
42
- - vendor/assets/stylesheets/dynatree/skin.sass
43
43
  homepage: https://github.com/glebtv/dynatree-rails
44
44
  licenses: []
45
45
  metadata: {}
@@ -59,8 +59,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  version: '0'
60
60
  requirements: []
61
61
  rubyforge_project:
62
- rubygems_version: 2.2.1
62
+ rubygems_version: 2.2.2
63
63
  signing_key:
64
64
  specification_version: 4
65
- summary: Dynatree integration for rails 3.1 asset pipeline
65
+ summary: Dynatree integration for rails asset pipeline
66
66
  test_files: []