[Groonga-commit] groonga/groonga [master] admin: fix 'this' in periodical status update

Back to archive index

null+****@clear***** null+****@clear*****
2012年 4月 5日 (木) 16:14:08 JST


Kouhei Sutou	2012-04-05 16:14:08 +0900 (Thu, 05 Apr 2012)

  New Revision: 89ff4600d08c164e434386fbc63eb67550e58565

  Log:
    admin: fix 'this' in periodical status update

  Modified files:
    data/html/admin/js/groonga-admin.js

  Modified: data/html/admin/js/groonga-admin.js (+4 -2)
===================================================================
--- data/html/admin/js/groonga-admin.js    2012-04-05 13:56:43 +0900 (1e1b176)
+++ data/html/admin/js/groonga-admin.js    2012-04-05 16:14:08 +0900 (d9910b4)
@@ -247,13 +247,15 @@ function GroongaAdmin() {
 jQuery.extend(GroongaAdmin.prototype, {
   SELECT_PARAMS_LIST: ['match_columns', 'query', 'filter', 'scorer', 'sortby', 'output_columns', 'offset', 'limit', 'drilldown', 'drilldown_sortby', 'drilldown_output_columns', 'drilldown_offset', 'drilldown_limit'],
   start_status_timer: function() {
+    var that = this;
     this.stop_status_timer();
     this.status();
-    this.statusTimer = setInterval(this.status, 1000);
+    this.statusTimer = setInterval(function() {that.status()}, 1000);
   },
   change_status_timer: function(time) {
+    var that = this;
     this.stop_status_timer();
-    this.statusTimer = setInterval(this.status, time);
+    this.statusTimer = setInterval(function() {that.status()}, time);
   },
   stop_status_timer: function() {
     if (this.statusTimer) {




Groonga-commit メーリングリストの案内
Back to archive index