[Code Style] Use prototypes in Browse bundle

WTD-1482.
This commit is contained in:
Victor Woeltjen
2015-08-10 11:52:23 -07:00
parent 78146d97f8
commit a77920bd18
10 changed files with 418 additions and 365 deletions

View File

@ -33,24 +33,24 @@ define(
* The navigate action navigates to a specific domain object.
* @memberof platform/commonUI/browse
* @constructor
* @implements {Action}
*/
function NavigateAction(navigationService, $q, context) {
var domainObject = context.domainObject;
this.domainObject = context.domainObject;
this.$q = $q;
this.navigationService = navigationService;
}
function perform() {
// Set navigation, and wrap like a promise
return $q.when(navigationService.setNavigation(domainObject));
}
return {
/**
* Navigate to the object described in the context.
* @returns {Promise} a promise that is resolved once the
* navigation has been updated
* @memberof platform/commonUI/browse.NavigateAction#
*/
perform: perform
};
/**
* Navigate to the object described in the context.
* @returns {Promise} a promise that is resolved once the
* navigation has been updated
*/
NavigateAction.prototype.perform = function () {
// Set navigation, and wrap like a promise
return this.$q.when(
this.navigationService.setNavigation(this.domainObject)
);
}
/**