Commit e23d851f authored by ctrenkov's avatar ctrenkov
Browse files

added a tab and learned how to log.

parent 561b2889
File added
File added
......@@ -61,6 +61,9 @@
"documentation": {
"message": "Documentation"
},
"tabDroneCanvas": {
"message": "Drone Canvas"
},
"tabFirmwareFlasher": {
"message": "Firmware Flasher"
},
......
File added
......@@ -11,12 +11,14 @@ var GUI_control = function () {
this.tab_switch_in_progress = false;
this.operating_system;
this.defaultAllowedTabsWhenDisconnected = [
'drone_canvas',
'landing',
'firmware_flasher',
'mission_control',
'help'
];
this.defaultAllowedTabsWhenConnected = [
'drone_canvas',
'failsafe',
'transponder',
'adjustments',
......
......@@ -178,6 +178,9 @@
<li class="tab_firmware_flasher">
<a href="#" data-i18n="tabFirmwareFlasher" class="tabicon ic_flasher" title="Firmware Flasher"></a>
</li>
<li class="tab_drone_canvas">
<a href="#" data-i18n="tabDroneCanvas" class="tabicon ic_flasher" title="Drone Canvas"></a>
</li>
</ul>
<ul class="mode-connected">
<li class="tab_setup">
......
......@@ -122,7 +122,6 @@ $(document).ready(function () {
// Tabs
var ui_tabs = $('#tabs > ul');
$('a', ui_tabs).click(function () {
if ($(this).parent().hasClass("tab_help")) {
return;
}
......@@ -135,7 +134,6 @@ $(document).ready(function () {
var tab = tabClass.substring(4);
var tabName = $(self).text();
if (tabRequiresConnection && !CONFIGURATOR.connectionValid) {
GUI.log(chrome.i18n.getMessage('tabSwitchConnectionRequired'));
return;
......@@ -145,7 +143,7 @@ $(document).ready(function () {
GUI.log(chrome.i18n.getMessage('tabSwitchWaitForOperation'));
return;
}
if (GUI.allowedTabs.indexOf(tab) < 0) {
GUI.log(chrome.i18n.getMessage('tabSwitchUpgradeRequired', [tabName]));
return;
......@@ -171,8 +169,10 @@ $(document).ready(function () {
function content_ready() {
GUI.tab_switch_in_progress = false;
}
switch (tab) {
case 'drone_canvas':
GUI.log("Drone Canvas Clicked");
break;
case 'landing':
TABS.landing.initialize(content_ready);
break;
......
......@@ -44,6 +44,7 @@
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
"optional": true,
"requires": {
"kind-of": "^3.0.2",
"longest": "^1.0.1",
......@@ -54,6 +55,7 @@
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"optional": true,
"requires": {
"is-buffer": "^1.1.5"
}
......@@ -1059,12 +1061,9 @@
}
},
"commander": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz",
"integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=",
"requires": {
"graceful-readlink": ">= 1.0.0"
}
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"component-bind": {
"version": "1.0.0",
......@@ -1269,9 +1268,9 @@
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
},
"decompress": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.0.tgz",
"integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=",
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz",
"integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==",
"requires": {
"decompress-tar": "^4.0.0",
"decompress-tarbz2": "^4.0.0",
......@@ -2197,7 +2196,8 @@
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true
"bundled": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -2215,11 +2215,13 @@
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
"bundled": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -2232,15 +2234,18 @@
},
"code-point-at": {
"version": "1.1.0",
"bundled": true
"bundled": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true
"bundled": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true
"bundled": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -2343,7 +2348,8 @@
},
"inherits": {
"version": "2.0.3",
"bundled": true
"bundled": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -2353,6 +2359,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -2365,17 +2372,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true
"bundled": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -2392,6 +2402,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -2464,7 +2475,8 @@
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true
"bundled": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -2474,6 +2486,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -2549,7 +2562,8 @@
},
"safe-buffer": {
"version": "5.1.2",
"bundled": true
"bundled": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -2579,6 +2593,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -2596,6 +2611,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -2634,11 +2650,13 @@
},
"wrappy": {
"version": "1.0.2",
"bundled": true
"bundled": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true
"bundled": true,
"optional": true
}
}
},
......@@ -3047,11 +3065,6 @@
"proxyquire": "^1.4.0"
}
},
"graceful-readlink": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
},
"gulp": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz",
......@@ -3916,7 +3929,8 @@
"longest": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc="
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
"optional": true
},
"lowercase-keys": {
"version": "1.0.1",
......@@ -4314,9 +4328,9 @@
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"nw": {
"version": "0.42.2-sdk",
"resolved": "https://registry.npmjs.org/nw/-/nw-0.42.2-sdk.tgz",
"integrity": "sha512-9xVCsQgKM6ycZ+3gtLzloasSaASHL2BPXupqdPEiWKttewomvEalcNJXuJUhQDKrWEBm1FRLFmijlKt/2yUXXw==",
"version": "0.42.6",
"resolved": "https://registry.npmjs.org/nw/-/nw-0.42.6.tgz",
"integrity": "sha512-CmIHp4O3Zvz+/g8XJCK3iwv4P748AG2QGdTYfT3MYagvp4+U47kDB8wFfdngROc/MMzp2DZd0onh28vXafTmlw==",
"requires": {
"chalk": "~1.1.3",
"decompress": "^4.2.0",
......@@ -4381,7 +4395,7 @@
"semver": "^5.5.0",
"simple-glob": "~0.2.0",
"tar-fs": "^1.13.0",
"temp": "github:adam-lynch/node-temp#279c1350cb7e4f02515d91da9e35d39a40774016",
"temp": "github:adam-lynch/node-temp#remove_tmpdir_dep",
"thenify": "^3.3.0",
"update-notifier": "^2.4.0",
"winresourcer": "^0.9.0"
......@@ -5476,11 +5490,11 @@
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"seek-bzip": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz",
"integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=",
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz",
"integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==",
"requires": {
"commander": "~2.8.1"
"commander": "^2.8.1"
}
},
"semver": {
......@@ -6312,9 +6326,9 @@
"integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og=="
},
"unbzip2-stream": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz",
"integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==",
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
"integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
"requires": {
"buffer": "^5.2.1",
"through": "^2.3.8"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment