SystemNoticeButton.js (726B)
1 Ext.define('PartKeepr.SystemNoticeButton', { 2 extend: 'PartKeepr.FadingButton', 3 iconCls: 'fugue-icon service-bell', 4 tooltip: i18n("Unacknowledged System Notices"), 5 6 /** 7 * Initializes the component. Adds the start/stop and click fading handlers. 8 * 9 * @param none 10 * @return nothing 11 */ 12 initComponent: function () { 13 this.callParent(); 14 15 this.on("show", this.startFading, this); 16 this.on("hide", this.stopFading, this); 17 this.on("click", this.onClick, this); 18 }, 19 /** 20 * Open the system notices when clicked. 21 * 22 * @param none 23 * @return nothing 24 */ 25 onClick: function () { 26 PartKeepr.getApplication().openAppItem("PartKeepr.SystemNoticeEditorComponent"); 27 } 28 });