From dd630a281eb3086b6ba35a23969cbb54446ba1d7 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 23 Aug 2013 16:07:37 -0700 Subject: [PATCH] Change /info to /chat --- clientapp/app/pages/{info.js => chat.js} | 2 +- clientapp/app/router.js | 6 +++--- clientapp/app/views/contactListItem.js | 6 +++--- clientapp/modules/templates.js | 6 +++--- clientapp/templates/pages/{info.jade => chat.jade} | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) rename clientapp/app/pages/{info.js => chat.js} (96%) rename clientapp/templates/pages/{info.jade => chat.jade} (86%) diff --git a/clientapp/app/pages/info.js b/clientapp/app/pages/chat.js similarity index 96% rename from clientapp/app/pages/info.js rename to clientapp/app/pages/chat.js index 5a5c206..ef9aec4 100644 --- a/clientapp/app/pages/info.js +++ b/clientapp/app/pages/chat.js @@ -7,7 +7,7 @@ var Message = require('views/message'); module.exports = BasePage.extend({ - template: templates.pages.info, + template: templates.pages.chat, initialize: function (spec) { this.render(); }, diff --git a/clientapp/app/router.js b/clientapp/app/router.js index ea29438..b22113e 100644 --- a/clientapp/app/router.js +++ b/clientapp/app/router.js @@ -14,7 +14,7 @@ var Backbone = require('backbone'), module.exports = Backbone.Router.extend({ routes: { '': 'main', - 'info/:jid': 'info' + 'chat/:jid': 'chat' }, // ------- ROUTE HANDLERS --------- main: function () { @@ -23,8 +23,8 @@ module.exports = Backbone.Router.extend({ model: me })); }, - info: function (jid) { - var View = require('pages/info'); + chat: function (jid) { + var View = require('pages/chat'); var contact = me.contacts.get(jid); if (contact) { app.renderPage(new View({ diff --git a/clientapp/app/views/contactListItem.js b/clientapp/app/views/contactListItem.js index 902be26..cc6aed4 100644 --- a/clientapp/app/views/contactListItem.js +++ b/clientapp/app/views/contactListItem.js @@ -20,7 +20,7 @@ module.exports = StrictView.extend({ avatar: '.avatar img' }, events: { - 'click': 'getInfo' + 'click': 'goChat' }, initialize: function (opts) { this.containerEl = opts.containerEl; @@ -34,7 +34,7 @@ module.exports = StrictView.extend({ this.handleBindings(); return this; }, - getInfo: function () { - app.navigate('info/' + this.model.jid); + goChat: function () { + app.navigate('chat/' + this.model.jid); } }); diff --git a/clientapp/modules/templates.js b/clientapp/modules/templates.js index aeff410..3a1e35e 100644 --- a/clientapp/modules/templates.js +++ b/clientapp/modules/templates.js @@ -50,11 +50,11 @@ exports.layout = function anonymous(locals) { return buf.join(""); }; -// info.jade compiled template -exports.pages.info = function anonymous(locals) { +// chat.jade compiled template +exports.pages.chat = function anonymous(locals) { var buf = []; with (locals || {}) { - buf.push('

'); + buf.push('

'); } return buf.join(""); }; diff --git a/clientapp/templates/pages/info.jade b/clientapp/templates/pages/chat.jade similarity index 86% rename from clientapp/templates/pages/info.jade rename to clientapp/templates/pages/chat.jade index 9ab5742..afd64c7 100644 --- a/clientapp/templates/pages/info.jade +++ b/clientapp/templates/pages/chat.jade @@ -1,4 +1,4 @@ -section.page.info +section.page.chat nav#contactList header.contactInfo img.avatar(width=30, height=30)