From 996b81b53fcd1f28fcb21d986da25c53feb43dd3 Mon Sep 17 00:00:00 2001 From: cTn Date: Wed, 22 Jan 2014 16:03:14 +0100 Subject: [PATCH] enabling spinners in all spinner required tabs --- tabs/pid_tuning.css | 18 ++++++++++++++++++ tabs/pid_tuning.js | 3 +++ tabs/receiver.css | 14 ++++++++++++++ tabs/receiver.js | 3 +++ tabs/servos.css | 20 +++++++++++++++++--- tabs/servos.js | 3 +++ 6 files changed, 58 insertions(+), 3 deletions(-) diff --git a/tabs/pid_tuning.css b/tabs/pid_tuning.css index 7bb03947..9eabf9d2 100644 --- a/tabs/pid_tuning.css +++ b/tabs/pid_tuning.css @@ -1,3 +1,21 @@ +.tab-pid_tuning { +} + .tab-pid_tuning .spinner { + float: right; + width: 16px; + height: 20px; + + background-image: url('../images/arrows.png'); + background-repeat: no-repeat; + + background-color: white; + } + .tab-pid_tuning .spinner .up { + height: 10px; + } + .tab-pid_tuning .spinner .down { + height: 10px; + } .tab-pid_tuning table { float: left; diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index fd78fe2a..4ce56c49 100644 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -2,6 +2,9 @@ function tab_initialize_pid_tuning() { ga_tracker.sendAppView('PID Tuning'); GUI.active_tab = 'pid_tuning'; + // enable custom spinners + add_custom_spinners(); + send_message(MSP_codes.MSP_PID, MSP_codes.MSP_PID, false, function() { send_message(MSP_codes.MSP_RC_TUNING, MSP_codes.MSP_RC_TUNING, false, function() { // Fill in the data from PIDs array diff --git a/tabs/receiver.css b/tabs/receiver.css index 57abb4f4..19435cce 100644 --- a/tabs/receiver.css +++ b/tabs/receiver.css @@ -1,5 +1,19 @@ .tab-receiver { } + .tab-receiver .spinner { + float: right; + width: 15px; + height: 20px; + + background-image: url('../images/arrows.png'); + background-repeat: no-repeat; + } + .tab-receiver .spinner .up { + height: 10px; + } + .tab-receiver .spinner .down { + height: 10px; + } .tab-receiver .bars { float: left; } diff --git a/tabs/receiver.js b/tabs/receiver.js index da3560c4..8e5b620e 100644 --- a/tabs/receiver.js +++ b/tabs/receiver.js @@ -2,6 +2,9 @@ function tab_initialize_receiver() { ga_tracker.sendAppView('Receiver Page'); GUI.active_tab = 'receiver'; + // enable custom spinners + add_custom_spinners(); + send_message(MSP_codes.MSP_RC_TUNING, MSP_codes.MSP_RC_TUNING, false, function() { // fill in data from RC_tuning $('.tunings .throttle input[name="mid"]').val(RC_tuning.throttle_MID.toFixed(2)); diff --git a/tabs/servos.css b/tabs/servos.css index 0e2991e3..c2234649 100644 --- a/tabs/servos.css +++ b/tabs/servos.css @@ -1,3 +1,19 @@ +.tab-servos { +} + .tab-servos .spinner { + float: right; + width: 15px; + height: 20px; + + background-image: url('../images/arrows.png'); + background-repeat: no-repeat; + } + .tab-servos .spinner .up { + height: 10px; + } + .tab-servos .spinner .down { + height: 10px; + } .tab-servos .supported_wrapper, .tab-servos .direction_wrapper { display: none; @@ -40,12 +56,10 @@ background-color: #ececec; } - .tab-servos table input[type="number"] { + .tab-servos table input[type="number"] { width: 65px; height: 20px; - padding-right: 5px; - line-height: 20px; text-align: right; diff --git a/tabs/servos.js b/tabs/servos.js index 7d355481..6b2743c7 100644 --- a/tabs/servos.js +++ b/tabs/servos.js @@ -103,6 +103,9 @@ function tab_initialize_servos() { } } + // enable custom spinners + add_custom_spinners(); + // UI hooks for dynamically generated elements $('table.directions select, table.directions input, table.fields select, table.fields input').change(function() { if ($('div.live input').is(':checked')) {