[Groonga-commit] groonga/heroku-try-groonga at 2865a2b [master] Untabify

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jul 20 11:10:17 JST 2014


Kouhei Sutou	2014-07-20 11:10:17 +0900 (Sun, 20 Jul 2014)

  New Revision: 2865a2b44aba30bc455efea0a35cb2850c3343a3
  https://github.com/groonga/heroku-try-groonga/commit/2865a2b44aba30bc455efea0a35cb2850c3343a3

  Message:
    Untabify

  Modified files:
    public/js/try-groonga.js

  Modified: public/js/try-groonga.js (+32 -32)
===================================================================
--- public/js/try-groonga.js    2014-07-20 11:10:00 +0900 (0691d6c)
+++ public/js/try-groonga.js    2014-07-20 11:10:17 +0900 (e454ff3)
@@ -3,45 +3,45 @@ jQuery(function($, undefined) {
     var sendCommandQueue = [];
 
     function enqueueCommand(command, onResponse) {
-	var sendCommand = function() {
-	    var success = function(data, textStatus, jqXHR) {
-		var response;
-		if (typeof data == "string") {
-		    response = data;
-		} else {
-		    response = JSON.stringify(data, undefined, 2);
-		}
-		onResponse(response);
+        var sendCommand = function() {
+            var success = function(data, textStatus, jqXHR) {
+                var response;
+                if (typeof data == "string") {
+                    response = data;
+                } else {
+                    response = JSON.stringify(data, undefined, 2);
+                }
+                onResponse(response);
 
-		sendCommandQueue.shift();
-		if (sendCommandQueue.length > 0) {
-		    sendCommandQueue[0]();
-		}
-	    };
-	    $.post("sessions/" + id, command, success);
-	};
+                sendCommandQueue.shift();
+                if (sendCommandQueue.length > 0) {
+                    sendCommandQueue[0]();
+                }
+            };
+            $.post("sessions/" + id, command, success);
+        };
 
-	sendCommandQueue.push(sendCommand);
-	if (sendCommandQueue.length == 1) {
-	    sendCommand();
-	}
+        sendCommandQueue.push(sendCommand);
+        if (sendCommandQueue.length == 1) {
+            sendCommand();
+        }
     }
 
     $("#terminal").terminal(function(command, term) {
-	if (command === "") {
-	    return;
-	}
+        if (command === "") {
+            return;
+        }
 
-	enqueueCommand(command, function(response) {
-	    if (response.length == 0) {
-		return;
-	    }
-	    term.echo(response);
-	});
+        enqueueCommand(command, function(response) {
+            if (response.length == 0) {
+                return;
+            }
+            term.echo(response);
+        });
     }, {
-	greetings: "",
-	height: 400,
-	prompt: "groonga> "
+        greetings: "",
+        height: 400,
+        prompt: "groonga> "
     });
 
     $('#terminal').mousewheel(function(event) {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index