null+****@clear*****
null+****@clear*****
2012年 4月 5日 (木) 17:21:15 JST
Kouhei Sutou 2012-04-05 17:21:15 +0900 (Thu, 05 Apr 2012)
New Revision: 26a8d4912eafc231264aed1e13244ad5fd912be9
Log:
admin: extract side menu initialization code
Modified files:
data/html/admin/js/groonga-admin.js
Modified: data/html/admin/js/groonga-admin.js (+13 -9)
===================================================================
--- data/html/admin/js/groonga-admin.js 2012-04-05 17:20:07 +0900 (692e007)
+++ data/html/admin/js/groonga-admin.js 2012-04-05 17:21:15 +0900 (c834488)
@@ -132,15 +132,7 @@ function GroongaAdmin() {
1);
}
});
- $('#side-menu-summary').click(function() {
- that.current_table = null;
- that._selectTab("database");
- that.$database_tabs.tabs("select", "#database-tab-summary");
- });
- $('#side-menu-suggest').click(function() {
- that.current_table = null;
- that._selectTab("suggest");
- });
+ this._initializeSideMenu();
this.update_tablelist();
var e1 = $('#createtable-key-type-builtin');
@@ -282,6 +274,18 @@ jQuery.extend(GroongaAdmin.prototype, {
break;
}
},
+ _initializeSideMenu: function () {
+ var that = this;
+ $('#side-menu-summary').click(function() {
+ that.current_table = null;
+ that._selectTab("database");
+ that.$database_tabs.tabs("select", "#database-tab-summary");
+ });
+ $('#side-menu-suggest').click(function() {
+ that.current_table = null;
+ that._selectTab("suggest");
+ });
+ },
start_status_timer: function() {
var that = this;
this.stop_status_timer();