SimpleTaskSystem.Web/Content/jquery-easyui-1.3.1/src/jquery.datebox.js
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* datebox - jQuery EasyUI
*
* Licensed under the GPL terms
* To use it on other terms please contact us
*
* Copyright(c) 2009-2012 stworthy [ stworthy@gmail.com ]
*
* Dependencies:
* calendar
* combo
*
*/
(function($){
/**
* create date box
*/
function createBox(target){
var state = $.data(target, 'datebox');
var opts = state.options;
$(target).addClass('datebox-f');
$(target).combo($.extend({}, opts, {
onShowPanel:function(){
state.calendar.calendar('resize');
opts.onShowPanel.call(target);
}
}));
$(target).combo('textbox').parent().addClass('datebox');
/**
* if the calendar isn't created, create it.
*/
if (!state.calendar){
createCalendar();
}
function createCalendar(){
var panel = $(target).combo('panel');
state.calendar = $('<div></div>').appendTo(panel).wrap('<div class="datebox-calendar-inner"></div>');
state.calendar.calendar({
fit:true,
border:false,
onSelect:function(date){
var value = opts.formatter(date);
setValue(target, value);
$(target).combo('hidePanel');
opts.onSelect.call(target, date);
}
});
setValue(target, opts.value);
var button = $('<div class="datebox-button"></div>').appendTo(panel);
$('<a href="javascript:void(0)" class="datebox-current"></a>').html(opts.currentText).appendTo(button);
$('<a href="javascript:void(0)" class="datebox-close"></a>').html(opts.closeText).appendTo(button);
button.find('.datebox-current,.datebox-close').hover(
function(){$(this).addClass('datebox-button-hover');},
function(){$(this).removeClass('datebox-button-hover');}
);
button.find('.datebox-current').click(function(){
后面还有 114 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
