From 6aeb4108b2caee504d08a48dff32a0d8a82cdfe4 Mon Sep 17 00:00:00 2001
From: j2blake
Date: Thu, 10 Nov 2011 23:15:16 +0000
Subject: [PATCH] NIHVIVO-2343 Filter the auto-complete, excluding self as a
proxy or as a profile.
---
webapp/web/js/account/accountProxyItemsPanel.js | 7 ++++---
.../body/accounts/userAccounts-myProxiesPanel.ftl | 1 +
.../freemarker/body/manageproxies/manageProxies-list.ftl | 1 +
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/webapp/web/js/account/accountProxyItemsPanel.js b/webapp/web/js/account/accountProxyItemsPanel.js
index c490b14a9..4014d17d0 100644
--- a/webapp/web/js/account/accountProxyItemsPanel.js
+++ b/webapp/web/js/account/accountProxyItemsPanel.js
@@ -24,10 +24,13 @@ function proxyItemsPanel(panel, contextInfo) {
this.itemData = [];
- var excludedUris = contextInfo.excludedUris;
var dataContainerElement = $("[name='proxyData']", panel).first();
var autoCompleteField = $("input[name='proxySelectorAC']", 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 templateDiv = $("div[name='template']", dataContainer)
@@ -161,7 +164,6 @@ $(document).ready(function() {
$("div[name='proxyProfilesPanel']").each(function(i) {
var context = {
- excludedUris: [],
baseUrl: proxyContextInfo.baseUrl,
ajaxUrl: proxyContextInfo.ajaxUrl,
basicInfoAction: "getAvailableProfiles",
@@ -172,7 +174,6 @@ $(document).ready(function() {
$("div[name='proxyProxiesPanel']").each(function(i) {
var context = {
- excludedUris: [],
baseUrl: proxyContextInfo.baseUrl,
ajaxUrl: proxyContextInfo.ajaxUrl,
basicInfoAction: "getAvailableProxies",
diff --git a/webapp/web/templates/freemarker/body/accounts/userAccounts-myProxiesPanel.ftl b/webapp/web/templates/freemarker/body/accounts/userAccounts-myProxiesPanel.ftl
index 080fd5e4b..4ebb1da7a 100644
--- a/webapp/web/templates/freemarker/body/accounts/userAccounts-myProxiesPanel.ftl
+++ b/webapp/web/templates/freemarker/body/accounts/userAccounts-myProxiesPanel.ftl
@@ -12,6 +12,7 @@ ${stylesheets.add('
+
${myAccountUri}
Selected editors:
<#-- Magic div thst holds all of the proxy data and the template that shows how to display it. -->
diff --git a/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl b/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl
index dd6cf52de..ceff1be4d 100644
--- a/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl
+++ b/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl
@@ -169,6 +169,7 @@ ${stylesheets.add('${r.proxyInfos[0].profileUri}