projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
managed close moderate window event and the moderate message argument
[brisk.git]
/
web
/
commons.js
diff --git
a/web/commons.js
b/web/commons.js
index
f1bab59
..
1dcb266
100644
(file)
--- a/
web/commons.js
+++ b/
web/commons.js
@@
-491,6
+491,7
@@
Moderate.prototype = {
this.tout = 0;
}
if (this.win) {
this.tout = 0;
}
if (this.win) {
+ this.win.onbeforeunload = null;
this.win.close();
this.win = null;
}
this.win.close();
this.win = null;
}
@@
-531,9
+532,14
@@
Moderate.prototype = {
post_onload: function() {
$(this.win, 'mainbody').innerHTML = "GHE SEMU";
post_onload: function() {
$(this.win, 'mainbody').innerHTML = "GHE SEMU";
+ this.win.anc = this;
this.enabled = true;
},
this.enabled = true;
},
+ onunload: function() {
+ act_moderate();
+ },
+
is_enabled: function() {
return (this.enabled);
}// ,
is_enabled: function() {
return (this.enabled);
}// ,
@@
-541,7
+547,7
@@
Moderate.prototype = {
//add: function(item) {
// this.item.append(new ModerateItem(item));
//}
//add: function(item) {
// this.item.append(new ModerateItem(item));
//}
- // send_mesg("moderate|"+(enable ? "
true" | "fals
e"));
+ // send_mesg("moderate|"+(enable ? "
false" | "tru
e"));
}
}
@@
-554,15
+560,11
@@
var g_moder = new Moderate();
function act_moderate()
{
function act_moderate()
{
- send_mesg("moderate|"+(g_moder.is_enabled() ? "
true" : "fals
e"));
+ send_mesg("moderate|"+(g_moder.is_enabled() ? "
false" : "tru
e"));
}
}
-// send_mesg("moderate|false");
-// return false;
-// }
-
// // build table with js
// g_moder.item = new Array;
// // build table with js
// g_moder.item = new Array;