Thread Updater Increment issue.

This commit is contained in:
Zixaphir 2014-03-23 14:28:42 -07:00
parent 55e43147ed
commit 2da04a635b
3 changed files with 17 additions and 9 deletions

View File

@ -9597,7 +9597,8 @@
ThreadUpdater.root = this.OP.nodes.root.parentNode; ThreadUpdater.root = this.OP.nodes.root.parentNode;
ThreadUpdater.lastPost = +this.posts.keys[this.posts.keys.length - 1]; ThreadUpdater.lastPost = +this.posts.keys[this.posts.keys.length - 1];
ThreadUpdater.cb.interval.call($.el('input', { ThreadUpdater.cb.interval.call($.el('input', {
value: Conf['Interval'] value: Conf['Interval'],
name: 'Interval'
})); }));
$.on(window, 'online offline', ThreadUpdater.cb.online); $.on(window, 'online offline', ThreadUpdater.cb.online);
$.on(d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost); $.on(d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost);
@ -9663,14 +9664,16 @@
return !d.hidden; return !d.hidden;
}; };
}, },
interval: function() { interval: function(e) {
var val; var val;
val = parseInt(this.value, 10); val = parseInt(this.value, 10);
if (val < 1) { if (val < 1) {
val = 1; val = 1;
} }
ThreadUpdater.interval = this.value = val; ThreadUpdater.interval = this.value = val;
return $.cb.value.call(this); if (e) {
return $.cb.value.call(this);
}
}, },
load: function(e) { load: function(e) {
var klass, req, text, _ref; var klass, req, text, _ref;

View File

@ -9612,7 +9612,8 @@
ThreadUpdater.root = this.OP.nodes.root.parentNode; ThreadUpdater.root = this.OP.nodes.root.parentNode;
ThreadUpdater.lastPost = +this.posts.keys[this.posts.keys.length - 1]; ThreadUpdater.lastPost = +this.posts.keys[this.posts.keys.length - 1];
ThreadUpdater.cb.interval.call($.el('input', { ThreadUpdater.cb.interval.call($.el('input', {
value: Conf['Interval'] value: Conf['Interval'],
name: 'Interval'
})); }));
$.on(window, 'online offline', ThreadUpdater.cb.online); $.on(window, 'online offline', ThreadUpdater.cb.online);
$.on(d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost); $.on(d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost);
@ -9678,14 +9679,16 @@
return !d.hidden; return !d.hidden;
}; };
}, },
interval: function() { interval: function(e) {
var val; var val;
val = parseInt(this.value, 10); val = parseInt(this.value, 10);
if (val < 1) { if (val < 1) {
val = 1; val = 1;
} }
ThreadUpdater.interval = this.value = val; ThreadUpdater.interval = this.value = val;
return $.cb.value.call(this); if (e) {
return $.cb.value.call(this);
}
}, },
load: function(e) { load: function(e) {
var klass, req, text, _ref; var klass, req, text, _ref;

View File

@ -97,7 +97,9 @@ ThreadUpdater =
ThreadUpdater.root = @OP.nodes.root.parentNode ThreadUpdater.root = @OP.nodes.root.parentNode
ThreadUpdater.lastPost = +@posts.keys[@posts.keys.length - 1] ThreadUpdater.lastPost = +@posts.keys[@posts.keys.length - 1]
ThreadUpdater.cb.interval.call $.el 'input', value: Conf['Interval'] ThreadUpdater.cb.interval.call $.el 'input',
value: Conf['Interval']
name: 'Interval'
$.on window, 'online offline', ThreadUpdater.cb.online $.on window, 'online offline', ThreadUpdater.cb.online
$.on d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost $.on d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost
@ -147,11 +149,11 @@ ThreadUpdater =
-> true -> true
else else
-> not d.hidden -> not d.hidden
interval: -> interval: (e) ->
val = parseInt @value, 10 val = parseInt @value, 10
if val < 1 then val = 1 if val < 1 then val = 1
ThreadUpdater.interval = @value = val ThreadUpdater.interval = @value = val
$.cb.value.call @ $.cb.value.call @ if e
load: (e) -> load: (e) ->
{req} = ThreadUpdater {req} = ThreadUpdater
switch req.status switch req.status