Created
April 7, 2009 17:37
-
-
Save ttdonovan/91350 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
| // ========================================================================== | |
| // CDWeb.ObjectSelectorController | |
| // ========================================================================== | |
| require('core'); | |
| /** @class | |
| (Document Your View Here) | |
| @extends SC.Object | |
| @author AuthorName | |
| @version 0.1 | |
| @static | |
| */ | |
| CDWeb.objectSelectorController = SC.Object.create( | |
| /** @scope CDWeb.objectSelectorController */ { | |
| dataViewGuidBinding: 'CDWeb.pageController*page.objectSelectorDataViewGuid', | |
| /** | |
| computed url properties | |
| */ | |
| requestUrl: function() { | |
| var dataView = this.get('dataViewGuid'), url ; | |
| if (!SC.none(dataView) && SC.typeOf(dataView) === SC.T_STRING) { | |
| dataView = dataView.replace(':', '/') ; | |
| url = CDWeb.dataViewUrl.fmt(dataView) ; | |
| this.propertyDidChange('requestUrl') ; | |
| return url ; | |
| } | |
| }.property('dataViewGuid').cacheable(), | |
| requestParams: function() { | |
| var params = {} ; | |
| this.propertyDidChange('requestParams') ; | |
| return params ; | |
| }.property().cacheable() | |
| }) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment