Created
May 21, 2010 22:05
-
-
Save geojeff/409503 to your computer and use it in GitHub Desktop.
This file contains 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
// ========================================================================== | |
// Project: SproutCore - JavaScript Application Framework | |
// Copyright: ©2006-2010 Sprout Systems, Inc. and contributors. | |
// Portions ©2008-2010 Apple Inc. All rights reserved. | |
// License: Licensed under MIT license (see license.js) | |
// ========================================================================== | |
/*globals PhoneControls*/ | |
PhoneControls.START = SC.Responder.create({ | |
didBecomeFirstResponder: function() { | |
console.error("START first resp"); | |
PhoneControls.getPath('mainPage.mainPane').append() ; | |
PhoneControls.groupsController.set("content", PhoneControls.groups); | |
PhoneControls.invokeLater("makeFirstResponder", 1, PhoneControls.GROUPS); | |
}, | |
back: function() { | |
console.error("START back, simply returning YES"); | |
return YES; | |
}, | |
willLoseFirstResponder: function() { | |
} | |
}); | |
// ========================================================================== | |
// Project: SproutCore - JavaScript Application Framework | |
// Copyright: ©2006-2010 Sprout Systems, Inc. and contributors. | |
// Portions ©2008-2010 Apple Inc. All rights reserved. | |
// License: Licensed under MIT license (see license.js) | |
// ========================================================================== | |
/*globals PhoneControls*/ | |
require("responders/categories"); | |
PhoneControls.GROUPS = SC.Responder.create({ | |
groupsList: null, | |
back: function () { | |
console.error("GROUPS, back. doing nothing but returning YES"); | |
return YES; | |
}, | |
didBecomeFirstResponder: function() { | |
console.error("GROUPS first resp"); | |
// create the groups list if we have not already | |
if (!this.groupsList) this.groupsList = PhoneControls.GroupsList.create(); | |
// push it onto navigation view | |
PhoneControls.mainPage.getPath("mainPane.navigationView").push(this.groupsList); | |
}, | |
groupSelect: function() { | |
console.error("GROUPS, groupSelect, going to CATEGORIES"); | |
PhoneControls.makeFirstResponder(PhoneControls.CATEGORIES); | |
}, | |
willLoseFirstResponder: function() { | |
} | |
}); | |
// ========================================================================== | |
// Project: SproutCore - JavaScript Application Framework | |
// Copyright: ©2006-2010 Sprout Systems, Inc. and contributors. | |
// Portions ©2008-2010 Apple Inc. All rights reserved. | |
// License: Licensed under MIT license (see license.js) | |
// ========================================================================== | |
/*globals PhoneControls*/ | |
require("responders/groups"); | |
require("responders/category_display"); | |
PhoneControls.CATEGORIES = SC.Responder.create({ | |
categoriesList: null, | |
nextResponder: PhoneControls.GROUPS, | |
didBecomeFirstResponder: function() { | |
console.error("CATEGORIES first resp"); | |
// create the categories list if it is not already there | |
if (!this.categoriesList) this.categoriesList = PhoneControls.CategoriesList.create(); | |
// push it onto the navigation view | |
PhoneControls.mainPage.getPath("mainPane.navigationView").push(this.categoriesList); | |
}, | |
back: function() { | |
console.error("CATEGORIES: back to GROUPS"); | |
PhoneControls.makeFirstResponder(PhoneControls.GROUPS); | |
return YES; | |
}, | |
categorySelect: function() { | |
console.error("categorySelect, going to DISPLAY"); | |
PhoneControls.makeFirstResponder(PhoneControls.CATEGORY_DISPLAY); | |
}, | |
willLoseFirstResponder: function() { | |
} | |
}); | |
// ========================================================================== | |
// Project: SproutCore - JavaScript Application Framework | |
// Copyright: ©2006-2010 Sprout Systems, Inc. and contributors. | |
// Portions ©2008-2010 Apple Inc. All rights reserved. | |
// License: Licensed under MIT license (see license.js) | |
// ========================================================================== | |
/*globals PhoneControls*/ | |
require("responders/categories"); | |
PhoneControls.CATEGORY_DISPLAY = SC.Responder.create({ | |
display_page : null, | |
nextResponder: PhoneControls.CATEGORIES, | |
didBecomeFirstResponder: function() { | |
console.error("CATEGORY DISPLAY first resp"); | |
// create the display page if it is not already there | |
if (!this.display_page) this.display_page = PhoneControls.CategoryDisplay.create(); | |
PhoneControls.mainPage.getPath("mainPane.navigationView").push(this.display_page); | |
}, | |
back: function() { | |
console.error("CATEGORY DISPLAY - back to cat"); | |
PhoneControls.makeFirstResponder(PhoneControls.CATEGORIES); | |
return YES; | |
}, | |
willLoseFirstResponder: function() { | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment