@@ -56,6 +56,7 @@ module.exports = Backbone.View.extend({
5656 'keyup #moderatorFeeInput' : 'keypressFeeInput' ,
5757 'click #advancedForm input[name="notFancy"]' : 'toggleFancyStyles' ,
5858 'click #advancedForm input[name="useTestnet"]' : 'toggleTestnet' ,
59+ 'change #advancedForm input[name="appBarStyle"]' : 'changeAppBarStyle' ,
5960 'blur input' : 'validateInput' ,
6061 'blur textarea' : 'validateInput' ,
6162 '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 avatar = user . avatar_hash ,
390393 ship_country_str = "" ,
@@ -400,13 +403,15 @@ module.exports = Backbone.View.extend({
400403
401404 smtp_notifications = ( user . smtp_notifications == 1 ) ? true : false ;
402405
403- this . $ ( '#pageForm input[name=nsfw]' ) . val ( [ String ( pageNSFW ) ] ) ;
404- this . $ ( "#generalForm input[name=nsfw][value=" + localStorage . getItem ( 'NSFWFilter' ) + "]" ) . prop ( 'checked' , true ) ;
405- this . $ ( "#generalForm input[name=notifications][value=" + notifications + "]" ) . prop ( 'checked' , true ) ;
406- this . $ ( "#storeForm input[name=vendor][value=" + vendorStatus + "]" ) . prop ( 'checked' , true ) ;
407- this . $ ( "#advancedForm input[name=notFancy][value=" + fancyStatus + "]" ) . prop ( 'checked' , true ) ;
408- this . $ ( "#advancedForm input[name=additionalPaymentData][value=" + localStorage . getItem ( 'AdditionalPaymentData' ) + "]" ) . prop ( 'checked' , true ) ;
409- this . $ ( "#advancedForm input[name=smtp_notifications][value=" + smtp_notifications + "]" ) . prop ( 'checked' , true ) ;
406+ this . $ ( "#pageForm" ) . find ( "input[name=nsfw]" ) . val ( [ String ( pageNSFW ) ] ) ;
407+ generalForm . find ( "input[name=nsfw][value=" + localStorage . getItem ( 'NSFWFilter' ) + "]" ) . prop ( 'checked' , true ) ;
408+ generalForm . find ( "input[name=notifications][value=" + notifications + "]" ) . prop ( 'checked' , true ) ;
409+ this . $ ( "#storeForm" ) . find ( "input[name=vendor][value=" + vendorStatus + "]" ) . prop ( 'checked' , true ) ;
410+ advancedForm . find ( "input[name=notFancy][value=" + fancyStatus + "]" ) . prop ( 'checked' , true ) ;
411+ advancedForm . find ( "input[name=additionalPaymentData][value=" + localStorage . getItem ( 'AdditionalPaymentData' ) + "]" ) . prop ( 'checked' , true ) ;
412+ advancedForm . find ( "input[name=smtp_notifications][value=" + smtp_notifications + "]" ) . prop ( 'checked' , true ) ;
413+ advancedForm . find ( "input[name=smtp_notifications][value=" + smtp_notifications + "]" ) . prop ( 'checked' , true ) ;
414+ advancedForm . find ( "input[name=appBarStyle][value=" + app . appBar . getStyle ( ) + "]" ) . prop ( 'checked' , true ) ;
410415
411416 currencyList = __ . uniq ( currencyList , function ( item ) { return item . code ; } ) ;
412417 currencyList = currencyList . sort ( function ( a , b ) {
@@ -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 ( ) {
@@ -1089,11 +1093,13 @@ module.exports = Backbone.View.extend({
10891093 } ,
10901094
10911095 toggleFancyStyles : function ( ) {
1096+ var $html = $ ( 'html' ) ;
1097+
10921098 if ( $ ( '#advancedForm' ) . find ( 'input[name="notFancy"]' ) . prop ( 'checked' ) ) {
1093- $ ( ' html' ) . addClass ( 'notFancy' ) ;
1099+ $html . addClass ( 'notFancy' ) ;
10941100 localStorage . setItem ( 'notFancy' , "true" ) ;
10951101 } else {
1096- $ ( ' html' ) . removeClass ( 'notFancy' ) ;
1102+ $html . removeClass ( 'notFancy' ) ;
10971103 localStorage . setItem ( 'notFancy' , "false" ) ;
10981104 }
10991105 } ,
@@ -1103,6 +1109,10 @@ module.exports = Backbone.View.extend({
11031109 window . location . reload ( ) ;
11041110 } ,
11051111
1112+ changeAppBarStyle : function ( e ) {
1113+ app . appBar . setStyle ( $ ( e . target ) . val ( ) ) ;
1114+ } ,
1115+
11061116 close : function ( ) {
11071117 "use strict" ;
11081118 __ . each ( this . subModels , function ( subModel ) {
0 commit comments