@@ -37,7 +37,8 @@ define(['angular', 'jquery'], function(angular, $) {
3737
3838 /**
3939 * NEW LAYOUT
40- * To use new service layout set useNewLayout flag in override.js to true,
40+ * To use new service layout
41+ * set useNewLayout flag in override.js to true,
4142 * and useOldLayout to false
4243 ************************/
4344
@@ -52,7 +53,8 @@ define(['angular', 'jquery'], function(angular, $) {
5253 var defer ;
5354 // first, check the local storage...
5455 if ( data ) {
55- $log . log ( 'getLayout (new version): found layout in cache: ' + data ) ;
56+ $log . log ( 'getLayout (new version): found layout in cache: ' +
57+ data ) ;
5658 defer = $q . defer ( ) ;
5759 defer . resolve ( data ) ;
5860 return defer . promise ;
@@ -64,15 +66,18 @@ define(['angular', 'jquery'], function(angular, $) {
6466 * layout in current session.
6567 */
6668 var persistAndUse = function ( result ) {
67- $log . log ( 'persistAndUse: got data from old layout backend: ' + result . data . layout ) ;
69+ $log . log ( 'persistAndUse: got data from old layout backend: ' +
70+ result . data . layout ) ;
6871 var formattedOldLayout = formatLayoutForCache ( result . data ) ;
6972
70- $log . log ( 'persistAndUse: formatted old layout data as: ' + formattedOldLayout . layout ) ;
73+ $log . log ( 'persistAndUse: formatted old layout data as: ' +
74+ formattedOldLayout . layout ) ;
7175 // Parse out the fnames from the old layout JSON
7276 // The array of fnames is the new layout
7377 // Publish that to the new backend, and use it.
7478 // Old format:
75- // {layout: [ {"fname": "some-fname", ...}, {"fname": "some-other-fname", ...}] }
79+ // {layout: [ {"fname": "some-fname", ...},
80+ // {"fname": "some-other-fname", ...}] }
7681 // New format:
7782 // {layout: ["some-fname", "some-other-fname"]}
7883
@@ -81,12 +86,15 @@ define(['angular', 'jquery'], function(angular, $) {
8186
8287 for ( var i = 0 ; i < oldArrayOfMaps . length ; i ++ ) {
8388 var fname = oldArrayOfMaps [ i ] . fname ;
84- $log . log ( 'Object in the array is ' + angular . toJson ( oldArrayOfMaps [ i ] ) ) ;
89+ $log . log ( 'Object in the array is ' +
90+ angular . toJson ( oldArrayOfMaps [ i ] ) ) ;
8591 $log . log ( 'fname is ' + fname ) ;
8692 newLayoutRepresentation . push ( fname ) ;
8793 }
8894
89- $log . log ( 'persistAndUse: parsed to fname array representation: ' + newLayoutRepresentation ) ;
95+ $log . log ( 'persistAndUse: ' +
96+ 'parsed to fname array representation: ' +
97+ newLayoutRepresentation ) ;
9098 // persist the old layout to the new layout store
9199 $http ( {
92100 method : 'POST' ,
@@ -95,15 +103,18 @@ define(['angular', 'jquery'], function(angular, $) {
95103 dataType : 'json' ,
96104 } ) ;
97105
98- storeLayoutInCache ( { 'layout' : newLayoutRepresentation , 'new' : false } ) ;
106+ storeLayoutInCache (
107+ { 'layout' : newLayoutRepresentation , 'new' : false } ) ;
99108 return { 'layout' : newLayoutRepresentation , 'new' : false } ;
100109 } ;
101110
102111 successFn = function ( result ) {
103- $log . log ( 'successFn with data from new layout service: ' + result . data . layout ) ;
112+ $log . log ( 'successFn with data from new layout service: ' +
113+ result . data . layout ) ;
104114 if ( result . data . new ) {
105115 $log . log ( 'User is new to the new layout service.' ) ;
106- // oh! It's a new user never before seen by new layout service.
116+ // oh! It's a new user
117+ // never before seen by new layout service.
107118 // check the old layout service for the user's old layout
108119 // and paste it into the new service.
109120 return $http . get (
@@ -172,7 +183,8 @@ define(['angular', 'jquery'], function(angular, $) {
172183
173184 /**
174185 ** OLD LAYOUT
175- ** To use old service layout set useOldLayout flag in override.js to true,
186+ ** To use old service layout
187+ ** set useOldLayout flag in override.js to true,
176188 ** and useNewLayout to false
177189 *************************/
178190
0 commit comments