card-mod-script 0.14.2 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/data/real.yml +50 -0
  3. data/lib/ansi2html.rb +69 -0
  4. data/lib/card/mod/script.rb +1 -0
  5. data/set/abstract/00_script.rb +4 -4
  6. data/set/abstract/02_coffee_script.rb +9 -1
  7. data/set/all/head_javascript.rb +13 -22
  8. data/set/right/script.rb +1 -1
  9. data/set/type/coffee_script.rb +6 -0
  10. data/set/type/java_script.rb +6 -0
  11. data/set/type/local_script_folder_group.rb +2 -0
  12. data/set/type/local_script_manifest_group.rb +2 -0
  13. data/set/type_plus_right/mod/script.rb +1 -5
  14. data/set/type_plus_right/set/script.rb +3 -1
  15. metadata +13 -119
  16. data/assets/script/decko/autosave.js.coffee +0 -30
  17. data/assets/script/decko/bridge.js.coffee +0 -31
  18. data/assets/script/decko/card_menu.js.coffee +0 -26
  19. data/assets/script/decko/components.js.coffee +0 -49
  20. data/assets/script/decko/decko.js.coffee +0 -82
  21. data/assets/script/decko/doubleclick.js.coffee +0 -30
  22. data/assets/script/decko/editor.js.coffee +0 -57
  23. data/assets/script/decko/filter.js.coffee +0 -183
  24. data/assets/script/decko/filter_items.js.coffee +0 -128
  25. data/assets/script/decko/filter_links.js.coffee +0 -81
  26. data/assets/script/decko/follow.js.coffee +0 -22
  27. data/assets/script/decko/layout.js.coffee +0 -76
  28. data/assets/script/decko/link_editor.js.coffee +0 -61
  29. data/assets/script/decko/mod.js.coffee +0 -79
  30. data/assets/script/decko/modal.js.coffee +0 -113
  31. data/assets/script/decko/name_editor.js.coffee +0 -40
  32. data/assets/script/decko/navbox.js.coffee +0 -74
  33. data/assets/script/decko/nest_editor.js.coffee +0 -166
  34. data/assets/script/decko/nest_editor_name.js.coffee +0 -102
  35. data/assets/script/decko/nest_editor_options.js.coffee +0 -93
  36. data/assets/script/decko/nest_editor_rules.js.coffee +0 -3
  37. data/assets/script/decko/overlay.js.coffee +0 -54
  38. data/assets/script/decko/pointer_config.js.coffee +0 -79
  39. data/assets/script/decko/pointer_list_editor.js.coffee +0 -67
  40. data/assets/script/decko/recaptcha.js.coffee +0 -19
  41. data/assets/script/decko/selectable_filtered_content.js.coffee +0 -12
  42. data/assets/script/decko/slot.js.coffee +0 -182
  43. data/assets/script/decko/slot_ready.js.coffee +0 -12
  44. data/assets/script/decko/slotter.js.coffee +0 -268
  45. data/assets/script/decko/type_editor.js.coffee +0 -21
  46. data/assets/script/decko/upload.js.coffee +0 -64
  47. data/assets/script/jquery-ui.min.js +0 -13
  48. data/assets/script/jquery.autosize.js +0 -274
  49. data/assets/script/manifest.yml +0 -57
  50. data/db/migrate_core_cards/20200804112348_add_mod_script_assets_type.rb +0 -30
  51. data/vendor/jquery_file_upload/LICENSE.txt +0 -20
  52. data/vendor/jquery_file_upload/README.md +0 -224
  53. data/vendor/jquery_file_upload/SECURITY.md +0 -227
  54. data/vendor/jquery_file_upload/VULNERABILITIES.md +0 -118
  55. data/vendor/jquery_file_upload/cors/postmessage.html +0 -85
  56. data/vendor/jquery_file_upload/cors/result.html +0 -26
  57. data/vendor/jquery_file_upload/css/jquery.fileupload-noscript.css +0 -22
  58. data/vendor/jquery_file_upload/css/jquery.fileupload-ui-noscript.css +0 -17
  59. data/vendor/jquery_file_upload/css/jquery.fileupload-ui.css +0 -68
  60. data/vendor/jquery_file_upload/css/jquery.fileupload.css +0 -36
  61. data/vendor/jquery_file_upload/docker-compose.yml +0 -55
  62. data/vendor/jquery_file_upload/img/loading.gif +0 -0
  63. data/vendor/jquery_file_upload/img/progressbar.gif +0 -0
  64. data/vendor/jquery_file_upload/index.html +0 -357
  65. data/vendor/jquery_file_upload/js/cors/jquery.postmessage-transport.js +0 -126
  66. data/vendor/jquery_file_upload/js/cors/jquery.xdr-transport.js +0 -97
  67. data/vendor/jquery_file_upload/js/demo.js +0 -75
  68. data/vendor/jquery_file_upload/js/jquery.fileupload-audio.js +0 -101
  69. data/vendor/jquery_file_upload/js/jquery.fileupload-image.js +0 -347
  70. data/vendor/jquery_file_upload/js/jquery.fileupload-process.js +0 -170
  71. data/vendor/jquery_file_upload/js/jquery.fileupload-ui.js +0 -759
  72. data/vendor/jquery_file_upload/js/jquery.fileupload-validate.js +0 -119
  73. data/vendor/jquery_file_upload/js/jquery.fileupload-video.js +0 -101
  74. data/vendor/jquery_file_upload/js/jquery.fileupload.js +0 -1604
  75. data/vendor/jquery_file_upload/js/jquery.iframe-transport.js +0 -227
  76. data/vendor/jquery_file_upload/js/vendor/jquery.ui.widget.js +0 -805
  77. data/vendor/jquery_file_upload/package-lock.json +0 -6853
  78. data/vendor/jquery_file_upload/package.json +0 -116
  79. data/vendor/jquery_file_upload/server/gae-python/app.yaml +0 -18
  80. data/vendor/jquery_file_upload/server/gae-python/main.py +0 -204
  81. data/vendor/jquery_file_upload/server/gae-python/static/favicon.ico +0 -0
  82. data/vendor/jquery_file_upload/server/gae-python/static/robots.txt +0 -2
  83. data/vendor/jquery_file_upload/server/php/Dockerfile +0 -44
  84. data/vendor/jquery_file_upload/server/php/UploadHandler.php +0 -1480
  85. data/vendor/jquery_file_upload/server/php/index.php +0 -15
  86. data/vendor/jquery_file_upload/server/php/php.ini +0 -5
  87. data/vendor/jquery_file_upload/test/index.html +0 -49
  88. data/vendor/jquery_file_upload/test/unit.js +0 -989
  89. data/vendor/jquery_file_upload/test/vendor/chai.js +0 -10854
  90. data/vendor/jquery_file_upload/test/vendor/mocha.css +0 -325
  91. data/vendor/jquery_file_upload/test/vendor/mocha.js +0 -18178
  92. data/vendor/jquery_file_upload/wdio/LICENSE.txt +0 -20
  93. data/vendor/jquery_file_upload/wdio/assets/black+white-3x2.jpg +0 -0
  94. data/vendor/jquery_file_upload/wdio/assets/black+white-60x40.gif +0 -0
  95. data/vendor/jquery_file_upload/wdio/conf/chrome.js +0 -40
  96. data/vendor/jquery_file_upload/wdio/conf/firefox.js +0 -25
  97. data/vendor/jquery_file_upload/wdio/hooks/index.js +0 -36
  98. data/vendor/jquery_file_upload/wdio/test/pages/file-upload.js +0 -79
  99. data/vendor/jquery_file_upload/wdio/test/specs/01-file-upload.js +0 -25
  100. data/vendor/jquery_file_upload/wdio/wdio.conf.js +0 -4
  101. data/vendor/jquery_rails/CHANGELOG.md +0 -359
  102. data/vendor/jquery_rails/CONTRIBUTING.md +0 -132
  103. data/vendor/jquery_rails/Gemfile +0 -22
  104. data/vendor/jquery_rails/MIT-LICENSE +0 -21
  105. data/vendor/jquery_rails/README.md +0 -75
  106. data/vendor/jquery_rails/Rakefile +0 -59
  107. data/vendor/jquery_rails/VERSIONS.md +0 -62
  108. data/vendor/jquery_rails/jquery-rails.gemspec +0 -26
  109. data/vendor/jquery_rails/lib/jquery/assert_select.rb +0 -149
  110. data/vendor/jquery_rails/lib/jquery/rails/engine.rb +0 -6
  111. data/vendor/jquery_rails/lib/jquery/rails/version.rb +0 -9
  112. data/vendor/jquery_rails/lib/jquery/rails.rb +0 -8
  113. data/vendor/jquery_rails/lib/jquery-rails.rb +0 -1
  114. data/vendor/jquery_rails/test/assert_select_jquery_test.rb +0 -85
  115. data/vendor/jquery_rails/test/test_helper.rb +0 -6
  116. data/vendor/jquery_rails/vendor/assets/javascripts/jquery.js +0 -11008
  117. data/vendor/jquery_rails/vendor/assets/javascripts/jquery.min.js +0 -5
  118. data/vendor/jquery_rails/vendor/assets/javascripts/jquery.min.map +0 -1
  119. data/vendor/jquery_rails/vendor/assets/javascripts/jquery2.js +0 -9814
  120. data/vendor/jquery_rails/vendor/assets/javascripts/jquery2.min.js +0 -4
  121. data/vendor/jquery_rails/vendor/assets/javascripts/jquery2.min.map +0 -1
  122. data/vendor/jquery_rails/vendor/assets/javascripts/jquery3.js +0 -10364
  123. data/vendor/jquery_rails/vendor/assets/javascripts/jquery3.min.js +0 -2
  124. data/vendor/jquery_rails/vendor/assets/javascripts/jquery3.min.map +0 -1
  125. data/vendor/jquery_rails/vendor/assets/javascripts/jquery_ujs.js +0 -555
@@ -1,357 +0,0 @@
1
- <!DOCTYPE html>
2
- <!--
3
- /*
4
- * jQuery File Upload Demo
5
- * https://github.com/blueimp/jQuery-File-Upload
6
- *
7
- * Copyright 2010, Sebastian Tschan
8
- * https://blueimp.net
9
- *
10
- * Licensed under the MIT license:
11
- * https://opensource.org/licenses/MIT
12
- */
13
- -->
14
- <html lang="en">
15
- <head>
16
- <!-- Force latest IE rendering engine or ChromeFrame if installed -->
17
- <!--[if IE]>
18
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
19
- <![endif]-->
20
- <meta charset="utf-8" />
21
- <title>jQuery File Upload Demo</title>
22
- <meta
23
- name="description"
24
- content="File Upload widget with multiple file selection, drag&amp;drop support, progress bars, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads."
25
- />
26
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
27
- <!-- Bootstrap styles -->
28
- <link
29
- rel="stylesheet"
30
- href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
31
- integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
32
- crossorigin="anonymous"
33
- />
34
- <!-- Generic page styles -->
35
- <style>
36
- #navigation {
37
- margin: 10px 0;
38
- }
39
- @media (max-width: 767px) {
40
- #title,
41
- #description {
42
- display: none;
43
- }
44
- }
45
- </style>
46
- <!-- blueimp Gallery styles -->
47
- <link
48
- rel="stylesheet"
49
- href="https://blueimp.github.io/Gallery/css/blueimp-gallery.min.css"
50
- />
51
- <!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
52
- <link rel="stylesheet" href="css/jquery.fileupload.css" />
53
- <link rel="stylesheet" href="css/jquery.fileupload-ui.css" />
54
- <!-- CSS adjustments for browsers with JavaScript disabled -->
55
- <noscript
56
- ><link rel="stylesheet" href="css/jquery.fileupload-noscript.css"
57
- /></noscript>
58
- <noscript
59
- ><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"
60
- /></noscript>
61
- </head>
62
- <body>
63
- <div class="container">
64
- <ul class="nav nav-tabs" id="navigation">
65
- <li>
66
- <a href="https://github.com/blueimp/jQuery-File-Upload">Project</a>
67
- </li>
68
- <li class="active">
69
- <a href="#">Demo</a>
70
- </li>
71
- <li>
72
- <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Wiki</a>
73
- </li>
74
- <li>
75
- <a href="https://blueimp.net">Author</a>
76
- </li>
77
- </ul>
78
- <h1 id="title">jQuery File Upload Demo</h1>
79
- <blockquote id="description">
80
- <p>
81
- File Upload widget with multiple file selection, drag&amp;drop
82
- support, progress bars, validation and preview images, audio and video
83
- for jQuery.<br />
84
- Supports cross-domain, chunked and resumable file uploads and
85
- client-side image resizing.<br />
86
- Works with any server-side platform (PHP, Python, Ruby on Rails, Java,
87
- Node.js, Go etc.) that supports standard HTML form file uploads.
88
- </p>
89
- </blockquote>
90
- <!-- The file upload form used as target for the file upload widget -->
91
- <form
92
- id="fileupload"
93
- action="https://jquery-file-upload.appspot.com/"
94
- method="POST"
95
- enctype="multipart/form-data"
96
- >
97
- <!-- Redirect browsers with JavaScript disabled to the origin page -->
98
- <noscript
99
- ><input
100
- type="hidden"
101
- name="redirect"
102
- value="https://blueimp.github.io/jQuery-File-Upload/"
103
- /></noscript>
104
- <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
105
- <div class="row fileupload-buttonbar">
106
- <div class="col-lg-7">
107
- <!-- The fileinput-button span is used to style the file input field as button -->
108
- <span class="btn btn-success fileinput-button">
109
- <i class="glyphicon glyphicon-plus"></i>
110
- <span>Add files...</span>
111
- <input type="file" name="files[]" multiple />
112
- </span>
113
- <button type="submit" class="btn btn-primary start">
114
- <i class="glyphicon glyphicon-upload"></i>
115
- <span>Start upload</span>
116
- </button>
117
- <button type="reset" class="btn btn-warning cancel">
118
- <i class="glyphicon glyphicon-ban-circle"></i>
119
- <span>Cancel upload</span>
120
- </button>
121
- <button type="button" class="btn btn-danger delete">
122
- <i class="glyphicon glyphicon-trash"></i>
123
- <span>Delete selected</span>
124
- </button>
125
- <input type="checkbox" class="toggle" />
126
- <!-- The global file processing state -->
127
- <span class="fileupload-process"></span>
128
- </div>
129
- <!-- The global progress state -->
130
- <div class="col-lg-5 fileupload-progress fade">
131
- <!-- The global progress bar -->
132
- <div
133
- class="progress progress-striped active"
134
- role="progressbar"
135
- aria-valuemin="0"
136
- aria-valuemax="100"
137
- >
138
- <div
139
- class="progress-bar progress-bar-success"
140
- style="width: 0%;"
141
- ></div>
142
- </div>
143
- <!-- The extended global progress state -->
144
- <div class="progress-extended">&nbsp;</div>
145
- </div>
146
- </div>
147
- <!-- The table listing the files available for upload/download -->
148
- <table role="presentation" class="table table-striped">
149
- <tbody class="files"></tbody>
150
- </table>
151
- </form>
152
- <div class="panel panel-default">
153
- <div class="panel-heading">
154
- <h3 class="panel-title">Demo Notes</h3>
155
- </div>
156
- <div class="panel-body">
157
- <ul>
158
- <li>
159
- The maximum file size for uploads in this demo is
160
- <strong>999 KB</strong> (default file size is unlimited).
161
- </li>
162
- <li>
163
- Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in
164
- this demo (by default there is no file type restriction).
165
- </li>
166
- <li>
167
- Uploaded files will be deleted automatically after
168
- <strong>5 minutes or less</strong> (demo files are stored in
169
- memory).
170
- </li>
171
- <li>
172
- You can <strong>drag &amp; drop</strong> files from your desktop
173
- on this webpage (see
174
- <a
175
- href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support"
176
- >Browser support</a
177
- >).
178
- </li>
179
- <li>
180
- Please refer to the
181
- <a href="https://github.com/blueimp/jQuery-File-Upload"
182
- >project website</a
183
- >
184
- and
185
- <a href="https://github.com/blueimp/jQuery-File-Upload/wiki"
186
- >documentation</a
187
- >
188
- for more information.
189
- </li>
190
- <li>
191
- Built with the
192
- <a href="https://getbootstrap.com/">Bootstrap</a> CSS framework
193
- and Icons from <a href="https://glyphicons.com/">Glyphicons</a>.
194
- </li>
195
- </ul>
196
- </div>
197
- </div>
198
- </div>
199
- <!-- The blueimp Gallery widget -->
200
- <div
201
- id="blueimp-gallery"
202
- class="blueimp-gallery blueimp-gallery-controls"
203
- aria-label="image gallery"
204
- aria-modal="true"
205
- role="dialog"
206
- data-filter=":even"
207
- >
208
- <div class="slides" aria-live="polite"></div>
209
- <h3 class="title"></h3>
210
- <a
211
- class="prev"
212
- aria-controls="blueimp-gallery"
213
- aria-label="previous slide"
214
- aria-keyshortcuts="ArrowLeft"
215
- ></a>
216
- <a
217
- class="next"
218
- aria-controls="blueimp-gallery"
219
- aria-label="next slide"
220
- aria-keyshortcuts="ArrowRight"
221
- ></a>
222
- <a
223
- class="close"
224
- aria-controls="blueimp-gallery"
225
- aria-label="close"
226
- aria-keyshortcuts="Escape"
227
- ></a>
228
- <a
229
- class="play-pause"
230
- aria-controls="blueimp-gallery"
231
- aria-label="play slideshow"
232
- aria-keyshortcuts="Space"
233
- aria-pressed="false"
234
- role="button"
235
- ></a>
236
- <ol class="indicator"></ol>
237
- </div>
238
- <!-- The template to display files available for upload -->
239
- <script id="template-upload" type="text/x-tmpl">
240
- {% for (var i=0, file; file=o.files[i]; i++) { %}
241
- <tr class="template-upload fade{%=o.options.loadImageFileTypes.test(file.type)?' image':''%}">
242
- <td>
243
- <span class="preview"></span>
244
- </td>
245
- <td>
246
- <p class="name">{%=file.name%}</p>
247
- <strong class="error text-danger"></strong>
248
- </td>
249
- <td>
250
- <p class="size">Processing...</p>
251
- <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
252
- </td>
253
- <td>
254
- {% if (!o.options.autoUpload && o.options.edit && o.options.loadImageFileTypes.test(file.type)) { %}
255
- <button class="btn btn-success edit" data-index="{%=i%}" disabled>
256
- <i class="glyphicon glyphicon-edit"></i>
257
- <span>Edit</span>
258
- </button>
259
- {% } %}
260
- {% if (!i && !o.options.autoUpload) { %}
261
- <button class="btn btn-primary start" disabled>
262
- <i class="glyphicon glyphicon-upload"></i>
263
- <span>Start</span>
264
- </button>
265
- {% } %}
266
- {% if (!i) { %}
267
- <button class="btn btn-warning cancel">
268
- <i class="glyphicon glyphicon-ban-circle"></i>
269
- <span>Cancel</span>
270
- </button>
271
- {% } %}
272
- </td>
273
- </tr>
274
- {% } %}
275
- </script>
276
- <!-- The template to display files available for download -->
277
- <script id="template-download" type="text/x-tmpl">
278
- {% for (var i=0, file; file=o.files[i]; i++) { %}
279
- <tr class="template-download fade{%=file.thumbnailUrl?' image':''%}">
280
- <td>
281
- <span class="preview">
282
- {% if (file.thumbnailUrl) { %}
283
- <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
284
- {% } %}
285
- </span>
286
- </td>
287
- <td>
288
- <p class="name">
289
- {% if (file.url) { %}
290
- <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
291
- {% } else { %}
292
- <span>{%=file.name%}</span>
293
- {% } %}
294
- </p>
295
- {% if (file.error) { %}
296
- <div><span class="label label-danger">Error</span> {%=file.error%}</div>
297
- {% } %}
298
- </td>
299
- <td>
300
- <span class="size">{%=o.formatFileSize(file.size)%}</span>
301
- </td>
302
- <td>
303
- {% if (file.deleteUrl) { %}
304
- <button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
305
- <i class="glyphicon glyphicon-trash"></i>
306
- <span>Delete</span>
307
- </button>
308
- <input type="checkbox" name="delete" value="1" class="toggle">
309
- {% } else { %}
310
- <button class="btn btn-warning cancel">
311
- <i class="glyphicon glyphicon-ban-circle"></i>
312
- <span>Cancel</span>
313
- </button>
314
- {% } %}
315
- </td>
316
- </tr>
317
- {% } %}
318
- </script>
319
- <script
320
- src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"
321
- integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
322
- crossorigin="anonymous"
323
- ></script>
324
- <!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
325
- <script src="js/vendor/jquery.ui.widget.js"></script>
326
- <!-- The Templates plugin is included to render the upload/download listings -->
327
- <script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
328
- <!-- The Load Image plugin is included for the preview images and image resizing functionality -->
329
- <script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
330
- <!-- The Canvas to Blob plugin is included for image resizing functionality -->
331
- <script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
332
- <!-- blueimp Gallery script -->
333
- <script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
334
- <!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
335
- <script src="js/jquery.iframe-transport.js"></script>
336
- <!-- The basic File Upload plugin -->
337
- <script src="js/jquery.fileupload.js"></script>
338
- <!-- The File Upload processing plugin -->
339
- <script src="js/jquery.fileupload-process.js"></script>
340
- <!-- The File Upload image preview & resize plugin -->
341
- <script src="js/jquery.fileupload-image.js"></script>
342
- <!-- The File Upload audio preview plugin -->
343
- <script src="js/jquery.fileupload-audio.js"></script>
344
- <!-- The File Upload video preview plugin -->
345
- <script src="js/jquery.fileupload-video.js"></script>
346
- <!-- The File Upload validation plugin -->
347
- <script src="js/jquery.fileupload-validate.js"></script>
348
- <!-- The File Upload user interface plugin -->
349
- <script src="js/jquery.fileupload-ui.js"></script>
350
- <!-- The main application script -->
351
- <script src="js/demo.js"></script>
352
- <!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
353
- <!--[if (gte IE 8)&(lt IE 10)]>
354
- <script src="js/cors/jquery.xdr-transport.js"></script>
355
- <![endif]-->
356
- </body>
357
- </html>
@@ -1,126 +0,0 @@
1
- /*
2
- * jQuery postMessage Transport Plugin
3
- * https://github.com/blueimp/jQuery-File-Upload
4
- *
5
- * Copyright 2011, Sebastian Tschan
6
- * https://blueimp.net
7
- *
8
- * Licensed under the MIT license:
9
- * https://opensource.org/licenses/MIT
10
- */
11
-
12
- /* global define, require */
13
-
14
- (function (factory) {
15
- 'use strict';
16
- if (typeof define === 'function' && define.amd) {
17
- // Register as an anonymous AMD module:
18
- define(['jquery'], factory);
19
- } else if (typeof exports === 'object') {
20
- // Node/CommonJS:
21
- factory(require('jquery'));
22
- } else {
23
- // Browser globals:
24
- factory(window.jQuery);
25
- }
26
- })(function ($) {
27
- 'use strict';
28
-
29
- var counter = 0,
30
- names = [
31
- 'accepts',
32
- 'cache',
33
- 'contents',
34
- 'contentType',
35
- 'crossDomain',
36
- 'data',
37
- 'dataType',
38
- 'headers',
39
- 'ifModified',
40
- 'mimeType',
41
- 'password',
42
- 'processData',
43
- 'timeout',
44
- 'traditional',
45
- 'type',
46
- 'url',
47
- 'username'
48
- ],
49
- convert = function (p) {
50
- return p;
51
- };
52
-
53
- $.ajaxSetup({
54
- converters: {
55
- 'postmessage text': convert,
56
- 'postmessage json': convert,
57
- 'postmessage html': convert
58
- }
59
- });
60
-
61
- $.ajaxTransport('postmessage', function (options) {
62
- if (options.postMessage && window.postMessage) {
63
- var iframe,
64
- loc = $('<a></a>').prop('href', options.postMessage)[0],
65
- target = loc.protocol + '//' + loc.host,
66
- xhrUpload = options.xhr().upload;
67
- // IE always includes the port for the host property of a link
68
- // element, but not in the location.host or origin property for the
69
- // default http port 80 and https port 443, so we strip it:
70
- if (/^(http:\/\/.+:80)|(https:\/\/.+:443)$/.test(target)) {
71
- target = target.replace(/:(80|443)$/, '');
72
- }
73
- return {
74
- send: function (_, completeCallback) {
75
- counter += 1;
76
- var message = {
77
- id: 'postmessage-transport-' + counter
78
- },
79
- eventName = 'message.' + message.id;
80
- iframe = $(
81
- '<iframe style="display:none;" src="' +
82
- options.postMessage +
83
- '" name="' +
84
- message.id +
85
- '"></iframe>'
86
- )
87
- .on('load', function () {
88
- $.each(names, function (i, name) {
89
- message[name] = options[name];
90
- });
91
- message.dataType = message.dataType.replace('postmessage ', '');
92
- $(window).on(eventName, function (event) {
93
- var e = event.originalEvent;
94
- var data = e.data;
95
- var ev;
96
- if (e.origin === target && data.id === message.id) {
97
- if (data.type === 'progress') {
98
- ev = document.createEvent('Event');
99
- ev.initEvent(data.type, false, true);
100
- $.extend(ev, data);
101
- xhrUpload.dispatchEvent(ev);
102
- } else {
103
- completeCallback(
104
- data.status,
105
- data.statusText,
106
- { postmessage: data.result },
107
- data.headers
108
- );
109
- iframe.remove();
110
- $(window).off(eventName);
111
- }
112
- }
113
- });
114
- iframe[0].contentWindow.postMessage(message, target);
115
- })
116
- .appendTo(document.body);
117
- },
118
- abort: function () {
119
- if (iframe) {
120
- iframe.remove();
121
- }
122
- }
123
- };
124
- }
125
- });
126
- });
@@ -1,97 +0,0 @@
1
- /*
2
- * jQuery XDomainRequest Transport Plugin
3
- * https://github.com/blueimp/jQuery-File-Upload
4
- *
5
- * Copyright 2011, Sebastian Tschan
6
- * https://blueimp.net
7
- *
8
- * Licensed under the MIT license:
9
- * https://opensource.org/licenses/MIT
10
- *
11
- * Based on Julian Aubourg's ajaxHooks xdr.js:
12
- * https://github.com/jaubourg/ajaxHooks/
13
- */
14
-
15
- /* global define, require, XDomainRequest */
16
-
17
- (function (factory) {
18
- 'use strict';
19
- if (typeof define === 'function' && define.amd) {
20
- // Register as an anonymous AMD module:
21
- define(['jquery'], factory);
22
- } else if (typeof exports === 'object') {
23
- // Node/CommonJS:
24
- factory(require('jquery'));
25
- } else {
26
- // Browser globals:
27
- factory(window.jQuery);
28
- }
29
- })(function ($) {
30
- 'use strict';
31
- if (window.XDomainRequest && !$.support.cors) {
32
- $.ajaxTransport(function (s) {
33
- if (s.crossDomain && s.async) {
34
- if (s.timeout) {
35
- s.xdrTimeout = s.timeout;
36
- delete s.timeout;
37
- }
38
- var xdr;
39
- return {
40
- send: function (headers, completeCallback) {
41
- var addParamChar = /\?/.test(s.url) ? '&' : '?';
42
- /**
43
- * Callback wrapper function
44
- *
45
- * @param {number} status HTTP status code
46
- * @param {string} statusText HTTP status text
47
- * @param {object} [responses] Content-type specific responses
48
- * @param {string} [responseHeaders] Response headers string
49
- */
50
- function callback(status, statusText, responses, responseHeaders) {
51
- xdr.onload = xdr.onerror = xdr.ontimeout = $.noop;
52
- xdr = null;
53
- completeCallback(status, statusText, responses, responseHeaders);
54
- }
55
- xdr = new XDomainRequest();
56
- // XDomainRequest only supports GET and POST:
57
- if (s.type === 'DELETE') {
58
- s.url = s.url + addParamChar + '_method=DELETE';
59
- s.type = 'POST';
60
- } else if (s.type === 'PUT') {
61
- s.url = s.url + addParamChar + '_method=PUT';
62
- s.type = 'POST';
63
- } else if (s.type === 'PATCH') {
64
- s.url = s.url + addParamChar + '_method=PATCH';
65
- s.type = 'POST';
66
- }
67
- xdr.open(s.type, s.url);
68
- xdr.onload = function () {
69
- callback(
70
- 200,
71
- 'OK',
72
- { text: xdr.responseText },
73
- 'Content-Type: ' + xdr.contentType
74
- );
75
- };
76
- xdr.onerror = function () {
77
- callback(404, 'Not Found');
78
- };
79
- if (s.xdrTimeout) {
80
- xdr.ontimeout = function () {
81
- callback(0, 'timeout');
82
- };
83
- xdr.timeout = s.xdrTimeout;
84
- }
85
- xdr.send((s.hasContent && s.data) || null);
86
- },
87
- abort: function () {
88
- if (xdr) {
89
- xdr.onerror = $.noop();
90
- xdr.abort();
91
- }
92
- }
93
- };
94
- }
95
- });
96
- }
97
- });
@@ -1,75 +0,0 @@
1
- /*
2
- * jQuery File Upload Demo
3
- * https://github.com/blueimp/jQuery-File-Upload
4
- *
5
- * Copyright 2010, Sebastian Tschan
6
- * https://blueimp.net
7
- *
8
- * Licensed under the MIT license:
9
- * https://opensource.org/licenses/MIT
10
- */
11
-
12
- /* global $ */
13
-
14
- $(function () {
15
- 'use strict';
16
-
17
- // Initialize the jQuery File Upload widget:
18
- $('#fileupload').fileupload({
19
- // Uncomment the following to send cross-domain cookies:
20
- //xhrFields: {withCredentials: true},
21
- url: 'server/php/'
22
- });
23
-
24
- // Enable iframe cross-domain access via redirect option:
25
- $('#fileupload').fileupload(
26
- 'option',
27
- 'redirect',
28
- window.location.href.replace(/\/[^/]*$/, '/cors/result.html?%s')
29
- );
30
-
31
- if (window.location.hostname === 'blueimp.github.io') {
32
- // Demo settings:
33
- $('#fileupload').fileupload('option', {
34
- url: '//jquery-file-upload.appspot.com/',
35
- // Enable image resizing, except for Android and Opera,
36
- // which actually support image resizing, but fail to
37
- // send Blob objects via XHR requests:
38
- disableImageResize: /Android(?!.*Chrome)|Opera/.test(
39
- window.navigator.userAgent
40
- ),
41
- maxFileSize: 999000,
42
- acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
43
- });
44
- // Upload server status check for browsers with CORS support:
45
- if ($.support.cors) {
46
- $.ajax({
47
- url: '//jquery-file-upload.appspot.com/',
48
- type: 'HEAD'
49
- }).fail(function () {
50
- $('<div class="alert alert-danger"></div>')
51
- .text('Upload server currently unavailable - ' + new Date())
52
- .appendTo('#fileupload');
53
- });
54
- }
55
- } else {
56
- // Load existing files:
57
- $('#fileupload').addClass('fileupload-processing');
58
- $.ajax({
59
- // Uncomment the following to send cross-domain cookies:
60
- //xhrFields: {withCredentials: true},
61
- url: $('#fileupload').fileupload('option', 'url'),
62
- dataType: 'json',
63
- context: $('#fileupload')[0]
64
- })
65
- .always(function () {
66
- $(this).removeClass('fileupload-processing');
67
- })
68
- .done(function (result) {
69
- $(this)
70
- .fileupload('option', 'done')
71
- // eslint-disable-next-line new-cap
72
- .call(this, $.Event('done'), { result: result });
73
- });
74
- }
75
- });