Loading template/app/view/comments/Form.js +14 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ Ext.define('Docs.view.comments.Form', { extend: 'Ext.Component', alias: "widget.commentsForm", requires: ["Docs.Tip"], /** * @cfg {Object} user Loading Loading @@ -209,6 +210,19 @@ Ext.define('Docs.view.comments.Form', { guideText.hide(true); helpLink.update("Show help ↓"); } }, /** * Shows a notification near the checkbox to notify user about the * changes subscription status. * @param {Boolean} subscribed */ showSubscriptionMessage: function(subscribed) { var el = this.getEl().down("input.subscriptionCheckbox"); var msg = subscribed ? "Updates to this thread will be e-mailed to you" : "You have unsubscribed from this thread"; Docs.Tip.show(msg, el, 'bottom'); } }); template/app/view/comments/ListWithForm.js +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ Ext.define('Docs.view.comments.ListWithForm', { subscribe: function(subscribed) { Docs.Comments.subscribe(this.target, subscribed, function() { alert("Subscription changed!"); this.commentingForm.showSubscriptionMessage(subscribed); }, this); } Loading Loading
template/app/view/comments/Form.js +14 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ Ext.define('Docs.view.comments.Form', { extend: 'Ext.Component', alias: "widget.commentsForm", requires: ["Docs.Tip"], /** * @cfg {Object} user Loading Loading @@ -209,6 +210,19 @@ Ext.define('Docs.view.comments.Form', { guideText.hide(true); helpLink.update("Show help ↓"); } }, /** * Shows a notification near the checkbox to notify user about the * changes subscription status. * @param {Boolean} subscribed */ showSubscriptionMessage: function(subscribed) { var el = this.getEl().down("input.subscriptionCheckbox"); var msg = subscribed ? "Updates to this thread will be e-mailed to you" : "You have unsubscribed from this thread"; Docs.Tip.show(msg, el, 'bottom'); } });
template/app/view/comments/ListWithForm.js +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ Ext.define('Docs.view.comments.ListWithForm', { subscribe: function(subscribed) { Docs.Comments.subscribe(this.target, subscribed, function() { alert("Subscription changed!"); this.commentingForm.showSubscriptionMessage(subscribed); }, this); } Loading