[JSDoc] Add annotations
Bulk-add JSDoc annotations, WTD-1482.
This commit is contained in:
@@ -29,6 +29,7 @@ define(
|
||||
/**
|
||||
* The AboutController provides information to populate the
|
||||
* About dialog.
|
||||
* @memberof platform/commonUI/about
|
||||
* @constructor
|
||||
* @param {object[]} versions an array of version extensions;
|
||||
* injected from `versions[]`
|
||||
@@ -42,6 +43,7 @@ define(
|
||||
* as a line-item in the version information listing.
|
||||
* @memberof AboutController#
|
||||
* @returns {object[]} version information
|
||||
* @memberof platform/commonUI/about.AboutController#
|
||||
*/
|
||||
versions: function () {
|
||||
return versions;
|
||||
@@ -50,6 +52,7 @@ define(
|
||||
* Open a new window (or tab, depending on browser
|
||||
* configuration) containing open source licenses.
|
||||
* @memberof AboutController#
|
||||
* @memberof platform/commonUI/about.AboutController#
|
||||
*/
|
||||
openLicenses: function () {
|
||||
// Open a new browser window at the licenses route
|
||||
@@ -60,4 +63,4 @@ define(
|
||||
|
||||
return AboutController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ define(
|
||||
/**
|
||||
* Provides extension-introduced licenses information to the
|
||||
* licenses route.
|
||||
* @memberof platform/commonUI/about
|
||||
* @constructor
|
||||
*/
|
||||
function LicenseController(licenses) {
|
||||
@@ -36,6 +37,7 @@ define(
|
||||
/**
|
||||
* Get license information.
|
||||
* @returns {Array} license extensions
|
||||
* @memberof platform/commonUI/about.LicenseController#
|
||||
*/
|
||||
licenses: function () {
|
||||
return licenses;
|
||||
@@ -45,4 +47,4 @@ define(
|
||||
|
||||
return LicenseController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ define(
|
||||
/**
|
||||
* The LogoController provides functionality to the application
|
||||
* logo in the bottom-right of the user interface.
|
||||
* @memberof platform/commonUI/about
|
||||
* @constructor
|
||||
* @param {OverlayService} overlayService the overlay service
|
||||
*/
|
||||
@@ -37,6 +38,7 @@ define(
|
||||
/**
|
||||
* Display the About dialog.
|
||||
* @memberof LogoController#
|
||||
* @memberof platform/commonUI/about.LogoController#
|
||||
*/
|
||||
showAboutDialog: function () {
|
||||
overlayService.createOverlay("overlay-about");
|
||||
@@ -46,4 +48,4 @@ define(
|
||||
|
||||
return LogoController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -39,6 +39,7 @@ define(
|
||||
* which Angular templates first have access to the domain object
|
||||
* hierarchy.
|
||||
*
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function BrowseController($scope, $route, $location, objectService, navigationService, urlService) {
|
||||
@@ -157,3 +158,4 @@ define(
|
||||
return BrowseController;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ define(
|
||||
/**
|
||||
* Controller for the `browse-object` representation of a domain
|
||||
* object (the right-hand side of Browse mode.)
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function BrowseObjectController($scope, $location, $route) {
|
||||
@@ -71,3 +72,4 @@ define(
|
||||
return BrowseObjectController;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ define(
|
||||
* A left-click on the menu arrow should display a
|
||||
* context menu. This controller launches the context
|
||||
* menu.
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function MenuArrowController($scope) {
|
||||
@@ -48,4 +49,4 @@ define(
|
||||
|
||||
return MenuArrowController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -34,6 +34,7 @@ define(
|
||||
* domain objects of a specific type. This is the action that
|
||||
* is performed when a user uses the Create menu.
|
||||
*
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
* @param {Type} type the type of domain object to create
|
||||
* @param {DomainObject} parent the domain object that should
|
||||
@@ -95,6 +96,7 @@ define(
|
||||
* This will prompt for user input first.
|
||||
* @method
|
||||
* @memberof CreateAction
|
||||
* @memberof platform/commonUI/browse.CreateAction#
|
||||
*/
|
||||
perform: perform,
|
||||
|
||||
@@ -107,6 +109,7 @@ define(
|
||||
* * `context`: The context in which this action will be performed.
|
||||
*
|
||||
* @return {object} metadata about the create action
|
||||
* @memberof platform/commonUI/browse.CreateAction#
|
||||
*/
|
||||
getMetadata: function () {
|
||||
return {
|
||||
@@ -123,4 +126,4 @@ define(
|
||||
|
||||
return CreateAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -33,6 +33,7 @@ define(
|
||||
* The CreateActionProvider is an ActionProvider which introduces
|
||||
* a Create action for each creatable domain object type.
|
||||
*
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
* @param {TypeService} typeService the type service, used to discover
|
||||
* available types
|
||||
@@ -51,6 +52,7 @@ define(
|
||||
* @memberof CreateActionProvider
|
||||
* @method
|
||||
* @returns {CreateAction[]}
|
||||
* @memberof platform/commonUI/browse.CreateActionProvider#
|
||||
*/
|
||||
getActions: function (actionContext) {
|
||||
var context = actionContext || {},
|
||||
@@ -84,4 +86,4 @@ define(
|
||||
|
||||
return CreateActionProvider;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -34,6 +34,7 @@ define(
|
||||
* set of Create actions based on the currently-selected
|
||||
* domain object.
|
||||
*
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function CreateMenuController($scope) {
|
||||
@@ -55,4 +56,4 @@ define(
|
||||
|
||||
return CreateMenuController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -37,6 +37,7 @@ define(
|
||||
* @param {TypeImpl} type the type of domain object to be created
|
||||
* @param {DomainObject} parent the domain object to serve as
|
||||
* the initial parent for the created object, in the dialog
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
* @memberof module:core/action/create-wizard
|
||||
*/
|
||||
@@ -62,6 +63,7 @@ define(
|
||||
*
|
||||
* @return {FormModel} formModel the form model to
|
||||
* show in the create dialog
|
||||
* @memberof platform/commonUI/browse.CreateWizard#
|
||||
*/
|
||||
getFormStructure: function () {
|
||||
var sections = [];
|
||||
@@ -100,6 +102,7 @@ define(
|
||||
* in the structure.
|
||||
*
|
||||
* @returns {object} the initial value of the form
|
||||
* @memberof platform/commonUI/browse.CreateWizard#
|
||||
*/
|
||||
getInitialFormValue: function () {
|
||||
// Start with initial values for properties
|
||||
@@ -116,6 +119,7 @@ define(
|
||||
* Based on a populated form, get the domain object which
|
||||
* should be used as a parent for the newly-created object.
|
||||
* @return {DomainObject}
|
||||
* @memberof platform/commonUI/browse.CreateWizard#
|
||||
*/
|
||||
getLocation: function (formValue) {
|
||||
return formValue.createParent || parent;
|
||||
@@ -124,6 +128,7 @@ define(
|
||||
* Create the domain object model for a newly-created object,
|
||||
* based on user input read from a formModel.
|
||||
* @return {object} the domain object' model
|
||||
* @memberof platform/commonUI/browse.CreateWizard#
|
||||
*/
|
||||
createModel: function (formValue) {
|
||||
// Clone
|
||||
@@ -146,4 +151,4 @@ define(
|
||||
|
||||
return CreateWizard;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -39,6 +39,7 @@ define(
|
||||
* persisting new domain objects. Handles all actual object
|
||||
* mutation and persistence associated with domain object
|
||||
* creation.
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function CreationService(persistenceService, $q, $log) {
|
||||
@@ -131,6 +132,7 @@ define(
|
||||
* @param {DomainObject} parent the domain object which
|
||||
* should contain the newly-created domain object
|
||||
* in its composition
|
||||
* @memberof platform/commonUI/browse.CreationService#
|
||||
*/
|
||||
createObject: createObject
|
||||
};
|
||||
@@ -139,3 +141,4 @@ define(
|
||||
return CreationService;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ define(
|
||||
* Controller for the "locator" control, which provides the
|
||||
* user with the ability to select a domain object as the
|
||||
* destination for a newly-created object in the Create menu.
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function LocatorController($scope) {
|
||||
@@ -79,3 +80,4 @@ define(
|
||||
return LocatorController;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ define(
|
||||
|
||||
/**
|
||||
* The navigate action navigates to a specific domain object.
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function NavigateAction(navigationService, $q, context) {
|
||||
@@ -46,6 +47,7 @@ define(
|
||||
* 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
|
||||
};
|
||||
@@ -64,4 +66,4 @@ define(
|
||||
|
||||
return NavigateAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -32,6 +32,7 @@ define(
|
||||
/**
|
||||
* The navigation service maintains the application's current
|
||||
* navigation state, and allows listening for changes thereto.
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function NavigationService() {
|
||||
@@ -68,12 +69,14 @@ define(
|
||||
return {
|
||||
/**
|
||||
* Get the current navigation state.
|
||||
* @memberof platform/commonUI/browse.NavigationService#
|
||||
*/
|
||||
getNavigation: getNavigation,
|
||||
/**
|
||||
* Set the current navigation state. Thiswill invoke listeners.
|
||||
* @param {DomainObject} value the domain object to navigate
|
||||
* to
|
||||
* @memberof platform/commonUI/browse.NavigationService#
|
||||
*/
|
||||
setNavigation: setNavigation,
|
||||
/**
|
||||
@@ -82,6 +85,7 @@ define(
|
||||
* this changes.
|
||||
* @param {function} callback the callback to invoke when
|
||||
* navigation state changes
|
||||
* @memberof platform/commonUI/browse.NavigationService#
|
||||
*/
|
||||
addListener: addListener,
|
||||
/**
|
||||
@@ -89,6 +93,7 @@ define(
|
||||
* @param {function} callback the callback which should
|
||||
* no longer be invoked when navigation state
|
||||
* changes
|
||||
* @memberof platform/commonUI/browse.NavigationService#
|
||||
*/
|
||||
removeListener: removeListener
|
||||
};
|
||||
@@ -96,4 +101,4 @@ define(
|
||||
|
||||
return NavigationService;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -35,12 +35,14 @@ define(
|
||||
/**
|
||||
* The fullscreen action toggles between fullscreen display
|
||||
* and regular in-window display.
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function FullscreenAction(context) {
|
||||
return {
|
||||
/**
|
||||
* Toggle full screen state
|
||||
* @memberof platform/commonUI/browse.FullscreenAction#
|
||||
*/
|
||||
perform: function () {
|
||||
screenfull.toggle();
|
||||
@@ -48,6 +50,7 @@ define(
|
||||
/**
|
||||
* Get metadata about this action, including the
|
||||
* applicable glyph to display.
|
||||
* @memberof platform/commonUI/browse.FullscreenAction#
|
||||
*/
|
||||
getMetadata: function () {
|
||||
// We override getMetadata, because the glyph and
|
||||
@@ -67,4 +70,4 @@ define(
|
||||
|
||||
return FullscreenAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -33,6 +33,7 @@ define(
|
||||
/**
|
||||
* The new tab action allows a domain object to be opened
|
||||
* into a new browser tab.
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function NewTabAction(urlService, $window, context) {
|
||||
@@ -64,4 +65,4 @@ define(
|
||||
|
||||
return NewTabAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ define(
|
||||
/**
|
||||
* Updates the title of the current window to reflect the name
|
||||
* of the currently navigated-to domain object.
|
||||
* @memberof platform/commonUI/browse
|
||||
* @constructor
|
||||
*/
|
||||
function WindowTitler(navigationService, $rootScope, $document) {
|
||||
@@ -49,4 +50,4 @@ define(
|
||||
|
||||
return WindowTitler;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -32,6 +32,7 @@ define(
|
||||
* The dialog service is responsible for handling window-modal
|
||||
* communication with the user, such as displaying forms for user
|
||||
* input.
|
||||
* @memberof platform/commonUI/dialog
|
||||
* @constructor
|
||||
*/
|
||||
function DialogService(overlayService, $q, $log) {
|
||||
@@ -142,6 +143,7 @@ define(
|
||||
* user has supplied; this may be rejected if
|
||||
* user input cannot be obtained (for instance,
|
||||
* because the user cancelled the dialog)
|
||||
* @memberof platform/commonUI/dialog.DialogService#
|
||||
*/
|
||||
getUserInput: getUserInput,
|
||||
/**
|
||||
@@ -149,6 +151,7 @@ define(
|
||||
* which will be shown as buttons.
|
||||
*
|
||||
* @param dialogModel a description of the dialog to show
|
||||
* @memberof platform/commonUI/dialog.DialogService#
|
||||
*/
|
||||
getUserChoice: getUserChoice
|
||||
};
|
||||
@@ -156,4 +159,4 @@ define(
|
||||
|
||||
return DialogService;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -43,6 +43,7 @@ define(
|
||||
* particularly where a multiple-overlay effect is not specifically
|
||||
* desired).
|
||||
*
|
||||
* @memberof platform/commonUI/dialog
|
||||
* @constructor
|
||||
*/
|
||||
function OverlayService($document, $compile, $rootScope) {
|
||||
@@ -89,6 +90,7 @@ define(
|
||||
* @param {object} overlayModel the model to pass to the
|
||||
* included overlay template (this will be passed
|
||||
* in via ng-model)
|
||||
* @memberof platform/commonUI/dialog.OverlayService#
|
||||
*/
|
||||
createOverlay: createOverlay
|
||||
};
|
||||
@@ -96,4 +98,4 @@ define(
|
||||
|
||||
return OverlayService;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,8 @@ define(
|
||||
* The "Cancel" action; the action triggered by clicking Cancel from
|
||||
* Edit Mode. Exits the editing user interface and invokes object
|
||||
* capabilities to persist the changes that have been made.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function CancelAction($location, urlService, context) {
|
||||
var domainObject = context.domainObject;
|
||||
@@ -62,6 +64,7 @@ define(
|
||||
*
|
||||
* @returns {Promise} a promise that will be fulfilled when
|
||||
* cancellation has completed
|
||||
* @memberof platform/commonUI/edit.CancelAction#
|
||||
*/
|
||||
perform: function () {
|
||||
return doCancel(getEditorCapability())
|
||||
@@ -84,4 +87,4 @@ define(
|
||||
|
||||
return CancelAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -42,6 +42,7 @@ define(
|
||||
* mode (typically triggered by the Edit button.) This will
|
||||
* show the user interface for editing (by way of a change in
|
||||
* route)
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditAction($location, navigationService, $log, context) {
|
||||
@@ -63,6 +64,7 @@ define(
|
||||
return {
|
||||
/**
|
||||
* Enter edit mode.
|
||||
* @memberof platform/commonUI/edit.EditAction#
|
||||
*/
|
||||
perform: function () {
|
||||
navigationService.setNavigation(domainObject);
|
||||
@@ -87,4 +89,4 @@ define(
|
||||
|
||||
return EditAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,8 @@ define(
|
||||
|
||||
/**
|
||||
* Add one domain object to another's composition.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function LinkAction(context) {
|
||||
var domainObject = (context || {}).domainObject,
|
||||
@@ -58,6 +60,7 @@ define(
|
||||
return {
|
||||
/**
|
||||
* Perform this action.
|
||||
* @memberof platform/commonUI/edit.LinkAction#
|
||||
*/
|
||||
perform: function () {
|
||||
return selectedId && doLink();
|
||||
@@ -67,4 +70,4 @@ define(
|
||||
|
||||
return LinkAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -38,6 +38,7 @@ define(
|
||||
* @param {DialogService} dialogService a service which will show the dialog
|
||||
* @param {DomainObject} object the object to be edited
|
||||
* @param {ActionContext} context the context in which this action is performed
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function PropertiesAction(dialogService, context) {
|
||||
@@ -77,6 +78,7 @@ define(
|
||||
* Perform this action.
|
||||
* @return {Promise} a promise which will be
|
||||
* fulfilled when the action has completed.
|
||||
* @memberof platform/commonUI/edit.PropertiesAction#
|
||||
*/
|
||||
perform: function () {
|
||||
var type = object.getCapability('type');
|
||||
@@ -106,3 +108,4 @@ define(
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ define(
|
||||
* @param {TypeImpl} type the type of domain object for which properties
|
||||
* will be specified
|
||||
* @param {DomainObject} the object for which properties will be set
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
* @memberof module:common/actions/properties-dialog
|
||||
*/
|
||||
@@ -47,6 +48,7 @@ define(
|
||||
/**
|
||||
* Get sections provided by this dialog.
|
||||
* @return {FormStructure} the structure of this form
|
||||
* @memberof platform/commonUI/edit.PropertiesDialog#
|
||||
*/
|
||||
getFormStructure: function () {
|
||||
return {
|
||||
@@ -66,6 +68,7 @@ define(
|
||||
* Get the initial state of the form shown by this dialog
|
||||
* (based on the object model)
|
||||
* @returns {object} initial state of the form
|
||||
* @memberof platform/commonUI/edit.PropertiesDialog#
|
||||
*/
|
||||
getInitialFormValue: function () {
|
||||
// Start with initial values for properties
|
||||
@@ -77,6 +80,7 @@ define(
|
||||
},
|
||||
/**
|
||||
* Update a domain object model based on the value of a form.
|
||||
* @memberof platform/commonUI/edit.PropertiesDialog#
|
||||
*/
|
||||
updateModel: function (model, formValue) {
|
||||
// Update all properties
|
||||
@@ -91,4 +95,4 @@ define(
|
||||
|
||||
return PropertiesDialog;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -37,6 +37,7 @@ define(
|
||||
*
|
||||
* @param {DomainObject} object the object to be removed
|
||||
* @param {ActionContext} context the context in which this action is performed
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
* @memberof module:editor/actions/remove-action
|
||||
*/
|
||||
@@ -47,6 +48,7 @@ define(
|
||||
* Check whether an object ID matches the ID of the object being
|
||||
* removed (used to filter a parent's composition to handle the
|
||||
* removal.)
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
function isNotObject(otherObjectId) {
|
||||
return otherObjectId !== object.getId();
|
||||
@@ -55,6 +57,7 @@ define(
|
||||
/**
|
||||
* Mutate a parent object such that it no longer contains the object
|
||||
* which is being removed.
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
function doMutate(model) {
|
||||
model.composition = model.composition.filter(isNotObject);
|
||||
@@ -63,6 +66,7 @@ define(
|
||||
/**
|
||||
* Invoke persistence on a domain object. This will be called upon
|
||||
* the removed object's parent (as its composition will have changed.)
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
function doPersist(domainObject) {
|
||||
var persistence = domainObject.getCapability('persistence');
|
||||
@@ -74,6 +78,7 @@ define(
|
||||
* capability.
|
||||
* @param {ContextCapability} contextCapability the "context" capability
|
||||
* of the domain object being removed.
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
function removeFromContext(contextCapability) {
|
||||
var parent = contextCapability.getParent();
|
||||
@@ -89,6 +94,7 @@ define(
|
||||
* Perform this action.
|
||||
* @return {module:core/promises.Promise} a promise which will be
|
||||
* fulfilled when the action has completed.
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
perform: function () {
|
||||
return $q.when(object.getCapability('context'))
|
||||
@@ -113,4 +119,4 @@ define(
|
||||
|
||||
return RemoveAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -30,6 +30,8 @@ define(
|
||||
* The "Save" action; the action triggered by clicking Save from
|
||||
* Edit Mode. Exits the editing user interface and invokes object
|
||||
* capabilities to persist the changes that have been made.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function SaveAction($location, urlService, context) {
|
||||
var domainObject = context.domainObject;
|
||||
@@ -57,6 +59,7 @@ define(
|
||||
*
|
||||
* @returns {Promise} a promise that will be fulfilled when
|
||||
* cancellation has completed
|
||||
* @memberof platform/commonUI/edit.SaveAction#
|
||||
*/
|
||||
perform: function () {
|
||||
return doSave().then(returnToBrowse);
|
||||
@@ -78,4 +81,4 @@ define(
|
||||
|
||||
return SaveAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditableCompositionCapability(
|
||||
contextCapability,
|
||||
@@ -54,4 +56,4 @@ define(
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditableContextCapability(
|
||||
contextCapability,
|
||||
@@ -72,4 +74,4 @@ define(
|
||||
return capability;
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditableLookupCapability(
|
||||
contextCapability,
|
||||
@@ -115,4 +117,4 @@ define(
|
||||
return capability;
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function EditablePersistenceCapability(
|
||||
persistenceCapability,
|
||||
@@ -62,4 +64,4 @@ define(
|
||||
|
||||
return EditablePersistenceCapability;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditableRelationshipCapability(
|
||||
relationshipCapability,
|
||||
@@ -54,4 +56,4 @@ define(
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -39,6 +39,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditorCapability(
|
||||
persistenceCapability,
|
||||
@@ -83,6 +85,7 @@ define(
|
||||
* object (and not other objects with associated changes)
|
||||
* @returns {Promise} a promise that will be fulfilled after
|
||||
* persistence has completed.
|
||||
* @memberof platform/commonUI/edit.EditorCapability#
|
||||
*/
|
||||
save: function (nonrecursive) {
|
||||
return nonrecursive ?
|
||||
@@ -95,6 +98,7 @@ define(
|
||||
* been retrieved and modified during the editing session)
|
||||
* @returns {Promise} a promise that will be fulfilled after
|
||||
* cancellation has completed.
|
||||
* @memberof platform/commonUI/edit.EditorCapability#
|
||||
*/
|
||||
cancel: function () {
|
||||
return resolvePromise(undefined);
|
||||
@@ -102,6 +106,7 @@ define(
|
||||
/**
|
||||
* Check if there are any unsaved changes.
|
||||
* @returns {boolean} true if there are unsaved changes
|
||||
* @memberof platform/commonUI/edit.EditorCapability#
|
||||
*/
|
||||
dirty: function () {
|
||||
return cache.dirty();
|
||||
@@ -109,4 +114,4 @@ define(
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -33,6 +33,7 @@ define(
|
||||
|
||||
/**
|
||||
* Controller which supplies action instances for Save/Cancel.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditActionController($scope) {
|
||||
@@ -51,4 +52,4 @@ define(
|
||||
|
||||
return EditActionController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -33,6 +33,7 @@ define(
|
||||
* Controller which is responsible for populating the scope for
|
||||
* Edit mode; introduces an editable version of the currently
|
||||
* navigated domain object into the scope.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditController($scope, $q, navigationService) {
|
||||
@@ -55,6 +56,7 @@ define(
|
||||
/**
|
||||
* Get the domain object which is navigated-to.
|
||||
* @returns {DomainObject} the domain object that is navigated-to
|
||||
* @memberof platform/commonUI/edit.EditController#
|
||||
*/
|
||||
navigatedObject: function () {
|
||||
return navigatedObject;
|
||||
@@ -64,6 +66,7 @@ define(
|
||||
* away from Edit mode while unsaved changes are present.
|
||||
* @returns {string} the warning to show, or undefined if
|
||||
* there are no unsaved changes
|
||||
* @memberof platform/commonUI/edit.EditController#
|
||||
*/
|
||||
getUnloadWarning: function () {
|
||||
var editorCapability = navigatedObject &&
|
||||
@@ -79,4 +82,4 @@ define(
|
||||
|
||||
return EditController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -28,6 +28,7 @@ define(
|
||||
|
||||
/**
|
||||
* Supports the Library and Elements panes in Edit mode.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditPanesController($scope) {
|
||||
@@ -56,6 +57,7 @@ define(
|
||||
* Get the root-level domain object, as reported by the
|
||||
* represented domain object.
|
||||
* @returns {DomainObject} the root object
|
||||
* @memberof platform/commonUI/edit.EditPanesController#
|
||||
*/
|
||||
getRoot: function () {
|
||||
return root;
|
||||
@@ -65,4 +67,4 @@ define(
|
||||
|
||||
return EditPanesController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -31,6 +31,7 @@ define(
|
||||
* to this attribute will be evaluated during page navigation events
|
||||
* and, if it returns a truthy value, will be used to populate a
|
||||
* prompt to the user to confirm this navigation.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
* @param $window the window
|
||||
*/
|
||||
@@ -102,4 +103,4 @@ define(
|
||||
return MCTBeforeUnload;
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -68,6 +68,8 @@ define(
|
||||
* which need to behave differently in edit mode,
|
||||
* and provides a "working copy" of the object's
|
||||
* model to allow changes to be easily cancelled.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function EditableDomainObject(domainObject, $q) {
|
||||
// The cache will hold all domain objects reached from
|
||||
@@ -109,4 +111,4 @@ define(
|
||||
|
||||
return EditableDomainObject;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -51,6 +51,7 @@ define(
|
||||
* an argument, and returns an editable domain object as its
|
||||
* result.
|
||||
* @param $q Angular's $q, for promise handling
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
* @memberof module:editor/object/editable-domain-object-cache
|
||||
*/
|
||||
@@ -66,6 +67,7 @@ define(
|
||||
*
|
||||
* @param {DomainObject} domainObject the regular domain object
|
||||
* @returns {DomainObject} the domain object in an editable form
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
getEditableObject: function (domainObject) {
|
||||
var type = domainObject.getCapability('type');
|
||||
@@ -94,6 +96,7 @@ define(
|
||||
* Check if a domain object is (effectively) the top-level
|
||||
* object in this editable subgraph.
|
||||
* @returns {boolean} true if it is the root
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
isRoot: function (domainObject) {
|
||||
return domainObject === root;
|
||||
@@ -104,6 +107,7 @@ define(
|
||||
* included in the bulk save invoked when editing completes.
|
||||
*
|
||||
* @param {DomainObject} domainObject the domain object
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
markDirty: function (domainObject) {
|
||||
dirty[domainObject.getId()] = domainObject;
|
||||
@@ -114,12 +118,14 @@ define(
|
||||
* save operation.)
|
||||
*
|
||||
* @param {DomainObject} domainObject the domain object
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
markClean: function (domainObject) {
|
||||
delete dirty[domainObject.getId()];
|
||||
},
|
||||
/**
|
||||
* Initiate a save on all objects that have been cached.
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
saveAll: function () {
|
||||
// Get a list of all dirty objects
|
||||
@@ -140,6 +146,7 @@ define(
|
||||
/**
|
||||
* Check if any objects have been marked dirty in this cache.
|
||||
* @returns {boolean} true if objects are dirty
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
dirty: function () {
|
||||
return Object.keys(dirty).length > 0;
|
||||
@@ -150,3 +157,4 @@ define(
|
||||
return EditableDomainObjectCache;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ define(
|
||||
* made editable, to support a group that can be saved all-at-once.
|
||||
* This is useful in Edit mode, which is launched for a specific
|
||||
* object but may contain changes across many objects.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditableModelCache() {
|
||||
@@ -47,6 +48,7 @@ define(
|
||||
* Get this domain object's model from the cache (or
|
||||
* place it in the cache if it isn't in the cache yet)
|
||||
* @returns a clone of the domain object's model
|
||||
* @memberof platform/commonUI/edit.EditableModelCache#
|
||||
*/
|
||||
getCachedModel: function (domainObject) {
|
||||
var id = domainObject.getId();
|
||||
@@ -60,4 +62,4 @@ define(
|
||||
|
||||
return EditableModelCache;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -30,6 +30,7 @@ define(
|
||||
* Policy controlling when the `edit` and/or `properties` actions
|
||||
* can appear as applicable actions of the `view-control` category
|
||||
* (shown as buttons in the top-right of browse mode.)
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditActionPolicy() {
|
||||
@@ -54,6 +55,7 @@ define(
|
||||
* @param {Action} action the action
|
||||
* @param context the context
|
||||
* @returns {boolean} true if not disallowed
|
||||
* @memberof platform/commonUI/edit.EditActionPolicy#
|
||||
*/
|
||||
allow: function (action, context) {
|
||||
var key = action.getMetadata().key,
|
||||
@@ -79,4 +81,4 @@ define(
|
||||
|
||||
return EditActionPolicy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -28,6 +28,7 @@ define(
|
||||
|
||||
/**
|
||||
* Policy controlling which views should be visible in Edit mode.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditableViewPolicy() {
|
||||
@@ -38,6 +39,7 @@ define(
|
||||
* @param {Action} action the action
|
||||
* @param domainObject the domain object which will be viewed
|
||||
* @returns {boolean} true if not disallowed
|
||||
* @memberof platform/commonUI/edit.EditableViewPolicy#
|
||||
*/
|
||||
allow: function (view, domainObject) {
|
||||
// If a view is flagged as non-editable, only allow it
|
||||
@@ -54,4 +56,4 @@ define(
|
||||
|
||||
return EditableViewPolicy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -41,6 +41,7 @@ define(
|
||||
* and may be reused for different domain objects and/or
|
||||
* representations resulting from changes there.
|
||||
*
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditRepresenter($q, $log, scope) {
|
||||
@@ -113,10 +114,12 @@ define(
|
||||
* definition of the representation in use
|
||||
* @param {DomainObject} domainObject the domain object
|
||||
* being represented
|
||||
* @memberof platform/commonUI/edit.EditRepresenter#
|
||||
*/
|
||||
represent: represent,
|
||||
/**
|
||||
* Release any resources associated with this representer.
|
||||
* @memberof platform/commonUI/edit.EditRepresenter#
|
||||
*/
|
||||
destroy: destroy
|
||||
};
|
||||
@@ -124,4 +127,4 @@ define(
|
||||
|
||||
return EditRepresenter;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -38,6 +38,7 @@ define(
|
||||
*
|
||||
* @param structure toolbar structure, as provided by view definition
|
||||
* @param {Function} commit callback to invoke after changes
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditToolbar(structure, commit) {
|
||||
@@ -221,6 +222,7 @@ define(
|
||||
* Set the current selection. Visisbility of sections
|
||||
* and items in the toolbar will be updated to match this.
|
||||
* @param {Array} s the new selection
|
||||
* @memberof platform/commonUI/edit.EditToolbar#
|
||||
*/
|
||||
setSelection: function (s) {
|
||||
selection = s;
|
||||
@@ -231,6 +233,7 @@ define(
|
||||
* Get the structure of the toolbar, as appropriate to
|
||||
* pass to `mct-toolbar`.
|
||||
* @returns the toolbar structure
|
||||
* @memberof platform/commonUI/edit.EditToolbar#
|
||||
*/
|
||||
getStructure: function () {
|
||||
return toolbarStructure;
|
||||
@@ -239,6 +242,7 @@ define(
|
||||
* Get the current state of the toolbar, as appropriate
|
||||
* to two-way bind to the state handled by `mct-toolbar`.
|
||||
* @returns {Array} state of the toolbar
|
||||
* @memberof platform/commonUI/edit.EditToolbar#
|
||||
*/
|
||||
getState: function () {
|
||||
return toolbarState;
|
||||
@@ -248,6 +252,7 @@ define(
|
||||
* @param {number} index the index of the corresponding
|
||||
* element in the state array
|
||||
* @param value the new value to convey to the selection
|
||||
* @memberof platform/commonUI/edit.EditToolbar#
|
||||
*/
|
||||
updateState: function (index, value) {
|
||||
return updateProperties(properties[index], value);
|
||||
@@ -259,3 +264,4 @@ define(
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ define(
|
||||
* The EditToolbarRepresenter populates the toolbar in Edit mode
|
||||
* based on a view's definition.
|
||||
* @param {Scope} scope the Angular scope of the representation
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditToolbarRepresenter(scope, element, attrs) {
|
||||
@@ -136,10 +137,12 @@ define(
|
||||
* definition of the representation in use
|
||||
* @param {DomainObject} domainObject the domain object
|
||||
* being represented
|
||||
* @memberof platform/commonUI/edit.EditToolbarRepresenter#
|
||||
*/
|
||||
represent: (attrs || {}).toolbar ? represent : noop,
|
||||
/**
|
||||
* Release any resources associated with this representer.
|
||||
* @memberof platform/commonUI/edit.EditToolbarRepresenter#
|
||||
*/
|
||||
destroy: (attrs || {}).toolbar ? destroy : noop
|
||||
};
|
||||
@@ -147,4 +150,4 @@ define(
|
||||
|
||||
return EditToolbarRepresenter;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -37,6 +37,7 @@ define(
|
||||
* * The selection, for single selected elements within the
|
||||
* view.
|
||||
*
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditToolbarSelection() {
|
||||
@@ -106,22 +107,26 @@ define(
|
||||
/**
|
||||
* Check if an object is currently selected.
|
||||
* @returns true if selected, otherwise false
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
selected: isSelected,
|
||||
/**
|
||||
* Select an object.
|
||||
* @param obj the object to select
|
||||
* @returns {boolean} true if selection changed
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
select: select,
|
||||
/**
|
||||
* Clear the current selection.
|
||||
* @returns {boolean} true if selection changed
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
deselect: deselect,
|
||||
/**
|
||||
* Get the currently-selected object.
|
||||
* @returns the currently selected object
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
get: get,
|
||||
/**
|
||||
@@ -129,6 +134,7 @@ define(
|
||||
* the view itself.)
|
||||
* @param [proxy] the view proxy (if setting)
|
||||
* @returns the current view proxy
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
proxy: proxy,
|
||||
/**
|
||||
@@ -136,6 +142,7 @@ define(
|
||||
* selection proxy. It is generally not advisable to
|
||||
* mutate this array directly.
|
||||
* @returns {Array} all selections
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
all: all
|
||||
};
|
||||
@@ -143,4 +150,4 @@ define(
|
||||
|
||||
return EditToolbarSelection;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ define(
|
||||
/**
|
||||
* The StyleSheetLoader adds links to style sheets exposed from
|
||||
* various bundles as extensions of category `stylesheets`.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param {object[]} stylesheets stylesheet extension definitions
|
||||
* @param $document Angular's jqLite-wrapped document element
|
||||
@@ -62,4 +63,4 @@ define(
|
||||
|
||||
return StyleSheetLoader;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -42,6 +42,7 @@ define(
|
||||
* * `ungrouped`: All actions which did not have a defined
|
||||
* group.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function ActionGroupController($scope) {
|
||||
@@ -102,4 +103,4 @@ define(
|
||||
|
||||
return ActionGroupController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ define(
|
||||
/**
|
||||
* Controller for the bottombar template. Exposes
|
||||
* available indicators (of extension category "indicators")
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function BottomBarController(indicators) {
|
||||
@@ -49,6 +50,7 @@ define(
|
||||
* Get all indicators to display.
|
||||
* @returns {Indicator[]} all indicators
|
||||
* to display in the bottom bar.
|
||||
* @memberof platform/commonUI/general.BottomBarController#
|
||||
*/
|
||||
getIndicators: function () {
|
||||
return indicators;
|
||||
@@ -58,4 +60,4 @@ define(
|
||||
|
||||
return BottomBarController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -31,6 +31,7 @@ define(
|
||||
* menus) where clicking elsewhere in the document while the toggle
|
||||
* is in an active state is intended to dismiss the toggle.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param $scope the scope in which this controller is active
|
||||
* @param $document the document element, injected by Angular
|
||||
@@ -72,6 +73,7 @@ define(
|
||||
/**
|
||||
* Get the current state of the toggle.
|
||||
* @return {boolean} true if active
|
||||
* @memberof platform/commonUI/general.ClickAwayController#
|
||||
*/
|
||||
isActive: function () {
|
||||
return state;
|
||||
@@ -79,6 +81,7 @@ define(
|
||||
/**
|
||||
* Set a new state for the toggle.
|
||||
* @return {boolean} true to activate
|
||||
* @memberof platform/commonUI/general.ClickAwayController#
|
||||
*/
|
||||
setState: function (newState) {
|
||||
if (state !== newState) {
|
||||
@@ -88,6 +91,7 @@ define(
|
||||
/**
|
||||
* Toggle the current state; activate if it is inactive,
|
||||
* deactivate if it is active.
|
||||
* @memberof platform/commonUI/general.ClickAwayController#
|
||||
*/
|
||||
toggle: function () {
|
||||
changeState();
|
||||
@@ -98,4 +102,4 @@ define(
|
||||
|
||||
return ClickAwayController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -33,6 +33,7 @@ define(
|
||||
* Controller for the context menu. Maintains an up-to-date
|
||||
* list of applicable actions (those from category "contextual")
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function ContextMenuController($scope) {
|
||||
@@ -49,4 +50,4 @@ define(
|
||||
|
||||
return ContextMenuController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -54,6 +54,7 @@ define(
|
||||
* parameter it received.) Getter-setter functions are never the
|
||||
* target of a scope assignment and so avoid this problem.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param {Scope} $scope the controller's scope
|
||||
*/
|
||||
@@ -87,4 +88,4 @@ define(
|
||||
return GetterSetterController;
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -30,6 +30,7 @@ define(
|
||||
|
||||
/**
|
||||
* Controller for the domain object selector control.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param {ObjectService} objectService service from which to
|
||||
* read domain objects
|
||||
@@ -102,6 +103,7 @@ define(
|
||||
/**
|
||||
* Get the root object to show in the left-hand tree.
|
||||
* @returns {DomainObject} the root object
|
||||
* @memberof platform/commonUI/general.SelectorController#
|
||||
*/
|
||||
root: function () {
|
||||
return rootObject;
|
||||
@@ -109,6 +111,7 @@ define(
|
||||
/**
|
||||
* Add a domain object to the list of selected objects.
|
||||
* @param {DomainObject} the domain object to select
|
||||
* @memberof platform/commonUI/general.SelectorController#
|
||||
*/
|
||||
select: function (domainObject) {
|
||||
var id = domainObject && domainObject.getId(),
|
||||
@@ -122,6 +125,7 @@ define(
|
||||
/**
|
||||
* Remove a domain object from the list of selected objects.
|
||||
* @param {DomainObject} the domain object to select
|
||||
* @memberof platform/commonUI/general.SelectorController#
|
||||
*/
|
||||
deselect: function (domainObject) {
|
||||
var id = domainObject && domainObject.getId(),
|
||||
@@ -140,6 +144,7 @@ define(
|
||||
/**
|
||||
* Get the currently-selected domain objects.
|
||||
* @returns {DomainObject[]} the current selection
|
||||
* @memberof platform/commonUI/general.SelectorController#
|
||||
*/
|
||||
selected: function () {
|
||||
return selectedObjects;
|
||||
@@ -153,4 +158,4 @@ define(
|
||||
|
||||
return SelectorController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -32,6 +32,7 @@ define(
|
||||
/**
|
||||
* Controller for the splitter in Browse mode. Current implementation
|
||||
* uses many hard-coded constants; this could be generalized.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function SplitPaneController() {
|
||||
@@ -44,6 +45,7 @@ define(
|
||||
* Get the current position of the splitter, in pixels
|
||||
* from the left edge.
|
||||
* @returns {number} position of the splitter, in pixels
|
||||
* @memberof platform/commonUI/general.SplitPaneController#
|
||||
*/
|
||||
state: function (defaultState) {
|
||||
// Set the state to the desired default, if we don't have a
|
||||
@@ -58,6 +60,7 @@ define(
|
||||
* Begin moving the splitter; this will note the splitter's
|
||||
* current position, which is necessary for correct
|
||||
* interpretation of deltas provided by mct-drag.
|
||||
* @memberof platform/commonUI/general.SplitPaneController#
|
||||
*/
|
||||
startMove: function () {
|
||||
start = current;
|
||||
@@ -68,6 +71,7 @@ define(
|
||||
* This movement is relative to the position of the
|
||||
* splitter when startMove was last invoked.
|
||||
* @param {number} delta number of pixels to move
|
||||
* @memberof platform/commonUI/general.SplitPaneController#
|
||||
*/
|
||||
move: function (delta, minimum, maximum) {
|
||||
// Ensure defaults for minimum/maximum
|
||||
@@ -87,4 +91,4 @@ define(
|
||||
|
||||
return SplitPaneController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -30,6 +30,7 @@ define(
|
||||
* A ToggleController is used to activate/deactivate things.
|
||||
* A common usage is for "twistie"
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function ToggleController() {
|
||||
@@ -39,6 +40,7 @@ define(
|
||||
/**
|
||||
* Get the current state of the toggle.
|
||||
* @return {boolean} true if active
|
||||
* @memberof platform/commonUI/general.ToggleController#
|
||||
*/
|
||||
isActive: function () {
|
||||
return state;
|
||||
@@ -46,6 +48,7 @@ define(
|
||||
/**
|
||||
* Set a new state for the toggle.
|
||||
* @return {boolean} true to activate
|
||||
* @memberof platform/commonUI/general.ToggleController#
|
||||
*/
|
||||
setState: function (newState) {
|
||||
state = newState;
|
||||
@@ -53,6 +56,7 @@ define(
|
||||
/**
|
||||
* Toggle the current state; activate if it is inactive,
|
||||
* deactivate if it is active.
|
||||
* @memberof platform/commonUI/general.ToggleController#
|
||||
*/
|
||||
toggle: function () {
|
||||
state = !state;
|
||||
@@ -63,4 +67,4 @@ define(
|
||||
|
||||
return ToggleController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -48,6 +48,7 @@ define(
|
||||
* node expansion when this tree node's _subtree_ will contain
|
||||
* the navigated object (recursively, this becomes an
|
||||
* expand-to-show-navigated-object behavior.)
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function TreeNodeController($scope, $timeout, $rootScope) {
|
||||
@@ -148,11 +149,13 @@ define(
|
||||
* This method should be called when a node is expanded
|
||||
* to record that this has occurred, to support one-time
|
||||
* lazy loading of the node's subtree.
|
||||
* @memberof platform/commonUI/general.TreeNodeController#
|
||||
*/
|
||||
trackExpansion: trackExpansion,
|
||||
/**
|
||||
* Check if this not has ever been expanded.
|
||||
* @returns true if it has been expanded
|
||||
* @memberof platform/commonUI/general.TreeNodeController#
|
||||
*/
|
||||
hasBeenExpanded: function () {
|
||||
return hasBeenExpanded;
|
||||
@@ -163,6 +166,7 @@ define(
|
||||
* An object will be highlighted if it matches
|
||||
* ngModel.selectedObject
|
||||
* @returns true if this should be highlighted
|
||||
* @memberof platform/commonUI/general.TreeNodeController#
|
||||
*/
|
||||
isSelected: function () {
|
||||
return isSelected;
|
||||
@@ -172,4 +176,4 @@ define(
|
||||
|
||||
return TreeNodeController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -32,6 +32,7 @@ define(
|
||||
/**
|
||||
* Controller for the view switcher; populates and maintains a list
|
||||
* of applicable views for a represented domain object.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function ViewSwitcherController($scope, $timeout) {
|
||||
@@ -71,3 +72,4 @@ define(
|
||||
return ViewSwitcherController;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ define(
|
||||
* plain string attribute, instead of as an Angular
|
||||
* expression.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function MCTContainer(containers) {
|
||||
@@ -96,4 +97,4 @@ define(
|
||||
|
||||
return MCTContainer;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -44,6 +44,7 @@ define(
|
||||
* and vertical pixel offset of the current mouse position
|
||||
* relative to the mouse position where dragging began.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*
|
||||
*/
|
||||
@@ -157,3 +158,4 @@ define(
|
||||
return MCTDrag;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ define(
|
||||
* This is an Angular expression, and it will be re-evaluated after
|
||||
* each interval.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*
|
||||
*/
|
||||
@@ -111,4 +112,4 @@ define(
|
||||
|
||||
return MCTResize;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -37,6 +37,7 @@ define(
|
||||
* This is exposed as two directives in `bundle.json`; the difference
|
||||
* is handled purely by parameterization.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param $parse Angular's $parse
|
||||
* @param {string} property property to manage within the HTML element
|
||||
@@ -80,4 +81,4 @@ define(
|
||||
return MCTScroll;
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -91,6 +91,7 @@ define(
|
||||
* etc. can be set on that element to control the splitter's
|
||||
* allowable positions.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function MCTSplitPane($parse, $log) {
|
||||
@@ -213,3 +214,4 @@ define(
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ define(
|
||||
|
||||
/**
|
||||
* Implements `mct-splitter` directive.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function MCTSplitter() {
|
||||
@@ -88,3 +89,4 @@ define(
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ define(
|
||||
/**
|
||||
* The url service handles calls for url paths
|
||||
* using domain objects.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/general
|
||||
*/
|
||||
function UrlService($location) {
|
||||
// Returns the url for the mode wanted
|
||||
@@ -73,6 +75,7 @@ define(
|
||||
* for the path
|
||||
* @param {DomainObject} value of the domain object
|
||||
* to get the path of
|
||||
* @memberof platform/commonUI/general.UrlService#
|
||||
*/
|
||||
urlForNewTab: urlForNewTab,
|
||||
/**
|
||||
@@ -83,6 +86,7 @@ define(
|
||||
* for the path
|
||||
* @param {DomainObject} value of the domain object
|
||||
* to get the path of
|
||||
* @memberof platform/commonUI/general.UrlService#
|
||||
*/
|
||||
urlForLocation: urlForLocation
|
||||
};
|
||||
@@ -90,4 +94,4 @@ define(
|
||||
|
||||
return UrlService;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -33,4 +33,4 @@ define({
|
||||
// Max width and margins allowed for bubbles; defined in /platform/commonUI/general/res/sass/_constants.scss
|
||||
BUBBLE_MARGIN_LR: 10,
|
||||
BUBBLE_MAX_WIDTH: 300
|
||||
});
|
||||
});
|
||||
|
||||
@@ -30,6 +30,7 @@ define(
|
||||
* The `info` gesture displays domain object metadata in a
|
||||
* bubble on hover.
|
||||
*
|
||||
* @memberof platform/commonUI/inspect
|
||||
* @constructor
|
||||
* @param $timeout Angular's `$timeout`
|
||||
* @param {InfoService} infoService a service which shows info bubbles
|
||||
@@ -103,6 +104,7 @@ define(
|
||||
* Detach any event handlers associated with this gesture.
|
||||
* @memberof InfoGesture
|
||||
* @method
|
||||
* @memberof platform/commonUI/inspect.InfoGesture#
|
||||
*/
|
||||
destroy: function () {
|
||||
// Dismiss any active bubble...
|
||||
@@ -119,3 +121,4 @@ define(
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ define(
|
||||
|
||||
/**
|
||||
* Displays informative content ("info bubbles") for the user.
|
||||
* @memberof platform/commonUI/inspect
|
||||
* @constructor
|
||||
*/
|
||||
function InfoService($compile, $document, $window, $rootScope) {
|
||||
@@ -85,6 +86,7 @@ define(
|
||||
* pixel coordinates.
|
||||
* @returns {Function} a function that may be invoked to
|
||||
* dismiss the info bubble
|
||||
* @memberof platform/commonUI/inspect.InfoService#
|
||||
*/
|
||||
display: display
|
||||
};
|
||||
@@ -93,3 +95,4 @@ define(
|
||||
return InfoService;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user