clockpicker-rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/LICENSE.clockpicker +21 -0
- data/README.md +52 -0
- data/lib/clockpicker-rails.rb +12 -0
- data/lib/clockpicker-rails/engine.rb +6 -0
- data/lib/clockpicker-rails/railtie.rb +5 -0
- data/lib/clockpicker-rails/version.rb +5 -0
- data/vendor/assets/javascripts/bootstrap/clockpicker.js +729 -0
- data/vendor/assets/javascripts/bootstrap/clockpicker.min.js +6 -0
- data/vendor/assets/javascripts/jquery/clockpicker.js +729 -0
- data/vendor/assets/javascripts/jquery/clockpicker.min.js +6 -0
- data/vendor/assets/stylesheets/bootstrap/clockpicker.css +168 -0
- data/vendor/assets/stylesheets/bootstrap/clockpicker.min.css +5 -0
- data/vendor/assets/stylesheets/jquery/clockpicker.css +370 -0
- data/vendor/assets/stylesheets/jquery/clockpicker.min.css +9 -0
- metadata +100 -0
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* ClockPicker v0.0.7 (http://weareoutman.github.io/clockpicker/)
|
3
|
+
* Copyright 2014 Wang Shenwei.
|
4
|
+
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
|
5
|
+
*/
|
6
|
+
!function(){function t(t){return document.createElementNS(p,t)}function i(t){return(10>t?"0":"")+t}function e(t){var i=++m+"";return t?t+i:i}function s(s,r){function p(t,i){var e=u.offset(),s=/^touch/.test(t.type),o=e.left+b,n=e.top+b,p=(s?t.originalEvent.touches[0]:t).pageX-o,h=(s?t.originalEvent.touches[0]:t).pageY-n,k=Math.sqrt(p*p+h*h),v=!1;if(!i||!(g-y>k||k>g+y)){t.preventDefault();var m=setTimeout(function(){c.addClass("clockpicker-moving")},200);l&&u.append(x.canvas),x.setHand(p,h,!i,!0),a.off(d).on(d,function(t){t.preventDefault();var i=/^touch/.test(t.type),e=(i?t.originalEvent.touches[0]:t).pageX-o,s=(i?t.originalEvent.touches[0]:t).pageY-n;(v||e!==p||s!==h)&&(v=!0,x.setHand(e,s,!1,!0))}),a.off(f).on(f,function(t){a.off(f),t.preventDefault();var e=/^touch/.test(t.type),s=(e?t.originalEvent.changedTouches[0]:t).pageX-o,l=(e?t.originalEvent.changedTouches[0]:t).pageY-n;(i||v)&&s===p&&l===h&&x.setHand(s,l),"hours"===x.currentView?x.toggleView("minutes",A/2):r.autoclose&&(x.minutesView.addClass("clockpicker-dial-out"),setTimeout(function(){x.done()},A/2)),u.prepend(j),clearTimeout(m),c.removeClass("clockpicker-moving"),a.off(d)})}}var h=n(V),u=h.find(".clockpicker-plate"),v=h.find(".clockpicker-hours"),m=h.find(".clockpicker-minutes"),T=h.find(".clockpicker-am-pm-block"),C="INPUT"===s.prop("tagName"),H=C?s:s.find("input"),P=s.find(".input-group-addon"),x=this;if(this.id=e("cp"),this.element=s,this.options=r,this.isAppended=!1,this.isShown=!1,this.currentView="hours",this.isInput=C,this.input=H,this.addon=P,this.popover=h,this.plate=u,this.hoursView=v,this.minutesView=m,this.amPmBlock=T,this.spanHours=h.find(".clockpicker-span-hours"),this.spanMinutes=h.find(".clockpicker-span-minutes"),this.spanAmPm=h.find(".clockpicker-span-am-pm"),this.amOrPm="PM",r.twelvehour){{var S=['<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("");n(S)}n('<button type="button" class="btn btn-sm btn-default clockpicker-button am-button">AM</button>').on("click",function(){x.amOrPm="AM",n(".clockpicker-span-am-pm").empty().append("AM")}).appendTo(this.amPmBlock),n('<button type="button" class="btn btn-sm btn-default clockpicker-button pm-button">PM</button>').on("click",function(){x.amOrPm="PM",n(".clockpicker-span-am-pm").empty().append("PM")}).appendTo(this.amPmBlock)}r.autoclose||n('<button type="button" class="btn btn-sm btn-default btn-block clockpicker-button">'+r.donetext+"</button>").click(n.proxy(this.done,this)).appendTo(h),"top"!==r.placement&&"bottom"!==r.placement||"top"!==r.align&&"bottom"!==r.align||(r.align="left"),"left"!==r.placement&&"right"!==r.placement||"left"!==r.align&&"right"!==r.align||(r.align="top"),h.addClass(r.placement),h.addClass("clockpicker-align-"+r.align),this.spanHours.click(n.proxy(this.toggleView,this,"hours")),this.spanMinutes.click(n.proxy(this.toggleView,this,"minutes")),H.on("focus.clockpicker click.clockpicker",n.proxy(this.show,this)),P.on("click.clockpicker",n.proxy(this.toggle,this));var E,D,I,B,z=n('<div class="clockpicker-tick"></div>');if(r.twelvehour)for(E=1;13>E;E+=1)D=z.clone(),I=E/6*Math.PI,B=g,D.css("font-size","120%"),D.css({left:b+Math.sin(I)*B-y,top:b-Math.cos(I)*B-y}),D.html(0===E?"00":E),v.append(D),D.on(k,p);else for(E=0;24>E;E+=1){D=z.clone(),I=E/6*Math.PI;var O=E>0&&13>E;B=O?w:g,D.css({left:b+Math.sin(I)*B-y,top:b-Math.cos(I)*B-y}),O&&D.css("font-size","120%"),D.html(0===E?"00":E),v.append(D),D.on(k,p)}for(E=0;60>E;E+=5)D=z.clone(),I=E/30*Math.PI,D.css({left:b+Math.sin(I)*g-y,top:b-Math.cos(I)*g-y}),D.css("font-size","120%"),D.html(i(E)),m.append(D),D.on(k,p);if(u.on(k,function(t){0===n(t.target).closest(".clockpicker-tick").length&&p(t,!0)}),l){var j=h.find(".clockpicker-canvas"),L=t("svg");L.setAttribute("class","clockpicker-svg"),L.setAttribute("width",M),L.setAttribute("height",M);var U=t("g");U.setAttribute("transform","translate("+b+","+b+")");var W=t("circle");W.setAttribute("class","clockpicker-canvas-bearing"),W.setAttribute("cx",0),W.setAttribute("cy",0),W.setAttribute("r",2);var N=t("line");N.setAttribute("x1",0),N.setAttribute("y1",0);var X=t("circle");X.setAttribute("class","clockpicker-canvas-bg"),X.setAttribute("r",y);var Y=t("circle");Y.setAttribute("class","clockpicker-canvas-fg"),Y.setAttribute("r",3.5),U.appendChild(N),U.appendChild(X),U.appendChild(Y),U.appendChild(W),L.appendChild(U),j.append(L),this.hand=N,this.bg=X,this.fg=Y,this.bearing=W,this.g=U,this.canvas=j}o(this.options.init)}function o(t){t&&"function"==typeof t&&t()}var c,n=window.jQuery,r=n(window),a=n(document),p="http://www.w3.org/2000/svg",l="SVGAngle"in window&&function(){var t,i=document.createElement("div");return i.innerHTML="<svg/>",t=(i.firstChild&&i.firstChild.namespaceURI)==p,i.innerHTML="",t}(),h=function(){var t=document.createElement("div").style;return"transition"in t||"WebkitTransition"in t||"MozTransition"in t||"msTransition"in t||"OTransition"in t}(),u="ontouchstart"in window,k="mousedown"+(u?" touchstart":""),d="mousemove.clockpicker"+(u?" touchmove.clockpicker":""),f="mouseup.clockpicker"+(u?" touchend.clockpicker":""),v=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,m=0,b=100,g=80,w=54,y=13,M=2*b,A=h?350:1,V=['<div class="popover clockpicker-popover">','<div class="arrow"></div>','<div class="popover-title">','<span class="clockpicker-span-hours text-primary"></span>'," : ",'<span class="clockpicker-span-minutes"></span>','<span class="clockpicker-span-am-pm"></span>',"</div>",'<div class="popover-content">','<div class="clockpicker-plate">','<div class="clockpicker-canvas"></div>','<div class="clockpicker-dial clockpicker-hours"></div>','<div class="clockpicker-dial clockpicker-minutes clockpicker-dial-out"></div>',"</div>",'<span class="clockpicker-am-pm-block">',"</span>","</div>","</div>"].join("");s.DEFAULTS={"default":"",fromnow:0,placement:"bottom",align:"left",donetext:"完成",autoclose:!1,twelvehour:!1,vibrate:!0},s.prototype.toggle=function(){this[this.isShown?"hide":"show"]()},s.prototype.locate=function(){var t=this.element,i=this.popover,e=t.offset(),s=t.outerWidth(),o=t.outerHeight(),c=this.options.placement,n=this.options.align,r={};switch(i.show(),c){case"bottom":r.top=e.top+o;break;case"right":r.left=e.left+s;break;case"top":r.top=e.top-i.outerHeight();break;case"left":r.left=e.left-i.outerWidth()}switch(n){case"left":r.left=e.left;break;case"right":r.left=e.left+s-i.outerWidth();break;case"top":r.top=e.top;break;case"bottom":r.top=e.top+o-i.outerHeight()}i.css(r)},s.prototype.show=function(){if(!this.isShown){o(this.options.beforeShow);var t=this;this.isAppended||(c=n(document.body).append(this.popover),r.on("resize.clockpicker"+this.id,function(){t.isShown&&t.locate()}),this.isAppended=!0);var e=((this.input.prop("value")||this.options["default"]||"")+"").split(":");if("now"===e[0]){var s=new Date(+new Date+this.options.fromnow);e=[s.getHours(),s.getMinutes()]}this.hours=+e[0]||0,this.minutes=+e[1]||0,this.spanHours.html(i(this.hours)),this.spanMinutes.html(i(this.minutes)),this.toggleView("hours"),this.locate(),this.isShown=!0,a.on("click.clockpicker."+this.id+" focusin.clockpicker."+this.id,function(i){var e=n(i.target);0===e.closest(t.popover).length&&0===e.closest(t.addon).length&&0===e.closest(t.input).length&&t.hide()}),a.on("keyup.clockpicker."+this.id,function(i){27===i.keyCode&&t.hide()}),o(this.options.afterShow)}},s.prototype.hide=function(){o(this.options.beforeHide),this.isShown=!1,a.off("click.clockpicker."+this.id+" focusin.clockpicker."+this.id),a.off("keyup.clockpicker."+this.id),this.popover.hide(),o(this.options.afterHide)},s.prototype.toggleView=function(t,i){var e=!1;"minutes"===t&&"visible"===n(this.hoursView).css("visibility")&&(o(this.options.beforeHourSelect),e=!0);var s="hours"===t,c=s?this.hoursView:this.minutesView,r=s?this.minutesView:this.hoursView;this.currentView=t,this.spanHours.toggleClass("text-primary",s),this.spanMinutes.toggleClass("text-primary",!s),r.addClass("clockpicker-dial-out"),c.css("visibility","visible").removeClass("clockpicker-dial-out"),this.resetClock(i),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(function(){r.css("visibility","hidden")},A),e&&o(this.options.afterHourSelect)},s.prototype.resetClock=function(t){var i=this.currentView,e=this[i],s="hours"===i,o=Math.PI/(s?6:30),c=e*o,n=s&&e>0&&13>e?w:g,r=Math.sin(c)*n,a=-Math.cos(c)*n,p=this;l&&t?(p.canvas.addClass("clockpicker-canvas-out"),setTimeout(function(){p.canvas.removeClass("clockpicker-canvas-out"),p.setHand(r,a)},t)):this.setHand(r,a)},s.prototype.setHand=function(t,e,s,o){var c,r=Math.atan2(t,-e),a="hours"===this.currentView,p=Math.PI/(a||s?6:30),h=Math.sqrt(t*t+e*e),u=this.options,k=a&&(g+w)/2>h,d=k?w:g;if(u.twelvehour&&(d=g),0>r&&(r=2*Math.PI+r),c=Math.round(r/p),r=c*p,u.twelvehour?a?0===c&&(c=12):(s&&(c*=5),60===c&&(c=0)):a?(12===c&&(c=0),c=k?0===c?12:c:0===c?0:c+12):(s&&(c*=5),60===c&&(c=0)),this[this.currentView]!==c&&v&&this.options.vibrate&&(this.vibrateTimer||(navigator[v](10),this.vibrateTimer=setTimeout(n.proxy(function(){this.vibrateTimer=null},this),100))),this[this.currentView]=c,this[a?"spanHours":"spanMinutes"].html(i(c)),!l)return void this[a?"hoursView":"minutesView"].find(".clockpicker-tick").each(function(){var t=n(this);t.toggleClass("active",c===+t.html())});o||!a&&c%5?(this.g.insertBefore(this.hand,this.bearing),this.g.insertBefore(this.bg,this.fg),this.bg.setAttribute("class","clockpicker-canvas-bg clockpicker-canvas-bg-trans")):(this.g.insertBefore(this.hand,this.bg),this.g.insertBefore(this.fg,this.bg),this.bg.setAttribute("class","clockpicker-canvas-bg"));var f=Math.sin(r)*d,m=-Math.cos(r)*d;this.hand.setAttribute("x2",f),this.hand.setAttribute("y2",m),this.bg.setAttribute("cx",f),this.bg.setAttribute("cy",m),this.fg.setAttribute("cx",f),this.fg.setAttribute("cy",m)},s.prototype.done=function(){o(this.options.beforeDone),this.hide();var t=this.input.prop("value"),e=i(this.hours)+":"+i(this.minutes);this.options.twelvehour&&(e+=this.amOrPm),this.input.prop("value",e),e!==t&&(this.input.triggerHandler("change"),this.isInput||this.element.trigger("change")),this.options.autoclose&&this.input.trigger("blur"),o(this.options.afterDone)},s.prototype.remove=function(){this.element.removeData("clockpicker"),this.input.off("focus.clockpicker click.clockpicker"),this.addon.off("click.clockpicker"),this.isShown&&this.hide(),this.isAppended&&(r.off("resize.clockpicker"+this.id),this.popover.remove())},n.fn.clockpicker=function(t){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=n(this),o=e.data("clockpicker");if(o)"function"==typeof o[t]&&o[t].apply(o,i);else{var c=n.extend({},s.DEFAULTS,e.data(),"object"==typeof t&&t);e.data("clockpicker",new s(e,c))}})}}();
|
@@ -0,0 +1,168 @@
|
|
1
|
+
/*!
|
2
|
+
* ClockPicker v0.0.7 for Bootstrap (http://weareoutman.github.io/clockpicker/)
|
3
|
+
* Copyright 2014 Wang Shenwei.
|
4
|
+
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
|
5
|
+
*/
|
6
|
+
|
7
|
+
.clockpicker .input-group-addon {
|
8
|
+
cursor: pointer;
|
9
|
+
}
|
10
|
+
.clockpicker-moving {
|
11
|
+
cursor: move;
|
12
|
+
}
|
13
|
+
.clockpicker-align-left.popover > .arrow {
|
14
|
+
left: 25px;
|
15
|
+
}
|
16
|
+
.clockpicker-align-top.popover > .arrow {
|
17
|
+
top: 17px;
|
18
|
+
}
|
19
|
+
.clockpicker-align-right.popover > .arrow {
|
20
|
+
left: auto;
|
21
|
+
right: 25px;
|
22
|
+
}
|
23
|
+
.clockpicker-align-bottom.popover > .arrow {
|
24
|
+
top: auto;
|
25
|
+
bottom: 6px;
|
26
|
+
}
|
27
|
+
.clockpicker-popover .popover-title {
|
28
|
+
background-color: #fff;
|
29
|
+
color: #999;
|
30
|
+
font-size: 24px;
|
31
|
+
font-weight: bold;
|
32
|
+
line-height: 30px;
|
33
|
+
text-align: center;
|
34
|
+
}
|
35
|
+
.clockpicker-popover .popover-title span {
|
36
|
+
cursor: pointer;
|
37
|
+
}
|
38
|
+
.clockpicker-popover .popover-content {
|
39
|
+
background-color: #f8f8f8;
|
40
|
+
padding: 12px;
|
41
|
+
}
|
42
|
+
.popover-content:last-child {
|
43
|
+
border-bottom-left-radius: 5px;
|
44
|
+
border-bottom-right-radius: 5px;
|
45
|
+
}
|
46
|
+
.clockpicker-plate {
|
47
|
+
background-color: #fff;
|
48
|
+
border: 1px solid #ccc;
|
49
|
+
border-radius: 50%;
|
50
|
+
width: 200px;
|
51
|
+
height: 200px;
|
52
|
+
overflow: visible;
|
53
|
+
position: relative;
|
54
|
+
/* Disable text selection highlighting. Thanks to Hermanya */
|
55
|
+
-webkit-touch-callout: none;
|
56
|
+
-webkit-user-select: none;
|
57
|
+
-khtml-user-select: none;
|
58
|
+
-moz-user-select: none;
|
59
|
+
-ms-user-select: none;
|
60
|
+
user-select: none;
|
61
|
+
}
|
62
|
+
.clockpicker-canvas,
|
63
|
+
.clockpicker-dial {
|
64
|
+
width: 200px;
|
65
|
+
height: 200px;
|
66
|
+
position: absolute;
|
67
|
+
left: -1px;
|
68
|
+
top: -1px;
|
69
|
+
}
|
70
|
+
.clockpicker-minutes {
|
71
|
+
visibility: hidden;
|
72
|
+
}
|
73
|
+
.clockpicker-tick {
|
74
|
+
border-radius: 50%;
|
75
|
+
color: #666;
|
76
|
+
line-height: 26px;
|
77
|
+
text-align: center;
|
78
|
+
width: 26px;
|
79
|
+
height: 26px;
|
80
|
+
position: absolute;
|
81
|
+
cursor: pointer;
|
82
|
+
}
|
83
|
+
.clockpicker-tick.active,
|
84
|
+
.clockpicker-tick:hover {
|
85
|
+
background-color: rgb(192, 229, 247);
|
86
|
+
background-color: rgba(0, 149, 221, .25);
|
87
|
+
}
|
88
|
+
.clockpicker-button {
|
89
|
+
background-image: none;
|
90
|
+
background-color: #fff;
|
91
|
+
border-width: 1px 0 0;
|
92
|
+
border-top-left-radius: 0;
|
93
|
+
border-top-right-radius: 0;
|
94
|
+
margin: 0;
|
95
|
+
padding: 10px 0;
|
96
|
+
}
|
97
|
+
.clockpicker-button:hover {
|
98
|
+
background-image: none;
|
99
|
+
background-color: #ebebeb;
|
100
|
+
}
|
101
|
+
.clockpicker-button:focus {
|
102
|
+
outline: none!important;
|
103
|
+
}
|
104
|
+
.clockpicker-dial {
|
105
|
+
-webkit-transition: -webkit-transform 350ms, opacity 350ms;
|
106
|
+
-moz-transition: -moz-transform 350ms, opacity 350ms;
|
107
|
+
-ms-transition: -ms-transform 350ms, opacity 350ms;
|
108
|
+
-o-transition: -o-transform 350ms, opacity 350ms;
|
109
|
+
transition: transform 350ms, opacity 350ms;
|
110
|
+
}
|
111
|
+
.clockpicker-dial-out {
|
112
|
+
opacity: 0;
|
113
|
+
}
|
114
|
+
.clockpicker-hours.clockpicker-dial-out {
|
115
|
+
-webkit-transform: scale(1.2, 1.2);
|
116
|
+
-moz-transform: scale(1.2, 1.2);
|
117
|
+
-ms-transform: scale(1.2, 1.2);
|
118
|
+
-o-transform: scale(1.2, 1.2);
|
119
|
+
transform: scale(1.2, 1.2);
|
120
|
+
}
|
121
|
+
.clockpicker-minutes.clockpicker-dial-out {
|
122
|
+
-webkit-transform: scale(.8, .8);
|
123
|
+
-moz-transform: scale(.8, .8);
|
124
|
+
-ms-transform: scale(.8, .8);
|
125
|
+
-o-transform: scale(.8, .8);
|
126
|
+
transform: scale(.8, .8);
|
127
|
+
}
|
128
|
+
.clockpicker-canvas {
|
129
|
+
-webkit-transition: opacity 175ms;
|
130
|
+
-moz-transition: opacity 175ms;
|
131
|
+
-ms-transition: opacity 175ms;
|
132
|
+
-o-transition: opacity 175ms;
|
133
|
+
transition: opacity 175ms;
|
134
|
+
}
|
135
|
+
.clockpicker-canvas-out {
|
136
|
+
opacity: 0.25;
|
137
|
+
}
|
138
|
+
.clockpicker-canvas-bearing,
|
139
|
+
.clockpicker-canvas-fg {
|
140
|
+
stroke: none;
|
141
|
+
fill: rgb(0, 149, 221);
|
142
|
+
}
|
143
|
+
.clockpicker-canvas-bg {
|
144
|
+
stroke: none;
|
145
|
+
fill: rgb(192, 229, 247);
|
146
|
+
}
|
147
|
+
.clockpicker-canvas-bg-trans {
|
148
|
+
fill: rgba(0, 149, 221, .25);
|
149
|
+
}
|
150
|
+
.clockpicker-canvas line {
|
151
|
+
stroke: rgb(0, 149, 221);
|
152
|
+
stroke-width: 1;
|
153
|
+
stroke-linecap: round;
|
154
|
+
/*shape-rendering: crispEdges;*/
|
155
|
+
}
|
156
|
+
.clockpicker-button.am-button {
|
157
|
+
margin: 1px;
|
158
|
+
padding: 5px;
|
159
|
+
border: 1px solid rgba(0, 0, 0, .2);
|
160
|
+
border-radius: 4px;
|
161
|
+
|
162
|
+
}
|
163
|
+
.clockpicker-button.pm-button {
|
164
|
+
margin: 1px 1px 1px 136px;
|
165
|
+
padding: 5px;
|
166
|
+
border: 1px solid rgba(0, 0, 0, .2);
|
167
|
+
border-radius: 4px;
|
168
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/*!
|
2
|
+
* ClockPicker v0.0.7 for Bootstrap (http://weareoutman.github.io/clockpicker/)
|
3
|
+
* Copyright 2014 Wang Shenwei.
|
4
|
+
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
|
5
|
+
*/.clockpicker .input-group-addon{cursor:pointer}.clockpicker-moving{cursor:move}.clockpicker-align-left.popover>.arrow{left:25px}.clockpicker-align-top.popover>.arrow{top:17px}.clockpicker-align-right.popover>.arrow{left:auto;right:25px}.clockpicker-align-bottom.popover>.arrow{top:auto;bottom:6px}.clockpicker-popover .popover-title{background-color:#fff;color:#999;font-size:24px;font-weight:700;line-height:30px;text-align:center}.clockpicker-popover .popover-title span{cursor:pointer}.clockpicker-popover .popover-content{background-color:#f8f8f8;padding:12px}.popover-content:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.clockpicker-plate{background-color:#fff;border:1px solid #ccc;border-radius:50%;width:200px;height:200px;overflow:visible;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.clockpicker-canvas,.clockpicker-dial{width:200px;height:200px;position:absolute;left:-1px;top:-1px}.clockpicker-minutes{visibility:hidden}.clockpicker-tick{border-radius:50%;color:#666;line-height:26px;text-align:center;width:26px;height:26px;position:absolute;cursor:pointer}.clockpicker-tick.active,.clockpicker-tick:hover{background-color:#c0e5f7;background-color:rgba(0,149,221,.25)}.clockpicker-button{background-image:none;background-color:#fff;border-width:1px 0 0;border-top-left-radius:0;border-top-right-radius:0;margin:0;padding:10px 0}.clockpicker-button:hover{background-image:none;background-color:#ebebeb}.clockpicker-button:focus{outline:0!important}.clockpicker-dial{-webkit-transition:-webkit-transform 350ms,opacity 350ms;-moz-transition:-moz-transform 350ms,opacity 350ms;-ms-transition:-ms-transform 350ms,opacity 350ms;-o-transition:-o-transform 350ms,opacity 350ms;transition:transform 350ms,opacity 350ms}.clockpicker-dial-out{opacity:0}.clockpicker-hours.clockpicker-dial-out{-webkit-transform:scale(1.2,1.2);-moz-transform:scale(1.2,1.2);-ms-transform:scale(1.2,1.2);-o-transform:scale(1.2,1.2);transform:scale(1.2,1.2)}.clockpicker-minutes.clockpicker-dial-out{-webkit-transform:scale(.8,.8);-moz-transform:scale(.8,.8);-ms-transform:scale(.8,.8);-o-transform:scale(.8,.8);transform:scale(.8,.8)}.clockpicker-canvas{-webkit-transition:opacity 175ms;-moz-transition:opacity 175ms;-ms-transition:opacity 175ms;-o-transition:opacity 175ms;transition:opacity 175ms}.clockpicker-canvas-out{opacity:.25}.clockpicker-canvas-bearing,.clockpicker-canvas-fg{stroke:none;fill:#0095dd}.clockpicker-canvas-bg{stroke:none;fill:#c0e5f7}.clockpicker-canvas-bg-trans{fill:rgba(0,149,221,.25)}.clockpicker-canvas line{stroke:#0095dd;stroke-width:1;stroke-linecap:round}.clockpicker-button.am-button{margin:1px;padding:5px;border:1px solid rgba(0,0,0,.2);border-radius:4px}.clockpicker-button.pm-button{margin:1px 1px 1px 136px;padding:5px;border:1px solid rgba(0,0,0,.2);border-radius:4px}
|
@@ -0,0 +1,370 @@
|
|
1
|
+
/*!
|
2
|
+
* ClockPicker v0.0.7 for jQuery (http://weareoutman.github.io/clockpicker/)
|
3
|
+
* Copyright 2014 Wang Shenwei.
|
4
|
+
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
|
5
|
+
*
|
6
|
+
* Bootstrap v3.1.1 (http://getbootstrap.com)
|
7
|
+
* Copyright 2011-2014 Twitter, Inc.
|
8
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
9
|
+
*/
|
10
|
+
|
11
|
+
/* Picked from bootstrap: .popover, .btn, .text-primary */
|
12
|
+
|
13
|
+
.popover {
|
14
|
+
position: absolute;
|
15
|
+
top: 0;
|
16
|
+
left: 0;
|
17
|
+
z-index: 1010;
|
18
|
+
display: none;
|
19
|
+
max-width: 276px;
|
20
|
+
padding: 1px;
|
21
|
+
text-align: left;
|
22
|
+
white-space: normal;
|
23
|
+
background-color: #fff;
|
24
|
+
background-clip: padding-box;
|
25
|
+
border: 1px solid #ccc;
|
26
|
+
border: 1px solid rgba(0, 0, 0, .2);
|
27
|
+
border-radius: 6px;
|
28
|
+
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
|
29
|
+
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
|
30
|
+
}
|
31
|
+
.popover.top {
|
32
|
+
margin-top: -10px;
|
33
|
+
}
|
34
|
+
.popover.right {
|
35
|
+
margin-left: 10px;
|
36
|
+
}
|
37
|
+
.popover.bottom {
|
38
|
+
margin-top: 10px;
|
39
|
+
}
|
40
|
+
.popover.left {
|
41
|
+
margin-left: -10px;
|
42
|
+
}
|
43
|
+
.popover-title {
|
44
|
+
padding: 8px 14px;
|
45
|
+
margin: 0;
|
46
|
+
font-size: 14px;
|
47
|
+
font-weight: normal;
|
48
|
+
line-height: 18px;
|
49
|
+
background-color: #f7f7f7;
|
50
|
+
border-bottom: 1px solid #ebebeb;
|
51
|
+
border-radius: 5px 5px 0 0;
|
52
|
+
}
|
53
|
+
.popover-content {
|
54
|
+
padding: 9px 14px;
|
55
|
+
}
|
56
|
+
.popover > .arrow,
|
57
|
+
.popover > .arrow:after {
|
58
|
+
position: absolute;
|
59
|
+
display: block;
|
60
|
+
width: 0;
|
61
|
+
height: 0;
|
62
|
+
border-color: transparent;
|
63
|
+
border-style: solid;
|
64
|
+
/* The following are set in WordPress (wp-admin/css/revisions.css) - reset them to initial values */
|
65
|
+
overflow:visible;
|
66
|
+
margin:0;
|
67
|
+
padding:0;
|
68
|
+
z-index:auto;
|
69
|
+
background-color:transparent;
|
70
|
+
-webkit-box-shadow:none;
|
71
|
+
box-shadow:none;
|
72
|
+
bottom:auto;
|
73
|
+
left:auto;
|
74
|
+
right:auto;
|
75
|
+
top:auto;
|
76
|
+
-webkit-transform:none;
|
77
|
+
-ms-transform:none;
|
78
|
+
transform:none;
|
79
|
+
}
|
80
|
+
.popover > .arrow {
|
81
|
+
border-width: 11px;
|
82
|
+
}
|
83
|
+
.popover > .arrow:after {
|
84
|
+
content: "";
|
85
|
+
border-width: 10px;
|
86
|
+
}
|
87
|
+
.popover.top > .arrow {
|
88
|
+
bottom: -11px;
|
89
|
+
left: 50%;
|
90
|
+
margin-left: -11px;
|
91
|
+
border-top-color: #999;
|
92
|
+
border-top-color: rgba(0, 0, 0, .25);
|
93
|
+
border-bottom-width: 0;
|
94
|
+
}
|
95
|
+
.popover.top > .arrow:after {
|
96
|
+
bottom: 1px;
|
97
|
+
margin-left: -10px;
|
98
|
+
content: " ";
|
99
|
+
border-top-color: #fff;
|
100
|
+
border-bottom-width: 0;
|
101
|
+
}
|
102
|
+
.popover.right > .arrow {
|
103
|
+
top: 50%;
|
104
|
+
left: -11px;
|
105
|
+
margin-top: -11px;
|
106
|
+
border-right-color: #999;
|
107
|
+
border-right-color: rgba(0, 0, 0, .25);
|
108
|
+
border-left-width: 0;
|
109
|
+
}
|
110
|
+
.popover.right > .arrow:after {
|
111
|
+
bottom: -10px;
|
112
|
+
left: 1px;
|
113
|
+
content: " ";
|
114
|
+
border-right-color: #fff;
|
115
|
+
border-left-width: 0;
|
116
|
+
}
|
117
|
+
.popover.bottom > .arrow {
|
118
|
+
top: -11px;
|
119
|
+
left: 50%;
|
120
|
+
margin-left: -11px;
|
121
|
+
border-top-width: 0;
|
122
|
+
border-bottom-color: #999;
|
123
|
+
border-bottom-color: rgba(0, 0, 0, .25);
|
124
|
+
}
|
125
|
+
.popover.bottom > .arrow:after {
|
126
|
+
top: 1px;
|
127
|
+
margin-left: -10px;
|
128
|
+
content: " ";
|
129
|
+
border-top-width: 0;
|
130
|
+
border-bottom-color: #fff;
|
131
|
+
}
|
132
|
+
.popover.left > .arrow {
|
133
|
+
top: 50%;
|
134
|
+
right: -11px;
|
135
|
+
margin-top: -11px;
|
136
|
+
border-right-width: 0;
|
137
|
+
border-left-color: #999;
|
138
|
+
border-left-color: rgba(0, 0, 0, .25);
|
139
|
+
}
|
140
|
+
.popover.left > .arrow:after {
|
141
|
+
right: 1px;
|
142
|
+
bottom: -10px;
|
143
|
+
content: " ";
|
144
|
+
border-right-width: 0;
|
145
|
+
border-left-color: #fff;
|
146
|
+
}
|
147
|
+
.btn {
|
148
|
+
cursor: pointer;
|
149
|
+
-webkit-user-select: none;
|
150
|
+
-moz-user-select: none;
|
151
|
+
-ms-user-select: none;
|
152
|
+
user-select: none;
|
153
|
+
background-image: none;
|
154
|
+
border: 1px solid transparent;
|
155
|
+
|
156
|
+
}
|
157
|
+
.btn:focus,
|
158
|
+
.btn:active:focus,
|
159
|
+
.btn.active:focus {
|
160
|
+
outline: thin dotted;
|
161
|
+
outline: 5px auto -webkit-focus-ring-color;
|
162
|
+
outline-offset: -2px;
|
163
|
+
}
|
164
|
+
.btn:hover,
|
165
|
+
.btn:focus {
|
166
|
+
color: #333;
|
167
|
+
text-decoration: none;
|
168
|
+
}
|
169
|
+
.btn:active,
|
170
|
+
.btn.active {
|
171
|
+
background-image: none;
|
172
|
+
outline: 0;
|
173
|
+
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
174
|
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
175
|
+
}
|
176
|
+
.btn-default {
|
177
|
+
color: #333;
|
178
|
+
background-color: #fff;
|
179
|
+
border-color: #ccc;
|
180
|
+
}
|
181
|
+
.btn-default:hover,
|
182
|
+
.btn-default:focus,
|
183
|
+
.btn-default:active,
|
184
|
+
.btn-default.active,
|
185
|
+
.open .dropdown-toggle.btn-default {
|
186
|
+
color: #333;
|
187
|
+
background-color: #ebebeb;
|
188
|
+
border-color: #adadad;
|
189
|
+
}
|
190
|
+
.btn-default:active,
|
191
|
+
.btn-default.active,
|
192
|
+
.open .dropdown-toggle.btn-default {
|
193
|
+
background-image: none;
|
194
|
+
}
|
195
|
+
.btn-block {
|
196
|
+
display: block;
|
197
|
+
width: 100%;
|
198
|
+
}
|
199
|
+
.text-primary {
|
200
|
+
color: #428bca;
|
201
|
+
}
|
202
|
+
|
203
|
+
/*!
|
204
|
+
* ClockPicker v{package.version} for Bootstrap (http://weareoutman.github.io/clockpicker/)
|
205
|
+
* Copyright 2014 Wang Shenwei.
|
206
|
+
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
|
207
|
+
*/
|
208
|
+
|
209
|
+
.clockpicker .input-group-addon {
|
210
|
+
cursor: pointer;
|
211
|
+
}
|
212
|
+
.clockpicker-moving {
|
213
|
+
cursor: move;
|
214
|
+
}
|
215
|
+
.clockpicker-align-left.popover > .arrow {
|
216
|
+
left: 25px;
|
217
|
+
}
|
218
|
+
.clockpicker-align-top.popover > .arrow {
|
219
|
+
top: 17px;
|
220
|
+
}
|
221
|
+
.clockpicker-align-right.popover > .arrow {
|
222
|
+
left: auto;
|
223
|
+
right: 25px;
|
224
|
+
}
|
225
|
+
.clockpicker-align-bottom.popover > .arrow {
|
226
|
+
top: auto;
|
227
|
+
bottom: 6px;
|
228
|
+
}
|
229
|
+
.clockpicker-popover .popover-title {
|
230
|
+
background-color: #fff;
|
231
|
+
color: #999;
|
232
|
+
font-size: 24px;
|
233
|
+
font-weight: bold;
|
234
|
+
line-height: 30px;
|
235
|
+
text-align: center;
|
236
|
+
}
|
237
|
+
.clockpicker-popover .popover-title span {
|
238
|
+
cursor: pointer;
|
239
|
+
}
|
240
|
+
.clockpicker-popover .popover-content {
|
241
|
+
background-color: #f8f8f8;
|
242
|
+
padding: 12px;
|
243
|
+
}
|
244
|
+
.popover-content:last-child {
|
245
|
+
border-bottom-left-radius: 5px;
|
246
|
+
border-bottom-right-radius: 5px;
|
247
|
+
}
|
248
|
+
.clockpicker-plate {
|
249
|
+
background-color: #fff;
|
250
|
+
border: 1px solid #ccc;
|
251
|
+
border-radius: 50%;
|
252
|
+
width: 200px;
|
253
|
+
height: 200px;
|
254
|
+
overflow: visible;
|
255
|
+
position: relative;
|
256
|
+
/* Disable text selection highlighting. Thanks to Hermanya */
|
257
|
+
-webkit-touch-callout: none;
|
258
|
+
-webkit-user-select: none;
|
259
|
+
-khtml-user-select: none;
|
260
|
+
-moz-user-select: none;
|
261
|
+
-ms-user-select: none;
|
262
|
+
user-select: none;
|
263
|
+
}
|
264
|
+
.clockpicker-canvas,
|
265
|
+
.clockpicker-dial {
|
266
|
+
width: 200px;
|
267
|
+
height: 200px;
|
268
|
+
position: absolute;
|
269
|
+
left: -1px;
|
270
|
+
top: -1px;
|
271
|
+
}
|
272
|
+
.clockpicker-minutes {
|
273
|
+
visibility: hidden;
|
274
|
+
}
|
275
|
+
.clockpicker-tick {
|
276
|
+
border-radius: 50%;
|
277
|
+
color: #666;
|
278
|
+
line-height: 26px;
|
279
|
+
text-align: center;
|
280
|
+
width: 26px;
|
281
|
+
height: 26px;
|
282
|
+
position: absolute;
|
283
|
+
cursor: pointer;
|
284
|
+
}
|
285
|
+
.clockpicker-tick.active,
|
286
|
+
.clockpicker-tick:hover {
|
287
|
+
background-color: rgb(192, 229, 247);
|
288
|
+
background-color: rgba(0, 149, 221, .25);
|
289
|
+
}
|
290
|
+
.clockpicker-button {
|
291
|
+
background-image: none;
|
292
|
+
background-color: #fff;
|
293
|
+
border-width: 1px 0 0;
|
294
|
+
border-top-left-radius: 0;
|
295
|
+
border-top-right-radius: 0;
|
296
|
+
margin: 0;
|
297
|
+
padding: 10px 0;
|
298
|
+
}
|
299
|
+
.clockpicker-button:hover {
|
300
|
+
background-image: none;
|
301
|
+
background-color: #ebebeb;
|
302
|
+
}
|
303
|
+
.clockpicker-button:focus {
|
304
|
+
outline: none!important;
|
305
|
+
}
|
306
|
+
.clockpicker-dial {
|
307
|
+
-webkit-transition: -webkit-transform 350ms, opacity 350ms;
|
308
|
+
-moz-transition: -moz-transform 350ms, opacity 350ms;
|
309
|
+
-ms-transition: -ms-transform 350ms, opacity 350ms;
|
310
|
+
-o-transition: -o-transform 350ms, opacity 350ms;
|
311
|
+
transition: transform 350ms, opacity 350ms;
|
312
|
+
}
|
313
|
+
.clockpicker-dial-out {
|
314
|
+
opacity: 0;
|
315
|
+
}
|
316
|
+
.clockpicker-hours.clockpicker-dial-out {
|
317
|
+
-webkit-transform: scale(1.2, 1.2);
|
318
|
+
-moz-transform: scale(1.2, 1.2);
|
319
|
+
-ms-transform: scale(1.2, 1.2);
|
320
|
+
-o-transform: scale(1.2, 1.2);
|
321
|
+
transform: scale(1.2, 1.2);
|
322
|
+
}
|
323
|
+
.clockpicker-minutes.clockpicker-dial-out {
|
324
|
+
-webkit-transform: scale(.8, .8);
|
325
|
+
-moz-transform: scale(.8, .8);
|
326
|
+
-ms-transform: scale(.8, .8);
|
327
|
+
-o-transform: scale(.8, .8);
|
328
|
+
transform: scale(.8, .8);
|
329
|
+
}
|
330
|
+
.clockpicker-canvas {
|
331
|
+
-webkit-transition: opacity 175ms;
|
332
|
+
-moz-transition: opacity 175ms;
|
333
|
+
-ms-transition: opacity 175ms;
|
334
|
+
-o-transition: opacity 175ms;
|
335
|
+
transition: opacity 175ms;
|
336
|
+
}
|
337
|
+
.clockpicker-canvas-out {
|
338
|
+
opacity: 0.25;
|
339
|
+
}
|
340
|
+
.clockpicker-canvas-bearing,
|
341
|
+
.clockpicker-canvas-fg {
|
342
|
+
stroke: none;
|
343
|
+
fill: rgb(0, 149, 221);
|
344
|
+
}
|
345
|
+
.clockpicker-canvas-bg {
|
346
|
+
stroke: none;
|
347
|
+
fill: rgb(192, 229, 247);
|
348
|
+
}
|
349
|
+
.clockpicker-canvas-bg-trans {
|
350
|
+
fill: rgba(0, 149, 221, .25);
|
351
|
+
}
|
352
|
+
.clockpicker-canvas line {
|
353
|
+
stroke: rgb(0, 149, 221);
|
354
|
+
stroke-width: 1;
|
355
|
+
stroke-linecap: round;
|
356
|
+
/*shape-rendering: crispEdges;*/
|
357
|
+
}
|
358
|
+
.clockpicker-button.am-button {
|
359
|
+
margin: 1px;
|
360
|
+
padding: 5px;
|
361
|
+
border: 1px solid rgba(0, 0, 0, .2);
|
362
|
+
border-radius: 4px;
|
363
|
+
|
364
|
+
}
|
365
|
+
.clockpicker-button.pm-button {
|
366
|
+
margin: 1px 1px 1px 136px;
|
367
|
+
padding: 5px;
|
368
|
+
border: 1px solid rgba(0, 0, 0, .2);
|
369
|
+
border-radius: 4px;
|
370
|
+
}
|