Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nabcos committed Apr 15, 2013
1 parent 979a64f commit fae2db6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
Expand Up @@ -22,7 +22,7 @@
/**
* UI contribution for the timeline plugin.
*
* @since 2.4
* @since 2.5
*/
@Named
@Singleton
Expand Down
Expand Up @@ -12,9 +12,11 @@
*/
// must pass in feedUrl that's local to our domain
// config: feedUrl required
/*global define*/
/*global NX, Ext*/
/**
* FIXME This belongs to the timeline plugin and should be moved there.
* The main view for all feeds.
*
* @since 2.5
*/
NX.define('Nexus.timeline.FeedGrid', {
extend : 'Ext.grid.GridPanel',
Expand Down Expand Up @@ -111,12 +113,18 @@ NX.define('Nexus.timeline.FeedGrid', {
this.reloadFeed();
},

/**
* Reload the feed store.
*/
reloadFeed : function() {
if (this.feedUrl) {
this.store.reload();
}
},

/**
* @private
*/
togglePreview : function(show) {
this.view.showPreview = show;
this.view.refresh();
Expand All @@ -132,7 +140,15 @@ NX.define('Nexus.timeline.FeedGrid', {
return 'x-grid3-row-collapsed';
},

formatDate : function(value, p, record, rowIndex, colIndex, store) {
/**
* Date formatter that prefers "Today" or a day name over a real date.
*
* @private
*
* @param value The time to format.
* @returns {String} The formatted date.
*/
formatDate : function(value) {
if (!value) {
return '';
}
Expand All @@ -155,7 +171,17 @@ NX.define('Nexus.timeline.FeedGrid', {
return value.dateFormat('n/j g:i a');
},

formatTitle : function(value, p, record, rowIndex, colIndex, store) {
/**
* Converts a record to HTML.
*
* @private
*
* @param value The title of the entry.
* @param p
* @param record The record of the entry. Used to add a link and author description.
* @returns {String} HTML-formatted feed entry title.
*/
formatTitle : function(value, p, record) {
return String.format('<div class="topic"><b><a href="{1}" target="_blank">{0}</a></b><span class="author">{2}</span></div>',
value, record.data.link, record.data.author);
}
Expand Down
Expand Up @@ -13,7 +13,9 @@

/*global NX,Nexus,Ext,Sonatype*/
/**
* FIXME This belongs to the timeline plugin and should be moved there.
* Inner view on selecting one feed.
*
* @since 2.5
*/
NX.define('Nexus.timeline.FeedView', {
extend : 'Ext.Panel',
Expand Down

0 comments on commit fae2db6

Please sign in to comment.