X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageAdmin.js;h=06c2ca5315eb181caf84341f5fc178fcf1f7c688;hp=04b642c3e7b7689898658b1a0befb8962abdfeef;hb=ed281cb4331777625994d23a6e424fb7c5b5d2c9;hpb=d1dff528ecf8ace680f8ba92d11b09e84fd6ff2f diff --git a/js/pageAdmin.js b/js/pageAdmin.js index 04b642c..06c2ca5 100644 --- a/js/pageAdmin.js +++ b/js/pageAdmin.js @@ -17,9 +17,9 @@ // along with Euphorik. If not, see . // // La page d'administation, ne peut être accédée que par les ekMaster (admins) - -/*jslint laxbreak:true */ - + +/*jslint laxbreak:true */ + euphorik.PageAdmin = function(client, formateur, util) { this.nom = "admin"; @@ -84,7 +84,7 @@ euphorik.PageAdmin.prototype.decharger = function() { // supprime le rafraichissement période des ips if (this.timeoutIDmajIPs) { - clearTimeout(this.timeoutIDmajIPs); + clearTimeout(this.timeoutIDmajIPs); } }; @@ -129,7 +129,7 @@ euphorik.PageAdmin.prototype.posterTroll = function() { */ euphorik.PageAdmin.prototype.majIPs = function() { if (this.timeoutIDmajIPs) { - clearTimeout(this.timeoutIDmajIPs); + clearTimeout(this.timeoutIDmajIPs); } var thisPageAdmin = this; @@ -147,12 +147,12 @@ euphorik.PageAdmin.prototype.majIPs = function() { success: function(data) { if (data.reply === "list_banned_ips") { - var XHTML = ""; + var XHTML = ""; data.list.each(function(ip) { XHTML += '
' + ip.ip + '|' + '' + ip.remaining_time + - '|'; + '|'; ip.users.each(function(user) { XHTML += (j > 0 ? ", " : "") + '' + thisPageAdmin.formateur.traitementComplet(user.nick) + '' + @@ -162,7 +162,7 @@ euphorik.PageAdmin.prototype.majIPs = function() { }); if (data.list.length === 0) { - XHTML += '

Aucune IP bannie

'; + XHTML += '

Aucune IP bannie

'; } $("#ips").html(XHTML); @@ -212,7 +212,7 @@ euphorik.PageAdmin.prototype.deban = function(ip) { success: function(data){ if(data.reply === "error") { - thisPageAdmin.util.messageDialogue(data.error_message); + thisPageAdmin.util.messageDialogue(data.error_message); } } }); @@ -263,7 +263,7 @@ euphorik.Trolls = function(client, util, formateur) { euphorik.Trolls.prototype.ajouterTrollEvent = function(data) { var thisTrolls = this; - var XHTML = ""; + var XHTML = ""; data.trolls.each(function(trollData) { var troll = new euphorik.Troll(trollData.content, trollData.author); var trollId = trollData.troll_id; @@ -287,10 +287,10 @@ euphorik.Trolls.prototype.ajouterTrollEvent = function(data) { $(this).keypress( function(e) { if (e.which === 13) { // return - $(".modifier", this).click(); + $(".modifier", this).click(); } } - ); + ); $(".delTroll", this).click( function() { @@ -305,12 +305,12 @@ euphorik.Trolls.prototype.ajouterTrollEvent = function(data) { } ); } - ); + ); $(".editTroll", this).click( function() { $("span", troll).css("display", "none"); - $(troll).append( + $(troll).append( '

modifierannuler

' @@ -336,7 +336,7 @@ euphorik.Trolls.prototype.ajouterTrollEvent = function(data) { ); if (data.trolls.length > 0) { - thisTrolls.dernierTroll = data.trolls[data.trolls.length - 1].troll_id; + thisTrolls.dernierTroll = data.trolls[data.trolls.length - 1].troll_id; } }; @@ -347,11 +347,11 @@ euphorik.Trolls.prototype.modifierTrollEvent = function(data) { thisTrolls.trolls[data.troll_id].content = data.content; }; -Trolls.prototype.supprimerTrollEvent = function(data) { +euphorik.Trolls.prototype.supprimerTrollEvent = function(data) { $("#trolls #troll" + data.troll_id).remove(); }; -Trolls.prototype.modifier = function(id, content) { +euphorik.Trolls.prototype.modifier = function(id, content) { var thisTrolls = this; var dataToSend = {