misc: remove dead fargo file validation code (#34819)

This commit is contained in:
Frédéric Péters 2019-07-14 20:31:23 +02:00
parent 62a766c4a9
commit 5c41abb769
2 changed files with 0 additions and 30 deletions

View File

@ -1433,10 +1433,6 @@ div.user-pending-forms span.status {
padding-left: 1ex;
}
div.file-validation {
margin-top: 1ex;
}
ul.apps {
margin-left: 1em;
}

View File

@ -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');