diff --git a/_locales/en/messages.json b/_locales/en/messages.json index cdec73e51d..b8a3ca5041 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -3,7 +3,7 @@ "message": "Receive desktop notification when application updates" }, "options_improve_configurator": { - "message": "Improve Baseflight - Configurator by sending anonymous usage data to the developer team" + "message": "Send anonymous usage data to the developer team" }, "options_back": { "message": "Leave Options" diff --git a/changelog.html b/changelog.html index 23c4ba07fb..badc45af29 100644 --- a/changelog.html +++ b/changelog.html @@ -1,6 +1,9 @@ xx.xx.2014 - 0.32

- -
+ - Native application frame on Chrome 35+
+ - Reworked Sensors tab (optimized graphs, new ui)
+ - Small ui changes
+ - Performance improvements

04.11.2014 - 0.31

diff --git a/images/controls/close.png b/images/controls/close.png deleted file mode 100644 index fa84cef7b2..0000000000 Binary files a/images/controls/close.png and /dev/null differ diff --git a/images/controls/maximize.png b/images/controls/maximize.png deleted file mode 100644 index 44df1880c3..0000000000 Binary files a/images/controls/maximize.png and /dev/null differ diff --git a/images/controls/minimize.png b/images/controls/minimize.png deleted file mode 100644 index e0cd947598..0000000000 Binary files a/images/controls/minimize.png and /dev/null differ diff --git a/images/options.png b/images/options.png new file mode 100644 index 0000000000..0faa68699e Binary files /dev/null and b/images/options.png differ diff --git a/main.css b/main.css index 829e292120..b798f19891 100644 --- a/main.css +++ b/main.css @@ -114,6 +114,8 @@ input[type="number"]::-webkit-inner-spin-button { #sensor-status { float: right; + margin-right: 10px; + height: 22px; line-height: 22px; } @@ -136,6 +138,48 @@ input[type="number"]::-webkit-inner-spin-button { #sensor-status .on { background-color: #0d8b13; } +#options { + float: right; + + margin-top: -1px; + + width: 21px; + height: 21px; + + opacity: 0.6; + + background-image: url('../images/options.png'); + background-repeat: no-repeat; +} + #options:hover { + opacity: 0.70; + } + #options.active { + opacity: 0.70; + } + #options.active:hover { + opacity: 0.85; + } +#options-window { + display: none; + position: fixed; + + right: 10px; + top: 32px; + + padding: 5px; + + line-height: 20px; + + border: 1px solid silver; + background-color: white; +} + #options-window input { + float: left; + + margin-top: 3px; + margin-right: 5px; + } #log { margin-bottom: 10px; diff --git a/main.html b/main.html index 319b452ccf..7ffd5da5db 100644 --- a/main.html +++ b/main.html @@ -16,7 +16,6 @@ - @@ -45,7 +44,6 @@ - @@ -80,6 +78,7 @@ +

diff --git a/main.js b/main.js index 8e2a087de4..7e6948849e 100644 --- a/main.js +++ b/main.js @@ -111,6 +111,76 @@ $(document).ready(function() { tab_initialize_default(); + // options + $('a#options').click(function() { + var el = $(this); + + if (!el.hasClass('active')) { + el.addClass('active'); + el.after('
'); + $('div#options-window').load('./tabs/options.html', function() { + ga_tracker.sendAppView('Options'); + + // translate to user-selected language + localize(); + + if (configuration_received) { + $('a.back').hide(); + } else { + $('a.back').click(function() { + $('#tabs > ul li').removeClass('active'); // de-select any selected tabs + tab_initialize_default(); + }); + } + + // if notifications are enabled, or wasn't set, check the notifications checkbox + chrome.storage.local.get('update_notify', function(result) { + if (typeof result.update_notify === 'undefined' || result.update_notify) { + $('div.notifications input').prop('checked', true); + } + }); + + $('div.notifications input').change(function() { + var check = $(this).is(':checked'); + + chrome.storage.local.set({'update_notify': check}); + }); + + // if tracking is enabled, check the statistics checkbox + if (ga_tracking == true) { + $('div.statistics input').prop('checked', true); + } + + $('div.statistics input').change(function() { + var check = $(this).is(':checked'); + + ga_tracking = check; + + ga_config.setTrackingPermitted(check); + }); + + $(this).slideDown(); + }); + } else { + $('div#options-window').slideUp(function() { + el.removeClass('active'); + $(this).empty().remove(); + }); + } + + + /* + chrome.app.window.create('./tabs/options.html', { + id: 'option-window', + frame: 'none', + resizable: false + }, function(createdWindow) { + // translate to user-selected language + localize(); + }); + */ + }); + // listen to all input change events and adjust the value within limits if necessary $("#content").on('focus', 'input[type="number"]', function() { var element = $(this); diff --git a/tabs/options.css b/tabs/options.css deleted file mode 100644 index f28727529d..0000000000 --- a/tabs/options.css +++ /dev/null @@ -1,9 +0,0 @@ -.tab-options { - line-height: 20px; -} - .tab-options input { - float: left; - - margin-top: 3px; - margin-right: 5px; - } \ No newline at end of file diff --git a/tabs/options.html b/tabs/options.html index 2a2bfd91e5..4e6cd9e940 100644 --- a/tabs/options.html +++ b/tabs/options.html @@ -1,9 +1,6 @@ -
-
- -
-
- -
- +
+ +
+
+
\ No newline at end of file diff --git a/tabs/options.js b/tabs/options.js deleted file mode 100644 index 7a62e52207..0000000000 --- a/tabs/options.js +++ /dev/null @@ -1,45 +0,0 @@ -function tab_initialize_options() { - ga_tracker.sendAppView('Options'); - - $('#content').load("./tabs/options.html", function() { - GUI.active_tab = 'options'; - - // translate to user-selected language - localize(); - - if (configuration_received) { - $('a.back').hide(); - } else { - $('a.back').click(function() { - $('#tabs > ul li').removeClass('active'); // de-select any selected tabs - tab_initialize_default(); - }); - } - - // if notifications are enabled, or wasn't set, check the notifications checkbox - chrome.storage.local.get('update_notify', function(result) { - if (typeof result.update_notify === 'undefined' || result.update_notify) { - $('div.notifications input').prop('checked', true); - } - }); - - $('div.notifications input').change(function() { - var check = $(this).is(':checked'); - - chrome.storage.local.set({'update_notify': check}); - }); - - // if tracking is enabled, check the statistics checkbox - if (ga_tracking == true) { - $('div.statistics input').prop('checked', true); - } - - $('div.statistics input').change(function() { - var check = $(this).is(':checked'); - - ga_tracking = check; - - ga_config.setTrackingPermitted(check); - }); - }); -} \ No newline at end of file