material_raingular 0.0.3.3 → 0.0.3.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8609bfcee04a6ded9353b2298e1eb65a23dae16d
|
4
|
+
data.tar.gz: ca2f8dd1571415e5fb50344198f6c2c046b878b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1e6e016159912df9b598fe333ef54cdffaf2c689d16645de596b1356678b2aa6b41a6568ebbf192683e2820de79e587e5501f6f1c5839202ff2873c20a7f5a5
|
7
|
+
data.tar.gz: c87d4655b5a2044783ba2d9324ef6d1d3a6aefdb4552f3de108583319e4a926da56e74d1543259c71ba83d14561303b4ef324edbb451f1d6e2e32f617d288df2
|
@@ -98,7 +98,7 @@ class StandardTemplate
|
|
98
98
|
@element.append @span
|
99
99
|
|
100
100
|
class EventFunctions
|
101
|
-
constructor: (@functions,@buildTemplate,@updateValue,@filteredList,@filter,@timeout,@parse,@scope,@disabled) ->
|
101
|
+
constructor: (@functions,@buildTemplate,@updateValue,@filteredList,@filter,@timeout,@parse,@scope,@disabled,@options) ->
|
102
102
|
|
103
103
|
inputFunction: (search,typeAhead,event) =>
|
104
104
|
location = search[0].selectionStart
|
@@ -115,14 +115,13 @@ class EventFunctions
|
|
115
115
|
focusFunction: (event) =>
|
116
116
|
@buildTemplate()
|
117
117
|
blurFunction: (search,event) =>
|
118
|
-
if search.val().length < 4
|
118
|
+
if search.val().length < (@options.minLength || 4)
|
119
119
|
search.val('')
|
120
120
|
else
|
121
121
|
obj={}
|
122
122
|
obj[@functions.viewValue] = search.val()
|
123
123
|
val = @filter('filter')(@functions.collection(@scope), obj)[0]
|
124
124
|
@updateValue @functions.modelValueFn(val)
|
125
|
-
search.css
|
126
125
|
search.val(@functions.viewValueFn(val))
|
127
126
|
keydownFunction: (search,typeAhead,template,input) =>
|
128
127
|
keypress = (direction) ->
|
@@ -213,14 +212,15 @@ angular.module('FilteredSelect', [])
|
|
213
212
|
elements.template.append(li)
|
214
213
|
setInitialValue = ->
|
215
214
|
unless isMobile
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
215
|
+
if model = scope.$eval(attrs.ngModel)
|
216
|
+
obj = {}
|
217
|
+
obj[functions.modelValue] = scope.$eval(attrs.ngModel)
|
218
|
+
list = $filter('filter')(functions.collection(scope), obj,equiv)
|
219
|
+
viewScope = list[0] if list
|
220
|
+
elements.search.val(if viewScope then functions.viewValueFn(viewScope) else '')
|
221
|
+
elements.typeAhead.html(elements.search.val())
|
222
222
|
else
|
223
|
-
unless model = ngModel
|
223
|
+
unless model = scope.$eval(attrs.ngModel)
|
224
224
|
view = attrs.placeholder
|
225
225
|
element.css('color','rgba(0,0,0,0.4)')
|
226
226
|
else
|
@@ -251,9 +251,10 @@ angular.module('FilteredSelect', [])
|
|
251
251
|
return true if fieldset[0].attributes.disabled || $parse(ngdis)(scope)
|
252
252
|
return false
|
253
253
|
|
254
|
+
viewOptions = JSON.parse(attrs.filterOptions || '{}')
|
254
255
|
options = new SelectOptions(attrs.ngSelectOptions,element[0].outerHTML)
|
255
256
|
functions = new SelectFunctions(options.match,$parse)
|
256
|
-
eFunctions = new EventFunctions(functions,buildTemplate,updateValue,filteredList,$filter,$timeout,$parse,scope,disabled())
|
257
|
+
eFunctions = new EventFunctions(functions,buildTemplate,updateValue,filteredList,$filter,$timeout,$parse,scope,disabled(),viewOptions)
|
257
258
|
if isMobile = typeof attrs.ngMobile != 'undefined'
|
258
259
|
elements = new MobileTemplate(element,eFunctions.mobile())
|
259
260
|
else
|
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.0.3.
|
4
|
+
version: 0.0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Moody
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|