NIHVIVO-3468: Started work for adding progress indicator to autocomplete fields

This commit is contained in:
manolobevia 2011-12-09 18:51:22 +00:00
parent 55d1f7c5c7
commit 641a062124
5 changed files with 50 additions and 4 deletions

View file

@ -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');;
}
});
});