Created
November 7, 2008 17:38
-
-
Save erichocean/22916 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('core') ; | |
/** | |
@mixin | |
This where we will put all of the State core to keep it centralized. | |
@extends Cp2 | |
@author Evin Grano | |
@version 0.1 | |
*/ | |
Cp2.mixin( | |
/** @scope Cp2 */ { | |
/** not logged in */ | |
goStateA1: function(){ | |
}, | |
/** load all landing pages */ | |
goStateA2: function(){ | |
SC.page.getPath('workspace.sideCar.masterFooter.addLandingPage').set('isEnabled', true); | |
SC.page.getPath('fullHeader.controlSegments').set('isEnabled', false); | |
}, | |
/** no connection to server */ | |
goStateA3: function(){ | |
SC.page.getPath('workspace.sideCar.masterFooter.addLandingPage').set('isEnabled', false); | |
SC.page.getPath('fullHeader.controlSegments').set('isEnabled', false); | |
SC.page.getPath('workspace.sideCar.masterFooter.landingPageSettings').set('isEnabled', false); | |
}, | |
/** No Landing Pages */ | |
goStateA4: function(){ | |
SC.page.getPath('fullHeader.controlSegments').set('isEnabled', false); //enable style,content,preview | |
SC.page.getPath('workspace.sideCar.masterFooter.addLandingPage').set('isEnabled', true); | |
SC.page.getPath('workspace.sideCar.masterFooter.landingPageInfo').set('isEnabled', true); | |
SC.page.getPath('workspace.sideCar.masterFooter.landingPageSettings').set('isEnabled', false); | |
}, | |
/** Has Landing Pages */ | |
goStateA5: function(){ | |
SC.page.getPath('fullHeader.controlSegments').set('isEnabled', true); //enable style,content,preview | |
SC.page.getPath('workspace.sideCar.masterFooter.addLandingPage').set('isEnabled', true); | |
SC.page.getPath('workspace.sideCar.masterFooter.landingPageInfo').set('isEnabled', true); | |
SC.page.getPath('workspace.sideCar.masterFooter.landingPageSettings').set('isEnabled', true); | |
}, | |
/** State C Landing Page Settings */ | |
goStateC: function(){ | |
SC.page.getPath('workspace.sideCar.masterFooter.addLandingPage').set('isEnabled', false); | |
SC.page.getPath('workspace.sideCar.masterFooter.landingPageInfo').set('isEnabled', false); | |
SC.page.getPath('workspace.sideCar.masterFooter.landingPageSettings').set('isEnabled', true); | |
}, | |
/** State E Landing Page Preview */ | |
goStateE: function(){ | |
SC.page.getPath('fullHeader.controlSegments').set('isEnabled', true); //enable style,content,preview | |
SC.page.getPath('workspace.sideCar.masterFooter.addLandingPage').set('isEnabled', true); | |
SC.page.getPath('workspace.sideCar.masterFooter.landingPageInfo').set('isEnabled', true); | |
SC.page.getPath('workspace.sideCar.masterFooter.landingPageSettings').set('isEnabled', true); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment