control/plugin/easyui/jquery.portal.js
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* portal - jQuery EasyUI
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2010-2012 stworthy [ stworthy@gmail.com ]
*
* Dependencies:
* draggable
* panel
*
*/
(function($){
/**
* initialize the portal
*/
function init(target){
$(target).addClass('portal');
var table = $('<table border="0" cellspacing="0" cellpadding="0"><tr></tr></table>').appendTo(target);
var tr = table.find('tr');
var columnWidths = [];
var totalWidth = 0;
$(target).children('div:first').addClass('portal-column-left');
$(target).children('div:last').addClass('portal-column-right');
$(target).find('>div').each(function(){ // each column panel
var column = $(this);
totalWidth += column.outerWidth();
columnWidths.push(column.outerWidth());
var td = $('<td class="portal-column-td"></td>').appendTo(tr)
column.addClass('portal-column').appendTo(td);
column.find('>div').each(function(){ // each portal panel
var p = $(this).addClass('portal-p').panel({
doSize:false,
cls:'portal-panel'
});
makeDraggable(target, p);
});
});
for(var i=0; i<columnWidths.length; i++){
columnWidths[i] /= totalWidth;
}
$(target).bind('_resize', function(){
var opts = $.data(target, 'portal').options;
if (opts.fit == true){
setSize(target);
}
return false;
});
return columnWidths;
}
function initCss(){
if (!$('#easyui-portal-style').length){
$('head').append(
'<style id="easyui-portal-style">' +
后面还有 267 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。