TrainSignManage/WebFrame/bower_components/bootstrap-timepicker/js/bootstrap-timepicker.js
(开头部分) 33KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*!
* Timepicker Component for Twitter Bootstrap
*
* Copyright 2013 Joris de Wit and bootstrap-timepicker contributors
*
* Contributors https://github.com/jdewit/bootstrap-timepicker/graphs/contributors
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
(function($, window, document) {
'use strict';
// TIMEPICKER PUBLIC CLASS DEFINITION
var Timepicker = function(element, options) {
this.widget = '';
this.$element = $(element);
this.defaultTime = options.defaultTime;
this.disableFocus = options.disableFocus;
this.disableMousewheel = options.disableMousewheel;
this.isOpen = options.isOpen;
this.minuteStep = options.minuteStep;
this.modalBackdrop = options.modalBackdrop;
this.orientation = options.orientation;
this.secondStep = options.secondStep;
this.snapToStep = options.snapToStep;
this.showInputs = options.showInputs;
this.showMeridian = options.showMeridian;
this.showSeconds = options.showSeconds;
this.template = options.template;
this.appendWidgetTo = options.appendWidgetTo;
this.showWidgetOnAddonClick = options.showWidgetOnAddonClick;
this.icons = options.icons;
this.maxHours = options.maxHours;
this.explicitMode = options.explicitMode; // If true 123 = 1:23, 12345 = 1:23:45, else invalid.
this.handleDocumentClick = function (e) {
var self = e.data.scope;
// This condition was inspired by bootstrap-datepicker.
// The element the timepicker is invoked on is the input but it has a sibling for addon/button.
if (!(self.$element.parent().find(e.target).length ||
self.$widget.is(e.target) ||
self.$widget.find(e.target).length)) {
self.hideWidget();
}
};
this._init();
};
Timepicker.prototype = {
constructor: Timepicker,
_init: function() {
var self = this;
if (this.showWidgetOnAddonClick && (this.$element.parent().hasClass('input-group') && this.$element.parent().hasClass('bootstrap-timepicker'))) {
this.$element.parent('.input-group.bootstrap-timepicker').find('.input-group-addon').on({
'click.timepicker': $.proxy(this.showWidget, this)
});
后面还有 1117 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。