wagn 1.12.10 → 1.12.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +8 -8
  2. data/Gemfile +14 -12
  3. data/VERSION +1 -1
  4. data/app/assets/javascripts/wagn.js.coffee +25 -22
  5. data/app/assets/javascripts/wagn_mod.js.coffee +0 -44
  6. data/app/controllers/card_controller.rb +0 -1
  7. data/app/controllers/wagn_controller.rb +1 -2
  8. data/config/routes.rb +0 -1
  9. data/features/hello_wagn.feature +7 -5
  10. data/lib/card/exceptions.rb +7 -2
  11. data/lib/card/format.rb +8 -3
  12. data/lib/card/query/card_spec.rb +2 -1
  13. data/lib/card/set.rb +1 -0
  14. data/lib/wagn/all.rb +4 -4
  15. data/mods/core/formats/html_format.rb +296 -284
  16. data/mods/core/formats/text_format.rb +5 -2
  17. data/mods/core/sets/all/phases.rb +13 -0
  18. data/mods/standard/formats/css_format.rb +4 -1
  19. data/mods/standard/formats/csv_format.rb +4 -1
  20. data/mods/standard/formats/js_format.rb +6 -0
  21. data/mods/standard/formats/json_format.rb +4 -1
  22. data/mods/standard/formats/kml_format.rb +4 -1
  23. data/mods/standard/formats/rss_format.rb +7 -4
  24. data/mods/standard/formats/xml_format.rb +4 -1
  25. data/mods/standard/lib/stylesheets/functional.scss +2 -1
  26. data/mods/standard/sets/all/account.rb +1 -1
  27. data/mods/standard/sets/all/all_css.rb +5 -1
  28. data/mods/standard/sets/all/json.rb +17 -21
  29. data/mods/standard/sets/all/rich_html.rb +4 -3
  30. data/mods/standard/sets/self/head.rb +6 -0
  31. data/mods/standard/sets/type/cardtype.rb +1 -1
  32. data/mods/standard/sets/type/pointer.rb +23 -11
  33. data/mods/standard/sets/type/scss.rb +1 -0
  34. data/mods/standard/sets/type/search_type.rb +0 -2
  35. data/mods/standard/sets/type/user.rb +1 -2
  36. data/public/assets/application-7cda003cf1291a165b1eac69ea3027aa.js +107 -0
  37. data/public/assets/application-7cda003cf1291a165b1eac69ea3027aa.js.gz +0 -0
  38. data/public/assets/application.js +42 -38
  39. data/public/assets/application.js.gz +0 -0
  40. data/public/assets/html5shiv-printshiv-ad36fc7219f4aeaa275f9a7fe2383413.js.gz +0 -0
  41. data/public/assets/html5shiv-printshiv.js.gz +0 -0
  42. data/public/assets/jquery.min-8b58c0fbf303b938d8e749262f7e50dd.map +1 -0
  43. data/public/assets/jquery.min.map +1 -0
  44. data/public/assets/manifest.yml +4 -2
  45. data/public/assets/tinymce-22b5a139d9ff7df7643afae9ce205508.js.gz +0 -0
  46. data/public/assets/tinymce.js.gz +0 -0
  47. data/spec/lib/card/query_spec.rb +3 -2
  48. data/spec/mods/standard/sets/all/all_css_spec.rb +1 -1
  49. data/spec/mods/standard/sets/type/pointer_spec.rb +2 -2
  50. data/wagn.gemspec +5 -4
  51. metadata +10 -80
  52. data/public/assets/application-af2bc486eb3db1c02c4dcd0e23ca25fc.js +0 -103
  53. data/public/assets/application-af2bc486eb3db1c02c4dcd0e23ca25fc.js.gz +0 -0
  54. data/public/assets2bpacked/jstree/README.txt +0 -10
  55. data/public/assets2bpacked/jstree/_demo/_dump.sql +0 -20
  56. data/public/assets2bpacked/jstree/_demo/_inc/__mysql_errors.log +0 -0
  57. data/public/assets2bpacked/jstree/_demo/_inc/class._database.php +0 -146
  58. data/public/assets2bpacked/jstree/_demo/_inc/class._database_i.php +0 -152
  59. data/public/assets2bpacked/jstree/_demo/_inc/class.tree.php +0 -602
  60. data/public/assets2bpacked/jstree/_demo/_install.txt +0 -6
  61. data/public/assets2bpacked/jstree/_demo/config.php +0 -14
  62. data/public/assets2bpacked/jstree/_demo/file.png +0 -0
  63. data/public/assets2bpacked/jstree/_demo/folder.png +0 -0
  64. data/public/assets2bpacked/jstree/_demo/index.html +0 -461
  65. data/public/assets2bpacked/jstree/_demo/root.png +0 -0
  66. data/public/assets2bpacked/jstree/_demo/server.php +0 -69
  67. data/public/assets2bpacked/jstree/_docs/!style.css +0 -48
  68. data/public/assets2bpacked/jstree/_docs/_drive.png +0 -0
  69. data/public/assets2bpacked/jstree/_docs/_html_data.html +0 -2
  70. data/public/assets2bpacked/jstree/_docs/_json_data.json +0 -4
  71. data/public/assets2bpacked/jstree/_docs/_search_data.json +0 -6
  72. data/public/assets2bpacked/jstree/_docs/_search_result.json +0 -1
  73. data/public/assets2bpacked/jstree/_docs/_xml_flat.xml +0 -12
  74. data/public/assets2bpacked/jstree/_docs/_xml_nest.xml +0 -18
  75. data/public/assets2bpacked/jstree/_docs/checkbox.html +0 -171
  76. data/public/assets2bpacked/jstree/_docs/contextmenu.html +0 -121
  77. data/public/assets2bpacked/jstree/_docs/cookies.html +0 -97
  78. data/public/assets2bpacked/jstree/_docs/core.html +0 -689
  79. data/public/assets2bpacked/jstree/_docs/crrm.html +0 -316
  80. data/public/assets2bpacked/jstree/_docs/dnd.html +0 -199
  81. data/public/assets2bpacked/jstree/_docs/hotkeys.html +0 -82
  82. data/public/assets2bpacked/jstree/_docs/html_data.html +0 -175
  83. data/public/assets2bpacked/jstree/_docs/index.html +0 -86
  84. data/public/assets2bpacked/jstree/_docs/json_data.html +0 -249
  85. data/public/assets2bpacked/jstree/_docs/languages.html +0 -152
  86. data/public/assets2bpacked/jstree/_docs/logo.png +0 -0
  87. data/public/assets2bpacked/jstree/_docs/search.html +0 -153
  88. data/public/assets2bpacked/jstree/_docs/sort.html +0 -85
  89. data/public/assets2bpacked/jstree/_docs/syntax/!script.js +0 -2232
  90. data/public/assets2bpacked/jstree/_docs/syntax/!style.css +0 -511
  91. data/public/assets2bpacked/jstree/_docs/syntax/clipboard.swf +0 -0
  92. data/public/assets2bpacked/jstree/_docs/syntax/help.png +0 -0
  93. data/public/assets2bpacked/jstree/_docs/syntax/magnifier.png +0 -0
  94. data/public/assets2bpacked/jstree/_docs/syntax/page_white_code.png +0 -0
  95. data/public/assets2bpacked/jstree/_docs/syntax/page_white_copy.png +0 -0
  96. data/public/assets2bpacked/jstree/_docs/syntax/printer.png +0 -0
  97. data/public/assets2bpacked/jstree/_docs/syntax/wrapping.png +0 -0
  98. data/public/assets2bpacked/jstree/_docs/themeroller.html +0 -107
  99. data/public/assets2bpacked/jstree/_docs/themes.html +0 -127
  100. data/public/assets2bpacked/jstree/_docs/types.html +0 -178
  101. data/public/assets2bpacked/jstree/_docs/ui.html +0 -197
  102. data/public/assets2bpacked/jstree/_docs/unique.html +0 -85
  103. data/public/assets2bpacked/jstree/_docs/xml_data.html +0 -218
  104. data/public/assets2bpacked/jstree/_lib/jquery.cookie.js +0 -96
  105. data/public/assets2bpacked/jstree/_lib/jquery.hotkeys.js +0 -99
  106. data/public/assets2bpacked/jstree/_lib/jquery.js +0 -5
  107. data/public/assets2bpacked/jstree/jquery.jstree.js +0 -4564
  108. data/public/assets2bpacked/jstree/themes/apple/bg.jpg +0 -0
  109. data/public/assets2bpacked/jstree/themes/apple/d.png +0 -0
  110. data/public/assets2bpacked/jstree/themes/apple/dot_for_ie.gif +0 -0
  111. data/public/assets2bpacked/jstree/themes/apple/style.css +0 -61
  112. data/public/assets2bpacked/jstree/themes/apple/throbber.gif +0 -0
  113. data/public/assets2bpacked/jstree/themes/classic/d.gif +0 -0
  114. data/public/assets2bpacked/jstree/themes/classic/d.png +0 -0
  115. data/public/assets2bpacked/jstree/themes/classic/dot_for_ie.gif +0 -0
  116. data/public/assets2bpacked/jstree/themes/classic/style.css +0 -77
  117. data/public/assets2bpacked/jstree/themes/classic/throbber.gif +0 -0
  118. data/public/assets2bpacked/jstree/themes/default-rtl/d.gif +0 -0
  119. data/public/assets2bpacked/jstree/themes/default-rtl/d.png +0 -0
  120. data/public/assets2bpacked/jstree/themes/default-rtl/dots.gif +0 -0
  121. data/public/assets2bpacked/jstree/themes/default-rtl/style.css +0 -84
  122. data/public/assets2bpacked/jstree/themes/default-rtl/throbber.gif +0 -0
  123. data/public/assets2bpacked/jstree/themes/default/d.gif +0 -0
  124. data/public/assets2bpacked/jstree/themes/default/d.png +0 -0
  125. data/public/assets2bpacked/jstree/themes/default/style.css +0 -74
  126. data/public/assets2bpacked/jstree/themes/default/throbber.gif +0 -0
@@ -1,69 +0,0 @@
1
- <?php
2
- require_once("config.php");
3
- $jstree = new json_tree();
4
-
5
- //$jstree->_create_default();
6
- //die();
7
-
8
- if(isset($_GET["reconstruct"])) {
9
- $jstree->_reconstruct();
10
- die();
11
- }
12
- if(isset($_GET["analyze"])) {
13
- echo $jstree->_analyze();
14
- die();
15
- }
16
-
17
- if($_REQUEST["operation"] && strpos($_REQUEST["operation"], "_") !== 0 && method_exists($jstree, $_REQUEST["operation"])) {
18
- header("HTTP/1.0 200 OK");
19
- header('Content-type: application/json; charset=utf-8');
20
- header("Cache-Control: no-cache, must-revalidate");
21
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
22
- header("Pragma: no-cache");
23
- echo $jstree->{$_REQUEST["operation"]}($_REQUEST);
24
- die();
25
- }
26
- header("HTTP/1.0 404 Not Found");
27
- ?>
28
-
29
- <?php
30
- /*
31
- $jstree->_drop();
32
- $jstree->create_node(array("id"=>0,"position"=>0));
33
- $jstree->create_node(array("id"=>1,"position"=>0));
34
- $jstree->create_node(array("id"=>1,"position"=>0));
35
- $jstree->create_node(array("id"=>3,"position"=>0,"name"=>"Pesho"));
36
- $jstree->move(3,2,0,true);
37
- $jstree->_dump(true);
38
- $jstree->_reconstruct();
39
- echo $jstree->_analyze();
40
- die();
41
-
42
- $tree = new _tree_struct;
43
- $tree->drop();
44
- $tree->create(0, 0);
45
- $tree->create(0, 0);
46
- $tree->create(1, 0);
47
- $tree->create(0, 3);
48
- $tree->create(2, 3);
49
- $tree->create(2, 0);
50
- $tree->dump(true);
51
- $tree->move(6,4,0);
52
- $tree->move(1,0,0);
53
- $tree->move(3,2,99,true);
54
- $tree->move(7,1,0,true);
55
- $tree->move(1,7,0);
56
- $tree->move(1,0,1,true);
57
- $tree->move(2, 0, 0, true);
58
- $tree->move(13, 12, 2, true);
59
- $tree->dump(true);
60
- $tree->move(15, 16, 2, true);
61
- $tree->dump(true);
62
- $tree->move(4, 0, 0);
63
- $tree->dump(true);
64
- $tree->move(4, 0, 2);
65
- $tree->dump(true);
66
- echo $tree->analyze();
67
- $tree->drop();
68
- */
69
- ?>
@@ -1,48 +0,0 @@
1
- html, body { margin:0; padding:0; background:#D9E3CB; }
2
- body, td, th, pre, code, select, option, input, textarea { font-family:"lucida grande",tahoma,verdana,arial,sans-serif; font-size:10pt; }
3
- #dhead { margin:0 0 0 -10px; padding:0; line-height:80px; font-size:18pt; font-family:Georgia; /*text-shadow:1px 1px 2px gray;*/ border-bottom:10px solid #73796B; margin-bottom:0.5em; text-align:center; width:820px; background:black; color:white; -moz-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0; -webkit-border-radius:5px 5px 0 0; text-indent:-2000px; background:black url("logo.png") center center no-repeat; }
4
- h1 { margin:0 0 0 0px; padding:0; font-size:14pt; font-family:Georgia; /*text-shadow:1px 1px 2px gray;*/ margin-bottom:1em; text-align:center; text-transform:uppercase;}
5
- h2 { margin:0.5em 0 0.5em 0; padding:0.5em 0 0.5em 20px; font-size:12pt; font-family:Georgia; color:white; background:silver; text-shadow:1px 1px 2px gray; clear:both; -moz-border-radius:5px; border-radius:5px; -webkit-border-radius:5px; }
6
- h3 { margin:0; padding:0.5em 0 0.5em 0; font-size:11.5pt; font-family:Georgia; color:gray; clear:both; }
7
- p { padding:0em 0 0.5em 0; margin:0; line-height:1.8em; }
8
- p.meta { font-size:9pt; color:gray; margin-top:-5px; }
9
- .arguments .tp, p code { color:green; padding:0 4px; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size:13px; }
10
- #description, .panel { margin:0 20px; }
11
- #container { width:800px; margin:10px auto; overflow:hidden; background:white; padding:0 10px 10px 10px; -moz-border-radius:5px; border-radius:5px; -webkit-border-radius:5px; -moz-box-shadow: 0px 0px 10px #000; }
12
- .demo { width:255px; float:left; margin:0; border:1px solid gray; background:white; overflow:auto; }
13
- .code { width:490px; float:right; margin:0 0 10px 0; border:1px solid gray; font-size:12px; }
14
- pre { display:block; }
15
- .code_f { border:1px solid gray; margin-bottom:1em; }
16
- .syntaxhighlighter { margin:0 0 0 0 !important; padding:0 !important; line-height:18px; }
17
-
18
- .log { padding:4px; border:1px solid gray; margin-bottom:1em; }
19
- .button { display:block; margin-bottom:0.5em; }
20
- .arguments { margin:0em 1em; padding:0; list-style-type:none; }
21
- .arguments .tp { padding:0 0 0 0; float:left; width:70px; }
22
- .arguments strong { display:block; }
23
-
24
- .api h3 { margin-left:-10px; color:black; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-size:14px; margin-top:2em; border-top:1px solid; width:780px; }
25
- .api .arguments li strong { color:black; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-size:13px; }
26
-
27
- .configuration h3 { margin-left:-10px; color:black; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-size:14px; margin-top:2em; border-top:1px solid; width:780px; }
28
- .note { background:#ffffee; padding:10px 20px; border:1px solid #333; -moz-border-radius:5px; border-radius:5px; -webkit-border-radius:5px; margin-bottom:15px; text-align:center; font-weight:bold; }
29
-
30
- .plugins, .demos { margin:0 auto 20px auto; }
31
-
32
- ul.columns { list-style-type:none; width:700px; margin:0px auto 15px auto; padding:0; overflow:hidden; }
33
- ul.columns li { float:left; margin:0; padding:0 0 0 0px; line-height:18px; width:345px; }
34
- ul.demos li, ul.plugins li { width:220px; text-align:left; padding:5px 0; }
35
- ul.demos li a, ul.plugins li a { text-decoration:none; color:#3B5998; }
36
- ul.demos li a:hover, ul.plugins li a:hover { text-decoration:underline; }
37
- ul.plugins li p { text-align:left; font-size:9px; color:#333; margin:0 5px 0 0; }
38
-
39
- ul.demos li { width:auto; }
40
-
41
- .demo, .demo input, .jstree-dnd-helper, #vakata-contextmenu { font-size:10px; font-family:Verdana; }
42
-
43
- #demo_body .demo, #demo_body .code { width:auto; float:none; clear:both; margin:10px auto; }
44
- #demo_body .code { margin-bottom:20px; }
45
-
46
- ul.jstree { width:700px; margin:0px auto 15px auto; padding:0; }
47
- ul.jstree li { margin:0; padding:2px 0; }
48
- ul.jstree li a { color:#3B5998; text-decoration:underline; }
@@ -1,2 +0,0 @@
1
- <li class="jstree-closed"><a href="#">Node 1</a></li>
2
- <li><a href="#">Node 2</a></li>
@@ -1,4 +0,0 @@
1
- [
2
- { "data" : "A node", "children" : [ { "data" : "Only child", "state" : "closed" } ], "state" : "open" },
3
- "Ajax node"
4
- ]
@@ -1,6 +0,0 @@
1
- [
2
- "Ajax node 1",
3
- "Ajax node 2",
4
- "TARGET",
5
- "Ajax node 4"
6
- ]
@@ -1 +0,0 @@
1
- [ "#root_node" ]
@@ -1,12 +0,0 @@
1
- <root>
2
- <item parent_id="0" id="node_1" state="closed">
3
- <content>
4
- <name><![CDATA[Node 1]]></name>
5
- </content>
6
- </item>
7
- <item parent_id="0" id="node_2">
8
- <content>
9
- <name><![CDATA[Node 2]]></name>
10
- </content>
11
- </item>
12
- </root>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <root>
3
- <item id="pxml_1">
4
- <content><name><![CDATA[Root node 1]]></name></content>
5
- <item id="pxml_2">
6
- <content><name><![CDATA[Child node 1]]></name></content>
7
- </item>
8
- <item id="pxml_3">
9
- <content><name><![CDATA[Child node 2]]></name></content>
10
- </item>
11
- <item id="pxml_4">
12
- <content><name><![CDATA[Some other child node]]></name></content>
13
- </item>
14
- </item>
15
- <item id="pxml_5">
16
- <content><name ><![CDATA[Root node 2]]></name></content>
17
- </item>
18
- </root>
@@ -1,171 +0,0 @@
1
- <!DOCTYPE html
2
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml">
5
- <head>
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
- <title>jsTree v.1.0 - checkbox documentation</title>
8
- <script type="text/javascript" src="../_lib/jquery.js"></script>
9
- <script type="text/javascript" src="../_lib/jquery.cookie.js"></script>
10
- <script type="text/javascript" src="../_lib/jquery.hotkeys.js"></script>
11
- <script type="text/javascript" src="../jquery.jstree.js"></script>
12
-
13
- <link type="text/css" rel="stylesheet" href="syntax/!style.css"/>
14
- <link type="text/css" rel="stylesheet" href="!style.css"/>
15
- <script type="text/javascript" src="syntax/!script.js"></script>
16
- </head>
17
- <body>
18
- <div id="container">
19
-
20
- <h1 id="dhead">jsTree v.1.0</h1>
21
- <h1>checkbox plugin</h1>
22
- <h2>Description</h2>
23
- <div id="description">
24
- <p>The <code>checkbox</code> plugin makes multiselection possible using three-state checkboxes.</p>
25
- </div>
26
-
27
- <h2 id="configuration">Configuration</h2>
28
- <div class="panel configuration">
29
-
30
- <h3>override_ui</h3>
31
- <p class="meta">A boolean. Default is <code>false</code>.</p>
32
- <p>If set to <code>true</code> all selection will be handled by checkboxes. The checkbox plugin will map UI's <a href="ui.html#get_selected">get_selected function</a> to its own <a href="#get_checked">get_checked function</a> and overwrite the <a href="ui.html#reselect">UI reselect function</a>. It will also disable the <code>select_node</code>, <code>deselect_node</code> and <code>deselect_all</code> functions. If left as <code>false</code> nodes can be selected and checked independently. </p>
33
-
34
- <h3>checked_parent_open</h3>
35
- <p class="meta">A Boolean. Default is <code>true</code>.</p>
36
- <p>When set to <code>true</code> when programatically checking a node in the tree all of its closed parents are opened automatically.</p>
37
-
38
- <h3>two_state</h3>
39
- <p class="meta">A boolean. Default is <code>false</code>.</p>
40
- <p>If set to <code>true</code> checkboxes will be two-state only, meaning that you will be able to select parent and children independently and there will be no undetermined state.</p>
41
-
42
- <h3>real_checkboxes</h3>
43
- <p class="meta">A boolean. Default is <code>false</code>.</p>
44
- <p>If set to <code>true</code> real hidden checkboxes will be created for each element, so if the tree is part of a form, checked nodes will be submitted automatically. By default the name of the checkbox is <code>"check_" + <em>the ID of the LI element</em></code> and the value is <code>1</code>, this can be changed using the <code>real_checkboxes_names</code> config option.</p>
45
-
46
- <h3>real_checkboxes_names</h3>
47
- <p class="meta">A function. Default is <code>function (n) { return [("check_" + (n[0].id || Math.ceil(Math.random() * 10000))), 1]; }</code>.</p>
48
- <p>If real checkboxes are used this function is invoked in the current tree's scope for each new checkbox that is created. It receives a single argument - the node that will contain the checkbox. The function must return an array consisting of two values - the name for the checkbox and the value for the checkbox.</p>
49
-
50
- </div>
51
-
52
- <h2 id="demos">Demos</h2>
53
- <div class="panel">
54
- <h3>Using the checkbox plugin - all you need to do is include it in the list of active plugins.</h3>
55
- <div id="demo1" class="demo">
56
- <ul>
57
- <li id="phtml_1">
58
- <a href="#">Root node 1</a>
59
- <ul>
60
- <li id="phtml_2" class="jstree-checked">
61
- <a href="#">Child node 1</a>
62
- </li>
63
- <li id="phtml_3">
64
- <a href="#">A Child node 2</a>
65
- </li>
66
- </ul>
67
- </li>
68
- <li id="phtml_4">
69
- <a href="#">Root node 2</a>
70
- </li>
71
- </ul>
72
- </div>
73
- <script type="text/javascript" class="source">
74
- $(function () {
75
- $("#demo1").jstree({
76
- "plugins" : [ "themes", "html_data", "checkbox", "sort", "ui" ]
77
- });
78
- });
79
- </script>
80
-
81
- </div>
82
-
83
- <h2 id="api">API</h2>
84
- <div class="panel api">
85
- <h3 id="_prepare_checkboxes">._prepare_checkboxes ( node )</h3>
86
- <p>Inserts the checkbox icons on the node. Used internally.</p>
87
- <ul class="arguments">
88
- <li>
89
- <code class="tp">mixed</code> <strong>node</strong>
90
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
91
- </li>
92
- </ul>
93
-
94
- <h3 id="_repair_state">._repair_state ( node )</h3>
95
- <p>Repairs the checkbox state inside the node. Used internally.</p>
96
- <ul class="arguments">
97
- <li>
98
- <code class="tp">mixed</code> <strong>node</strong>
99
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
100
- </li>
101
- </ul>
102
-
103
- <h3 id="change_state">.change_state ( node , uncheck )</h3>
104
- <p>Changes the state of a node. Used mostly internally - you'd be better off using the <code>check_node</code> and <code>uncheck_node</code> functions. Triggers an event.</p>
105
- <ul class="arguments">
106
- <li>
107
- <code class="tp">mixed</code> <strong>node</strong>
108
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
109
- </li>
110
- <li>
111
- <code class="tp">boolean</code> <strong>uncheck</strong>
112
- <p>If set to <code>true</code> the node is unchecked, if set to <code>false</code> the node is checked, otherwise - the state is toggled.</p>
113
- </li>
114
- </ul>
115
-
116
- <h3 id="check_node">.check_node ( node )</h3>
117
- <p>Checks a node.</p>
118
- <ul class="arguments">
119
- <li>
120
- <code class="tp">mixed</code> <strong>node</strong>
121
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
122
- </li>
123
- </ul>
124
-
125
- <h3 id="uncheck_node">.uncheck_node ( node )</h3>
126
- <p>Unchecks a node.</p>
127
- <ul class="arguments">
128
- <li>
129
- <code class="tp">mixed</code> <strong>node</strong>
130
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
131
- </li>
132
- </ul>
133
-
134
- <h3 id="check_all">.check_all ( )</h3>
135
- <p>Checks all nodes.</p>
136
-
137
- <h3 id="uncheck_all">.uncheck_all ( )</h3>
138
- <p>Unchecks all nodes.</p>
139
-
140
- <h3 id="is_checked">.is_checked ( node )</h3>
141
- <p>Checks if a node is checked. Returns boolean.</p>
142
- <ul class="arguments">
143
- <li>
144
- <code class="tp">mixed</code> <strong>node</strong>
145
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
146
- </li>
147
- </ul>
148
-
149
- <div style="height:1px; visibility:hidden; overflow:hidden;"><span id="get_unchecked">&#160;</span></div>
150
- <h3 id="get_checked">.get_checked ( context, get_all ), .get_unchecked ( context, get_all )</h3>
151
- <p>Both functions return jQuery collections.</p>
152
- <ul class="arguments">
153
- <li>
154
- <code class="tp">mixed</code> <strong>context</strong>
155
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree. If specified only nodes inside the specified context are returned, otherwise the whole tree is searched.</p>
156
- </li>
157
- <li>
158
- <code class="tp">boolean</code> <strong>get_all</strong>
159
- <p>By default these functions return only top level checked/unchecked nodes (if a node is checked its children are note returned), if this parameter is set to <code>true</code> they will return all checked/unchecked nodes.</p>
160
- </li>
161
- </ul>
162
-
163
- <div style="height:1px; visibility:hidden; overflow:hidden;"><span id="hide_checkboxes">&#160;</span></div>
164
- <h3 id="show_checkboxes">.show_checkboxes ( ), .hide_checkboxes ( )</h3>
165
- <p>Show or hide the checkbox icons.</p>
166
-
167
- </div>
168
-
169
- </div>
170
- </body>
171
- </html>
@@ -1,121 +0,0 @@
1
- <!DOCTYPE html
2
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml">
5
- <head>
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
- <title>jsTree v.1.0 - contextmenu documentation</title>
8
- <script type="text/javascript" src="../_lib/jquery.js"></script>
9
- <script type="text/javascript" src="../_lib/jquery.cookie.js"></script>
10
- <script type="text/javascript" src="../_lib/jquery.hotkeys.js"></script>
11
- <script type="text/javascript" src="../jquery.jstree.js"></script>
12
-
13
- <link type="text/css" rel="stylesheet" href="syntax/!style.css"/>
14
- <link type="text/css" rel="stylesheet" href="!style.css"/>
15
- <script type="text/javascript" src="syntax/!script.js"></script>
16
- </head>
17
- <body>
18
- <div id="container">
19
-
20
- <h1 id="dhead">jsTree v.1.0</h1>
21
- <h1>contextmenu plugin</h1>
22
- <h2>Description</h2>
23
- <div id="description">
24
- <p>The <code>contextmenu</code> plugin enables a contextual menu to be shown, when the user right-clicks a node (or when triggered programatically by the developer).</p>
25
- </div>
26
-
27
- <h2 id="configuration">Configuration</h2>
28
- <div class="panel configuration">
29
- <h3>select_node</h3>
30
- <p class="meta">Boolean. Default is <code>false</code>.</p>
31
- <p>Whether to select the right clicked node when showing the context menu. If this is set to <code>true</code> and the node is not selected all currently selected nodes will be deselected.</p>
32
-
33
- <h3>show_at_node</h3>
34
- <p class="meta">Boolean. Default is <code>true</code>.</p>
35
- <p>Whether to show the context menu just below the node, or at the clicked point exactly.</p>
36
-
37
- <h3>items</h3>
38
- <p>Expects an object or a function, which should return an object. If a function is used it fired in the tree's context and receives one argument - the node that was right clicked. The object format is:</p>
39
- <div style="border:1px solid gray">
40
- <pre class="brush:js">
41
- {
42
- // Some key
43
- "rename" : {
44
- // The item label
45
- "label" : "Rename",
46
- // The function to execute upon a click
47
- "action" : function (obj) { this.rename(obj); },
48
- // All below are optional
49
- "_disabled" : true, // clicking the item won't do a thing
50
- "_class" : "class", // class is applied to the item LI node
51
- "separator_before" : false, // Insert a separator before the item
52
- "separator_after" : true, // Insert a separator after the item
53
- // false or string - if does not contain `/` - used as classname
54
- "icon" : false,
55
- "submenu" : {
56
- /* Collection of objects (the same structure) */
57
- }
58
- }
59
- /* MORE ENTRIES ... */
60
- }
61
- </pre>
62
- </div>
63
- </div>
64
-
65
- <h2 id="demos">Demos</h2>
66
- <div class="panel">
67
-
68
- <h3>Using the contextmenu</h3>
69
- <div id="demo1" class="demo">
70
- <ul>
71
- <li id="phtml_1">
72
- <a href="#">Root node 1</a>
73
- <ul>
74
- <li id="phtml_2">
75
- <a href="#">Child node 1</a>
76
- </li>
77
- <li id="phtml_3">
78
- <a href="#">Child node 2</a>
79
- </li>
80
- </ul>
81
- </li>
82
- <li id="phtml_4">
83
- <a href="#">Root node 2</a>
84
- </li>
85
- </ul>
86
- </div>
87
- <script type="text/javascript" class="source">
88
- $(function () {
89
- $("#demo1").jstree({
90
- "plugins" : [ "themes", "html_data", "ui", "crrm", "contextmenu" ]
91
- });
92
- });
93
- </script>
94
-
95
- </div>
96
-
97
- <h2 id="api">API</h2>
98
- <div class="panel api">
99
-
100
- <h3 id="show_contextmenu">.show_contextmenu ( node , x, y )</h3>
101
- <p>Shows the contextmenu next to a node. Triggered automatically when right-clicking a node.</p>
102
- <ul class="arguments">
103
- <li>
104
- <code class="tp">mixed</code> <strong>node</strong>
105
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
106
- </li>
107
- <li>
108
- <code class="tp">number</code> <strong>x</strong>
109
- <p>The X-coordinate to show the menu at - may be overwritten by <code>show_at_node</code>. If you omit this the menu is shown aligned with the left of the node.</p>
110
- </li>
111
- <li>
112
- <code class="tp">number</code> <strong>y</strong>
113
- <p>The Y-coordinate to show the menu at - may be overwritten by <code>show_at_node</code>. If you omit this the menu is shown just below the node.</p>
114
- </li>
115
- </ul>
116
-
117
- </div>
118
-
119
- </div>
120
- </body>
121
- </html>