"use strict"; define(['underscore', 'bi/commons/ui/core/Class'], function (_, Class) { 'use strict'; var CustomSaveLocationController = Class.extend({ init: function init(options) { CustomSaveLocationController.inherited('init', this, arguments); _.extend(this, options); this._previousValue = this.currentValue; }, _isCurrentValueDefined: function _isCurrentValueDefined() { return !_.isUndefined(this.currentValue) && !_.isNull(this.currentValue) && this.currentValue && this.currentValue !== ".my_folders" && _.isString(this.currentValue); }, _getRequestEndpoint: function _getRequestEndpoint(contentSvc) { return contentSvc.getSearchPathUrl(this.currentValue); }, _setContentPath: function _setContentPath(selectedObject) { var searchPath = selectedObject[0].searchPath; this.currentValue = searchPath; }, setDefaultValue: function setDefaultValue() { this.currentValue = ".my_folders"; }, isValueChanged: function isValueChanged() { return this._previousValue !== this.currentValue; } }); return CustomSaveLocationController; });