material_raingular 0.0.4.3 → 0.0.5
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: 03980b9a6d9bf6a3d71f36453f0f5eee0f399de8
|
4
|
+
data.tar.gz: 6e5458e8885aa46d0b974f3065052d17cd3b0d03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9c572a1c47ece8bbf2655d8ab03dc7c736fd37275b004440b4852c3fb6c221ca6e8d023fdcbd67175f0b518f82e0468c4f4375e9bd6be608d3d80356eed2761
|
7
|
+
data.tar.gz: 115da2a6610b43fa3111186ed8f78a601937ddcc929d925436d5afc4d22f171f728500cd8a1cb10ff49445b8232c67cfca23d672dba9cbe5589c6fb0a13d36ad
|
@@ -79,8 +79,9 @@ class StandardTemplate
|
|
79
79
|
@stylize()
|
80
80
|
@bind()
|
81
81
|
stylize: ->
|
82
|
+
@search.css('width',window.getComputedStyle(@element[0]).width)
|
82
83
|
@search.addClass('md-input') if @element.hasClass('md-input')
|
83
|
-
@search.css(
|
84
|
+
@search.css('color', 'black')
|
84
85
|
@element.css('position','relative').css('overflow','visible')
|
85
86
|
@span.css('overflow','hidden').css('width','100%').css('display','inline-block').css('position','relative')
|
86
87
|
searchCss = window.getComputedStyle(@search[0])
|
@@ -60,7 +60,10 @@ uploadFiles = (scope,element,model,id,file,parent,timeout,callback) ->
|
|
60
60
|
, 2000
|
61
61
|
|
62
62
|
xhr.open("PUT", route)
|
63
|
-
|
63
|
+
csrf = null
|
64
|
+
for tag in document.getElementsByTagName('meta')
|
65
|
+
csrf = tag.content if tag.name == 'csrf-token'
|
66
|
+
xhr.setRequestHeader('X-CSRF-Token', csrf)
|
64
67
|
xhr.send(formData)
|
65
68
|
|
66
69
|
angular.module('NgUpload', [])
|
@@ -69,13 +72,30 @@ angular.module('NgUpload', [])
|
|
69
72
|
restrict: 'A'
|
70
73
|
require: 'ngModel'
|
71
74
|
link: (scope, element, attributes) ->
|
75
|
+
dragHovered = 0
|
76
|
+
el = angular.element("<div class='hovered-cover'>Drop Files Here</div>")
|
77
|
+
element.bind 'dragenter', (event) ->
|
78
|
+
dragHovered += 1
|
79
|
+
element.addClass('hovered') if dragHovered == 1
|
80
|
+
element.append el if dragHovered == 1
|
81
|
+
height = window.getComputedStyle(element[0]).height
|
82
|
+
el.css('height', height)
|
83
|
+
el.css('line-height',height)
|
84
|
+
el.css('margin-top', '-' + height)
|
85
|
+
element.bind 'dragleave', (event) ->
|
86
|
+
dragHovered -= 1
|
87
|
+
element.removeClass('hovered') if dragHovered == 0
|
88
|
+
el.remove() if dragHovered == 0
|
72
89
|
element.bind 'dragover', (event) ->
|
73
90
|
event.preventDefault()
|
74
91
|
event.stopPropagation()
|
75
92
|
element.bind 'drop', (event) ->
|
76
93
|
event.preventDefault()
|
77
94
|
event.stopPropagation()
|
78
|
-
|
95
|
+
element.removeClass('hovered')
|
96
|
+
el.remove()
|
97
|
+
dragHovered = 0
|
98
|
+
file = (event.originalEvent || event).dataTransfer.files[0]
|
79
99
|
selectFile(scope,event,attributes,file)
|
80
100
|
scope.file = ->
|
81
101
|
fileData(scope,attributes)
|
@@ -97,7 +117,7 @@ angular.module('NgUpload', [])
|
|
97
117
|
<div class="ng-progress-bar">
|
98
118
|
<span class="bar" style="width: {{uploadProgress() || 0}}%;"></span><span class="text" style="margin-left: -{{uploadProgress() || 0}}%;">{{uploadProgress()}}%</span>
|
99
119
|
</div>
|
100
|
-
<input accept="{{accept()}}" ng-model="ngModel" type="file" /><img ng-show="show('image')" ng-src="{{file().thumb}}" />
|
120
|
+
<input accept="{{accept()}}" ng-model="ngModel" type="file" ng-class="{image: show('image')}" /><img ng-show="show('image')" ng-src="{{file().thumb}}" />
|
101
121
|
<div class="button" ng-show="show('button')">
|
102
122
|
Select File
|
103
123
|
</div>
|
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
|
+
version: 0.0.5
|
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-
|
11
|
+
date: 2016-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|