anjlab-widgets 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ec99f00a18ca6d9718827c73d21a1c16ac0f7f0
4
- data.tar.gz: 3fee3300ceb57043fd3bae398c700deb8802324f
3
+ metadata.gz: d6393b9f5ad7b950a29d3151d851e42540a864c9
4
+ data.tar.gz: 3f7dc68afdcfb6b1fdfabde911b05c54cfb9b7f4
5
5
  SHA512:
6
- metadata.gz: 722c8309b76f2466c26dad4ece94b3e79aaa912bb83e1cd5b45ba7cd99ad3c921f095dce616514527397e1b1585d946b1236eb669f39b04f3f55857608d3fc69
7
- data.tar.gz: 9140eeaa92907c37f0b282a5dd22e4e4acf756f71b11899328d7b83cb67511503aef8b739cfc596d1b134a214f0e5986861ecd368a0f193ff5758c658eefefec
6
+ metadata.gz: 51c79a86372996f405c4eead5357977affa86799e610cdbd540c5b06b2bc9bb58c3b8118413c2c4e45bb03d907bad0d62a5f1bacc09b911157d0e16c81978613
7
+ data.tar.gz: 576185d97277e09b32b2292612dfb1a77495aa89481fc65140f5d2abc0ce156709840be65f26b703e9971632f6b7c8e0b3ee7f09e7822bda708c4d07f5fdf58b
data/Gemfile CHANGED
@@ -12,4 +12,4 @@ group :assets do
12
12
  gem 'jquery-rails'
13
13
  end
14
14
 
15
- gem 'anjlab-bootstrap-rails', require: 'bootstrap-rails'
15
+ gem 'anjlab-bootstrap-rails', require: 'bootstrap-rails', path: '~/Projects/bootstrap-rails'
@@ -114,9 +114,9 @@ DateTools =
114
114
 
115
115
  headTemplate: '<thead>'+
116
116
  '<tr>'+
117
- '<th class="prev"><i class="icon-arrow-left"/></th>'+
117
+ '<th class="prev"><span class="icon-left"/></th>'+
118
118
  '<th colspan="5" class="switch"></th>'+
119
- '<th class="next"><i class="icon-arrow-right"/></th>'+
119
+ '<th class="next"><span class="icon-right"/></th>'+
120
120
  '</tr>'+
121
121
  '</thead>'
122
122
 
@@ -186,7 +186,7 @@ class Datepicker extends NativeRailsDatepicker
186
186
  }
187
187
 
188
188
  @isInput = @element.is('input');
189
- @component = if @element.is('.date') then @element.find('.add-on') else false;
189
+ @component = if !@isInput && @element.is('.date') then @element.find('.add-on') else false;
190
190
 
191
191
  if @isInput
192
192
  @element.on {
@@ -231,7 +231,6 @@ class Datepicker extends NativeRailsDatepicker
231
231
  @showMode()
232
232
  $(document).off('mousedown', @hide) if !@isInput
233
233
 
234
- @setValue()
235
234
  @element.trigger
236
235
  type: 'hide'
237
236
  date: @date
@@ -240,10 +239,10 @@ class Datepicker extends NativeRailsDatepicker
240
239
  formated = DateTools.formatDate(@date, @format)
241
240
  if !@isInput
242
241
  if @component
243
- @element.find('input').prop('value', formated)
242
+ @element.find('input').val(formated).change()
244
243
  @element.data('date', formated)
245
244
  else
246
- @element.prop('value', formated)
245
+ @element.val(formated).change()
247
246
 
248
247
  place: ->
249
248
  offset = if @component then @component.offset() else @element.offset()
@@ -84,7 +84,7 @@ class Timepicker extends NativeRailsTimepicker
84
84
  @picker.find("a[data-time='#{@time}']").addClass('active')
85
85
 
86
86
  setValue: ->
87
- @element.prop('value', @time)
87
+ @element.val(@time).change()
88
88
 
89
89
  fillTimes: ->
90
90
  timeCnt = @startTime
@@ -130,7 +130,7 @@ class Timepicker extends NativeRailsTimepicker
130
130
  @picker.hide()
131
131
  $(window).off 'resize', @place
132
132
 
133
- @setValue()
133
+ # @setValue()
134
134
  @element.trigger {
135
135
  type: 'hide'
136
136
  date: @time
@@ -3,7 +3,7 @@
3
3
  left: 0;
4
4
  padding: 4px;
5
5
  margin-top: 1px;
6
- @include border-radius(4px);
6
+ border-radius: $border-radius-base;
7
7
 
8
8
  >div {
9
9
  display: none;
@@ -22,45 +22,45 @@
22
22
  th {
23
23
  text-align: center;
24
24
  @include square(20px);
25
- @include border-radius(4px);
25
+ border-radius: $border-radius-base;
26
26
  }
27
27
  td {
28
28
  &.day:hover {
29
- background: $grayLighter;
29
+ background: $gray-lighter;
30
30
  cursor: pointer;
31
31
  }
32
32
  &.old,
33
33
  &.new {
34
- color: $grayLight;
34
+ color: $gray-light;
35
35
  }
36
36
  &.today {
37
37
  font-weight: bold;
38
38
  }
39
39
  &.active,
40
40
  &.active:hover {
41
- @include button-background($btnPrimaryBackground, adjust-hue($btnPrimaryBackground, 20));
41
+ @include btn-pseudo-states($btn-primary-color, $btn-primary-bg, $btn-primary-border);
42
42
  color: #fff;
43
43
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
44
44
  }
45
45
  span {
46
46
  display: block;
47
- width: 47px;
47
+ width: 54px;
48
48
  height: 54px;
49
49
  line-height: 54px;
50
50
  float: left;
51
51
  margin: 2px;
52
52
  cursor: pointer;
53
- @include border-radius(4px);
53
+ border-radius: $border-radius-base;
54
54
  &:hover {
55
- background: $grayLighter;
55
+ background: $gray-lighter;
56
56
  }
57
57
  &.active {
58
- @include button-background($btnPrimaryBackground, adjust-hue($btnPrimaryBackground, 20));
58
+ @include btn-pseudo-states($btn-primary-color, $btn-primary-bg, $btn-primary-border);
59
59
  color: #fff;
60
60
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
61
61
  }
62
62
  &.old {
63
- color: $grayLight;
63
+ color: $gray-light;
64
64
  }
65
65
  }
66
66
  }
@@ -72,7 +72,19 @@
72
72
  thead tr:first-child th {
73
73
  cursor: pointer;
74
74
  &:hover {
75
- background: $grayLighter;
75
+ background: $gray-lighter;
76
+ }
77
+ }
78
+
79
+ .icon-left {
80
+ &:before {
81
+ content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
82
+ }
83
+ }
84
+
85
+ .icon-right {
86
+ &:before {
87
+ content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
76
88
  }
77
89
  }
78
90
  }
@@ -3,7 +3,7 @@
3
3
  left: 0;
4
4
  padding: 4px;
5
5
  margin-top: 1px;
6
- @include border-radius(4px);
6
+ border-radius: $border-radius-base;
7
7
  height:224px;
8
8
  width:70px !important;
9
9
  min-width:70px;
@@ -14,20 +14,20 @@
14
14
  }
15
15
 
16
16
  a {
17
- @include border-radius(4px);
17
+ border-radius: $border-radius-base;
18
18
  display: block;
19
19
  padding: 0 1em;
20
20
 
21
21
  &:hover {
22
- background: $grayLighter;
22
+ background: $gray-lighter;
23
23
  cursor: pointer;
24
24
  }
25
25
  &.night {
26
- color: $grayLight;
26
+ color: $gray-light;
27
27
  }
28
28
  &.active,
29
29
  &.active:hover {
30
- @include button-background($btnPrimaryBackground, adjust-hue($btnPrimaryBackground, 20));
30
+ @include btn-pseudo-states($btn-primary-color, $btn-primary-bg, $btn-primary-border);
31
31
  color: #fff;
32
32
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
33
33
  }
@@ -1,5 +1,5 @@
1
1
  module Anjlab
2
2
  module Widgets
3
- VERSION = "1.0.8"
3
+ VERSION = "1.0.9"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  <input data-widget='datepicker' data-date-format='dd.mm.yyyy' value='05.08.2012'>
2
- <input data-widget='datepicker' data-date-locale='ru'>
2
+ <input class='js-change' data-widget='datepicker' data-date-locale='ru'>
3
3
  <br>
4
4
  <input data-widget='datepicker' data-date-locale='en'>
5
5
  <input data-widget='datepicker'>
@@ -7,3 +7,8 @@
7
7
  <input data-widget='datepicker' data-date-locale='es'>
8
8
  <input data-widget='datepicker' data-date-allow-blank='false'>
9
9
 
10
+ <script>
11
+ $('.js-change').change(function(){
12
+ console.log($('.js-change').val())
13
+ })
14
+ </script>
@@ -1 +1,7 @@
1
- <input data-widget='timepicker'>
1
+ <input class="js-change" data-widget='timepicker'>
2
+
3
+ <script>
4
+ $('.js-change').change(function(){
5
+ console.log($('.js-change').val())
6
+ })
7
+ </script>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anjlab-widgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Korolev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-26 00:00:00.000000000 Z
11
+ date: 2013-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anjlab-bootstrap-rails