NIHVIVO-3468: Started work for adding progress indicator to autocomplete fields
This commit is contained in:
parent
55d1f7c5c7
commit
641a062124
5 changed files with 50 additions and 4 deletions
|
@ -185,4 +185,41 @@ $(document).ready(function() {
|
|||
}
|
||||
this["proxyItemsPanel"] = new proxyItemsPanel(this, context);
|
||||
});
|
||||
|
||||
//Add progress indicator for autocomplete input fields
|
||||
|
||||
var inputClick;
|
||||
|
||||
$('#selectProfileEditors').click(function(){
|
||||
inputClick = ".loading-relateEditor";
|
||||
});
|
||||
|
||||
$('#selectProfiles').click(function(){
|
||||
inputClick = ".loading-relateProfile";
|
||||
});
|
||||
|
||||
$('#addProfile').click(function(){
|
||||
inputClick = ".loading-addProfile";
|
||||
});
|
||||
|
||||
|
||||
$(document).ajaxStart(function(){
|
||||
if (inputClick = ".loading-relateProfile"){
|
||||
$('.loading-relateProfile').removeClass('hidden').css('display', 'inline-block');
|
||||
}else if (inputClick = ".loading-addProfile"){
|
||||
$('.loading-addProfile').removeClass('hidden').css('display', 'inline-block');
|
||||
}else if (inputClick = ".loading-relateEditor"){
|
||||
$('.loading-relateEditor').removeClass('hidden').css('display', 'inline-block');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ajaxStop(function(){
|
||||
if (inputClick = ".loading-relateProfile"){
|
||||
$('.loading-relateProfile').hide().addClass('hidden');;
|
||||
}else if (inputClick = ".loading-addProfile"){
|
||||
$('.loading-addProfile').hide().addClass('hidden');;
|
||||
}else if (inputClick = ".loading-relateEditor"){
|
||||
$('.loading-relateEditor').hide().addClass('hidden');;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,6 +4,7 @@ $(document).ready(function(){
|
|||
//Remove initial value of input text 'Select an existing last name'
|
||||
$('input[name="proxySelectorAC"]').click(function(){
|
||||
$(this).val('');
|
||||
$("span[name='proxySelectorSearchStatus']").text('')
|
||||
});
|
||||
|
||||
//Alert when user doesn't select an editor and a profile after submitting from for relating proxy-profiles
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue