remove ^M
authorScott Baker <smbaker@gmail.com>
Thu, 19 Jun 2014 17:54:33 +0000 (10:54 -0700)
committerScott Baker <smbaker@gmail.com>
Thu, 19 Jun 2014 17:54:33 +0000 (10:54 -0700)
planetstack/core/static/shell/opencloud_shell.js

index 1715fdd..d57d475 100644 (file)
@@ -254,52 +254,52 @@ MongoHandler.prototype = {
   },
 
   _tutorial: function() {
-    this._tutorialPtr = 0;\r
-    return PTAG("This is a self-guided tutorial on the OpenCloud shell.") +\r
-           PTAG("The tutorial is simple, more or less a few basic commands to try.") +\r
-           PTAG("To go directly to any part tutorial, enter one of the commands t0, t1, t2...t10") +\r
-           PTAG("Otherwise, use 'next' and 'back'. Start by typing 'next' and pressing enter.");\r
+    this._tutorialPtr = 0;
+    return PTAG("This is a self-guided tutorial on the OpenCloud shell.") +
+           PTAG("The tutorial is simple, more or less a few basic commands to try.") +
+           PTAG("To go directly to any part tutorial, enter one of the commands t0, t1, t2...t10") +
+           PTAG("Otherwise, use 'next' and 'back'. Start by typing 'next' and pressing enter.");
   },
 
   // go to the next step in the tutorial.
-  _next: function() {\r
-    if(this._tutorialPtr < this._tutorialMax) {\r
-      return this['_t' + (this._tutorialPtr + 1)]();\r
-    }\r
-    else {\r
-      return "You've reached the end of the tutorial. To go to the beginning, type 'tutorial'";\r
-    }\r
-  },\r
-\r
-  // go to the previous step in the tutorial.\r
-  _back: function() {\r
-    if(this._tutorialPtr > 1) {\r
-      return this['_t' + (this._tutorialPtr - 1)]();\r
-    }\r
-    else {\r
-      return this._tutorial();\r
-    }\r
+  _next: function() {
+    if(this._tutorialPtr < this._tutorialMax) {
+      return this['_t' + (this._tutorialPtr + 1)]();
+    }
+    else {
+      return "You've reached the end of the tutorial. To go to the beginning, type 'tutorial'";
+    }
+  },
+
+  // go to the previous step in the tutorial.
+  _back: function() {
+    if(this._tutorialPtr > 1) {
+      return this['_t' + (this._tutorialPtr - 1)]();
+    }
+    else {
+      return this._tutorial();
+    }
   },
 
   _t1: function() {
-    this._tutorialPtr = 1;\r
-    return PTAG('1. JavaScript Shell') +\r
-           PTAG('The first thing to notice is that the MongoDB shell is JavaScript-based.') +\r
-           PTAG('So you can do things like:') +\r
-           PTAG('  a = 5; ') +\r
-           PTAG('  a * 10; ') +\r
-           PTAG('  print(a); ') +\r
-           PTAG("  for(i=0; i<10; i++) { print('hello'); }; ") +\r
-           PTAG("Try a few JS commands; when you're ready to move on, enter 'next'");\r
-\r
+    this._tutorialPtr = 1;
+    return PTAG('1. JavaScript Shell') +
+           PTAG('The first thing to notice is that the MongoDB shell is JavaScript-based.') +
+           PTAG('So you can do things like:') +
+           PTAG('  a = 5; ') +
+           PTAG('  a * 10; ') +
+           PTAG('  print(a); ') +
+           PTAG("  for(i=0; i<10; i++) { print('hello'); }; ") +
+           PTAG("Try a few JS commands; when you're ready to move on, enter 'next'");
+
   },
 
   _t2: function() {
-    this._tutorialPtr = 2;\r
-    return PTAG('2. List some slices') +\r
-           PTAG('Type this:') +\r
-           PTAG('    opencloud.slices.listAll();');\r
-\r
+    this._tutorialPtr = 2;
+    return PTAG('2. List some slices') +
+           PTAG('Type this:') +
+           PTAG('    opencloud.slices.listAll();');
+
   },
 
   _getCommand: function(tokens) {
@@ -309,14 +309,14 @@ MongoHandler.prototype = {
           return this._help;
 
         case 'tutorial':
-          return this._tutorial;\r
-        case 'next':\r
-          return this._next;\r
-        case 'back':\r
-          return this._back;\r
-        case 't0':\r
-          return this._tutorial;\r
-        case 't1':\r
+          return this._tutorial;
+        case 'next':
+          return this._next;
+        case 'back':
+          return this._back;
+        case 't0':
+          return this._tutorial;
+        case 't1':
           return this._t1;
         case 't2':
           return this._t2;