/**
* Server selection dialog
*/
-#kiwi .server_select { width:800px; margin:0 auto; overflow:hidden; }
+#kiwi .server_select { width:320px; margin:0 auto; overflow:hidden; }
#kiwi .server_select .more { display: none; }
#kiwi .server_select button { }
#kiwi .server_select input { }
/* The server select dialog */
-#kiwi.theme_relaxed .server_select { width:730px; padding:3em 0 2em 0; margin: 0 auto; }
+#kiwi.theme_relaxed .server_select { padding:3em 0 2em 0; }
#kiwi.theme_relaxed .server_select .more { display: none; width:270px; margin:0 auto; }
#kiwi.theme_relaxed .server_select table tr td { padding:5px; }
#kiwi.theme_relaxed .server_select button { float:right; padding:3px 7px; }
}
-#kiwi.theme_relaxed .server_select .kiwi_logo { text-align: center; display:block; }
-#kiwi.theme_relaxed .server_select .kiwi_logo h1 {
- font-size:20px;
- line-height:48px; vertical-align: middle;
+#kiwi.theme_relaxed .server_select .kiwi_logo { text-align: center; display:block; margin-top:30px; }
+#kiwi.theme_relaxed .server_select .kiwi_logo h1 span {
+ font-size:14px;
+ line-height:24px; vertical-align: middle;
color: #555555;
}
-#kiwi.theme_relaxed .server_select .kiwi_logo img { }
+#kiwi.theme_relaxed .server_select .kiwi_logo img { display:inline; width:24px; }
#kiwi.theme_relaxed.chanlist_treeview #panels { left:160px; }
</div>\r
</form>\r
\r
- <div class="divider-verticle"></div>\r
- </div>\r
-\r
- <div class="about_kiwi" style="position:relative;float:left;width:320px;margin-left:3em;color:#555555;">\r
<a class="kiwi_logo" href="https://kiwiirc.com/" target="_blank">\r
- <img src="<%base_path%>/assets/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" /> <br />\r
- <h1>Powered by Kiwi IRC</h1>\r
+ <h1><span>Powered by Kiwi IRC</span> <img src="/kiwi/assets/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" /></h1>\r
</a>\r
-\r
- <p style="font-style:italic;">A <strong>hand-crafted IRC client</strong> that you can enjoy. Designed to be used <strong>easily</strong> and <strong>freely</strong>.</p>\r
-\r
- <p style="font-size:0.9em;margin-top:2em;">Peek at the <a href="https://kiwiirc.com/">Kiwi IRC homepage</a> for more information or to find out how to embed it on your own website. Looking for source code? Try the <a href="http://github.com/prawnsalad/KiwiIRC/">GitHub</a> page. This network of people may not be associated with Kiwi IRC itself.</p>\r
</div>\r
</div>\r
</script>\r
var connection_dialog = new _kiwi.model.NewConnection();\r
this.populateDefaultServerSettings(connection_dialog);\r
\r
- var m = new _kiwi.view.MenuBox();\r
- m.showFooter(false);\r
- m.closeOnBlur(false);\r
- m.addItem('new_connection', connection_dialog.view.$el);\r
- m.show();\r
-\r
- // Center the connection dialog\r
- m.$el.addClass('first');\r
- m.$el.offset({\r
- left: (this.view.$el.width() / 2) - (m.$el.width() / 2)\r
- });\r
+ connection_dialog.view.$el.addClass('initial');\r
+ this.view.$el.find('.panel_container:first').append(connection_dialog.view.$el);\r
\r
// TODO: Shouldn't really be here but it's not working in the view.. :/\r
// Hack for firefox browers: Focus is not given on this event loop iteration\r
\r
// Once connected, close this dialog and remove its own event\r
var fn = function() {\r
- connection_dialog.view.$el.slideUp('fast', function() {\r
- m.dispose();\r
+ connection_dialog.view.$el.slideUp(function() {\r
+ console.log('disposing connectio dialog');\r
+ connection_dialog.view.dispose();\r
+ connection_dialog = null;\r
+\r
_kiwi.gateway.off('onconnect', fn);\r
});\r
\r
server: _kiwi.app.connections.active_connection.get('connection_id'),\r
data: JSON.stringify(data)\r
};\r
- \r
this.socket.emit('irc', data_buffer, callback);\r
};\r
\r
}\r
\r
return false;\r
- }\r
+ };\r
\r
\r
return new (Backbone.Model.extend(this))(arguments);\r
bindGatewayEvents: function () {
//this.gateway.on('all', function() {console.log('ALL', this.get('connection_id'), arguments);});
- this.gateway.on('connect', function(event) {
- this.set('nick', event.nick);
- }, this);
+ this.gateway.on('connect', onConnect, this);
this.gateway.on('nick', function(event) {
if (event.nick === this.get('nick')) {
+ function onConnect(event) {
+ this.set('nick', event.nick);
+
+ if (this.auto_join && this.auto_join.channel) {
+ this.gateway.join(this.auto_join.channel, this.auto_join.channel_key);
+ }
+ }
+
+
+
function onOptions(event) {
var that = this;
makeConnection: function(new_connection_event) {
var that = this;
+ this.connect_details = new_connection_event;
+
_kiwi.gateway.newConnection({
nick: new_connection_event.nick,
host: new_connection_event.server,
onNewNetwork: function(err, network) {
+ if (network && this.connect_details) {
+ network.auto_join = {
+ channel: this.connect_details.channel,
+ key: this.connect_details.channel_key
+ };
+ }
+
+
// Show the server panel if this is our first network
if (network && network.get('connection_id') === 0) {
network.panels.server.view.show();
_kiwi.gateway.off('onconnect', this.networkConnected, this);\r
_kiwi.gateway.off('connecting', this.networkConnecting, this);\r
_kiwi.gateway.off('onirc_error', this.onIrcError, this);\r
+\r
+ this.$el.remove();\r
},\r
\r
submitForm: function (event) {\r
\r
_kiwi.view.Panel = Backbone.View.extend({\r
tagName: "div",\r
- className: "messages",\r
+ className: "panel messages",\r
+\r
events: {\r
"click .chan": "chanClick",\r
'click .media .open': 'mediaClick',\r
var $this = this.$el;\r
\r
// Hide all other panels and show this one\r
- this.$container.children().css('display', 'none');\r
+ this.$container.children('.panel').css('display', 'none');\r
$this.css('display', 'block');\r
\r
// Show this panels memberlist\r