"use strict"; define(['underscore', 'bi/commons/ui/core/Class'], function (_, Class) { 'use strict'; var TeamFolderController = Class.extend({ init: function init(options) { TeamFolderController.inherited('init', this, arguments); _.extend(this, options); this._previousValue = this.currentValue; }, _isCurrentValueDefined: function _isCurrentValueDefined() { return this.currentValue && this.currentValue.pathRef; }, _getRequestEndpoint: function _getRequestEndpoint(contentSvc) { return contentSvc.getPathUrl(this.currentValue.pathRef); }, _setContentPath: function _setContentPath(selectedObject) { var pathUrl = selectedObject[0]._meta.links.path.url; var pathRef = decodeURIComponent(pathUrl.substring(pathUrl.indexOf('=') + 1)); this.currentValue = { pathRef: pathRef }; }, setDefaultValue: function setDefaultValue() { this.currentValue = {}; }, isValueChanged: function isValueChanged() { return this._previousValue.pathRef !== this.currentValue.pathRef; } }); return TeamFolderController; });