material_raingular 0.0.3.5 → 0.0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e259fb3ac3fba6a8ce3d92a662a9a66581ffeca
4
- data.tar.gz: 1e5ba00ce3f480ddfbe4f64affe60e65236fd50c
3
+ metadata.gz: 8be58427ac147877a9c8a2f264947219fe1b70b8
4
+ data.tar.gz: fe1c25c8537f096d055172b2359858b3996fe3eb
5
5
  SHA512:
6
- metadata.gz: 51e9e43ff9ebe49d73e2bb8f8546fe8caadd8f9be1abab26bf169cff5df4410421332075d9e8e5bdce1dc59a9e34e4608172fce76567b645ebeaa362eaf20cfe
7
- data.tar.gz: fa5ba4f82255ca14fffc8c7cd810e61eabbf76c9abc790e7fc153f7c80c090cc261c67d1fd160c085455145418acb25996c67374912c80d9bc462d0dfbba9d10
6
+ metadata.gz: 6a6bc6e7ffff8c2acb8de77e855d0d677b57b47ee25a0f9229f4c9bd6bf13e689682d726f5e3140673a4179b42bd5aae9c20efbad0922f2cbf9747fa75be5d38
7
+ data.tar.gz: 149472ad1096b1af5b9e78d70fbb194eca83ecc178acdcdde6e04b3f45cf12625b99b128b67bd4c1ecae3bb24936b3e20acca0bc4c97d998796a4760da984813
@@ -86,6 +86,7 @@ class StandardTemplate
86
86
  @search.bind 'input', (event)=>
87
87
  @inputFunction(@search,@typeAhead,event)
88
88
  @search.bind 'focus', (event)=>
89
+ @stylize()
89
90
  @focusFunction(event)
90
91
  @search.bind 'blur', (event)=>
91
92
  @blurFunction(@search,event)
@@ -104,12 +105,12 @@ class EventFunctions
104
105
  location = search[0].selectionStart
105
106
  if location > 3
106
107
  if @functions.viewValueFn(@filteredList()[0])
107
- search.val(@functions.viewValueFn(@filteredList()[0]))
108
+ search.val(@functions.viewValueFn(@filteredList()[0]).replace(/^\s+/g,''))
108
109
  else
109
- search.val(search.val()[0..location - 1])
110
+ search.val(search.val()[0..location - 1].replace(/^\s+/g,''))
110
111
  search[0].setSelectionRange(location,location)
111
112
  else
112
- search.val(search.val()[0..2])
113
+ search.val(search.val()[0..2].replace(/^\s+/g,''))
113
114
  typeAhead.html(search.val()[0..location - 1])
114
115
  @buildTemplate()
115
116
  focusFunction: (event) =>
@@ -122,7 +123,7 @@ class EventFunctions
122
123
  obj[@functions.viewValue] = search.val()
123
124
  val = @filter('filter')(@functions.collection(@scope), obj)[0]
124
125
  @updateValue @functions.modelValueFn(val)
125
- search.val(@functions.viewValueFn(val))
126
+ search.val(@functions.viewValueFn(val).replace(/^\s+/g,''))
126
127
  keydownFunction: (search,typeAhead,template,input) =>
127
128
  keypress = (direction) ->
128
129
  index = if direction == 'next' then 0 else template.find('a').length - 1
@@ -142,7 +143,7 @@ class EventFunctions
142
143
  selected[0].parentElement.scrollTop = scroll
143
144
  selected.addClass('active')
144
145
  location = search[0].selectionStart
145
- search.val(selected.text())
146
+ search.val(selected.text().replace(/^\s+/g,''))
146
147
  search[0].setSelectionRange(location,location)
147
148
  typeAhead.html(selected.text()[0..location - 1])
148
149
  if input.keyCode == 40
@@ -189,7 +190,7 @@ angular.module('FilteredSelect', [])
189
190
  !!left.match(new RegExp("^" + right))
190
191
  location = elements.search[0].selectionStart || elements.search.val().length
191
192
  obj={}
192
- obj[functions.viewValue] = elements.search.val()[0..location - 1] || ''
193
+ obj[functions.viewValue] = elements.search.val()[0..location - 1].replace(/^\s+/g,'') || ''
193
194
  return unless functions.collection(scope)
194
195
  fList = $filter('orderBy')($filter('filter')(functions.collection(scope), obj,bool), functions.viewValue)
195
196
  for filter in options.filters
@@ -217,7 +218,7 @@ angular.module('FilteredSelect', [])
217
218
  obj[functions.modelValue] = scope.$eval(attrs.ngModel)
218
219
  list = $filter('filter')(functions.collection(scope), obj,equiv)
219
220
  viewScope = list[0] if list
220
- elements.search.val(if viewScope then functions.viewValueFn(viewScope) else '')
221
+ elements.search.val(if viewScope then functions.viewValueFn(viewScope).replace(/^\s+/g,'') else '')
221
222
  elements.typeAhead.html(elements.search.val())
222
223
  else
223
224
  unless model = scope.$eval(attrs.ngModel)
@@ -234,9 +235,10 @@ angular.module('FilteredSelect', [])
234
235
  element.html(view)
235
236
 
236
237
  updateValue = (model) ->
237
- ngModel.$setViewValue(model)
238
- elements.tempHolder.removeClass('active')
239
- setInitialValue()
238
+ scope.$apply ->
239
+ ngModel.$setViewValue(model)
240
+ elements.tempHolder.removeClass('active')
241
+ setInitialValue()
240
242
  disabled = ->
241
243
  unless typeof fieldset != 'undefined'
242
244
  done = false
@@ -43,6 +43,14 @@ ng-filtered-select
43
43
  width: 100%
44
44
  overflow: hidden
45
45
  text-overflow: ellipsis
46
+ md-input-container
47
+ ng-filtered-select
48
+ input
49
+ padding: 2px 2px 1px
50
+ border-width: 0 0 1px
51
+ line-height: 20px
52
+ border-color: rgba(0,0,0,0.12)
53
+ vertical-align: baseline
46
54
  md-autocomplete
47
55
  background: none
48
56
  md-autocomplete-wrap.md-whiteframe-z1
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.0.3.5"
2
+ VERSION = "0.0.3.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material_raingular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.5
4
+ version: 0.0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.4.3
147
+ rubygems_version: 2.4.8
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Angular v1.4 for rails. Angular Material v0.9.8.