Skip to content

Commit

Permalink
docs(various): added some more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Lamping committed Apr 4, 2014
1 parent be97e63 commit 900c165
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 15 deletions.
51 changes: 42 additions & 9 deletions src/rxNotify/rxNotify.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
/*jshint undef:false*/
angular.module('encore.ui.rxNotify', ['ngSanitize'])
/*
* Display a static message with styling taken from rx-notifications
* @ngdoc directive
* @example <rx-notification type="warning">This is a message!</rx-notification>
*/
/**
* @ngdoc directive
* @name encore.ui.rxNotify:rxNotification
* @restrict E
* @scope
* @description
* Display a static message with styling taken from rx-notifications
*
* @param {string} type The type of notification (e.g. 'warning', 'error')
*
* @example
* <rx-notification type="warning">This is a message!</rx-notification>
*/
.directive('rxNotification', function () {
return {
scope: {
Expand All @@ -15,11 +22,18 @@ angular.module('encore.ui.rxNotify', ['ngSanitize'])
templateUrl: 'templates/rxNotification.html'
};
})
/*
* Displays all messages in a stack
/**
* @ngdoc directive
* @example <rx-notifications stack="myStack"></rx-notifications>
* @name encore.ui.rxNotify:rxNotifications
* @restrict E
* @scope
* @description
* Displays all messages in a stack
*
* @param {string} [stack] The message stack to associate with
*
* @example
* <rx-notifications stack="myCustomStack"></rx-notifications>
*/
.directive('rxNotifications', function (rxNotify) {
return {
Expand Down Expand Up @@ -52,6 +66,12 @@ angular.module('encore.ui.rxNotify', ['ngSanitize'])
}
};
})
/**
* @ngdoc service
* @name encore.ui.rxNotify:rxNotify
* @description
* Manages page messages for an application
*/
.factory('rxNotify', function ($timeout, $rootScope) {
var defaultStack = 'page';
var stacks = {};
Expand Down Expand Up @@ -243,6 +263,19 @@ angular.module('encore.ui.rxNotify', ['ngSanitize'])
stacks: stacks
};
})
/**
* @ngdoc service
* @name encore.ui.rxNotify:rxPromiseNotifications
* @description
* Manages displaying messages for a promise
*
* @example
* rxPromiseNotifications.add($scope.deferred.promise, {
* loading: 'Loading Message',
* success: 'Success Message',
* error: 'Error Message'
* });
*/
.factory('rxPromiseNotifications', function (rxNotify, $rootScope, $q, $interpolate) {
var scope = $rootScope.$new();

Expand Down
8 changes: 4 additions & 4 deletions src/rxPaginate/rxPaginate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ angular.module('encore.ui.rxPaginate', [])
/**
*
* @ngdoc directive
* @name encore.components.paginate:rxPaginate
* @name encore.ui.rxPaginate:rxPaginate
* @restrict E
* @description
* Directive that takes in the page tracking object and outputs a page
Expand All @@ -27,7 +27,7 @@ angular.module('encore.ui.rxPaginate', [])
/**
*
* @ngdoc service
* @name encore.components.paginate:PageTracking
* @name encore.ui.rxPaginate:PageTracking
* @description
* This is the data service that can be used in conjunction with the pagination
* objects to store/control page display of data tables and other items.
Expand Down Expand Up @@ -77,7 +77,7 @@ angular.module('encore.ui.rxPaginate', [])
/**
*
* @ngdoc filter
* @name encore.components.paginate:Paginate
* @name encore.ui.rxPaginate:Paginate
* @description
* This is the pagination filter that is used to calculate the division in the
* items list for the paging.
Expand Down Expand Up @@ -115,7 +115,7 @@ angular.module('encore.ui.rxPaginate', [])
/**
*
* @ngdoc filter
* @name encore.components.paginate:Page
* @name encore.ui.rxPaginate:Page
* @description
* This is the pagination filter that is used to limit the number of pages
* shown
Expand Down
4 changes: 2 additions & 2 deletions src/rxSortableColumn/rxSortableColumn.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
angular.module('encore.ui.rxSortableColumn', [])
/**
* @ngdoc directive
* @name encore.ui.rxSortableColumn
* @name encore.ui.rxSortableColumn:rxSortableColumn
* @restrict E
*
* @description
Expand Down Expand Up @@ -29,7 +29,7 @@ angular.module('encore.ui.rxSortableColumn', [])
})
/**
* @ngdoc service
* @name encore.ui.rxSortUtil
* @name encore.ui.rxSortableColumn:rxSortUtil
* @description
* Service which provided utility methods for sorting collections.
*
Expand Down

0 comments on commit 900c165

Please sign in to comment.