Two small fixes
parent
aad4023ed5
commit
07fb7a99bc
|
@ -1,6 +1,8 @@
|
|||
# Changelog:
|
||||
* **30.09.18**
|
||||
- Added the permission system (Assignments and management)
|
||||
* Fixed poke and client description with empty message
|
||||
* Fixed channel tree icons
|
||||
|
||||
* **26.09.18**:
|
||||
- Added Safari support
|
||||
|
|
|
@ -109,7 +109,9 @@ if(typeof ($) !== "undefined") {
|
|||
if(!$.prototype.renderTag) {
|
||||
$.prototype.renderTag = function (values?: any) : JQuery {
|
||||
let result = $(this.render(values));
|
||||
result.find("node").each((index, element) => { $(element).replaceWith(values[$(element).attr("key")]); });
|
||||
result.find("node").each((index, element) => {
|
||||
$(element).replaceWith(values[$(element).attr("key")] || values[0][$(element).attr("key")]);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ class ClientEntry {
|
|||
name: "Poke client",
|
||||
callback: function () {
|
||||
createInputModal("Poke client", "Poke message:<br>", text => true, result => {
|
||||
if(result) {
|
||||
if(typeof(result) === "string") {
|
||||
console.log("Poking client " + _this.clientNickName() + " with message " + result);
|
||||
_this.channelTree.client.serverConnection.sendCommand("clientpoke", {
|
||||
clid: _this.clientId(),
|
||||
|
@ -244,7 +244,7 @@ class ClientEntry {
|
|||
name: "Change description",
|
||||
callback: function () {
|
||||
createInputModal("Change client description", "New description:<br>", text => true, result => {
|
||||
if(result) {
|
||||
if(typeof(result) === "string") {
|
||||
console.log("Changing " + _this.clientNickName() + "'s description to " + result);
|
||||
_this.channelTree.client.serverConnection.sendCommand("clientedit", {
|
||||
clid: _this.clientId(),
|
||||
|
@ -501,11 +501,20 @@ class ClientEntry {
|
|||
}
|
||||
if(variable.key == "client_icon_id")
|
||||
this.updateClientIcon();
|
||||
if(variable.key =="client_channel_group_id" || variable.key == "client_servergroups")
|
||||
this.updateGroupIcons();
|
||||
}
|
||||
|
||||
group.end();
|
||||
}
|
||||
|
||||
updateGroupIcons() {
|
||||
this.tag.find("span .group_icons").children().detach();
|
||||
for(let id of this.assignedServerGroupIds())
|
||||
this.updateGroupIcon(this.channelTree.client.groups.serverGroup(id));
|
||||
this.updateGroupIcon(this.channelTree.client.groups.channelGroup(this.properties.client_channel_group_id));
|
||||
}
|
||||
|
||||
updateClientVariables(){
|
||||
if(this.lastVariableUpdate == 0 || new Date().getTime() - 10 * 60 * 1000 > this.lastVariableUpdate){ //Cache these only 10 min
|
||||
this.lastVariableUpdate = new Date().getTime();
|
||||
|
|
Loading…
Reference in New Issue