@@ -23,7 +23,7 @@ Discourse.SiteCustomization = Discourse.Model.extend({
2323 var _this = this ;
2424 if ( ! this . originals ) return false ;
2525
26- var changed = this . trackedProperties . any ( function ( p ) {
26+ var changed = _ . some ( this . trackedProperties , function ( p ) {
2727 return _this . originals [ p ] !== _this . get ( p ) ;
2828 } ) ;
2929
@@ -38,8 +38,8 @@ Discourse.SiteCustomization = Discourse.Model.extend({
3838 startTrackingChanges : function ( ) {
3939 var _this = this ;
4040 var originals = { } ;
41- this . trackedProperties . each ( function ( p ) {
42- originals [ p ] = _this . get ( p ) ;
41+ _ . each ( this . trackedProperties , function ( prop ) {
42+ originals [ prop ] = _this . get ( prop ) ;
4343 return true ;
4444 } ) ;
4545 this . set ( 'originals' , originals ) ;
@@ -90,7 +90,7 @@ Discourse.SiteCustomization = Discourse.Model.extend({
9090var SiteCustomizations = Ember . ArrayProxy . extend ( {
9191 selectedItemChanged : function ( ) {
9292 var selected = this . get ( 'selectedItem' ) ;
93- return this . get ( 'content' ) . each ( function ( i ) {
93+ _ . each ( this . get ( 'content' ) , function ( i ) {
9494 return i . set ( 'selected' , selected === i ) ;
9595 } ) ;
9696 } . observes ( 'selectedItem' )
@@ -101,7 +101,7 @@ Discourse.SiteCustomization.reopenClass({
101101 var customizations = SiteCustomizations . create ( { content : [ ] , loading : true } ) ;
102102 Discourse . ajax ( "/admin/site_customizations" ) . then ( function ( data ) {
103103 if ( data ) {
104- data . site_customizations . each ( function ( c ) {
104+ _ . each ( data . site_customizations , function ( c ) {
105105 customizations . pushObject ( Discourse . SiteCustomization . create ( c . site_customizations ) ) ;
106106 } ) ;
107107 }
0 commit comments