NIHVIVO-2343 Filter the auto-complete, excluding self as a proxy or as a profile.
This commit is contained in:
parent
e4fe6aa812
commit
6aeb4108b2
3 changed files with 6 additions and 3 deletions
|
@ -24,10 +24,13 @@ function proxyItemsPanel(panel, contextInfo) {
|
||||||
|
|
||||||
this.itemData = [];
|
this.itemData = [];
|
||||||
|
|
||||||
var excludedUris = contextInfo.excludedUris;
|
|
||||||
var dataContainerElement = $("[name='proxyData']", panel).first();
|
var dataContainerElement = $("[name='proxyData']", panel).first();
|
||||||
var autoCompleteField = $("input[name='proxySelectorAC']", panel).first();
|
var autoCompleteField = $("input[name='proxySelectorAC']", panel).first();
|
||||||
var searchStatusField = $("span[name='proxySelectorSearchStatus']", panel).first();
|
var searchStatusField = $("span[name='proxySelectorSearchStatus']", panel).first();
|
||||||
|
var excludedUris = [];
|
||||||
|
$("[name='excludeUri']", panel).each(function(index) {
|
||||||
|
excludedUris.push($(this).text());
|
||||||
|
});
|
||||||
|
|
||||||
var parseTemplate = function(dataContainer) {
|
var parseTemplate = function(dataContainer) {
|
||||||
var templateDiv = $("div[name='template']", dataContainer)
|
var templateDiv = $("div[name='template']", dataContainer)
|
||||||
|
@ -161,7 +164,6 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$("div[name='proxyProfilesPanel']").each(function(i) {
|
$("div[name='proxyProfilesPanel']").each(function(i) {
|
||||||
var context = {
|
var context = {
|
||||||
excludedUris: [],
|
|
||||||
baseUrl: proxyContextInfo.baseUrl,
|
baseUrl: proxyContextInfo.baseUrl,
|
||||||
ajaxUrl: proxyContextInfo.ajaxUrl,
|
ajaxUrl: proxyContextInfo.ajaxUrl,
|
||||||
basicInfoAction: "getAvailableProfiles",
|
basicInfoAction: "getAvailableProfiles",
|
||||||
|
@ -172,7 +174,6 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$("div[name='proxyProxiesPanel']").each(function(i) {
|
$("div[name='proxyProxiesPanel']").each(function(i) {
|
||||||
var context = {
|
var context = {
|
||||||
excludedUris: [],
|
|
||||||
baseUrl: proxyContextInfo.baseUrl,
|
baseUrl: proxyContextInfo.baseUrl,
|
||||||
ajaxUrl: proxyContextInfo.ajaxUrl,
|
ajaxUrl: proxyContextInfo.ajaxUrl,
|
||||||
basicInfoAction: "getAvailableProxies",
|
basicInfoAction: "getAvailableProxies",
|
||||||
|
|
|
@ -12,6 +12,7 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/auto
|
||||||
|
|
||||||
<p><input type="text" name="proxySelectorAC" class="acSelector" size="35" value="Select an existing last name"></p>
|
<p><input type="text" name="proxySelectorAC" class="acSelector" size="35" value="Select an existing last name"></p>
|
||||||
<p class="search-status"><span name='proxySelectorSearchStatus' moreCharsText='type more characters' noMatchText='no match'> </span></p>
|
<p class="search-status"><span name='proxySelectorSearchStatus' moreCharsText='type more characters' noMatchText='no match'> </span></p>
|
||||||
|
<p name="excludeUri" style="display: none">${myAccountUri}<p>
|
||||||
|
|
||||||
<p class="selected-editors">Selected editors:</p>
|
<p class="selected-editors">Selected editors:</p>
|
||||||
<#-- Magic div thst holds all of the proxy data and the template that shows how to display it. -->
|
<#-- Magic div thst holds all of the proxy data and the template that shows how to display it. -->
|
||||||
|
|
|
@ -169,6 +169,7 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/sm
|
||||||
moreCharsText='type more characters'
|
moreCharsText='type more characters'
|
||||||
noMatchText='no match'> </span>
|
noMatchText='no match'> </span>
|
||||||
</p>
|
</p>
|
||||||
|
<p name="excludeUri" style="display: none">${r.proxyInfos[0].profileUri}<p>
|
||||||
|
|
||||||
<p class="selected-editors">Selected profiles:</p>
|
<p class="selected-editors">Selected profiles:</p>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue