Skip to content

Commit

Permalink
SAK-48517 Canceling the creation of a citation list is creating the list
Browse files Browse the repository at this point in the history
  • Loading branch information
josecebe authored and Miguel Pellicer committed Feb 23, 2023
1 parent 254250d commit 9ed4f8c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
36 changes: 19 additions & 17 deletions citations/citations-tool/tool/src/webapp/js/new_resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,27 +538,29 @@ citations_new_resource.init = function() {
citations_new_resource.processClick(successObj);
return false;
});
$('.submit').on('click', function(eventObject) {

SPNR.disableControlsAndSpin( this, null );

var successObj = {
invoke : function(jsObj) {
$('#sakai_action').val('doCancel');
$('#ajaxRequest').val('false');
$('#newCitationListForm').attr('method', 'GET');
$('#newCitationListForm').submit();
}
};
citations_new_resource.processClick(successObj);
return false;
});
$('.Cancel').on('click', function(eventObject) {

SPNR.disableControlsAndSpin( this, null );

if(needToSaveAnyChanges()) {
var successObj = {
invoke : function(jsObj) {
$('#sakai_action').val('doCancel');
$('#ajaxRequest').val('false');
$('#newCitationListForm').attr('method', 'GET');
$('#newCitationListForm').submit();
}
};
citations_new_resource.processClick(successObj);
return false;
} else {
$('#sakai_action').val('doCancel');
$('#ajaxRequest').val('false');
$('#newCitationListForm').attr('method', 'GET');
$('#newCitationListForm').submit();
}
$('#sakai_action').val('doCancel');
$('#ajaxRequest').val('false');
$('#newCitationListForm').attr('method', 'GET');
$('#newCitationListForm').submit();
});
$('#access_mode_groups').on('change', function(eventObject) {
$('#groupTable').toggle();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
<div class="act">
<div class="citationsDisplay"#if(! ($collectionSize || $collectionSize < 1) && ! ($nestedSectionsSize || $nestedSectionsSize < 1)) style="display:none;"#end>
<div class="act">
<input type="button" name="Cancel" class="Cancel active" value="$tlang.getString("resource.done")" />
<input type="button" name="Cancel" class="submit active" value="$tlang.getString("resource.done")" />
</div>
<div class="currentListCitations">
#parse( "vm/citation/_listCitations.vm" )
Expand Down

0 comments on commit 9ed4f8c

Please sign in to comment.