fix shell incompatibility with datatables; add dotted border around input box
diff --git a/planetstack/core/static/shell/opencloud_shell.css b/planetstack/core/static/shell/opencloud_shell.css
index 108004b..f535cd0 100644
--- a/planetstack/core/static/shell/opencloud_shell.css
+++ b/planetstack/core/static/shell/opencloud_shell.css
@@ -15,7 +15,8 @@
#terminal input {
width: 875px;
margin: 1px 0 1px 10px;
- border: none;
+ border: 1px dotted;
+ border-color:#808080;
display: inline;
padding: 2px;
background: black;
diff --git a/planetstack/core/static/shell/opencloud_shell.js b/planetstack/core/static/shell/opencloud_shell.js
index 8d850be..1715fdd 100644
--- a/planetstack/core/static/shell/opencloud_shell.js
+++ b/planetstack/core/static/shell/opencloud_shell.js
@@ -303,7 +303,7 @@
},
_getCommand: function(tokens) {
- if(tokens[0] && MongoKeywords.include((tokens[0].value + '').toLowerCase())) {
+ if(tokens[0] && ArrayInclude(MongoKeywords,(tokens[0].value + '').toLowerCase())) {
switch(tokens[0].value.toLowerCase()) {
case 'help':
return this._help;
diff --git a/planetstack/core/static/shell/utils.js b/planetstack/core/static/shell/utils.js
index 93aff08..1ded27e 100644
--- a/planetstack/core/static/shell/utils.js
+++ b/planetstack/core/static/shell/utils.js
@@ -4,7 +4,9 @@
// Licensed under the MIT licence.
// http://www.opensource.org/licenses/mit-license.php
-Array.prototype.include = function(value) {
+// extending array like this is breaking datatables
+
+/*Array.prototype.include = function(value) {
for(var i=0; i < this.length; i++) {
if(this[i] == value) {
return this[i];
@@ -15,6 +17,15 @@
Array.prototype.empty = function() {
return (this.length == 0);
+};*/
+
+function ArrayInclude(arr,value) {
+ for(var i=0; i < arr.length; i++) {
+ if(arr[i] == value) {
+ return arr[i];
+ }
+ }
+ return false;
};
Function.prototype.bind = function() {