Skip to content

Commit

Permalink
moar JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed Nov 27, 2013
1 parent 67461ce commit be589a5
Show file tree
Hide file tree
Showing 23 changed files with 245 additions and 8 deletions.
68 changes: 65 additions & 3 deletions hawtio-web/src/main/webapp/app/core/js/folder.ts
Expand Up @@ -8,26 +8,88 @@ module Core {
* @class NodeSelection
*/
export interface NodeSelection {
/**
* @property title
* @type string
*/
title: string;
/**
* @property key
* @type string
* @optional
*/
key?:string;
/**
* @property typeName
* @type string
* @optional
*/
typeName?: string;
/**
* @property objectName
* @type string
* @optional
*/
objectName?: string;
/**
* @property domain
* @type string
* @optional
*/
domain?: string;
/**
* @property entries
* @type any
* @optional
*/
entries?: any;

/**
* @property folderNames
* @type array
* @optional
*/
folderNames?: string[];
/**
* @property children
* @type NodeSelection
* @optional
*/
children?:NodeSelection[];
/**
* @property parent
* @type NodeSelection
* @optional
*/
parent?: NodeSelection;
/**
* @method isFolder
* @return {boolean}
*/
isFolder?: () => boolean;

/**
* @method get
* @param {String} key
* @return {NodeSelection}
*/
get(key:string): NodeSelection;

/**
* @method ancestorHasType
* @param {String} typeName
* @return {Boolean}
*/
ancestorHasType(typeName:string): boolean;
/**
* @method ancestorHasEntry
* @param key
* @param value
* @return {Boolean}
*/
ancestorHasEntry(key:string, value): boolean;
}

/**
* @class Folder
* @uses NodeSelection
*/
export class Folder implements NodeSelection {
constructor(public title:string) {
Expand Down
14 changes: 14 additions & 0 deletions hawtio-web/src/main/webapp/app/core/js/login.ts
Expand Up @@ -6,6 +6,20 @@ module Core {
export var username: string = null;
export var password: string = null;

/**
* Controller that handles the login page and actually logging in
*
* @method LoginController
* @for Core
* @static
* @param $scope
* @param jolokia
* @param userDetails
* @param jolokiaUrl
* @param workspace
* @param localStorage
* @param branding
*/
export function LoginController($scope, jolokia, userDetails, jolokiaUrl, workspace, localStorage, branding) {
jolokia.stop();

Expand Down
8 changes: 8 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/autoColumns.ts
@@ -1,5 +1,13 @@
/**
* @module UI
*/
module UI {

/**
* Directive class that organizes child elements into columns automatically
*
* @class AutoColumns
*/
export class AutoColumns {
public restrict = 'A';

Expand Down
10 changes: 9 additions & 1 deletion hawtio-web/src/main/webapp/app/ui/js/autoDropDown.ts
@@ -1,6 +1,14 @@
/**
* @module UI
*/
module UI {

// expand the element to accomodate a group of elements to prevent them from wrapping
/**
* TODO turn this into a normal directive function
*
* @property AutoDropDown
* @type IAutoDropDown
*/
export var AutoDropDown = {
restrict: 'A',
link: ($scope, $element, $attrs) => {
Expand Down
27 changes: 24 additions & 3 deletions hawtio-web/src/main/webapp/app/ui/js/colorPickerDirective.ts
@@ -1,13 +1,34 @@
/**
* @module UI
*/
module UI {

export var selected = "selected";
export var unselected = "unselected";

export var selected:string = "selected";
export var unselected:string = "unselected";

/**
* Pre defined colors used in the color picker
* @property colors
* @for UI
* @type Array
*/
export var colors = ["#5484ED", "#A4BDFC", "#46D6DB", "#7AE7BF",
"#51B749", "#FBD75B", "#FFB878", "#FF887C", "#DC2127",
"#DBADFF", "#E1E1E1"];

/**
Directive that allows the user to pick a color from a pre-defined pallete of colors.
Use it like:
```html
<div hawtio-color-picker="myModel"></div>
```
'myModel' will be bound to the color the user clicks on
@class ColorPicker
*/
export class ColorPicker {
public restrict = 'A';
public replace = true;
Expand Down
71 changes: 70 additions & 1 deletion hawtio-web/src/main/webapp/app/ui/js/confirmDialogDirective.ts
@@ -1,12 +1,81 @@
/**
* @module UI
*/
module UI {

/**
* Configuration object for the ConfirmDialog directive
* @class ConfirmDialogConfig
*/
export interface ConfirmDialogConfig {
/**
* Model used to open/close the dialog
*
* @property hawtioConfirmDialog
* @type String
*/
show: string;
/**
* Sets the title of the dialog
*
* @property title
* @type String
*/
title: string;
/**
* Sets the text used on the dialogs "OK" button
*
* @property okButtonText
* @type String
*/
okButtonText: string;
/**
* Sets the text used on the dialog's "Cancel" button
*
* @property cancelButtonText
* @type String
*/
cancelButtonText: string;
/**
* callback function that's called when the dialog has been cancelled
*
* @property onCancel
* @type String
*/
onCancel: string;
/**
* Callback function that's called when the user has clicked "OK"
*
* @property onOk
* @type String
*/
onOk: string;
/**
* Callback function when the dialog has been closed either way
*
* @property onClose
* @type String
*/
onClose: string;
}

/**
* Directive that opens a simple standard confirmation dialog. See ConfigDialogConfig
* for configuration properties
*
* @class ConfirmDialog
*/
export class ConfirmDialog {
public restrict = 'A';
public replace = true;
public transclude = true;
public templateUrl = UI.templatePath + 'confirmDialog.html';

public scope = {
/**
* @property scope
* @type ConfirmDialogConfig
*/
public scope:ConfirmDialogConfig = {
show: '=hawtioConfirmDialog',
title: '@',
okButtonText: '@',
Expand Down
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export class EditableProperty {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/editorDirective.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export function Editor($parse) {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/expandableDirective.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export class Expandable {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/fileUpload.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export var fileUploadMBean = "io.hawt.jmx:type=UploadManager";
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/gridster.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export class GridsterDirective {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/jsPlumbDirective.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export class JSPlumb {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/panels.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export class MessagePanel {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/row.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

// expand the element to accomodate a group of elements to prevent them from wrapping
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/slideoutDirective.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export class SlideOut {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/tablePager.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export class TablePager {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/templatePopover.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {


Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/testController.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export function UITestController2($scope, workspace, $templateCache) {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/toc.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export function HawtioTocDisplay(marked, $location, $anchorScroll) {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/uiHelpers.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export var log:Logging.Logger = Logger.get("UI");
Expand Down
7 changes: 7 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/uiPlugin.ts
@@ -1,3 +1,10 @@
/**
* Module that contains a bunch of re-usable directives to assemble into pages in hawtio
*
* @module UI
* @main UI
*
*/
module UI {

export var pluginName = 'hawtio-ui';
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/viewport.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export class ViewportHeight {
Expand Down
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/ui/js/zeroclipboard.ts
@@ -1,3 +1,6 @@
/**
* @module UI
*/
module UI {

export function ZeroClipboardDirective($parse) {
Expand Down

0 comments on commit be589a5

Please sign in to comment.