Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions dist/bootstrap-clockpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,48 +117,48 @@
this.spanMinutes = popover.find('.clockpicker-span-minutes');
this.spanAmPm = popover.find('.clockpicker-span-am-pm');
this.amOrPm = "PM";

// Setup for for 12 hour clock if option is selected
if (options.twelvehour) {

var amPmButtonsTemplate = ['<div class="clockpicker-am-pm-block">',
'<button type="button" class="btn btn-sm btn-default clockpicker-button clockpicker-am-button">',
'AM</button>',
'<button type="button" class="btn btn-sm btn-default clockpicker-button clockpicker-pm-button">',
'PM</button>',
'</div>'].join('');

var amPmButtons = $(amPmButtonsTemplate);
//amPmButtons.appendTo(plate);

////Not working b/c they are not shown when this runs
//$('clockpicker-am-button')
// .on("click", function() {
// self.amOrPm = "AM";
// $('.clockpicker-span-am-pm').empty().append('AM');
// });
//
//
//$('clockpicker-pm-button')
// .on("click", function() {
// self.amOrPm = "PM";
// $('.clockpicker-span-am-pm').empty().append('PM');
// });

$('<button type="button" class="btn btn-sm btn-default clockpicker-button am-button">' + "AM" + '</button>')
.on("click", function() {
self.amOrPm = "AM";
$('.clockpicker-span-am-pm').empty().append('AM');
}).appendTo(this.amPmBlock);


$('<button type="button" class="btn btn-sm btn-default clockpicker-button pm-button">' + "PM" + '</button>')
.on("click", function() {
self.amOrPm = 'PM';
$('.clockpicker-span-am-pm').empty().append('PM');
}).appendTo(this.amPmBlock);

}

if (! options.autoclose) {
// If autoclose is not setted, append a button
$('<button type="button" class="btn btn-sm btn-default btn-block clockpicker-button">' + options.donetext + '</button>')
Expand Down Expand Up @@ -390,7 +390,7 @@
styles = {},
self = this;

popover.show();
popover.addClass('show');

// Place the popover
switch (placement) {
Expand Down Expand Up @@ -505,7 +505,7 @@
$doc.off('click.clockpicker.' + this.id + ' focusin.clockpicker.' + this.id);
$doc.off('keyup.clockpicker.' + this.id);

this.popover.hide();
this.popover.removeClass('show');

raiseCallback(this.options.afterHide);
};
Expand Down Expand Up @@ -576,7 +576,7 @@
inner = isHours && z < (outerRadius + innerRadius) / 2,
radius = inner ? innerRadius : outerRadius,
value;

if (options.twelvehour) {
radius = outerRadius;
}
Expand Down Expand Up @@ -621,7 +621,7 @@
}
}
}

// Once hours or minutes changed, vibrate the device
if (this[this.currentView] !== value) {
if (vibrate && this.options.vibrate) {
Expand Down Expand Up @@ -679,7 +679,7 @@
if (this.options.twelvehour) {
value = value + this.amOrPm;
}

this.input.prop('value', value);
if (value !== last) {
this.input.triggerHandler('change');
Expand Down
2 changes: 1 addition & 1 deletion dist/bootstrap-clockpicker.min.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/jquery-clockpicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ClockPicker v0.0.7 for jQuery (http://weareoutman.github.io/clockpicker/)
* Copyright 2014 Wang Shenwei.
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
*
*
* Bootstrap v3.1.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
Expand All @@ -28,6 +28,9 @@
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
}
.popover.show {
display: block;
}
.popover.top {
margin-top: -10px;
}
Expand Down
30 changes: 15 additions & 15 deletions dist/jquery-clockpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,48 +117,48 @@
this.spanMinutes = popover.find('.clockpicker-span-minutes');
this.spanAmPm = popover.find('.clockpicker-span-am-pm');
this.amOrPm = "PM";

// Setup for for 12 hour clock if option is selected
if (options.twelvehour) {

var amPmButtonsTemplate = ['<div class="clockpicker-am-pm-block">',
'<button type="button" class="btn btn-sm btn-default clockpicker-button clockpicker-am-button">',
'AM</button>',
'<button type="button" class="btn btn-sm btn-default clockpicker-button clockpicker-pm-button">',
'PM</button>',
'</div>'].join('');

var amPmButtons = $(amPmButtonsTemplate);
//amPmButtons.appendTo(plate);

////Not working b/c they are not shown when this runs
//$('clockpicker-am-button')
// .on("click", function() {
// self.amOrPm = "AM";
// $('.clockpicker-span-am-pm').empty().append('AM');
// });
//
//
//$('clockpicker-pm-button')
// .on("click", function() {
// self.amOrPm = "PM";
// $('.clockpicker-span-am-pm').empty().append('PM');
// });

$('<button type="button" class="btn btn-sm btn-default clockpicker-button am-button">' + "AM" + '</button>')
.on("click", function() {
self.amOrPm = "AM";
$('.clockpicker-span-am-pm').empty().append('AM');
}).appendTo(this.amPmBlock);


$('<button type="button" class="btn btn-sm btn-default clockpicker-button pm-button">' + "PM" + '</button>')
.on("click", function() {
self.amOrPm = 'PM';
$('.clockpicker-span-am-pm').empty().append('PM');
}).appendTo(this.amPmBlock);

}

if (! options.autoclose) {
// If autoclose is not setted, append a button
$('<button type="button" class="btn btn-sm btn-default btn-block clockpicker-button">' + options.donetext + '</button>')
Expand Down Expand Up @@ -390,7 +390,7 @@
styles = {},
self = this;

popover.show();
popover.addClass('show');

// Place the popover
switch (placement) {
Expand Down Expand Up @@ -505,7 +505,7 @@
$doc.off('click.clockpicker.' + this.id + ' focusin.clockpicker.' + this.id);
$doc.off('keyup.clockpicker.' + this.id);

this.popover.hide();
this.popover.removeClass('show');

raiseCallback(this.options.afterHide);
};
Expand Down Expand Up @@ -576,7 +576,7 @@
inner = isHours && z < (outerRadius + innerRadius) / 2,
radius = inner ? innerRadius : outerRadius,
value;

if (options.twelvehour) {
radius = outerRadius;
}
Expand Down Expand Up @@ -621,7 +621,7 @@
}
}
}

// Once hours or minutes changed, vibrate the device
if (this[this.currentView] !== value) {
if (vibrate && this.options.vibrate) {
Expand Down Expand Up @@ -679,7 +679,7 @@
if (this.options.twelvehour) {
value = value + this.amOrPm;
}

this.input.prop('value', value);
if (value !== last) {
this.input.triggerHandler('change');
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery-clockpicker.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading