Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed logins tab loading issue in usage module #745

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions organizations/js/orgDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@
return false;
});

$(".downtimeBtn").click(function(e) {
e.preventDefault();
getDowntime($(this));
});
$(document).on('click', '.downtimeBtn', function (e) {
e.preventDefault();
getDowntime($(this));
});

$(".showLicenses").click(function () {
if (viewAll == 0){
Expand Down Expand Up @@ -204,7 +204,7 @@

});

$(".issuesBtn").click(function(e) {
$(document).on('click' , '.issuesBtn', function(e) {
e.preventDefault();
getResourceIssues($(this));
});
Expand Down
18 changes: 9 additions & 9 deletions resources/js/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $(document).ready(function(){
$('.resource_tab_content').hide();
$('#div_orders').show();
$('#div_fullRightPanel').show();
updateOrders();
updateOrders();
return false;
});

Expand Down Expand Up @@ -97,17 +97,17 @@ $(document).ready(function(){
updateCataloging();
return false;
});


$("#resourceAcquisitionSelect").change(function () {
var newLoc = location.search;
if (newLoc.includes('resourceAcquisitionID')) {
newLoc = newLoc.replace(/resourceAcquisitionID=[^&$]*/i, 'resourceAcquisitionID=' + $(this).val());
} else {
newLoc += "&resourceAcquisitionID=" + $(this).val();
newLoc += "&resourceAcquisitionID=" + $(this).val();
}
if (newLoc.includes('showTab')) {
newLoc = newLoc.replace(/showTab=[^&$]*/i, 'showTab=' + currentTab);
newLoc = newLoc.replace(/showTab=[^&$]*/i, 'showTab=' + currentTab);
} else {
newLoc += "&showTab=" + currentTab;
}
Expand All @@ -121,12 +121,12 @@ $(document).ready(function(){
updateAttachmentsNumber();


$(".issuesBtn").on("click", function(e) {
$(document).on('click' , '.issuesBtn', function(e) {
e.preventDefault();
getIssues($(this));
});

$(".downtimeBtn").on("click", function(e) {
$(document).on('click', '.downtimeBtn', function (e) {
e.preventDefault();
getDowntime($(this));
});
Expand Down Expand Up @@ -220,7 +220,7 @@ $(document).ready(function(){
});
});

$("#createContact").on("click",function(e) {
$(document).on('click', '#createContact', function (e) {
e.preventDefault();

var errors = [];
Expand Down Expand Up @@ -293,7 +293,7 @@ $(document).ready(function(){
$(this).hide();
});


$(function(){
$('.date-pick').datePicker({startDate:'01/01/1996'});
});
Expand Down Expand Up @@ -487,7 +487,7 @@ function getInlineContactForm() {
}

function updateIssues(){
currentTab = "Issues";
currentTab = "Issues";
$.ajax({
type: "GET",
url: "ajax_htmldata.php",
Expand Down
2 changes: 1 addition & 1 deletion usage/ajax_htmldata.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
$orgArray = $publisherPlatform->getOrganizationExternalLogins();
$externalLoginArray = $publisherPlatform->getExternalLogins();

if ((count($orgArray) > 0) || (count($externalLoginArray) > 0)){
if ((is_array($orgArray) && count($orgArray) > 0) || (is_array($externalLoginArray) && count($externalLoginArray) > 0)){
$pub = new Publisher(new NamedArguments(array('primaryKey' => $publisherPlatform->publisherID)));
$pubArray[$publisherPlatform->publisherID] = $pub->name;
}
Expand Down
23 changes: 10 additions & 13 deletions usage/js/forms/platformNoteSubmitForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,23 @@

$(function(){


$("#submitPlatformNoteForm").click(function () {
submitPlatformNotes();
$(document).on('click', '#submitPlatformNoteForm', function () {
submitPlatformNotes();
});



//do submit if enter is hit
$('#startYear').keyup(function(e) {
if(e.keyCode == 13) {
submitPlatformNotes();
}
$(document).on('keyup', '#startYear', function (e) {
if(e.keyCode === 13) {
submitPlatformNotes();
}
});


//do submit if enter is hit
$('#endYear').keyup(function(e) {
if(e.keyCode == 13) {
submitPlatformNotes();
}
$(document).on('keyup', '#endYear', function (e) {
if(e.keyCode === 13) {
submitPlatformNotes();
}
});


Expand Down
25 changes: 12 additions & 13 deletions usage/js/forms/publisherNoteSubmitForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,26 @@

$(function(){


$("#submitPublisherNoteForm").click(function () {
submitPublisherNote();
});
$(document).on('click', '#submitPublisherNoteForm', function (e) {
submitPublisherNote();
});



//do submit if enter is hit
$('#startYear').keyup(function(e) {
if(e.keyCode == 13) {
submitPublisherNote();
}
$(document).on('keyup', '#startYear', function (e) {
if(e.keyCode === 13) {
submitPublisherNote();
}
});


//do submit if enter is hit
$('#endYear').keyup(function(e) {
if(e.keyCode == 13) {
submitPublisherNote();
}
});
$(document).on('keyup', '#endYear', function (e) {
if(e.keyCode === 13) {
submitPublisherNote();
}
});



Expand Down