summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-18 14:42:20 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-18 14:42:20 +0100
commitf3dfd62eb28d419f2036340de02fc787b0ea044b (patch)
treef5941b4d36c0afb8d4680a9a221b085e0e32a3ef
parent33da54afb2f8d5d0d42f188d6d0bb03e6eac3423 (diff)
Fix handling of settings navigation icon
-rw-r--r--index.html5
-rw-r--r--js/codeq/navigation.js2
-rw-r--r--js/codeq/settings.js6
3 files changed, 8 insertions, 5 deletions
diff --git a/index.html b/index.html
index 9b37a2f..361545c 100644
--- a/index.html
+++ b/index.html
@@ -89,8 +89,8 @@
<li id="navigation-about"><a href="#" tabindex="44" data-tkey="about">About</a></li>
</ul>
</li>
- <li id="settings_dropdown_menu"> <!-- class="dropdown"-->
- <a href="" class="dropdown-toggle" tabindex="50" accesskey="0" data-toggle="dropdown" id="settingsTrigger" title="Settings, options..." aria-expanded="true"><span class="glyphicon glyphicon glyphicon-wrench" aria-hidden="true"></span></a>
+ <li id="navigation-settings">
+ <a href="" tabindex="50" accesskey="0" title="Settings"><span class="glyphicon glyphicon-wrench"></span></a>
</li>
</ul>
</div><!--/.nav-collapse -->
@@ -275,7 +275,6 @@
</div>
</div>
-
<!-- about screen -->
<div class="container" id="screen_about" style="display: none;">
<div class="row">
diff --git a/js/codeq/navigation.js b/js/codeq/navigation.js
index f6f032f..70b7fc5 100644
--- a/js/codeq/navigation.js
+++ b/js/codeq/navigation.js
@@ -206,7 +206,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
codeq.globalStateMachine.transition('changePassword');
e.preventDefault();//prevent this since we'll trigger a page reload otherwise
});
- $('#settingsTrigger').on('click',function(e){
+ $('#navigation-settings').on('click',function(e){
codeq.globalStateMachine.transition('settings');
e.preventDefault();
});
diff --git a/js/codeq/settings.js b/js/codeq/settings.js
index 980aba3..1f35abf 100644
--- a/js/codeq/settings.js
+++ b/js/codeq/settings.js
@@ -21,7 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
(function(){
"use strict";
- var guiLangSelect = $('#gui_lang_select'),
+ var navigationSettings = $('#navigation-settings'),
+ guiLangSelect = $('#gui_lang_select'),
robotAddressInput = $('#robot_address_input'),
jqDisabledOverlay = $('#disabled'),
jqSettForm = $("#settingsForm"),
@@ -41,6 +42,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
'enter':function(){
jqDisabledOverlay.css('display', '');
+ navigationSettings.addClass('active');
+
robotAddressInput.val(codeq.settings['robot_address']);//set the robot address once we enter the state
var previousGuiLang = codeq.settings['gui_lang'];
var previousLayout = codeq.settings['gui_layout'];
@@ -91,6 +94,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
guiLangSelect.off('select');
robotAddressInput.val('');
jqScreenSettings.css('display', 'none');
+ navigationSettings.removeClass('active');
}
});
})();