[Groonga-commit] groonga/groonga [master] admin: use constructor

Back to archive index

null+****@clear***** null+****@clear*****
2012年 4月 4日 (水) 11:54:26 JST


Kouhei Sutou	2012-04-04 11:54:26 +0900 (Wed, 04 Apr 2012)

  New Revision: 1255548e348f92a0477c134d46003b5c512ce7a6

  Log:
    admin: use constructor

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

  Modified: data/html/admin/index.html (+1 -1)
===================================================================
--- data/html/admin/index.html    2012-04-04 11:28:22 +0900 (fa3bcae)
+++ data/html/admin/index.html    2012-04-04 11:54:26 +0900 (cfb57ae)
@@ -252,7 +252,7 @@ Powered by <a href="http://jquery.com/">jQuery</a> and <a href="http://jqueryui.
 </div>
 <script type="text/javascript">
 $(function() {
-  GroongaAdmin.initialize();
+  var admin = new GroongaAdmin();
   GroongaAdmin.tablelist();
   $.ajaxSetup({
     timeout: 10000,

  Modified: data/html/admin/js/groonga-admin.js (+6 -5)
===================================================================
--- data/html/admin/js/groonga-admin.js    2012-04-04 11:28:22 +0900 (a2ccd6a)
+++ data/html/admin/js/groonga-admin.js    2012-04-04 11:54:26 +0900 (d035c47)
@@ -67,9 +67,7 @@ Groonga = {
   GRN_OBJ_WITH_WEIGHT:            (0x01<<8),
   GRN_OBJ_WITH_POSITION:          (0x01<<9)
 };
-GroongaAdmin = {
-  SELECT_PARAMS_LIST: ['match_columns', 'query', 'filter', 'scorer', 'sortby', 'output_columns', 'offset', 'limit', 'drilldown', 'drilldown_sortby', 'drilldown_output_columns', 'drilldown_offset', 'drilldown_limit'],
-  initialize: function() {
+function GroongaAdmin() {
     GroongaAdmin.current_table = null;
     GroongaAdmin.statusTimer = null;
     GroongaAdmin.semaphore = new Array();
@@ -242,7 +240,10 @@ GroongaAdmin = {
     });
 
     GroongaAdmin.recordlist_count = 30;
-  },
+};
+
+jQuery.extend(GroongaAdmin, {
+  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() {
     GroongaAdmin.stop_status_timer();
     GroongaAdmin.status();
@@ -1129,4 +1130,4 @@ GroongaAdmin = {
     }
     return 0;
   }
-};
+});




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