@@ -182,7 +182,6 @@ module.exports = baseVw.extend({
182182 this . pageID = options . userID ;
183183 //set view's userID from the userModel;
184184 this . userID = options . userModel . get ( 'guid' ) ;
185- this . globalUserModel = options . userModel ;
186185 this . userProfileFetchParameters = { } ;
187186 this . itemFetchParameters = { } ;
188187 this . model = new Backbone . Model ( ) ;
@@ -261,15 +260,15 @@ module.exports = baseVw.extend({
261260 if ( e . guid === this . model . get ( 'page' ) . profile . guid ) {
262261 this . renderUserUnblocked ( ) ;
263262 }
264- } ) ;
265-
263+ } ) ;
264+
266265 this . listenTo ( window . obEventBus , 'saveCurrentForm' , function ( ) {
267266 if ( self . editing ) {
268267 self . saveItem ( ) ;
269268 } else if ( self . customizing ) {
270269 self . saveCustomizePage ( ) ;
271270 }
272- } ) ;
271+ } ) ;
273272
274273 //determine if this is the user's own page or another profile's page
275274 //if no userID is passed in, or it matches the user's ID, then this is their page
@@ -358,7 +357,7 @@ module.exports = baseVw.extend({
358357 isBlocked = blocked . indexOf ( this . pageID ) !== - 1 ;
359358
360359 this . model . set ( 'isBlocked' , isBlocked ) ; //add blocked status to model
361-
360+
362361 //make sure container is cleared
363362 $ ( '#content' ) . html ( this . $el ) ;
364363
@@ -722,7 +721,7 @@ module.exports = baseVw.extend({
722721
723722 renderItems : function ( model , skipNSFWmodal ) {
724723 "use strict" ;
725-
724+
726725 var self = this ;
727726 var select = this . $el . find ( '.js-categories' ) ;
728727 var selectOptions = [ ] ;
@@ -753,14 +752,14 @@ module.exports = baseVw.extend({
753752 arrayItem . imageURL = self . options . userModel . get ( 'serverUrl' ) + "get_image?hash=" + arrayItem . thumbnail_hash + "&guid=" + self . pageID ;
754753 }
755754 } ) ;
756-
755+
757756 Object . keys ( selectOptions ) . sort ( ) . forEach ( function ( selectOption ) {
758757 var opt = document . createElement ( 'option' ) ;
759758 opt . value = selectOption ;
760759 opt . innerHTML = selectOption ;
761760 select . append ( opt ) ;
762761 } ) ;
763-
762+
764763 this . itemList = new itemListView ( {
765764 model : model ,
766765 el : '.js-list3' ,
@@ -919,7 +918,7 @@ module.exports = baseVw.extend({
919918 renderItemEdit : function ( useCurrentItem , clone ) {
920919 var self = this ,
921920 hash = "" ;
922-
921+
923922 if ( useCurrentItem ) {
924923 //if editing existing product, clone the model
925924 this . itemEdit = this . item . clone ( ) ;
@@ -947,7 +946,7 @@ module.exports = baseVw.extend({
947946 this . registerChild ( this . itemEditView ) ;
948947 this . listenTo ( this . itemEditView , 'saveNewDone' , this . saveNewDone ) ;
949948 self . tabClick ( self . $el . find ( '.js-storeTab' ) , self . $el . find ( '.js-itemEdit' ) ) ;
950-
949+
951950 this . editing = true ;
952951 } ,
953952
@@ -1265,7 +1264,7 @@ module.exports = baseVw.extend({
12651264 self . saveUserPageModel ( ) ;
12661265 }
12671266 } ,
1268-
1267+
12691268 saveCustomizePageClick : function ( ) {
12701269 this . saveCustomizePage ( ) ;
12711270 } ,
@@ -1338,16 +1337,16 @@ module.exports = baseVw.extend({
13381337
13391338 saveNewDone : function ( newHash ) {
13401339 "use strict" ;
1341-
1340+
13421341 this . setState ( 'listing' , newHash ) ;
13431342 this . fetchListings ( ) ;
1344-
1343+
13451344 this . editing = false ;
13461345 } ,
13471346
13481347 cancelClick : function ( ) {
13491348 "use strict" ;
1350-
1349+
13511350 this . setState ( this . lastTab ) ;
13521351 $ ( '#obContainer' ) . animate ( { scrollTop : 0 } ) ;
13531352
@@ -1404,7 +1403,7 @@ module.exports = baseVw.extend({
14041403 } ) ;
14051404 }
14061405 } ,
1407-
1406+
14081407 saveItemClick : function ( ) {
14091408 this . saveItem ( ) ;
14101409 } ,
@@ -1414,7 +1413,7 @@ module.exports = baseVw.extend({
14141413 var $saveBtn = $ ( '.js-saveItem' ) ;
14151414
14161415 $saveBtn . addClass ( 'loading' ) ;
1417-
1416+
14181417 this . itemEditView . saveChanges ( ) . always ( ( ) => $saveBtn . removeClass ( 'loading' ) )
14191418 . fail ( ( ) => {
14201419 var $firstErr = this . $ ( '.js-itemEdit .invalid, .js-itemEdit :invalid' ) . not ( 'form' ) . eq ( 0 ) ;
@@ -1508,10 +1507,10 @@ module.exports = baseVw.extend({
15081507 modList . moderators = [ ] ;
15091508
15101509 __ . each ( this . model . get ( 'user' ) . moderators , function ( mod ) {
1511- if ( mod != guid && ( typeof ( mod ) !== 'object' || mod . guid != this . pageID ) ) {
1510+ if ( mod != self . pageID && ( typeof ( mod ) !== 'object' || mod . guid != self . pageID ) ) {
15121511 modList . moderators . push ( mod ) ;
15131512 }
1514- } )
1513+ } ) ;
15151514
15161515 saveToAPI ( '' , this . model . get ( 'user' ) , this . model . get ( 'user' ) . serverUrl + "settings" ,
15171516 function ( ) {
0 commit comments