material_raingular 0.0.4.2 → 0.0.4.2.1

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: 7470f55a09c100b8d9a246f71521e8a2098f6072
4
- data.tar.gz: af15ae1a9ffac5d70e8107e2d749117118ac9d3c
3
+ metadata.gz: 18193f16394298e1cc7af1f636b7ebc986fedc3d
4
+ data.tar.gz: b612c444e8029453cec479f5ecb596f66c03c418
5
5
  SHA512:
6
- metadata.gz: 54d912bcefe94b424513203e38214c81edd0f0c00d67344f7c275322720b78937873e42866a0b8bea8f52731a8cb893751136c4b95a45a81d43c886c6b490bd7
7
- data.tar.gz: 8bad50ab5bd596cf9ee6662270ff52dbe85e5e0ac07632399edc87393b89344c7c44c675c198e2d2f280032b3a6cd80692c9ff6075412abc7b9932201ff24c68
6
+ metadata.gz: d41a7c58e35a2e24065e99f69f7b50c013f8c26d591b8e6d9acf8911a6a0470114be4e2ce05e45d7dd26329b314e54d4af89cbcdce5def2e2723e685d7d1d460
7
+ data.tar.gz: d193dbae32b24a0612189895c9296aef13e184457157f5a07c25ef4d63f4b7a32b201a320058c11d3512efba964736d995da871e503f5bb33a2c994848075486
@@ -78,7 +78,9 @@ class StandardTemplate
78
78
  @search.addClass('md-input') if @element.hasClass('md-input')
79
79
  @search.css({'width': '100%','color': 'black'})
80
80
  @element.css('position','relative').css('overflow','visible')
81
+ @span.css('overflow','hidden').css('width','100%').css('display','inline-block').css('position','relative')
81
82
  searchCss = window.getComputedStyle(@search[0])
83
+ @typeAhead.css('white-space', 'nowrap')
82
84
  @typeAhead.css('padding-left', parseFloat(searchCss["padding-left"]) + parseFloat(searchCss["margin-left"]) + parseFloat(searchCss["border-left-width"]) + 'px')
83
85
  @typeAhead.css('padding-top', parseFloat(searchCss["padding-top"]) + parseFloat(searchCss["margin-top"]) + parseFloat(searchCss["border-top-width"]) + 'px')
84
86
 
@@ -87,16 +89,16 @@ class StandardTemplate
87
89
  @inputFunction(@search,@typeAhead,event)
88
90
  @search.bind 'focus', (event)=>
89
91
  @stylize()
90
- @focusFunction(event)
92
+ @focusFunction(@template,event)
91
93
  @search.bind 'blur', (event)=>
92
- @blurFunction(@search,event)
94
+ @blurFunction(@search,@typeAhead,@template,event)
93
95
  @search.bind 'keydown', (event)=>
94
96
  @keydownFunction(@search,@typeAhead,@template,event)
95
97
  attachElements: ->
96
98
  @span.append @typeAhead
97
99
  @span.append @search
98
- @span.append @tempHolder
99
100
  @element.append @span
101
+ @element.append @tempHolder
100
102
 
101
103
  class EventFunctions
102
104
  constructor: (@functions,@buildTemplate,@updateValue,@filteredList,@filter,@timeout,@parse,@scope,@disabled,@options) ->
@@ -113,9 +115,19 @@ class EventFunctions
113
115
  search.val(search.val()[0..2].replace(/^\s+/g,''))
114
116
  typeAhead.html(search.val()[0..location - 1])
115
117
  @buildTemplate()
116
- focusFunction: (event) =>
118
+
119
+ focusFunction: (template,event) =>
120
+ template.addClass('focused')
121
+
117
122
  @buildTemplate()
118
- blurFunction: (search,event) =>
123
+ setTypeAheadScroll: (search,typeAhead) =>
124
+ if search[0].offsetWidth < search[0].scrollWidth
125
+ @timeout ->
126
+ typeAhead.css('margin-left', '-' + search[0].scrollLeft + 'px')
127
+ , 1
128
+ blurFunction: (search,typeAhead,template,event) =>
129
+ template.removeClass('focused')
130
+ @setTypeAheadScroll(search,typeAhead)
119
131
  if search.val().length < (@options.minLength || 4)
120
132
  search.val('')
121
133
  else
@@ -124,7 +136,9 @@ class EventFunctions
124
136
  val = @filter('filter')(@functions.collection(@scope), obj)[0]
125
137
  @updateValue @functions.modelValueFn(val)
126
138
  search.val(@functions.viewValueFn(val).replace(/^\s+/g,''))
139
+
127
140
  keydownFunction: (search,typeAhead,template,input) =>
141
+ @setTypeAheadScroll(search,typeAhead)
128
142
  keypress = (direction) ->
129
143
  index = if direction == 'next' then 0 else template.find('a').length - 1
130
144
  selected = angular.element(template[0].getElementsByClassName('active')[0])
@@ -115,6 +115,11 @@ md-autocomplete
115
115
  transition: max-height 0.55s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.55s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.55s cubic-bezier(0.25, 0.8, 0.25, 1)
116
116
  padding: 0
117
117
  max-width: 0
118
+ &.focused
119
+ max-width: 100rem
120
+ max-height: 30rem
121
+ padding: 0.5rem
122
+ opacity: 1
118
123
 
119
124
  input.autocomplete:focus + div
120
125
  max-width: 100rem
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.0.4.2"
2
+ VERSION = "0.0.4.2.1"
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.0.4.2
4
+ version: 0.0.4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-07 00:00:00.000000000 Z
11
+ date: 2016-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -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.8
147
+ rubygems_version: 2.4.3
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Angular v1.4 for rails. Angular Material v0.9.8.