[Mobile] Move mobile-specific behavior to template

This commit is contained in:
Victor Woeltjen
2015-09-18 11:01:54 -07:00
parent fa186a1556
commit 4c5808c8c9
3 changed files with 32 additions and 36 deletions

View File

@ -51,7 +51,7 @@ define(
* @memberof platform/commonUI/general
* @constructor
*/
function TreeNodeController($scope, $timeout, agentService) {
function TreeNodeController($scope, $timeout) {
var self = this,
selectedObject = ($scope.ngModel || {}).selectedObject,
isSelected = false,
@ -133,7 +133,6 @@ define(
this.isSelectedFlag = false;
this.hasBeenExpandedFlag = false;
this.$timeout = $timeout;
this.agentService = agentService;
this.$scope = $scope;
// Listen for changes which will effect display parameters
@ -177,20 +176,6 @@ define(
return this.isSelectedFlag;
};
// Sets the selected object in the tree, to be the
// currently represented object. If the user is on phone
// and in portrait mode, than, hide the tree menu
TreeNodeController.prototype.setObject = function (ngModel, domainObject) {
ngModel.selectedObject = domainObject;
if (this.agentService.isPhone() && this.agentService.isPortrait()) {
this.$scope.$emit('select-obj');
}
};
TreeNodeController.prototype.checkMobile = function () {
return this.agentService.isMobile();
};
return TreeNodeController;
}
);