Loading template/app/controller/Auth.js +15 −2 Original line number Diff line number Diff line Loading @@ -175,10 +175,23 @@ Ext.define('Docs.controller.Auth', { return Boolean(this.sid); }, /** * Sets the session ID. * @param {String} sid The session ID * @param {Object} opts (optional) * @param {Boolean} opts.remember 'Remember me' flag is set */ setSid: function(sid, opts) { this.sid = sid; if (sid && opts && opts.remember) { Ext.util.Cookies.set('sid', sid); if (sid) { var expires = null; if (opts && opts.remember) { expires = new Date(); expires.setTime(expires.getTime() + (60 * 60 * 24 * 30 * 1000)); // 30 days } Ext.util.Cookies.set('sid', sid, expires); } else { Ext.util.Cookies.clear('sid'); } Loading template/app/controller/Comments.js +4 −2 Original line number Diff line number Diff line Loading @@ -198,10 +198,10 @@ Ext.define('Docs.controller.Comments', { postButton.removeCls('disabled'); this.toggleNewComment(null, el); this.lastCommentPost = Math.ceil(Number(new Date()) / 1000); if (data.action == 'comment') { if (data.success && data.id) { this.fetchComments(id, this.appendNewComment, {id: data.id}); } else { Ext.Msg.alert('Thank you', 'Thank you for your feedback.'); Ext.Msg.alert('Error', data.reason || "There was an error submitting your request"); } } }, Loading Loading @@ -272,6 +272,8 @@ Ext.define('Docs.controller.Comments', { this.fireEvent('remove', cls); } Ext.get(id).remove(); } else { Ext.Msg.alert('Error', data.reason || "There was an error submitting your request"); } }, scope: this Loading Loading
template/app/controller/Auth.js +15 −2 Original line number Diff line number Diff line Loading @@ -175,10 +175,23 @@ Ext.define('Docs.controller.Auth', { return Boolean(this.sid); }, /** * Sets the session ID. * @param {String} sid The session ID * @param {Object} opts (optional) * @param {Boolean} opts.remember 'Remember me' flag is set */ setSid: function(sid, opts) { this.sid = sid; if (sid && opts && opts.remember) { Ext.util.Cookies.set('sid', sid); if (sid) { var expires = null; if (opts && opts.remember) { expires = new Date(); expires.setTime(expires.getTime() + (60 * 60 * 24 * 30 * 1000)); // 30 days } Ext.util.Cookies.set('sid', sid, expires); } else { Ext.util.Cookies.clear('sid'); } Loading
template/app/controller/Comments.js +4 −2 Original line number Diff line number Diff line Loading @@ -198,10 +198,10 @@ Ext.define('Docs.controller.Comments', { postButton.removeCls('disabled'); this.toggleNewComment(null, el); this.lastCommentPost = Math.ceil(Number(new Date()) / 1000); if (data.action == 'comment') { if (data.success && data.id) { this.fetchComments(id, this.appendNewComment, {id: data.id}); } else { Ext.Msg.alert('Thank you', 'Thank you for your feedback.'); Ext.Msg.alert('Error', data.reason || "There was an error submitting your request"); } } }, Loading Loading @@ -272,6 +272,8 @@ Ext.define('Docs.controller.Comments', { this.fireEvent('remove', cls); } Ext.get(id).remove(); } else { Ext.Msg.alert('Error', data.reason || "There was an error submitting your request"); } }, scope: this Loading