PageRenderTime 44ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/0.1/ccds_library/jquery/plugins/simpletree/index.htm

http://ccds.googlecode.com/
HTML | 333 lines | 288 code | 45 blank | 0 comment | 0 complexity | abde2e9bde15400e86e048ada1b078fe MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  5. <title>SimpleTree Drag&Drop</title>
  6. <style>
  7. body
  8. {
  9. font: normal 12px arial, tahoma, helvetica, sans-serif;
  10. margin:0;
  11. padding:20px;
  12. }
  13. .simpleTree
  14. {
  15. overflow:auto;
  16. margin:0;
  17. padding:0;
  18. /*
  19. width: 250px;
  20. height:350px;
  21. overflow:auto;
  22. border: 1px solid #444444;
  23. */
  24. }
  25. .simpleTree li
  26. {
  27. list-style: none;
  28. margin:0;
  29. padding:0 0 0 34px;
  30. line-height: 14px;
  31. }
  32. .simpleTree li span
  33. {
  34. display:inline;
  35. clear: left;
  36. white-space: nowrap;
  37. }
  38. .simpleTree ul
  39. {
  40. margin:0;
  41. padding:0;
  42. }
  43. .simpleTree .root
  44. {
  45. margin-left:-16px;
  46. background: url(/ccds_library/jquery/plugins/simpletree/images/root.gif) no-repeat 16px 0 #ffffff;
  47. }
  48. .simpleTree .line
  49. {
  50. margin:0 0 0 -16px;
  51. padding:0;
  52. line-height: 3px;
  53. height:3px;
  54. font-size:3px;
  55. background: url(/ccds_library/jquery/plugins/simpletree/images/line_bg.gif) 0 0 no-repeat transparent;
  56. }
  57. .simpleTree .line-last
  58. {
  59. margin:0 0 0 -16px;
  60. padding:0;
  61. line-height: 3px;
  62. height:3px;
  63. font-size:3px;
  64. background: url(/ccds_library/jquery/plugins/simpletree/images/spacer.gif) 0 0 no-repeat transparent;
  65. }
  66. .simpleTree .line-over
  67. {
  68. margin:0 0 0 -16px;
  69. padding:0;
  70. line-height: 3px;
  71. height:3px;
  72. font-size:3px;
  73. background: url(/ccds_library/jquery/plugins/simpletree/images/line_bg_over.gif) 0 0 no-repeat transparent;
  74. }
  75. .simpleTree .line-over-last
  76. {
  77. margin:0 0 0 -16px;
  78. padding:0;
  79. line-height: 3px;
  80. height:3px;
  81. font-size:3px;
  82. background: url(/ccds_library/jquery/plugins/simpletree/images/line_bg_over_last.gif) 0 0 no-repeat transparent;
  83. }
  84. .simpleTree .folder-open
  85. {
  86. margin-left:-16px;
  87. background: url(/ccds_library/jquery/plugins/simpletree/images/collapsable.gif) 0 -2px no-repeat #fff;
  88. }
  89. .simpleTree .folder-open-last
  90. {
  91. margin-left:-16px;
  92. background: url(/ccds_library/jquery/plugins/simpletree/images/collapsable-last.gif) 0 -2px no-repeat #fff;
  93. }
  94. .simpleTree .folder-close
  95. {
  96. margin-left:-16px;
  97. background: url(/ccds_library/jquery/plugins/simpletree/images/expandable.gif) 0 -2px no-repeat #fff;
  98. }
  99. .simpleTree .folder-close-last
  100. {
  101. margin-left:-16px;
  102. background: url(/ccds_library/jquery/plugins/simpletree/images/expandable-last.gif) 0 -2px no-repeat #fff;
  103. }
  104. .simpleTree .doc
  105. {
  106. margin-left:-16px;
  107. background: url(/ccds_library/jquery/plugins/simpletree/images/leaf.gif) 0 -1px no-repeat #fff;
  108. }
  109. .simpleTree .doc-last
  110. {
  111. margin-left:-16px;
  112. background: url(/ccds_library/jquery/plugins/simpletree/images/leaf-last.gif) 0 -1px no-repeat #fff;
  113. }
  114. .simpleTree .ajax
  115. {
  116. background: url(/ccds_library/jquery/plugins/simpletree/images/spinner.gif) no-repeat 0 0 #ffffff;
  117. height: 16px;
  118. display:none;
  119. }
  120. .simpleTree .ajax li
  121. {
  122. display:none;
  123. margin:0;
  124. padding:0;
  125. }
  126. .simpleTree .trigger
  127. {
  128. display:inline;
  129. margin-left:-32px;
  130. width: 28px;
  131. height: 11px;
  132. cursor:pointer;
  133. }
  134. .simpleTree .text
  135. {
  136. cursor: default;
  137. }
  138. .simpleTree .active
  139. {
  140. cursor: default;
  141. background-color:#F7BE77;
  142. padding:0px 2px;
  143. border: 1px dashed #444;
  144. }
  145. #drag_container
  146. {
  147. background:#ffffff;
  148. color:#000;
  149. font: normal 11px arial, tahoma, helvetica, sans-serif;
  150. border: 1px dashed #767676;
  151. }
  152. #drag_container ul
  153. {
  154. list-style: none;
  155. padding:0;
  156. margin:0;
  157. }
  158. #drag_container li
  159. {
  160. list-style: none;
  161. background-color:#ffffff;
  162. line-height:18px;
  163. white-space: nowrap;
  164. padding:1px 1px 0px 16px;
  165. margin:0;
  166. }
  167. #drag_container li span
  168. {
  169. padding:0;
  170. }
  171. #drag_container li.doc, #drag_container li.doc-last
  172. {
  173. background: url(/ccds_library/jquery/plugins/simpletree/images/leaf.gif) no-repeat -17px 0 #ffffff;
  174. }
  175. #drag_container .folder-close, #drag_container .folder-close-last
  176. {
  177. background: url(/ccds_library/jquery/plugins/simpletree/images/expandable.gif) no-repeat -17px 0 #ffffff;
  178. }
  179. #drag_container .folder-open, #drag_container .folder-open-last
  180. {
  181. background: url(/ccds_library/jquery/plugins/simpletree/images/collapsable.gif) no-repeat -17px 0 #ffffff;
  182. }
  183. </style>
  184. <script type="text/javascript" src="/ccds_library/jquery/core.js"> </script>
  185. <script type="text/javascript" src="/ccds_library/jquery/ajax.js"> </script>
  186. <script type="text/javascript" src="/ccds_library/jquery/dimensions.js"> </script>
  187. <script type="text/javascript" src="/ccds_library/jquery/event.js"> </script>
  188. <script type="text/javascript" src="/ccds_library/jquery/fx.js"> </script>
  189. <script type="text/javascript" src="/ccds_library/jquery/offset.js"> </script>
  190. <script type="text/javascript" src="/ccds_library/jquery/selector.js"> </script>
  191. <script type="text/javascript" src="/ccds_library/jquery/ui.core.js"> </script>
  192. <script type="text/javascript" src="/ccds_library/jquery/ui.dialog.js"></script>
  193. <script type="text/javascript" src="/ccds_library/jquery/ui.draggable.js"></script>
  194. <script type="text/javascript" src="/ccds_library/jquery/ui.droppable.js"></script>
  195. <script type="text/javascript" src="jquery.simple.tree.js"></script>
  196. <script type="text/javascript">
  197. var simpleTreeCollection;
  198. $(document).ready(function(){
  199. simpleTreeCollection = $('.simpleTree').simpleTree({
  200. autoclose: true,
  201. afterClick:function(node){
  202. //alert("text-"+$('span:first',node).text());
  203. },
  204. afterDblClick:function(node){
  205. //alert("text-"+$('span:first',node).text());
  206. },
  207. afterMove:function(destination, source, pos){
  208. //alert("destination-"+$('span:first',destination).text()+" source-"+$('span:first',source).text()+" pos-"+pos);
  209. },
  210. afterAjax:function()
  211. {
  212. //alert('Loaded');
  213. },
  214. animate:true
  215. //,docToFolderConvert:true
  216. });
  217. });
  218. </script>
  219. </head>
  220. <body>
  221. <p onclick="alert(simpleTreeCollection.get(0).getSelected().find('>span').text())">get Selected Text</p>
  222. <ul class="simpleTree">
  223. <li class="root" id='1'><span>Tree Root 1</span>
  224. <ul>
  225. <li class="open" id='2'><span>Tree Node 1</span>
  226. <ul>
  227. <li id='3'><span>Tree Node 1-1</span>
  228. <ul class="ajax">
  229. <li id='4'>{url:loadTree.php?tree_id=1}</li>
  230. </ul>
  231. </li>
  232. </ul>
  233. </li>
  234. <li id='5'><span>Tree Node 2</span>
  235. <ul>
  236. <li id='6'><span>Tree Node 2-1</span>
  237. <ul>
  238. <li id='7'><span>Tree Node 2-1-1</span></li>
  239. <li id='8'><span>Tree Node 2-1-2</span></li>
  240. <li id='9'><span>Tree Node 2-1-3</span></li>
  241. <li id='10'><span>Tree Node 2-1-4</span>
  242. <ul class="ajax">
  243. <li id='11'>{url:loadTree.php?tree_id=1}</li>
  244. </ul>
  245. </li>
  246. </ul>
  247. </li>
  248. <li id='12'><span>Tree Node 2-2</span>
  249. <ul>
  250. <li id='13'><span>Tree Node 2-2-1</span></li>
  251. </ul>
  252. </li>
  253. <li id='14'><span>Tree Node 2-3</span>
  254. <ul>
  255. <li id='15'><span>Tree Node 2-3-1</span>
  256. <ul>
  257. <li id='16'><span>Tree Node 2-3-1-1</span></li>
  258. <li id='17'><span>Tree Node 2-3-1-2</span></li>
  259. <li id='18'><span>Tree Node 2-3-1-3</span>
  260. <ul>
  261. <li id='19'><span>Tree Node 2-3-1-3-1</span></li>
  262. </ul>
  263. </li>
  264. <li id='20'><span>Tree Node 2-3-1-4</span></li>
  265. <li id='21'><span>Tree Node 2-3-1-5</span></li>
  266. <li id='22'><span>Tree Node 2-3-1-6</span>
  267. <ul>
  268. <li id='23'><span>Tree Node 2-3-1-6-1</span></li>
  269. </ul>
  270. </li>
  271. <li id='24'><span>Tree Node 2-3-1-7</span></li>
  272. <li id='25'><span>Tree Node 2-3-1-8</span></li>
  273. <li id='26'><span>Tree Node 2-3-1-9</span>
  274. <ul>
  275. <li id='27'><span>Tree Node 2-3-1-9-1</span></li>
  276. </ul>
  277. </li>
  278. </ul>
  279. </li>
  280. </ul>
  281. </li>
  282. </ul>
  283. </li>
  284. </ul>
  285. </li>
  286. </ul>
  287. </body>
  288. </html>