From 7ca81873e03c1fb969173133536617c4af7aa029 Mon Sep 17 00:00:00 2001 From: Marco De Donno Date: Wed, 21 Feb 2018 22:12:35 +0100 Subject: [PATCH] Patch the pfsp mode indicator (change the colour for the sync/split from black to gray if the individual mode is selected) --- js/pianos4.js | 53 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/js/pianos4.js b/js/pianos4.js index 92ef0e8..89c355e 100644 --- a/js/pianos4.js +++ b/js/pianos4.js @@ -5114,22 +5114,29 @@ function Pianos4( params ) mode[ type ] = value; - if( type == 'a' ) + if( mode.a == 'individual' ) { - if( value == 'individual' ) - { - $( '#pfsp_mode_a_individual' ) - .css( 'text-decoration', 'underline' ); - $( '#pfsp_mode_a_zonal' ) - .css( 'text-decoration', 'none' ); - } else { - $( '#pfsp_mode_a_individual' ) - .css( 'text-decoration', 'none' ); - $( '#pfsp_mode_a_zonal' ) - .css( 'text-decoration', 'underline' ); - } + $( '#pfsp_mode_a_individual' ) + .css( 'text-decoration', 'underline' ); + $( '#pfsp_mode_a_zonal' ) + .css( 'text-decoration', 'none' ); + + $( '#pfsp_mode_b_sync' ) + .css( 'text-decoration', 'none' ) + .css( 'color', '#cccccc' ); + $( '#pfsp_mode_b_splitted' ) + .css( 'text-decoration', 'none' ) + .css( 'color', '#cccccc' ); + $( '#pfsp_mode_b_separator' ) + .css( 'text-decoration', 'none' ) + .css( 'color', '#cccccc' ); } else { - if( value == 'sync' ) + $( '#pfsp_mode_a_individual' ) + .css( 'text-decoration', 'none' ); + $( '#pfsp_mode_a_zonal' ) + .css( 'text-decoration', 'underline' ); + + if( mode.b == 'sync' ) { $( '#pfsp_mode_b_sync' ) .css( 'text-decoration', 'underline' ); @@ -5141,6 +5148,14 @@ function Pianos4( params ) $( '#pfsp_mode_b_splitted' ) .css( 'text-decoration', 'underline' ); } + $( '#pfsp_mode_b_sync' ) + .css( 'color', '#000000' ); + + $( '#pfsp_mode_b_splitted' ) + .css( 'color', '#000000' ); + + $( '#pfsp_mode_b_separator' ) + .css( 'color', '#000000' ); } } @@ -5178,7 +5193,6 @@ function Pianos4( params ) $( '' ) .attr( 'id', 'pfsp_mode_a_zonal' ) .text( 'Zonal' ) - .css( 'text-decoration', 'none' ) .click( function( e ){ updateSelectionMode( e, 'a', 'zonal' ) } ) ) .append( @@ -5191,18 +5205,20 @@ function Pianos4( params ) $( '' ) .attr( 'id', 'pfsp_mode_b_sync' ) .text( 'Snycronous' ) - .css( 'text-decoration', 'underline' ) + .css( 'color', '#cccccc' ) .click( function( e ){ updateSelectionMode( e, 'b', 'sync' ) } ) ) .append( $( '' ) + .attr( 'id', 'pfsp_mode_b_separator' ) .text( ' | ' ) + .css( 'color', '#cccccc' ) ) .append( $( '' ) .attr( 'id', 'pfsp_mode_b_splitted' ) .text( 'Splitted' ) - .css( 'text-decoration', 'none' ) + .css( 'color', '#cccccc' ) .click( function( e ){ updateSelectionMode( e, 'b', 'splitted' ) } ) ); @@ -5212,7 +5228,8 @@ function Pianos4( params ) var map = $( '' ) .attr( 'id', 'Map' ) .attr( 'name', 'location_map' ) - .attr( 'class', 'location_map' ); + .attr( 'class', 'location_map' ) + .css( 'text-decoration', 'none' ); var preloader = []; -- GitLab