jscal2-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.txt +22 -0
- data/README.md +45 -0
- data/app/assets/images/jscal2/nav-left-x2.gif +0 -0
- data/app/assets/images/jscal2/nav-left.gif +0 -0
- data/app/assets/images/jscal2/nav-right-x2.gif +0 -0
- data/app/assets/images/jscal2/nav-right.gif +0 -0
- data/app/assets/images/jscal2/shadow-b.png +0 -0
- data/app/assets/images/jscal2/steel/brushed-steel.jpg +0 -0
- data/app/assets/images/jscal2/steel/steel.css +61 -0
- data/app/assets/images/jscal2/steel/steel.jpg +0 -0
- data/app/assets/images/jscal2/time-down.png +0 -0
- data/app/assets/images/jscal2/time-up.png +0 -0
- data/app/assets/javascripts/jscal2/jscal2.js +141 -0
- data/app/assets/javascripts/jscal2/lang/cn.js +61 -0
- data/app/assets/javascripts/jscal2/lang/en.js +61 -0
- data/app/assets/stylesheets/jscal2/border-radius.css +82 -0
- data/app/assets/stylesheets/jscal2/jscal2.css.erb +357 -0
- data/app/assets/stylesheets/jscal2/steel/steel.css.erb +63 -0
- data/lib/jscal2/rails.rb +8 -0
- data/lib/jscal2/rails/version.rb +5 -0
- metadata +92 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a1446a6842a5081fa943366d685680981b95fa86
|
4
|
+
data.tar.gz: f184ed9f8d8a5f25287025bed587c1b00e56ab51
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 82bf5bcef70706030ebe841fc33d2ee448c1944be2162a54de8c599d68d0b9404e3679641ea5131cc9a40ba47656c1a9e16e24d6280b5802ed12222aab699d76
|
7
|
+
data.tar.gz: 8bd85f201941dd5f6088d0069ded437a60c51a4d04128dced8b1d796f4f17526aa5c7040020c216347f1da831c89f7a55dbdcd91ce99a8b93a1b657963da522d
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 John Chen
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# Jscal2::Rails
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'jscal2-rails'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install jscal2-rails
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
```
|
21
|
+
/*
|
22
|
+
*= require jscal2/jscal2
|
23
|
+
*/
|
24
|
+
``
|
25
|
+
|
26
|
+
|
27
|
+
```
|
28
|
+
//= require jscal2/jscal2
|
29
|
+
//= require jscal2/lang/cn
|
30
|
+
|
31
|
+
```
|
32
|
+
|
33
|
+
英文用这个
|
34
|
+
```
|
35
|
+
//= require jscal2/lang/en
|
36
|
+
|
37
|
+
```
|
38
|
+
|
39
|
+
## Contributing
|
40
|
+
|
41
|
+
1. Fork it ( https://github.com/growcn/jscal2-rails/fork )
|
42
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
43
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
44
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
45
|
+
5. Create a new Pull Request
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,61 @@
|
|
1
|
+
.DynarchCalendar-focused {
|
2
|
+
background-color: #fff;
|
3
|
+
}
|
4
|
+
|
5
|
+
.DynarchCalendar-topBar {
|
6
|
+
background: url("brushed-steel.jpg") no-repeat 50% 0;
|
7
|
+
}
|
8
|
+
|
9
|
+
.DynarchCalendar-bottomBar {
|
10
|
+
background: url("brushed-steel.jpg") no-repeat 50% 50%;
|
11
|
+
}
|
12
|
+
|
13
|
+
.DynarchCalendar-hover-title,
|
14
|
+
.DynarchCalendar-hover-navBtn,
|
15
|
+
.DynarchCalendar-hover-bottomBar-today,
|
16
|
+
.DynarchCalendar-menu table td div.DynarchCalendar-hover-navBtn {
|
17
|
+
background: #dde url("coolbg.png") repeat-x 0 50%;
|
18
|
+
}
|
19
|
+
.DynarchCalendar-hover-title div,
|
20
|
+
.DynarchCalendar-hover-navBtn div { background-color: transparent; }
|
21
|
+
|
22
|
+
.DynarchCalendar-pressed-title,
|
23
|
+
.DynarchCalendar-pressed-navBtn,
|
24
|
+
.DynarchCalendar-pressed-bottomBar-today,
|
25
|
+
.DynarchCalendar-menu table td div.DynarchCalendar-pressed-navBtn {
|
26
|
+
background: #445 url("coolbg.png") repeat-x 0 50%;
|
27
|
+
}
|
28
|
+
.DynarchCalendar-pressed-title div,
|
29
|
+
.DynarchCalendar-pressed-navBtn div { background-color: transparent; }
|
30
|
+
|
31
|
+
.DynarchCalendar-hover-week,
|
32
|
+
.DynarchCalendar-focused .DynarchCalendar-hover-week {
|
33
|
+
background: #ddd url("coolbg.png") repeat-x 0 50%;
|
34
|
+
}
|
35
|
+
|
36
|
+
.DynarchCalendar {
|
37
|
+
background: url("steel.jpg") no-repeat 50% 30px;
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
.DynarchCalendar-day-selected {
|
47
|
+
background-color: #1864fc;
|
48
|
+
color: #fff !important;
|
49
|
+
background-image: url("coolbg.png");
|
50
|
+
background-position: 0 50%;
|
51
|
+
background-repeat: repeat-x;
|
52
|
+
}
|
53
|
+
|
54
|
+
.DynarchCalendar-day-today.DynarchCalendar-day-selected {
|
55
|
+
background-color: #1864fc;
|
56
|
+
color: #fff !important;
|
57
|
+
}
|
58
|
+
|
59
|
+
.DynarchCalendar-focused .DynarchCalendar-body {
|
60
|
+
background: url("../shadow-b.png") repeat-x 0 0;
|
61
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,141 @@
|
|
1
|
+
/**
|
2
|
+
* ____ _____
|
3
|
+
* Dynarch Calendar -- JSCal2, version 1.9 \ /_ / /
|
4
|
+
* Built at 2013/03/04 09:35 GMT \ / / /
|
5
|
+
* \/ /_ /
|
6
|
+
* (c) Dynarch.com 2009-2012 \ / /
|
7
|
+
* All rights reserved. / /
|
8
|
+
* Visit www.dynarch.com/projects/calendar for details \/
|
9
|
+
*
|
10
|
+
*/
|
11
|
+
Calendar=function(){function t(e){var n,a,s
|
12
|
+
e=e||{},this.args=e=E(e,{animation:!ce,cont:null,bottomBar:!0,date:!0,fdow:_("fdow"),min:null,max:null,reverseWheel:!1,selection:[],selectionType:t.SEL_SINGLE,weekNumbers:!1,align:"Bl/ / /T/r",inputField:null,trigger:null,dateFormat:"%Y-%m-%d",multiCtrl:!0,fixed:!1,opacity:le?1:3,titleFormat:"%b %Y",showTime:!1,timePos:"right",time:!0,minuteStep:5,noScroll:!1,disabled:se,checkRange:!1,dateInfo:se,onChange:se,onSelect:se,onTimeChange:se,onFocus:se,onBlur:se,onClose:se}),this.handlers={},n=this,a=new Date,e.min=k(e.min),e.max=k(e.max),e.date===!0&&(e.date=a),e.time===!0&&(e.time=a.getHours()*100+Math.floor(a.getMinutes()/e.minuteStep)*e.minuteStep),this.date=k(e.date),this.time=e.time,this.fdow=e.fdow,q("onChange onSelect onTimeChange onFocus onBlur onClose".split(/\s+/),function(t){var a=e[t]
|
13
|
+
a instanceof Array||(a=[a]),n.handlers[t]=a}),this.selection=new t.Selection(e.selection,e.selectionType,C,this),s=l(this),e.cont&&J(e.cont).appendChild(s),e.trigger&&this.manageFields(e.trigger,e.inputField,e.dateFormat)}function e(t){var e,n=["<table",Q,"><tr>"],a=0
|
14
|
+
for(t.args.weekNumbers&&n.push("<td><div class='DynarchCalendar-weekNumber'>",_("wk"),"</div></td>");7>a;)e=(a++ +t.fdow)%7,n.push("<td><div",_("weekend").indexOf(e)<0?">":" class='DynarchCalendar-weekend'>",_("sdn")[e],"</div></td>")
|
15
|
+
return n.push("</tr></table>"),n.join("")}function n(t,e,n){var a,s,i,r,o,l,c,h,u,d,f,y,m,p,g,v,D
|
16
|
+
for(e=e||t.date,n=n||t.fdow,e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0,0),a=e.getMonth(),s=[],i=0,r=t.args.weekNumbers,e.setDate(1),o=(e.getDay()-n)%7,0>o&&(o+=7),e.setDate(0-o),e.setDate(e.getDate()+1),l=new Date,c=l.getDate(),h=l.getMonth(),u=l.getFullYear(),s[i++]="<table class='DynarchCalendar-bodyTable'"+Q+">",d=0;6>d;++d){for(s[i++]="<tr class='DynarchCalendar-week",0==d&&(s[i++]=" DynarchCalendar-first-row"),5==d&&(s[i++]=" DynarchCalendar-last-row"),s[i++]="'>",r&&(s[i++]="<td class='DynarchCalendar-first-col'><div class='DynarchCalendar-weekNumber'>"+T(e)+"</div></td>"),f=0;7>f;++f)y=e.getDate(),m=e.getMonth(),p=e.getFullYear(),g=1e4*p+100*(m+1)+y,v=t.selection.isSelected(g),D=t.isDisabled(e),s[i++]="<td class='",0!=f||r||(s[i++]=" DynarchCalendar-first-col"),0==f&&0==d&&(t._firstDateVisible=g),6==f&&(s[i++]=" DynarchCalendar-last-col",5==d&&(t._lastDateVisible=g)),v&&(s[i++]=" DynarchCalendar-td-selected"),s[i++]="'><div dyc-type='date' unselectable='on' dyc-date='"+g+"' ",D&&(s[i++]="disabled='1' "),s[i++]="class='DynarchCalendar-day",_("weekend").indexOf(e.getDay())<0||(s[i++]=" DynarchCalendar-weekend"),m!=a&&(s[i++]=" DynarchCalendar-day-othermonth"),y==c&&m==h&&p==u&&(s[i++]=" DynarchCalendar-day-today"),D&&(s[i++]=" DynarchCalendar-day-disabled"),v&&(s[i++]=" DynarchCalendar-day-selected"),D=t.args.dateInfo(e),D&&D.klass&&(s[i++]=" "+D.klass),s[i++]="'>"+y+"</div></td>",e=new Date(p,m,y+1,12,0,0,0)
|
17
|
+
s[i++]="</tr>"}return s[i++]="</table>",s.join("")}function a(t){var n=["<table class='DynarchCalendar-topCont'",Q,"><tr><td>","<div class='DynarchCalendar'>",le?"<a class='DynarchCalendar-focusLink' href='#'></a>":"<button class='DynarchCalendar-focusLink'></button>","<div class='DynarchCalendar-topBar'>","<div dyc-type='nav' dyc-btn='-Y' dyc-cls='hover-navBtn,pressed-navBtn' ","class='DynarchCalendar-navBtn DynarchCalendar-prevYear'><div></div></div>","<div dyc-type='nav' dyc-btn='+Y' dyc-cls='hover-navBtn,pressed-navBtn' ","class='DynarchCalendar-navBtn DynarchCalendar-nextYear'><div></div></div>","<div dyc-type='nav' dyc-btn='-M' dyc-cls='hover-navBtn,pressed-navBtn' ","class='DynarchCalendar-navBtn DynarchCalendar-prevMonth'><div></div></div>","<div dyc-type='nav' dyc-btn='+M' dyc-cls='hover-navBtn,pressed-navBtn' ","class='DynarchCalendar-navBtn DynarchCalendar-nextMonth'><div></div></div>","<table class='DynarchCalendar-titleCont'",Q,"><tr><td>","<div dyc-type='title' dyc-btn='menu' dyc-cls='hover-title,pressed-title' class='DynarchCalendar-title'>",s(t),"</div></td></tr></table>","<div class='DynarchCalendar-dayNames'>",e(t),"</div>","</div>","<div class='DynarchCalendar-body'></div>"]
|
18
|
+
return(t.args.bottomBar||t.args.showTime)&&n.push("<div class='DynarchCalendar-bottomBar'>",o(t),"</div>"),n.push("<div class='DynarchCalendar-menu' style='display: none'>",i(t),"</div>","<div class='DynarchCalendar-tooltip'></div>","</div>","</td></tr></table>"),n.join("")}function s(t){return"<div unselectable='on'>"+S(t.date,t.args.titleFormat)+"</div>"}function i(t){for(var e,n=["<table height='100%'",Q,"><tr><td>","<table style='margin-top: 1.5em'",Q,">","<tr><td colspan='3'><input dyc-btn='year' class='DynarchCalendar-menu-year' size='6' value='",t.date.getFullYear(),"' /></td></tr>","<tr><td><div dyc-type='menubtn' dyc-cls='hover-navBtn,pressed-navBtn' dyc-btn='today'>",_("goToday"),"</div></td></tr>","</table>","<p class='DynarchCalendar-menu-sep'> </p>","<table class='DynarchCalendar-menu-mtable'",Q,">"],a=_("smn"),s=0,i=n.length;12>s;){for(n[i++]="<tr>",e=4;--e>0;)n[i++]="<td><div dyc-type='menubtn' dyc-cls='hover-navBtn,pressed-navBtn' dyc-btn='m"+s+"' class='DynarchCalendar-menu-month'>"+a[s++]+"</div></td>"
|
19
|
+
n[i++]="</tr>"}return n[i++]="</table></td></tr></table>",n.join("")}function r(t,e){e.push("<table class='DynarchCalendar-time'"+Q+"><tr>","<td rowspan='2'><div dyc-type='time-hour' dyc-cls='hover-time,pressed-time' class='DynarchCalendar-time-hour'></div></td>","<td dyc-type='time-hour+' dyc-cls='hover-time,pressed-time' class='DynarchCalendar-time-up'></td>","<td rowspan='2' class='DynarchCalendar-time-sep'></td>","<td rowspan='2'><div dyc-type='time-min' dyc-cls='hover-time,pressed-time' class='DynarchCalendar-time-minute'></div></td>","<td dyc-type='time-min+' dyc-cls='hover-time,pressed-time' class='DynarchCalendar-time-up'></td>"),t.args.showTime==12&&e.push("<td rowspan='2' class='DynarchCalendar-time-sep'></td>","<td rowspan='2'><div class='DynarchCalendar-time-am' dyc-type='time-am' dyc-cls='hover-time,pressed-time'></div></td>"),e.push("</tr><tr>","<td dyc-type='time-hour-' dyc-cls='hover-time,pressed-time' class='DynarchCalendar-time-down'></td>","<td dyc-type='time-min-' dyc-cls='hover-time,pressed-time' class='DynarchCalendar-time-down'></td>","</tr></table>")}function o(t){function e(){a.showTime&&(n.push("<td>"),r(t,n),n.push("</td>"))}var n=[],a=t.args
|
20
|
+
return n.push("<table",Q," style='width:100%'><tr>"),a.timePos=="left"&&e(),a.bottomBar&&(n.push("<td>"),n.push("<table",Q,"><tr><td>","<div dyc-btn='today' dyc-cls='hover-bottomBar-today,pressed-bottomBar-today' dyc-type='bottomBar-today' ","class='DynarchCalendar-bottomBar-today'>",_("today"),"</div>","</td></tr></table>"),n.push("</td>")),a.timePos=="right"&&e(),n.push("</tr></table>"),n.join("")}function l(t){var e=V("div"),n=t.els={},s={mousedown:O(m,t,!0),mouseup:O(m,t,!1),mouseover:O(D,t,!0),mouseout:O(D,t,!1),keypress:O(w,t)}
|
21
|
+
return t.args.noScroll||(s[he?"DOMMouseScroll":"mousewheel"]=O(b,t)),le&&(s.dblclick=s.mousedown,s.keydown=s.keypress),e.innerHTML=a(t),W(e.firstChild,function(t){var e=Z[t.className]
|
22
|
+
e&&(n[e]=t),le&&t.setAttribute("unselectable","on")}),B(n.main,s),B([n.focusLink,n.yearInput],t._focusEvents={focus:O(c,t),blur:O(u,t)}),t.moveTo(t.date,!1),t.setTime(null,!0),n.topCont}function c(){this._bluringTimeout&&clearTimeout(this._bluringTimeout),this.focused=!0,P(this.els.main,"DynarchCalendar-focused"),this.callHooks("onFocus",this)}function h(){this.focused=!1,Y(this.els.main,"DynarchCalendar-focused"),this._menuVisible&&y(this,!1),this.args.cont||this.hide(),this.callHooks("onBlur",this)}function u(){this._bluringTimeout=setTimeout(O(h,this),50)}function d(t){switch(t){case"time-hour+":this.setHours(this.getHours()+1)
|
23
|
+
break
|
24
|
+
case"time-hour-":this.setHours(this.getHours()-1)
|
25
|
+
break
|
26
|
+
case"time-min+":this.setMinutes(this.getMinutes()+this.args.minuteStep)
|
27
|
+
break
|
28
|
+
case"time-min-":this.setMinutes(this.getMinutes()-this.args.minuteStep)
|
29
|
+
break
|
30
|
+
default:return}}function f(t,e,n){this._bodyAnim&&this._bodyAnim.stop()
|
31
|
+
var a
|
32
|
+
if(0!=e)switch(a=new Date(t.date),a.setDate(1),e){case"-Y":case-2:a.setFullYear(a.getFullYear()-1)
|
33
|
+
break
|
34
|
+
case"+Y":case 2:a.setFullYear(a.getFullYear()+1)
|
35
|
+
break
|
36
|
+
case"-M":case-1:a.setMonth(a.getMonth()-1)
|
37
|
+
break
|
38
|
+
case"+M":case 1:a.setMonth(a.getMonth()+1)}else a=new Date
|
39
|
+
return t.moveTo(a,!n)}function y(t,e){var n,a
|
40
|
+
t._menuVisible=e,R(e,t.els.title,"DynarchCalendar-pressed-title"),n=t.els.menu,ce&&(n.style.height=t.els.main.offsetHeight+"px"),t.args.animation?(t._menuAnim&&t._menuAnim.stop(),a=t.els.main.offsetHeight,ce&&(n.style.width=t.els.topBar.offsetWidth+"px"),e&&(n.firstChild.style.marginTop=-a+"px",t.args.opacity>0&&$(n,0),j(n,!0)),t._menuAnim=K({onUpdate:function(s,i){n.firstChild.style.marginTop=i(ae.accel_b(s),-a,0,!e)+"px",t.args.opacity>0&&$(n,i(ae.accel_b(s),0,.85,!e))},onStop:function(){t.args.opacity>0&&$(n,.85),n.firstChild.style.marginTop="",t._menuAnim=null,e||(j(n,!1),t.focused&&t.focus())}})):(j(n,e),t.focused&&t.focus())}function m(e,n){var a,s,i,r,o,l,c,h,u
|
41
|
+
n=n||window.event,a=g(n),a&&!a.getAttribute("disabled")&&(i=a.getAttribute("dyc-btn"),r=a.getAttribute("dyc-type"),o=a.getAttribute("dyc-date"),l=this.selection,c={mouseover:N,mousemove:N,mouseup:function(){var t=a.getAttribute("dyc-cls")
|
42
|
+
t&&Y(a,v(t,1)),clearTimeout(s),F(document,c,!0),c=null}},e?(setTimeout(O(this.focus,this),1),h=a.getAttribute("dyc-cls"),h&&P(a,v(h,1)),"menu"==i?this.toggleMenu():a&&/^[+-][MY]$/.test(i)?f(this,i)?(u=O(function(){f(this,i,!0)?s=setTimeout(u,40):(c.mouseup(),f(this,i))},this),s=setTimeout(u,350),B(document,c,!0)):c.mouseup():"year"==i?(this.els.yearInput.focus(),this.els.yearInput.select()):"time-am"==r?B(document,c,!0):/^time/.test(r)?(u=O(function(t){d.call(this,t),s=setTimeout(u,100)},this,r),d.call(this,r),s=setTimeout(u,350),B(document,c,!0)):(o&&l.type&&(l.type==t.SEL_MULTIPLE?n.shiftKey&&this._selRangeStart?l.selectRange(this._selRangeStart,o):(n.ctrlKey||l.isSelected(o)||!this.args.multiCtrl||l.clear(!0),l.set(o,!0),this._selRangeStart=o):(l.set(o),this.moveTo(A(o),2)),a=this._getDateDiv(o),D.call(this,!0,{target:a})),B(document,c,!0)),le&&c&&/dbl/i.test(n.type)&&c.mouseup(),this.args.fixed||!/^(DynarchCalendar-(topBar|bottomBar|weekend|weekNumber|menu(-sep)?))?$/.test(a.className)||this.args.cont||(c.mousemove=O(p,this),this._mouseDiff=z(n,G(this.els.topCont)),B(document,c,!0))):"today"==i?(this._menuVisible||l.type!=t.SEL_SINGLE||l.set(new Date),this.moveTo(new Date,!0),y(this,!1)):/^m([0-9]+)/.test(i)?(o=new Date(this.date),o.setDate(1),o.setMonth(RegExp.$1),o.setFullYear(this._getInputYear()),this.moveTo(o,!0),y(this,!1)):"time-am"==r&&this.setHours(this.getHours()+12),le||N(n))}function p(t){t=t||window.event
|
43
|
+
var e=this.els.topCont.style,n=z(t,this._mouseDiff)
|
44
|
+
e.left=n.x+"px",e.top=n.y+"px"}function g(t){for(var e=t.target||t.srcElement,n=e;e&&e.getAttribute&&!e.getAttribute("dyc-type");)e=e.parentNode
|
45
|
+
return e.getAttribute&&e||n}function v(t,e){return"DynarchCalendar-"+t.split(/,/)[e]}function D(t,e){var n,a,s
|
46
|
+
e=e||window.event,n=g(e),n&&(a=n.getAttribute("dyc-type"),a&&!n.getAttribute("disabled")&&(t&&this._bodyAnim&&"date"==a||(s=n.getAttribute("dyc-cls"),s=s?v(s,0):"DynarchCalendar-hover-"+a,("date"!=a||this.selection.type)&&R(t,n,s),"date"==a&&(R(t,n.parentNode.parentNode,"DynarchCalendar-hover-week"),this._showTooltip(n.getAttribute("dyc-date"))),/^time-hour/.test(a)&&R(t,this.els.timeHour,"DynarchCalendar-hover-time"),/^time-min/.test(a)&&R(t,this.els.timeMinute,"DynarchCalendar-hover-time"),Y(this._getDateDiv(this._lastHoverDate),"DynarchCalendar-hover-date"),this._lastHoverDate=null))),t||this._showTooltip()}function b(t){var e,n,a,s
|
47
|
+
if(t=t||window.event,e=g(t))if(n=e.getAttribute("dyc-btn"),a=e.getAttribute("dyc-type"),s=t.wheelDelta?t.wheelDelta/120:-t.detail/3,s=0>s?-1:s>0?1:0,this.args.reverseWheel&&(s=-s),/^(time-(hour|min))/.test(a)){switch(RegExp.$1){case"time-hour":this.setHours(this.getHours()+s)
|
48
|
+
break
|
49
|
+
case"time-min":this.setMinutes(this.getMinutes()+this.args.minuteStep*s)}N(t)}else/Y/i.test(n)&&(s*=2),f(this,-s),N(t)}function C(){var t,e,n
|
50
|
+
this.refresh(),t=this.inputField,e=this.selection,t&&(n=e.print(this.dateFormat),/input|textarea/i.test(t.tagName)?t.value=n:t.innerHTML=n),this.callHooks("onSelect",this,e)}function w(e){var n,a,s,i,r,o,l,c,h,u,d,m,p
|
51
|
+
if(!this._menuAnim){if(e=e||window.event,n=e.target||e.srcElement,a=n.getAttribute("dyc-btn"),s=e.keyCode,i=e.charCode||s,r=ee[s],"year"==a&&13==s)return o=new Date(this.date),o.setDate(1),o.setFullYear(this._getInputYear()),this.moveTo(o,!0),y(this,!1),N(e)
|
52
|
+
if(this._menuVisible){if(27==s)return y(this,!1),N(e)}else{if(e.ctrlKey||(r=null),null!=r||e.ctrlKey||(r=ne[s]),36==s&&(r=0),null!=r)return f(this,r),N(e)
|
53
|
+
if(i=String.fromCharCode(i).toLowerCase(),l=this.els.yearInput,c=this.selection," "==i)return y(this,!0),this.focus(),l.focus(),l.select(),N(e)
|
54
|
+
if(i>="0"&&"9">=i)return y(this,!0),this.focus(),l.value=i,l.focus(),N(e)
|
55
|
+
for(u=_("mn"),d=e.shiftKey?-1:this.date.getMonth(),m=0;++m<12;)if(h=u[(d+m)%12].toLowerCase(),h.indexOf(i)==0)return o=new Date(this.date),o.setDate(1),o.setMonth((d+m)%12),this.moveTo(o,!0),N(e)
|
56
|
+
if(s>=37&&40>=s){if(o=this._lastHoverDate,o||c.isEmpty()||(o=39>s?c.getFirstDate():c.getLastDate(),(o<this._firstDateVisible||o>this._lastDateVisible)&&(o=null)),o){for(p=o,o=A(o),d=100;d-->0;){switch(s){case 37:o.setDate(o.getDate()-1)
|
57
|
+
break
|
58
|
+
case 38:o.setDate(o.getDate()-7)
|
59
|
+
break
|
60
|
+
case 39:o.setDate(o.getDate()+1)
|
61
|
+
break
|
62
|
+
case 40:o.setDate(o.getDate()+7)}if(!this.isDisabled(o))break}o=L(o),(o<this._firstDateVisible||o>this._lastDateVisible)&&this.moveTo(o)}else o=39>s?this._lastDateVisible:this._firstDateVisible
|
63
|
+
return Y(this._getDateDiv(p),P(this._getDateDiv(o),"DynarchCalendar-hover-date")),this._lastHoverDate=o,N(e)}if(13==s&&this._lastHoverDate)return c.type==t.SEL_MULTIPLE&&(e.shiftKey||e.ctrlKey)?(e.shiftKey&&this._selRangeStart&&(c.clear(!0),c.selectRange(this._selRangeStart,this._lastHoverDate)),e.ctrlKey&&c.set(this._selRangeStart=this._lastHoverDate,!0)):c.reset(this._selRangeStart=this._lastHoverDate),N(e)
|
64
|
+
27!=s||this.args.cont||this.hide()}}}function M(t,e){return t.replace(/\$\{([^:\}]+)(:[^\}]+)?\}/g,function(t,n,a){var s,i=e[n]
|
65
|
+
return a&&(s=a.substr(1).split(/\s*\|\s*/),i=(i<s.length?s[i]:s[s.length-1]).replace(/##?/g,function(t){return t.length==2?"#":i})),i})}function _(t,e){var n=de.__.data[t]
|
66
|
+
return e&&"string"==typeof n&&(n=M(n,e)),n}function T(t){var e,n
|
67
|
+
return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),12,0,0),e=t.getDay(),t.setDate(t.getDate()-(e+6)%7+3),n=t.valueOf(),t.setMonth(0),t.setDate(4),Math.round((n-t.valueOf())/6048e5)+1}function x(t){var e,n
|
68
|
+
return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),12,0,0),e=new Date(t.getFullYear(),0,1,12,0,0),n=t-e,Math.floor(n/864e5)}function L(t){return t instanceof Date?1e4*t.getFullYear()+100*(t.getMonth()+1)+t.getDate():"string"==typeof t?parseInt(t,10):t}function A(t,e,n,a,s){var i,r
|
69
|
+
return t instanceof Date||(t=parseInt(t,10),i=Math.floor(t/1e4),t%=1e4,r=Math.floor(t/100),t%=100,t=new Date(i,r-1,t,null==e?12:e,null==n?0:n,null==a?0:a,null==s?0:s)),t}function H(t,e,n){var a=t.getFullYear(),s=t.getMonth(),i=t.getDate(),r=e.getFullYear(),o=e.getMonth(),l=e.getDate()
|
70
|
+
return r>a?-3:a>r?3:o>s?-2:s>o?2:n?0:l>i?-1:i>l?1:0}function S(t,e){var n,a=t.getMonth(),s=t.getDate(),i=t.getFullYear(),r=T(t),o=t.getDay(),l=t.getHours(),c=l>=12,h=c?l-12:l,u=x(t),d=t.getMinutes(),f=t.getSeconds(),y=/%./g
|
71
|
+
return 0===h&&(h=12),n={"%a":_("sdn")[o],"%A":_("dn")[o],"%b":_("smn")[a],"%B":_("mn")[a],"%C":1+Math.floor(i/100),"%d":10>s?"0"+s:s,"%e":s,"%H":10>l?"0"+l:l,"%I":10>h?"0"+h:h,"%j":10>u?"00"+u:100>u?"0"+u:u,"%k":l,"%l":h,"%m":9>a?"0"+(1+a):1+a,"%o":1+a,"%M":10>d?"0"+d:d,"%n":"\n","%p":c?"PM":"AM","%P":c?"pm":"am","%s":Math.floor(t.getTime()/1e3),"%S":10>f?"0"+f:f,"%t":" ","%U":10>r?"0"+r:r,"%W":10>r?"0"+r:r,"%V":10>r?"0"+r:r,"%u":o+1,"%w":o,"%y":(""+i).substr(2,2),"%Y":i,"%%":"%"},e.replace(y,function(t){return n.hasOwnProperty(t)?n[t]:t})}function k(t){if(t){if("number"==typeof t)return A(t)
|
72
|
+
if(!(t instanceof Date)){var e=t.split(/-/)
|
73
|
+
return new Date(parseInt(e[0],10),parseInt(e[1],10)-1,parseInt(e[2],10),12,0,0,0)}}return t}function I(t){function e(e){for(var n=e.length;--n>=0;)if(e[n].toLowerCase().indexOf(t)==0)return n+1}return/\S/.test(t)?(t=t.toLowerCase(),e(_("smn"))||e(_("mn"))):void 0}function E(t,e,n,a){a={}
|
74
|
+
for(n in e)e.hasOwnProperty(n)&&(a[n]=e[n])
|
75
|
+
for(n in t)t.hasOwnProperty(n)&&(a[n]=t[n])
|
76
|
+
return a}function B(t,e,n,a){var s
|
77
|
+
if(t instanceof Array)for(s=t.length;--s>=0;)B(t[s],e,n,a)
|
78
|
+
else if("object"==typeof e)for(s in e)e.hasOwnProperty(s)&&B(t,s,e[s],n)
|
79
|
+
else t.addEventListener?t.addEventListener(e,n,le?!0:!!a):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n}function F(t,e,n,a){var s
|
80
|
+
if(t instanceof Array)for(s=t.length;--s>=0;)F(t[s],e,n)
|
81
|
+
else if("object"==typeof e)for(s in e)e.hasOwnProperty(s)&&F(t,s,e[s],n)
|
82
|
+
else t.removeEventListener?t.removeEventListener(e,n,le?!0:!!a):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null}function N(t){return t=t||window.event,le?(t.cancelBubble=!0,t.returnValue=!1):(t.preventDefault(),t.stopPropagation()),!1}function Y(t,e,n){if(t){var a,s=t.className.replace(/^\s+|\s+$/,"").split(/\x20/),i=[]
|
83
|
+
for(a=s.length;a>0;)s[--a]!=e&&i.push(s[a])
|
84
|
+
n&&i.push(n),t.className=i.join(" ")}return n}function P(t,e){return Y(t,e,e)}function R(t,e,n){if(e instanceof Array)for(var a=e.length;--a>=0;)R(t,e[a],n)
|
85
|
+
else Y(e,n,t?n:null)
|
86
|
+
return t}function V(t,e,n){var a=null
|
87
|
+
return a=document.createElementNS?document.createElementNS("http://www.w3.org/1999/xhtml",t):document.createElement(t),e&&(a.className=e),n&&n.appendChild(a),a}function U(t,e){null==e&&(e=0)
|
88
|
+
var n,a,s
|
89
|
+
try{n=Array.prototype.slice.call(t,e)}catch(i){for(n=Array(t.length-e),a=e,s=0;a<t.length;++a,++s)n[s]=t[a]}return n}function O(t,e){var n=U(arguments,2)
|
90
|
+
return void 0==e?function(){return t.apply(this,n.concat(U(arguments)))}:function(){return t.apply(e,n.concat(U(arguments)))}}function W(t,e){if(!e(t))for(var n=t.firstChild;n;n=n.nextSibling)n.nodeType==1&&W(n,e)}function K(t,e,n){function a(t,e,n,a){return a?n+t*(e-n):e+t*(n-e)}function s(){e&&i(),n=0,e=setInterval(r,1e3/t.fps)}function i(){e&&(clearInterval(e),e=null),t.onStop(n/t.len,a)}function r(){var e=t.len
|
91
|
+
t.onUpdate(n/e,a),n==e&&i(),++n}return t=E(t,{fps:50,len:15,onUpdate:se,onStop:se}),le&&(t.len=Math.round(t.len/2)),s(),{start:s,stop:i,update:r,args:t,map:a}}function $(t,e){return""===e?le?t.style.filter="":t.style.opacity="":null!=e?le?t.style.filter="alpha(opacity="+100*e+")":t.style.opacity=e:le?/alpha\(opacity=([0-9.])+\)/.test(t.style.opacity)&&(e=parseFloat(RegExp.$1)/100):e=parseFloat(t.style.opacity),e}function j(t,e){var n=t.style
|
92
|
+
return null!=e&&(n.display=e?"":"none"),n.display!="none"}function z(t,e){var n=le?t.clientX+document.body.scrollLeft:t.pageX,a=le?t.clientY+document.body.scrollTop:t.pageY
|
93
|
+
return e&&(n-=e.x,a-=e.y),{x:n,y:a}}function G(t){var e,n,a
|
94
|
+
if(t.getBoundingClientRect)return e=t.getBoundingClientRect(),{x:e.left-document.documentElement.clientLeft+document.body.scrollLeft,y:e.top-document.documentElement.clientTop+document.body.scrollTop}
|
95
|
+
n=0,a=0
|
96
|
+
do n+=t.offsetLeft-t.scrollLeft,a+=t.offsetTop-t.scrollTop
|
97
|
+
while(t=t.offsetParent)
|
98
|
+
return{x:n,x:a}}function X(){var t=document.documentElement,e=document.body
|
99
|
+
return{x:t.scrollLeft||e.scrollLeft,y:t.scrollTop||e.scrollTop,w:t.clientWidth||window.innerWidth||e.clientWidth,h:t.clientHeight||window.innerHeight||e.clientHeight}}function q(t,e,n){for(n=0;n<t.length;++n)e(t[n])}function J(t){return"string"==typeof t&&(t=document.getElementById(t)),t}var Q,Z,te,ee,ne,ae,se,ie=navigator.userAgent,re=/opera/i.test(ie),oe=/Konqueror|Safari|KHTML/i.test(ie),le=/msie/i.test(ie)&&!re&&!/mac_powerpc/i.test(ie),ce=le&&/msie 6/i.test(ie),he=/gecko/i.test(ie)&&!oe&&!re&&!le,ue=t.prototype,de=t.I18N={}
|
100
|
+
return t.SEL_NONE=0,t.SEL_SINGLE=1,t.SEL_MULTIPLE=2,t.SEL_WEEK=3,t.dateToInt=L,t.intToDate=A,t.printDate=S,t.formatString=M,t.i18n=_,t.LANG=function(t,e,n){de.__=de[t]={name:e,data:n}},t.setup=function(e){return new t(e)},ue.moveTo=function(t,e){var a,s,i,r,o,l,c,h,u,d,f,y,m,p,g,v,D=this
|
101
|
+
return t=k(t),s=H(t,D.date,!0),i=D.args,r=i.min&&H(t,i.min),o=i.max&&H(t,i.max),i.animation||(e=!1),R(null!=r&&1>=r,[D.els.navPrevMonth,D.els.navPrevYear],"DynarchCalendar-navDisabled"),R(null!=o&&o>=-1,[D.els.navNextMonth,D.els.navNextYear],"DynarchCalendar-navDisabled"),-1>r&&(t=i.min,a=1,s=0),o>1&&(t=i.max,a=2,s=0),D.date=t,D.refresh(!!e),D.callHooks("onChange",D,t,e),!e||0==s&&2==e||(D._bodyAnim&&D._bodyAnim.stop(),l=D.els.body,c=V("div","DynarchCalendar-animBody-"+te[s],l),h=l.firstChild,$(h)||.7,u=a?ae.brakes:0==s?ae.shake:ae.accel_ab2,d=s*s>4,f=d?h.offsetTop:h.offsetLeft,y=c.style,m=d?l.offsetHeight:l.offsetWidth,0>s?m+=f:s>0?m=f-m:(m=Math.round(m/7),2==a&&(m=-m)),a||0==s||(p=c.cloneNode(!0),g=p.style,v=2*m,p.appendChild(h.cloneNode(!0)),g[d?"marginTop":"marginLeft"]=m+"px",l.appendChild(p)),h.style.visibility="hidden",c.innerHTML=n(D),D._bodyAnim=K({onUpdate:function(t,e){var n,i=u(t)
|
102
|
+
p&&(n=e(i,m,v)+"px"),a?y[d?"marginTop":"marginLeft"]=e(i,m,0)+"px":((d||0==s)&&(y.marginTop=e(0==s?u(t*t):i,0,m)+"px",0!=s&&(g.marginTop=n)),d&&0!=s||(y.marginLeft=e(i,0,m)+"px",0!=s&&(g.marginLeft=n))),D.args.opacity>2&&p&&($(p,1-i),$(c,i))},onStop:function(){l.innerHTML=n(D,t),D._bodyAnim=null}})),D._lastHoverDate=null,r>=-1&&1>=o},ue.isDisabled=function(t){var e=this.args
|
103
|
+
return e.min&&H(t,e.min)<0||e.max&&H(t,e.max)>0||e.disabled(t)},ue.toggleMenu=function(){y(this,!this._menuVisible)},ue.refresh=function(t){var e=this.els
|
104
|
+
t||(e.body.innerHTML=n(this)),e.title.innerHTML=s(this),e.yearInput.value=this.date.getFullYear()},ue.redraw=function(){var t=this,n=t.els
|
105
|
+
t.refresh(),n.dayNames.innerHTML=e(t),n.menu.innerHTML=i(t),n.bottomBar&&(n.bottomBar.innerHTML=o(t)),W(n.topCont,function(e){var a=Z[e.className]
|
106
|
+
a&&(n[a]=e),e.className=="DynarchCalendar-menu-year"?(B(e,t._focusEvents),n.yearInput=e):le&&e.setAttribute("unselectable","on")}),t.setTime(null,!0)},ue.setLanguage=function(e){var n=t.setLanguage(e)
|
107
|
+
n&&(this.fdow=n.data.fdow,this.redraw())},t.setLanguage=function(t){var e=de[t]
|
108
|
+
return e&&(de.__=e),e},ue.focus=function(){try{this.els[this._menuVisible?"yearInput":"focusLink"].focus()}catch(t){}c.call(this)},ue.blur=function(){this.els.focusLink.blur(),this.els.yearInput.blur(),h.call(this)},ue.showAt=function(t,e,n){this._showAnim&&this._showAnim.stop(),n=n&&this.args.animation
|
109
|
+
var a=this.els.topCont,s=this,i=this.els.body.firstChild,r=i.offsetHeight,o=a.style
|
110
|
+
o.position="absolute",o.left=t+"px",o.top=e+"px",o.zIndex=1e4,o.display="",n&&(i.style.marginTop=-r+"px",this.args.opacity>1&&$(a,0),this._showAnim=K({onUpdate:function(t,e){i.style.marginTop=-e(ae.accel_b(t),r,0)+"px",s.args.opacity>1&&$(a,t)},onStop:function(){s.args.opacity>1&&$(a,""),s._showAnim=null}}))},ue.hide=function(){this.callHooks("onClose",this)
|
111
|
+
var t=this.els.topCont,e=this,n=this.els.body.firstChild,a=n.offsetHeight,s=G(t).y
|
112
|
+
this.args.animation?(this._showAnim&&this._showAnim.stop(),this._showAnim=K({onUpdate:function(i,r){e.args.opacity>1&&$(t,1-i),n.style.marginTop=-r(ae.accel_b(i),0,a)+"px",t.style.top=r(ae.accel_ab(i),s,s-10)+"px"},onStop:function(){t.style.display="none",n.style.marginTop="",e.args.opacity>1&&$(t,""),e._showAnim=null}})):t.style.display="none",this.inputField=null},ue.popup=function(t,e){function n(e){var n={x:l.x,y:l.y}
|
113
|
+
return e?(/B/.test(e)&&(n.y+=t.offsetHeight),/b/.test(e)&&(n.y+=t.offsetHeight-a.y),/T/.test(e)&&(n.y-=a.y),/l/.test(e)&&(n.x-=a.x-t.offsetWidth),/L/.test(e)&&(n.x-=a.x),/R/.test(e)&&(n.x+=t.offsetWidth),/c/i.test(e)&&(n.x+=(t.offsetWidth-a.x)/2),/m/i.test(e)&&(n.y+=(t.offsetHeight-a.y)/2),n):n}var a,s,i,r,o,l
|
114
|
+
t=J(t),e||(e=this.args.align),e=e.split(/\x2f/),s=G(t),i=this.els.topCont,r=i.style,o=X(),r.visibility="hidden",r.display="",this.showAt(0,0),document.body.appendChild(i),a={x:i.offsetWidth,y:i.offsetHeight},l=s,l=n(e[0]),l.y<o.y&&(l.y=s.y,l=n(e[1])),l.x+a.x>o.x+o.w&&(l.x=s.x,l=n(e[2])),l.y+a.y>o.y+o.h&&(l.y=s.y,l=n(e[3])),l.x<o.x&&(l.x=s.x,l=n(e[4])),this.showAt(l.x,l.y,!0),r.visibility="",this.focus()},ue.popupForField=function(e,n,a){var s,i,r,o,l=this
|
115
|
+
n=J(n),e=J(e),l.inputField=n,l.dateFormat=a,l.selection.type==t.SEL_SINGLE&&(s=/input|textarea/i.test(n.tagName)?n.value:n.innerText||n.textContent,s&&(i=/(^|[^%])%[bBmo]/.exec(a),r=/(^|[^%])%[de]/.exec(a),i&&r&&(o=i.index<r.index),s=Calendar.parseDate(s,o),s&&(l.selection.set(s,!1,!0),l.args.showTime&&(l.setHours(s.getHours()),l.setMinutes(s.getMinutes())),l.moveTo(s)))),l.popup(e)},ue.manageFields=function(t,e,n){var a=this
|
116
|
+
e=J(e),t=J(t),/^button$/i.test(t.tagName)&&t.setAttribute("type","button"),B(t,"click",function(s){return a.popupForField(t,e,n),N(s)})},ue.callHooks=function(t){for(var e=U(arguments,1),n=this.handlers[t],a=0;a<n.length;++a)n[a].apply(this,e)},ue.addEventListener=function(t,e){this.handlers[t].push(e)},ue.removeEventListener=function(t,e){for(var n=this.handlers[t],a=n.length;--a>=0;)n[a]===e&&n.splice(a,1)},ue.getTime=function(){return this.time},ue.setTime=function(t,e){var n,a,s,i,r,o
|
117
|
+
this.args.showTime&&(t=null!=t?t:this.time,this.time=t,n=this.getHours(),a=this.getMinutes(),s=12>n,this.args.showTime==12&&(0==n&&(n=12),n>12&&(n-=12),this.els.timeAM.innerHTML=_(s?"AM":"PM")),10>n&&(n="0"+n),10>a&&(a="0"+a),this.els.timeHour.innerHTML=n,this.els.timeMinute.innerHTML=a,e||(this.callHooks("onTimeChange",this,t),i=this.inputField,r=this.selection,i&&(o=r.print(this.dateFormat),/input|textarea/i.test(i.tagName)?i.value=o:i.innerHTML=o)))},ue.getHours=function(){return Math.floor(this.time/100)},ue.getMinutes=function(){return this.time%100},ue.setHours=function(t){0>t&&(t+=24),this.setTime(100*(t%24)+this.time%100)},ue.setMinutes=function(t){0>t&&(t+=60),t=Math.floor(t/this.args.minuteStep)*this.args.minuteStep,this.setTime(100*this.getHours()+t%60)},ue._getInputYear=function(){var t=parseInt(this.els.yearInput.value,10)
|
118
|
+
return isNaN(t)&&(t=this.date.getFullYear()),t},ue._showTooltip=function(t){var e,n="",a=this.els.tooltip
|
119
|
+
t&&(t=A(t),e=this.args.dateInfo(t),e&&e.tooltip&&(n="<div class='DynarchCalendar-tooltipCont'>"+S(t,e.tooltip)+"</div>")),a.innerHTML=n},Q=" align='center' cellspacing='0' cellpadding='0'",Z={"DynarchCalendar-topCont":"topCont","DynarchCalendar-focusLink":"focusLink",DynarchCalendar:"main","DynarchCalendar-topBar":"topBar","DynarchCalendar-title":"title","DynarchCalendar-dayNames":"dayNames","DynarchCalendar-body":"body","DynarchCalendar-menu":"menu","DynarchCalendar-menu-year":"yearInput","DynarchCalendar-bottomBar":"bottomBar","DynarchCalendar-tooltip":"tooltip","DynarchCalendar-time-hour":"timeHour","DynarchCalendar-time-minute":"timeMinute","DynarchCalendar-time-am":"timeAM","DynarchCalendar-navBtn DynarchCalendar-prevYear":"navPrevYear","DynarchCalendar-navBtn DynarchCalendar-nextYear":"navNextYear","DynarchCalendar-navBtn DynarchCalendar-prevMonth":"navPrevMonth","DynarchCalendar-navBtn DynarchCalendar-nextMonth":"navNextMonth"},te={"-3":"backYear","-2":"back",0:"now",2:"fwd",3:"fwdYear"},ee={37:-1,38:-2,39:1,40:2},ne={33:-1,34:1},ue._getDateDiv=function(t){var e=null
|
120
|
+
if(t)try{W(this.els.body,function(n){if(n.getAttribute("dyc-date")==t)throw e=n})}catch(n){}return e},(t.Selection=function(t,e,n,a){this.type=e,this.sel=t instanceof Array?t:[t],this.onChange=O(n,a),this.cal=a}).prototype={get:function(){return this.type==t.SEL_SINGLE?this.sel[0]:this.sel},isEmpty:function(){return this.sel.length==0},set:function(e,n,a){var s=this.type==t.SEL_SINGLE
|
121
|
+
e instanceof Array?(this.sel=e,this.normalize(),a||this.onChange(this)):(e=L(e),s||!this.isSelected(e)?(s?this.sel=[e]:this.sel.splice(this.findInsertPos(e),0,e),this.normalize(),a||this.onChange(this)):n&&this.unselect(e,a))},reset:function(){this.sel=[],this.set.apply(this,arguments)},countDays:function(){for(var t,e,n,a=0,s=this.sel,i=s.length;--i>=0;)t=s[i],t instanceof Array&&(e=A(t[0]),n=A(t[1]),a+=Math.round(Math.abs(n.getTime()-e.getTime())/864e5)),++a
|
122
|
+
return a},unselect:function(t,e){var n,a,s,i,r,o,l
|
123
|
+
for(t=L(t),n=!1,s=this.sel,i=s.length;--i>=0;)a=s[i],a instanceof Array?t<a[0]||t>a[1]||(r=A(t),o=r.getDate(),t==a[0]?(r.setDate(o+1),a[0]=L(r),n=!0):t==a[1]?(r.setDate(o-1),a[1]=L(r),n=!0):(l=new Date(r),l.setDate(o+1),r.setDate(o-1),s.splice(i+1,0,[L(l),a[1]]),a[1]=L(r),n=!0)):t==a&&(s.splice(i,1),n=!0)
|
124
|
+
n&&(this.normalize(),e||this.onChange(this))},normalize:function(){var t,e,n,a,s,i,r
|
125
|
+
for(this.sel=this.sel.sort(function(t,e){return t instanceof Array&&(t=t[0]),e instanceof Array&&(e=e[0]),t-e}),n=this.sel,a=n.length;--a>=0;){if(t=n[a],t instanceof Array){if(t[0]>t[1]){n.splice(a,1)
|
126
|
+
continue}t[0]==t[1]&&(t=n[a]=t[0])}e&&(s=e,i=t instanceof Array?t[1]:t,i=A(i),i.setDate(i.getDate()+1),i=L(i),s>i||(r=n[a+1],t instanceof Array&&r instanceof Array?(t[1]=r[1],n.splice(a+1,1)):t instanceof Array?(t[1]=e,n.splice(a+1,1)):r instanceof Array?(r[0]=t,n.splice(a,1)):(n[a]=[t,r],n.splice(a+1,1)))),e=t instanceof Array?t[0]:t}},findInsertPos:function(t){for(var e,n=this.sel,a=n.length;--a>=0&&(e=n[a],e instanceof Array&&(e=e[0]),t<e););return a+1},clear:function(t){this.sel=[],t||this.onChange(this)},selectRange:function(e,n){var a,s
|
127
|
+
if(e=L(e),n=L(n),e>n&&(a=e,e=n,n=a),s=this.cal.args.checkRange,!s)return this._do_selectRange(e,n)
|
128
|
+
try{q(new t.Selection([[e,n]],t.SEL_MULTIPLE,se).getDates(),O(function(t){if(this.isDisabled(t))throw s instanceof Function&&s(t,this),"OUT"},this.cal)),this._do_selectRange(e,n)}catch(i){}},_do_selectRange:function(t,e){this.sel.push([t,e]),this.normalize(),this.onChange(this)},isSelected:function(t){for(var e,n=this.sel.length;--n>=0;)if(e=this.sel[n],e instanceof Array&&t>=e[0]&&t<=e[1]||t==e)return!0
|
129
|
+
return!1},getFirstDate:function(){var t=this.sel[0]
|
130
|
+
return t&&t instanceof Array&&(t=t[0]),t},getLastDate:function(){if(this.sel.length>0){var t=this.sel[this.sel.length-1]
|
131
|
+
return t&&t instanceof Array&&(t=t[1]),t}},print:function(t,e){var n,a=[],s=0,i=this.cal.getHours(),r=this.cal.getMinutes()
|
132
|
+
for(e||(e=" -> ");s<this.sel.length;)n=this.sel[s++],n instanceof Array?a.push(S(A(n[0],i,r),t)+e+S(A(n[1],i,r),t)):a.push(S(A(n,i,r),t))
|
133
|
+
return a},getDates:function(t){for(var e,n,a=[],s=0;s<this.sel.length;){if(n=this.sel[s++],n instanceof Array)for(e=A(n[0]),n=n[1];L(e)<n;)a.push(t?S(e,t):new Date(e)),e.setDate(e.getDate()+1)
|
134
|
+
else e=A(n)
|
135
|
+
a.push(t?S(e,t):e)}return a}},t.isUnicodeLetter=function(t){return t.toUpperCase()!=t.toLowerCase()},t.parseDate=function(e,n,a){var s,i,r,o,l,c,h,u,d,f,y
|
136
|
+
if(!/\S/.test(e))return""
|
137
|
+
for(e=e.replace(/^\s+/,"").replace(/\s+$/,""),a=a||new Date,s=null,i=null,r=null,o=null,l=null,c=null,h=e.match(/([0-9]{1,2}):([0-9]{1,2})(:[0-9]{1,2})?\s*(am|pm)?/i),h&&(o=parseInt(h[1],10),l=parseInt(h[2],10),c=h[3]?parseInt(h[3].substr(1),10):0,e=e.substring(0,h.index)+e.substr(h.index+h[0].length),h[4]&&(h[4].toLowerCase()=="pm"&&12>o?o+=12:h[4].toLowerCase()!="am"||12>o||(o-=12))),u=function(){function n(){return e.charAt(l++)}function a(){return e.charAt(l)}function s(t){for(;a()&&h(a());)t+=n()
|
138
|
+
return t}function i(){for(var t="";a()&&/[0-9]/.test(a());)t+=n()
|
139
|
+
return h(a())?s(t):parseInt(t,10)}function r(t){c.push(t)}for(var o,l=0,c=[],h=t.isUnicodeLetter;l<e.length;)o=a(),h(o)?r(s("")):/[0-9]/.test(o)?r(i()):n()
|
140
|
+
return c}(),d=[],f=0;f<u.length;++f)y=u[f],/^[0-9]{4}$/.test(y)?(s=parseInt(y,10),null==i&&null==r&&null==n&&(n=!0)):/^[0-9]{1,2}$/.test(y)?(y=parseInt(y,10),60>y?0>y||y>12?1>y||y>31||(r=y):d.push(y):s=y):null==i&&(i=I(y))
|
141
|
+
return d.length<2?d.length==1&&(null==r?r=d.shift():null==i&&(i=d.shift())):n?(null==i&&(i=d.shift()),null==r&&(r=d.shift())):(null==r&&(r=d.shift()),null==i&&(i=d.shift())),null==s&&(s=d.length>0?d.shift():a.getFullYear()),30>s?s+=2e3:99>s&&(s+=1900),null==i&&(i=a.getMonth()+1),null!=s&&null!=i&&null!=r?new Date(s,i-1,r,o,l,c):null},ae={elastic_b:function(t){return 1-Math.cos(5.5*-t*Math.PI)/Math.pow(2,7*t)},magnetic:function(t){return 1-Math.cos(10.5*t*t*t*Math.PI)/Math.exp(4*t)},accel_b:function(t){return t=1-t,1-t*t*t*t},accel_a:function(t){return t*t*t},accel_ab:function(t){return t=1-t,1-Math.sin(t*t*Math.PI/2)},accel_ab2:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},brakes:function(t){return t=1-t,1-Math.sin(t*t*Math.PI)},shake:function(t){return.5>t?-Math.cos(11*t*Math.PI)*t*t:(t=1-t,Math.cos(11*t*Math.PI)*t*t)}},se=Function(),t}()
|
@@ -0,0 +1,61 @@
|
|
1
|
+
Calendar.LANG("cn", "中文", {
|
2
|
+
|
3
|
+
fdow: 1, // first day of week for this locale; 0 = Sunday, 1 = Monday, etc.
|
4
|
+
|
5
|
+
goToday: "今天",
|
6
|
+
|
7
|
+
today: "今天", // appears in bottom bar
|
8
|
+
|
9
|
+
wk: "周",
|
10
|
+
|
11
|
+
weekend: "0,6", // 0 = Sunday, 1 = Monday, etc.
|
12
|
+
|
13
|
+
AM: "AM",
|
14
|
+
|
15
|
+
PM: "PM",
|
16
|
+
|
17
|
+
mn : [ "一月",
|
18
|
+
"二月",
|
19
|
+
"三月",
|
20
|
+
"四月",
|
21
|
+
"五月",
|
22
|
+
"六月",
|
23
|
+
"七月",
|
24
|
+
"八月",
|
25
|
+
"九月",
|
26
|
+
"十月",
|
27
|
+
"十一月",
|
28
|
+
"十二月"],
|
29
|
+
|
30
|
+
smn : [ "一月",
|
31
|
+
"二月",
|
32
|
+
"三月",
|
33
|
+
"四月",
|
34
|
+
"五月",
|
35
|
+
"六月",
|
36
|
+
"七月",
|
37
|
+
"八月",
|
38
|
+
"九月",
|
39
|
+
"十月",
|
40
|
+
"十一月",
|
41
|
+
"十二月"],
|
42
|
+
|
43
|
+
dn : [ "日",
|
44
|
+
"一",
|
45
|
+
"二",
|
46
|
+
"三",
|
47
|
+
"四",
|
48
|
+
"五",
|
49
|
+
"六",
|
50
|
+
"日" ],
|
51
|
+
|
52
|
+
sdn : [ "日",
|
53
|
+
"一",
|
54
|
+
"二",
|
55
|
+
"三",
|
56
|
+
"四",
|
57
|
+
"五",
|
58
|
+
"六",
|
59
|
+
"日" ]
|
60
|
+
|
61
|
+
});
|
@@ -0,0 +1,61 @@
|
|
1
|
+
Calendar.LANG("en", "English", {
|
2
|
+
|
3
|
+
fdow: 1, // first day of week for this locale; 0 = Sunday, 1 = Monday, etc.
|
4
|
+
|
5
|
+
goToday: "Go Today",
|
6
|
+
|
7
|
+
today: "Today", // appears in bottom bar
|
8
|
+
|
9
|
+
wk: "wk",
|
10
|
+
|
11
|
+
weekend: "0,6", // 0 = Sunday, 1 = Monday, etc.
|
12
|
+
|
13
|
+
AM: "am",
|
14
|
+
|
15
|
+
PM: "pm",
|
16
|
+
|
17
|
+
mn : [ "January",
|
18
|
+
"February",
|
19
|
+
"March",
|
20
|
+
"April",
|
21
|
+
"May",
|
22
|
+
"June",
|
23
|
+
"July",
|
24
|
+
"August",
|
25
|
+
"September",
|
26
|
+
"October",
|
27
|
+
"November",
|
28
|
+
"December" ],
|
29
|
+
|
30
|
+
smn : [ "Jan",
|
31
|
+
"Feb",
|
32
|
+
"Mar",
|
33
|
+
"Apr",
|
34
|
+
"May",
|
35
|
+
"Jun",
|
36
|
+
"Jul",
|
37
|
+
"Aug",
|
38
|
+
"Sep",
|
39
|
+
"Oct",
|
40
|
+
"Nov",
|
41
|
+
"Dec" ],
|
42
|
+
|
43
|
+
dn : [ "Sunday",
|
44
|
+
"Monday",
|
45
|
+
"Tuesday",
|
46
|
+
"Wednesday",
|
47
|
+
"Thursday",
|
48
|
+
"Friday",
|
49
|
+
"Saturday",
|
50
|
+
"Sunday" ],
|
51
|
+
|
52
|
+
sdn : [ "Su",
|
53
|
+
"Mo",
|
54
|
+
"Tu",
|
55
|
+
"We",
|
56
|
+
"Th",
|
57
|
+
"Fr",
|
58
|
+
"Sa",
|
59
|
+
"Su" ]
|
60
|
+
|
61
|
+
});
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/* This is for Gecko-based browsers */
|
2
|
+
|
3
|
+
.DynarchCalendar {
|
4
|
+
-moz-border-radius: 5px;
|
5
|
+
-webkit-border-radius: 5px;
|
6
|
+
border-radius: 5px;
|
7
|
+
}
|
8
|
+
|
9
|
+
.DynarchCalendar-title, .DynarchCalendar-title div {
|
10
|
+
-moz-border-radius: 0 0 4px 4px;
|
11
|
+
-webkit-border-radius: 0 0 4px 4px;
|
12
|
+
border-radius: 0 0 4px 4px;
|
13
|
+
}
|
14
|
+
|
15
|
+
.DynarchCalendar-topBar {
|
16
|
+
-moz-border-radius: 4px 4px 0 0;
|
17
|
+
-webkit-border-radius: 4px;
|
18
|
+
border-radius: 4px 4px 0 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.DynarchCalendar-bottomBar {
|
22
|
+
-moz-border-radius: 0 0 4px 4px;
|
23
|
+
-webkit-border-radius: 0 0 4px 4px;
|
24
|
+
border-radius: 0 0 4px 4px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.DynarchCalendar-bottomBar-today {
|
28
|
+
-moz-border-radius: 4px;
|
29
|
+
-webkit-border-radius: 4px;
|
30
|
+
border-radius: 4px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.DynarchCalendar-navBtn, .DynarchCalendar-navBtn div {
|
34
|
+
-moz-border-radius: 4px;
|
35
|
+
-webkit-border-radius: 4px;
|
36
|
+
border-radius: 4px;
|
37
|
+
}
|
38
|
+
|
39
|
+
.DynarchCalendar-menu {
|
40
|
+
-moz-border-radius: 5px;
|
41
|
+
-webkit-border-radius: 5px;
|
42
|
+
border-radius: 5px;
|
43
|
+
}
|
44
|
+
|
45
|
+
.DynarchCalendar-menu table td div {
|
46
|
+
-moz-border-radius: 4px;
|
47
|
+
-webkit-border-radius: 4px;
|
48
|
+
border-radius: 4px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.DynarchCalendar-weekNumber {
|
52
|
+
-moz-border-radius: 4px 0 0 4px;
|
53
|
+
-webkit-border-radius: 4px 0 0 4px;
|
54
|
+
border-radius: 4px 0 0 4px;
|
55
|
+
}
|
56
|
+
|
57
|
+
.DynarchCalendar-day {
|
58
|
+
-moz-border-radius: 4px;
|
59
|
+
-webkit-border-radius: 4px;
|
60
|
+
border-radius: 4px;
|
61
|
+
}
|
62
|
+
|
63
|
+
.DynarchCalendar-day-disabled {
|
64
|
+
-moz-border-radius: 0;
|
65
|
+
-webkit-border-radius: 0;
|
66
|
+
border-radius: 0;
|
67
|
+
}
|
68
|
+
|
69
|
+
.DynarchCalendar-tooltipCont {
|
70
|
+
-moz-border-radius: 0 0 5px 5px;
|
71
|
+
-webkit-border-radius: 5px;
|
72
|
+
}
|
73
|
+
|
74
|
+
.DynarchCalendar-time-hour, .DynarchCalendar-time-minute {
|
75
|
+
-moz-border-radius: 3px 0 0 3px;
|
76
|
+
-webkit-border-radius: 3px;
|
77
|
+
}
|
78
|
+
|
79
|
+
.DynarchCalendar-time-am {
|
80
|
+
-moz-border-radius: 3px;
|
81
|
+
-webkit-border-radius: 3px;
|
82
|
+
}
|
@@ -0,0 +1,357 @@
|
|
1
|
+
/*
|
2
|
+
*= require_self
|
3
|
+
*= require jscal2/steel/steel
|
4
|
+
*= require jscal2/border-radius
|
5
|
+
*/
|
6
|
+
|
7
|
+
/* CSS */
|
8
|
+
|
9
|
+
.DynarchCalendar {
|
10
|
+
border: 1px solid #aaa;
|
11
|
+
-moz-user-select: none;
|
12
|
+
-webkit-user-select: none;
|
13
|
+
user-select: none;
|
14
|
+
background: #e8e8e8;
|
15
|
+
font: 11px "lucida grande",tahoma,verdana,sans-serif;
|
16
|
+
line-height: 14px;
|
17
|
+
position: relative;
|
18
|
+
cursor: default;
|
19
|
+
}
|
20
|
+
|
21
|
+
.DynarchCalendar table {
|
22
|
+
border-collapse: collapse;
|
23
|
+
font: 11px "lucida grande",tahoma,verdana,sans-serif;
|
24
|
+
line-height: 14px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.DynarchCalendar-topBar {
|
28
|
+
border-bottom: 1px solid #aaa;
|
29
|
+
background: #ddd;
|
30
|
+
padding: 5px 0 0 0;
|
31
|
+
}
|
32
|
+
|
33
|
+
table.DynarchCalendar-titleCont {
|
34
|
+
font-size: 130%; font-weight: bold;
|
35
|
+
color: #444;
|
36
|
+
text-align: center;
|
37
|
+
z-index: 9;
|
38
|
+
position: relative;
|
39
|
+
margin-top: -6px;
|
40
|
+
}
|
41
|
+
|
42
|
+
.DynarchCalendar-title div {
|
43
|
+
padding: 5px 17px;
|
44
|
+
text-shadow: 1px 1px 1px #777;
|
45
|
+
}
|
46
|
+
.DynarchCalendar-hover-title div {
|
47
|
+
background-color: #fff;
|
48
|
+
border: 1px solid #000;
|
49
|
+
padding: 4px 16px;
|
50
|
+
background-image: url("<%=asset_path 'jscal2/drop-down.gif'%>");
|
51
|
+
background-repeat: no-repeat;
|
52
|
+
background-position: 100% 50%;
|
53
|
+
}
|
54
|
+
.DynarchCalendar-pressed-title div {
|
55
|
+
border: 1px solid #000;
|
56
|
+
padding: 4px 16px;
|
57
|
+
background-color: #777;
|
58
|
+
color: #fff;
|
59
|
+
background-image: url("<%=asset_path 'jscal2/drop-up.gif'%>");
|
60
|
+
background-repeat: no-repeat;
|
61
|
+
background-position: 100% 50%;
|
62
|
+
}
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
.DynarchCalendar-bottomBar {
|
70
|
+
border-top: 1px solid #aaa;
|
71
|
+
background: #ddd;
|
72
|
+
padding: 2px;
|
73
|
+
position: relative;
|
74
|
+
text-align: center;
|
75
|
+
}
|
76
|
+
|
77
|
+
.DynarchCalendar-bottomBar-today {
|
78
|
+
padding: 2px 15px;
|
79
|
+
}
|
80
|
+
|
81
|
+
.DynarchCalendar-hover-bottomBar-today {
|
82
|
+
border: 1px solid #000;
|
83
|
+
background-color: #fff;
|
84
|
+
padding: 1px 14px;
|
85
|
+
}
|
86
|
+
.DynarchCalendar-pressed-bottomBar-today {
|
87
|
+
border: 1px solid #000;
|
88
|
+
background-color: #777;
|
89
|
+
color: #fff;
|
90
|
+
padding: 1px 14px;
|
91
|
+
}
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
.DynarchCalendar-body {
|
99
|
+
position: relative;
|
100
|
+
overflow: hidden;
|
101
|
+
padding-top: 5px;
|
102
|
+
padding-bottom: 5px;
|
103
|
+
}
|
104
|
+
|
105
|
+
.DynarchCalendar-first-col { padding-left: 5px; }
|
106
|
+
.DynarchCalendar-last-col { padding-right: 5px; }
|
107
|
+
|
108
|
+
.DynarchCalendar-animBody-backYear {
|
109
|
+
position: absolute;
|
110
|
+
top: -100%;
|
111
|
+
left: 0;
|
112
|
+
}
|
113
|
+
.DynarchCalendar-animBody-back {
|
114
|
+
position: absolute;
|
115
|
+
top: 5px;
|
116
|
+
left: -100%;
|
117
|
+
}
|
118
|
+
.DynarchCalendar-animBody-fwd {
|
119
|
+
position: absolute;
|
120
|
+
top: 5px;
|
121
|
+
left: 100%;
|
122
|
+
}
|
123
|
+
.DynarchCalendar-animBody-now {
|
124
|
+
position: absolute;
|
125
|
+
top: 5px;
|
126
|
+
left: 0;
|
127
|
+
}
|
128
|
+
.DynarchCalendar-animBody-fwdYear {
|
129
|
+
position: absolute;
|
130
|
+
top: 100%;
|
131
|
+
left: 0;
|
132
|
+
}
|
133
|
+
|
134
|
+
.DynarchCalendar-dayNames {
|
135
|
+
padding-left: 5px;
|
136
|
+
padding-right: 5px;
|
137
|
+
}
|
138
|
+
|
139
|
+
.DynarchCalendar-dayNames div { font-weight: bold; color: #444; text-shadow: 1px 1px 1px #777; }
|
140
|
+
|
141
|
+
.DynarchCalendar-navBtn {
|
142
|
+
position: absolute;
|
143
|
+
top: 5px;
|
144
|
+
z-index: 10;
|
145
|
+
}
|
146
|
+
|
147
|
+
.DynarchCalendar-navBtn div {
|
148
|
+
background-repeat: no-repeat;
|
149
|
+
background-position: 50% 50%;
|
150
|
+
height: 15px;
|
151
|
+
width: 16px;
|
152
|
+
padding: 1px;
|
153
|
+
}
|
154
|
+
.DynarchCalendar-hover-navBtn div {
|
155
|
+
border: 1px solid #000;
|
156
|
+
padding: 0;
|
157
|
+
background-color: #fff;
|
158
|
+
}
|
159
|
+
.DynarchCalendar-navDisabled {
|
160
|
+
opacity: 0.3;
|
161
|
+
filter: alpha(opacity=30);
|
162
|
+
}
|
163
|
+
.DynarchCalendar-pressed-navBtn div {
|
164
|
+
border: 1px solid #000;
|
165
|
+
padding: 0;
|
166
|
+
background-color: #777;
|
167
|
+
color: #fff;
|
168
|
+
}
|
169
|
+
|
170
|
+
.DynarchCalendar-prevMonth {
|
171
|
+
left: 25px;
|
172
|
+
}
|
173
|
+
|
174
|
+
.DynarchCalendar-nextMonth {
|
175
|
+
left: 100%;
|
176
|
+
margin-left: -43px;
|
177
|
+
}
|
178
|
+
|
179
|
+
.DynarchCalendar-prevYear {
|
180
|
+
left: 5px;
|
181
|
+
}
|
182
|
+
|
183
|
+
.DynarchCalendar-nextYear {
|
184
|
+
left: 100%;
|
185
|
+
margin-left: -23px;
|
186
|
+
}
|
187
|
+
|
188
|
+
.DynarchCalendar-prevMonth div {
|
189
|
+
background-image: url("<%=asset_path 'jscal2/nav-left.gif'%>");
|
190
|
+
}
|
191
|
+
|
192
|
+
.DynarchCalendar-nextMonth div {
|
193
|
+
background-image: url("<%=asset_path 'jscal2/nav-right.gif'%>");
|
194
|
+
}
|
195
|
+
|
196
|
+
.DynarchCalendar-prevYear div {
|
197
|
+
background-image: url("<%=asset_path 'jscal2/nav-left-x2.gif'%>");
|
198
|
+
}
|
199
|
+
|
200
|
+
.DynarchCalendar-nextYear div {
|
201
|
+
background-image: url("<%=asset_path 'jscal2/nav-right-x2.gif'%>");
|
202
|
+
}
|
203
|
+
|
204
|
+
.DynarchCalendar-menu {
|
205
|
+
position: absolute;
|
206
|
+
left: 0;
|
207
|
+
top: 0;
|
208
|
+
width: 100%;
|
209
|
+
height: 100%;
|
210
|
+
background-color: #ddd;
|
211
|
+
overflow: hidden;
|
212
|
+
opacity: 0.85;
|
213
|
+
filter: alpha(opacity=85);
|
214
|
+
}
|
215
|
+
|
216
|
+
.DynarchCalendar-menu table td div {
|
217
|
+
text-align: center;
|
218
|
+
font-weight: bold;
|
219
|
+
padding: 3px 5px;
|
220
|
+
}
|
221
|
+
.DynarchCalendar-menu table td div.DynarchCalendar-menu-month {
|
222
|
+
width: 4em;
|
223
|
+
text-align: center;
|
224
|
+
}
|
225
|
+
.DynarchCalendar-menu table td div.DynarchCalendar-hover-navBtn {
|
226
|
+
border: 1px solid #000;
|
227
|
+
padding: 2px 4px;
|
228
|
+
background-color: #fff;
|
229
|
+
color: #000;
|
230
|
+
}
|
231
|
+
.DynarchCalendar-menu table td div.DynarchCalendar-pressed-navBtn {
|
232
|
+
border: 1px solid #000;
|
233
|
+
padding: 2px 4px;
|
234
|
+
background-color: #777;
|
235
|
+
color: #fff !important;
|
236
|
+
}
|
237
|
+
|
238
|
+
.DynarchCalendar-menu-year {
|
239
|
+
text-align: center;
|
240
|
+
font: 16px "lucida grande",tahoma,verdana,sans-serif;
|
241
|
+
font-weight: bold;
|
242
|
+
}
|
243
|
+
|
244
|
+
.DynarchCalendar-menu-sep {
|
245
|
+
height: 1px; font-size: 1px; line-height: 1px;
|
246
|
+
overflow: hidden;
|
247
|
+
border-top: 1px solid #888;
|
248
|
+
background: #fff;
|
249
|
+
margin-top: 4px; margin-bottom: 3px;
|
250
|
+
}
|
251
|
+
|
252
|
+
.DynarchCalendar-time td { font-weight: bold; font-size: 120%; }
|
253
|
+
.DynarchCalendar-time-hour, .DynarchCalendar-time-minute { padding: 1px 3px; }
|
254
|
+
.DynarchCalendar-time-down { background: url("<%=asset_path 'jscal2/time-down.png'%>") no-repeat 50% 50%; width: 11px; height: 8px; opacity: 0.5; }
|
255
|
+
.DynarchCalendar-time-up { background: url("<%=asset_path 'jscal2/time-up.png'%>") no-repeat 50% 50%; width: 11px; height: 8px; opacity: 0.5; }
|
256
|
+
.DynarchCalendar-time-sep { padding: 0 2px; }
|
257
|
+
.DynarchCalendar-hover-time { background-color: #444; color: #fff; opacity: 1; }
|
258
|
+
.DynarchCalendar-pressed-time { background-color: #000; color: #fff; opacity: 1; }
|
259
|
+
.DynarchCalendar-time-am { padding: 1px; width: 2.5em; text-align: center; }
|
260
|
+
|
261
|
+
/* body */
|
262
|
+
|
263
|
+
.DynarchCalendar-hover-week { background-color: #ddd; }
|
264
|
+
|
265
|
+
.DynarchCalendar-dayNames div, .DynarchCalendar-day, .DynarchCalendar-weekNumber {
|
266
|
+
width: 1.7em;
|
267
|
+
padding: 3px 4px;
|
268
|
+
text-align: center;
|
269
|
+
}
|
270
|
+
.DynarchCalendar-weekNumber {
|
271
|
+
border-right: 1px solid #aaa;
|
272
|
+
margin-right: 4px;
|
273
|
+
width: 2em !important;
|
274
|
+
padding-right: 8px !important;
|
275
|
+
}
|
276
|
+
|
277
|
+
.DynarchCalendar-day {
|
278
|
+
text-align: right; color: #222;
|
279
|
+
}
|
280
|
+
.DynarchCalendar-day-othermonth { color: #888; }
|
281
|
+
.DynarchCalendar-weekend { color: #c22; }
|
282
|
+
.DynarchCalendar-day-today { color: #00f; font-weight: bold; }
|
283
|
+
|
284
|
+
.DynarchCalendar-day-disabled {
|
285
|
+
opacity: 0.5;
|
286
|
+
text-shadow: 2px 1px 1px #fff;
|
287
|
+
}
|
288
|
+
|
289
|
+
.DynarchCalendar-hover-date {
|
290
|
+
padding: 2px 3px;
|
291
|
+
background-color: #eef;
|
292
|
+
border: 1px solid #88c;
|
293
|
+
margin: 0 !important;
|
294
|
+
color: #000;
|
295
|
+
}
|
296
|
+
|
297
|
+
.DynarchCalendar-day-othermonth.DynarchCalendar-hover-date { border-color: #aaa; color: #888; }
|
298
|
+
|
299
|
+
.DynarchCalendar-dayNames .DynarchCalendar-weekend { color: #c22; }
|
300
|
+
.DynarchCalendar-day-othermonth.DynarchCalendar-weekend { color: #d88; }
|
301
|
+
|
302
|
+
.DynarchCalendar-day-selected {
|
303
|
+
padding: 2px 3px;
|
304
|
+
margin: 1px;
|
305
|
+
background-color: #aaa;
|
306
|
+
color: #000 !important;
|
307
|
+
}
|
308
|
+
.DynarchCalendar-day-today.DynarchCalendar-day-selected { background-color: #999; }
|
309
|
+
|
310
|
+
/* focus */
|
311
|
+
|
312
|
+
.DynarchCalendar-focusLink {
|
313
|
+
position: absolute;
|
314
|
+
opacity: 0;
|
315
|
+
filter: alpha(opacity=0);
|
316
|
+
}
|
317
|
+
|
318
|
+
.DynarchCalendar-focused {
|
319
|
+
border-color: #000;
|
320
|
+
}
|
321
|
+
|
322
|
+
.DynarchCalendar-focused .DynarchCalendar-topBar, .DynarchCalendar-focused .DynarchCalendar-bottomBar {
|
323
|
+
background-color: #ccc;
|
324
|
+
border-color: #336;
|
325
|
+
}
|
326
|
+
|
327
|
+
.DynarchCalendar-focused .DynarchCalendar-hover-week {
|
328
|
+
background-color: #ccc;
|
329
|
+
}
|
330
|
+
|
331
|
+
.DynarchCalendar-tooltip {
|
332
|
+
position: absolute;
|
333
|
+
top: 100%;
|
334
|
+
width: 100%;
|
335
|
+
}
|
336
|
+
|
337
|
+
.DynarchCalendar-tooltipCont {
|
338
|
+
margin: 0 5px 0 5px;
|
339
|
+
border: 1px solid #aaa;
|
340
|
+
border-top: 0;
|
341
|
+
padding: 3px 6px;
|
342
|
+
background: #ddd;
|
343
|
+
}
|
344
|
+
|
345
|
+
.DynarchCalendar-focused .DynarchCalendar-tooltipCont {
|
346
|
+
background: #ccc;
|
347
|
+
border-color: #000;
|
348
|
+
}
|
349
|
+
|
350
|
+
@media print {
|
351
|
+
.DynarchCalendar-day-selected {
|
352
|
+
padding: 2px 3px;
|
353
|
+
border: 1px solid #000;
|
354
|
+
margin: 0 !important;
|
355
|
+
}
|
356
|
+
}
|
357
|
+
|
@@ -0,0 +1,63 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
.DynarchCalendar-focused {
|
4
|
+
background-color: #fff;
|
5
|
+
}
|
6
|
+
|
7
|
+
.DynarchCalendar-topBar {
|
8
|
+
background: url("<%=asset_path 'jscal2/steel/brushed-steel.jpg'%>") no-repeat 50% 0;
|
9
|
+
}
|
10
|
+
|
11
|
+
.DynarchCalendar-bottomBar {
|
12
|
+
background: url("<%=asset_path 'jscal2/steel/brushed-steel.jpg'%>") no-repeat 50% 50%;
|
13
|
+
}
|
14
|
+
|
15
|
+
.DynarchCalendar-hover-title,
|
16
|
+
.DynarchCalendar-hover-navBtn,
|
17
|
+
.DynarchCalendar-hover-bottomBar-today,
|
18
|
+
.DynarchCalendar-menu table td div.DynarchCalendar-hover-navBtn {
|
19
|
+
background: #dde url("<%=asset_path 'jscal2/steel/coolbg.png'%>") repeat-x 0 50%;
|
20
|
+
}
|
21
|
+
.DynarchCalendar-hover-title div,
|
22
|
+
.DynarchCalendar-hover-navBtn div { background-color: transparent; }
|
23
|
+
|
24
|
+
.DynarchCalendar-pressed-title,
|
25
|
+
.DynarchCalendar-pressed-navBtn,
|
26
|
+
.DynarchCalendar-pressed-bottomBar-today,
|
27
|
+
.DynarchCalendar-menu table td div.DynarchCalendar-pressed-navBtn {
|
28
|
+
background: #445 url("<%=asset_path 'jscal2/steel/coolbg.png'%>") repeat-x 0 50%;
|
29
|
+
}
|
30
|
+
.DynarchCalendar-pressed-title div,
|
31
|
+
.DynarchCalendar-pressed-navBtn div { background-color: transparent; }
|
32
|
+
|
33
|
+
.DynarchCalendar-hover-week,
|
34
|
+
.DynarchCalendar-focused .DynarchCalendar-hover-week {
|
35
|
+
background: #ddd url("<%=asset_path 'jscal2/steel/coolbg.png'%>") repeat-x 0 50%;
|
36
|
+
}
|
37
|
+
|
38
|
+
.DynarchCalendar {
|
39
|
+
background: url("<%=asset_path 'jscal2/steel/steel.jpg'%>") no-repeat 50% 30px;
|
40
|
+
}
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
.DynarchCalendar-day-selected {
|
49
|
+
background-color: #1864fc;
|
50
|
+
color: #fff !important;
|
51
|
+
background-image: url("coolbg.png");
|
52
|
+
background-position: 0 50%;
|
53
|
+
background-repeat: repeat-x;
|
54
|
+
}
|
55
|
+
|
56
|
+
.DynarchCalendar-day-today.DynarchCalendar-day-selected {
|
57
|
+
background-color: #1864fc;
|
58
|
+
color: #fff !important;
|
59
|
+
}
|
60
|
+
|
61
|
+
.DynarchCalendar-focused .DynarchCalendar-body {
|
62
|
+
background: url("<%=asset_path 'jscal2/shadow-b.png'%>") repeat-x 0 0;
|
63
|
+
}
|
data/lib/jscal2/rails.rb
ADDED
metadata
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jscal2-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- John Chen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: This is a popup or flat DHTML calendar suitable for selecting date/time.
|
42
|
+
email:
|
43
|
+
- cgg5207@sina.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- LICENSE.txt
|
49
|
+
- README.md
|
50
|
+
- app/assets/images/jscal2/nav-left-x2.gif
|
51
|
+
- app/assets/images/jscal2/nav-left.gif
|
52
|
+
- app/assets/images/jscal2/nav-right-x2.gif
|
53
|
+
- app/assets/images/jscal2/nav-right.gif
|
54
|
+
- app/assets/images/jscal2/shadow-b.png
|
55
|
+
- app/assets/images/jscal2/steel/brushed-steel.jpg
|
56
|
+
- app/assets/images/jscal2/steel/steel.css
|
57
|
+
- app/assets/images/jscal2/steel/steel.jpg
|
58
|
+
- app/assets/images/jscal2/time-down.png
|
59
|
+
- app/assets/images/jscal2/time-up.png
|
60
|
+
- app/assets/javascripts/jscal2/jscal2.js
|
61
|
+
- app/assets/javascripts/jscal2/lang/cn.js
|
62
|
+
- app/assets/javascripts/jscal2/lang/en.js
|
63
|
+
- app/assets/stylesheets/jscal2/border-radius.css
|
64
|
+
- app/assets/stylesheets/jscal2/jscal2.css.erb
|
65
|
+
- app/assets/stylesheets/jscal2/steel/steel.css.erb
|
66
|
+
- lib/jscal2/rails.rb
|
67
|
+
- lib/jscal2/rails/version.rb
|
68
|
+
homepage: https://github.com/growcn/jscal2-rails
|
69
|
+
licenses:
|
70
|
+
- MIT
|
71
|
+
metadata: {}
|
72
|
+
post_install_message:
|
73
|
+
rdoc_options: []
|
74
|
+
require_paths:
|
75
|
+
- lib
|
76
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
requirements: []
|
87
|
+
rubyforge_project:
|
88
|
+
rubygems_version: 2.2.2
|
89
|
+
signing_key:
|
90
|
+
specification_version: 4
|
91
|
+
summary: The calendar is implemented in pure JavaScript code.
|
92
|
+
test_files: []
|