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

@ -470,4 +470,12 @@ h4.profile-editors {
.proxy-item {
margin-left: 20px;
margin-top: 20px;
}
span[name=proxySelectorSearchStatus] {
color: red;
}
img.loading-relateEdior,
img.loading-relateProfile,
img.loading-addProfile {
padding-left: 10px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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

View file

@ -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

View file

@ -30,7 +30,7 @@
<section name="proxyProxiesPanel" role="section">
<label for="selectProfileEditors">Select editors</label>
<input id="selectProfileEditors" type="text" name="proxySelectorAC" class="acSelector" size="35" value="Select an existing last name" role="input" />
<input id="selectProfileEditors" type="text" name="proxySelectorAC" class="acSelector" size="35" value="Select an existing last name" role="input" /><span><img class="loading-relateEditor hidden" src="${urls.images}/indicatorWhite.gif" /></span>
<p class="search-status"><span name='proxySelectorSearchStatus' moreCharsText='type more characters' noMatchText='no match'>&nbsp;</span></p>
<#-- Magic div that holds all of the proxy data and the template that shows how to display it. -->
@ -61,8 +61,8 @@
<legend>Select profiles</legend>
<section name="proxyProfilesPanel" role="region">
<label for="selectProfileEditors">Select profiles</label>
<input id="selectProfileEditors" type="text" name="proxySelectorAC" class="acSelector" size="35" value="Select an existing last name" role="input" />
<label for="selectProfiles">Select profiles</label>
<input id="selectProfiles" type="text" name="proxySelectorAC" class="acSelector" size="35" value="Select an existing last name" role="input" /><span><img class="loading-relateProfile hidden" src="${urls.images}/indicatorWhite.gif" /></span>
<p class="search-status"><span name='proxySelectorSearchStatus' moreCharsText='type more characters' noMatchText='no match'>&nbsp;</span></p>
@ -140,7 +140,7 @@
<section name="proxyProfilesPanel" role="region">
<label for="addProfile">Add profile</label>
<input id="addProfile" type="text" name="proxySelectorAC" class="acSelector" size="35" value="Select an existing last name" role="input" />
<input id="addProfile" type="text" name="proxySelectorAC" class="acSelector" size="35" value="Select an existing last name" role="input" /><span><img class="loading-addProfile hidden" src="${urls.images}/indicatorWhite.gif" /></span>
<p class="search-status"><span name='proxySelectorSearchStatus' moreCharsText='type more characters' noMatchText='no match'>&nbsp;</span></p>
<p name="excludeUri" style="display: none">${r.proxyInfos[0].profileUri}<p>