<commit_before>/**
 * jQueryUI-based timepicker plug-in
 * MIT License. Copyright (c) 2014 I-Ween
 * http://i-ween.com, http://stayinweb.com
 */
/*TODO
 * 1) implement pop-up behaviour
 * 2) implement 12hrs format
 * 3) implement steps on spin
 * 4) implement seconds picker
 * 5) implement time format pattern
 */

(function($) 
{
	$.widget("siw.timepicker", 
	{
		options:
		{
			value:'',
			spinTimeout:150,
			linkedMinutesHours:true, //increase hours after 59 minutes achieved
			minTime:false, //can work only with maxTime
			maxTime:false, //can work only with minTime
			inverseButton:false,
			onGenerate:function() {},
			onClose:function() {},
			onChangeTime:function(evt, data) {/*console.log(data.newTime)*/},
			onRenderStart:function() {},
			onShow:function() {},
/*			formatTime:'H:i',
			stepMinutes:5,
			opened:false,
			inline:false,
			hours12:false,
			allowBlank:false,
			roundTime:'round' // ceil, floor
			readonly: false,
			*/
		},
		_create: function() 
		{
			//this.element.hide();
			var self = this;
			this._render();

			this.element.change(function (e)
			{
				self.val(self.element.val());
			});
			$(window).unload(function (e) 
			{
				self.destroy();
			});
			this._trigger("onGenerate");
		},
		destroy: function () 
		{
			this.control.remove();
			this.element.show();
			$.Widget.prototype.destroy.call(this);
			this._trigger("onClose");
		},
		_setOption: function(key, value)
		{
			if (value != undefined)
		    {
				this.options[key] = value;
				this._render();
				return this;
		    }
		    else
		    {
		    	return this.options[key];
		    }
		 },
		_render: function()
		{
			this._trigger("onRenderStart");
			if (this.control != undefined) this.control.remove();
			var self = this,
			readonly = this.options.readonly;
			this.control = $('<div class="siw_datetimepicker siw_noselect  siw_inline"><div class="siw_timepicker active"><div class="siw_buttons">'<commit_msg>hide() enabled<commit_after>/**
 * jQueryUI-based timepicker plug-in
 * MIT License. Copyright (c) 2014 I-Ween
 * http://i-ween.com, http://stayinweb.com
 */
/*TODO
 * 1) implement pop-up behaviour
 * 2) implement 12hrs format
 * 3) implement steps on spin
 * 4) implement seconds picker
 * 5) implement time format pattern
 */

(function($) 
{
	$.widget("siw.timepicker", 
	{
		options:
		{
			value:'',
			spinTimeout:150,
			linkedMinutesHours:true, //increase hours after 59 minutes achieved
			minTime:false, //can work only with maxTime
			maxTime:false, //can work only with minTime
			inverseButton:false,
			onGenerate:function() {},
			onClose:function() {},
			onChangeTime:function(evt, data) {/*console.log(data.newTime)*/},
			onRenderStart:function() {},
			onShow:function() {},
/*			formatTime:'H:i',
			stepMinutes:5,
			opened:false,
			inline:false,
			hours12:false,
			allowBlank:false,
			roundTime:'round' // ceil, floor
			readonly: false,
			*/
		},
		_create: function() 
		{
			this.element.hide();
			var self = this;
			this._render();

			this.element.change(function (e)
			{
				self.val(self.element.val());
			});
			$(window).unload(function (e) 
			{
				self.destroy();
			});
			this._trigger("onGenerate");
		},
		destroy: function () 
		{
			this.control.remove();
			this.element.show();
			$.Widget.prototype.destroy.call(this);
			this._trigger("onClose");
		},
		_setOption: function(key, value)
		{
			if (value != undefined)
		    {
				this.options[key] = value;
				this._render();
				return this;
		    }
		    else
		    {
		    	return this.options[key];
		    }
		 },
		_render: function()
		{
			this._trigger("onRenderStart");
			if (this.control != undefined) this.control.remove();
			var self = this;
			this.control = $('<div class="siw_datetimepicker siw_noselect  siw_inline"><div class="siw_timepicker active"><div class="siw_buttons">'
{'fraction_non_alphanumeric': 0.15954118873826903, 'fraction_numerical': 0.009906152241918665, 'mean_word_length': 3.1706521739130435, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1970752', 'n_tokens_mistral': 1576, 'n_tokens_neox': 1279, 'n_words': 262}