chain changes, cleanup and fix style

10.3.x-maintenance
cTn 2014-07-25 14:20:09 +02:00 committed by Dominic Clifton
parent 356c66b30e
commit d8f834fa51
1 changed files with 12 additions and 22 deletions

View File

@ -106,42 +106,34 @@ tabs.initial_setup.initialize = function(callback) {
} }
$('span.model').text(chrome.i18n.getMessage('initialSetupModel', [str])); $('span.model').text(chrome.i18n.getMessage('initialSetupModel', [str]));
// Model Mix Diagram selection // Model Mix Diagram selection
switch (CONFIG.multiType) { switch (CONFIG.multiType) {
case 1: // TRI case 1: // TRI
$(".modelMixDiagram").attr("src","./images/motor_order/tri.svg"); // Change image $(".modelMixDiagram").attr("src","./images/motor_order/tri.svg").addClass('modelMixTri');
$(".modelMixDiagram").addClass( 'modelMixTri' ); //Set specific class per model type
break; break;
case 2: // QUAD + case 2: // QUAD +
$(".modelMixDiagram").attr("src","./images/motor_order/quadp.svg"); $(".modelMixDiagram").attr("src","./images/motor_order/quadp.svg").addClass('modelMixQuadP');
$(".modelMixDiagram").addClass( 'modelMixQuadP' );
break; break;
case 3: // QUAD X case 3: // QUAD X
$(".modelMixDiagram").attr("src","./images/motor_order/quadx.svg"); $(".modelMixDiagram").attr("src","./images/motor_order/quadx.svg").addClass('modelMixQuadX');
$(".modelMixDiagram").addClass( 'modelMixQuadX' );
break; break;
case 6: // Y6 case 6: // Y6
$(".modelMixDiagram").attr("src","./images/motor_order/y6.svg"); $(".modelMixDiagram").attr("src","./images/motor_order/y6.svg").addClass('modelMixY6');
$(".modelMixDiagram").addClass( 'modelMixY6' );
break; break;
case 7: // HEX 6 case 7: // HEX 6
$(".modelMixDiagram").attr("src","./images/motor_order/hex6p.svg"); $(".modelMixDiagram").attr("src","./images/motor_order/hex6p.svg").addClass('modelMixHex6P');
$(".modelMixDiagram").addClass( 'modelMixHex6P' );
break; break;
case 9: // Y4 case 9: // Y4
$(".modelMixDiagram").attr("src","./images/motor_order/y4.svg"); $(".modelMixDiagram").attr("src","./images/motor_order/y4.svg").addClass('modelMixY4');
$(".modelMixDiagram").addClass( 'modelMixY4' );
break; break;
case 10: // HEX6 X case 10: // HEX6 X
$(".modelMixDiagram").attr("src","./images/motor_order/hex6x.svg"); $(".modelMixDiagram").attr("src","./images/motor_order/hex6x.svg").addClass('modelMixHex6X');
$(".modelMixDiagram").addClass( 'modelMixHex6X' );
break; break;
case 11: // OCTO X8 case 11: // OCTO X8
case 12: case 12:
case 13: case 13:
$(".modelMixDiagram").attr("src","./images/motor_order/octox.svg"); $(".modelMixDiagram").attr("src","./images/motor_order/octox.svg").addClass('modelMixOctoX');
$(".modelMixDiagram").addClass( 'modelMixOctoX' );
break; break;
case 4: // BI case 4: // BI
@ -155,13 +147,11 @@ tabs.initial_setup.initialize = function(callback) {
case 19: // PPM to SERVO case 19: // PPM to SERVO
case 20: // Dualcopter case 20: // Dualcopter
case 21: // Singlecopter case 21: // Singlecopter
$(".modelMixDiagram").attr("src","./images/motor_order/custom.svg"); $(".modelMixDiagram").attr("src","./images/motor_order/custom.svg").addClass('modelMixCustom');
$(".modelMixDiagram").addClass( 'modelMixCustom' );
break; break;
default: default:
$(".modelMixDiagram").attr("src","./images/motor_order/custom.svg"); $(".modelMixDiagram").attr("src","./images/motor_order/custom.svg").addClass('modelMixCustom');
$(".modelMixDiagram").addClass( 'modelMixCustom' );
break; break;
} }