material_raingular 0.3.1 → 0.3.2

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: dc749f7d20aec00899c6e0665acc60479e343b84
4
- data.tar.gz: 14517c2d76d51b8c19c53696e0df5a22c4af7f2a
3
+ metadata.gz: cdbe7c15b8aad30f7cca54010efa273087fcc7f3
4
+ data.tar.gz: a08eb4471c0232321aeff231732845d8dd8df633
5
5
  SHA512:
6
- metadata.gz: b4bf8f1221db889af55584632ae5b37bab1dfaffe620022eb1f9d088ba456dfb6e8f93e156d80adfc0a8a700bf251aedb539904b8ed762eb401e0644936572d5
7
- data.tar.gz: 006ae859bcb14c8424fd69ce653832b6a35c2854859a50a4bafa86538eff61682e055fd9a91320954466adebdec01b29125dc2f475ab077cc5f8ac25c5f58533
6
+ metadata.gz: fb50f5968c5eda7feaf8d28b7a434da0ca28a2753a5c3947267387149ff96e48d8e682671a87ada93bfdab87860ae952cd1f1fdd5c4f89b15cdff7b50b39d1b5
7
+ data.tar.gz: fab4c9d861c51d34ded5840b6fe42c0216633c4649c74bb7c06859e5993906a72c5675194dc9999c1a0d0d19a1c2f5f9f4be2411e7d2656009991bbe7b6a254b
@@ -64,8 +64,16 @@ class MobileTemplate
64
64
  @closeSearch.css('border','none').css('background-color','rgba(0,0,0,0.1)').css('width','30px').css('padding','5px')
65
65
 
66
66
  bind: ->
67
- @element.bind 'mousedown', (event) =>
68
- @mousedownFunction(@tempHolder,@search,event)
67
+ @element.bind 'touchstart', (event) =>
68
+ touch = event.touches[event.touches.length - 1]
69
+ @touchDetails = {
70
+ startX: touch.screenX
71
+ startY: touch.screenY
72
+ }
73
+ @element.bind 'touchend', (event) =>
74
+ touch = event.changedTouches[event.changedTouches.length - 1]
75
+ if Math.abs(@touchDetails.startX - touch.screenX) < 20 && Math.abs(@touchDetails.startY - touch.screenY) < 20
76
+ @mousedownFunction(@tempHolder,@search,touch.clientY)
69
77
  @body.bind 'keydown', (event) =>
70
78
  @keydownFunction(@tempHolder,event)
71
79
  @search.bind 'input', (event) =>
@@ -197,12 +205,12 @@ class EventFunctions
197
205
  keypress('previous')
198
206
  mkeydownFunction: (tempHolder,event) =>
199
207
  tempHolder.removeClass('active') if event.keyCode == 27
200
- mousedownFunction: (tempHolder,search,event) =>
208
+ mousedownFunction: (tempHolder,search,clientY) =>
201
209
  return if tempHolder.hasClass('active')
202
210
  return if @disabled()
203
211
  search.val('')
204
212
  @buildTemplate()
205
- tempHolder.css('top',event.clientY)
213
+ tempHolder.css('top',clientY)
206
214
  tempHolder.css('transition','none')
207
215
  @timeout ->
208
216
  tempHolder.css('transition','')
@@ -282,7 +290,7 @@ angular.module('FilteredSelect', [])
282
290
  mdInputContainer?.setHasValue(val)
283
291
  else
284
292
  unless model = scope.$eval(attrs.ngModel)
285
- view = ''
293
+ view = attrs.placeholder
286
294
  element.css('color','rgba(0,0,0,0.4)')
287
295
  else
288
296
  element.css('color','')
@@ -293,7 +301,7 @@ angular.module('FilteredSelect', [])
293
301
  obj[functions.modelValue] = model
294
302
  list = $filter('filter')(functions.collection(scope), obj,true)
295
303
  viewScope = list[0] if list
296
- view = if viewScope then functions.viewValueFn(viewScope) else ''
304
+ view = if viewScope then functions.viewValueFn(viewScope) else attrs.placeholder
297
305
  element.html('')
298
306
  element.html(view)
299
307
 
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material_raingular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-20 00:00:00.000000000 Z
11
+ date: 2017-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler