├── LICENSE ├── README.md ├── odtree ├── __init__.py ├── __manifest__.py ├── i18n │ ├── en_GB.po │ ├── odtree.pot │ └── zh_CN.po ├── models │ ├── __init__.py │ └── ir_ui_view.py ├── rng │ ├── common.rng │ └── tree_view.rng ├── static │ ├── description │ │ ├── demo.jpg │ │ ├── demo2.jpg │ │ ├── icon.png │ │ └── index.html │ └── src │ │ ├── js │ │ └── odtree.js │ │ ├── lib │ │ └── zTree_v3 │ │ │ ├── css │ │ │ ├── awesomeStyle │ │ │ │ ├── awesome.css │ │ │ │ ├── awesome.less │ │ │ │ ├── fa.less │ │ │ │ └── img │ │ │ │ │ └── loading.gif │ │ │ ├── demo.css │ │ │ ├── metroStyle │ │ │ │ ├── img │ │ │ │ │ ├── line_conn.png │ │ │ │ │ ├── loading.gif │ │ │ │ │ ├── metro.gif │ │ │ │ │ └── metro.png │ │ │ │ └── metroStyle.css │ │ │ └── zTreeStyle │ │ │ │ ├── img │ │ │ │ ├── diy │ │ │ │ │ ├── 1_close.png │ │ │ │ │ ├── 1_open.png │ │ │ │ │ ├── 2.png │ │ │ │ │ ├── 3.png │ │ │ │ │ ├── 4.png │ │ │ │ │ ├── 5.png │ │ │ │ │ ├── 6.png │ │ │ │ │ ├── 7.png │ │ │ │ │ ├── 8.png │ │ │ │ │ └── 9.png │ │ │ │ ├── line_conn.gif │ │ │ │ ├── loading.gif │ │ │ │ ├── zTreeStandard.gif │ │ │ │ └── zTreeStandard.png │ │ │ │ └── zTreeStyle.css │ │ │ └── js │ │ │ ├── jquery-1.4.4.min.js │ │ │ ├── jquery.ztree.all.js │ │ │ ├── jquery.ztree.all.min.js │ │ │ ├── jquery.ztree.core.js │ │ │ ├── jquery.ztree.core.min.js │ │ │ ├── jquery.ztree.excheck.js │ │ │ ├── jquery.ztree.excheck.min.js │ │ │ ├── jquery.ztree.exedit.js │ │ │ ├── jquery.ztree.exedit.min.js │ │ │ ├── jquery.ztree.exhide.js │ │ │ └── jquery.ztree.exhide.min.js │ │ ├── scss │ │ └── odtree.scss │ │ └── xml │ │ └── odtree.xml └── views │ └── odtree_templates.xml ├── odtree_hr ├── __init__.py ├── __manifest__.py ├── static │ └── description │ │ ├── demo.jpg │ │ ├── icon.png │ │ └── index.html └── views │ └── hr_view.xml └── odtree_product ├── __init__.py ├── __manifest__.py ├── static └── description │ ├── demo.jpg │ ├── icon.png │ └── index.html └── views └── product_view.xml /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # odtree 2 | Custom Tree Structure In ListView or KanbanView ,eg: Product category tree ,Department tree 3 | 4 | product kanview(listView) in the category tree 5 | === 6 | 7 | 8 | empoyee kanview(listView) in th department tree 9 | === 10 | 11 | 12 | usage 13 | ---------------------------- 14 | treelist view: 15 | ``` 16 | 17 | categ_id 18 | product.category 19 | parent_id 20 | 21 | ``` 22 | 23 | kanban view: 24 | ``` 25 | 26 | categ_id 27 | product.category 28 | parent_id 29 | 30 | ``` 31 | 32 | thanks for the opensource libs used in this module: 33 | https://github.com/zTree/zTree_v3 34 | https://github.com/jquery/jquery 35 | https://github.com/odoo/odoo -------------------------------------------------------------------------------- /odtree/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # odtree 5 | # author:15251908@qq.com (openliu) 6 | # license:'LGPL-3 7 | # 8 | ############################################################################## 9 | 10 | from . import models; 11 | 12 | 13 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: 14 | -------------------------------------------------------------------------------- /odtree/__manifest__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # odtree 5 | # author:15251908@qq.com (openliu) 6 | # license:'LGPL-3 7 | # 8 | ############################################################################## 9 | 10 | { 11 | 'name': 'Odoo Tree', 12 | 'version': '1.0', 13 | 'category': 'OdTree', 14 | 'sequence': 14, 15 | 'license':'LGPL-3', 16 | 'description': """ 17 | Custom Tree Structure In ListView or KanbanView , 18 | eg: Product category tree ,Department tree 19 | """, 20 | 'author': 'openliu', 21 | 'website': 'http://www.openliu.com', 22 | 'images': [], 23 | 'depends': ['web'], 24 | 'qweb': [ 25 | "static/src/xml/odtree.xml", 26 | ], 27 | 'data': [ 28 | 'views/odtree_templates.xml', 29 | ], 30 | 'installable': True, 31 | 'auto_install': False, 32 | 'application': False, 33 | } 34 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: 35 | -------------------------------------------------------------------------------- /odtree/i18n/en_GB.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * odtree 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 12.0alpha1\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2019-08-14 03:25+0000\n" 10 | "PO-Revision-Date: 2019-08-14 03:25+0000\n" 11 | "Last-Translator: <>\n" 12 | "Language-Team: \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: \n" 17 | 18 | #. module: odtree 19 | #. openerp-web 20 | #: code:addons/odtree/static/src/xml/odtree.xml:5 21 | #, python-format 22 | msgid "Include Sub-node" 23 | msgstr "" 24 | 25 | #. module: odtree 26 | #: model:ir.model,name:odtree.model_ir_ui_view 27 | msgid "ir.ui.view" 28 | msgstr "" 29 | 30 | -------------------------------------------------------------------------------- /odtree/i18n/odtree.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * odtree 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 12.0alpha1\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2019-08-14 03:30+0000\n" 10 | "PO-Revision-Date: 2019-08-14 03:30+0000\n" 11 | "Last-Translator: <>\n" 12 | "Language-Team: \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: \n" 17 | 18 | #. module: odtree 19 | #. openerp-web 20 | #: code:addons/odtree/static/src/xml/odtree.xml:5 21 | #, python-format 22 | msgid "Include Sub-node" 23 | msgstr "" 24 | 25 | #. module: odtree 26 | #: model:ir.model,name:odtree.model_ir_ui_view 27 | msgid "ir.ui.view" 28 | msgstr "" 29 | 30 | -------------------------------------------------------------------------------- /odtree/i18n/zh_CN.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * odtree 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 12.0alpha1\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2019-08-14 03:25+0000\n" 10 | "PO-Revision-Date: 2019-08-14 03:25+0000\n" 11 | "Last-Translator: <>\n" 12 | "Language-Team: \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: \n" 17 | 18 | #. module: odtree 19 | #. openerp-web 20 | #: code:addons/odtree/static/src/xml/odtree.xml:5 21 | #, python-format 22 | msgid "Include Sub-node" 23 | msgstr "包含子节点" 24 | 25 | #. module: odtree 26 | #: model:ir.model,name:odtree.model_ir_ui_view 27 | msgid "ir.ui.view" 28 | msgstr "" 29 | 30 | -------------------------------------------------------------------------------- /odtree/models/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Part of Odoo. See LICENSE file for full copyright and licensing details. 3 | 4 | from . import ir_ui_view 5 | -------------------------------------------------------------------------------- /odtree/models/ir_ui_view.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # odtree 5 | # author:15251908@qq.com (openliu) 6 | # license:'LGPL-3 7 | # 8 | ############################################################################## 9 | 10 | import logging 11 | import os 12 | 13 | from lxml import etree 14 | 15 | from odoo import models, tools 16 | from odoo.tools import view_validation 17 | from odoo.tools.view_validation import _relaxng_cache 18 | 19 | _logger = logging.getLogger(__name__) 20 | 21 | 22 | def relaxng_odtree(view_type): 23 | """ Return a validator for the given view type, or None. """ 24 | if view_type not in _relaxng_cache: 25 | if (view_type == 'tree'): 26 | folder='odtree' 27 | else: 28 | folder='base' 29 | with tools.file_open(os.path.join(folder, 'rng', '%s_view.rng' % view_type)) as frng: 30 | try: 31 | relaxng_doc = etree.parse(frng) 32 | _relaxng_cache[view_type] = etree.RelaxNG(relaxng_doc) 33 | except Exception: 34 | _logger.exception('Failed to load RelaxNG XML schema for views validation') 35 | _relaxng_cache[view_type] = None 36 | return _relaxng_cache[view_type] 37 | 38 | 39 | class View(models.Model): 40 | _inherit = 'ir.ui.view' 41 | 42 | def __init__(self, *args, **kwargs): 43 | super(View, self).__init__(*args, **kwargs) 44 | view_validation.relaxng=relaxng_odtree -------------------------------------------------------------------------------- /odtree/rng/common.rng: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | before 19 | 20 | after 21 | 22 | inside 23 | 24 | replace 25 | 26 | 27 | 28 | 29 | 30 | attributes 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 1 266 | 0 267 | 268 | 269 | 270 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | -------------------------------------------------------------------------------- /odtree/rng/tree_view.rng: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | top 46 | bottom 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 1 55 | True 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /odtree/static/description/demo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/description/demo.jpg -------------------------------------------------------------------------------- /odtree/static/description/demo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/description/demo2.jpg -------------------------------------------------------------------------------- /odtree/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/description/icon.png -------------------------------------------------------------------------------- /odtree/static/description/index.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Custom Tree Structure In ListView or KanbanView

4 |

Product Category Tree.

5 |
6 |
7 | 8 |
9 |
10 |

Employee Department Tree.

11 |
12 |
13 | 14 |
15 |
16 |
17 |
18 | 19 |
20 |
21 |

Usage

22 |
23 | Extending a listview or a kanbanview, and specify the value of new attributes :
24 | categ_property,categ_model,categ_parent_key(optional) ; 25 |

26 |

27 | An typical inherited view declaration looks like this: 28 |
29 | 30 | 31 |

32 | <record id="view_employee_tree_with_dpttree" model="ir.ui.view">
33 | <field name="name">hr.employee.tree</field>
34 | <field name="model">hr.employee</field>
35 | <field name="inherit_id" ref="hr.view_employee_tree" />
36 | <field name="arch" type="xml">
37 |     <xpath expr="//tree" position="attributes">
38 |         <attribute name="categ_property">department_id</attribute>  <----- the field relate to the tree Structure in the model
39 |         <attribute name="categ_model">hr.department</attribute>     <----- the model of the tree Structure
40 |         <attribute name="categ_parent_key">parent_id</attribute>    <----- (optional)if only want to get a single layer tree,do not specify a value for this attribute
41 |     </xpath>
42 | </field>
43 | </record> 44 |

45 |
46 | 47 |
48 |
49 | 50 | 51 |
52 |
53 | -------------------------------------------------------------------------------- /odtree/static/src/js/odtree.js: -------------------------------------------------------------------------------- 1 | // ############################################################################## 2 | // # odtree 3 | // # author:15251908@qq.com (openliu) 4 | // # license:'LGPL-3 5 | // # 6 | // ############################################################################## 7 | odoo.define('odtree', function (require) { 8 | "use strict"; 9 | 10 | var core = require('web.core'); 11 | var ajax = require('web.ajax'); 12 | var ListController = require('web.ListController'); 13 | var ListRenderer = require('web.ListRenderer'); 14 | var KanbanController = require('web.KanbanController'); 15 | var KanbanRenderer = require('web.KanbanRenderer'); 16 | var qweb = core.qweb; 17 | 18 | var node_id_selected = 0; 19 | var treejson = []; 20 | var treeObj; 21 | var last_view_type; 22 | var controller; 23 | var renderer; 24 | 25 | 26 | var buildTree = function () { 27 | var categ_model=renderer.arch.attrs.categ_model; 28 | var categ_property=renderer.arch.attrs.categ_property; 29 | var categ_parent_key=renderer.arch.attrs.categ_parent_key; 30 | var setting = { 31 | data: { 32 | simpleData: { 33 | enable: true 34 | } 35 | }, 36 | callback: { 37 | onClick: function (event, treeId, treeNode, clickFlag) { 38 | node_id_selected = treeNode.id; 39 | var search_view = controller.searchView; 40 | var search_data = search_view.build_search_data(); 41 | var domains = search_data.domains; 42 | if (categ_property && categ_model) { 43 | if (node_id_selected != null && node_id_selected > 0) { 44 | var include_children = renderer.getParent().$('#include_children').get(0).checked; 45 | var operation = include_children ? 'child_of' : '='; 46 | domains[domains.length] = [[categ_property, operation, node_id_selected]]; 47 | } 48 | } 49 | search_view.trigger_up('search', search_data); 50 | } 51 | } 52 | }; 53 | if (controller.searchView==undefined){ 54 | $('.o_list_view_categ').hide(); 55 | return true 56 | 57 | } 58 | 59 | 60 | var fields = ['id', 'name']; 61 | if (categ_parent_key != null) { 62 | fields.push(categ_parent_key); 63 | } 64 | var ctx =renderer.state.getContext(); 65 | ajax.jsonRpc('/web/dataset/call_kw', 'call', { 66 | model: categ_model, 67 | method: 'search_read', 68 | args: [], 69 | kwargs: { 70 | domain: [], 71 | fields: fields, 72 | order: 'id asc', 73 | context: ctx 74 | } 75 | }).then(function (respdata) { 76 | if (respdata.length > 0) { 77 | var treejson_cur = []; 78 | for (var index = 0; index < respdata.length; index++) { 79 | var obj = respdata[index]; 80 | var parent_id = 0; 81 | if (obj.hasOwnProperty(categ_parent_key)) { 82 | parent_id = obj[categ_parent_key]; 83 | if (parent_id) { 84 | parent_id = parent_id[0]; 85 | } 86 | } 87 | treejson_cur.push({id: obj['id'], pId: parent_id, name: obj['name'], open: true}); 88 | } 89 | if (renderer.getParent().$('.o_list_view_categ').length === 0 90 | || last_view_type !== renderer.viewType 91 | || (JSON.stringify(treejson) !== JSON.stringify(treejson_cur))) { 92 | last_view_type =renderer.viewType; 93 | renderer.getParent().$('.o_list_view_categ').remove(); 94 | renderer.getParent().$('.o_kanban_view').addClass(' col-xs-12 col-md-10'); 95 | treejson=treejson_cur; 96 | var fragment = document.createDocumentFragment(); 97 | var content = qweb.render('Odtree'); 98 | $(content).appendTo(fragment); 99 | renderer.getParent().$el.prepend(fragment); 100 | treeObj = $.fn.zTree.init(renderer.getParent().$('.ztree'), setting, treejson); 101 | renderer.getParent().$(".handle_menu_arrow").on('click', function (e) { 102 | if ( renderer.getParent().$('.handle_menu_arrow').hasClass("handle_menu_arrow_left")){ 103 | renderer.getParent().$('.odtree_control_panel').css("display","none"); 104 | renderer.getParent().$('.o_list_view_categ').css("border-right", "0px"); 105 | renderer.getParent().$('.handle_menu_arrow').removeClass("handle_menu_arrow_left"); 106 | renderer.getParent().$('.handle_menu_arrow').addClass("handle_menu_arrow_right"); 107 | renderer.getParent().$('.ztree').css("display","none"); 108 | renderer.getParent().$('.o_list_view_categ').removeClass('col-xs-12 col-md-2'); 109 | renderer.getParent().$('.o_list_view_categ').addClass('o_list_view_categ_hidden'); 110 | renderer.getParent().$('.o_kanban_view').removeClass(' col-xs-12 col-md-10'); 111 | }else{ 112 | renderer.getParent().$('.odtree_control_panel').css("display","block"); 113 | renderer.getParent().$('.o_list_view_categ').css({"border-right": "1px solid #b9b9b9"}); 114 | renderer.getParent().$('.handle_menu_arrow').removeClass("handle_menu_arrow_right"); 115 | renderer.getParent().$('.handle_menu_arrow').addClass("handle_menu_arrow_left"); 116 | renderer.getParent().$('.ztree').css("display","block"); 117 | renderer.getParent().$('.o_list_view_categ').removeClass('o_list_view_categ_hidden'); 118 | renderer.getParent().$('.o_list_view_categ').addClass('col-xs-12 col-md-2'); 119 | renderer.getParent().$('.o_kanban_view').addClass(' col-xs-12 col-md-10'); 120 | } 121 | }); 122 | } 123 | if (node_id_selected != null && node_id_selected > 0) { 124 | var node = treeObj.getNodeByParam('id', node_id_selected, null); 125 | treeObj.selectNode(node); 126 | } 127 | } 128 | }); 129 | 130 | }; 131 | 132 | ListController.include({ 133 | renderPager: function () { 134 | controller=this; 135 | return this._super.apply(this, arguments); 136 | } 137 | }); 138 | 139 | KanbanController.include({ 140 | renderPager: function () { 141 | controller=this; 142 | return this._super.apply(this, arguments); 143 | } 144 | }); 145 | 146 | // 147 | ListRenderer.include({ 148 | // init: function () { 149 | // this.$(window).scroll(function(){ 150 | // var leftWidth=$(window).scrollLeft(); 151 | // this.$('.o_list_view_categ').scrollLeft(leftWidth); 152 | // }); 153 | // }, 154 | 155 | _renderView: function () { 156 | renderer=this; 157 | var result = this._super.apply(this, arguments); 158 | if (this.arch.attrs.categ_property && this.arch.attrs.categ_model) { 159 | this.getParent().$('.table-responsive').addClass("o_list_view_width_withcateg"); 160 | this.getParent().$('.table-responsive').css("width",'auto'); 161 | this.getParent().$('.table-responsive').css("overflow-x", "auto"); 162 | buildTree(); 163 | } else { 164 | this.getParent().$('.o_list_view_categ').remove(); 165 | } 166 | return result; 167 | } 168 | }); 169 | 170 | KanbanRenderer.include({ 171 | 172 | _renderView: function () { 173 | renderer=this; 174 | var result = this._super.apply(this, arguments); 175 | if (this.arch.attrs.categ_property && this.arch.attrs.categ_model) { 176 | buildTree(); 177 | } else { 178 | this.getParent().$('.o_list_view_categ').remove(); 179 | } 180 | return result; 181 | } 182 | }); 183 | 184 | }); 185 | -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/awesomeStyle/awesome.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style using fontawesome instead of images 3 | 4 | version: 1.1 5 | author: Mike King 6 | email: mikkelking @ hotmail . com 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | /* Definitions ----------------------*/ 11 | /* End of Definitions ---------------*/ 12 | /* Imports -------------------------*/ 13 | /* End of Imports ------------------*/ 14 | .ztree * { 15 | padding: 0; 16 | margin: 0; 17 | font-size: 12px; 18 | font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif; 19 | background-color: #af0000; 20 | } 21 | .ztree { 22 | margin: 0; 23 | padding: 5px; 24 | color: #ffffff; 25 | background-color: #af0000; 26 | } 27 | .ztree li { 28 | padding: 0; 29 | margin: 0; 30 | list-style: none; 31 | line-height: 17px; 32 | text-align: left; 33 | white-space: nowrap; 34 | outline: 0; 35 | } 36 | .ztree li ul { 37 | margin: 0px; 38 | padding: 0 0 0 18px; 39 | } 40 | .ztree li a { 41 | padding-right: 3px; 42 | margin: 0; 43 | cursor: pointer; 44 | height: 17px; 45 | color: #ffffff; 46 | background-color: transparent; 47 | text-decoration: none; 48 | vertical-align: top; 49 | display: inline-block; 50 | } 51 | .ztree li a input.rename { 52 | height: 14px; 53 | width: 80px; 54 | padding: 0; 55 | margin: 0; 56 | color: #af0000; 57 | background-color: #ffffff; 58 | font-size: 12px; 59 | border: 1px #585956 solid; 60 | *border: 0px; 61 | } 62 | .ztree li a:hover { 63 | text-decoration: underline; 64 | } 65 | .ztree li a.curSelectedNode { 66 | padding-top: 0px; 67 | background-color: #af4040; 68 | color: #ffff00; 69 | height: 17px; 70 | opacity: 0.8; 71 | } 72 | .ztree li a.curSelectedNode_Edit { 73 | padding-top: 0px; 74 | background-color: transparent; 75 | color: #ffff00; 76 | height: 17px; 77 | border: 1px #666 solid; 78 | opacity: 0.8; 79 | } 80 | .ztree li a.tmpTargetNode_inner { 81 | padding-top: 0px; 82 | background-color: #aaa; 83 | color: #ffff00; 84 | height: 17px; 85 | border: 1px #666 solid; 86 | opacity: 0.8; 87 | filter: alpha(opacity=80); 88 | } 89 | .ztree li span { 90 | line-height: 17px; 91 | margin-right: 2px; 92 | background-color: transparent; 93 | } 94 | .ztree li span.button { 95 | line-height: 0; 96 | margin: 0; 97 | padding: 0; 98 | width: 15px; 99 | height: 17px; 100 | display: inline-block; 101 | vertical-align: top; 102 | border: 0px solid; 103 | cursor: pointer; 104 | outline: none; 105 | background-color: transparent; 106 | background-repeat: no-repeat; 107 | background-attachment: scroll; 108 | } 109 | .ztree li span.button::before { 110 | color: #ffffff; 111 | font-family: FontAwesome; 112 | padding-top: 10px; 113 | } 114 | .ztree li span.button.chk { 115 | margin: 0px; 116 | cursor: auto; 117 | width: 12px; 118 | display: inline-block; 119 | padding-top: 10px; 120 | padding-left: 2px; 121 | } 122 | .ztree li span.button.chk.checkbox_false_full::before { 123 | content: "\f096"; 124 | } 125 | .ztree li span.button.chk.checkbox_false_full_focus::before { 126 | content: "\f096"; 127 | color: #ffff00; 128 | } 129 | .ztree li span.button.chk.checkbox_false_part::before { 130 | content: "\f096"; 131 | color: #aaaaaa; 132 | } 133 | .ztree li span.button.chk.checkbox_false_part_focus::before { 134 | content: "\f096"; 135 | color: #cad96c; 136 | } 137 | .ztree li span.button.chk.checkbox_false_disable::before { 138 | content: "\f096"; 139 | color: #808080; 140 | } 141 | .ztree li span.button.chk.checkbox_true_full::before { 142 | content: "\f046"; 143 | } 144 | .ztree li span.button.chk.checkbox_true_full_focus::before { 145 | content: "\f046"; 146 | } 147 | .ztree li span.button.chk.checkbox_true_part::before { 148 | content: "\f14a"; 149 | } 150 | .ztree li span.button.chk.checkbox_true_part_focus::before { 151 | content: "\f14a"; 152 | color: #ffff00; 153 | } 154 | .ztree li span.button.chk.checkbox_true_full_focus::before { 155 | content: "\f046"; 156 | color: #ffff00; 157 | } 158 | .ztree li span.button.chk.checkbox_true_part::before { 159 | content: "\f046"; 160 | color: #aaaaaa; 161 | } 162 | .ztree li span.button.chk.checkbox_true_part_focus::before { 163 | content: "\f046"; 164 | color: #cad96c; 165 | } 166 | .ztree li span.button.chk.checkbox_true_disable::before { 167 | content: "\f046"; 168 | color: #808080; 169 | } 170 | .ztree li span.button.chk.radio_false_full::before { 171 | content: "\f10c"; 172 | } 173 | .ztree li span.button.chk.radio_false_full_focus::before { 174 | content: "\f10c"; 175 | color: #ffff00; 176 | } 177 | .ztree li span.button.chk.radio_false_part::before { 178 | content: "\f10c"; 179 | color: #aaaaaa; 180 | } 181 | .ztree li span.button.chk.radio_false_part_focus::before { 182 | content: "\f10c"; 183 | color: #ffff00; 184 | } 185 | .ztree li span.button.chk.radio_false_disable::before { 186 | content: "\f1db"; 187 | color: #808080; 188 | } 189 | .ztree li span.button.chk.radio_true_full::before { 190 | content: "\f192"; 191 | } 192 | .ztree li span.button.chk.radio_true_full_focus::before { 193 | content: "\f192"; 194 | color: #ffff00; 195 | } 196 | .ztree li span.button.chk.radio_true_part::before { 197 | content: "\f192"; 198 | color: #aaaaaa; 199 | } 200 | .ztree li span.button.chk.radio_true_part_focus::before { 201 | content: "\f192"; 202 | color: #aaaaaa; 203 | } 204 | .ztree li span.button.chk.radio_true_disable::before { 205 | content: "\f1db"; 206 | color: #808080; 207 | } 208 | .ztree li span.button.switch { 209 | width: 15px; 210 | height: 17px; 211 | } 212 | .ztree li span.button.root_open::before { 213 | content: "\f078"; 214 | padding-top: 10px; 215 | padding-left: 2px; 216 | display: inline-block; 217 | } 218 | .ztree li span.button.root_close::before { 219 | content: "\f115"; 220 | padding-top: 10px; 221 | padding-left: 2px; 222 | display: inline-block; 223 | } 224 | .ztree li span.button.roots_open::before { 225 | content: "\f078"; 226 | padding-top: 10px; 227 | padding-left: 2px; 228 | display: inline-block; 229 | } 230 | .ztree li span.button.roots_close::before { 231 | content: "\f054"; 232 | padding-top: 10px; 233 | padding-left: 2px; 234 | display: inline-block; 235 | } 236 | .ztree li span.button.center_open::before { 237 | content: "\f078"; 238 | padding-top: 10px; 239 | padding-left: 2px; 240 | display: inline-block; 241 | } 242 | .ztree li span.button.center_close::before { 243 | content: "\f054"; 244 | padding-top: 10px; 245 | padding-left: 2px; 246 | display: inline-block; 247 | } 248 | .ztree li span.button.bottom_open::before { 249 | content: "\f078"; 250 | padding-top: 10px; 251 | padding-left: 2px; 252 | display: inline-block; 253 | } 254 | .ztree li span.button.bottom_close::before { 255 | content: "\f054"; 256 | padding-top: 10px; 257 | padding-left: 2px; 258 | display: inline-block; 259 | } 260 | .ztree li span.button.root_docu { 261 | background: none; 262 | } 263 | .ztree li span.button.roots_docu::before { 264 | content: "\f022"; 265 | padding-left: 2px; 266 | display: inline-block; 267 | color: #ffffff; 268 | } 269 | .ztree li span.button.center_docu::before { 270 | padding-top: 10px; 271 | padding-left: 2px; 272 | display: inline-block; 273 | color: #ffffff; 274 | } 275 | .ztree li span.button.bottom_docu::before { 276 | padding-top: 10px; 277 | padding-left: 2px; 278 | display: inline-block; 279 | color: #ffffff; 280 | } 281 | .ztree li span.button.noline_docu { 282 | background: none; 283 | } 284 | .ztree li span.button.ico_open::before { 285 | content: "\f115"; 286 | font-family: FontAwesome; 287 | padding-top: 10px; 288 | padding-left: 2px; 289 | display: inline-block; 290 | color: #ffffff; 291 | } 292 | .ztree li span.button.ico_close::before { 293 | content: "\f114"; 294 | font-family: FontAwesome; 295 | padding-top: 10px; 296 | padding-left: 2px; 297 | display: inline-block; 298 | color: #ffffff; 299 | } 300 | .ztree li span.button.ico_docu::before { 301 | content: "\f022"; 302 | font-family: FontAwesome; 303 | padding-top: 10px; 304 | padding-left: 2px; 305 | display: inline-block; 306 | color: #ffffff; 307 | } 308 | .ztree li span.button.edit { 309 | margin-left: 4px; 310 | margin-right: -1px; 311 | vertical-align: top; 312 | *vertical-align: middle; 313 | padding-top: 10px; 314 | } 315 | .ztree li span.button.edit::before { 316 | content: "\f044"; 317 | font-family: FontAwesome; 318 | } 319 | .ztree li span.button.remove { 320 | margin-left: 4px; 321 | margin-right: -1px; 322 | vertical-align: top; 323 | *vertical-align: middle; 324 | padding-top: 10px; 325 | } 326 | .ztree li span.button.remove::before { 327 | content: "\f1f8"; 328 | font-family: FontAwesome; 329 | } 330 | .ztree li span.button.add { 331 | margin-left: 4px; 332 | margin-right: -1px; 333 | vertical-align: top; 334 | *vertical-align: middle; 335 | padding-top: 10px; 336 | } 337 | .ztree li span.button.add::before { 338 | content: "\f067"; 339 | font-family: FontAwesome; 340 | } 341 | .ztree li span.button.ico_loading { 342 | margin-right: 2px; 343 | background: url(./img/loading.gif) no-repeat scroll 0 0 transparent; 344 | vertical-align: top; 345 | *vertical-align: middle; 346 | } 347 | ul.tmpTargetzTree { 348 | background-color: #FFE6B0; 349 | opacity: 0.8; 350 | filter: alpha(opacity=80); 351 | } 352 | span.tmpzTreeMove_arrow { 353 | width: 16px; 354 | height: 17px; 355 | display: inline-block; 356 | padding: 0; 357 | margin: 2px 0 0 1px; 358 | border: 0 none; 359 | position: absolute; 360 | background-color: transparent; 361 | background-attachment: scroll; 362 | } 363 | span.tmpzTreeMove_arrow::before { 364 | content: "\f04b"; 365 | font-family: FontAwesome; 366 | color: #ffff00; 367 | } 368 | ul.ztree.zTreeDragUL { 369 | margin: 0; 370 | padding: 0; 371 | position: absolute; 372 | width: auto; 373 | height: auto; 374 | overflow: hidden; 375 | background-color: #cfcfcf; 376 | border: 1px #ffff00 dotted; 377 | opacity: 0.8; 378 | filter: alpha(opacity=80); 379 | } 380 | .ztreeMask { 381 | z-index: 10000; 382 | background-color: #cfcfcf; 383 | opacity: 0.0; 384 | filter: alpha(opacity=0); 385 | position: absolute; 386 | } 387 | -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/awesomeStyle/awesome.less: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style using fontawesome instead of images 3 | 4 | version: 1.1 5 | author: Mike King 6 | email: mikkelking @ hotmail . com 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | /* Definitions ----------------------*/ 12 | @font-size: 12px; 13 | // Regular icon and text color is white, which suits any medium -> dark background 14 | @color-normal: white; 15 | // Background color 16 | @color-bg: #af0000; 17 | // Highlight color 18 | @color-highlight: yellow; 19 | // Partially selected (checkboxes, radio buttons) 20 | @color-partial: #aaaaaa; 21 | // Partially selected and focused (checkboxes, radio buttons) 22 | @color-partfocus: #cad96c; 23 | // Disabled altogether 24 | @color-disabled: #808080; 25 | // Editing color 26 | @color-edit: yellow; 27 | @w: 15px; 28 | @h: 17px; 29 | @pad-left: 2px; 30 | @pad-top: 10px; 31 | /* End of Definitions ---------------*/ 32 | 33 | /* Imports -------------------------*/ 34 | @import "fa.less"; 35 | /* End of Imports ------------------*/ 36 | 37 | .ztree * {padding:0; margin:0; font-size:@font-size; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif; background-color: @color-bg;} 38 | .ztree { 39 | margin:0; padding:5px; color:@color-normal; background-color: @color-bg; 40 | li { 41 | padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0; 42 | ul { 43 | margin: 0px; padding:0 0 0 18px; 44 | } 45 | ul.line { } 46 | a {padding-right:3px; margin:0; cursor:pointer; height:@h; color:@color-normal; background-color: transparent; 47 | text-decoration:none; vertical-align:top; display: inline-block; 48 | input.rename {height:14px; width:80px; padding:0; margin:0; 49 | color: @color-bg; background-color: @color-normal; 50 | font-size:@font-size; border:1px #585956 solid; *border:0px} 51 | } 52 | a:hover {text-decoration:underline} 53 | a.curSelectedNode {padding-top:0px; background-color:#af4040; color:@color-highlight; height:@h; opacity:0.8;} 54 | a.curSelectedNode_Edit {padding-top:0px; background-color:transparent; color:@color-highlight; height:@h; border:1px #666 solid; opacity:0.8;} 55 | a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:@color-highlight; height:@h; border:1px #666 solid; 56 | opacity:0.8; filter:alpha(opacity=80)} 57 | a.tmpTargetNode_prev {} 58 | a.tmpTargetNode_next {} 59 | span {line-height:@h; margin-right:2px; background-color:transparent;} 60 | span.button {line-height:0; margin:0; padding: 0; width:@w; height:@h; display: inline-block; vertical-align:top; 61 | border:0px solid; cursor: pointer;outline:none; 62 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 63 | 64 | &::before{color: @color-normal; font-family: FontAwesome; padding-top:@pad-top;} 65 | &.chk { margin:0px; cursor: auto; width: 12px; 66 | display: inline-block;padding-top:@pad-top;padding-left:@pad-left; 67 | 68 | &.checkbox_false_full::before {content: @fa-square-o;} 69 | &.checkbox_false_full_focus::before {content: @fa-square-o; color:@color-highlight;} 70 | &.checkbox_false_part::before {content: @fa-square-o;color: @color-partial;} 71 | &.checkbox_false_part_focus::before {content: @fa-square-o; color:@color-partfocus;} 72 | &.checkbox_false_disable::before {content: @fa-square-o; color:@color-disabled;} 73 | &.checkbox_true_full::before {content: @fa-check-square-o;} 74 | &.checkbox_true_full_focus::before {content: @fa-check-square-o;} 75 | &.checkbox_true_part::before {content: @fa-check-square;} 76 | &.checkbox_true_part_focus::before {content: @fa-check-square; color: @color-highlight} 77 | &.checkbox_true_full_focus::before {content: @fa-check-square-o; color: @color-highlight} 78 | &.checkbox_true_part::before {content: @fa-check-square-o;color: @color-partial} 79 | &.checkbox_true_part_focus::before {content: @fa-check-square-o;color: @color-partfocus;} 80 | &.checkbox_true_disable::before {content: @fa-check-square-o;color: @color-disabled} 81 | 82 | &.radio_false_full::before {content: @fa-circle-o;} 83 | &.radio_false_full_focus::before {content: @fa-circle-o;color: @color-highlight} 84 | &.radio_false_part::before {content: @fa-circle-o;color: @color-partial} 85 | &.radio_false_part_focus::before {content: @fa-circle-o;color: @color-highlight} 86 | &.radio_false_disable::before {content: @fa-circle-thin;color: @color-disabled} 87 | &.radio_true_full::before {content: @fa-dot-circle-o;} 88 | &.radio_true_full_focus::before {content: @fa-dot-circle-o;color: @color-highlight} 89 | &.radio_true_part::before {content: @fa-dot-circle-o;color: @color-partial} 90 | &.radio_true_part_focus::before {content: @fa-dot-circle-o;color: @color-partial;} 91 | &.radio_true_disable::before {content: @fa-circle-thin;color: @color-disabled} 92 | 93 | } 94 | &.switch {width:@w; height:@h} 95 | &.root_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 96 | &.root_close::before{content: @fa-folder-open-o;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 97 | &.roots_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 98 | &.roots_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 99 | &.center_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 100 | &.center_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 101 | &.bottom_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 102 | &.bottom_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 103 | &.noline_open{} 104 | &.noline_close{} 105 | &.root_docu{ background:none;} 106 | &.roots_docu::before{content: @fa-list-alt;padding-left:@pad-left;display: inline-block;color:@color-normal;} 107 | &.center_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 108 | &.bottom_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 109 | &.noline_docu{ background:none;} 110 | 111 | &.ico_open::before {content: @fa-folder-open-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 112 | &.ico_close::before {content: @fa-folder-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 113 | &.ico_docu::before{content: @fa-list-alt;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 114 | 115 | &.edit {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} 116 | &.edit::before{content: @fa-pencil-square-o;font-family: FontAwesome;} 117 | 118 | &.remove {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} 119 | &.remove::before{content: @fa-trash;font-family: FontAwesome;} 120 | 121 | 122 | &.add {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} 123 | &.add::before{content: @fa-plus;font-family: FontAwesome;} 124 | 125 | &.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} 126 | } 127 | 128 | } 129 | } 130 | 131 | 132 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 133 | 134 | // this is the arrow that moves 135 | span.tmpzTreeMove_arrow{width:16px; height:@h; display: inline-block; 136 | padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 137 | background-color:transparent; background-attachment: scroll; 138 | } 139 | span.tmpzTreeMove_arrow::before{content: @fa-play;font-family: FontAwesome;color: @color-highlight; 140 | } 141 | // outline 142 | 143 | ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; 144 | background-color:#cfcfcf; border:1px @color-highlight dotted; opacity:0.8; filter:alpha(opacity=80)} 145 | .ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 146 | 147 | -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/awesomeStyle/fa.less: -------------------------------------------------------------------------------- 1 | @fa-glass: "\f000"; 2 | @fa-music: "\f001"; 3 | @fa-search: "\f002"; 4 | @fa-envelope-o: "\f003"; 5 | @fa-heart: "\f004"; 6 | @fa-star: "\f005"; 7 | @fa-star-o: "\f006"; 8 | @fa-user: "\f007"; 9 | @fa-film: "\f008"; 10 | @fa-th-large: "\f009"; 11 | @fa-th: "\f00a"; 12 | @fa-th-list: "\f00b"; 13 | @fa-check: "\f00c"; 14 | @fa-times: "\f00d"; 15 | @fa-search-plus: "\f00e"; 16 | @fa-search-minus: "\f010"; 17 | @fa-power-off: "\f011"; 18 | @fa-signal: "\f012"; 19 | @fa-cog: "\f013"; 20 | @fa-trash-o: "\f014"; 21 | @fa-home: "\f015"; 22 | @fa-file-o: "\f016"; 23 | @fa-clock-o: "\f017"; 24 | @fa-road: "\f018"; 25 | @fa-download: "\f019"; 26 | @fa-arrow-circle-o-down: "\f01a"; 27 | @fa-arrow-circle-o-up: "\f01b"; 28 | @fa-inbox: "\f01c"; 29 | @fa-play-circle-o: "\f01d"; 30 | @fa-repeat: "\f01e"; 31 | @fa-refresh: "\f021"; 32 | @fa-list-alt: "\f022"; 33 | @fa-lock: "\f023"; 34 | @fa-flag: "\f024"; 35 | @fa-headphones: "\f025"; 36 | @fa-volume-off: "\f026"; 37 | @fa-volume-down: "\f027"; 38 | @fa-volume-up: "\f028"; 39 | @fa-qrcode: "\f029"; 40 | @fa-barcode: "\f02a"; 41 | @fa-tag: "\f02b"; 42 | @fa-tags: "\f02c"; 43 | @fa-book: "\f02d"; 44 | @fa-bookmark: "\f02e"; 45 | @fa-print: "\f02f"; 46 | @fa-camera: "\f030"; 47 | @fa-font: "\f031"; 48 | @fa-bold: "\f032"; 49 | @fa-italic: "\f033"; 50 | @fa-text-height: "\f034"; 51 | @fa-text-width: "\f035"; 52 | @fa-align-left: "\f036"; 53 | @fa-align-center: "\f037"; 54 | @fa-align-right: "\f038"; 55 | @fa-align-justify: "\f039"; 56 | @fa-list: "\f03a"; 57 | @fa-outdent: "\f03b"; 58 | @fa-indent: "\f03c"; 59 | @fa-video-camera: "\f03d"; 60 | @fa-picture-o: "\f03e"; 61 | @fa-pencil: "\f040"; 62 | @fa-map-marker: "\f041"; 63 | @fa-adjust: "\f042"; 64 | @fa-tint: "\f043"; 65 | @fa-pencil-square-o: "\f044"; 66 | @fa-share-square-o: "\f045"; 67 | @fa-check-square-o: "\f046"; 68 | @fa-arrows: "\f047"; 69 | @fa-step-backward: "\f048"; 70 | @fa-fast-backward: "\f049"; 71 | @fa-backward: "\f04a"; 72 | @fa-play: "\f04b"; 73 | @fa-pause: "\f04c"; 74 | @fa-stop: "\f04d"; 75 | @fa-forward: "\f04e"; 76 | @fa-fast-forward: "\f050"; 77 | @fa-step-forward: "\f051"; 78 | @fa-eject: "\f052"; 79 | @fa-chevron-left: "\f053"; 80 | @fa-chevron-right: "\f054"; 81 | @fa-plus-circle: "\f055"; 82 | @fa-minus-circle: "\f056"; 83 | @fa-times-circle: "\f057"; 84 | @fa-check-circle: "\f058"; 85 | @fa-question-circle: "\f059"; 86 | @fa-info-circle: "\f05a"; 87 | @fa-crosshairs: "\f05b"; 88 | @fa-times-circle-o: "\f05c"; 89 | @fa-check-circle-o: "\f05d"; 90 | @fa-ban: "\f05e"; 91 | @fa-arrow-left: "\f060"; 92 | @fa-arrow-right: "\f061"; 93 | @fa-arrow-up: "\f062"; 94 | @fa-arrow-down: "\f063"; 95 | @fa-share: "\f064"; 96 | @fa-expand: "\f065"; 97 | @fa-compress: "\f066"; 98 | @fa-plus: "\f067"; 99 | @fa-minus: "\f068"; 100 | @fa-asterisk: "\f069"; 101 | @fa-exclamation-circle: "\f06a"; 102 | @fa-gift: "\f06b"; 103 | @fa-leaf: "\f06c"; 104 | @fa-fire: "\f06d"; 105 | @fa-eye: "\f06e"; 106 | @fa-eye-slash: "\f070"; 107 | @fa-exclamation-triangle: "\f071"; 108 | @fa-plane: "\f072"; 109 | @fa-calendar: "\f073"; 110 | @fa-random: "\f074"; 111 | @fa-comment: "\f075"; 112 | @fa-magnet: "\f076"; 113 | @fa-chevron-up: "\f077"; 114 | @fa-chevron-down: "\f078"; 115 | @fa-retweet: "\f079"; 116 | @fa-shopping-cart: "\f07a"; 117 | @fa-folder: "\f07b"; 118 | @fa-folder-open: "\f07c"; 119 | @fa-arrows-v: "\f07d"; 120 | @fa-arrows-h: "\f07e"; 121 | @fa-bar-chart: "\f080"; 122 | @fa-twitter-square: "\f081"; 123 | @fa-facebook-square: "\f082"; 124 | @fa-camera-retro: "\f083"; 125 | @fa-key: "\f084"; 126 | @fa-cogs: "\f085"; 127 | @fa-comments: "\f086"; 128 | @fa-thumbs-o-up: "\f087"; 129 | @fa-thumbs-o-down: "\f088"; 130 | @fa-star-half: "\f089"; 131 | @fa-heart-o: "\f08a"; 132 | @fa-sign-out: "\f08b"; 133 | @fa-linkedin-square: "\f08c"; 134 | @fa-thumb-tack: "\f08d"; 135 | @fa-external-link: "\f08e"; 136 | @fa-sign-in: "\f090"; 137 | @fa-trophy: "\f091"; 138 | @fa-github-square: "\f092"; 139 | @fa-upload: "\f093"; 140 | @fa-lemon-o: "\f094"; 141 | @fa-phone: "\f095"; 142 | @fa-square-o: "\f096"; 143 | @fa-bookmark-o: "\f097"; 144 | @fa-phone-square: "\f098"; 145 | @fa-twitter: "\f099"; 146 | @fa-facebook: "\f09a"; 147 | @fa-github: "\f09b"; 148 | @fa-unlock: "\f09c"; 149 | @fa-credit-card: "\f09d"; 150 | @fa-rss: "\f09e"; 151 | @fa-hdd-o: "\f0a0"; 152 | @fa-bullhorn: "\f0a1"; 153 | @fa-bell: "\f0f3"; 154 | @fa-certificate: "\f0a3"; 155 | @fa-hand-o-right: "\f0a4"; 156 | @fa-hand-o-left: "\f0a5"; 157 | @fa-hand-o-up: "\f0a6"; 158 | @fa-hand-o-down: "\f0a7"; 159 | @fa-arrow-circle-left: "\f0a8"; 160 | @fa-arrow-circle-right: "\f0a9"; 161 | @fa-arrow-circle-up: "\f0aa"; 162 | @fa-arrow-circle-down: "\f0ab"; 163 | @fa-globe: "\f0ac"; 164 | @fa-wrench: "\f0ad"; 165 | @fa-tasks: "\f0ae"; 166 | @fa-filter: "\f0b0"; 167 | @fa-briefcase: "\f0b1"; 168 | @fa-arrows-alt: "\f0b2"; 169 | @fa-users: "\f0c0"; 170 | @fa-link: "\f0c1"; 171 | @fa-cloud: "\f0c2"; 172 | @fa-flask: "\f0c3"; 173 | @fa-scissors: "\f0c4"; 174 | @fa-files-o: "\f0c5"; 175 | @fa-paperclip: "\f0c6"; 176 | @fa-floppy-o: "\f0c7"; 177 | @fa-square: "\f0c8"; 178 | @fa-bars: "\f0c9"; 179 | @fa-list-ul: "\f0ca"; 180 | @fa-list-ol: "\f0cb"; 181 | @fa-strikethrough: "\f0cc"; 182 | @fa-underline: "\f0cd"; 183 | @fa-table: "\f0ce"; 184 | @fa-magic: "\f0d0"; 185 | @fa-truck: "\f0d1"; 186 | @fa-pinterest: "\f0d2"; 187 | @fa-pinterest-square: "\f0d3"; 188 | @fa-google-plus-square: "\f0d4"; 189 | @fa-google-plus: "\f0d5"; 190 | @fa-money: "\f0d6"; 191 | @fa-caret-down: "\f0d7"; 192 | @fa-caret-up: "\f0d8"; 193 | @fa-caret-left: "\f0d9"; 194 | @fa-caret-right: "\f0da"; 195 | @fa-columns: "\f0db"; 196 | @fa-sort: "\f0dc"; 197 | @fa-sort-desc: "\f0dd"; 198 | @fa-sort-asc: "\f0de"; 199 | @fa-envelope: "\f0e0"; 200 | @fa-linkedin: "\f0e1"; 201 | @fa-undo: "\f0e2"; 202 | @fa-gavel: "\f0e3"; 203 | @fa-tachometer: "\f0e4"; 204 | @fa-comment-o: "\f0e5"; 205 | @fa-comments-o: "\f0e6"; 206 | @fa-bolt: "\f0e7"; 207 | @fa-sitemap: "\f0e8"; 208 | @fa-umbrella: "\f0e9"; 209 | @fa-clipboard: "\f0ea"; 210 | @fa-lightbulb-o: "\f0eb"; 211 | @fa-exchange: "\f0ec"; 212 | @fa-cloud-download: "\f0ed"; 213 | @fa-cloud-upload: "\f0ee"; 214 | @fa-user-md: "\f0f0"; 215 | @fa-stethoscope: "\f0f1"; 216 | @fa-suitcase: "\f0f2"; 217 | @fa-bell-o: "\f0a2"; 218 | @fa-coffee: "\f0f4"; 219 | @fa-cutlery: "\f0f5"; 220 | @fa-file-text-o: "\f0f6"; 221 | @fa-building-o: "\f0f7"; 222 | @fa-hospital-o: "\f0f8"; 223 | @fa-ambulance: "\f0f9"; 224 | @fa-medkit: "\f0fa"; 225 | @fa-fighter-jet: "\f0fb"; 226 | @fa-beer: "\f0fc"; 227 | @fa-h-square: "\f0fd"; 228 | @fa-plus-square: "\f0fe"; 229 | @fa-angle-double-left: "\f100"; 230 | @fa-angle-double-right: "\f101"; 231 | @fa-angle-double-up: "\f102"; 232 | @fa-angle-double-down: "\f103"; 233 | @fa-angle-left: "\f104"; 234 | @fa-angle-right: "\f105"; 235 | @fa-angle-up: "\f106"; 236 | @fa-angle-down: "\f107"; 237 | @fa-desktop: "\f108"; 238 | @fa-laptop: "\f109"; 239 | @fa-tablet: "\f10a"; 240 | @fa-mobile: "\f10b"; 241 | @fa-circle-o: "\f10c"; 242 | @fa-quote-left: "\f10d"; 243 | @fa-quote-right: "\f10e"; 244 | @fa-spinner: "\f110"; 245 | @fa-circle: "\f111"; 246 | @fa-reply: "\f112"; 247 | @fa-github-alt: "\f113"; 248 | @fa-folder-o: "\f114"; 249 | @fa-folder-open-o: "\f115"; 250 | @fa-smile-o: "\f118"; 251 | @fa-frown-o: "\f119"; 252 | @fa-meh-o: "\f11a"; 253 | @fa-gamepad: "\f11b"; 254 | @fa-keyboard-o: "\f11c"; 255 | @fa-flag-o: "\f11d"; 256 | @fa-flag-checkered: "\f11e"; 257 | @fa-terminal: "\f120"; 258 | @fa-code: "\f121"; 259 | @fa-reply-all: "\f122"; 260 | @fa-star-half-o: "\f123"; 261 | @fa-location-arrow: "\f124"; 262 | @fa-crop: "\f125"; 263 | @fa-code-fork: "\f126"; 264 | @fa-chain-broken: "\f127"; 265 | @fa-question: "\f128"; 266 | @fa-info: "\f129"; 267 | @fa-exclamation: "\f12a"; 268 | @fa-superscript: "\f12b"; 269 | @fa-subscript: "\f12c"; 270 | @fa-eraser: "\f12d"; 271 | @fa-puzzle-piece: "\f12e"; 272 | @fa-microphone: "\f130"; 273 | @fa-microphone-slash: "\f131"; 274 | @fa-shield: "\f132"; 275 | @fa-calendar-o: "\f133"; 276 | @fa-fire-extinguisher: "\f134"; 277 | @fa-rocket: "\f135"; 278 | @fa-maxcdn: "\f136"; 279 | @fa-chevron-circle-left: "\f137"; 280 | @fa-chevron-circle-right: "\f138"; 281 | @fa-chevron-circle-up: "\f139"; 282 | @fa-chevron-circle-down: "\f13a"; 283 | @fa-html5: "\f13b"; 284 | @fa-css3: "\f13c"; 285 | @fa-anchor: "\f13d"; 286 | @fa-unlock-alt: "\f13e"; 287 | @fa-bullseye: "\f140"; 288 | @fa-ellipsis-h: "\f141"; 289 | @fa-ellipsis-v: "\f142"; 290 | @fa-rss-square: "\f143"; 291 | @fa-play-circle: "\f144"; 292 | @fa-ticket: "\f145"; 293 | @fa-minus-square: "\f146"; 294 | @fa-minus-square-o: "\f147"; 295 | @fa-level-up: "\f148"; 296 | @fa-level-down: "\f149"; 297 | @fa-check-square: "\f14a"; 298 | @fa-pencil-square: "\f14b"; 299 | @fa-external-link-square: "\f14c"; 300 | @fa-share-square: "\f14d"; 301 | @fa-compass: "\f14e"; 302 | @fa-caret-square-o-down: "\f150"; 303 | @fa-caret-square-o-up: "\f151"; 304 | @fa-caret-square-o-right: "\f152"; 305 | @fa-eur: "\f153"; 306 | @fa-gbp: "\f154"; 307 | @fa-usd: "\f155"; 308 | @fa-inr: "\f156"; 309 | @fa-jpy: "\f157"; 310 | @fa-rub: "\f158"; 311 | @fa-krw: "\f159"; 312 | @fa-btc: "\f15a"; 313 | @fa-file: "\f15b"; 314 | @fa-file-text: "\f15c"; 315 | @fa-sort-alpha-asc: "\f15d"; 316 | @fa-sort-alpha-desc: "\f15e"; 317 | @fa-sort-amount-asc: "\f160"; 318 | @fa-sort-amount-desc: "\f161"; 319 | @fa-sort-numeric-asc: "\f162"; 320 | @fa-sort-numeric-desc: "\f163"; 321 | @fa-thumbs-up: "\f164"; 322 | @fa-thumbs-down: "\f165"; 323 | @fa-youtube-square: "\f166"; 324 | @fa-youtube: "\f167"; 325 | @fa-xing: "\f168"; 326 | @fa-xing-square: "\f169"; 327 | @fa-youtube-play: "\f16a"; 328 | @fa-dropbox: "\f16b"; 329 | @fa-stack-overflow: "\f16c"; 330 | @fa-instagram: "\f16d"; 331 | @fa-flickr: "\f16e"; 332 | @fa-adn: "\f170"; 333 | @fa-bitbucket: "\f171"; 334 | @fa-bitbucket-square: "\f172"; 335 | @fa-tumblr: "\f173"; 336 | @fa-tumblr-square: "\f174"; 337 | @fa-long-arrow-down: "\f175"; 338 | @fa-long-arrow-up: "\f176"; 339 | @fa-long-arrow-left: "\f177"; 340 | @fa-long-arrow-right: "\f178"; 341 | @fa-apple: "\f179"; 342 | @fa-windows: "\f17a"; 343 | @fa-android: "\f17b"; 344 | @fa-linux: "\f17c"; 345 | @fa-dribbble: "\f17d"; 346 | @fa-skype: "\f17e"; 347 | @fa-foursquare: "\f180"; 348 | @fa-trello: "\f181"; 349 | @fa-female: "\f182"; 350 | @fa-male: "\f183"; 351 | @fa-gittip: "\f184"; 352 | @fa-sun-o: "\f185"; 353 | @fa-moon-o: "\f186"; 354 | @fa-archive: "\f187"; 355 | @fa-bug: "\f188"; 356 | @fa-vk: "\f189"; 357 | @fa-weibo: "\f18a"; 358 | @fa-renren: "\f18b"; 359 | @fa-pagelines: "\f18c"; 360 | @fa-stack-exchange: "\f18d"; 361 | @fa-arrow-circle-o-right: "\f18e"; 362 | @fa-arrow-circle-o-left: "\f190"; 363 | @fa-caret-square-o-left: "\f191"; 364 | @fa-dot-circle-o: "\f192"; 365 | @fa-wheelchair: "\f193"; 366 | @fa-vimeo-square: "\f194"; 367 | @fa-try: "\f195"; 368 | @fa-plus-square-o: "\f196"; 369 | @fa-space-shuttle: "\f197"; 370 | @fa-slack: "\f198"; 371 | @fa-envelope-square: "\f199"; 372 | @fa-wordpress: "\f19a"; 373 | @fa-openid: "\f19b"; 374 | @fa-university: "\f19c"; 375 | @fa-graduation-cap: "\f19d"; 376 | @fa-yahoo: "\f19e"; 377 | @fa-google: "\f1a0"; 378 | @fa-reddit: "\f1a1"; 379 | @fa-reddit-square: "\f1a2"; 380 | @fa-stumbleupon-circle: "\f1a3"; 381 | @fa-stumbleupon: "\f1a4"; 382 | @fa-delicious: "\f1a5"; 383 | @fa-digg: "\f1a6"; 384 | @fa-pied-piper: "\f1a7"; 385 | @fa-pied-piper-alt: "\f1a8"; 386 | @fa-drupal: "\f1a9"; 387 | @fa-joomla: "\f1aa"; 388 | @fa-language: "\f1ab"; 389 | @fa-fax: "\f1ac"; 390 | @fa-building: "\f1ad"; 391 | @fa-child: "\f1ae"; 392 | @fa-paw: "\f1b0"; 393 | @fa-spoon: "\f1b1"; 394 | @fa-cube: "\f1b2"; 395 | @fa-cubes: "\f1b3"; 396 | @fa-behance: "\f1b4"; 397 | @fa-behance-square: "\f1b5"; 398 | @fa-steam: "\f1b6"; 399 | @fa-steam-square: "\f1b7"; 400 | @fa-recycle: "\f1b8"; 401 | @fa-car: "\f1b9"; 402 | @fa-taxi: "\f1ba"; 403 | @fa-tree: "\f1bb"; 404 | @fa-spotify: "\f1bc"; 405 | @fa-deviantart: "\f1bd"; 406 | @fa-soundcloud: "\f1be"; 407 | @fa-database: "\f1c0"; 408 | @fa-file-pdf-o: "\f1c1"; 409 | @fa-file-word-o: "\f1c2"; 410 | @fa-file-excel-o: "\f1c3"; 411 | @fa-file-powerpoint-o: "\f1c4"; 412 | @fa-file-image-o: "\f1c5"; 413 | @fa-file-archive-o: "\f1c6"; 414 | @fa-file-audio-o: "\f1c7"; 415 | @fa-file-video-o: "\f1c8"; 416 | @fa-file-code-o: "\f1c9"; 417 | @fa-vine: "\f1ca"; 418 | @fa-codepen: "\f1cb"; 419 | @fa-jsfiddle: "\f1cc"; 420 | @fa-life-ring: "\f1cd"; 421 | @fa-circle-o-notch: "\f1ce"; 422 | @fa-rebel: "\f1d0"; 423 | @fa-empire: "\f1d1"; 424 | @fa-git-square: "\f1d2"; 425 | @fa-git: "\f1d3"; 426 | @fa-hacker-news: "\f1d4"; 427 | @fa-tencent-weibo: "\f1d5"; 428 | @fa-qq: "\f1d6"; 429 | @fa-weixin: "\f1d7"; 430 | @fa-paper-plane: "\f1d8"; 431 | @fa-paper-plane-o: "\f1d9"; 432 | @fa-history: "\f1da"; 433 | @fa-circle-thin: "\f1db"; 434 | @fa-header: "\f1dc"; 435 | @fa-paragraph: "\f1dd"; 436 | @fa-sliders: "\f1de"; 437 | @fa-share-alt: "\f1e0"; 438 | @fa-share-alt-square: "\f1e1"; 439 | @fa-bomb: "\f1e2"; 440 | @fa-futbol-o: "\f1e3"; 441 | @fa-tty: "\f1e4"; 442 | @fa-binoculars: "\f1e5"; 443 | @fa-plug: "\f1e6"; 444 | @fa-slideshare: "\f1e7"; 445 | @fa-twitch: "\f1e8"; 446 | @fa-yelp: "\f1e9"; 447 | @fa-newspaper-o: "\f1ea"; 448 | @fa-wifi: "\f1eb"; 449 | @fa-calculator: "\f1ec"; 450 | @fa-paypal: "\f1ed"; 451 | @fa-google-wallet: "\f1ee"; 452 | @fa-cc-visa: "\f1f0"; 453 | @fa-cc-mastercard: "\f1f1"; 454 | @fa-cc-discover: "\f1f2"; 455 | @fa-cc-amex: "\f1f3"; 456 | @fa-cc-paypal: "\f1f4"; 457 | @fa-cc-stripe: "\f1f5"; 458 | @fa-bell-slash: "\f1f6"; 459 | @fa-bell-slash-o: "\f1f7"; 460 | @fa-trash: "\f1f8"; 461 | @fa-copyright: "\f1f9"; 462 | @fa-at: "\f1fa"; 463 | @fa-eyedropper: "\f1fb"; 464 | @fa-paint-brush: "\f1fc"; 465 | @fa-birthday-cake: "\f1fd"; 466 | @fa-area-chart: "\f1fe"; 467 | @fa-pie-chart: "\f200"; 468 | @fa-line-chart: "\f201"; 469 | @fa-lastfm: "\f202"; 470 | @fa-lastfm-square: "\f203"; 471 | @fa-toggle-off: "\f204"; 472 | @fa-toggle-on: "\f205"; 473 | @fa-bicycle: "\f206"; 474 | @fa-bus: "\f207"; 475 | @fa-ioxhost: "\f208"; 476 | @fa-angellist: "\f209"; 477 | @fa-cc: "\f20a"; 478 | @fa-ils: "\f20b"; 479 | @fa-meanpath: "\f20c"; 480 | 481 | -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/awesomeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/awesomeStyle/img/loading.gif -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/demo.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 2 | margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;} 3 | body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;} 4 | h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;} 5 | h1 {font-size: 24px;line-height: 34px;text-align: center;} 6 | h2 {font-size: 14px;line-height: 24px;padding-top: 5px;} 7 | h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;} 8 | a {color:#3C6E31;text-decoration: underline;} 9 | a:hover {background-color:#3C6E31;color:white;} 10 | input.radio {margin: 0 2px 0 8px;} 11 | input.radio.first {margin-left:0;} 12 | input.empty {color: lightgray;} 13 | code {color: #2f332a;} 14 | .highlight_red {color:#A60000;} 15 | .highlight_green {color:#A7F43D;} 16 | li {list-style: circle;font-size: 12px;} 17 | li.title {list-style: none;} 18 | ul.list {margin-left: 17px;} 19 | 20 | div.content_wrap {width: 600px;height:380px;} 21 | div.content_wrap div.left{float: left;width: 250px;} 22 | div.content_wrap div.right{float: right;width: 340px;} 23 | div.zTreeDemoBackground {width:250px;height:362px;text-align:left;} 24 | 25 | ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;} 26 | ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;} 27 | ul.log.small {height:45px;} 28 | ul.log li {color: #666666;list-style: none;padding-left: 10px;} 29 | ul.log li.dark {background-color: #E3E3E3;} 30 | 31 | /* ruler */ 32 | div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer} 33 | div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer} -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/metroStyle/img/line_conn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/metroStyle/img/line_conn.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/metroStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/metroStyle/img/loading.gif -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/metroStyle/img/metro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/metroStyle/img/metro.gif -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/metroStyle/img/metro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/metroStyle/img/metro.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/metroStyle/metroStyle.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style 3 | 4 | version: 3.4 5 | author: Hunter.z 6 | email: hunter.z@263.net 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | .ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} 12 | .ztree {margin:0; padding:5px; color:#333} 13 | .ztree li{padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0} 14 | .ztree li ul{ margin:0; padding:0 0 0 18px} 15 | .ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;} 16 | 17 | .ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; vertical-align:top; display: inline-block} 18 | .ztree li a:hover {text-decoration:underline} 19 | .ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; opacity:0.8;} 20 | .ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; border:1px #666 solid; opacity:0.8;} 21 | .ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid; 22 | opacity:0.8; filter:alpha(opacity=80)} 23 | .ztree li a.tmpTargetNode_prev {} 24 | .ztree li a.tmpTargetNode_next {} 25 | .ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; 26 | font-size:12px; border:1px #585956 solid; *border:0px} 27 | .ztree li span {line-height:21px; margin-right:2px} 28 | .ztree li span.button {line-height:0; margin:0; padding: 0; width:21px; height:21px; display: inline-block; vertical-align:middle; 29 | border:0 none; cursor: pointer;outline:none; 30 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 31 | background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} 32 | 33 | .ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto} 34 | .ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;} 35 | .ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;} 36 | .ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;} 37 | .ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;} 38 | .ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;} 39 | .ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;} 40 | .ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;} 41 | .ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;} 42 | .ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;} 43 | .ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;} 44 | .ztree li span.button.chk.radio_false_full {background-position: -47px -5px;} 45 | .ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;} 46 | .ztree li span.button.chk.radio_false_part {background-position: -47px -47px;} 47 | .ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;} 48 | .ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;} 49 | .ztree li span.button.chk.radio_true_full {background-position: -68px -5px;} 50 | .ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;} 51 | .ztree li span.button.chk.radio_true_part {background-position: -68px -47px;} 52 | .ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;} 53 | .ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;} 54 | 55 | .ztree li span.button.switch {width:21px; height:21px} 56 | .ztree li span.button.root_open{background-position:-105px -63px} 57 | .ztree li span.button.root_close{background-position:-126px -63px} 58 | .ztree li span.button.roots_open{background-position: -105px 0;} 59 | .ztree li span.button.roots_close{background-position: -126px 0;} 60 | .ztree li span.button.center_open{background-position: -105px -21px;} 61 | .ztree li span.button.center_close{background-position: -126px -21px;} 62 | .ztree li span.button.bottom_open{background-position: -105px -42px;} 63 | .ztree li span.button.bottom_close{background-position: -126px -42px;} 64 | .ztree li span.button.noline_open{background-position: -105px -84px;} 65 | .ztree li span.button.noline_close{background-position: -126px -84px;} 66 | .ztree li span.button.root_docu{ background:none;} 67 | .ztree li span.button.roots_docu{background-position: -84px 0;} 68 | .ztree li span.button.center_docu{background-position: -84px -21px;} 69 | .ztree li span.button.bottom_docu{background-position: -84px -42px;} 70 | .ztree li span.button.noline_docu{ background:none;} 71 | 72 | .ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle} 73 | .ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle} 74 | .ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle} 75 | .ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle} 76 | .ztree li span.button.edit:hover { 77 | background-position: -168px -21px; 78 | } 79 | .ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle} 80 | .ztree li span.button.remove:hover { 81 | background-position: -168px -42px; 82 | } 83 | .ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle} 84 | .ztree li span.button.add:hover { 85 | background-position: -168px 0; 86 | } 87 | .ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} 88 | 89 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 90 | 91 | span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 92 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 93 | background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} 94 | 95 | ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} 96 | .ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 97 | -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/1_close.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/1_open.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/2.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/3.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/4.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/5.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/6.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/7.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/8.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/diy/9.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/line_conn.gif -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/loading.gif -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/zTreeStandard.gif -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuqwert/odtree/a876c6a8b53d82fe65fb89460c6e6ba82e71d61e/odtree/static/src/lib/zTree_v3/css/zTreeStyle/img/zTreeStandard.png -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/css/zTreeStyle/zTreeStyle.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style 3 | 4 | version: 3.5.19 5 | author: Hunter.z 6 | email: hunter.z@263.net 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | .ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} 12 | .ztree {margin:0; padding:5px; color:#333} 13 | .ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0} 14 | .ztree li ul{ margin:0; padding:0 0 0 18px} 15 | .ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;} 16 | 17 | .ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent; 18 | text-decoration:none; vertical-align:top; display: inline-block} 19 | .ztree li a:hover {text-decoration:underline} 20 | .ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} 21 | .ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} 22 | .ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid; 23 | opacity:0.8; filter:alpha(opacity=80)} 24 | .ztree li a.tmpTargetNode_prev {} 25 | .ztree li a.tmpTargetNode_next {} 26 | .ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; 27 | font-size:12px; border:1px #7EC4CC solid; *border:0px} 28 | .ztree li span {line-height:16px; margin-right:2px} 29 | .ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle; 30 | border:0 none; cursor: pointer;outline:none; 31 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 32 | background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} 33 | 34 | .ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto} 35 | .ztree li span.button.chk.checkbox_false_full {background-position:0 0} 36 | .ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px} 37 | .ztree li span.button.chk.checkbox_false_part {background-position:0 -28px} 38 | .ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px} 39 | .ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px} 40 | .ztree li span.button.chk.checkbox_true_full {background-position:-14px 0} 41 | .ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px} 42 | .ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px} 43 | .ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px} 44 | .ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px} 45 | .ztree li span.button.chk.radio_false_full {background-position:-28px 0} 46 | .ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px} 47 | .ztree li span.button.chk.radio_false_part {background-position:-28px -28px} 48 | .ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px} 49 | .ztree li span.button.chk.radio_false_disable {background-position:-28px -56px} 50 | .ztree li span.button.chk.radio_true_full {background-position:-42px 0} 51 | .ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px} 52 | .ztree li span.button.chk.radio_true_part {background-position:-42px -28px} 53 | .ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px} 54 | .ztree li span.button.chk.radio_true_disable {background-position:-42px -56px} 55 | 56 | .ztree li span.button.switch {width:18px; height:18px} 57 | .ztree li span.button.root_open{background-position:-92px -54px} 58 | .ztree li span.button.root_close{background-position:-74px -54px} 59 | .ztree li span.button.roots_open{background-position:-92px 0} 60 | .ztree li span.button.roots_close{background-position:-74px 0} 61 | .ztree li span.button.center_open{background-position:-92px -18px} 62 | .ztree li span.button.center_close{background-position:-74px -18px} 63 | .ztree li span.button.bottom_open{background-position:-92px -36px} 64 | .ztree li span.button.bottom_close{background-position:-74px -36px} 65 | .ztree li span.button.noline_open{background-position:-92px -72px} 66 | .ztree li span.button.noline_close{background-position:-74px -72px} 67 | .ztree li span.button.root_docu{ background:none;} 68 | .ztree li span.button.roots_docu{background-position:-56px 0} 69 | .ztree li span.button.center_docu{background-position:-56px -18px} 70 | .ztree li span.button.bottom_docu{background-position:-56px -36px} 71 | .ztree li span.button.noline_docu{ background:none;} 72 | 73 | .ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle} 74 | .ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle} 75 | .ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle} 76 | .ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle} 77 | .ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle} 78 | 79 | .ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} 80 | 81 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 82 | 83 | span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 84 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 85 | background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} 86 | 87 | ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} 88 | .zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 89 | 90 | /* level style*/ 91 | /*.ztree li span.button.level0 { 92 | display:none; 93 | } 94 | .ztree li ul.level0 { 95 | padding:0; 96 | background:none; 97 | }*/ -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/js/jquery.ztree.core.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree core v3.5.36 3 | * http://treejs.cn/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2018-06-26 12 | */ 13 | (function(q){var H,I,J,K,L,M,u,s={},v={},w={},N={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post", 14 | dataType:"text",headers:{},xhrFields:{},url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},x=[function(a){var b=a.treeObj,c=f.event;b.bind(c.NODECREATED, 15 | function(b,c,h){j.apply(a.callback.onNodeCreated,[b,c,h])});b.bind(c.CLICK,function(b,c,h,e,m){j.apply(a.callback.onClick,[c,h,e,m])});b.bind(c.EXPAND,function(b,c,h){j.apply(a.callback.onExpand,[b,c,h])});b.bind(c.COLLAPSE,function(b,c,h){j.apply(a.callback.onCollapse,[b,c,h])});b.bind(c.ASYNC_SUCCESS,function(b,c,h,e){j.apply(a.callback.onAsyncSuccess,[b,c,h,e])});b.bind(c.ASYNC_ERROR,function(b,c,h,e,m,f){j.apply(a.callback.onAsyncError,[b,c,h,e,m,f])});b.bind(c.REMOVE,function(b,c,h){j.apply(a.callback.onRemove, 16 | [b,c,h])});b.bind(c.SELECTED,function(b,c,h){j.apply(a.callback.onSelected,[c,h])});b.bind(c.UNSELECTED,function(b,c,h){j.apply(a.callback.onUnSelected,[c,h])})}],y=[function(a){var b=f.event;a.treeObj.unbind(b.NODECREATED).unbind(b.CLICK).unbind(b.EXPAND).unbind(b.COLLAPSE).unbind(b.ASYNC_SUCCESS).unbind(b.ASYNC_ERROR).unbind(b.REMOVE).unbind(b.SELECTED).unbind(b.UNSELECTED)}],z=[function(a){var b=e.getCache(a);b||(b={},e.setCache(a,b));b.nodes=[];b.doms=[]}],A=[function(a,b,c,d,g,h){if(c){var k= 17 | e.getRoot(a),m=e.nodeChildren(a,c);c.level=b;c.tId=a.treeId+"_"+ ++k.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;b=e.nodeIsParent(a,c);j.isArray(m)&&!(b===!1||typeof b=="string"&&j.eqs(b,"false"))?(e.nodeIsParent(a,c,!0),c.zAsync=!0):(b=e.nodeIsParent(a,c,b),c.open=b&&!a.async.enable?c.open:!1,c.zAsync=!b);c.isFirstNode=g;c.isLastNode=h;c.getParentNode=function(){return e.getNodeCache(a,c.parentTId)};c.getPreNode=function(){return e.getPreNode(a,c)};c.getNextNode= 18 | function(){return e.getNextNode(a,c)};c.getIndex=function(){return e.getNodeIndex(a,c)};c.getPath=function(){return e.getNodePath(a,c)};c.isAjaxing=!1;e.fixPIdKeyValue(a,c)}}],t=[function(a){var b=a.target,c=e.getSetting(a.data.treeId),d="",g=null,h="",k="",m=null,i=null,o=null;if(j.eqs(a.type,"mousedown"))k="mousedown";else if(j.eqs(a.type,"mouseup"))k="mouseup";else if(j.eqs(a.type,"contextmenu"))k="contextmenu";else if(j.eqs(a.type,"click"))if(j.eqs(b.tagName,"span")&&b.getAttribute("treeNode"+ 19 | f.id.SWITCH)!==null)d=j.getNodeMainDom(b).id,h="switchNode";else{if(o=j.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+f.id.A}]))d=j.getNodeMainDom(o).id,h="clickNode"}else if(j.eqs(a.type,"dblclick")&&(k="dblclick",o=j.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=j.getNodeMainDom(o).id,h="switchNode";if(k.length>0&&d.length==0&&(o=j.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=j.getNodeMainDom(o).id;if(d.length>0)switch(g=e.getNodeCache(c,d),h){case "switchNode":e.nodeIsParent(c, 20 | g)?j.eqs(a.type,"click")||j.eqs(a.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,g],c.view.dblClickExpand)?m=H:h="":h="";break;case "clickNode":m=I}switch(k){case "mousedown":i=J;break;case "mouseup":i=K;break;case "dblclick":i=L;break;case "contextmenu":i=M}return{stop:!1,node:g,nodeEventType:h,nodeEventCallback:m,treeEventType:k,treeEventCallback:i}}],B=[function(a){var b=e.getRoot(a);b||(b={},e.setRoot(a,b));e.nodeChildren(a,b,[]);b.expandTriggerFlag=!1;b.curSelectedList=[];b.noSelection= 21 | !0;b.createdNodes=[];b.zId=0;b._ver=(new Date).getTime()}],C=[],D=[],E=[],F=[],G=[],e={addNodeCache:function(a,b){e.getCache(a).nodes[e.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){D.push(a)},addBeforeA:function(a){C.push(a)},addInnerAfterA:function(a){F.push(a)},addInnerBeforeA:function(a){E.push(a)},addInitBind:function(a){x.push(a)},addInitUnBind:function(a){y.push(a)},addInitCache:function(a){z.push(a)},addInitNode:function(a){A.push(a)}, 22 | addInitProxy:function(a,b){b?t.splice(0,0,a):t.push(a)},addInitRoot:function(a){B.push(a)},addNodesData:function(a,b,c,d){var g=e.nodeChildren(a,b);g?c>=g.length&&(c=-1):(g=e.nodeChildren(a,b,[]),c=-1);if(g.length>0&&c===0)g[0].isFirstNode=!1,i.setNodeLineIcos(a,g[0]);else if(g.length>0&&c<0)g[g.length-1].isLastNode=!1,i.setNodeLineIcos(a,g[g.length-1]);e.nodeIsParent(a,b,!0);c<0?e.nodeChildren(a,b,g.concat(d)):(a=[c,0].concat(d),g.splice.apply(g,a))},addSelectedNode:function(a,b){var c=e.getRoot(a); 23 | e.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){(a.callback.onNodeCreated||a.view.addDiyDom)&&e.getRoot(a).createdNodes.push(b)},addZTreeTools:function(a){G.push(a)},exSetting:function(a){q.extend(!0,N,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=D.length;d-1&& 27 | g.push(m);m=e.nodeChildren(a,m);g=g.concat(e.getNodesByParamFuzzy(a,m,c,d))}return g},getNodesByFilter:function(a,b,c,d,g){if(!b)return d?null:[];for(var h=d?null:[],k=0,m=b.length;k 38 | 0)},clone:function(a){if(a===null)return null;var b=j.isArray(a)?[]:{},c;for(c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):typeof a[c]==="object"?j.clone(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return Object.prototype.toString.apply(a)==="[object Array]"},isElement:function(a){return typeof HTMLElement==="object"?a instanceof HTMLElement:a&&typeof a==="object"&&a!==null&&a.nodeType===1&&typeof a.nodeName==="string"},$:function(a, 39 | b,c){b&&typeof b!="string"&&(c=b,b="");return typeof a=="string"?q(a,c?c.treeObj.get(0).ownerDocument:null):q("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(){return!0}},i={addNodes:function(a,b,c,d,g){var h=e.nodeIsParent(a,b);if(!a.data.keep.leaf||!b||h)if(j.isArray(d)||(d=[d]),a.data.simpleData.enable&&(d=e.transformTozTreeFormat(a,d)),b){var h=l(b,f.id.SWITCH,a),k=l(b,f.id.ICON,a),m=l(b,f.id.UL,a);if(!b.open)i.replaceSwitchClass(b,h,f.folder.CLOSE),i.replaceIcoClass(b,k,f.folder.CLOSE),b.open=!1,m.css({display:"none"});e.addNodesData(a,b,c,d);i.createNodes(a,b.level+1,d,b,c);g||i.expandCollapseParentNode(a,b,!0)}else e.addNodesData(a, 41 | e.getRoot(a),c,d),i.createNodes(a,0,d,null,c)},appendNodes:function(a,b,c,d,g,h,k){if(!c)return[];var f=[],j=d?d:e.getRoot(a),j=e.nodeChildren(a,j),o,l;if(!j||g>=j.length-c.length)g=-1;for(var n=0,Q=c.length;n0&&(l=i.appendNodes(a,b+1,q,p,-1,h,k&&p.open));k&&(i.makeDOMNodeMainBefore(f,a,p),i.makeDOMNodeLine(f, 42 | a,p),e.getBeforeA(a,p,f),i.makeDOMNodeNameBefore(f,a,p),e.getInnerBeforeA(a,p,f),i.makeDOMNodeIcon(f,a,p),e.getInnerAfterA(a,p,f),i.makeDOMNodeNameAfter(f,a,p),e.getAfterA(a,p,f),o&&p.open&&i.makeUlHtml(a,p,f,l.join("")),i.makeDOMNodeMainAfter(f,a,p),e.addCreatedNode(a,p))}return f},appendParentULDom:function(a,b){var c=[],d=l(b,a);!d.get(0)&&b.parentTId&&(i.appendParentULDom(a,b.getParentNode()),d=l(b,a));var g=l(b,f.id.UL,a);g.get(0)&&g.remove();g=e.nodeChildren(a,b);g=i.appendNodes(a,b.level+1, 43 | g,b,-1,!1,!0);i.makeUlHtml(a,b,c,g.join(""));d.append(c.join(""))},asyncNode:function(a,b,c,d){var g,h;g=e.nodeIsParent(a,b);if(b&&!g)return j.apply(d),!1;else if(b&&b.isAjaxing)return!1;else if(j.apply(a.callback.beforeAsync,[a.treeId,b],!0)==!1)return j.apply(d),!1;if(b)b.isAjaxing=!0,l(b,f.id.ICON,a).attr({style:"","class":f.className.BUTTON+" "+f.className.ICO_LOADING});var k={},m=j.apply(a.async.autoParam,[a.treeId,b],a.async.autoParam);for(g=0,h=m.length;b&&g1&&(o=r[1],r=r[0]);k[o]=b[r]}m=j.apply(a.async.otherParam,[a.treeId,b],a.async.otherParam);if(j.isArray(m))for(g=0,h=m.length;g-1?JSON.stringify(k):k,dataType:a.async.dataType,headers:a.async.headers,xhrFields:a.async.xhrFields,success:function(h){if(P== 45 | e.getRoot(a)._ver){var k=[];try{k=!h||h.length==0?[]:typeof h=="string"?eval("("+h+")"):h}catch(g){k=h}if(b)b.isAjaxing=null,b.zAsync=!0;i.setNodeLineIcos(a,b);k&&k!==""?(k=j.apply(a.async.dataFilter,[a.treeId,b,k],k),i.addNodes(a,b,-1,k?j.clone(k):[],!!c)):i.addNodes(a,b,-1,[],!!c);a.treeObj.trigger(f.event.ASYNC_SUCCESS,[a.treeId,b,h]);j.apply(d)}},error:function(c,d,h){if(P==e.getRoot(a)._ver){if(b)b.isAjaxing=null;i.setNodeLineIcos(a,b);a.treeObj.trigger(f.event.ASYNC_ERROR,[a.treeId,b,c,d,h])}}}); 46 | return!0},cancelPreSelectedNode:function(a,b,c){var d=e.getRoot(a).curSelectedList,g,h;for(g=d.length-1;g>=0;g--)if(h=d[g],b===h||!b&&(!c||c!==h))if(l(h,f.id.A,a).removeClass(f.node.CURSELECTED),b){e.removeSelectedNode(a,b);break}else d.splice(g,1),a.treeObj.trigger(f.event.UNSELECTED,[a.treeId,h])},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=e.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();j.apply(a.view.addDiyDom,[a.treeId,c]);a.callback.onNodeCreated&& 47 | a.treeObj.trigger(f.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d,g){if(c&&c.length!=0){var h=e.getRoot(a),k=!d||d.open||!!l(e.nodeChildren(a,d)[0],a).get(0);h.createdNodes=[];var b=i.appendNodes(a,b,c,d,g,!0,k),m,j;d?(d=l(d,f.id.UL,a),d.get(0)&&(m=d)):m=a.treeObj;m&&(g>=0&&(j=m.children()[g]),g>=0&&j?q(j).before(b.join("")):m.append(b.join("")));i.createNodeCallback(a)}},destroy:function(a){a&&(e.initCache(a),e.initRoot(a),n.unbindTree(a),n.unbindEvent(a),a.treeObj.empty(),delete s[a.treeId])}, 48 | expandCollapseNode:function(a,b,c,d,g){var h=e.getRoot(a),k;if(b){var m=e.nodeChildren(a,b),r=e.nodeIsParent(a,b);if(h.expandTriggerFlag)k=g,g=function(){k&&k();b.open?a.treeObj.trigger(f.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(f.event.COLLAPSE,[a.treeId,b])},h.expandTriggerFlag=!1;if(!b.open&&r&&(!l(b,f.id.UL,a).get(0)||m&&m.length>0&&!l(m[0],a).get(0)))i.appendParentULDom(a,b),i.createNodeCallback(a);if(b.open==c)j.apply(g,[]);else{var c=l(b,f.id.UL,a),h=l(b,f.id.SWITCH,a),o=l(b,f.id.ICON, 49 | a);r?(b.open=!b.open,b.iconOpen&&b.iconClose&&o.attr("style",i.makeNodeIcoStyle(a,b)),b.open?(i.replaceSwitchClass(b,h,f.folder.OPEN),i.replaceIcoClass(b,o,f.folder.OPEN),d==!1||a.view.expandSpeed==""?(c.show(),j.apply(g,[])):m&&m.length>0?c.slideDown(a.view.expandSpeed,g):(c.show(),j.apply(g,[]))):(i.replaceSwitchClass(b,h,f.folder.CLOSE),i.replaceIcoClass(b,o,f.folder.CLOSE),d==!1||a.view.expandSpeed==""||!(m&&m.length>0)?(c.hide(),j.apply(g,[])):c.slideUp(a.view.expandSpeed,g))):j.apply(g,[])}}else j.apply(g, 50 | [])},expandCollapseParentNode:function(a,b,c,d,e){b&&(b.parentTId?(i.expandCollapseNode(a,b,c,d),b.parentTId&&i.expandCollapseParentNode(a,b.getParentNode(),c,d,e)):i.expandCollapseNode(a,b,c,d,e))},expandCollapseSonNode:function(a,b,c,d,g){var h=e.getRoot(a),h=b?e.nodeChildren(a,b):e.nodeChildren(a,h),k=b?!1:d,f=e.getRoot(a).expandTriggerFlag;e.getRoot(a).expandTriggerFlag=!1;if(h)for(var j=0,l=h.length;j=0;d--)if(b===c[d])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=e.nodeName(b,c),d=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("", 52 | d,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a){a.push("")},makeDOMNodeMainBefore:function(a,b,c){a.push("
  • ")},makeDOMNodeNameAfter:function(a){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=e.nodeTitle(b,c),g=i.makeNodeUrl(b,c),h=i.makeNodeFontCss(b, 53 | c),k=[],m;for(m in h)k.push(m,":",h[m],";");a.push("0?"href='"+g+"'":""," target='",i.makeNodeTarget(c),"' style='",k.join(""),"'");j.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'");a.push(">")},makeNodeFontCss:function(a,b){var c=j.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss); 54 | return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];if(!b.isAjaxing){var d=e.nodeIsParent(a,b);c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0];d?c.push(b.open?f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU)}return f.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=e.nodeIsParent(a,b)&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b[a.data.key.icon];d&&c.push("background:url(",d,") 0 0 no-repeat;");(a.view.showIcon== 55 | !1||!j.apply(a.view.showIcon,[a.treeId,b],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];a.view.showLine?b.level==0&&b.isFirstNode&&b.isLastNode?c.push(f.line.ROOT):b.level==0&&b.isFirstNode?c.push(f.line.ROOTS):b.isLastNode?c.push(f.line.BOTTOM):c.push(f.line.CENTER):c.push(f.line.NOLINE);e.nodeIsParent(a,b)?c.push(b.open?f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU);return i.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return f.className.BUTTON+ 56 | " "+f.className.LEVEL+a.level+" "+f.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
      ");c.push(d);c.push("
    ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?f.line.LINE:""},removeChildNodes:function(a,b){if(b){var c= 57 | e.nodeChildren(a,b);if(c){for(var d=0,g=c.length;dc.bottom||d.right>c.right||d.left0)c[0].isFirstNode=!0},setLastNode:function(a,b){var c=e.nodeChildren(a,b);if(c.length>0)c[c.length-1].isLastNode=!0},removeNode:function(a,b){var c=e.getRoot(a),d=b.parentTId? 61 | b.getParentNode():c;b.isFirstNode=!1;b.isLastNode=!1;b.getPreNode=function(){return null};b.getNextNode=function(){return null};if(e.getNodeCache(a,b.tId)){l(b,a).remove();e.removeNodeCache(a,b);e.removeSelectedNode(a,b);for(var g=e.nodeChildren(a,d),h=0,k=g.length;h0){var r=g[h-1],h=l(r,f.id.UL,a),k=l(r,f.id.SWITCH,a);j=l(r,f.id.ICON,a);d==c?g.length==1?i.replaceSwitchClass(r,k,f.line.ROOT):(c=l(g[0],f.id.SWITCH,a),i.replaceSwitchClass(g[0],c,f.line.ROOTS),i.replaceSwitchClass(r,k,f.line.BOTTOM)):i.replaceSwitchClass(r,k,f.line.BOTTOM);h.removeClass(f.line.LINE)}}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing&& 63 | (a=b.attr("class"),a!=void 0)){a=a.split("_");switch(c){case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:a[a.length-1]=c}b.attr("class",a.join("_"))}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(d!=void 0){d=d.split("_");switch(c){case f.line.ROOT:case f.line.ROOTS:case f.line.CENTER:case f.line.BOTTOM:case f.line.NOLINE:d[0]=i.makeNodeLineClassEx(a)+c;break;case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:d[1]=c}b.attr("class",d.join("_"));c!==f.folder.DOCU? 64 | b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||i.cancelPreSelectedNode(a,null,b);l(b,f.id.A,a).addClass(f.node.CURSELECTED);e.addSelectedNode(a,b);a.treeObj.trigger(f.event.SELECTED,[a.treeId,b])},setNodeFontCss:function(a,b){var c=l(b,f.id.A,a),d=i.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=l(b,f.id.SWITCH,a),d=l(b,f.id.UL,a),g=l(b,f.id.ICON,a),h=i.makeUlLineClass(a,b);h.length==0?d.removeClass(f.line.LINE):d.addClass(h);c.attr("class", 65 | i.makeNodeLineClass(a,b));e.nodeIsParent(a,b)?c.removeAttr("disabled"):c.attr("disabled","disabled");g.removeAttr("style");g.attr("style",i.makeNodeIcoStyle(a,b));g.attr("class",i.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=e.nodeTitle(a,b),d=l(b,f.id.SPAN,a);d.empty();a.view.nameIsHTML?d.html(e.nodeName(a,b)):d.text(e.nodeName(a,b));j.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)&&l(b,f.id.A,a).attr("title",!c?"":c)},setNodeTarget:function(a,b){l(b,f.id.A,a).attr("target",i.makeNodeTarget(b))}, 66 | setNodeUrl:function(a,b){var c=l(b,f.id.A,a),d=i.makeNodeUrl(a,b);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){b.open||!j.canAsync(a,b)?i.expandCollapseNode(a,b,!b.open):a.async.enable?i.asyncNode(a,b)||i.expandCollapseNode(a,b,!b.open):b&&i.expandCollapseNode(a,b,!b.open)}};q.fn.zTree={consts:{className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch",NAME:"node_name"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand", 67 | COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:n,data:e},getZTreeObj:function(a){return(a=e.getZTreeTools(a))? 68 | a:null},destroy:function(a){if(a&&a.length>0)i.destroy(e.getSetting(a));else for(var b in s)i.destroy(s[b])},init:function(a,b,c){var d=j.clone(N);q.extend(!0,d,b);d.treeId=a.attr("id");d.treeObj=a;d.treeObj.empty();s[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";e.initRoot(d);a=e.getRoot(d);c=c?j.clone(j.isArray(c)?c:[c]):[];d.data.simpleData.enable?e.nodeChildren(d,a,e.transformTozTreeFormat(d,c)):e.nodeChildren(d,a,c);e.initCache(d);n.unbindTree(d);n.bindTree(d); 69 | n.unbindEvent(d);n.bindEvent(d);var g={setting:d,addNodes:function(a,b,c,g){function f(){i.addNodes(d,a,b,n,g==!0)}a||(a=null);var l=e.nodeIsParent(d,a);if(a&&!l&&d.data.keep.leaf)return null;l=parseInt(b,10);isNaN(l)?(g=!!c,c=b,b=-1):b=l;if(!c)return null;var n=j.clone(j.isArray(c)?c:[c]);j.canAsync(d,a)?i.asyncNode(d,a,g,f):f();return n},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,a)},destroy:function(){i.destroy(d)},expandAll:function(a){a=!!a;i.expandCollapseSonNode(d,null,a,!0); 70 | return a},expandNode:function(a,b,c,g,f){function n(){var b=l(a,d).get(0);b&&g!==!1&&i.scrollIntoView(d,b)}if(!a||!e.nodeIsParent(d,a))return null;b!==!0&&b!==!1&&(b=!a.open);if((f=!!f)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(f&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;e.getRoot(d).expandTriggerFlag=f;!j.canAsync(d,a)&&c?i.expandCollapseSonNode(d, 71 | a,b,!0,n):(a.open=!b,i.switchNode(this.setting,a),n());return b},getNodes:function(){return e.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:e.getNodeByParam(d,c?e.nodeChildren(d,c):e.getNodes(d),a,b)},getNodeByTId:function(a){return e.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:e.getNodesByParam(d,c?e.nodeChildren(d,c):e.getNodes(d),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:e.getNodesByParamFuzzy(d,c?e.nodeChildren(d,c):e.getNodes(d),a,b)},getNodesByFilter:function(a, 72 | b,c,f){b=!!b;return!a||typeof a!="function"?b?null:[]:e.getNodesByFilter(d,c?e.nodeChildren(d,c):e.getNodes(d),a,b,f)},getNodeIndex:function(a){if(!a)return null;for(var b=a.parentTId?a.getParentNode():e.getRoot(d),b=e.nodeChildren(d,b),c=0,f=b.length;c0?i.createNodes(d,0,c,null,-1):d.async.enable&&d.async.url&&d.async.url!==""&&i.asyncNode(d);return g}};var O=q.fn.zTree,l=j.$,f=O.consts})(jQuery); 77 | -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/js/jquery.ztree.excheck.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree excheck v3.5.36 3 | * http://treejs.cn/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2018-06-26 12 | */ 13 | (function($){ 14 | //default consts of excheck 15 | var _consts = { 16 | event: { 17 | CHECK: "ztree_check" 18 | }, 19 | id: { 20 | CHECK: "_check" 21 | }, 22 | checkbox: { 23 | STYLE: "checkbox", 24 | DEFAULT: "chk", 25 | DISABLED: "disable", 26 | FALSE: "false", 27 | TRUE: "true", 28 | FULL: "full", 29 | PART: "part", 30 | FOCUS: "focus" 31 | }, 32 | radio: { 33 | STYLE: "radio", 34 | TYPE_ALL: "all", 35 | TYPE_LEVEL: "level" 36 | } 37 | }, 38 | //default setting of excheck 39 | _setting = { 40 | check: { 41 | enable: false, 42 | autoCheckTrigger: false, 43 | chkStyle: _consts.checkbox.STYLE, 44 | nocheckInherit: false, 45 | chkDisabledInherit: false, 46 | radioType: _consts.radio.TYPE_LEVEL, 47 | chkboxType: { 48 | "Y": "ps", 49 | "N": "ps" 50 | } 51 | }, 52 | data: { 53 | key: { 54 | checked: "checked" 55 | } 56 | }, 57 | callback: { 58 | beforeCheck:null, 59 | onCheck:null 60 | } 61 | }, 62 | //default root of excheck 63 | _initRoot = function (setting) { 64 | var r = data.getRoot(setting); 65 | r.radioCheckedList = []; 66 | }, 67 | //default cache of excheck 68 | _initCache = function(treeId) {}, 69 | //default bind event of excheck 70 | _bindEvent = function(setting) { 71 | var o = setting.treeObj, 72 | c = consts.event; 73 | o.bind(c.CHECK, function (event, srcEvent, treeId, node) { 74 | event.srcEvent = srcEvent; 75 | tools.apply(setting.callback.onCheck, [event, treeId, node]); 76 | }); 77 | }, 78 | _unbindEvent = function(setting) { 79 | var o = setting.treeObj, 80 | c = consts.event; 81 | o.unbind(c.CHECK); 82 | }, 83 | //default event proxy of excheck 84 | _eventProxy = function(e) { 85 | var target = e.target, 86 | setting = data.getSetting(e.data.treeId), 87 | tId = "", node = null, 88 | nodeEventType = "", treeEventType = "", 89 | nodeEventCallback = null, treeEventCallback = null; 90 | 91 | if (tools.eqs(e.type, "mouseover")) { 92 | if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { 93 | tId = tools.getNodeMainDom(target).id; 94 | nodeEventType = "mouseoverCheck"; 95 | } 96 | } else if (tools.eqs(e.type, "mouseout")) { 97 | if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { 98 | tId = tools.getNodeMainDom(target).id; 99 | nodeEventType = "mouseoutCheck"; 100 | } 101 | } else if (tools.eqs(e.type, "click")) { 102 | if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { 103 | tId = tools.getNodeMainDom(target).id; 104 | nodeEventType = "checkNode"; 105 | } 106 | } 107 | if (tId.length>0) { 108 | node = data.getNodeCache(setting, tId); 109 | switch (nodeEventType) { 110 | case "checkNode" : 111 | nodeEventCallback = _handler.onCheckNode; 112 | break; 113 | case "mouseoverCheck" : 114 | nodeEventCallback = _handler.onMouseoverCheck; 115 | break; 116 | case "mouseoutCheck" : 117 | nodeEventCallback = _handler.onMouseoutCheck; 118 | break; 119 | } 120 | } 121 | var proxyResult = { 122 | stop: nodeEventType === "checkNode", 123 | node: node, 124 | nodeEventType: nodeEventType, 125 | nodeEventCallback: nodeEventCallback, 126 | treeEventType: treeEventType, 127 | treeEventCallback: treeEventCallback 128 | }; 129 | return proxyResult 130 | }, 131 | //default init node of excheck 132 | _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { 133 | if (!n) return; 134 | var checked = data.nodeChecked(setting, n); 135 | checked = data.nodeChecked(setting, n, checked); 136 | n.checkedOld = checked; 137 | if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); 138 | n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); 139 | if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true"); 140 | n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled); 141 | if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true"); 142 | n.halfCheck = !!n.halfCheck; 143 | n.check_Child_State = -1; 144 | n.check_Focus = false; 145 | n.getCheckStatus = function() {return data.getCheckStatus(setting, n);}; 146 | 147 | if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && checked) { 148 | var r = data.getRoot(setting); 149 | r.radioCheckedList.push(n); 150 | } 151 | }, 152 | //add dom for check 153 | _beforeA = function(setting, node, html) { 154 | if (setting.check.enable) { 155 | data.makeChkFlag(setting, node); 156 | html.push(""); 157 | } 158 | }, 159 | //update zTreeObj, add method of check 160 | _zTreeTools = function(setting, zTreeTools) { 161 | zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) { 162 | var nodeChecked = data.nodeChecked(setting, node); 163 | if (node.chkDisabled === true) return; 164 | if (checked !== true && checked !== false) { 165 | checked = !nodeChecked; 166 | } 167 | callbackFlag = !!callbackFlag; 168 | 169 | if (nodeChecked === checked && !checkTypeFlag) { 170 | return; 171 | } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) { 172 | return; 173 | } 174 | if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) { 175 | data.nodeChecked(setting, node, checked); 176 | var checkObj = $$(node, consts.id.CHECK, this.setting); 177 | if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); 178 | view.setChkClass(this.setting, checkObj, node); 179 | view.repairParentChkClassWithSelf(this.setting, node); 180 | if (callbackFlag) { 181 | this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); 182 | } 183 | } 184 | } 185 | 186 | zTreeTools.checkAllNodes = function(checked) { 187 | view.repairAllChk(this.setting, !!checked); 188 | } 189 | 190 | zTreeTools.getCheckedNodes = function(checked) { 191 | var checked = (checked !== false); 192 | var children = data.nodeChildren(setting, data.getRoot(this.setting)); 193 | return data.getTreeCheckedNodes(this.setting, children, checked); 194 | } 195 | 196 | zTreeTools.getChangeCheckedNodes = function() { 197 | var children = data.nodeChildren(setting, data.getRoot(this.setting)); 198 | return data.getTreeChangeCheckedNodes(this.setting, children); 199 | } 200 | 201 | zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) { 202 | disabled = !!disabled; 203 | inheritParent = !!inheritParent; 204 | inheritChildren = !!inheritChildren; 205 | view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren); 206 | view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent); 207 | } 208 | 209 | var _updateNode = zTreeTools.updateNode; 210 | zTreeTools.updateNode = function(node, checkTypeFlag) { 211 | if (_updateNode) _updateNode.apply(zTreeTools, arguments); 212 | if (!node || !this.setting.check.enable) return; 213 | var nObj = $$(node, this.setting); 214 | if (nObj.get(0) && tools.uCanDo(this.setting)) { 215 | var checkObj = $$(node, consts.id.CHECK, this.setting); 216 | if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); 217 | view.setChkClass(this.setting, checkObj, node); 218 | view.repairParentChkClassWithSelf(this.setting, node); 219 | } 220 | } 221 | }, 222 | //method of operate data 223 | _data = { 224 | getRadioCheckedList: function(setting) { 225 | var checkedList = data.getRoot(setting).radioCheckedList; 226 | for (var i=0, j=checkedList.length; i -1 && node.check_Child_State < 2) : (node.check_Child_State > 0))) 240 | }; 241 | return r; 242 | }, 243 | getTreeCheckedNodes: function(setting, nodes, checked, results) { 244 | if (!nodes) return []; 245 | var onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL); 246 | results = !results ? [] : results; 247 | for (var i = 0, l = nodes.length; i < l; i++) { 248 | var node = nodes[i]; 249 | var children = data.nodeChildren(setting, node); 250 | var nodeChecked = data.nodeChecked(setting, node); 251 | if (node.nocheck !== true && node.chkDisabled !== true && nodeChecked == checked) { 252 | results.push(node); 253 | if(onlyOne) { 254 | break; 255 | } 256 | } 257 | data.getTreeCheckedNodes(setting, children, checked, results); 258 | if(onlyOne && results.length > 0) { 259 | break; 260 | } 261 | } 262 | return results; 263 | }, 264 | getTreeChangeCheckedNodes: function(setting, nodes, results) { 265 | if (!nodes) return []; 266 | results = !results ? [] : results; 267 | for (var i = 0, l = nodes.length; i < l; i++) { 268 | var node = nodes[i]; 269 | var children = data.nodeChildren(setting, node); 270 | var nodeChecked = data.nodeChecked(setting, node); 271 | if (node.nocheck !== true && node.chkDisabled !== true && nodeChecked != node.checkedOld) { 272 | results.push(node); 273 | } 274 | data.getTreeChangeCheckedNodes(setting, children, results); 275 | } 276 | return results; 277 | }, 278 | makeChkFlag: function(setting, node) { 279 | if (!node) return; 280 | var chkFlag = -1; 281 | var children = data.nodeChildren(setting, node); 282 | if (children) { 283 | for (var i = 0, l = children.length; i < l; i++) { 284 | var cNode = children[i]; 285 | var nodeChecked = data.nodeChecked(setting, cNode); 286 | var tmp = -1; 287 | if (setting.check.chkStyle == consts.radio.STYLE) { 288 | if (cNode.nocheck === true || cNode.chkDisabled === true) { 289 | tmp = cNode.check_Child_State; 290 | } else if (cNode.halfCheck === true) { 291 | tmp = 2; 292 | } else if (nodeChecked) { 293 | tmp = 2; 294 | } else { 295 | tmp = cNode.check_Child_State > 0 ? 2:0; 296 | } 297 | if (tmp == 2) { 298 | chkFlag = 2; break; 299 | } else if (tmp == 0){ 300 | chkFlag = 0; 301 | } 302 | } else if (setting.check.chkStyle == consts.checkbox.STYLE) { 303 | if (cNode.nocheck === true || cNode.chkDisabled === true) { 304 | tmp = cNode.check_Child_State; 305 | } else if (cNode.halfCheck === true) { 306 | tmp = 1; 307 | } else if (nodeChecked) { 308 | tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1; 309 | } else { 310 | tmp = (cNode.check_Child_State > 0) ? 1 : 0; 311 | } 312 | if (tmp === 1) { 313 | chkFlag = 1; break; 314 | } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) { 315 | chkFlag = 1; break; 316 | } else if (chkFlag === 2 && tmp > -1 && tmp < 2) { 317 | chkFlag = 1; break; 318 | } else if (tmp > -1) { 319 | chkFlag = tmp; 320 | } 321 | } 322 | } 323 | } 324 | node.check_Child_State = chkFlag; 325 | } 326 | }, 327 | //method of event proxy 328 | _event = { 329 | 330 | }, 331 | //method of event handler 332 | _handler = { 333 | onCheckNode: function (event, node) { 334 | if (node.chkDisabled === true) return false; 335 | var setting = data.getSetting(event.data.treeId); 336 | if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; 337 | var nodeChecked = data.nodeChecked(setting, node); 338 | data.nodeChecked(setting, node, !nodeChecked); 339 | view.checkNodeRelation(setting, node); 340 | var checkObj = $$(node, consts.id.CHECK, setting); 341 | view.setChkClass(setting, checkObj, node); 342 | view.repairParentChkClassWithSelf(setting, node); 343 | setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]); 344 | return true; 345 | }, 346 | onMouseoverCheck: function(event, node) { 347 | if (node.chkDisabled === true) return false; 348 | var setting = data.getSetting(event.data.treeId), 349 | checkObj = $$(node, consts.id.CHECK, setting); 350 | node.check_Focus = true; 351 | view.setChkClass(setting, checkObj, node); 352 | return true; 353 | }, 354 | onMouseoutCheck: function(event, node) { 355 | if (node.chkDisabled === true) return false; 356 | var setting = data.getSetting(event.data.treeId), 357 | checkObj = $$(node, consts.id.CHECK, setting); 358 | node.check_Focus = false; 359 | view.setChkClass(setting, checkObj, node); 360 | return true; 361 | } 362 | }, 363 | //method of tools for zTree 364 | _tools = { 365 | 366 | }, 367 | //method of operate ztree dom 368 | _view = { 369 | checkNodeRelation: function(setting, node) { 370 | var pNode, i, l, 371 | r = consts.radio; 372 | var nodeChecked = data.nodeChecked(setting, node); 373 | if (setting.check.chkStyle == r.STYLE) { 374 | var checkedList = data.getRadioCheckedList(setting); 375 | if (nodeChecked) { 376 | if (setting.check.radioType == r.TYPE_ALL) { 377 | for (i = checkedList.length-1; i >= 0; i--) { 378 | pNode = checkedList[i]; 379 | var pNodeChecked = data.nodeChecked(setting, pNode); 380 | if (pNodeChecked && pNode != node) { 381 | data.nodeChecked(setting, pNode, false); 382 | checkedList.splice(i, 1); 383 | 384 | view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); 385 | if (pNode.parentTId != node.parentTId) { 386 | view.repairParentChkClassWithSelf(setting, pNode); 387 | } 388 | } 389 | } 390 | checkedList.push(node); 391 | } else { 392 | var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); 393 | var children = data.nodeChildren(setting, parentNode); 394 | for (i = 0, l = children.length; i < l; i++) { 395 | pNode = children[i]; 396 | var pNodeChecked = data.nodeChecked(setting, pNode); 397 | if (pNodeChecked && pNode != node) { 398 | data.nodeChecked(setting, pNode, false); 399 | view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); 400 | } 401 | } 402 | } 403 | } else if (setting.check.radioType == r.TYPE_ALL) { 404 | for (i = 0, l = checkedList.length; i < l; i++) { 405 | if (node == checkedList[i]) { 406 | checkedList.splice(i, 1); 407 | break; 408 | } 409 | } 410 | } 411 | 412 | } else { 413 | var children = data.nodeChildren(setting, node); 414 | if (nodeChecked && (!children || children.length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { 415 | view.setSonNodeCheckBox(setting, node, true); 416 | } 417 | if (!nodeChecked && (!children || children.length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) { 418 | view.setSonNodeCheckBox(setting, node, false); 419 | } 420 | if (nodeChecked && setting.check.chkboxType.Y.indexOf("p") > -1) { 421 | view.setParentNodeCheckBox(setting, node, true); 422 | } 423 | if (!nodeChecked && setting.check.chkboxType.N.indexOf("p") > -1) { 424 | view.setParentNodeCheckBox(setting, node, false); 425 | } 426 | } 427 | }, 428 | makeChkClass: function(setting, node) { 429 | var c = consts.checkbox, r = consts.radio, 430 | fullStyle = ""; 431 | var nodeChecked = data.nodeChecked(setting, node); 432 | if (node.chkDisabled === true) { 433 | fullStyle = c.DISABLED; 434 | } else if (node.halfCheck) { 435 | fullStyle = c.PART; 436 | } else if (setting.check.chkStyle == r.STYLE) { 437 | fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART; 438 | } else { 439 | fullStyle = nodeChecked ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART); 440 | } 441 | var chkName = setting.check.chkStyle + "_" + (nodeChecked ? c.TRUE : c.FALSE) + "_" + fullStyle; 442 | chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; 443 | return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; 444 | }, 445 | repairAllChk: function(setting, checked) { 446 | if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { 447 | var root = data.getRoot(setting); 448 | var children = data.nodeChildren(setting, root); 449 | for (var i = 0, l = children.length; i 0) { 476 | view.repairParentChkClass(setting, children[0]); 477 | } else { 478 | view.repairParentChkClass(setting, node); 479 | } 480 | }, 481 | repairSonChkDisabled: function(setting, node, chkDisabled, inherit) { 482 | if (!node) return; 483 | if (node.chkDisabled != chkDisabled) { 484 | node.chkDisabled = chkDisabled; 485 | } 486 | view.repairChkClass(setting, node); 487 | var children = data.nodeChildren(setting, node); 488 | if (children && inherit) { 489 | for (var i = 0, l = children.length; i < l; i++) { 490 | var sNode = children[i]; 491 | view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit); 492 | } 493 | } 494 | }, 495 | repairParentChkDisabled: function(setting, node, chkDisabled, inherit) { 496 | if (!node) return; 497 | if (node.chkDisabled != chkDisabled && inherit) { 498 | node.chkDisabled = chkDisabled; 499 | } 500 | view.repairChkClass(setting, node); 501 | view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit); 502 | }, 503 | setChkClass: function(setting, obj, node) { 504 | if (!obj) return; 505 | if (node.nocheck === true) { 506 | obj.hide(); 507 | } else { 508 | obj.show(); 509 | } 510 | obj.attr('class', view.makeChkClass(setting, node)); 511 | }, 512 | setParentNodeCheckBox: function(setting, node, value, srcNode) { 513 | var checkObj = $$(node, consts.id.CHECK, setting); 514 | if (!srcNode) srcNode = node; 515 | data.makeChkFlag(setting, node); 516 | if (node.nocheck !== true && node.chkDisabled !== true) { 517 | data.nodeChecked(setting, node, value); 518 | view.setChkClass(setting, checkObj, node); 519 | if (setting.check.autoCheckTrigger && node != srcNode) { 520 | setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); 521 | } 522 | } 523 | if (node.parentTId) { 524 | var pSign = true; 525 | if (!value) { 526 | var pNodes = data.nodeChildren(setting, node.getParentNode()); 527 | for (var i = 0, l = pNodes.length; i < l; i++) { 528 | var pNode = pNodes[i]; 529 | var nodeChecked = data.nodeChecked(setting, pNode); 530 | if ((pNode.nocheck !== true && pNode.chkDisabled !== true && nodeChecked) 531 | || ((pNode.nocheck === true || pNode.chkDisabled === true) && pNode.check_Child_State > 0)) { 532 | pSign = false; 533 | break; 534 | } 535 | } 536 | } 537 | if (pSign) { 538 | view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode); 539 | } 540 | } 541 | }, 542 | setSonNodeCheckBox: function(setting, node, value, srcNode) { 543 | if (!node) return; 544 | var checkObj = $$(node, consts.id.CHECK, setting); 545 | if (!srcNode) srcNode = node; 546 | 547 | var hasDisable = false; 548 | var children = data.nodeChildren(setting, node); 549 | if (children) { 550 | for (var i = 0, l = children.length; i < l; i++) { 551 | var sNode = children[i]; 552 | view.setSonNodeCheckBox(setting, sNode, value, srcNode); 553 | if (sNode.chkDisabled === true) hasDisable = true; 554 | } 555 | } 556 | 557 | if (node != data.getRoot(setting) && node.chkDisabled !== true) { 558 | if (hasDisable && node.nocheck !== true) { 559 | data.makeChkFlag(setting, node); 560 | } 561 | if (node.nocheck !== true && node.chkDisabled !== true) { 562 | data.nodeChecked(setting, node, value); 563 | if (!hasDisable) node.check_Child_State = (children && children.length > 0) ? (value ? 2 : 0) : -1; 564 | } else { 565 | node.check_Child_State = -1; 566 | } 567 | view.setChkClass(setting, checkObj, node); 568 | if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) { 569 | setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); 570 | } 571 | } 572 | 573 | } 574 | }, 575 | 576 | _z = { 577 | tools: _tools, 578 | view: _view, 579 | event: _event, 580 | data: _data 581 | }; 582 | $.extend(true, $.fn.zTree.consts, _consts); 583 | $.extend(true, $.fn.zTree._z, _z); 584 | 585 | var zt = $.fn.zTree, 586 | tools = zt._z.tools, 587 | consts = zt.consts, 588 | view = zt._z.view, 589 | data = zt._z.data, 590 | event = zt._z.event, 591 | $$ = tools.$; 592 | 593 | data.nodeChecked = function(setting, node, newChecked) { 594 | if (!node) { 595 | return false; 596 | } 597 | var key = setting.data.key.checked; 598 | if (typeof newChecked !== 'undefined') { 599 | if (typeof newChecked === "string") { 600 | newChecked = tools.eqs(newChecked, "true"); 601 | } 602 | newChecked = !!newChecked; 603 | node[key] = newChecked; 604 | } 605 | return node[key]; 606 | }; 607 | 608 | data.exSetting(_setting); 609 | data.addInitBind(_bindEvent); 610 | data.addInitUnBind(_unbindEvent); 611 | data.addInitCache(_initCache); 612 | data.addInitNode(_initNode); 613 | data.addInitProxy(_eventProxy, true); 614 | data.addInitRoot(_initRoot); 615 | data.addBeforeA(_beforeA); 616 | data.addZTreeTools(_zTreeTools); 617 | 618 | var _createNodes = view.createNodes; 619 | view.createNodes = function(setting, level, nodes, parentNode, index) { 620 | if (_createNodes) _createNodes.apply(view, arguments); 621 | if (!nodes) return; 622 | view.repairParentChkClassWithSelf(setting, parentNode); 623 | } 624 | var _removeNode = view.removeNode; 625 | view.removeNode = function(setting, node) { 626 | var parentNode = node.getParentNode(); 627 | if (_removeNode) _removeNode.apply(view, arguments); 628 | if (!node || !parentNode) return; 629 | view.repairChkClass(setting, parentNode); 630 | view.repairParentChkClass(setting, parentNode); 631 | } 632 | 633 | var _appendNodes = view.appendNodes; 634 | view.appendNodes = function(setting, level, nodes, parentNode, index, initFlag, openFlag) { 635 | var html = ""; 636 | if (_appendNodes) { 637 | html = _appendNodes.apply(view, arguments); 638 | } 639 | if (parentNode) { 640 | data.makeChkFlag(setting, parentNode); 641 | } 642 | return html; 643 | } 644 | })(jQuery); -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/js/jquery.ztree.excheck.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree excheck v3.5.36 3 | * http://treejs.cn/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2018-06-26 12 | */ 13 | (function(n){var q,r,s,p={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},w={check:{enable:!1,autoCheckTrigger:!1,chkStyle:p.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:p.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};q=function(c, 14 | a){if(a.chkDisabled===!0)return!1;var b=e.getSetting(c.data.treeId);if(i.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;var d=e.nodeChecked(b,a);e.nodeChecked(b,a,!d);f.checkNodeRelation(b,a);d=m(a,h.id.CHECK,b);f.setChkClass(b,d,a);f.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(h.event.CHECK,[c,b.treeId,a]);return!0};r=function(c,a){if(a.chkDisabled===!0)return!1;var b=e.getSetting(c.data.treeId),d=m(a,h.id.CHECK,b);a.check_Focus=!0;f.setChkClass(b,d,a);return!0};s=function(c, 15 | a){if(a.chkDisabled===!0)return!1;var b=e.getSetting(c.data.treeId),d=m(a,h.id.CHECK,b);a.check_Focus=!1;f.setChkClass(b,d,a);return!0};n.extend(!0,n.fn.zTree.consts,p);n.extend(!0,n.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,j;d=h.radio;b=e.nodeChecked(c,a);if(c.check.chkStyle==d.STYLE){var g=e.getRadioCheckedList(c);if(b)if(c.check.radioType==d.TYPE_ALL){for(d=g.length-1;d>=0;d--){b=g[d];var k=e.nodeChecked(c,b);k&&b!=a&&(e.nodeChecked(c,b,!1),g.splice(d,1),f.setChkClass(c, 16 | m(b,h.id.CHECK,c),b),b.parentTId!=a.parentTId&&f.repairParentChkClassWithSelf(c,b))}g.push(a)}else{g=a.parentTId?a.getParentNode():e.getRoot(c);g=e.nodeChildren(c,g);for(d=0,j=g.length;d-1)&&f.setSonNodeCheckBox(c,a, 17 | !0),!b&&(!g||g.length==0||c.check.chkboxType.N.indexOf("s")>-1)&&f.setSonNodeCheckBox(c,a,!1),b&&c.check.chkboxType.Y.indexOf("p")>-1&&f.setParentNodeCheckBox(c,a,!0),!b&&c.check.chkboxType.N.indexOf("p")>-1&&f.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=h.checkbox,d=h.radio,j="",g=e.nodeChecked(c,a),j=a.chkDisabled===!0?b.DISABLED:a.halfCheck?b.PART:c.check.chkStyle==d.STYLE?a.check_Child_State<1?b.FULL:b.PART:g?a.check_Child_State===2||a.check_Child_State===-1?b.FULL:b.PART: 18 | a.check_Child_State<1?b.FULL:b.PART,d=c.check.chkStyle+"_"+(g?b.TRUE:b.FALSE)+"_"+j,d=a.check_Focus&&a.chkDisabled!==!0?d+"_"+b.FOCUS:d;return h.className.BUTTON+" "+b.DEFAULT+" "+d},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===h.checkbox.STYLE)for(var b=e.getRoot(c),b=e.nodeChildren(c,b),d=0,j=b.length;d0?f.repairParentChkClass(c,b[0]):f.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b,d){if(a){if(a.chkDisabled!=b)a.chkDisabled=b;f.repairChkClass(c,a);if((a=e.nodeChildren(c,a))&&d)for(var j=0,g=a.length;j0){j=!1;break}}j&&f.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var j=m(a,h.id.CHECK,c);d||(d=a);var g=!1,k=e.nodeChildren(c,a);if(k)for(var o=0,l=k.length;o0?b?2:0:-1}else a.check_Child_State=-1;f.setChkClass(c,j,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&a.chkDisabled!==!0&&c.treeObj.trigger(h.event.CHECK,[null,c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=e.getRoot(c).radioCheckedList,b=0,d=a.length;b-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var j=b&&c.check.chkStyle==h.radio.STYLE&&c.check.radioType==h.radio.TYPE_ALL,d=!d?[]:d,g=0,f=a.length;g0)break}return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];for(var b=!b?[]:b,d=0,j=a.length;d0?2:0,l==2){b=2;break}else l==0&&(b=0);else if(c.check.chkStyle==h.checkbox.STYLE)if(l=f.nocheck===!0||f.chkDisabled===!0?f.check_Child_State:f.halfCheck===!0?1:i?f.check_Child_State===-1||f.check_Child_State===2?2:1:f.check_Child_State>0?1:0,l===1){b=1;break}else if(l===2&&b>-1&&j>0&&l!== 26 | b){b=1;break}else if(b===2&&l>-1&&l<2){b=1;break}else l>-1&&(b=l)}a.check_Child_State=b}}}});var n=n.fn.zTree,i=n._z.tools,h=n.consts,f=n._z.view,e=n._z.data,m=i.$;e.nodeChecked=function(c,a,b){if(!a)return!1;c=c.data.key.checked;typeof b!=="undefined"&&(typeof b==="string"&&(b=i.eqs(b,"true")),a[c]=!!b);return a[c]};e.exSetting(w);e.addInitBind(function(c){c.treeObj.bind(h.event.CHECK,function(a,b,d,e){a.srcEvent=b;i.apply(c.callback.onCheck,[a,d,e])})});e.addInitUnBind(function(c){c.treeObj.unbind(h.event.CHECK)}); 27 | e.addInitCache(function(){});e.addInitNode(function(c,a,b,d){if(b){a=e.nodeChecked(c,b);a=e.nodeChecked(c,b,a);b.checkedOld=a;if(typeof b.nocheck=="string")b.nocheck=i.eqs(b.nocheck,"true");b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;if(typeof b.chkDisabled=="string")b.chkDisabled=i.eqs(b.chkDisabled,"true");b.chkDisabled=!!b.chkDisabled||c.check.chkDisabledInherit&&d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=i.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck; 28 | b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=function(){return e.getCheckStatus(c,b)};c.check.chkStyle==h.radio.STYLE&&c.check.radioType==h.radio.TYPE_ALL&&a&&e.getRoot(c).radioCheckedList.push(b)}});e.addInitProxy(function(c){var a=c.target,b=e.getSetting(c.data.treeId),d="",f=null,g="",k=null;if(i.eqs(c.type,"mouseover")){if(b.check.enable&&i.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+h.id.CHECK)!==null)d=i.getNodeMainDom(a).id,g="mouseoverCheck"}else if(i.eqs(c.type,"mouseout")){if(b.check.enable&& 29 | i.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+h.id.CHECK)!==null)d=i.getNodeMainDom(a).id,g="mouseoutCheck"}else if(i.eqs(c.type,"click")&&b.check.enable&&i.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+h.id.CHECK)!==null)d=i.getNodeMainDom(a).id,g="checkNode";if(d.length>0)switch(f=e.getNodeCache(b,d),g){case "checkNode":k=q;break;case "mouseoverCheck":k=r;break;case "mouseoutCheck":k=s}return{stop:g==="checkNode",node:f,nodeEventType:g,nodeEventCallback:k,treeEventType:"",treeEventCallback:null}}, 30 | !0);e.addInitRoot(function(c){e.getRoot(c).radioCheckedList=[]});e.addBeforeA(function(c,a,b){c.check.enable&&(e.makeChkFlag(c,a),b.push(""))});e.addZTreeTools(function(c,a){a.checkNode=function(a,b,g,k){var o=e.nodeChecked(c,a);if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!o),k=!!k,(o!==b||g)&&!(k&&i.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a], 31 | !0)==!1)&&i.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0))e.nodeChecked(c,a,b),b=m(a,h.id.CHECK,this.setting),(g||this.setting.check.chkStyle===h.radio.STYLE)&&f.checkNodeRelation(this.setting,a),f.setChkClass(this.setting,b,a),f.repairParentChkClassWithSelf(this.setting,a),k&&this.setting.treeObj.trigger(h.event.CHECK,[null,this.setting.treeId,a])};a.checkAllNodes=function(a){f.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var a=a!==!1,b=e.nodeChildren(c,e.getRoot(this.setting)); 32 | return e.getTreeCheckedNodes(this.setting,b,a)};a.getChangeCheckedNodes=function(){var a=e.nodeChildren(c,e.getRoot(this.setting));return e.getTreeChangeCheckedNodes(this.setting,a)};a.setChkDisabled=function(a,b,c,e){b=!!b;c=!!c;f.repairSonChkDisabled(this.setting,a,b,!!e);f.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var b=a.updateNode;a.updateNode=function(c,e){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&m(c,this.setting).get(0)&&i.uCanDo(this.setting)){var g=m(c, 33 | h.id.CHECK,this.setting);(e==!0||this.setting.check.chkStyle===h.radio.STYLE)&&f.checkNodeRelation(this.setting,c);f.setChkClass(this.setting,g,c);f.repairParentChkClassWithSelf(this.setting,c)}}});var t=f.createNodes;f.createNodes=function(c,a,b,d,e){t&&t.apply(f,arguments);b&&f.repairParentChkClassWithSelf(c,d)};var u=f.removeNode;f.removeNode=function(c,a){var b=a.getParentNode();u&&u.apply(f,arguments);a&&b&&(f.repairChkClass(c,b),f.repairParentChkClass(c,b))};var v=f.appendNodes;f.appendNodes= 34 | function(c,a,b,d,h,g,i){var m="";v&&(m=v.apply(f,arguments));d&&e.makeChkFlag(c,d);return m}})(jQuery); 35 | -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/js/jquery.ztree.exedit.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree exedit v3.5.36 3 | * http://treejs.cn/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2018-06-26 12 | */ 13 | (function(B){var I={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},v={onHoverOverNode:function(a,b){var c=i.getSetting(a.data.treeId),d=i.getRoot(c);if(d.curHoverNode!=b)v.onHoverOutNode(a);d.curHoverNode=b;e.addHoverDom(c,b)},onHoverOutNode:function(a){var a= 14 | i.getSetting(a.data.treeId),b=i.getRoot(a);if(b.curHoverNode&&!i.isSelectedNode(a,b.curHoverNode))e.removeTreeDom(a,b.curHoverNode),b.curHoverNode=null},onMousedownNode:function(a,b){function c(a){if(m.dragFlag==0&&Math.abs(N-a.clientX)1){var o=n[0].parentTId?i.nodeChildren(f,n[0].getParentNode()):i.getNodes(f);g=[];for(b=0,c=o.length;b-1&&p+1!==b&&(j=!1),g.push(o[b]),p=b),n.length===g.length){n=g;break}}j&&(H=n[0].getPreNode(),Q=n[n.length-1].getNextNode());C=q("
      ", 16 | f);for(b=0,c=n.length;b0),e.removeTreeDom(f,g),b>f.edit.drag.maxShowNodeNum-1||(j=q("
    • ",f),j.append(q(g,d.id.A,f).clone()),j.css("padding","0"),j.children("#"+g.tId+d.id.A).removeClass(d.node.CURSELECTED),C.append(j),b==f.edit.drag.maxShowNodeNum-1&&(j=q("
    • ...
    • ",f),C.append(j)));C.attr("id",n[0].tId+d.id.UL+"_tmp");C.addClass(f.treeObj.attr("class"));C.appendTo(L);u=q("", 17 | f);u.attr("id","zTreeMove_arrow_tmp");u.appendTo(L);f.treeObj.trigger(d.event.DRAG,[a,f.treeId,n])}if(m.dragFlag==1){t&&u.attr("id")==a.target.id&&w&&a.clientX+G.scrollLeft()+2>B("#"+w+d.id.A,t).offset().left?(g=B("#"+w+d.id.A,t),a.target=g.length>0?g.get(0):a.target):t&&(t.removeClass(d.node.TMPTARGET_TREE),w&&B("#"+w+d.id.A,t).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER)); 18 | w=t=null;J=!1;h=f;g=i.getSettings();for(var z in g)if(g[z].treeId&&g[z].edit.enable&&g[z].treeId!=f.treeId&&(a.target.id==g[z].treeId||B(a.target).parents("#"+g[z].treeId).length>0))J=!0,h=g[z];z=G.scrollTop();j=G.scrollLeft();p=h.treeObj.offset();b=h.treeObj.get(0).scrollHeight;g=h.treeObj.get(0).scrollWidth;c=a.clientY+z-p.top;var E=h.treeObj.height()+p.top-a.clientY-z,r=a.clientX+j-p.left,s=h.treeObj.width()+p.left-a.clientX-j,p=cf.edit.drag.borderMin,o=Ef.edit.drag.borderMin,F=rf.edit.drag.borderMin,v=sf.edit.drag.borderMin,E=c>f.edit.drag.borderMin&&E>f.edit.drag.borderMin&&r>f.edit.drag.borderMin&&s>f.edit.drag.borderMin,r=p&&h.treeObj.scrollTop()<=0,s=o&&h.treeObj.scrollTop()+h.treeObj.height()+10>=b,M=F&&h.treeObj.scrollLeft()<=0,P=v&&h.treeObj.scrollLeft()+h.treeObj.width()+10>=g;if(a.target&&k.isChildOrSelf(a.target,h.treeId)){for(var D=a.target;D&&D.tagName&&!k.eqs(D.tagName,"li")&&D.id!= 20 | h.treeId;)D=D.parentNode;var R=!0;for(b=0,c=n.length;b0){R=!1;break}if(R&&a.target&&k.isChildOrSelf(a.target,D.id+d.id.A))t=B(D),w=D.id}g=n[0];if(E&&k.isChildOrSelf(a.target,h.treeId)){if(!t&&(a.target.id==h.treeId||r||s||M||P)&&(J||!J&&g.parentTId))t=h.treeObj;p?h.treeObj.scrollTop(h.treeObj.scrollTop()-10):o&&h.treeObj.scrollTop(h.treeObj.scrollTop()+10);F?h.treeObj.scrollLeft(h.treeObj.scrollLeft()-10):v&&h.treeObj.scrollLeft(h.treeObj.scrollLeft()+ 21 | 10);t&&t!=h.treeObj&&t.offset().left=-0.2)&&g?(j=1-u.width(),b=E-u.height()/2,x=d.move.TYPE_PREV):(M==0||z>=M&&z<=1.2)&&c?(j=1-u.width(),b=v==null||i.nodeIsParent(f,A)&&A.open?E+F.height()-u.height()/2:v.offset().top-u.height()/2,x=d.move.TYPE_NEXT):p?(j=5-u.width(),b=E,x=d.move.TYPE_INNER):o(),t){u.css({display:"block",top:b+"px",left:r+j+"px"});F.addClass(d.node.TMPTARGET_NODE+"_"+x);if(S!=w||T!=x)K=(new Date).getTime();if(A&&i.nodeIsParent(f, 24 | A)&&x==d.move.TYPE_INNER&&(z=!0,window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==A.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===A.tId&&(z=!1),z))window.zTreeMoveTimer=setTimeout(function(){x==d.move.TYPE_INNER&&A&&i.nodeIsParent(f,A)&&!A.open&&(new Date).getTime()-K>h.edit.drag.autoOpenTime&&k.apply(h.callback.beforeDragOpen,[h.treeId,A],!0)&&(e.switchNode(h,A),h.edit.drag.autoExpandTrigger&&h.treeObj.trigger(d.event.EXPAND, 25 | [h.treeId,A]))},h.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=A.tId}}else if(x=d.move.TYPE_INNER,t&&k.apply(h.edit.drag.inner,[h.treeId,n,null],!!h.edit.drag.inner)?t.addClass(d.node.TMPTARGET_TREE):t=null,u.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;S=w;T=x;f.treeObj.trigger(d.event.DRAGMOVE,[a,f.treeId,n])}return!1}function l(a){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId= 26 | null;T=S=null;G.unbind("mousemove",c);G.unbind("mouseup",l);G.unbind("selectstart",g);L.css("cursor","");t&&(t.removeClass(d.node.TMPTARGET_TREE),w&&B("#"+w+d.id.A,t).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER));k.showIfameMask(f,!1);y.showHoverDom=!0;if(m.dragFlag!=0){m.dragFlag=0;var b,j,o;for(b=0,j=n.length;b0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(b)for(var d=q("iframe",a),g=0,e=d.length;g",a);j.appendTo(q("body",a));c.dragMaskList.push(j)}}},view:{addEditBtn:function(a,b){if(!(b.editNameFlag|| 33 | q(b,d.id.EDIT,a).length>0)&&k.apply(a.edit.showRenameBtn,[a.treeId,b],a.edit.showRenameBtn)){var c=q(b,d.id.A,a),l="";c.append(l);q(b,d.id.EDIT,a).bind("click",function(){if(!k.uCanDo(a)||k.apply(a.callback.beforeEditName,[a.treeId,b],!0)==!1)return!1;e.editNode(a,b);return!1}).show()}},addRemoveBtn:function(a, 34 | b){if(!(b.editNameFlag||q(b,d.id.REMOVE,a).length>0)&&k.apply(a.edit.showRemoveBtn,[a.treeId,b],a.edit.showRemoveBtn)){var c=q(b,d.id.A,a),l="";c.append(l);q(b,d.id.REMOVE,a).bind("click",function(){if(!k.uCanDo(a)||k.apply(a.callback.beforeRemove,[a.treeId,b],!0)==!1)return!1;e.removeNode(a,b);a.treeObj.trigger(d.event.REMOVE, 35 | [a.treeId,b]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(a,b){if(i.getRoots().showHoverDom)b.isHover=!0,a.edit.enable&&(e.addEditBtn(a,b),e.addRemoveBtn(a,b)),k.apply(a.view.addHoverDom,[a.treeId,b])},cancelCurEditNode:function(a,b,c){var l=i.getRoot(a),g=l.curEditNode;if(g){var o=l.curEditInput,b=b?b:c?i.nodeName(a,g):o.val();if(k.apply(a.callback.beforeRename,[a.treeId,g,b,c],!0)===!1)return!1;i.nodeName(a,g,b);q(g,d.id.A,a).removeClass(d.node.CURSELECTED_EDIT); 36 | o.unbind();e.setNodeName(a,g);g.editNameFlag=!1;l.curEditNode=null;l.curEditInput=null;e.selectNode(a,g,!1);a.treeObj.trigger(d.event.RENAME,[a.treeId,g,c])}return l.noSelection=!0},editNode:function(a,b){var c=i.getRoot(a);e.editNodeBlur=!1;if(i.isSelectedNode(a,b)&&c.curEditNode==b&&b.editNameFlag)setTimeout(function(){k.inputFocus(c.curEditInput)},0);else{b.editNameFlag=!0;e.removeTreeDom(a,b);e.cancelCurEditNode(a);e.selectNode(a,b,!1);q(b,d.id.SPAN,a).html("");var l=q(b,d.id.INPUT,a);l.attr("value",i.nodeName(a,b));a.edit.editNameSelectAll?k.inputSelect(l):k.inputFocus(l);l.bind("blur",function(){e.editNodeBlur||e.cancelCurEditNode(a)}).bind("keydown",function(b){b.keyCode=="13"?(e.editNodeBlur=!0,e.cancelCurEditNode(a)):b.keyCode=="27"&&e.cancelCurEditNode(a,null,!0)}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});q(b,d.id.A,a).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=l; 38 | c.noSelection=!1;c.curEditNode=b}},moveNode:function(a,b,c,l,g,k){var j=i.getRoot(a);if(b!=c&&(!a.data.keep.leaf||!b||i.nodeIsParent(a,b)||l!=d.move.TYPE_INNER)){var f=c.parentTId?c.getParentNode():j,m=b===null||b==j;m&&b===null&&(b=j);if(m)l=d.move.TYPE_INNER;j=b.parentTId?b.getParentNode():j;if(l!=d.move.TYPE_PREV&&l!=d.move.TYPE_NEXT)l=d.move.TYPE_INNER;if(l==d.move.TYPE_INNER)if(m)c.parentTId=null;else{if(!i.nodeIsParent(a,b))i.nodeIsParent(a,b,!0),b.open=!!b.open,e.setNodeLineIcos(a,b);c.parentTId= 39 | b.tId}var y;m?y=m=a.treeObj:(!k&&l==d.move.TYPE_INNER?e.expandCollapseNode(a,b,!0,!1):k||e.expandCollapseNode(a,b.getParentNode(),!0,!1),m=q(b,a),y=q(b,d.id.UL,a),m.get(0)&&!y.get(0)&&(y=[],e.makeUlHtml(a,b,y,""),m.append(y.join(""))),y=q(b,d.id.UL,a));var r=q(c,a);r.get(0)?m.get(0)||r.remove():r=e.appendNodes(a,c.level,[c],null,-1,!1,!0).join("");y.get(0)&&l==d.move.TYPE_INNER?y.append(r):m.get(0)&&l==d.move.TYPE_PREV?m.before(r):m.get(0)&&l==d.move.TYPE_NEXT&&m.after(r);var s;y=-1;var r=0,n=null, 40 | m=null,B=c.level,v=i.nodeChildren(a,f),C=i.nodeChildren(a,j),u=i.nodeChildren(a,b);if(c.isFirstNode){if(y=0,v.length>1)n=v[1],n.isFirstNode=!0}else if(c.isLastNode)y=v.length-1,n=v[y-1],n.isLastNode=!0;else for(j=0,s=v.length;j=0&&v.splice(y,1);if(l!=d.move.TYPE_INNER)for(j=0,s=C.length;j0)m=u[u.length-1],m.isLastNode=!1;u.splice(u.length,0,c);c.isLastNode=!0;c.isFirstNode= 41 | u.length==1}else b.isFirstNode&&l==d.move.TYPE_PREV?(C.splice(r,0,c),m=b,m.isFirstNode=!1,c.parentTId=b.parentTId,c.isFirstNode=!0,c.isLastNode=!1):b.isLastNode&&l==d.move.TYPE_NEXT?(C.splice(r+1,0,c),m=b,m.isLastNode=!1,c.parentTId=b.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(l==d.move.TYPE_PREV?C.splice(r,0,c):C.splice(r+1,0,c),c.parentTId=b.parentTId,c.isFirstNode=!1,c.isLastNode=!1);i.fixPIdKeyValue(a,c);i.setSonNodeLevel(a,c.getParentNode(),c);e.setNodeLineIcos(a,c);e.repairNodeLevelClass(a, 42 | c,B);!a.data.keep.parent&&v.length<1?(i.nodeIsParent(a,f,!1),f.open=!1,b=q(f,d.id.UL,a),l=q(f,d.id.SWITCH,a),j=q(f,d.id.ICON,a),e.replaceSwitchClass(f,l,d.folder.DOCU),e.replaceIcoClass(f,j,d.folder.DOCU),b.css("display","none")):n&&e.setNodeLineIcos(a,n);m&&e.setNodeLineIcos(a,m);a.check&&a.check.enable&&e.repairChkClass&&(e.repairChkClass(a,f),e.repairParentChkClassWithSelf(a,f),f!=c.parent&&e.repairParentChkClassWithSelf(a,c));k||e.expandCollapseParentNode(a,c.getParentNode(),!0,g)}},removeEditBtn:function(a, 43 | b){q(b,d.id.EDIT,a).unbind().remove()},removeRemoveBtn:function(a,b){q(b,d.id.REMOVE,a).unbind().remove()},removeTreeDom:function(a,b){b.isHover=!1;e.removeEditBtn(a,b);e.removeRemoveBtn(a,b);k.apply(a.view.removeHoverDom,[a.treeId,b])},repairNodeLevelClass:function(a,b,c){if(c!==b.level){var e=q(b,a),g=q(b,d.id.A,a),a=q(b,d.id.UL,a),c=d.className.LEVEL+c,b=d.className.LEVEL+b.level;e.removeClass(c);e.addClass(b);g.removeClass(c);g.addClass(b);a.removeClass(c);a.addClass(b)}},selectNodes:function(a, 44 | b){for(var c=0,d=b.length;c0)}},event:{},data:{setSonNodeLevel:function(a,b,c){if(c){var d=i.nodeChildren(a,c);c.level=b?b.level+1:0;if(d)for(var b=0,g=d.length;b0)switch(o=i.getNodeCache(c,g),j){case "mousedownNode":f=v.onMousedownNode;break;case "hoverOverNode":f=v.onHoverOverNode; 48 | break;case "hoverOutNode":f=v.onHoverOutNode}return{stop:!1,node:o,nodeEventType:j,nodeEventCallback:f,treeEventType:"",treeEventCallback:null}});i.addInitRoot(function(a){var a=i.getRoot(a),b=i.getRoots();a.curEditNode=null;a.curEditInput=null;a.curHoverNode=null;a.dragFlag=0;a.dragNodeShowBefore=[];a.dragMaskList=[];b.showHoverDom=!0});i.addZTreeTools(function(a,b){b.cancelEditName=function(a){i.getRoot(this.setting).curEditNode&&e.cancelCurEditNode(this.setting,a?a:null,!0)};b.copyNode=function(b, 49 | l,g,o){if(!l)return null;var j=i.nodeIsParent(a,b);if(b&&!j&&this.setting.data.keep.leaf&&g===d.move.TYPE_INNER)return null;var f=this,m=k.clone(l);if(!b)b=null,g=d.move.TYPE_INNER;g==d.move.TYPE_INNER?(l=function(){e.addNodes(f.setting,b,-1,[m],o)},k.canAsync(this.setting,b)?e.asyncNode(this.setting,b,o,l):l()):(e.addNodes(this.setting,b.parentNode,-1,[m],o),e.moveNode(this.setting,b,m,g,!1,o));return m};b.editName=function(a){a&&a.tId&&a===i.getNodeCache(this.setting,a.tId)&&(a.parentTId&&e.expandCollapseParentNode(this.setting, 50 | a.getParentNode(),!0),e.editNode(this.setting,a))};b.moveNode=function(b,l,g,o){function j(){e.moveNode(m.setting,b,l,g,!1,o)}if(!l)return l;var f=i.nodeIsParent(a,b);if(b&&!f&&this.setting.data.keep.leaf&&g===d.move.TYPE_INNER)return null;else if(b&&(l.parentTId==b.tId&&g==d.move.TYPE_INNER||q(l,this.setting).find("#"+b.tId).length>0))return null;else b||(b=null);var m=this;k.canAsync(this.setting,b)&&g===d.move.TYPE_INNER?e.asyncNode(this.setting,b,o,j):j();return l};b.setEditable=function(a){this.setting.edit.enable= 51 | a;return this.refresh()}});var N=e.cancelPreSelectedNode;e.cancelPreSelectedNode=function(a,b){for(var c=i.getRoot(a).curSelectedList,d=0,g=c.length;d"); 127 | }, 128 | showNode: function(setting, node, options) { 129 | data.isHidden(setting, node, false); 130 | data.initShowForExCheck(setting, node); 131 | $$(node, setting).show(); 132 | }, 133 | showNodes: function(setting, nodes, options) { 134 | if (!nodes || nodes.length == 0) { 135 | return; 136 | } 137 | var pList = {}, i, j; 138 | for (i=0, j=nodes.length; i 0 && !isHidden) { 183 | children[0].isFirstNode = true; 184 | } else if (children.length > 0) { 185 | view.setFirstNodeForHide(setting, children); 186 | } 187 | }, 188 | setLastNode: function(setting, parentNode) { 189 | var children = data.nodeChildren(setting, parentNode); 190 | var isHidden = data.isHidden(setting, children[0]); 191 | if (children.length > 0 && !isHidden) { 192 | children[children.length - 1].isLastNode = true; 193 | } else if (children.length > 0) { 194 | view.setLastNodeForHide(setting, children); 195 | } 196 | }, 197 | setFirstNodeForHide: function(setting, nodes) { 198 | var n,i,j; 199 | for (i=0, j=nodes.length; i=0; i--) { 241 | n = nodes[i]; 242 | if (n.isLastNode) { 243 | break; 244 | } 245 | var isHidden = data.isHidden(setting, n); 246 | if (!isHidden && !n.isLastNode) { 247 | n.isLastNode = true; 248 | view.setNodeLineIcos(setting, n); 249 | break; 250 | } else { 251 | n = null; 252 | } 253 | } 254 | return n; 255 | }, 256 | setLastNodeForShow: function(setting, nodes) { 257 | var n,i,j, last, old; 258 | for (i=nodes.length-1; i>=0; i--) { 259 | n = nodes[i]; 260 | var isHidden = data.isHidden(setting, n); 261 | if (!last && !isHidden && n.isLastNode) { 262 | last = n; 263 | break; 264 | } else if (!last && !isHidden && !n.isLastNode) { 265 | n.isLastNode = true; 266 | last = n; 267 | view.setNodeLineIcos(setting, n); 268 | } else if (last && n.isLastNode) { 269 | n.isLastNode = false; 270 | old = n; 271 | view.setNodeLineIcos(setting, n); 272 | break; 273 | } else { 274 | n = null; 275 | } 276 | } 277 | return {"new":last, "old":old}; 278 | } 279 | }, 280 | 281 | _z = { 282 | view: _view, 283 | data: _data 284 | }; 285 | $.extend(true, $.fn.zTree._z, _z); 286 | 287 | var zt = $.fn.zTree, 288 | tools = zt._z.tools, 289 | consts = zt.consts, 290 | view = zt._z.view, 291 | data = zt._z.data, 292 | event = zt._z.event, 293 | $$ = tools.$; 294 | 295 | data.isHidden = function(setting, node, newIsHidden) { 296 | if (!node) { 297 | return false; 298 | } 299 | var key = setting.data.key.isHidden; 300 | if (typeof newIsHidden !== 'undefined') { 301 | if (typeof newIsHidden === "string") { 302 | newIsHidden = tools.eqs(checked, "true"); 303 | } 304 | newIsHidden = !!newIsHidden; 305 | node[key] = newIsHidden; 306 | } 307 | return node[key]; 308 | }; 309 | 310 | data.exSetting(_setting); 311 | data.addInitNode(_initNode); 312 | data.addBeforeA(_beforeA); 313 | data.addZTreeTools(_zTreeTools); 314 | 315 | // Override method in core 316 | var _dInitNode = data.initNode; 317 | data.initNode = function(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) { 318 | var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), 319 | children = tmpPNode[setting.data.key.children]; 320 | data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children); 321 | data.tmpHideLastNode = view.setLastNodeForHide(setting, children); 322 | if (openFlag) { 323 | view.setNodeLineIcos(setting, data.tmpHideFirstNode); 324 | view.setNodeLineIcos(setting, data.tmpHideLastNode); 325 | } 326 | isFirstNode = (data.tmpHideFirstNode === node); 327 | isLastNode = (data.tmpHideLastNode === node); 328 | if (_dInitNode) _dInitNode.apply(data, arguments); 329 | if (openFlag && isLastNode) { 330 | view.clearOldLastNode(setting, node, openFlag); 331 | } 332 | }; 333 | 334 | var _makeChkFlag = data.makeChkFlag; 335 | if (!!_makeChkFlag) { 336 | data.makeChkFlag = function(setting, node) { 337 | if (!!node && !!data.isHidden(setting, node)) { 338 | return; 339 | } 340 | _makeChkFlag.apply(data, arguments); 341 | } 342 | } 343 | 344 | var _getTreeCheckedNodes = data.getTreeCheckedNodes; 345 | if (!!_getTreeCheckedNodes) { 346 | data.getTreeCheckedNodes = function(setting, nodes, checked, results) { 347 | if (!!nodes && nodes.length > 0) { 348 | var p = nodes[0].getParentNode(); 349 | if (!!p && !!data.isHidden(setting, p)) { 350 | return []; 351 | } 352 | } 353 | return _getTreeCheckedNodes.apply(data, arguments); 354 | } 355 | } 356 | 357 | var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes; 358 | if (!!_getTreeChangeCheckedNodes) { 359 | data.getTreeChangeCheckedNodes = function(setting, nodes, results) { 360 | if (!!nodes && nodes.length > 0) { 361 | var p = nodes[0].getParentNode(); 362 | if (!!p && !!data.isHidden(setting, p)) { 363 | return []; 364 | } 365 | } 366 | return _getTreeChangeCheckedNodes.apply(data, arguments); 367 | } 368 | } 369 | 370 | var _expandCollapseSonNode = view.expandCollapseSonNode; 371 | if (!!_expandCollapseSonNode) { 372 | view.expandCollapseSonNode = function(setting, node, expandFlag, animateFlag, callback) { 373 | if (!!node && !!data.isHidden(setting, node)) { 374 | return; 375 | } 376 | _expandCollapseSonNode.apply(view, arguments); 377 | } 378 | } 379 | 380 | var _setSonNodeCheckBox = view.setSonNodeCheckBox; 381 | if (!!_setSonNodeCheckBox) { 382 | view.setSonNodeCheckBox = function(setting, node, value, srcNode) { 383 | if (!!node && !!data.isHidden(setting, node)) { 384 | return; 385 | } 386 | _setSonNodeCheckBox.apply(view, arguments); 387 | } 388 | } 389 | 390 | var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf; 391 | if (!!_repairParentChkClassWithSelf) { 392 | view.repairParentChkClassWithSelf = function(setting, node) { 393 | if (!!node && !!data.isHidden(setting, node)) { 394 | return; 395 | } 396 | _repairParentChkClassWithSelf.apply(view, arguments); 397 | } 398 | } 399 | })(jQuery); -------------------------------------------------------------------------------- /odtree/static/src/lib/zTree_v3/js/jquery.ztree.exhide.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree exHideNodes v3.5.36 3 | * http://treejs.cn/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2018-06-26 12 | */ 13 | (function(j){j.extend(!0,j.fn.zTree._z,{view:{clearOldFirstNode:function(c,a){for(var b=a.getNextNode();b;){if(b.isFirstNode){b.isFirstNode=!1;e.setNodeLineIcos(c,b);break}if(b.isLastNode)break;b=b.getNextNode()}},clearOldLastNode:function(c,a,b){for(a=a.getPreNode();a;){if(a.isLastNode){a.isLastNode=!1;b&&e.setNodeLineIcos(c,a);break}if(a.isFirstNode)break;a=a.getPreNode()}},makeDOMNodeMainBefore:function(c,a,b){a=d.isHidden(a,b);c.push("
    • ")},showNode:function(c,a){d.isHidden(c,a,!1);d.initShowForExCheck(c,a);k(a,c).show()},showNodes:function(c,a,b){if(a&&a.length!=0){var f={},g,i;for(g=0,i=a.length;g0&&!f?b[0].isFirstNode=!0:b.length>0&&e.setFirstNodeForHide(c,b)},setLastNode:function(c,a){var b=d.nodeChildren(c,a),f=d.isHidden(c,b[0]);b.length>0&&!f?b[b.length-1].isLastNode=!0:b.length>0&&e.setLastNodeForHide(c,b)},setFirstNodeForHide:function(c,a){var b,f,g;for(f=0,g=a.length;f=0;f--){b=a[f];if(b.isLastNode)break;if(!d.isHidden(c,b)&&!b.isLastNode){b.isLastNode=!0;e.setNodeLineIcos(c,b);break}else b=null}return b},setLastNodeForShow:function(c, 18 | a){var b,f,g,i;for(f=a.length-1;f>=0;f--){b=a[f];var h=d.isHidden(c,b);if(!g&&!h&&b.isLastNode){g=b;break}else if(!g&&!h&&!b.isLastNode)b.isLastNode=!0,g=b,e.setNodeLineIcos(c,b);else if(g&&b.isLastNode){b.isLastNode=!1;i=b;e.setNodeLineIcos(c,b);break}}return{"new":g,old:i}}},data:{initHideForExCheck:function(c,a){if(d.isHidden(c,a)&&c.check&&c.check.enable){if(typeof a._nocheck=="undefined")a._nocheck=!!a.nocheck,a.nocheck=!0;a.check_Child_State=-1;e.repairParentChkClassWithSelf&&e.repairParentChkClassWithSelf(c, 19 | a)}},initShowForExCheck:function(c,a){if(!d.isHidden(c,a)&&c.check&&c.check.enable){if(typeof a._nocheck!="undefined")a.nocheck=a._nocheck,delete a._nocheck;if(e.setChkClass){var b=k(a,l.id.CHECK,c);e.setChkClass(c,b,a)}e.repairParentChkClassWithSelf&&e.repairParentChkClassWithSelf(c,a)}}}});var j=j.fn.zTree,m=j._z.tools,l=j.consts,e=j._z.view,d=j._z.data,k=m.$;d.isHidden=function(c,a,b){if(!a)return!1;c=c.data.key.isHidden;typeof b!=="undefined"&&(typeof b==="string"&&(b=m.eqs(checked,"true")),a[c]= 20 | !!b);return a[c]};d.exSetting({data:{key:{isHidden:"isHidden"}}});d.addInitNode(function(c,a,b){a=d.isHidden(c,b);d.isHidden(c,b,a);d.initHideForExCheck(c,b)});d.addBeforeA(function(){});d.addZTreeTools(function(c,a){a.showNodes=function(a,b){e.showNodes(c,a,b)};a.showNode=function(a,b){a&&e.showNodes(c,[a],b)};a.hideNodes=function(a,b){e.hideNodes(c,a,b)};a.hideNode=function(a,b){a&&e.hideNodes(c,[a],b)};var b=a.checkNode;if(b)a.checkNode=function(f,e,i,h){(!f||!d.isHidden(c,f))&&b.apply(a,arguments)}}); 21 | var n=d.initNode;d.initNode=function(c,a,b,f,g,i,h){var j=(f?f:d.getRoot(c))[c.data.key.children];d.tmpHideFirstNode=e.setFirstNodeForHide(c,j);d.tmpHideLastNode=e.setLastNodeForHide(c,j);h&&(e.setNodeLineIcos(c,d.tmpHideFirstNode),e.setNodeLineIcos(c,d.tmpHideLastNode));g=d.tmpHideFirstNode===b;i=d.tmpHideLastNode===b;n&&n.apply(d,arguments);h&&i&&e.clearOldLastNode(c,b,h)};var o=d.makeChkFlag;if(o)d.makeChkFlag=function(c,a){(!a||!d.isHidden(c,a))&&o.apply(d,arguments)};var p=d.getTreeCheckedNodes; 22 | if(p)d.getTreeCheckedNodes=function(c,a,b,f){if(a&&a.length>0){var e=a[0].getParentNode();if(e&&d.isHidden(c,e))return[]}return p.apply(d,arguments)};var q=d.getTreeChangeCheckedNodes;if(q)d.getTreeChangeCheckedNodes=function(c,a,b){if(a&&a.length>0){var e=a[0].getParentNode();if(e&&d.isHidden(c,e))return[]}return q.apply(d,arguments)};var r=e.expandCollapseSonNode;if(r)e.expandCollapseSonNode=function(c,a,b,f,g){(!a||!d.isHidden(c,a))&&r.apply(e,arguments)};var s=e.setSonNodeCheckBox;if(s)e.setSonNodeCheckBox= 23 | function(c,a,b,f){(!a||!d.isHidden(c,a))&&s.apply(e,arguments)};var t=e.repairParentChkClassWithSelf;if(t)e.repairParentChkClassWithSelf=function(c,a){(!a||!d.isHidden(c,a))&&t.apply(e,arguments)}})(jQuery); 24 | -------------------------------------------------------------------------------- /odtree/static/src/scss/odtree.scss: -------------------------------------------------------------------------------- 1 | .o_list_view_categ { 2 | float: left; 3 | height: 100%; 4 | border-collapse: collapse; 5 | overflow: auto; 6 | padding-left: 0px; 7 | padding-right: 0px; 8 | border-right: 1px solid #b9b9b9; 9 | } 10 | 11 | .o_list_view_categ_hidden{ 12 | width:20px; 13 | padding:0px; 14 | } 15 | 16 | .o_list_view_width_withcateg { 17 | position: relative; 18 | width: auto; 19 | overflow: auto; 20 | } 21 | 22 | .ztree{ 23 | width:95%; 24 | float: left; 25 | } 26 | 27 | 28 | .handle_menu_arrow{ 29 | display: block; 30 | top: 50%; 31 | width: 18px; 32 | height: 120px; 33 | margin-top: -60px; 34 | padding: 0px; 35 | position: absolute; 36 | font-weight: normal; 37 | color: #454545; 38 | transition: width 1s; 39 | -moz-transition:width 1s; /* Firefox 4 */ 40 | -webkit-transition:width 1s; /* Safari and Chrome */ 41 | -o-transition:width 1s; /* Opera */ 42 | -webkit-user-select: none; 43 | -moz-user-select: none; 44 | -ms-user-select: none; 45 | user-select: none; 46 | cursor: pointer; 47 | box-sizing: border-box; 48 | } 49 | 50 | .handle_menu_arrow_left { 51 | left: 100%; 52 | margin-left: -20px; 53 | text-align: right; 54 | border-left: 0px; 55 | border-right: 12px solid rgba(0, 0, 0, 0.3); 56 | border-top: solid 8px transparent; 57 | border-bottom: solid 8px transparent; 58 | } 59 | 60 | .handle_menu_arrow_left:hover { 61 | width: 18px; 62 | border-right: 18px solid rgba(0, 0, 0, 0.3); 63 | } 64 | 65 | .handle_menu_arrow_right { 66 | text-align: right; 67 | border-left: 0px; 68 | border-right: 12px solid rgba(0, 0, 0, 0.3); 69 | border-top: solid 8px transparent; 70 | border-bottom: solid 8px transparent; 71 | 72 | transform:rotate(180deg); 73 | -ms-transform:rotate(180deg); /* Internet Explorer */ 74 | -moz-transform:rotate(180deg); /* Firefox */ 75 | -webkit-transform:rotate(180deg); /* Safari 和 Chrome */ 76 | -o-transform:rotate(180deg); /* Opera */ 77 | } 78 | 79 | .handle_menu_arrow_right:hover { 80 | width: 18px; 81 | border-right: 18px solid rgba(0, 0, 0, 0.3); 82 | } 83 | 84 | .fas{ 85 | z-index: 1; 86 | position: absolute; 87 | top: 50px; 88 | } 89 | 90 | .odtree_control_panel{ 91 | display: -webkit-box; 92 | display: -webkit-flex; 93 | display: flex; 94 | -webkit-flex-flow: row wrap; 95 | flex-flow: row wrap; 96 | border-bottom: 1px solid #b9b9b9; 97 | padding-top: 10px; 98 | padding-right: 16px; 99 | padding-bottom: 10px; 100 | padding-left: 16px; 101 | background-color: #ececec; 102 | } -------------------------------------------------------------------------------- /odtree/static/src/xml/odtree.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /odtree/views/odtree_templates.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |