зеркало из https://github.com/mozilla/gecko-dev.git
Bug 325457 - Add visual support for +a (admin) and +q (founder) modes on supported servers.
ChatZilla only. r=silver p=rdmsoft@bugs.rdmsoft.com (Robert Marshall)
This commit is contained in:
Родитель
6324418b63
Коммит
9bd5398075
|
@ -80,6 +80,10 @@ chatzilla.jar:
|
|||
skin/modern/chatzilla/images/face-wink.png (xul/skin/images/face-wink.png)
|
||||
skin/modern/chatzilla/images/no-symbol.png (xul/skin/images/no-symbol.png)
|
||||
skin/modern/chatzilla/images/no-graphic.png (xul/skin/images/no-graphic.png)
|
||||
skin/modern/chatzilla/images/founder-symbol.png (xul/skin/images/founder-symbol.png)
|
||||
skin/modern/chatzilla/images/founder-graphic.png (xul/skin/images/founder-graphic.png)
|
||||
skin/modern/chatzilla/images/admin-symbol.png (xul/skin/images/admin-symbol.png)
|
||||
skin/modern/chatzilla/images/admin-graphic.png (xul/skin/images/admin-graphic.png)
|
||||
skin/modern/chatzilla/images/op-symbol.png (xul/skin/images/op-symbol.png)
|
||||
skin/modern/chatzilla/images/op-graphic.png (xul/skin/images/op-graphic.png)
|
||||
skin/modern/chatzilla/images/halfop-symbol.png (xul/skin/images/halfop-symbol.png)
|
||||
|
|
|
@ -3177,6 +3177,10 @@ function CIRCChanUser(parent, unicodeName, encodedName, modes)
|
|||
}
|
||||
}
|
||||
}
|
||||
existingUser.isFounder = (arrayContains(existingUser.modes, "q")) ?
|
||||
true : false;
|
||||
existingUser.isAdmin = (arrayContains(existingUser.modes, "a")) ?
|
||||
true : false;
|
||||
existingUser.isOp = (arrayContains(existingUser.modes, "o")) ?
|
||||
true : false;
|
||||
existingUser.isHalfOp = (arrayContains(existingUser.modes, "h")) ?
|
||||
|
@ -3207,6 +3211,8 @@ function CIRCChanUser(parent, unicodeName, encodedName, modes)
|
|||
this.modes = new Array();
|
||||
if (typeof modes != "undefined")
|
||||
this.modes = modes;
|
||||
this.isFounder = (arrayContains(this.modes, "q")) ? true : false;
|
||||
this.isAdmin = (arrayContains(this.modes, "a")) ? true : false;
|
||||
this.isOp = (arrayContains(this.modes, "o")) ? true : false;
|
||||
this.isHalfOp = (arrayContains(this.modes, "h")) ? true : false;
|
||||
this.isVoice = (arrayContains(this.modes, "v")) ? true : false;
|
||||
|
|
|
@ -81,6 +81,8 @@
|
|||
|
||||
<bindings>
|
||||
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#sortname" object="?sortname"/>
|
||||
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#founder" object="?founder"/>
|
||||
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#admin" object="?admin"/>
|
||||
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#op" object="?op"/>
|
||||
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#halfop" object="?halfop"/>
|
||||
<binding subject="?member" predicate="http://home.netscape.com/NC-irc#voice" object="?voice"/>
|
||||
|
@ -92,9 +94,9 @@
|
|||
<action>
|
||||
<treechildren>
|
||||
<treeitem uri="?member" flex="1"
|
||||
properties="op-?op halfop-?halfop voice-?voice away-?away">
|
||||
properties="founder-?founder admin-?admin op-?op halfop-?halfop voice-?voice away-?away">
|
||||
<treerow>
|
||||
<treecell properties="op-?op halfop-?halfop voice-?voice away-?away"
|
||||
<treecell properties="founder-?founder admin-?admin op-?op halfop-?halfop voice-?voice away-?away"
|
||||
label="?nick" unicodeName="?unicodeName"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
|
@ -105,7 +107,7 @@
|
|||
|
||||
<treecols>
|
||||
<treecol id="usercol" hideheader="true" flex="1"
|
||||
properties="op-?op halfop-?halfop voice-?voice away-?away"/>
|
||||
properties="founder-?founder admin-?admin op-?op halfop-?halfop voice-?voice away-?away"/>
|
||||
</treecols>
|
||||
</tree>
|
||||
|
||||
|
|
|
@ -75,6 +75,8 @@ function RDFHelper()
|
|||
this.resChannel = this.svc.GetResource (RES_PFX + "channel");
|
||||
this.resChanUser = this.svc.GetResource (RES_PFX + "chanuser");
|
||||
this.resSortName = this.svc.GetResource (RES_PFX + "sortname");
|
||||
this.resFounder = this.svc.GetResource (RES_PFX + "founder");
|
||||
this.resAdmin = this.svc.GetResource (RES_PFX + "admin");
|
||||
this.resOp = this.svc.GetResource (RES_PFX + "op");
|
||||
this.resHalfOp = this.svc.GetResource (RES_PFX + "halfop");
|
||||
this.resVoice = this.svc.GetResource (RES_PFX + "voice");
|
||||
|
@ -89,6 +91,8 @@ function RDFHelper()
|
|||
this.litFalse = this.svc.GetLiteral ("false");
|
||||
this.litUnk = this.svc.GetLiteral ("");
|
||||
|
||||
this.ds.Assert (this.resNullUser, this.resFounder, this.litFalse, true);
|
||||
this.ds.Assert (this.resNullUser, this.resAdmin, this.litFalse, true);
|
||||
this.ds.Assert (this.resNullUser, this.resOp, this.litFalse, true);
|
||||
this.ds.Assert (this.resNullUser, this.resHalfOp, this.litFalse, true);
|
||||
this.ds.Assert (this.resNullUser, this.resVoice, this.litFalse, true);
|
||||
|
|
|
@ -2493,7 +2493,11 @@ function updateTitle (obj)
|
|||
if (o.parent.me.canonicalName in client.currentObject.users)
|
||||
{
|
||||
var cuser = client.currentObject.users[o.parent.me.canonicalName];
|
||||
if (cuser.isOp)
|
||||
if (cuser.isFounder)
|
||||
nick = "~" + nick;
|
||||
else if (cuser.isAdmin)
|
||||
nick = "&" + nick;
|
||||
else if (cuser.isOp)
|
||||
nick = "@" + nick;
|
||||
else if (cuser.isHalfOp)
|
||||
nick = "%" + nick;
|
||||
|
@ -4641,6 +4645,8 @@ function usr_graphres()
|
|||
rdf.Assert (this.rdfRes, rdf.resUser, rdf.litUnk);
|
||||
rdf.Assert (this.rdfRes, rdf.resHost, rdf.litUnk);
|
||||
rdf.Assert (this.rdfRes, rdf.resSortName, rdf.litUnk);
|
||||
rdf.Assert (this.rdfRes, rdf.resFounder, rdf.litUnk);
|
||||
rdf.Assert (this.rdfRes, rdf.resAdmin, rdf.litUnk);
|
||||
rdf.Assert (this.rdfRes, rdf.resOp, rdf.litUnk);
|
||||
rdf.Assert (this.rdfRes, rdf.resHalfOp, rdf.litUnk);
|
||||
rdf.Assert (this.rdfRes, rdf.resVoice, rdf.litUnk);
|
||||
|
@ -4681,7 +4687,7 @@ function usr_updres()
|
|||
// Check for the highest mode the user has.
|
||||
const userModes = this.parent.parent.userModes;
|
||||
var modeLevel = 0;
|
||||
var mode = "";
|
||||
var mode;
|
||||
for (var i = 0; i < this.modes.length; i++)
|
||||
{
|
||||
for (var j = 0; j < userModes.length; j++)
|
||||
|
@ -4691,7 +4697,7 @@ function usr_updres()
|
|||
if (userModes.length - j > modeLevel)
|
||||
{
|
||||
modeLevel = userModes.length - j;
|
||||
mode = userModes[j].symbol;
|
||||
mode = userModes[j];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -4701,17 +4707,17 @@ function usr_updres()
|
|||
// Counts numerically down from 9.
|
||||
var sortname = (9 - modeLevel) + "-" + this.unicodeName;
|
||||
|
||||
// We want to show mode symbols, but only those we don't 'style'.
|
||||
if (mode && !mode.match(/^[@%+]$/))
|
||||
{
|
||||
rdf.Change(this.rdfRes, rdf.resNick,
|
||||
rdf.GetLiteral(mode + " " + this.unicodeName));
|
||||
}
|
||||
else
|
||||
{
|
||||
rdf.Change (this.rdfRes, rdf.resNick, rdf.GetLiteral(this.unicodeName));
|
||||
}
|
||||
// We want to show mode symbols, but only for modes we don't 'style'.
|
||||
var displayname = this.unicodeName;
|
||||
if (mode && !mode.mode.match(/^[qaohv]$/))
|
||||
displayname = mode.symbol + " " + displayname;
|
||||
|
||||
rdf.Change(this.rdfRes, rdf.resNick, rdf.GetLiteral(displayname));
|
||||
rdf.Change(this.rdfRes, rdf.resSortName, rdf.GetLiteral(sortname));
|
||||
rdf.Change(this.rdfRes, rdf.resFounder,
|
||||
this.isFounder ? rdf.litTrue : rdf.litFalse);
|
||||
rdf.Change(this.rdfRes, rdf.resAdmin,
|
||||
this.isAdmin ? rdf.litTrue : rdf.litFalse);
|
||||
rdf.Change(this.rdfRes, rdf.resOp,
|
||||
this.isOp ? rdf.litTrue : rdf.litFalse);
|
||||
rdf.Change(this.rdfRes, rdf.resHalfOp,
|
||||
|
|
|
@ -201,6 +201,40 @@ treechildren::-moz-tree-image(op-true) {
|
|||
list-style-image: url(chrome://chatzilla/skin/images/op-graphic.png);
|
||||
}
|
||||
|
||||
/* admin */
|
||||
treechildren:-moz-tree-image(admin-true) {
|
||||
list-style-image: url(chrome://chatzilla/skin/images/admin-symbol.png);
|
||||
}
|
||||
|
||||
treechildren::-moz-tree-image(admin-true) {
|
||||
list-style-image: url(chrome://chatzilla/skin/images/admin-symbol.png);
|
||||
}
|
||||
|
||||
#user-list[mode="graphic"] treechildren:-moz-tree-image(admin-true) {
|
||||
list-style-image: url(chrome://chatzilla/skin/images/admin-graphic.png);
|
||||
}
|
||||
|
||||
#user-list[mode="graphic"] treechildren::-moz-tree-image(admin-true) {
|
||||
list-style-image: url(chrome://chatzilla/skin/images/admin-graphic.png);
|
||||
}
|
||||
|
||||
/* founder */
|
||||
treechildren:-moz-tree-image(founder-true) {
|
||||
list-style-image: url(chrome://chatzilla/skin/images/founder-symbol.png);
|
||||
}
|
||||
|
||||
treechildren::-moz-tree-image(founder-true) {
|
||||
list-style-image: url(chrome://chatzilla/skin/images/founder-symbol.png);
|
||||
}
|
||||
|
||||
#user-list[mode="graphic"] treechildren:-moz-tree-image(founder-true) {
|
||||
list-style-image: url(chrome://chatzilla/skin/images/founder-graphic.png);
|
||||
}
|
||||
|
||||
#user-list[mode="graphic"] treechildren::-moz-tree-image(founder-true) {
|
||||
list-style-image: url(chrome://chatzilla/skin/images/founder-graphic.png);
|
||||
}
|
||||
|
||||
/* away */
|
||||
treechildren:-moz-tree-cell-text(away-true) {
|
||||
color: GrayText;
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 237 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 244 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 239 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 172 B |
Загрузка…
Ссылка в новой задаче