misc: remove dead fargo file validation code (#34819)
This commit is contained in:
parent
62a766c4a9
commit
5c41abb769
|
@ -1433,10 +1433,6 @@ div.user-pending-forms span.status {
|
|||
padding-left: 1ex;
|
||||
}
|
||||
|
||||
div.file-validation {
|
||||
margin-top: 1ex;
|
||||
}
|
||||
|
||||
ul.apps {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
|
|
@ -11,32 +11,6 @@ $(function() {
|
|||
iframe.attr("src", "");
|
||||
}
|
||||
});
|
||||
$('.file-validation a').click(function (e) {
|
||||
e.preventDefault();
|
||||
var src = $(e.target).attr('href');
|
||||
var title = $(e.target).data("title");
|
||||
iframe.attr({
|
||||
src: src
|
||||
});
|
||||
iframe.css({'width': '100%', 'min-height': '25em'});
|
||||
iframe.on('load', function() {
|
||||
iframe.off('load');
|
||||
iframe[0].contentWindow.postMessage(JSON.stringify({'message': 'helloFargo'}), '*');
|
||||
$(window).on('message', function(ev) {
|
||||
var data = JSON.parse(ev.originalEvent.data);
|
||||
if (data.message == 'fargoButtons') {
|
||||
buttons = data.buttons;
|
||||
buttons[0].click = function() { $(this).dialog('close'); return false; };
|
||||
buttons[1].click = function() {
|
||||
iframe[0].contentWindow.postMessage(JSON.stringify({'message': 'validate'}), '*');
|
||||
}
|
||||
dialog.dialog('option', 'buttons', buttons);
|
||||
dialog.dialog("option", "title", title);
|
||||
dialog.dialog("open");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
$('p.use-file-from-fargo span').click(function(e) {
|
||||
e.preventDefault();
|
||||
var base_widget = $(this).parents('.file-upload-widget');
|
||||
|
|
Loading…
Reference in New Issue