uploader 0.2.4 → 0.2.5

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.
@@ -1,77 +1,98 @@
1
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
- */
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
13
 
14
14
  var SWFUpload;
15
15
  if (typeof(SWFUpload) === "function") {
16
16
  SWFUpload.queue = {};
17
-
17
+
18
18
  SWFUpload.prototype.initSettings = (function (oldInitSettings) {
19
19
  return function () {
20
20
  if (typeof(oldInitSettings) === "function") {
21
21
  oldInitSettings.call(this);
22
22
  }
23
-
24
- this.customSettings.queue_cancelled_flag = false;
25
- this.customSettings.queue_upload_count = 0;
26
-
27
- this.settings.user_upload_complete_handler = this.settings.upload_complete_handler;
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;
28
31
  this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler;
29
-
32
+ this.settings.upload_start_handler = SWFUpload.queue.uploadStartHandler;
33
+
30
34
  this.settings.queue_complete_handler = this.settings.queue_complete_handler || null;
31
35
  };
32
- })(SWFUpload.prototype.initSettings);
36
+ })(SWFUpload.prototype.initSettings);
33
37
 
34
- SWFUpload.prototype.startUpload = function (fileID) {
35
- this.customSettings.queue_cancelled_flag = false;
36
- this.callFlash("StartUpload", false, [fileID]);
37
- };
38
+ SWFUpload.prototype.startUpload = function (fileID) {
39
+ this.queueSettings.queue_cancelled_flag = false;
40
+ this.callFlash("StartUpload", [fileID]);
41
+ };
38
42
 
39
- SWFUpload.prototype.cancelQueue = function () {
40
- this.customSettings.queue_cancelled_flag = true;
41
- this.stopUpload();
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;
42
64
 
43
- var stats = this.getStats();
44
- while (stats.files_queued > 0) {
45
- this.cancelUpload();
46
- stats = this.getStats();
47
- }
48
- };
49
-
50
- SWFUpload.queue.uploadCompleteHandler = function (file) {
51
- var user_upload_complete_handler = this.settings.user_upload_complete_handler;
52
- var continueUpload;
53
-
54
- if (file.file_status === SWFUpload.FILE_STATUS.COMPLETE) {
55
- this.customSettings.queue_upload_count++;
56
- }
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
+ }
57
75
 
58
- if (typeof(user_upload_complete_handler) === "function") {
59
- continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true;
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
+ this.queueEvent("queue_complete_handler", [this.queueSettings.queue_upload_count]);
91
+ this.queueSettings.queue_upload_count = 0;
60
92
  } else {
61
- continueUpload = true;
62
- }
63
-
64
- if (continueUpload) {
65
- var stats = this.getStats();
66
- if (stats.files_queued > 0 && this.customSettings.queue_cancelled_flag === false) {
67
- this.startUpload();
68
- } else if (this.customSettings.queue_cancelled_flag === false) {
69
- this.queueEvent("queue_complete_handler", [this.customSettings.queue_upload_count]);
70
- this.customSettings.queue_upload_count = 0;
71
- } else {
72
- this.customSettings.queue_cancelled_flag = false;
73
- this.customSettings.queue_upload_count = 0;
74
- }
93
+ this.queueSettings.queue_cancelled_flag = false;
94
+ this.queueSettings.queue_upload_count = 0;
75
95
  }
76
- };
77
- }
96
+ }
97
+ };
98
+ }
@@ -0,0 +1,342 @@
1
+ /*
2
+ Speed Plug-in
3
+
4
+ Features:
5
+ *Adds several properties to the 'file' object indicated upload speed, time left, upload time, etc.
6
+ - currentSpeed -- String indicating the upload speed, bytes per second
7
+ - averageSpeed -- Overall average upload speed, bytes per second
8
+ - movingAverageSpeed -- Speed over averaged over the last several measurements, bytes per second
9
+ - timeRemaining -- Estimated remaining upload time in seconds
10
+ - timeElapsed -- Number of seconds passed for this upload
11
+ - percentUploaded -- Percentage of the file uploaded (0 to 100)
12
+ - sizeUploaded -- Formatted size uploaded so far, bytes
13
+
14
+ *Adds setting 'moving_average_history_size' for defining the window size used to calculate the moving average speed.
15
+
16
+ *Adds several Formatting functions for formatting that values provided on the file object.
17
+ - SWFUpload.speed.formatBPS(bps) -- outputs string formatted in the best units (Gbps, Mbps, Kbps, bps)
18
+ - SWFUpload.speed.formatTime(seconds) -- outputs string formatted in the best units (x Hr y M z S)
19
+ - SWFUpload.speed.formatSize(bytes) -- outputs string formatted in the best units (w GB x MB y KB z B )
20
+ - SWFUpload.speed.formatPercent(percent) -- outputs string formatted with a percent sign (x.xx %)
21
+ - SWFUpload.speed.formatUnits(baseNumber, divisionArray, unitLabelArray, fractionalBoolean)
22
+ - Formats a number using the division array to determine how to apply the labels in the Label Array
23
+ - factionalBoolean indicates whether the number should be returned as a single fractional number with a unit (speed)
24
+ or as several numbers labeled with units (time)
25
+ */
26
+
27
+ var SWFUpload;
28
+ if (typeof(SWFUpload) === "function") {
29
+ SWFUpload.speed = {};
30
+
31
+ SWFUpload.prototype.initSettings = (function (oldInitSettings) {
32
+ return function () {
33
+ if (typeof(oldInitSettings) === "function") {
34
+ oldInitSettings.call(this);
35
+ }
36
+
37
+ this.ensureDefault = function (settingName, defaultValue) {
38
+ this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
39
+ };
40
+
41
+ // List used to keep the speed stats for the files we are tracking
42
+ this.fileSpeedStats = {};
43
+ this.speedSettings = {};
44
+
45
+ this.ensureDefault("moving_average_history_size", "10");
46
+
47
+ this.speedSettings.user_file_queued_handler = this.settings.file_queued_handler;
48
+ this.speedSettings.user_file_queue_error_handler = this.settings.file_queue_error_handler;
49
+ this.speedSettings.user_upload_start_handler = this.settings.upload_start_handler;
50
+ this.speedSettings.user_upload_error_handler = this.settings.upload_error_handler;
51
+ this.speedSettings.user_upload_progress_handler = this.settings.upload_progress_handler;
52
+ this.speedSettings.user_upload_success_handler = this.settings.upload_success_handler;
53
+ this.speedSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
54
+
55
+ this.settings.file_queued_handler = SWFUpload.speed.fileQueuedHandler;
56
+ this.settings.file_queue_error_handler = SWFUpload.speed.fileQueueErrorHandler;
57
+ this.settings.upload_start_handler = SWFUpload.speed.uploadStartHandler;
58
+ this.settings.upload_error_handler = SWFUpload.speed.uploadErrorHandler;
59
+ this.settings.upload_progress_handler = SWFUpload.speed.uploadProgressHandler;
60
+ this.settings.upload_success_handler = SWFUpload.speed.uploadSuccessHandler;
61
+ this.settings.upload_complete_handler = SWFUpload.speed.uploadCompleteHandler;
62
+
63
+ delete this.ensureDefault;
64
+ };
65
+ })(SWFUpload.prototype.initSettings);
66
+
67
+
68
+ SWFUpload.speed.fileQueuedHandler = function (file) {
69
+ if (typeof this.speedSettings.user_file_queued_handler === "function") {
70
+ file = SWFUpload.speed.extendFile(file);
71
+
72
+ return this.speedSettings.user_file_queued_handler.call(this, file);
73
+ }
74
+ };
75
+
76
+ SWFUpload.speed.fileQueueErrorHandler = function (file, errorCode, message) {
77
+ if (typeof this.speedSettings.user_file_queue_error_handler === "function") {
78
+ file = SWFUpload.speed.extendFile(file);
79
+
80
+ return this.speedSettings.user_file_queue_error_handler.call(this, file, errorCode, message);
81
+ }
82
+ };
83
+
84
+ SWFUpload.speed.uploadStartHandler = function (file) {
85
+ if (typeof this.speedSettings.user_upload_start_handler === "function") {
86
+ file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
87
+ return this.speedSettings.user_upload_start_handler.call(this, file);
88
+ }
89
+ };
90
+
91
+ SWFUpload.speed.uploadErrorHandler = function (file, errorCode, message) {
92
+ file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
93
+ SWFUpload.speed.removeTracking(file, this.fileSpeedStats);
94
+
95
+ if (typeof this.speedSettings.user_upload_error_handler === "function") {
96
+ return this.speedSettings.user_upload_error_handler.call(this, file, errorCode, message);
97
+ }
98
+ };
99
+ SWFUpload.speed.uploadProgressHandler = function (file, bytesComplete, bytesTotal) {
100
+ this.updateTracking(file, bytesComplete);
101
+ file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
102
+
103
+ if (typeof this.speedSettings.user_upload_progress_handler === "function") {
104
+ return this.speedSettings.user_upload_progress_handler.call(this, file, bytesComplete, bytesTotal);
105
+ }
106
+ };
107
+
108
+ SWFUpload.speed.uploadSuccessHandler = function (file, serverData) {
109
+ if (typeof this.speedSettings.user_upload_success_handler === "function") {
110
+ file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
111
+ return this.speedSettings.user_upload_success_handler.call(this, file, serverData);
112
+ }
113
+ };
114
+ SWFUpload.speed.uploadCompleteHandler = function (file) {
115
+ file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
116
+ SWFUpload.speed.removeTracking(file, this.fileSpeedStats);
117
+
118
+ if (typeof this.speedSettings.user_upload_complete_handler === "function") {
119
+ return this.speedSettings.user_upload_complete_handler.call(this, file);
120
+ }
121
+ };
122
+
123
+ // Private: extends the file object with the speed plugin values
124
+ SWFUpload.speed.extendFile = function (file, trackingList) {
125
+ var tracking;
126
+
127
+ if (trackingList) {
128
+ tracking = trackingList[file.id];
129
+ }
130
+
131
+ if (tracking) {
132
+ file.currentSpeed = tracking.currentSpeed;
133
+ file.averageSpeed = tracking.averageSpeed;
134
+ file.movingAverageSpeed = tracking.movingAverageSpeed;
135
+ file.timeRemaining = tracking.timeRemaining;
136
+ file.timeElapsed = tracking.timeElapsed;
137
+ file.percentUploaded = tracking.percentUploaded;
138
+ file.sizeUploaded = tracking.bytesUploaded;
139
+
140
+ } else {
141
+ file.currentSpeed = 0;
142
+ file.averageSpeed = 0;
143
+ file.movingAverageSpeed = 0;
144
+ file.timeRemaining = 0;
145
+ file.timeElapsed = 0;
146
+ file.percentUploaded = 0;
147
+ file.sizeUploaded = 0;
148
+ }
149
+
150
+ return file;
151
+ };
152
+
153
+ // Private: Updates the speed tracking object, or creates it if necessary
154
+ SWFUpload.prototype.updateTracking = function (file, bytesUploaded) {
155
+ var tracking = this.fileSpeedStats[file.id];
156
+ if (!tracking) {
157
+ this.fileSpeedStats[file.id] = tracking = {};
158
+ }
159
+
160
+ // Sanity check inputs
161
+ bytesUploaded = bytesUploaded || tracking.bytesUploaded || 0;
162
+ if (bytesUploaded < 0) {
163
+ bytesUploaded = 0;
164
+ }
165
+ if (bytesUploaded > file.size) {
166
+ bytesUploaded = file.size;
167
+ }
168
+
169
+ var tickTime = (new Date()).getTime();
170
+ if (!tracking.startTime) {
171
+ tracking.startTime = (new Date()).getTime();
172
+ tracking.lastTime = tracking.startTime;
173
+ tracking.currentSpeed = 0;
174
+ tracking.averageSpeed = 0;
175
+ tracking.movingAverageSpeed = 0;
176
+ tracking.movingAverageHistory = [];
177
+ tracking.timeRemaining = 0;
178
+ tracking.timeElapsed = 0;
179
+ tracking.percentUploaded = bytesUploaded / file.size;
180
+ tracking.bytesUploaded = bytesUploaded;
181
+ } else if (tracking.startTime > tickTime) {
182
+ this.debug("When backwards in time");
183
+ } else {
184
+ // Get time and deltas
185
+ var now = (new Date()).getTime();
186
+ var lastTime = tracking.lastTime;
187
+ var deltaTime = now - lastTime;
188
+ var deltaBytes = bytesUploaded - tracking.bytesUploaded;
189
+
190
+ if (deltaBytes === 0 || deltaTime === 0) {
191
+ return tracking;
192
+ }
193
+
194
+ // Update tracking object
195
+ tracking.lastTime = now;
196
+ tracking.bytesUploaded = bytesUploaded;
197
+
198
+ // Calculate speeds
199
+ tracking.currentSpeed = (deltaBytes * 8 ) / (deltaTime / 1000);
200
+ tracking.averageSpeed = (tracking.bytesUploaded * 8) / ((now - tracking.startTime) / 1000);
201
+
202
+ // Calculate moving average
203
+ tracking.movingAverageHistory.push(tracking.currentSpeed);
204
+ if (tracking.movingAverageHistory.length > this.settings.moving_average_history_size) {
205
+ tracking.movingAverageHistory.shift();
206
+ }
207
+
208
+ tracking.movingAverageSpeed = SWFUpload.speed.calculateMovingAverage(tracking.movingAverageHistory);
209
+
210
+ // Update times
211
+ tracking.timeRemaining = (file.size - tracking.bytesUploaded) * 8 / tracking.movingAverageSpeed;
212
+ tracking.timeElapsed = (now - tracking.startTime) / 1000;
213
+
214
+ // Update percent
215
+ tracking.percentUploaded = (tracking.bytesUploaded / file.size * 100);
216
+ }
217
+
218
+ return tracking;
219
+ };
220
+ SWFUpload.speed.removeTracking = function (file, trackingList) {
221
+ try {
222
+ trackingList[file.id] = null;
223
+ delete trackingList[file.id];
224
+ } catch (ex) {
225
+ }
226
+ };
227
+
228
+ SWFUpload.speed.formatUnits = function (baseNumber, unitDivisors, unitLabels, singleFractional) {
229
+ var i, unit, unitDivisor, unitLabel;
230
+
231
+ if (baseNumber === 0) {
232
+ return "0 " + unitLabels[unitLabels.length - 1];
233
+ }
234
+
235
+ if (singleFractional) {
236
+ unit = baseNumber;
237
+ unitLabel = unitLabels.length >= unitDivisors.length ? unitLabels[unitDivisors.length - 1] : "";
238
+ for (i = 0; i < unitDivisors.length; i++) {
239
+ if (baseNumber >= unitDivisors[i]) {
240
+ unit = (baseNumber / unitDivisors[i]).toFixed(2);
241
+ unitLabel = unitLabels.length >= i ? " " + unitLabels[i] : "";
242
+ break;
243
+ }
244
+ }
245
+
246
+ return unit + unitLabel;
247
+ } else {
248
+ var formattedStrings = [];
249
+ var remainder = baseNumber;
250
+
251
+ for (i = 0; i < unitDivisors.length; i++) {
252
+ unitDivisor = unitDivisors[i];
253
+ unitLabel = unitLabels.length > i ? " " + unitLabels[i] : "";
254
+
255
+ unit = remainder / unitDivisor;
256
+ if (i < unitDivisors.length -1) {
257
+ unit = Math.floor(unit);
258
+ } else {
259
+ unit = unit.toFixed(2);
260
+ }
261
+ if (unit > 0) {
262
+ remainder = remainder % unitDivisor;
263
+
264
+ formattedStrings.push(unit + unitLabel);
265
+ }
266
+ }
267
+
268
+ return formattedStrings.join(" ");
269
+ }
270
+ };
271
+
272
+ SWFUpload.speed.formatBPS = function (baseNumber) {
273
+ var bpsUnits = [1073741824, 1048576, 1024, 1], bpsUnitLabels = ["Gbps", "Mbps", "Kbps", "bps"];
274
+ return SWFUpload.speed.formatUnits(baseNumber, bpsUnits, bpsUnitLabels, true);
275
+
276
+ };
277
+ SWFUpload.speed.formatTime = function (baseNumber) {
278
+ var timeUnits = [86400, 3600, 60, 1], timeUnitLabels = ["d", "h", "m", "s"];
279
+ return SWFUpload.speed.formatUnits(baseNumber, timeUnits, timeUnitLabels, false);
280
+
281
+ };
282
+ SWFUpload.speed.formatBytes = function (baseNumber) {
283
+ var sizeUnits = [1073741824, 1048576, 1024, 1], sizeUnitLabels = ["GB", "MB", "KB", "bytes"];
284
+ return SWFUpload.speed.formatUnits(baseNumber, sizeUnits, sizeUnitLabels, true);
285
+
286
+ };
287
+ SWFUpload.speed.formatPercent = function (baseNumber) {
288
+ return baseNumber.toFixed(2) + " %";
289
+ };
290
+
291
+ SWFUpload.speed.calculateMovingAverage = function (history) {
292
+ var vals = [], size, sum = 0.0, mean = 0.0, varianceTemp = 0.0, variance = 0.0, standardDev = 0.0;
293
+ var i;
294
+ var mSum = 0, mCount = 0;
295
+
296
+ size = history.length;
297
+
298
+ // Check for sufficient data
299
+ if (size >= 8) {
300
+ // Clone the array and Calculate sum of the values
301
+ for (i = 0; i < size; i++) {
302
+ vals[i] = history[i];
303
+ sum += vals[i];
304
+ }
305
+
306
+ mean = sum / size;
307
+
308
+ // Calculate variance for the set
309
+ for (i = 0; i < size; i++) {
310
+ varianceTemp += Math.pow((vals[i] - mean), 2);
311
+ }
312
+
313
+ variance = varianceTemp / size;
314
+ standardDev = Math.sqrt(variance);
315
+
316
+ //Standardize the Data
317
+ for (i = 0; i < size; i++) {
318
+ vals[i] = (vals[i] - mean) / standardDev;
319
+ }
320
+
321
+ // Calculate the average excluding outliers
322
+ var deviationRange = 2.0;
323
+ for (i = 0; i < size; i++) {
324
+
325
+ if (vals[i] <= deviationRange && vals[i] >= -deviationRange) {
326
+ mCount++;
327
+ mSum += history[i];
328
+ }
329
+ }
330
+
331
+ } else {
332
+ // Calculate the average (not enough data points to remove outliers)
333
+ mCount = size;
334
+ for (i = 0; i < size; i++) {
335
+ mSum += history[i];
336
+ }
337
+ }
338
+
339
+ return mSum / mCount;
340
+ };
341
+
342
+ }
@@ -38,11 +38,12 @@
38
38
  */
39
39
 
40
40
 
41
- /* SWFObject v2.0 rc4 <http://code.google.com/p/swfobject/>
42
- Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
41
+ /* SWFObject v2.1 <http://code.google.com/p/swfobject/>
42
+ Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
43
43
  This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
44
44
  */
45
- var swfobject=function(){var X="undefined",P="object",a="visibility:visible",e="visibility:hidden",B="Shockwave Flash",h="ShockwaveFlash.ShockwaveFlash",V="application/x-shockwave-flash",K="SWFObjectExprInst",G=window,g=document,N=navigator,f=[],H=[],Q=null,L=null,S=false,C=false;var Y=function(){var l=typeof g.getElementById!=X&&typeof g.getElementsByTagName!=X&&typeof g.createElement!=X&&typeof g.appendChild!=X&&typeof g.replaceChild!=X&&typeof g.removeChild!=X&&typeof g.cloneNode!=X,t=[0,0,0],n=null;if(typeof N.plugins!=X&&typeof N.plugins[B]==P){n=N.plugins[B].description;if(n){n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1");t[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10);t[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10);t[2]=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof G.ActiveXObject!=X){var o=null,s=false;try{o=new ActiveXObject(h+".7")}catch(k){try{o=new ActiveXObject(h+".6");t=[6,0,21];o.AllowScriptAccess="always"}catch(k){if(t[0]==6){s=true}}if(!s){try{o=new ActiveXObject(h)}catch(k){}}}if(!s&&o){try{n=o.GetVariable("$version");if(n){n=n.split(" ")[1].split(",");t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]}}catch(k){}}}}var v=N.userAgent.toLowerCase(),j=N.platform.toLowerCase(),r=/webkit/.test(v)?parseFloat(v.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,i=false,q=j?/win/.test(j):/win/.test(v),m=j?/mac/.test(j):/mac/.test(v);/*@cc_on i=true;@if(@_win32)q=true;@elif(@_mac)m=true;@end@*/return{w3cdom:l,pv:t,webkit:r,ie:i,win:q,mac:m}}();var d=function(){if(!Y.w3cdom){return }J(I);if(Y.ie&&Y.win){try{g.write("<script id=__ie_ondomload defer=true src=//:><\/script>");var i=b("__ie_ondomload");if(i){i.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);U()}}}}catch(j){}}if(Y.webkit&&typeof g.readyState!=X){Q=setInterval(function(){if(/loaded|complete/.test(g.readyState)){U()}},10)}if(typeof g.addEventListener!=X){g.addEventListener("DOMContentLoaded",U,null)}M(U)}();function U(){if(S){return }if(Y.ie&&Y.win){var m=W("span");try{var l=g.getElementsByTagName("body")[0].appendChild(m);l.parentNode.removeChild(l)}catch(n){return }}S=true;if(Q){clearInterval(Q);Q=null}var j=f.length;for(var k=0;k<j;k++){f[k]()}}function J(i){if(S){i()}else{f[f.length]=i}}function M(j){if(typeof G.addEventListener!=X){G.addEventListener("load",j,false)}else{if(typeof g.addEventListener!=X){g.addEventListener("load",j,false)}else{if(typeof G.attachEvent!=X){G.attachEvent("onload",j)}else{if(typeof G.onload=="function"){var i=G.onload;G.onload=function(){i();j()}}else{G.onload=j}}}}}function I(){var l=H.length;for(var j=0;j<l;j++){var m=H[j].id;if(Y.pv[0]>0){var k=b(m);if(k){H[j].width=k.getAttribute("width")?k.getAttribute("width"):"0";H[j].height=k.getAttribute("height")?k.getAttribute("height"):"0";if(O(H[j].swfVersion)){if(Y.webkit&&Y.webkit<312){T(k)}}else{if(H[j].expressInstall&&!C&&O("6.0.65")&&(Y.win||Y.mac)){D(H[j])}else{c(k)}}}}A("#"+m,a)}}function T(m){var k=m.getElementsByTagName(P)[0];if(k){var p=W("embed"),r=k.attributes;if(r){var o=r.length;for(var n=0;n<o;n++){if(r[n].nodeName.toLowerCase()=="data"){p.setAttribute("src",r[n].nodeValue)}else{p.setAttribute(r[n].nodeName,r[n].nodeValue)}}}var q=k.childNodes;if(q){var s=q.length;for(var l=0;l<s;l++){if(q[l].nodeType==1&&q[l].nodeName.toLowerCase()=="param"){p.setAttribute(q[l].getAttribute("name"),q[l].getAttribute("value"))}}}m.parentNode.replaceChild(p,m)}}function F(i){if(Y.ie&&Y.win&&O("8.0.0")){G.attachEvent("onunload",function(){var k=b(i);for(var j in k){if(typeof k[j]=="function"){k[j]=function(){}}}k.parentNode.removeChild(k)})}}function D(j){C=true;var o=b(j.id);if(o){if(j.altContentId){var l=b(j.altContentId);if(l){L=l}}else{L=Z(o)}if(!(/%$/.test(j.width))&&parseInt(j.width,10)<310){j.width="310"}if(!(/%$/.test(j.height))&&parseInt(j.height,10)<137){j.height="137"}g.title=g.title.slice(0,47)+" - Flash Player Installation";var n=Y.ie&&Y.win?"ActiveX":"PlugIn",k=g.title,m="MMredirectURL="+G.location+"&MMplayerType="+n+"&MMdoctitle="+k,p=j.id;if(Y.ie&&Y.win&&o.readyState!=4){var i=W("div");p+="SWFObjectNew";i.setAttribute("id",p);o.parentNode.insertBefore(i,o);o.style.display="none";G.attachEvent("onload",function(){o.parentNode.removeChild(o)})}R({data:j.expressInstall,id:K,width:j.width,height:j.height},{flashvars:m},p)}}function c(j){if(Y.ie&&Y.win&&j.readyState!=4){var i=W("div");j.parentNode.insertBefore(i,j);i.parentNode.replaceChild(Z(j),i);j.style.display="none";G.attachEvent("onload",function(){j.parentNode.removeChild(j)})}else{j.parentNode.replaceChild(Z(j),j)}}function Z(n){var m=W("div");if(Y.win&&Y.ie){m.innerHTML=n.innerHTML}else{var k=n.getElementsByTagName(P)[0];if(k){var o=k.childNodes;if(o){var j=o.length;for(var l=0;l<j;l++){if(!(o[l].nodeType==1&&o[l].nodeName.toLowerCase()=="param")&&!(o[l].nodeType==8)){m.appendChild(o[l].cloneNode(true))}}}}}return m}function R(AE,AC,q){var p,t=b(q);if(typeof AE.id==X){AE.id=q}if(Y.ie&&Y.win){var AD="";for(var z in AE){if(AE[z]!=Object.prototype[z]){if(z=="data"){AC.movie=AE[z]}else{if(z.toLowerCase()=="styleclass"){AD+=' class="'+AE[z]+'"'}else{if(z!="classid"){AD+=" "+z+'="'+AE[z]+'"'}}}}}var AB="";for(var y in AC){if(AC[y]!=Object.prototype[y]){AB+='<param name="'+y+'" value="'+AC[y]+'" />'}}t.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AD+">"+AB+"</object>";F(AE.id);p=b(AE.id)}else{if(Y.webkit&&Y.webkit<312){var AA=W("embed");AA.setAttribute("type",V);for(var x in AE){if(AE[x]!=Object.prototype[x]){if(x=="data"){AA.setAttribute("src",AE[x])}else{if(x.toLowerCase()=="styleclass"){AA.setAttribute("class",AE[x])}else{if(x!="classid"){AA.setAttribute(x,AE[x])}}}}}for(var w in AC){if(AC[w]!=Object.prototype[w]){if(w!="movie"){AA.setAttribute(w,AC[w])}}}t.parentNode.replaceChild(AA,t);p=AA}else{var s=W(P);s.setAttribute("type",V);for(var v in AE){if(AE[v]!=Object.prototype[v]){if(v.toLowerCase()=="styleclass"){s.setAttribute("class",AE[v])}else{if(v!="classid"){s.setAttribute(v,AE[v])}}}}for(var u in AC){if(AC[u]!=Object.prototype[u]&&u!="movie"){E(s,u,AC[u])}}t.parentNode.replaceChild(s,t);p=s}}return p}function E(k,i,j){var l=W("param");l.setAttribute("name",i);l.setAttribute("value",j);k.appendChild(l)}function b(i){return g.getElementById(i)}function W(i){return g.createElement(i)}function O(k){var j=Y.pv,i=k.split(".");i[0]=parseInt(i[0],10);i[1]=parseInt(i[1],10);i[2]=parseInt(i[2],10);return(j[0]>i[0]||(j[0]==i[0]&&j[1]>i[1])||(j[0]==i[0]&&j[1]==i[1]&&j[2]>=i[2]))?true:false}function A(m,j){if(Y.ie&&Y.mac){return }var l=g.getElementsByTagName("head")[0],k=W("style");k.setAttribute("type","text/css");k.setAttribute("media","screen");if(!(Y.ie&&Y.win)&&typeof g.createTextNode!=X){k.appendChild(g.createTextNode(m+" {"+j+"}"))}l.appendChild(k);if(Y.ie&&Y.win&&typeof g.styleSheets!=X&&g.styleSheets.length>0){var i=g.styleSheets[g.styleSheets.length-1];if(typeof i.addRule==P){i.addRule(m,j)}}}return{registerObject:function(l,i,k){if(!Y.w3cdom||!l||!i){return }var j={};j.id=l;j.swfVersion=i;j.expressInstall=k?k:false;H[H.length]=j;A("#"+l,e)},getObjectById:function(l){var i=null;if(Y.w3cdom&&S){var j=b(l);if(j){var k=j.getElementsByTagName(P)[0];if(!k||(k&&typeof j.SetVariable!=X)){i=j}else{if(typeof k.SetVariable!=X){i=k}}}}return i},embedSWF:function(n,u,r,t,j,m,k,p,s){if(!Y.w3cdom||!n||!u||!r||!t||!j){return }r+="";t+="";if(O(j)){A("#"+u,e);var q=(typeof s==P)?s:{};q.data=n;q.width=r;q.height=t;var o=(typeof p==P)?p:{};if(typeof k==P){for(var l in k){if(k[l]!=Object.prototype[l]){if(typeof o.flashvars!=X){o.flashvars+="&"+l+"="+k[l]}else{o.flashvars=l+"="+k[l]}}}}J(function(){R(q,o,u);A("#"+u,a)})}else{if(m&&!C&&O("6.0.65")&&(Y.win||Y.mac)){A("#"+u,e);J(function(){var i={};i.id=i.altContentId=u;i.width=r;i.height=t;i.expressInstall=m;D(i);A("#"+u,a)})}}},getFlashPlayerVersion:function(){return{major:Y.pv[0],minor:Y.pv[1],release:Y.pv[2]}},hasFlashPlayerVersion:O,createSWF:function(k,j,i){if(Y.w3cdom&&S){return R(k,j,i)}else{return undefined}},createCSS:function(j,i){if(Y.w3cdom){A(j,i)}},addDomLoadEvent:J,addLoadEvent:M,getQueryParamValue:function(m){var l=g.location.search||g.location.hash;if(m==null){return l}if(l){var k=l.substring(1).split("&");for(var j=0;j<k.length;j++){if(k[j].substring(0,k[j].indexOf("="))==m){return k[j].substring((k[j].indexOf("=")+1))}}}return""},expressInstallCallback:function(){if(C&&L){var i=b(K);if(i){i.parentNode.replaceChild(L,i);L=null;C=false}}}}}();
45
+ var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
46
+
46
47
 
47
48
 
48
49
  var SWFUpload;
@@ -22,5 +22,5 @@ div.uploadStatus{margin:5px;}
22
22
  .swfupload_container a.progressCancel{font-size:0;display:block;height:14px;width:14px;background-image:url(../images/cancelbutton.gif);background-repeat:no-repeat;background-position:-14px 0px;float:right;}
23
23
  .swfupload_container a.progressCancel:hover{background-position:0px 0px;}
24
24
 
25
- .swf-error-msg{background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px;}
25
+ .swf-error-msg{margin:1em 0;padding:10px 20px;border:solid 1px #FFDD99;background-color:#FFFFCC;overflow:hidden;}
26
26
  .swf_cancel_button{margin-left: 2px; height: 22px; font-size: 8pt;}
Binary file
data/rails/init.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  begin
2
- require 'thoughtbot-paperclip'
2
+ require 'paperclip'
3
3
  rescue LoadError
4
4
  begin
5
- gem 'thoughtbot-paperclip'
5
+ gem 'paperclip'
6
6
  rescue Gem::LoadError
7
- puts "Please install the thoughtbot-paperclip gem"
7
+ puts "Please install the paperclip gem"
8
8
  end
9
9
  end
10
10
 
@@ -15,4 +15,8 @@ class UploadsController < Uploader::UploadsController
15
15
  end
16
16
  end
17
17
 
18
+ def get_upload_text(upload)
19
+ 'nothing needed'
20
+ end
21
+
18
22
  end
@@ -1,4 +1,4 @@
1
- RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
1
+ RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
2
2
 
3
3
  require File.join(File.dirname(__FILE__), 'boot')
4
4
 
@@ -11,7 +11,7 @@ require 'yaml'
11
11
  class << GlobalConfig
12
12
  def prepare_options_for_attachment_fu(options)
13
13
  attachment_fu_options = options.symbolize_keys.merge({:storage => options['storage'].to_sym,
14
- :max_size => options['max_size'].to_i.megabytes})
14
+ :max_size => options['max_size'].to_i.megabytes})
15
15
  end
16
16
  end
17
17
 
@@ -24,6 +24,6 @@ end
24
24
  Rails::Initializer.run do |config|
25
25
  config.load_paths += Dir.glob(File.join(RAILS_ROOT, 'vendor', 'gems', '*', 'lib'))
26
26
  config.time_zone = 'UTC'
27
- config.gem 'thoughtbot-paperclip', :version => '~> 2.2.2', :lib => 'paperclip', :source => 'http://gems.github.com'
27
+ config.gem 'paperclip'
28
28
  config.plugin_locators << TestGemLocator
29
29
  end
Binary file