From f5fc34628ba508d7c8e8aa4bfd8043df1bf55aea Mon Sep 17 00:00:00 2001 From: j2blake Date: Fri, 28 Oct 2011 14:53:13 +0000 Subject: [PATCH] NIHVIVO-2343 Use more specific CSS style names to avoid conflict. --- webapp/web/css/account/proxy.css | 6 +++--- webapp/web/js/account/accountProxyCommon.js | 14 +++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/webapp/web/css/account/proxy.css b/webapp/web/css/account/proxy.css index 7dc2af65f..44974e65c 100644 --- a/webapp/web/css/account/proxy.css +++ b/webapp/web/css/account/proxy.css @@ -4,12 +4,12 @@ /* BOGUS STUFF FOR PROXIES ------------------------------------> */ /* -------------------------------------------------> */ -.new { +.newProxyItem { background-color: #DDFFDD; } -.existing { +.existingProxyItem { background-color: #DDDDDD; } -.removed { +.removedProxyItem { background-color: #FFDDDD; } diff --git a/webapp/web/js/account/accountProxyCommon.js b/webapp/web/js/account/accountProxyCommon.js index 309568d8f..2f583cbb4 100644 --- a/webapp/web/js/account/accountProxyCommon.js +++ b/webapp/web/js/account/accountProxyCommon.js @@ -25,8 +25,12 @@ * %imageUrl% -- the URL that will fetch the image of the individual, * or a placeholder image. * ---------------------------------------------------------------------------- + * This relies on magic names for the styles: + * existingProxyItem -- for an item that was present when the page was loaded + * newProxyItem -- for an item that was added since the page was loaded + * removedProxyItem -- added to an item when the "remove" link is cheked. + * ---------------------------------------------------------------------------- */ - function proxyInfoElement(template, uri, label, classLabel, imageUrl, existing) { this.uri = uri; this.label = label; @@ -56,11 +60,11 @@ function proxyInfoElement(template, uri, label, classLabel, imageUrl, existing) if (removed) { removeLink.text(restoreText); proxyUriField.attr('disabled', 'disabled'); - element.addClass('removed'); + element.addClass('removedProxyItem'); } else { removeLink.text(removeText); proxyUriField.attr('disabled', ''); - element.removeClass('removed'); + element.removeClass('removedProxyItem'); } } @@ -70,8 +74,8 @@ function proxyInfoElement(template, uri, label, classLabel, imageUrl, existing) return false; }); - element.removeClass('new existing removed'); - element.addClass(existed ? 'existing' : 'new') + element.removeClass('newProxyItem existingProxyItem removedProxyItem'); + element.addClass(existed ? 'existingProxyItem' : 'newProxyItem') showRemoved() return element;