Created
October 22, 2012 09:01
-
-
Save luishdez/3930474 to your computer and use it in GitHub Desktop.
testdoc.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // GOOD | |
| DashboardTab.prototype = { | |
| /** | |
| * @type {DashboardTab} The tab object | |
| */ | |
| constructor: DashboardTab, | |
| /** | |
| * @type {DashboardTab} The tab object | |
| */ | |
| parentObj: null, | |
| // BAD | |
| DashboardTab.prototype = { | |
| /** | |
| * the nav-tabs object | |
| * @type {DashboardTabs} | |
| */ | |
| constructor: DashboardTabs, | |
| /** | |
| * the tab with the focus in | |
| * @type {?DashboardTab} | |
| */ | |
| tabFocused: null, | |
| /** | |
| * the number maximum of tabs in nav | |
| * @type {Number} | |
| */ | |
| maxTabs: 5, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Set a title in the tab | |
| * | |
| * ### Examples: | |
| * | |
| * ```javascript | |
| * $('.tab:first').dashboardTab('setTitle', 'Menu'); | |
| * ``` | |
| * | |
| * - Remove the focus on all users, and set the focus in the first user. | |
| * - Other element on the list | |
| * | |
| * @method {setTitle} | |
| * @this {dashboardTab} | |
| * @param {string} title - The title of the tab | |
| * | |
| * @return {void} | |
| */ | |
| setTitle: function (title) { | |
| this.element.find('a').text(title); | |
| }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment