kea-rails 2.0.0.pre.alpha5 → 2.0.0.pre.alpha6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/kea/bindings/date_picker.js +33 -0
- data/app/assets/javascripts/kea/extenders/date.js +10 -0
- data/app/assets/javascripts/kea/kea_dependencies.js +1 -0
- data/app/assets/stylesheets/kea/kea.css.sass +1 -1
- data/lib/kea-rails/version.rb +1 -1
- data/vendor/assets/components/pikaday/CHANGELOG.md +68 -0
- data/vendor/assets/components/pikaday/LICENSE +36 -0
- data/vendor/assets/components/pikaday/README.md +321 -0
- data/vendor/assets/components/pikaday/bower.json +29 -0
- data/vendor/assets/components/pikaday/component.json +17 -0
- data/vendor/assets/{stylesheets → components/pikaday/css}/pikaday.css +39 -7
- data/vendor/assets/components/pikaday/css/site.css +42 -0
- data/vendor/assets/components/pikaday/examples/amd.html +50 -0
- data/vendor/assets/components/pikaday/examples/bound-container.html +52 -0
- data/vendor/assets/components/pikaday/examples/calendars.html +57 -0
- data/vendor/assets/components/pikaday/examples/container.html +52 -0
- data/vendor/assets/components/pikaday/examples/jquery-amd.html +54 -0
- data/vendor/assets/components/pikaday/examples/jquery.html +46 -0
- data/vendor/assets/components/pikaday/examples/moment.html +53 -0
- data/vendor/assets/components/pikaday/examples/positions.html +106 -0
- data/vendor/assets/components/pikaday/examples/trigger.html +46 -0
- data/vendor/assets/components/pikaday/examples/weeknumbers.html +41 -0
- data/vendor/assets/components/pikaday/index.html +43 -0
- data/vendor/assets/components/pikaday/package.json +45 -0
- data/vendor/assets/{javascripts → components/pikaday}/pikaday.js +185 -52
- data/vendor/assets/components/pikaday/plugins/pikaday.jquery.js +52 -0
- data/vendor/assets/components/pikaday/scss/pikaday.scss +199 -0
- data/vendor/assets/components/pikaday/tests/methods.js +26 -0
- data/vendor/assets/components/pikaday/tests/module.js +24 -0
- metadata +27 -4
@@ -0,0 +1,199 @@
|
|
1
|
+
/*!
|
2
|
+
* Pikaday
|
3
|
+
* Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/
|
4
|
+
*/
|
5
|
+
|
6
|
+
.pika-single {
|
7
|
+
z-index: 9999;
|
8
|
+
display: block;
|
9
|
+
position: relative;
|
10
|
+
color: #333;
|
11
|
+
background: #fff;
|
12
|
+
border: 1px solid #ccc;
|
13
|
+
border-bottom-color: #bbb;
|
14
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
15
|
+
|
16
|
+
&.is-hidden {
|
17
|
+
display: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
&.is-bound {
|
21
|
+
position: absolute;
|
22
|
+
box-shadow: 0 5px 15px -5px rgba(0,0,0,.5);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
// clear child float (pika-lendar), using the famous micro clearfix hack
|
27
|
+
// http://nicolasgallagher.com/micro-clearfix-hack/
|
28
|
+
.pika-single {
|
29
|
+
*zoom: 1;
|
30
|
+
|
31
|
+
&:before,
|
32
|
+
&:after {
|
33
|
+
content: " ";
|
34
|
+
display: table;
|
35
|
+
}
|
36
|
+
|
37
|
+
&:after { clear: both }
|
38
|
+
}
|
39
|
+
|
40
|
+
.pika-lendar {
|
41
|
+
float: left;
|
42
|
+
width: 240px;
|
43
|
+
margin: 8px;
|
44
|
+
}
|
45
|
+
|
46
|
+
.pika-title {
|
47
|
+
position: relative;
|
48
|
+
text-align: center;
|
49
|
+
|
50
|
+
select {
|
51
|
+
cursor: pointer;
|
52
|
+
position: absolute;
|
53
|
+
z-index: 9998;
|
54
|
+
margin: 0;
|
55
|
+
left: 0;
|
56
|
+
top: 5px;
|
57
|
+
filter: alpha(opacity=0);
|
58
|
+
opacity: 0;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
.pika-label {
|
63
|
+
display: inline-block;
|
64
|
+
*display: inline;
|
65
|
+
position: relative;
|
66
|
+
z-index: 9999;
|
67
|
+
overflow: hidden;
|
68
|
+
margin: 0;
|
69
|
+
padding: 5px 3px;
|
70
|
+
font-size: 14px;
|
71
|
+
line-height: 20px;
|
72
|
+
font-weight: bold;
|
73
|
+
background-color: #fff;
|
74
|
+
}
|
75
|
+
|
76
|
+
.pika-prev,
|
77
|
+
.pika-next {
|
78
|
+
display: block;
|
79
|
+
cursor: pointer;
|
80
|
+
position: relative;
|
81
|
+
outline: none;
|
82
|
+
border: 0;
|
83
|
+
padding: 0;
|
84
|
+
width: 20px;
|
85
|
+
height: 30px;
|
86
|
+
text-indent: 20px; // hide text using text-indent trick, using width value (it's enough)
|
87
|
+
white-space: nowrap;
|
88
|
+
overflow: hidden;
|
89
|
+
background-color: transparent;
|
90
|
+
background-position: center center;
|
91
|
+
background-repeat: no-repeat;
|
92
|
+
background-size: 75% 75%;
|
93
|
+
opacity: .5;
|
94
|
+
*position: absolute;
|
95
|
+
*top: 0;
|
96
|
+
|
97
|
+
&:hover {
|
98
|
+
opacity: 1;
|
99
|
+
}
|
100
|
+
|
101
|
+
&.is-disabled {
|
102
|
+
cursor: default;
|
103
|
+
opacity: .2;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
.pika-prev,
|
108
|
+
.is-rtl .pika-next {
|
109
|
+
float: left;
|
110
|
+
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==');
|
111
|
+
*left: 0;
|
112
|
+
}
|
113
|
+
|
114
|
+
.pika-next,
|
115
|
+
.is-rtl .pika-prev {
|
116
|
+
float: right;
|
117
|
+
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=');
|
118
|
+
*right: 0;
|
119
|
+
}
|
120
|
+
|
121
|
+
.pika-select {
|
122
|
+
display: inline-block;
|
123
|
+
*display: inline;
|
124
|
+
}
|
125
|
+
|
126
|
+
.pika-table {
|
127
|
+
width: 100%;
|
128
|
+
border-collapse: collapse;
|
129
|
+
border-spacing: 0;
|
130
|
+
border: 0;
|
131
|
+
|
132
|
+
th,
|
133
|
+
td {
|
134
|
+
width: 14.285714285714286%;
|
135
|
+
padding: 0;
|
136
|
+
}
|
137
|
+
|
138
|
+
th {
|
139
|
+
color: #999;
|
140
|
+
font-size: 12px;
|
141
|
+
line-height: 25px;
|
142
|
+
font-weight: bold;
|
143
|
+
text-align: center;
|
144
|
+
}
|
145
|
+
|
146
|
+
abbr {
|
147
|
+
border-bottom: none;
|
148
|
+
cursor: help;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
.pika-button {
|
153
|
+
cursor: pointer;
|
154
|
+
display: block;
|
155
|
+
-moz-box-sizing: border-box;
|
156
|
+
box-sizing: border-box;
|
157
|
+
outline: none;
|
158
|
+
border: 0;
|
159
|
+
margin: 0;
|
160
|
+
width: 100%;
|
161
|
+
padding: 5px;
|
162
|
+
color: #666;
|
163
|
+
font-size: 12px;
|
164
|
+
line-height: 15px;
|
165
|
+
text-align: right;
|
166
|
+
background: #f5f5f5;
|
167
|
+
|
168
|
+
.is-today & {
|
169
|
+
color: #33aaff;
|
170
|
+
font-weight: bold;
|
171
|
+
}
|
172
|
+
|
173
|
+
.is-selected & {
|
174
|
+
color: #fff;
|
175
|
+
font-weight: bold;
|
176
|
+
background: #33aaff;
|
177
|
+
box-shadow: inset 0 1px 3px #178fe5;
|
178
|
+
border-radius: 3px;
|
179
|
+
}
|
180
|
+
|
181
|
+
.is-disabled & {
|
182
|
+
pointer-events: none;
|
183
|
+
cursor: default;
|
184
|
+
color: #999;
|
185
|
+
opacity: .3;
|
186
|
+
}
|
187
|
+
|
188
|
+
&:hover {
|
189
|
+
color: #fff !important;
|
190
|
+
background: #ff8000 !important;
|
191
|
+
box-shadow: none !important;
|
192
|
+
border-radius: 3px !important;
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
.pika-week {
|
197
|
+
font-size: 11px;
|
198
|
+
color: #999;
|
199
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
var Pikaday = require('../'),
|
2
|
+
expect = require('expect.js');
|
3
|
+
|
4
|
+
describe('Pikaday public method', function ()
|
5
|
+
{
|
6
|
+
'use strict';
|
7
|
+
|
8
|
+
describe('#toString()', function ()
|
9
|
+
{
|
10
|
+
it('should return empty string when date not set', function ()
|
11
|
+
{
|
12
|
+
var pikaday = new Pikaday();
|
13
|
+
expect(pikaday.toString()).to.be.empty;
|
14
|
+
});
|
15
|
+
|
16
|
+
it('should return date string, formatted by moment, when date is set', function() {
|
17
|
+
var date = new Date(2014, 3, 25),
|
18
|
+
pikaday = new Pikaday({
|
19
|
+
format: 'DD-MM-YY'
|
20
|
+
});
|
21
|
+
|
22
|
+
pikaday.setDate(date);
|
23
|
+
expect(pikaday.toString()).to.eql('25-04-14');
|
24
|
+
});
|
25
|
+
});
|
26
|
+
});
|
@@ -0,0 +1,24 @@
|
|
1
|
+
var Pikaday = require('../'),
|
2
|
+
expect = require('expect.js');
|
3
|
+
|
4
|
+
describe('Pikaday', function ()
|
5
|
+
{
|
6
|
+
'use strict';
|
7
|
+
|
8
|
+
it('should expose as a CommonJS module', function ()
|
9
|
+
{
|
10
|
+
expect(Pikaday).to.be.a('function');
|
11
|
+
});
|
12
|
+
|
13
|
+
it('should NOT leak to the global object', function ()
|
14
|
+
{
|
15
|
+
expect(window).to.not.have.property('Pikaday');
|
16
|
+
});
|
17
|
+
|
18
|
+
it('should be possible to create a new instance', function ()
|
19
|
+
{
|
20
|
+
expect(function () {
|
21
|
+
new Pikaday();
|
22
|
+
}).to.not.throwException();
|
23
|
+
});
|
24
|
+
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kea-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.
|
4
|
+
version: 2.0.0.pre.alpha6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan-Christian Foeh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- Rakefile
|
37
37
|
- app/assets/javascripts/kea/bindings/activity.js
|
38
38
|
- app/assets/javascripts/kea/bindings/child_vm.js
|
39
|
+
- app/assets/javascripts/kea/bindings/date_picker.js
|
39
40
|
- app/assets/javascripts/kea/bindings/komplete.js
|
40
41
|
- app/assets/javascripts/kea/bindings/popover.js
|
41
42
|
- app/assets/javascripts/kea/bindings/sherlock.js
|
@@ -130,6 +131,30 @@ files:
|
|
130
131
|
- vendor/assets/components/knockout-sortable/bower.json
|
131
132
|
- vendor/assets/components/knockout-sortable/build/knockout-sortable.js
|
132
133
|
- vendor/assets/components/knockout-sortable/build/knockout-sortable.min.js
|
134
|
+
- vendor/assets/components/pikaday/CHANGELOG.md
|
135
|
+
- vendor/assets/components/pikaday/LICENSE
|
136
|
+
- vendor/assets/components/pikaday/README.md
|
137
|
+
- vendor/assets/components/pikaday/bower.json
|
138
|
+
- vendor/assets/components/pikaday/component.json
|
139
|
+
- vendor/assets/components/pikaday/css/pikaday.css
|
140
|
+
- vendor/assets/components/pikaday/css/site.css
|
141
|
+
- vendor/assets/components/pikaday/examples/amd.html
|
142
|
+
- vendor/assets/components/pikaday/examples/bound-container.html
|
143
|
+
- vendor/assets/components/pikaday/examples/calendars.html
|
144
|
+
- vendor/assets/components/pikaday/examples/container.html
|
145
|
+
- vendor/assets/components/pikaday/examples/jquery-amd.html
|
146
|
+
- vendor/assets/components/pikaday/examples/jquery.html
|
147
|
+
- vendor/assets/components/pikaday/examples/moment.html
|
148
|
+
- vendor/assets/components/pikaday/examples/positions.html
|
149
|
+
- vendor/assets/components/pikaday/examples/trigger.html
|
150
|
+
- vendor/assets/components/pikaday/examples/weeknumbers.html
|
151
|
+
- vendor/assets/components/pikaday/index.html
|
152
|
+
- vendor/assets/components/pikaday/package.json
|
153
|
+
- vendor/assets/components/pikaday/pikaday.js
|
154
|
+
- vendor/assets/components/pikaday/plugins/pikaday.jquery.js
|
155
|
+
- vendor/assets/components/pikaday/scss/pikaday.scss
|
156
|
+
- vendor/assets/components/pikaday/tests/methods.js
|
157
|
+
- vendor/assets/components/pikaday/tests/module.js
|
133
158
|
- vendor/assets/components/uri.js/README.md
|
134
159
|
- vendor/assets/components/uri.js/URI.jquery.json
|
135
160
|
- vendor/assets/components/uri.js/about-uris.html
|
@@ -210,8 +235,6 @@ files:
|
|
210
235
|
- vendor/assets/javascripts/knockout-3.3.0-debug.js
|
211
236
|
- vendor/assets/javascripts/knockout-mapping-2.4.1.js
|
212
237
|
- vendor/assets/javascripts/moment.js
|
213
|
-
- vendor/assets/javascripts/pikaday.js
|
214
|
-
- vendor/assets/stylesheets/pikaday.css
|
215
238
|
homepage: http://www.programmanstalt.de
|
216
239
|
licenses:
|
217
240
|
- MIT
|