Two small fixes
This commit is contained in:
parent
aad4023ed5
commit
07fb7a99bc
3 changed files with 17 additions and 4 deletions
|
@ -1,7 +1,9 @@
|
||||||
# Changelog:
|
# Changelog:
|
||||||
* **30.09.18**
|
* **30.09.18**
|
||||||
- Added the permission system (Assignments and management)
|
- Added the permission system (Assignments and management)
|
||||||
|
* Fixed poke and client description with empty message
|
||||||
|
* Fixed channel tree icons
|
||||||
|
|
||||||
* **26.09.18**:
|
* **26.09.18**:
|
||||||
- Added Safari support
|
- Added Safari support
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,9 @@ if(typeof ($) !== "undefined") {
|
||||||
if(!$.prototype.renderTag) {
|
if(!$.prototype.renderTag) {
|
||||||
$.prototype.renderTag = function (values?: any) : JQuery {
|
$.prototype.renderTag = function (values?: any) : JQuery {
|
||||||
let result = $(this.render(values));
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@ class ClientEntry {
|
||||||
name: "Poke client",
|
name: "Poke client",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
createInputModal("Poke client", "Poke message:<br>", text => true, result => {
|
createInputModal("Poke client", "Poke message:<br>", text => true, result => {
|
||||||
if(result) {
|
if(typeof(result) === "string") {
|
||||||
console.log("Poking client " + _this.clientNickName() + " with message " + result);
|
console.log("Poking client " + _this.clientNickName() + " with message " + result);
|
||||||
_this.channelTree.client.serverConnection.sendCommand("clientpoke", {
|
_this.channelTree.client.serverConnection.sendCommand("clientpoke", {
|
||||||
clid: _this.clientId(),
|
clid: _this.clientId(),
|
||||||
|
@ -244,7 +244,7 @@ class ClientEntry {
|
||||||
name: "Change description",
|
name: "Change description",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
createInputModal("Change client description", "New description:<br>", text => true, result => {
|
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);
|
console.log("Changing " + _this.clientNickName() + "'s description to " + result);
|
||||||
_this.channelTree.client.serverConnection.sendCommand("clientedit", {
|
_this.channelTree.client.serverConnection.sendCommand("clientedit", {
|
||||||
clid: _this.clientId(),
|
clid: _this.clientId(),
|
||||||
|
@ -501,11 +501,20 @@ class ClientEntry {
|
||||||
}
|
}
|
||||||
if(variable.key == "client_icon_id")
|
if(variable.key == "client_icon_id")
|
||||||
this.updateClientIcon();
|
this.updateClientIcon();
|
||||||
|
if(variable.key =="client_channel_group_id" || variable.key == "client_servergroups")
|
||||||
|
this.updateGroupIcons();
|
||||||
}
|
}
|
||||||
|
|
||||||
group.end();
|
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(){
|
updateClientVariables(){
|
||||||
if(this.lastVariableUpdate == 0 || new Date().getTime() - 10 * 60 * 1000 > this.lastVariableUpdate){ //Cache these only 10 min
|
if(this.lastVariableUpdate == 0 || new Date().getTime() - 10 * 60 * 1000 > this.lastVariableUpdate){ //Cache these only 10 min
|
||||||
this.lastVariableUpdate = new Date().getTime();
|
this.lastVariableUpdate = new Date().getTime();
|
||||||
|
|
Loading…
Add table
Reference in a new issue