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
@@ -1,99 +0,0 @@
1
- /*
2
- Queue Plug-in
3
-
4
- Features:
5
- *Adds a cancelQueue() method for cancelling the entire queue.
6
- *All queued files are uploaded when startUpload() is called.
7
- *If false is returned from uploadComplete then the queue upload is stopped.
8
- If false is not returned (strict comparison) then the queue upload is continued.
9
- *Adds a QueueComplete event that is fired when all the queued files have finished uploading.
10
- Set the event handler with the queue_complete_handler setting.
11
-
12
- */
13
-
14
- var SWFUpload;
15
- if (typeof(SWFUpload) === "function") {
16
- SWFUpload.queue = {};
17
-
18
- SWFUpload.prototype.initSettings = (function (oldInitSettings) {
19
- return function () {
20
- if (typeof(oldInitSettings) === "function") {
21
- oldInitSettings.call(this);
22
- }
23
-
24
- this.queueSettings = {};
25
-
26
- this.queueSettings.queue_cancelled_flag = false;
27
- this.queueSettings.queue_upload_count = 0;
28
-
29
- this.queueSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
30
- this.queueSettings.user_upload_start_handler = this.settings.upload_start_handler;
31
- this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler;
32
- this.settings.upload_start_handler = SWFUpload.queue.uploadStartHandler;
33
-
34
- this.settings.queue_complete_handler = this.settings.queue_complete_handler || null;
35
- };
36
- })(SWFUpload.prototype.initSettings);
37
-
38
- SWFUpload.prototype.startUpload = function (fileID) {
39
- this.queueSettings.queue_cancelled_flag = false;
40
- this.callFlash("StartUpload", [fileID]);
41
- };
42
-
43
- SWFUpload.prototype.cancelQueue = function () {
44
- this.queueSettings.queue_cancelled_flag = true;
45
- this.stopUpload();
46
-
47
- var stats = this.getStats();
48
- while (stats.files_queued > 0) {
49
- this.cancelUpload();
50
- stats = this.getStats();
51
- }
52
- };
53
-
54
- SWFUpload.queue.uploadStartHandler = function (file) {
55
- var returnValue;
56
- if (typeof(this.queueSettings.user_upload_start_handler) === "function") {
57
- returnValue = this.queueSettings.user_upload_start_handler.call(this, file);
58
- }
59
-
60
- // To prevent upload a real "FALSE" value must be returned, otherwise default to a real "TRUE" value.
61
- returnValue = (returnValue === false) ? false : true;
62
-
63
- this.queueSettings.queue_cancelled_flag = !returnValue;
64
-
65
- return returnValue;
66
- };
67
-
68
- SWFUpload.queue.uploadCompleteHandler = function (file) {
69
- var user_upload_complete_handler = this.queueSettings.user_upload_complete_handler;
70
- var continueUpload;
71
-
72
- if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) {
73
- this.queueSettings.queue_upload_count++;
74
- }
75
-
76
- if (typeof(user_upload_complete_handler) === "function") {
77
- continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true;
78
- } else if (file.filestatus === SWFUpload.FILE_STATUS.QUEUED) {
79
- // If the file was stopped and re-queued don't restart the upload
80
- continueUpload = false;
81
- } else {
82
- continueUpload = true;
83
- }
84
-
85
- if (continueUpload) {
86
- var stats = this.getStats();
87
- if (stats.files_queued > 0 && this.queueSettings.queue_cancelled_flag === false) {
88
- this.startUpload();
89
- } else if (this.queueSettings.queue_cancelled_flag === false) {
90
- console.debug('ydfsdfgsdfgsdfg');
91
- this.queueEvent("queue_complete_handler", [this.queueSettings.queue_upload_count]);
92
- this.queueSettings.queue_upload_count = 0;
93
- } else {
94
- this.queueSettings.queue_cancelled_flag = false;
95
- this.queueSettings.queue_upload_count = 0;
96
- }
97
- }
98
- };
99
- }
@@ -1,11 +0,0 @@
1
- require 'applicious_utils/view_helpers'
2
-
3
- module AppliciousUtils
4
- class AppliciousRailtie < Rails::Railtie
5
-
6
- initializer "applicious_utils.view_helpers" do
7
- ActionView::Base.send :include, ViewHelpers
8
- end
9
-
10
- end
11
- end
@@ -1,16 +0,0 @@
1
- module AppliciousUtils
2
- module ViewHelpers
3
-
4
- def applicious_assets
5
- asset_tags = ''
6
- #asset_tags << javascript_include_tag "applicious_utils"
7
- #asset_tags << stylesheet_link_tag "applicious_utils"
8
- return asset_tags
9
- end
10
-
11
- def pre(text)
12
- content_tag :pre, text
13
- end
14
-
15
- end
16
- end