From f4d69a63702b436674ce9bd7efe9b99d67e671f7 Mon Sep 17 00:00:00 2001 From: Darren Date: Tue, 15 Jul 2014 15:03:35 +0100 Subject: [PATCH] Control input placeholder text --- client/src/models/application.js | 2 +- client/src/translations/en-gb.po | 4 ++++ client/src/views/controlbox.js | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/src/models/application.js b/client/src/models/application.js index 12787b1..7b4f971 100644 --- a/client/src/models/application.js +++ b/client/src/models/application.js @@ -87,7 +87,7 @@ /** * Set the UI components up */ - this.controlbox = new _kiwi.view.ControlBox({el: $('#kiwi .controlbox')[0]}); + this.controlbox = (new _kiwi.view.ControlBox({el: $('#kiwi .controlbox')[0]})).render(); this.client_ui_commands = new _kiwi.misc.ClientUiCommands(this, this.controlbox); this.rightbar = new _kiwi.view.RightBar({el: this.view.$('.right_bar')[0]}); diff --git a/client/src/translations/en-gb.po b/client/src/translations/en-gb.po index ec9681e..6f66587 100755 --- a/client/src/translations/en-gb.po +++ b/client/src/translations/en-gb.po @@ -16,6 +16,10 @@ msgstr "" "Project-Id-Version: Kiwi\n" "Language: en\n" +#: +msgid "client_views_controlbox_message" +msgstr "Send message..." + #: client/assets/src/applets/chanlist.js msgid "client_applets_chanlist_channelname" msgstr "Channel Name" diff --git a/client/src/views/controlbox.js b/client/src/views/controlbox.js index 6a71bde..7808c10 100644 --- a/client/src/views/controlbox.js +++ b/client/src/views/controlbox.js @@ -38,6 +38,13 @@ _kiwi.view.ControlBox = Backbone.View.extend({ }); }, + render: function() { + var send_message_text = translateText('client_views_controlbox_message'); + this.$('.inp').attr('placeholder', send_message_text); + + return this; + }, + showNickChange: function (ev) { // Nick box already open? Don't do it again if (this.nick_change) -- 2.25.1