Skip to content

Commit

Permalink
Handle replaced files should not be in ufal-submission.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarko committed Nov 13, 2017
1 parent 52dde52 commit e682226
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jQuery(document)

ufal.browse.handle_date_input();

ufal.utils.replaced_files();

jQuery("[data-toggle='tooltip']").tooltip();

// I agree button in license agreement should be large
Expand Down Expand Up @@ -511,9 +513,23 @@ ufal.utils = {
}
}
return "";
},

replaced_files: function () {
if (jQuery("#replaced_by_alert").length > 0) {
jQuery("#files_section").hide();
jQuery("#replaced_by_alert")
.append(
'<span class="font_smaller" style="display: inline-block; margin-top: 1em;" id="show_files_info">' + $.i18n._("autocomplete-original-data-help") + '<a href="#show-files" id="show_files_link">' + $.i18n._('autocomplete-here') + '</a>.</span>');
jQuery("#show_files_link").on('click', function () {
jQuery("#show_files_info").hide();
jQuery("#files_section").show();
jQuery('html, body').delay(100).animate({
scrollTop: jQuery("#files_section").offset().top
}, 200);
});
}
}


}

//
Expand Down
18 changes: 0 additions & 18 deletions dspace-xmlui/src/main/webapp/themes/UFAL/lib/js/ufal-submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,6 @@ ufal.submissions = {

},

handle_files: function () {
if (jQuery("#replaced_by_alert").length > 0) {
jQuery("#files_section").hide();
jQuery("#replaced_by_alert")
.append(
'<span class="font_smaller" style="display: inline-block; margin-top: 1em;" id="show_files_info">' + $.i18n._("autocomplete-original-data-help") + '<a href="#show-files" id="show_files_link">' + $.i18n._('autocomplete-here') + '</a>.</span>');
jQuery("#show_files_link").on('click', function () {
jQuery("#show_files_info").hide();
jQuery("#files_section").show();
jQuery('html, body').delay(100).animate({
scrollTop: jQuery("#files_section").offset().top
}, 200);
});
}
},


autocomplete_solr: function (obj, url, updater_function) {
ufal.submissions.configurable_autocomplete_solr(
obj,
Expand Down Expand Up @@ -447,5 +430,4 @@ jQuery(document).ready(function () {
ufal.submissions.fix_l10n();
ufal.submissions.handle_submission_js();
ufal.submissions.autocomplete();
ufal.submissions.handle_files();
}); // ready

0 comments on commit e682226

Please sign in to comment.