[Groonga-commit] groonga/groonga [master] admin suggest: show all dataset on focus in

Back to archive index

null+****@clear***** null+****@clear*****
2012年 4月 6日 (金) 15:58:32 JST


Kouhei Sutou	2012-04-06 15:58:32 +0900 (Fri, 06 Apr 2012)

  New Revision: 929fe075937cd7b6f3f958207969df2839cb6721

  Log:
    admin suggest: show all dataset on focus in

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

  Modified: data/html/admin/js/groonga-admin.js (+7 -3)
===================================================================
--- data/html/admin/js/groonga-admin.js    2012-04-06 15:51:45 +0900 (88617b6)
+++ data/html/admin/js/groonga-admin.js    2012-04-06 15:58:32 +0900 (ef4cbbb)
@@ -273,8 +273,9 @@ jQuery.extend(GroongaAdmin.prototype, {
       }
     });
 
-    this._$suggestDataset = $("#suggest-dataset");
-    this._$suggestDataset.autocomplete({
+    var $dataset = $("#suggest-dataset");
+    this._$suggestDataset = $dataset;
+    $dataset.autocomplete({
       minLength: 0,
       source: function (request, response) {
 	var datasets = [];
@@ -290,9 +291,12 @@ jQuery.extend(GroongaAdmin.prototype, {
         response(datasets);
       }
     });
+    $dataset.focus(function (event) {
+      $dataset.autocomplete("search", $dataset.val());
+    });
     this._$suggestQuery = $("#suggest-query").autocomplete({
       source: function (request, response) {
-        var dataset = that._$suggestDataset.val();
+        var dataset = $dataset.val();
         $.ajax({
           url: "/d/suggest",
           data: {




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