material_raingular 0.0.2.alpha → 0.0.2.1.alpha

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: c6b89dcb5aaed8e1ccb5bc7b31f826165201b73f
4
- data.tar.gz: fc3af078ed0d7119fac7523948286765c587dd51
3
+ metadata.gz: 08cc207d34aa842e056bc182d7e2b10bd9a7e9ca
4
+ data.tar.gz: 58d6d0f4258975cfa5ccba21c9ee2676f7260bcc
5
5
  SHA512:
6
- metadata.gz: 73e7a544ba217cf5b909897ffd4efc2a6d9b7c1710c444f85c596cc21da791a631e6ba68306a4592de9b6cc755e6eb4d03987c7cf8c492f51ae8c7794e01d85d
7
- data.tar.gz: f7c1e8316babc822e13807960c4b96a93779959aa51bb6516bbd833bcca463024a7082944aa83262abfa2dfbd027d9d0d794c28caf4adacddfe271d7e98ee00d
6
+ metadata.gz: 5a8a69ce3377ae510b42767feeed4818ef4c018efe1e84ce34b06604df0d650a843b42b38302caaaf8a26177207f7e13bb9e49477b5dc7bb79b0dff6d1a47597
7
+ data.tar.gz: f6899269b8c25406a2467c26ff3a97e5f37824753049051c46a35c9d2eda19703a594e50f72f3b87d06da01ae031503c783fd756da9eda2096774bc550478ad9
@@ -22,7 +22,7 @@ fileData = (scope,attributes) ->
22
22
  data.thumb = scope[unparsedModel[0]].thumb.url if scope[unparsedModel[0]].thumb
23
23
  return data
24
24
 
25
- uploadFiles = (scope,element,model,id,file,parent,timeout) ->
25
+ uploadFiles = (scope,element,model,id,file,parent,timeout,callback) ->
26
26
  scope.progress = 0
27
27
  element.addClass('covered')
28
28
  route = Routes[element[0].attributes['ng-model'].value.split('.')[0] + '_path'](id: id) + '.json'
@@ -44,7 +44,7 @@ uploadFiles = (scope,element,model,id,file,parent,timeout) ->
44
44
  scope[model[0]].thumb = data.thumb
45
45
  scope.progress = 100
46
46
  element.removeClass('covered')
47
-
47
+ scope.$eval(callback) if callback
48
48
  else if this.readyState == 4 && this.status > 399
49
49
  failed()
50
50
  , false
@@ -81,8 +81,10 @@ angular.module('NgUpload', [])
81
81
  fileData(scope,attributes)
82
82
 
83
83
  controller: ($scope, $element, $http, $timeout) ->
84
+ callback = ->
85
+ $element[0].attributes['ng-callback'].value if $element[0].attributes['ng-callback']
84
86
  $scope.uploadFiles = (model,id,file,parent) ->
85
- uploadFiles($scope,$element,model,id,file,parent,$timeout)
87
+ uploadFiles($scope,$element,model,id,file,parent,$timeout,callback())
86
88
  $scope.progress = 0
87
89
  $scope.uploadProgress = ->
88
90
  return $scope.progress
@@ -117,6 +119,8 @@ angular.module('NgUpload', [])
117
119
  return attributes.accept if attributes.accept
118
120
  return '*'
119
121
  controller: ($scope, $element, $http, $timeout) ->
122
+ callback = ->
123
+ $element[0].attributes['ng-callback'].value if $element[0].attributes['ng-callback']
120
124
  $scope.show = (type) ->
121
125
  options = $element[0].attributes['ng-upload-options'].value.replace('{','').replace('}','').split(',')
122
126
  for option in options
@@ -124,4 +128,4 @@ angular.module('NgUpload', [])
124
128
  return true if option.indexOf('true') > -1
125
129
  return false
126
130
  $scope.uploadFiles = (model,id,file,parent) ->
127
- uploadFiles($scope,$element,model,id,file,parent,$timeout)
131
+ uploadFiles($scope,$element,model,id,file,parent,$timeout,callback())
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.0.2.alpha"
2
+ VERSION = "0.0.2.1.alpha"
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.2.alpha
4
+ version: 0.0.2.1.alpha
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-08-06 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler