File: scotts\widgets\external_links\client.js
function _controller($scope, spUtil) {
/**
* Handles simple methods for controlling the display and rendering
* of the widget. However this widget has minimal interactions to
* handle.
*
* @class ExternalLinks.Client
* @constructor
* @extends Widget.Client
* @author Alexander Anderson (cwt_alexander)
* @module Widgets
*/
/**
* Flag for tracking if any additional links should be displayed
* on the current page.
* @property expanded
* @type Boolean
*/
$scope.expanded = false;
/**
* Toggles the expanded flag to extend the list of shown lists as
* needed.
* @method toggleExpansion
*/
$scope.toggleExpansion = function() {
$scope.expanded = !$scope.expanded;
};
/**
* Resolves additional classes for the widget to apply to itself
* for styling based on options.
* @method getAdditionalClasses
* @return {String} Class names to add based on current options.
*/
$scope.getAdditionalClasses = function() {
var classes;
if($scope.options.transparentBackground) {
classes = "panel-transparent";
} else {
classes = "panel-opaque";
}
if($scope.options.scale) {
classes += " scaled-" + $scope.options.scale;
}
return classes;
};
}