NIHVIVO-3468 When the click comes, record which image we want to show/hide.
This commit is contained in:
parent
641a062124
commit
a0d96494ea
1 changed files with 9 additions and 21 deletions
|
@ -188,38 +188,26 @@ $(document).ready(function() {
|
||||||
|
|
||||||
//Add progress indicator for autocomplete input fields
|
//Add progress indicator for autocomplete input fields
|
||||||
|
|
||||||
var inputClick;
|
var progressImage;
|
||||||
|
|
||||||
$('#selectProfileEditors').click(function(){
|
$('#selectProfileEditors').click(function(event){
|
||||||
inputClick = ".loading-relateEditor";
|
progressImage = $(event.target).closest("section").find(".loading-relateEditor")
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#selectProfiles').click(function(){
|
$('#selectProfiles').click(function(event){
|
||||||
inputClick = ".loading-relateProfile";
|
progressImage = $(event.target).closest("section").find(".loading-relateProfile")
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#addProfile').click(function(){
|
$('#addProfile').click(function(event){
|
||||||
inputClick = ".loading-addProfile";
|
progressImage = $(event.target).closest("section").find(".loading-addProfile")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$(document).ajaxStart(function(){
|
$(document).ajaxStart(function(){
|
||||||
if (inputClick = ".loading-relateProfile"){
|
progressImage.removeClass('hidden').css('display', 'inline-block');
|
||||||
$('.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(){
|
$(document).ajaxStop(function(){
|
||||||
if (inputClick = ".loading-relateProfile"){
|
progressImage.hide().addClass('hidden');
|
||||||
$('.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');;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue