Skip to content

Commit

Permalink
MDL-57527 portfolio: remove legacy yui from js
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Feb 8, 2017
1 parent c73e3ef commit e46b11a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 7 additions & 2 deletions portfolio/download/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
$returnurl = $exporter->get('caller')->get_return_url();
echo $OUTPUT->notification('<a href="' . $returnurl . '">' . get_string('returntowhereyouwere', 'portfolio') . '</a><br />');

$PAGE->requires->js('/portfolio/download/helper.js');
$PAGE->requires->js_function_call('submit_download_form', null, true);

// if they don't have javascript, they can submit the form here to get the file.
// if they do, it does it nicely for them.
Expand All @@ -35,6 +33,13 @@
<input type="submit" value="' . get_string('downloadfile', 'portfolio_download') . '" />
</form>
';

$PAGE->requires->js_amd_inline("
require(['jquery'], function($) {
$('#redirectform').submit(function() {
$('#redirect').addClass('hide');
}).submit();
});");
echo $OUTPUT->footer();


7 changes: 0 additions & 7 deletions portfolio/download/helper.js

This file was deleted.

0 comments on commit e46b11a

Please sign in to comment.