applicious_utils 0.1.60 → 0.1.62

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,31 @@
1
1
  #= require ./applicious_class.js.coffee
2
+ root = exports ? window
2
3
 
3
4
  class AppliciousUploader extends AppliciousCore
4
5
  @UploadObj: ''
5
6
 
7
+
6
8
  constructor: ->
7
9
  @log 'Applicious [AP::Uploader] Loaded'
8
10
 
9
11
 
10
12
  init: (@UploadObj) ->
11
13
  @UploadObj.init()
14
+
15
+ @UploadObj.bind 'FilesAdded', (up, files) =>
16
+ root.appliciousUploaderFileAdded up, files
17
+
18
+ @UploadObj.bind 'UploadProgress', (up, file) =>
19
+ root.appliciousUploaderUploadProgress up, file
20
+
21
+ @UploadObj.bind 'FileUploaded', (up, file) =>
22
+ root.appliciousUploaderFileUploaded up, file
23
+
24
+ @UploadObj.bind 'Error', (up, error) =>
25
+ root.appliciousUploaderError up, error
26
+
12
27
  @log 'Initialised [AP::Uploader]', @UploadObj
28
+
13
29
  # - - - #
14
30
 
15
31
  AP.Uploader = new AppliciousUploader
Binary file
@@ -1,3 +1,3 @@
1
1
  module AppliciousUtils
2
- VERSION = "0.1.60"
2
+ VERSION = "0.1.62"
3
3
  end
@@ -81,7 +81,6 @@ module AppliciousUtils
81
81
  file_data_name: 'file'
82
82
  });
83
83
 
84
- window.applicious_uploader = applicious_uploader
85
84
  AP.Uploader.init( applicious_uploader )
86
85
  });")
87
86
 
@@ -1,22 +1,30 @@
1
1
  # # # # # # #
2
2
  # Uploader #
3
3
  # # # # # # #
4
+ root = exports ? window
4
5
 
5
- $( window.applicious_uploader ).live 'FilesAdded', (up, files) =>
6
+ root.appliciousUploaderFileAdded (up, files) ->
7
+ AP.log('YES!', up)
6
8
  AP.log( up, files )
7
9
  up.refresh() # Reposition Flash/Silverlight
8
-
9
- $( window.applicious_uploader ).live 'UploadProgress', (up, file) =>
10
+
11
+ root.appliciousUploaderUploadProgress (up, file) ->
12
+ AP.log('YES!', up)
10
13
  AP.log( up, file )
11
-
12
- $( window.applicious_uploader ).live 'FileUploaded', (up, file) =>
14
+
15
+ root.appliciousUploaderFileUploaded (up, file) ->
16
+ AP.log('YES!', up)
13
17
  AP.log( up, file )
14
-
15
- $( window.applicious_uploader ).live 'Error', (up, error) =>
18
+
19
+ root.appliciousUploaderError (up, error) ->
20
+ AP.log('YES!', up)
16
21
  AP.log( up, error )
17
22
  up.refresh() # Reposition Flash/Silverlight
18
-
19
- $('#upload_file').click (e) ->
20
- window.applicious_uploader.start()
21
- e.preventDefault()
23
+
24
+ $(document).ready ->
25
+
26
+ $('#upload_file').click (e) ->
27
+ AP.Uploader.UploadObj.start()
28
+ e.preventDefault()
29
+
22
30
  # - - - #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: applicious_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.60
4
+ version: 0.1.62
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -78,6 +78,7 @@ files:
78
78
  - applicious_utils-0.1.55.gem
79
79
  - applicious_utils-0.1.56.gem
80
80
  - applicious_utils-0.1.58.gem
81
+ - applicious_utils-0.1.60.gem
81
82
  - applicious_utils.gemspec
82
83
  - Gemfile
83
84
  - lib/applicious_utils/engine.rb