1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 18:22:41 +01:00

Use JX.DOM everywhere in behavior-dropdown

Summary: see title

Test Plan: Tested locally. Noticed same number replacement and bold/unbold text as before.

Reviewers: epriestley

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin, David

Differential Revision: https://secure.phabricator.com/D2720
This commit is contained in:
David Fisher 2012-06-12 05:45:23 -07:00 committed by epriestley
parent 655bec9eeb
commit 8b15d1928d
2 changed files with 9 additions and 3 deletions

View file

@ -258,6 +258,10 @@ a.handle-disabled {
background-color: #0089d9;
}
.phabricator-notification-indicator-unread {
font-weight: bold;
}
#phabricator-notification-dropdown {
word-wrap: break-word;

View file

@ -19,11 +19,13 @@ JX.behavior('aphlict-dropdown', function(config) {
}
request = new JX.Request('/notification/panel/', function(response) {
indicator.textContent = '' + response.number;
JX.DOM.setContent(indicator, response.number);
if (response.number == 0) {
indicator.style.fontWeight = "";
JX.DOM.alterClass(indicator,
"phabricator-notification-indicator-unread", false);
} else {
indicator.style.fontWeight = "bold";
JX.DOM.alterClass(indicator,
"phabricator-notification-indicator-unread", true);
}
JX.DOM.setContent(dropdown, JX.$H(response.content));
request = null;