applicious_utils 0.1.25 → 0.1.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/app/assets/javascripts/applicious_utils/Plupload/changelog.txt +152 -0
  2. data/app/assets/javascripts/applicious_utils/Plupload/examples/bg.jpg +0 -0
  3. data/app/assets/javascripts/applicious_utils/Plupload/examples/custom.html +94 -0
  4. data/app/assets/javascripts/applicious_utils/Plupload/examples/dump.php +36 -0
  5. data/app/assets/javascripts/applicious_utils/Plupload/examples/jquery/events.html +196 -0
  6. data/app/assets/javascripts/applicious_utils/Plupload/examples/jquery/jquery_ui_widget.html +103 -0
  7. data/app/assets/javascripts/applicious_utils/Plupload/examples/jquery/queue_widget.html +174 -0
  8. data/app/assets/javascripts/applicious_utils/Plupload/examples/jquery/s3.php +158 -0
  9. data/app/assets/javascripts/applicious_utils/Plupload/examples/upload.php +124 -0
  10. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/css/jquery.plupload.queue.css +177 -0
  11. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/backgrounds.gif +0 -0
  12. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/buttons-disabled.png +0 -0
  13. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/buttons.png +0 -0
  14. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/delete.gif +0 -0
  15. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/done.gif +0 -0
  16. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/error.gif +0 -0
  17. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/throbber.gif +0 -0
  18. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/transp50.png +0 -0
  19. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/jquery.plupload.queue.js +1 -0
  20. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.ui.plupload/css/jquery.ui.plupload.css +139 -0
  21. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.ui.plupload/img/plupload-bw.png +0 -0
  22. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.ui.plupload/img/plupload.png +0 -0
  23. data/app/assets/javascripts/applicious_utils/Plupload/js/jquery.ui.plupload/jquery.ui.plupload.js +1 -0
  24. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.browserplus.js +1 -0
  25. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.flash.js +1 -0
  26. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.flash.swf +0 -0
  27. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.full.js +2 -0
  28. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.gears.js +1 -0
  29. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.html4.js +1 -0
  30. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.html5.js +1 -0
  31. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.js +2 -0
  32. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.silverlight.js +1 -0
  33. data/app/assets/javascripts/applicious_utils/Plupload/js/plupload.silverlight.xap +0 -0
  34. data/app/assets/javascripts/applicious_utils/Plupload/license.txt +339 -0
  35. data/app/assets/javascripts/applicious_utils/Plupload/readme.md +46 -0
  36. data/app/assets/javascripts/applicious_utils/index.js +1 -1
  37. data/applicious_utils.gemspec +2 -1
  38. data/lib/applicious_utils/engine.rb +2 -0
  39. data/lib/applicious_utils/uploads_helper.rb +148 -0
  40. data/lib/applicious_utils/version.rb +1 -1
  41. data/lib/applicious_utils.rb +11 -2
  42. data/lib/generators/applicious_uploader_initializer.rb +9 -0
  43. data/lib/generators/templates/amazon_s3.yml +8 -0
  44. data/lib/generators/templates/session_store.rb +69 -0
  45. metadata +41 -14
  46. data/app/assets/javascripts/applicious_utils/swfupload-jquery/README +0 -70
  47. data/app/assets/javascripts/applicious_utils/swfupload-jquery/examples/01 - single uploader.html +0 -73
  48. data/app/assets/javascripts/applicious_utils/swfupload-jquery/examples/02 - multiple uploaders.html +0 -123
  49. data/app/assets/javascripts/applicious_utils/swfupload-jquery/examples/upload.php +0 -7
  50. data/app/assets/javascripts/applicious_utils/swfupload-jquery/src/jquery.swfupload.js +0 -64
  51. data/app/assets/javascripts/applicious_utils/swfupload-jquery/vendor/swfupload/XPButtonUploadText_61x22.png +0 -0
  52. data/app/assets/javascripts/applicious_utils/swfupload-jquery/vendor/swfupload/swfupload.js +0 -980
  53. data/app/assets/javascripts/applicious_utils/swfupload-jquery/vendor/swfupload/swfupload.queue.js +0 -99
  54. data/app/assets/javascripts/applicious_utils/swfupload-jquery/vendor/swfupload/swfupload.swf +0 -0
  55. data/lib/applicious_utils/applicious_railtie.rb +0 -11
  56. data/lib/applicious_utils/view_helpers.rb +0 -16
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.25
4
+ version: 0.1.27
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-01 00:00:00.000000000Z
12
+ date: 2011-07-06 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Helper JS & Ruby Functions
15
15
  email:
@@ -31,16 +31,41 @@ files:
31
31
  - app/assets/javascripts/applicious_utils/LightboxMe/jquery.lightbox_me.js
32
32
  - app/assets/javascripts/applicious_utils/LightboxMe/LICENSE
33
33
  - app/assets/javascripts/applicious_utils/LightboxMe/README.markdown
34
- - app/assets/javascripts/applicious_utils/swfupload-jquery/examples/01 - single uploader.html
35
- - app/assets/javascripts/applicious_utils/swfupload-jquery/examples/02 - multiple
36
- uploaders.html
37
- - app/assets/javascripts/applicious_utils/swfupload-jquery/examples/upload.php
38
- - app/assets/javascripts/applicious_utils/swfupload-jquery/README
39
- - app/assets/javascripts/applicious_utils/swfupload-jquery/src/jquery.swfupload.js
40
- - app/assets/javascripts/applicious_utils/swfupload-jquery/vendor/swfupload/swfupload.js
41
- - app/assets/javascripts/applicious_utils/swfupload-jquery/vendor/swfupload/swfupload.queue.js
42
- - app/assets/javascripts/applicious_utils/swfupload-jquery/vendor/swfupload/swfupload.swf
43
- - app/assets/javascripts/applicious_utils/swfupload-jquery/vendor/swfupload/XPButtonUploadText_61x22.png
34
+ - app/assets/javascripts/applicious_utils/Plupload/changelog.txt
35
+ - app/assets/javascripts/applicious_utils/Plupload/examples/bg.jpg
36
+ - app/assets/javascripts/applicious_utils/Plupload/examples/custom.html
37
+ - app/assets/javascripts/applicious_utils/Plupload/examples/dump.php
38
+ - app/assets/javascripts/applicious_utils/Plupload/examples/jquery/events.html
39
+ - app/assets/javascripts/applicious_utils/Plupload/examples/jquery/jquery_ui_widget.html
40
+ - app/assets/javascripts/applicious_utils/Plupload/examples/jquery/queue_widget.html
41
+ - app/assets/javascripts/applicious_utils/Plupload/examples/jquery/s3.php
42
+ - app/assets/javascripts/applicious_utils/Plupload/examples/upload.php
43
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/css/jquery.plupload.queue.css
44
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/backgrounds.gif
45
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/buttons-disabled.png
46
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/buttons.png
47
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/delete.gif
48
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/done.gif
49
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/error.gif
50
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/throbber.gif
51
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/img/transp50.png
52
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.plupload.queue/jquery.plupload.queue.js
53
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.ui.plupload/css/jquery.ui.plupload.css
54
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.ui.plupload/img/plupload-bw.png
55
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.ui.plupload/img/plupload.png
56
+ - app/assets/javascripts/applicious_utils/Plupload/js/jquery.ui.plupload/jquery.ui.plupload.js
57
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.browserplus.js
58
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.flash.js
59
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.flash.swf
60
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.full.js
61
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.gears.js
62
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.html4.js
63
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.html5.js
64
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.js
65
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.silverlight.js
66
+ - app/assets/javascripts/applicious_utils/Plupload/js/plupload.silverlight.xap
67
+ - app/assets/javascripts/applicious_utils/Plupload/license.txt
68
+ - app/assets/javascripts/applicious_utils/Plupload/readme.md
44
69
  - app/assets/stylesheets/applicious_utils/Applicious/applicious.css
45
70
  - app/assets/stylesheets/applicious_utils/FbMultiFriendSelector/index.html
46
71
  - app/assets/stylesheets/applicious_utils/FbMultiFriendSelector/jquery.facebook.multifriend.select-list.css
@@ -51,11 +76,13 @@ files:
51
76
  - app/assets/stylesheets/applicious_utils/index.css
52
77
  - applicious_utils.gemspec
53
78
  - Gemfile
54
- - lib/applicious_utils/applicious_railtie.rb
55
79
  - lib/applicious_utils/engine.rb
80
+ - lib/applicious_utils/uploads_helper.rb
56
81
  - lib/applicious_utils/version.rb
57
- - lib/applicious_utils/view_helpers.rb
58
82
  - lib/applicious_utils.rb
83
+ - lib/generators/applicious_uploader_initializer.rb
84
+ - lib/generators/templates/amazon_s3.yml
85
+ - lib/generators/templates/session_store.rb
59
86
  - Rakefile
60
87
  homepage: http://appliciousagency.com
61
88
  licenses: []
@@ -1,70 +0,0 @@
1
- SWFUpload jQuery Plugin v1.0.0
2
- -------------------------------
3
- Copyright (c) 2009 Adam Royle. Licensed under the MIT license.
4
-
5
-
6
- Overview
7
- --------
8
-
9
- A jQuery plugin that makes working with SWFUpload even easier.
10
-
11
- Features include:
12
- - jQuery-style instantiation
13
- - jQuery-style event handling
14
- - Ability to separate SWFUpload object from UI code
15
-
16
-
17
- Usage
18
- -----
19
-
20
- // create the swfupload instance (settings must be an object)
21
- $('.swfupload-control').swfupload(settings);
22
-
23
- // add some additional handlers (for any plugins if used)
24
- $.swfupload.additionalHandlers('some_extra_handler', 'another_extra_handler');
25
-
26
- // same as above but as an array
27
- $.swfupload.additionalHandlers(['some_extra_handler', 'another_extra_handler']);
28
-
29
- // or just return an array of the additional handler names
30
- $.swfupload.additionalHandlers();
31
-
32
- // or return an array of the default handler names
33
- $.swfupload.defaultHandlers();
34
-
35
- // bind the swfupload event handlers like an other jquery event
36
- $('.swfupload-control')
37
- .bind('swfuploadLoaded', function(event){
38
- console.debug('swfuploadLoaded!!', event);
39
- })
40
- .bind('fileQueued', function(event, file){
41
- $(this).swfupload('startUpload');
42
- console.debug('fileQueued!!', event);
43
- });
44
-
45
-
46
- // call methods on the swfupload instances by passing a string as the first parameter
47
- // this method is chainable and therefore does not return any values
48
- $('.swfupload-control').swfupload('startUpload', fileID);
49
- $('.swfupload-control').swfupload('cancelUpload', fileID, triggerErrorEvent);
50
-
51
- // or if you prefer, you can just get the instance directly
52
- // if you need any return values for methods
53
- $.swfupload.getInstance('.swfupload-control');
54
-
55
-
56
-
57
- Event Names (and, their, params)
58
- --------------------------------
59
- swfuploadLoaded (event)
60
- fileQueued (event, file)
61
- fileQueueError (event, file, errorCode, message)
62
- fileDialogStart (event)
63
- fileDialogComplete (event, numFilesSelected, numFilesQueued)
64
- uploadStart (event, file)
65
- uploadProgress (event, file, bytesLoaded)
66
- uploadSuccess (event, file, serverData)
67
- uploadComplete (event, file)
68
- uploadError (event, file, errorCode, message)
69
- // event from swfupload.queue.js
70
- queueComplete (event, uploadCount)
@@ -1,73 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <title>SWFUpload Example - Single Uploader</title>
6
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
7
- <script type="text/javascript" src="../vendor/swfupload/swfupload.js"></script>
8
- <script type="text/javascript" src="../src/jquery.swfupload.js"></script>
9
- <script type="text/javascript">
10
-
11
- $(function(){
12
- $('#swfupload-control').swfupload({
13
- upload_url: "upload.php",
14
- file_size_limit : "10240",
15
- file_types : "*.*",
16
- file_types_description : "All Files",
17
- file_upload_limit : "0",
18
- flash_url : "../vendor/swfupload/swfupload.swf",
19
- button_image_url : '../vendor/swfupload/XPButtonUploadText_61x22.png',
20
- button_width : 61,
21
- button_height : 22,
22
- button_placeholder : $('#button')[0],
23
- debug: true,
24
- custom_settings : {something : "here"}
25
- })
26
- .bind('swfuploadLoaded', function(event){
27
- $('#log').append('<li>Loaded</li>');
28
- })
29
- .bind('fileQueued', function(event, file){
30
- $('#log').append('<li>File queued - '+file.name+'</li>');
31
- // start the upload since it's queued
32
- $(this).swfupload('startUpload');
33
- })
34
- .bind('fileQueueError', function(event, file, errorCode, message){
35
- $('#log').append('<li>File queue error - '+message+'</li>');
36
- })
37
- .bind('fileDialogStart', function(event){
38
- $('#log').append('<li>File dialog start</li>');
39
- })
40
- .bind('fileDialogComplete', function(event, numFilesSelected, numFilesQueued){
41
- $('#log').append('<li>File dialog complete</li>');
42
- })
43
- .bind('uploadStart', function(event, file){
44
- $('#log').append('<li>Upload start - '+file.name+'</li>');
45
- })
46
- .bind('uploadProgress', function(event, file, bytesLoaded){
47
- $('#log').append('<li>Upload progress - '+bytesLoaded+'</li>');
48
- })
49
- .bind('uploadSuccess', function(event, file, serverData){
50
- $('#log').append('<li>Upload success - '+file.name+'</li>');
51
- })
52
- .bind('uploadComplete', function(event, file){
53
- $('#log').append('<li>Upload complete - '+file.name+'</li>');
54
- // upload has completed, lets try the next one in the queue
55
- $(this).swfupload('startUpload');
56
- })
57
- .bind('uploadError', function(event, file, errorCode, message){
58
- $('#log').append('<li>Upload error - '+message+'</li>');
59
- });
60
-
61
- });
62
-
63
- </script>
64
- </head>
65
- <body>
66
-
67
- <div id="swfupload-control">
68
- <ol id="log"></ol>
69
- <input type="button" id="button" />
70
- </div>
71
-
72
- </body>
73
- </html>
@@ -1,123 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <title>SWFUpload Example - Multiple Uploaders</title>
6
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
7
- <script type="text/javascript" src="../vendor/swfupload/swfupload.js"></script>
8
- <script type="text/javascript" src="../src/jquery.swfupload.js"></script>
9
- <script type="text/javascript">
10
-
11
- jQuery.fn.bindAll = function(options) {
12
- var $this = this;
13
- jQuery.each(options, function(key, val){
14
- $this.bind(key, val);
15
- });
16
- return this;
17
- }
18
-
19
- $(function(){
20
-
21
- var listeners = {
22
- swfuploadLoaded: function(event){
23
- $('.log', this).append('<li>Loaded</li>');
24
- },
25
- fileQueued: function(event, file){
26
- $('.log', this).append('<li>File queued - '+file.name+'</li>');
27
- // start the upload once it is queued
28
- // but only if this queue is not disabled
29
- if (!$('input[name=disabled]:checked', this).length) {
30
- $(this).swfupload('startUpload');
31
- }
32
- },
33
- fileQueueError: function(event, file, errorCode, message){
34
- $('.log', this).append('<li>File queue error - '+message+'</li>');
35
- },
36
- fileDialogStart: function(event){
37
- $('.log', this).append('<li>File dialog start</li>');
38
- },
39
- fileDialogComplete: function(event, numFilesSelected, numFilesQueued){
40
- $('.log', this).append('<li>File dialog complete</li>');
41
- },
42
- uploadStart: function(event, file){
43
- $('.log', this).append('<li>Upload start - '+file.name+'</li>');
44
- // don't start the upload if this queue is disabled
45
- if ($('input[name=disabled]:checked', this).length) {
46
- event.preventDefault();
47
- }
48
- },
49
- uploadProgress: function(event, file, bytesLoaded){
50
- $('.log', this).append('<li>Upload progress - '+bytesLoaded+'</li>');
51
- },
52
- uploadSuccess: function(event, file, serverData){
53
- $('.log', this).append('<li>Upload success - '+file.name+'</li>');
54
- },
55
- uploadComplete: function(event, file){
56
- $('.log', this).append('<li>Upload complete - '+file.name+'</li>');
57
- // upload has completed, lets try the next one in the queue
58
- // but only if this queue is not disabled
59
- if (!$('input[name=disabled]:checked', this).length) {
60
- $(this).swfupload('startUpload');
61
- }
62
- },
63
- uploadError: function(event, file, errorCode, message){
64
- $('.log', this).append('<li>Upload error - '+message+'</li>');
65
- }
66
- };
67
-
68
- $('.swfupload-control').bindAll(listeners);
69
-
70
-
71
- // start the queue if the queue is already disabled
72
- $('.swfupload-control input[name=disabled]').click(function(){
73
- if (!this.checked) {
74
- $(this).parents('.swfupload-control').swfupload('startUpload');
75
- }
76
- });
77
-
78
- });
79
-
80
- $(function(){
81
- $('.swfupload-control').each(function(){
82
- $(this).swfupload({
83
- upload_url: "upload.php",
84
- file_size_limit : "10240",
85
- file_types : "*.*",
86
- file_types_description : "All Files",
87
- file_upload_limit : "0",
88
- flash_url : "../vendor/swfupload/swfupload.swf",
89
- button_image_url : '../vendor/swfupload/XPButtonUploadText_61x22.png',
90
- button_width : 61,
91
- button_height : 22,
92
- button_placeholder : $('.button', this)[0],
93
- debug: true
94
- });
95
- });
96
- });
97
-
98
- </script>
99
- </head>
100
- <body>
101
-
102
- <div style="width:48%;float:left;">
103
-
104
- <div class="swfupload-control">
105
- <label><input type="checkbox" name="disabled" /> Disabled</label>
106
- <ol class="log"></ol>
107
- <input type="button" class="button" />
108
- </div>
109
-
110
- </div>
111
-
112
- <div style="width:48%;float:right;">
113
-
114
- <div class="swfupload-control">
115
- <label><input type="checkbox" name="disabled" /> Disabled</label>
116
- <ol class="log"></ol>
117
- <input type="button" class="button" />
118
- </div>
119
-
120
- </div>
121
-
122
- </body>
123
- </html>
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- // we don't actually save the file, since this is just a demo - we just say that we did
4
-
5
- echo '1';
6
-
7
- ?>
@@ -1,64 +0,0 @@
1
- /*
2
- * SWFUpload jQuery Plugin v1.0.0
3
- *
4
- * Copyright (c) 2009 Adam Royle
5
- * Licensed under the MIT license.
6
- *
7
- */
8
-
9
- (function($){
10
-
11
- var defaultHandlers = ['swfupload_loaded_handler','file_queued_handler','file_queue_error_handler','file_dialog_start_handler','file_dialog_complete_handler','upload_start_handler','upload_progress_handler','upload_error_handler','upload_success_handler','upload_complete_handler','queue_complete_handler'];
12
- var additionalHandlers = [];
13
-
14
- $.fn.swfupload = function(){
15
- var args = $.makeArray(arguments);
16
- return this.each(function(){
17
- var swfu;
18
- if (args.length == 1 && typeof(args[0]) == 'object') {
19
- swfu = $(this).data('__swfu');
20
- if (!swfu) {
21
- var settings = args[0];
22
- var $magicUploadControl = $(this);
23
- var handlers = [];
24
- $.merge(handlers, defaultHandlers);
25
- $.merge(handlers, additionalHandlers);
26
- $.each(handlers, function(i, v){
27
- var eventName = v.replace(/_handler$/, '').replace(/_([a-z])/g, function(){ return arguments[1].toUpperCase(); });
28
- settings[v] = function() {
29
- var event = $.Event(eventName);
30
- $magicUploadControl.trigger(event, $.makeArray(arguments));
31
- return !event.isDefaultPrevented();
32
- };
33
- });
34
- $(this).data('__swfu', new SWFUpload(settings));
35
- }
36
- } else if (args.length > 0 && typeof(args[0]) == 'string') {
37
- var methodName = args.shift();
38
- swfu = $(this).data('__swfu');
39
- if (swfu && swfu[methodName]) {
40
- swfu[methodName].apply(swfu, args);
41
- }
42
- }
43
- });
44
- };
45
-
46
- $.swfupload = {
47
- additionalHandlers: function() {
48
- if (arguments.length === 0) {
49
- return additionalHandlers.slice();
50
- } else {
51
- $(arguments).each(function(i, v){
52
- $.merge(additionalHandlers, $.makeArray(v));
53
- });
54
- }
55
- },
56
- defaultHandlers: function() {
57
- return defaultHandlers.slice();
58
- },
59
- getInstance: function(el) {
60
- return $(el).data('__swfu');
61
- }
62
- };
63
-
64
- })(jQuery);