From 6049cf0ec43c64a42a0b8efbb79809e7fa8bfc1b Mon Sep 17 00:00:00 2001 From: cTn Date: Tue, 22 Apr 2014 16:16:22 +0200 Subject: [PATCH] dedicated options icon/button (live access) --- _locales/en/messages.json | 2 +- changelog.html | 5 ++- images/controls/close.png | Bin 1170 -> 0 bytes images/controls/maximize.png | Bin 991 -> 0 bytes images/controls/minimize.png | Bin 1025 -> 0 bytes images/options.png | Bin 0 -> 1158 bytes main.css | 44 ++++++++++++++++++++++ main.html | 4 +- main.js | 70 +++++++++++++++++++++++++++++++++++ tabs/options.css | 9 ----- tabs/options.html | 13 +++---- tabs/options.js | 45 ---------------------- 12 files changed, 125 insertions(+), 67 deletions(-) delete mode 100644 images/controls/close.png delete mode 100644 images/controls/maximize.png delete mode 100644 images/controls/minimize.png create mode 100644 images/options.png delete mode 100644 tabs/options.css delete mode 100644 tabs/options.js diff --git a/_locales/en/messages.json b/_locales/en/messages.json index cdec73e5..b8a3ca50 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 23c4ba07..badc45af 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 fa84cef7b2fedac894a4e0fef6be7679a31ca56e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1170 zcmaJ>TSyd97#_1E?LuNuM&L9W6}3AvyYA>tZszXn+EQz>F6>4Sjx$Gh(wQ^P9NS$( z2rDungC(LHJw!JMj3kgsDvOAqw?d^07CjVQh!PSKq%-DP4{gJlITya~`~UO*A9J+6 zu69Ymsse%_mISv6VLaRLTeWZ={&s!8IDw~PGkmOHj3o7RH`bb zE898^(9l^Ikvdx?w@g)UA*+%+7El2a$)wt*nS9bi&FJ!YZ5`7TIRinh9_n{eu~0qf zg9ad7cBf5ZSeE2CJ6rDJICc~1U|0vu;KAA0a^A)9jtX-2p>Q-qZsx;6U^W)sd8jx- zI#1JyM8ckM+M&@xvu?NB(r`Fz7-2J08WNK>%`D9*2*8vKMMnzMNJ~*{f*r_1;Y@#D zLDlDEHFLI1xL|Zr)M?hvSXasbL!tjeRdo(+qA>WA?>~jjNJ$vEmOt%I7HBlL!IKtma>{D;eCas{1Kaw;m-%G` zk&_n`Y9h%OpGR)wKV+6IsNX0bjqEBt_IfOLY`c6#&L7Q*YH2oI{OVTkR=ua_l)kR4 zsO#;=GyBioEj!yX9^D)}vbSW>(#q+V?ZvfIYBXHA=i!^qqVC>qaANXQHNjHeEmsHg z3WtY(tUZ3vF+7m|Ido`>y1a5|P{03ef*%job9H@c za$LQ3`bu_zxY@gZao>gMoh6@oQ}=UfH}rj~dI|5OAGE_&qi2^zP7F;A-X3}StmMGT z!Zjt&cOUF|(>RrWTywf{SFmf(gRa7co9;)RyxL&jbt0Fz*<)U6+Pr*)^_K|x>x6!9 GWA`uD=8)+C diff --git a/images/controls/maximize.png b/images/controls/maximize.png deleted file mode 100644 index 44df1880c3ff326ef4682a7f36e7d86c5f978035..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 991 zcmaJ=PiWIn91iMW4vR26YeiJw-wBoZP|(!&62k^Y{`qstIg{0 zpeL~huY&WSckkjv#M4e9;zhxOAoDQrqU_?qm#*zRSVNNchwuA-zxVrn@BZS#Tx{s{ z5W_IB!n{_b;~Dy829MDH$l0Y99Y#sMLP~g*Gz=dxSqrZqP;iVYDk8($xVeKe409CP z0?D?jTO3j6` z*<3Tz7M!^RGNDWb97GHdI_qvAhYD=#%5)xWa}cy4WKDqwNmcYkpkg0^6q}5jydVHc zVg)fJNx~#Z@Ir#)=_|zrQBFy6VhVH~NTd1Is$A4&JF)0Wfi*%rnd2Ib2HQxo*spRz zI-QO*5{WoP#Dfi&7-8HE#<~g`3QXVjh>cwkDH?kQzlw4E;Kw& zVEO1sU7)W2AL=+gbU=#eFyDU)2jvY9aYYp1x^L3Pt&T;ZJX!UTL9k!Oc)eT2#Tq6! zs9_JNB?(+ywp|N1g7G$9*X4p65W_W5K~o@AU~Suyb9_z`L@_mM(h6M=o`{Pi?*bL7kviqEyhb~nRwgrB zyA%A$ow>)G_ul3nZaqq0s}6Ig#-4^RKHqtEd+F7ef$^{V)y-07yLEm3{P3^VllMst jUVZm{R8hApzXwK`3$X|Gx4pri(UmLY7qsWO8+ZQzrfoNZ diff --git a/images/controls/minimize.png b/images/controls/minimize.png deleted file mode 100644 index e0cd947598fd88c3119bc0c777dfc15064142c4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1025 zcmaJ=%}>){9A4m{AwoEr2$3}9;0LZB`zUL(g0OC~#10%I%oB9&3oE02OZ$!$ZhA8Y zJz{nTlG|Th6rx6JFF~aXGnMiT{rqf$jkbtAwx`lLT5}u-xgGD5gIMc%;7*<2pbZTY7 z1*2WXqFIXZj#LNA^8cZR(Lg&W4UY2tr?8V*vH+b14lLR#Zrn_-7s?W1Hc$|>GZ4<# zt2ma22s(La5wUTOI6JAE8Z0^Is(4uzlBRzXhe9+H@Ne>lQ$L6(gN z`9z$FNO3+g%VQ;&M&7o)ruWN0xxCF9I!LLxZRuS|c$pZ(;X%(}r#FqG5bsVz=Aa)=wWke}k_?F)0mY+)ue*qZ2P) zU7TR%_SYBgZQX4>8MVvha<=kdYBP0ak8Qbm?cJTzx3<{wn%UF7aph}brMstC*}giE zt?ayia-wDL%R(jpw&MW3KKT7H|6!%8e{TQ#dSA!R=*#owYNXKltmAfHLS5YLKGr$y Xdpt1pV|6#O=3UBUJSE*9p1%GErXEiN diff --git a/images/options.png b/images/options.png new file mode 100644 index 0000000000000000000000000000000000000000..0faa68699e105cd7540ddabf1d7c6e34d9c24426 GIT binary patch literal 1158 zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw{1|(OCFP#RYBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFe_z-M3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpgi&u1T;Y}Gc(1?z|F+X!qLgd+0n?z(9qS`!r0W=*}&Y@z|z#h z)zQTXrq?AuximL5uLPzy1)DuF+d+~?al3gMxomv9MPCu_X)QF#5THbJj zOY1yG==qi;u~`dm2J~KUsNfa&?`$m4_TTa8ddHtPckqZZJujh#>4F&?`OdsWSvR-eHT*b|+pVFFZv1k#qx5ev6T)}n<|5~1;GRm}lV*1Fx zVpo4at%WidOP!;rz4C+tIftu%k9c@)Dbw^lv_;PU&1a>Z0^x72Kk{0hU%2G3{)IVT zS^cd - @@ -45,7 +44,6 @@ - @@ -80,6 +78,7 @@ +

diff --git a/main.js b/main.js index 8e2a087d..7e694884 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 f2872752..00000000 --- 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 2a2bfd91..4e6cd9e9 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 7a62e522..00000000 --- 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