@@ -58,6 +58,7 @@ module.exports = Backbone.View.extend({
5858 'keyup #moderatorFeeInput' : 'keypressFeeInput' ,
5959 'click #advancedForm input[name="notFancy"]' : 'toggleFancyStyles' ,
6060 'click #advancedForm input[name="useTestnet"]' : 'toggleTestnet' ,
61+ 'change #advancedForm input[name="appBarStyle"]' : 'changeAppBarStyle' ,
6162 'blur input' : 'validateInput' ,
6263 'blur textarea' : 'validateInput' ,
6364 'change #handle' : 'handleChange' ,
@@ -385,6 +386,8 @@ module.exports = Backbone.View.extend({
385386 currency = this . $ ( '#currency_code' ) ,
386387 timezone = this . $ ( '#time_zone' ) ,
387388 language = this . $ ( '#language' ) ,
389+ generalForm = this . $ ( '#generalForm' ) ,
390+ advancedForm = this . $ ( '#advancedForm' ) ,
388391 user = this . model . get ( 'user' ) ,
389392 ship_country_str = "" ,
390393 country_str = "" ,
@@ -398,13 +401,15 @@ module.exports = Backbone.View.extend({
398401 fancyStatus = window . localStorage . getItem ( 'notFancy' ) ,
399402 smtp_notifications = user . smtp_notifications == 1 ;
400403
401- this . $ ( '#pageForm input[name=nsfw]' ) . val ( [ String ( pageNSFW ) ] ) ;
402- this . $ ( "#generalForm input[name=nsfw][value=" + localStorage . getItem ( 'NSFWFilter' ) + "]" ) . prop ( 'checked' , true ) ;
403- this . $ ( "#generalForm input[name=notifications][value=" + notifications + "]" ) . prop ( 'checked' , true ) ;
404- this . $ ( "#storeForm input[name=vendor][value=" + vendorStatus + "]" ) . prop ( 'checked' , true ) ;
405- this . $ ( "#advancedForm input[name=notFancy][value=" + fancyStatus + "]" ) . prop ( 'checked' , true ) ;
406- this . $ ( "#advancedForm input[name=additionalPaymentData][value=" + localStorage . getItem ( 'AdditionalPaymentData' ) + "]" ) . prop ( 'checked' , true ) ;
407- this . $ ( "#advancedForm input[name=smtp_notifications][value=" + smtp_notifications + "]" ) . prop ( 'checked' , true ) ;
404+ this . $ ( "#pageForm" ) . find ( "input[name=nsfw]" ) . val ( [ String ( pageNSFW ) ] ) ;
405+ generalForm . find ( "input[name=nsfw][value=" + localStorage . getItem ( 'NSFWFilter' ) + "]" ) . prop ( 'checked' , true ) ;
406+ generalForm . find ( "input[name=notifications][value=" + notifications + "]" ) . prop ( 'checked' , true ) ;
407+ this . $ ( "#storeForm" ) . find ( "input[name=vendor][value=" + vendorStatus + "]" ) . prop ( 'checked' , true ) ;
408+ advancedForm . find ( "input[name=notFancy][value=" + fancyStatus + "]" ) . prop ( 'checked' , true ) ;
409+ advancedForm . find ( "input[name=additionalPaymentData][value=" + localStorage . getItem ( 'AdditionalPaymentData' ) + "]" ) . prop ( 'checked' , true ) ;
410+ advancedForm . find ( "input[name=smtp_notifications][value=" + smtp_notifications + "]" ) . prop ( 'checked' , true ) ;
411+ advancedForm . find ( "input[name=smtp_notifications][value=" + smtp_notifications + "]" ) . prop ( 'checked' , true ) ;
412+ advancedForm . find ( "input[name=appBarStyle][value=" + app . appBar . getStyle ( ) + "]" ) . prop ( 'checked' , true ) ;
408413
409414 currencyList = __ . uniq ( currencyList , function ( item ) {
410415 return item . code ;
@@ -462,8 +467,7 @@ module.exports = Backbone.View.extend({
462467
463468 //set moderator status
464469 this . $ ( '#moderatorForm' ) . find ( 'input[name=moderator]' ) . val ( [ String ( moderatorStatus ) ] ) ;
465-
466- this . $ ( '#advancedForm' ) . find ( 'input[name=smtp_mo]' ) . val ( [ String ( moderatorStatus ) ] ) ;
470+ advancedForm . find ( 'input[name=smtp_mo]' ) . val ( [ String ( moderatorStatus ) ] ) ;
467471 } ,
468472
469473 showModeratorFeeHolder : function ( ) {
@@ -1072,11 +1076,13 @@ module.exports = Backbone.View.extend({
10721076 } ,
10731077
10741078 toggleFancyStyles : function ( ) {
1079+ var $html = $ ( 'html' ) ;
1080+
10751081 if ( $ ( '#advancedForm' ) . find ( 'input[name="notFancy"]' ) . prop ( 'checked' ) ) {
1076- $ ( ' html' ) . addClass ( 'notFancy' ) ;
1082+ $html . addClass ( 'notFancy' ) ;
10771083 localStorage . setItem ( 'notFancy' , "true" ) ;
10781084 } else {
1079- $ ( ' html' ) . removeClass ( 'notFancy' ) ;
1085+ $html . removeClass ( 'notFancy' ) ;
10801086 localStorage . setItem ( 'notFancy' , "false" ) ;
10811087 }
10821088 } ,
@@ -1086,6 +1092,10 @@ module.exports = Backbone.View.extend({
10861092 window . location . reload ( ) ;
10871093 } ,
10881094
1095+ changeAppBarStyle : function ( e ) {
1096+ app . appBar . setStyle ( $ ( e . target ) . val ( ) ) ;
1097+ } ,
1098+
10891099 close : function ( ) {
10901100 __ . each ( this . subModels , function ( subModel ) {
10911101 subModel . off ( ) ;
0 commit comments