card-mod-script 0.13.2 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/script/decko/components.js.coffee +3 -0
- data/assets/script/decko/decko.js.coffee +0 -15
- data/assets/script/decko/editor.js.coffee +3 -1
- data/assets/script/decko/filter.js.coffee +14 -7
- data/assets/script/decko/filter_links.js.coffee +2 -2
- data/assets/script/decko/mod.js.coffee +2 -8
- data/assets/script/decko/name_editor.js.coffee +0 -18
- data/assets/script/decko/overlay.js.coffee +0 -3
- data/assets/script/{script_pointer_config.js.coffee → decko/pointer_config.js.coffee} +1 -2
- data/assets/script/{script_pointer_list_editor.js.coffee → decko/pointer_list_editor.js.coffee} +0 -0
- data/assets/script/decko/slot.js.coffee +3 -3
- data/assets/script/decko/slot_ready.js.coffee +1 -0
- data/assets/script/decko/slotter.js.coffee +23 -31
- data/assets/script/decko/type_editor.js.coffee +21 -0
- data/assets/script/decko/upload.js.coffee +12 -5
- data/assets/script/jquery-ui.min.js +13 -0
- data/assets/script/manifest.yml +16 -3
- data/init/early/init_execjs.rb +3 -0
- data/set/abstract/00_script.rb +30 -31
- data/set/abstract/01_asset_script.rb +0 -16
- data/set/abstract/{script_asset_list.rb → script_group.rb} +12 -13
- data/set/all/head_javascript.rb +12 -8
- data/set/right/script.rb +1 -14
- data/set/type/local_script_folder_group.rb +2 -2
- data/set/type/local_script_manifest_group.rb +1 -1
- data/set/type_plus_right/mod/script.rb +56 -0
- data/set/type_plus_right/set/script.rb +7 -0
- data/vendor/jquery_file_upload/LICENSE.txt +11 -12
- data/vendor/jquery_file_upload/README.md +189 -72
- data/vendor/jquery_file_upload/SECURITY.md +227 -0
- data/vendor/jquery_file_upload/VULNERABILITIES.md +118 -0
- data/vendor/jquery_file_upload/cors/postmessage.html +68 -58
- data/vendor/jquery_file_upload/cors/result.html +12 -10
- data/vendor/jquery_file_upload/css/jquery.fileupload-ui.css +24 -13
- data/vendor/jquery_file_upload/css/jquery.fileupload.css +3 -4
- data/vendor/jquery_file_upload/docker-compose.yml +55 -0
- data/vendor/jquery_file_upload/index.html +332 -230
- data/vendor/jquery_file_upload/js/cors/jquery.postmessage-transport.js +109 -109
- data/vendor/jquery_file_upload/js/cors/jquery.xdr-transport.js +81 -73
- data/vendor/jquery_file_upload/js/demo.js +75 -0
- data/vendor/jquery_file_upload/js/jquery.fileupload-audio.js +82 -94
- data/vendor/jquery_file_upload/js/jquery.fileupload-image.js +321 -300
- data/vendor/jquery_file_upload/js/jquery.fileupload-process.js +138 -146
- data/vendor/jquery_file_upload/js/jquery.fileupload-ui.js +737 -692
- data/vendor/jquery_file_upload/js/jquery.fileupload-validate.js +91 -97
- data/vendor/jquery_file_upload/js/jquery.fileupload-video.js +82 -94
- data/vendor/jquery_file_upload/js/jquery.fileupload.js +1569 -1451
- data/vendor/jquery_file_upload/js/jquery.iframe-transport.js +208 -205
- data/vendor/jquery_file_upload/js/vendor/jquery.ui.widget.js +397 -340
- data/vendor/jquery_file_upload/package-lock.json +6853 -0
- data/vendor/jquery_file_upload/package.json +71 -10
- data/vendor/jquery_file_upload/server/gae-python/app.yaml +11 -10
- data/vendor/jquery_file_upload/server/php/Dockerfile +23 -17
- data/vendor/jquery_file_upload/server/php/UploadHandler.php +206 -137
- data/vendor/jquery_file_upload/server/php/php.ini +5 -0
- data/vendor/jquery_file_upload/test/index.html +36 -159
- data/vendor/jquery_file_upload/test/unit.js +989 -0
- data/vendor/jquery_file_upload/test/vendor/chai.js +10854 -0
- data/vendor/jquery_file_upload/test/vendor/mocha.css +325 -0
- data/vendor/jquery_file_upload/test/vendor/mocha.js +18178 -0
- data/vendor/jquery_file_upload/wdio/LICENSE.txt +20 -0
- data/vendor/jquery_file_upload/wdio/assets/black+white-3x2.jpg +0 -0
- data/vendor/jquery_file_upload/wdio/assets/black+white-60x40.gif +0 -0
- data/vendor/jquery_file_upload/wdio/conf/chrome.js +40 -0
- data/vendor/jquery_file_upload/wdio/conf/firefox.js +25 -0
- data/vendor/jquery_file_upload/wdio/hooks/index.js +36 -0
- data/vendor/jquery_file_upload/wdio/test/pages/file-upload.js +79 -0
- data/vendor/jquery_file_upload/wdio/test/specs/01-file-upload.js +25 -0
- data/vendor/jquery_file_upload/wdio/wdio.conf.js +4 -0
- metadata +36 -53
- data/assets/script/jquery-ui.js +0 -10
- data/file/mod_script_script_decko_machine_output/file.js +0 -2710
- data/file/mod_script_script_jquery_machine_output/file.js +0 -12924
- data/lib/javascript/script_html5shiv_printshiv.js +0 -1
- data/set/self/script_html5shiv_printshiv.rb +0 -11
- data/set/self/script_mods.rb +0 -1
- data/set/type/mod_script_assets.rb +0 -21
- data/vendor/jquery_file_upload/CONTRIBUTING.md +0 -15
- data/vendor/jquery_file_upload/angularjs.html +0 -211
- data/vendor/jquery_file_upload/basic-plus.html +0 -226
- data/vendor/jquery_file_upload/basic.html +0 -136
- data/vendor/jquery_file_upload/bower-version-update.js +0 -16
- data/vendor/jquery_file_upload/bower.json +0 -64
- data/vendor/jquery_file_upload/css/jquery-ui-demo-ie8.css +0 -21
- data/vendor/jquery_file_upload/css/jquery-ui-demo.css +0 -67
- data/vendor/jquery_file_upload/css/style.css +0 -15
- data/vendor/jquery_file_upload/jquery-ui.html +0 -252
- data/vendor/jquery_file_upload/js/app.js +0 -101
- data/vendor/jquery_file_upload/js/jquery.fileupload-angular.js +0 -437
- data/vendor/jquery_file_upload/js/jquery.fileupload-jquery-ui.js +0 -161
- data/vendor/jquery_file_upload/js/main.js +0 -75
- data/vendor/jquery_file_upload/server/gae-go/app/main.go +0 -361
- data/vendor/jquery_file_upload/server/gae-go/app.yaml +0 -12
- data/vendor/jquery_file_upload/server/gae-go/static/favicon.ico +0 -0
- data/vendor/jquery_file_upload/server/gae-go/static/robots.txt +0 -2
- data/vendor/jquery_file_upload/server/php/docker-compose.yml +0 -9
- data/vendor/jquery_file_upload/test/test.js +0 -1292
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b8ffb63a43e4b60b749ea28e9494fa61727018ba01e3beb5a979bc525963c3e
|
4
|
+
data.tar.gz: 674f5afebe7b06a850b9a32f63c1ef5ff135b48febfc3ec3eb630d417b457b44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c99cb1d7f7087e345f8553f2b0825e467c532bd9dd172e173b069956ce0734f595d24478f9d98b0ed465082b988d93b6624a7e61ee17b23e190074632515bf60
|
7
|
+
data.tar.gz: 5ca294c81721eff117a5a65d7e51d4f6cb3aac63410b94b250c54979c2a919fafcfe1a636198e8ba91c971f49e4f1e1ce6e58736afec3ed36a4b8723ccdeb66b
|
@@ -45,16 +45,6 @@ $(window).ready ->
|
|
45
45
|
$('body').on 'click', 'button.redirecter', ->
|
46
46
|
window.location = $(this).attr('href')
|
47
47
|
|
48
|
-
$('body').on "change", '.live-type-field', ->
|
49
|
-
$this = $(this)
|
50
|
-
|
51
|
-
setSlotMode($this)
|
52
|
-
$this.data 'params', $(this).closest('form').serialize()
|
53
|
-
$this.data 'url', $(this).attr 'href'
|
54
|
-
|
55
|
-
$('body').on 'change', '.edit-type-field', ->
|
56
|
-
$(this).closest('form').submit()
|
57
|
-
|
58
48
|
$('body').on 'mouseenter', '[hover_content]', ->
|
59
49
|
$(this).attr 'hover_restore', $(this).html()
|
60
50
|
$(this).html $(this).attr( 'hover_content' )
|
@@ -83,11 +73,6 @@ decko.slotReady (slot) ->
|
|
83
73
|
# #ajaxEnabled: false
|
84
74
|
# }
|
85
75
|
|
86
|
-
setSlotMode = ($el, mode=null) ->
|
87
|
-
$slotter = $el.closest(".slotter")
|
88
|
-
if $slotter.length && $slotter.attr('data-slotter-mode')
|
89
|
-
$slotter.attr 'data-original-slotter-mode', $slotter.attr('slotter-mode')
|
90
|
-
$slotter.attr 'data-slotter-mode', mode
|
91
76
|
|
92
77
|
|
93
78
|
warn = (stuff) -> console.log stuff if console?
|
@@ -28,8 +28,10 @@ jQuery.fn.extend
|
|
28
28
|
setContentFields: (selector, fn) ->
|
29
29
|
$.each @find(selector), ->
|
30
30
|
$(this).setContentField(fn)
|
31
|
+
contentField: ->
|
32
|
+
@closest('.card-editor').find '.d0-card-content'
|
31
33
|
setContentField: (fn) ->
|
32
|
-
field = @
|
34
|
+
field = @contentField()
|
33
35
|
init_val = field.val() # tinymce-jquery overrides val();
|
34
36
|
# that's why we're not using it.
|
35
37
|
new_val = fn.call this
|
@@ -9,11 +9,19 @@ decko.filter = (el) ->
|
|
9
9
|
else
|
10
10
|
$(el).closest("._filtered-content").find "._filter-widget"
|
11
11
|
|
12
|
+
|
13
|
+
# the filter form includes the below
|
14
|
+
@form = @widget.find "._filter-form"
|
15
|
+
|
16
|
+
# one-click filter links
|
17
|
+
@quickFilter = @widget.find "._quick-filter"
|
18
|
+
|
19
|
+
# include filters field, more-fields dropdown, and reset button
|
12
20
|
@activeContainer = @widget.find "._filter-container"
|
21
|
+
|
22
|
+
# the "More Filters" Dropdown
|
13
23
|
@dropdown = @widget.find "._add-filter-dropdown"
|
14
24
|
@dropdownItems = @widget.find "._filter-category-select"
|
15
|
-
@form = @widget.find "._filter-form"
|
16
|
-
@quickFilter = @widget.find "._quick-filter"
|
17
25
|
|
18
26
|
@showWithStatus = (status) ->
|
19
27
|
f = this
|
@@ -23,11 +31,10 @@ decko.filter = (el) ->
|
|
23
31
|
f.activate item.data("category")
|
24
32
|
|
25
33
|
@reset = () ->
|
26
|
-
# @clear()
|
27
|
-
@dropdownItems.show()
|
28
34
|
@restrict @form.find("._reset-filter").data("reset")
|
29
35
|
|
30
36
|
@clear = () ->
|
37
|
+
@dropdownItems.show()
|
31
38
|
@activeContainer.find(".input-group").remove()
|
32
39
|
|
33
40
|
@activate = (category, value) ->
|
@@ -59,7 +66,7 @@ decko.filter = (el) ->
|
|
59
66
|
field.find("input, select").first().focus()
|
60
67
|
|
61
68
|
@fieldValue = (field, value) ->
|
62
|
-
if typeof(value) == "object"
|
69
|
+
if typeof(value) == "object" && !Array.isArray(value)
|
63
70
|
@compoundFieldValue field, value
|
64
71
|
else
|
65
72
|
@simpleFieldValue field, value
|
@@ -83,11 +90,10 @@ decko.filter = (el) ->
|
|
83
90
|
# only has effect if there is a data-options-card value
|
84
91
|
|
85
92
|
@initSelectField = (field) ->
|
86
|
-
field.find("select").select2
|
93
|
+
field.find("select").select2
|
87
94
|
containerCssClass: ":all:"
|
88
95
|
width: "auto"
|
89
96
|
dropdownAutoWidth: "true"
|
90
|
-
)
|
91
97
|
|
92
98
|
@activeField = (category) ->
|
93
99
|
@activeContainer.find("._filter-input-#{category}")
|
@@ -95,6 +101,7 @@ decko.filter = (el) ->
|
|
95
101
|
@isActive = (category) ->
|
96
102
|
@activeField(category).length
|
97
103
|
|
104
|
+
# clear filter and use restrictions in data
|
98
105
|
@restrict = (data) ->
|
99
106
|
@clear()
|
100
107
|
for key of data
|
@@ -61,8 +61,8 @@ $(window).ready ->
|
|
61
61
|
f = targetFilter this
|
62
62
|
if f.widget.length
|
63
63
|
f.restrict filterableData(this)
|
64
|
-
|
65
|
-
|
64
|
+
e.preventDefault()
|
65
|
+
e.stopPropagation()
|
66
66
|
|
67
67
|
$('body').on 'click', '._filter-link', (e) ->
|
68
68
|
f = filterFor this
|
@@ -17,10 +17,10 @@ window.decko ||= {} #needed to run w/o *head. eg. jasmine
|
|
17
17
|
# initfunc()
|
18
18
|
|
19
19
|
$(window).ready ->
|
20
|
-
$(
|
20
|
+
$(document).on 'click', '._stop_propagation', (event)->
|
21
21
|
event.stopPropagation()
|
22
22
|
|
23
|
-
$(
|
23
|
+
$(document).on 'click', '._prevent_default', (event)->
|
24
24
|
event.preventDefault()
|
25
25
|
|
26
26
|
$('body').on 'mouseenter', 'a[data-hover-text]', ->
|
@@ -77,9 +77,3 @@ $.extend decko,
|
|
77
77
|
toggleShade: (shadeSlot) ->
|
78
78
|
shadeSlot.find('.shade-content').slideToggle 1000
|
79
79
|
shadeSlot.find('.glyphicon').toggleClass 'glyphicon-triangle-right glpyphicon-triangle-bottom'
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
@@ -1,17 +1,6 @@
|
|
1
1
|
checkNameAfterTyping = null
|
2
2
|
|
3
3
|
$(window).ready ->
|
4
|
-
$('body').on 'click', '._renamer-updater', ->
|
5
|
-
$(this).closest('form').find('#card_update_referers').val 'true'
|
6
|
-
|
7
|
-
$('body').on 'submit', '._rename-form', ->
|
8
|
-
f = $(this)
|
9
|
-
confirm = f.find '.alert'
|
10
|
-
if confirm.is ':hidden'
|
11
|
-
referenceConfirm f
|
12
|
-
confirm.show 'blind'
|
13
|
-
false
|
14
|
-
|
15
4
|
$('body').on 'keyup', '.name-editor input', (event) ->
|
16
5
|
clearTimeout(checkNameAfterTyping) if checkNameAfterTyping
|
17
6
|
input = $(this)
|
@@ -24,13 +13,6 @@ $(window).ready ->
|
|
24
13
|
checkNameAfterTyping = null
|
25
14
|
, 400
|
26
15
|
|
27
|
-
referenceConfirm = (form)->
|
28
|
-
confirm = form.find '._rename-reference-confirm'
|
29
|
-
return unless confirm.data('referer-count') > 0
|
30
|
-
confirm.show()
|
31
|
-
btn = form.find '._renamer-updater'
|
32
|
-
btn.show()
|
33
|
-
btn.focus()
|
34
16
|
|
35
17
|
checkName = (box) ->
|
36
18
|
name = box.val()
|
@@ -13,9 +13,6 @@ jQuery.fn.extend
|
|
13
13
|
$("._overlay-origin").removeClass("_overlay-origin")
|
14
14
|
@replaceOverlay(overlay)
|
15
15
|
else
|
16
|
-
#@find(".tinymce-textarea").each ->
|
17
|
-
# tinymce.remove("##{$(this).attr("id")}")
|
18
|
-
# #tinyMCE.execCommand('mceRemoveControl', false, $(this).attr("id"))
|
19
16
|
if @parent().hasClass("_overlay-container-placeholder")
|
20
17
|
@parent().addClass("overlay-container")
|
21
18
|
else
|
@@ -45,8 +45,7 @@ $.extend decko,
|
|
45
45
|
input.autocomplete { source: decko.slotPath(path) }
|
46
46
|
|
47
47
|
pointerContent: (vals) ->
|
48
|
-
|
49
|
-
$.makeArray(list).join "\n"
|
48
|
+
$.makeArray(vals).join "\n"
|
50
49
|
|
51
50
|
linkListContent: (input_groups) ->
|
52
51
|
vals = input_groups.map( ->
|
data/assets/script/{script_pointer_list_editor.js.coffee → decko/pointer_list_editor.js.coffee}
RENAMED
File without changes
|
@@ -88,7 +88,7 @@ jQuery.fn.extend
|
|
88
88
|
isMainOrMainModal: ->
|
89
89
|
el = $(this)
|
90
90
|
el = el.findOriginSlot("modal") if el.closest(".modal")[0]
|
91
|
-
el.isMain()
|
91
|
+
el && el.isMain()
|
92
92
|
|
93
93
|
findSlot: (selector) ->
|
94
94
|
if selector == "modal-origin"
|
@@ -148,8 +148,8 @@ jQuery.fn.extend
|
|
148
148
|
slotMark: ->
|
149
149
|
if @data('cardId') then "~#{@data('cardId')}" else @data("cardName")
|
150
150
|
|
151
|
-
setSlotContent: (
|
152
|
-
v = $(
|
151
|
+
setSlotContent: (newContent, mode, $slotter) ->
|
152
|
+
v = $(newContent)[0] && $(newContent) || newContent
|
153
153
|
|
154
154
|
if typeof(v) == "string"
|
155
155
|
# Needed to support "TEXT: result" pattern in success (eg deleting nested cards)
|
@@ -63,7 +63,7 @@
|
|
63
63
|
#
|
64
64
|
#
|
65
65
|
$(window).ready ->
|
66
|
-
$('body').on 'ajax:success', '.slotter', (event, data
|
66
|
+
$('body').on 'ajax:success', '.slotter', (event, data) ->
|
67
67
|
$(this).slotterSuccess event, data
|
68
68
|
|
69
69
|
$('body').on 'ajax:error', '.slotter', (event, xhr) ->
|
@@ -114,27 +114,15 @@ jQuery.fn.extend
|
|
114
114
|
form.append input
|
115
115
|
input.val value
|
116
116
|
|
117
|
-
slotterSuccess: (event,
|
117
|
+
slotterSuccess: (event, responseData) ->
|
118
|
+
debugger
|
118
119
|
unless @hasClass("slotter")
|
119
120
|
console.log "warning: slotterSuccess called on non-slotter element #{this}"
|
120
121
|
return
|
121
122
|
|
122
123
|
return if event.slotSuccessful
|
123
124
|
|
124
|
-
|
125
|
-
window.location.reload(true)
|
126
|
-
|
127
|
-
if @data("update-modal-origin")
|
128
|
-
@updateModalOrigin()
|
129
|
-
|
130
|
-
if @data("update-origin")
|
131
|
-
@updateOrigin()
|
132
|
-
|
133
|
-
if @data('original-slotter-mode')
|
134
|
-
@attr 'data-slotter-mode', @data('original-slotter-mode')
|
135
|
-
|
136
|
-
mode = @data("slotter-mode")
|
137
|
-
@showSuccessResponse data, mode
|
125
|
+
@showSuccessResponse responseData, @data("slotter-mode")
|
138
126
|
|
139
127
|
if @hasClass "_close-overlay"
|
140
128
|
@removeOverlay()
|
@@ -150,21 +138,24 @@ jQuery.fn.extend
|
|
150
138
|
reload_url = @data("update-foreign-slot-url")
|
151
139
|
$slot.reloadSlot reload_url
|
152
140
|
|
141
|
+
if @data('original-slotter-mode')
|
142
|
+
@attr 'data-slotter-mode', @data('original-slotter-mode')
|
143
|
+
if @data('original-slot-selector')
|
144
|
+
@attr 'data-slot-selector', @data('original-slot-selector')
|
145
|
+
|
153
146
|
event.slotSuccessful = true
|
154
147
|
|
155
|
-
showSuccessResponse: (
|
156
|
-
if
|
157
|
-
|
158
|
-
else if
|
159
|
-
@updateModalOrigin()
|
160
|
-
else if mode == "update-origin"
|
161
|
-
@updateOrigin()
|
162
|
-
else if data.redirect
|
163
|
-
window.location = data.redirect
|
164
|
-
else if data.reload
|
148
|
+
showSuccessResponse: (responseData, mode) ->
|
149
|
+
if responseData.redirect
|
150
|
+
window.location = responseData.redirect
|
151
|
+
else if responseData.reload
|
165
152
|
window.location.reload(true)
|
166
153
|
else
|
167
|
-
|
154
|
+
switch mode
|
155
|
+
when "silent-success" then return
|
156
|
+
when "update-modal-origin" then @updateModalOrigin()
|
157
|
+
when "update-origin" then @updateOrigin()
|
158
|
+
else @updateSlot responseData, mode
|
168
159
|
|
169
160
|
showErrorResponse: (status, result) ->
|
170
161
|
if status == 403 #permission denied
|
@@ -200,12 +191,13 @@ jQuery.fn.extend
|
|
200
191
|
|
201
192
|
registerAsOrigin: (type, slot) ->
|
202
193
|
if slot.hasClass("_modal-slot")
|
203
|
-
slot = slot.find(".modal-body
|
194
|
+
slot = slot.find(".modal-body") # put the origin slot id on the modal-body instead
|
195
|
+
# of on the slot, so that it survives slot reloads
|
204
196
|
slot.attr("data-#{type}-origin-slot-id", @closest(".card-slot").data("slot-id"))
|
205
197
|
|
206
|
-
updateSlot: (
|
198
|
+
updateSlot: (newContent, mode) ->
|
207
199
|
mode ||= "replace"
|
208
|
-
@setSlotContent
|
200
|
+
@setSlotContent newContent, mode, $(this)
|
209
201
|
|
210
202
|
# close modal or overlay
|
211
203
|
closeOnSuccess: (type) ->
|
@@ -236,7 +228,7 @@ jQuery.fn.extend
|
|
236
228
|
)
|
237
229
|
return false
|
238
230
|
|
239
|
-
widget = input.data '
|
231
|
+
widget = input.data 'wblueimpFileupload' #jQuery UI widget
|
240
232
|
|
241
233
|
# browsers that can't do ajax uploads use iframe
|
242
234
|
unless widget._isXHRUpload(widget.options)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
$(window).ready ->
|
2
|
+
$('body').on "change", '._live-type-field', ->
|
3
|
+
$this = $(this)
|
4
|
+
|
5
|
+
setSlotMode($this)
|
6
|
+
debugger
|
7
|
+
$this.data 'params', $this.closest('form').serialize()
|
8
|
+
$this.data 'url', $this.attr 'href'
|
9
|
+
|
10
|
+
$('body').on 'change', '.edit-type-field', ->
|
11
|
+
$(this).closest('form').submit()
|
12
|
+
|
13
|
+
setSlotMode = ($el, mode=null) ->
|
14
|
+
$slotter = $el.closest(".slotter")
|
15
|
+
if $slotter.length
|
16
|
+
if $slotter.attr('data-slotter-mode')
|
17
|
+
$slotter.attr 'data-original-slotter-mode', $slotter.attr('data-slotter-mode')
|
18
|
+
$slotter.attr 'data-slotter-mode', mode
|
19
|
+
if $slotter.attr('data-slot-selector')
|
20
|
+
$slotter.attr 'data-original-slot-selector', $slotter.attr('data-slot-selector')
|
21
|
+
$slotter.removeAttr 'data-slot-selector'
|
@@ -1,10 +1,10 @@
|
|
1
1
|
$.extend decko,
|
2
2
|
upload_file: (fileupload) ->
|
3
|
-
# for file as a subcard in a form,
|
4
|
-
# excess parameters are included in the request which cause errors.
|
5
|
-
# only the file, type_id and attachment_card_name are needed
|
6
|
-
# attachment_card_name is the original card name,
|
7
|
-
# ex: card[subcards][+logo][image], card[file]
|
3
|
+
# for file as a subcard in a form,
|
4
|
+
# excess parameters are included in the request which cause errors.
|
5
|
+
# only the file, type_id and attachment_card_name are needed
|
6
|
+
# attachment_card_name is the original card name,
|
7
|
+
# ex: card[subcards][+logo][image], card[file]
|
8
8
|
$(fileupload).on 'fileuploadsubmit', (e,data) ->
|
9
9
|
$_this = $(this)
|
10
10
|
card_name = $_this.siblings(".attachment_card_name:first").attr("name")
|
@@ -36,6 +36,7 @@ $.extend decko,
|
|
36
36
|
'value="preview_editor" name="view">'
|
37
37
|
data.submit()
|
38
38
|
editor.find('.choose-file').hide()
|
39
|
+
# editor.find(".file-upload").prop "disabled", true
|
39
40
|
editor.find('.extra_upload_param').remove()
|
40
41
|
|
41
42
|
progressallFile: (e, data) ->
|
@@ -51,7 +52,13 @@ $(window).ready ->
|
|
51
52
|
$('body').on 'click', '.cancel-upload', ->
|
52
53
|
editor = $(this).closest '.card-editor'
|
53
54
|
editor.find('.choose-file').show()
|
55
|
+
# editor.find(".file-upload").prop "disabled", false
|
54
56
|
editor.find('.chosen-file').empty()
|
55
57
|
editor.find('.progress').show()
|
56
58
|
editor.find('#progress .progress-bar').css('width', '0%')
|
57
59
|
editor.find('#progress').hide()
|
60
|
+
|
61
|
+
$('body').on "submit", "form", ->
|
62
|
+
uploader = $(this).find ".file-upload[type=file]"
|
63
|
+
if uploader[0]
|
64
|
+
uploader.prop "disabled", true
|