X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcommons.js;h=1dcb26613c1f16c2f62fb87f8c5e38293486d126;hb=46b0825543d5a3ed5088ef7d9213f639a9dd8a63;hp=f1bab591567d55f62544a8c34e70141c618691b2;hpb=25394fc7cc011fc3deadba7484622c76790cea46;p=brisk.git diff --git a/web/commons.js b/web/commons.js index f1bab59..1dcb266 100644 --- a/web/commons.js +++ b/web/commons.js @@ -491,6 +491,7 @@ Moderate.prototype = { this.tout = 0; } if (this.win) { + this.win.onbeforeunload = null; this.win.close(); this.win = null; } @@ -531,9 +532,14 @@ Moderate.prototype = { post_onload: function() { $(this.win, 'mainbody').innerHTML = "GHE SEMU"; + this.win.anc = this; this.enabled = true; }, + onunload: function() { + act_moderate(); + }, + is_enabled: function() { return (this.enabled); }// , @@ -541,7 +547,7 @@ Moderate.prototype = { //add: function(item) { // this.item.append(new ModerateItem(item)); //} - // send_mesg("moderate|"+(enable ? "true" | "false")); + // send_mesg("moderate|"+(enable ? "false" | "true")); } @@ -554,15 +560,11 @@ var g_moder = new Moderate(); function act_moderate() { - send_mesg("moderate|"+(g_moder.is_enabled() ? "true" : "false")); + send_mesg("moderate|"+(g_moder.is_enabled() ? "false" : "true")); } -// send_mesg("moderate|false"); -// return false; -// } - // // build table with js // g_moder.item = new Array;