src/main/webapp/resources/assets2/js/tree/tabelizer/jquery.tabelizer.js
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
*
* Tabelizer 1.0.3 - multi level grouping indicators for tables
* Version 1.0.3
* @requires jQuery v1.6+ and jQuery.ui core
*
* Copyright (c) 2014 Rafael Huisman
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
/**
*
* @description Create a table with multi level grouping indicators.
* @demo http://powerconsulting.co/Samples/Tabelizer
* @example $('#table1').tabelize();
* @desc Create a simple tabelized interface.
*/
(function($){
var self = {};
self.isFunction = function(func) {
return func && {}.toString.call(func) === '[object Function]';
}
self.rowClicker = function(evt){
if (typeof self.conf.onBeforeRowClick != 'undefined' && self.isFunction(self.conf.onBeforeRowClick))
self.conf.onBeforeRowClick.apply(self.getPublicObj(), [evt]);
var $elm = $(evt.currentTarget);
if (!$elm.is('tr'))
$elm = $elm.parentsUntil('tr').parent()
$row = $elm;
var id = $row.attr('id');
//Simple toggle for contract/expand logic
if ($row.hasClass('contracted')){
$row.removeClass('contracted').addClass('expanded');
self.toggleChildren(id, true);
}else{
$row.removeClass('expanded').addClass('contracted');
self.toggleChildren(id, false);
}
//After any contraction or expansion we need to resetup the lines since they will likely change.
self.updateLines();
if (typeof self.conf.onAfterRowClick != 'undefined' && self.isFunction(self.conf.onAfterRowClick))
self.conf.onAfterRowClick.apply(self.getPublicObj(), [evt]);
return self.getPublicObj();
}
self.updateLines = function(){
后面还有 199 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
