Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Commit

Permalink
More css tweaking to get IE9 compatibility. Fixes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
rickihastings committed Mar 5, 2014
1 parent 434e207 commit 667c238
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 78 deletions.
33 changes: 0 additions & 33 deletions client/css/ie.css

This file was deleted.

11 changes: 8 additions & 3 deletions client/js/controllers/messages.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,16 @@ App.MessagesController = Ember.ArrayController.extend({
}),

filtered: function() {
var tab = this.get('socket.tabs').findBy('selected', true),
events = this.get('content'),
var tab = this.get('socket.tabs').findBy('selected', true);

if (!tab) {
return Ember.A();
}

var events = this.get('content'),
limit = (tab) ? tab.get('messageLimit', 50) : 50,
slice = events.length - limit;
slice = (slice < 0 || tab.requestedBacklog) ? 0 : slice;
slice = (slice < 0 || tab.get('requestedBacklog')) ? 0 : slice;

var proxy = Ember.ArrayProxy.createWithMixins(Ember.SortableMixin, {
content: events,
Expand Down
3 changes: 2 additions & 1 deletion client/js/views/titlebar.view.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
App.TitlebarView = Ember.View.extend({
templateName: 'titlebar',
classNames: 'topbar clear',
tagName: 'table',
classNames: 'topbar',

didInsertElement: function() {
Ember.$(document).on('click', this.documentClick.bind(this));
Expand Down
19 changes: 9 additions & 10 deletions client/less/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ div.container {
}

.topbar {
display: inline-block;
width: 100%;
z-index: 6000;
font-size: 13px;
background: @topbar-bg;
.flex;
border-spacing: 0;
border-collapse: separate;
.padding-margin;

td {
padding: 0;
}

&.main {
position: fixed;

Expand Down Expand Up @@ -48,16 +52,12 @@ div.container {
}

.topic-wrap {
display: inline-block;
padding: 9px;
padding: 7px 9px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 15px;
height: 20px;
color: @topbar-link;
display: inline;
line-height: 150%;
.setflex(1);
line-height: 170%;

.chan-title,
.chan-modes {
Expand Down Expand Up @@ -113,7 +113,6 @@ div.container {

#options-menu {
z-index: 6020;
width: 160px;
list-style-type: none;
text-align: right;
.padding-margin;
Expand Down
11 changes: 7 additions & 4 deletions client/less/tabs.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@
padding: 0;
overflow-y: auto;
overflow-x: hidden;
position: relative;
height: 100%;
width: 100%;
.setflex(1);
width: auto;
height: auto;
position: absolute;
top: 0;
left: 0;
right: 172px;
bottom: 0;

.overlay-bar {
z-index: 20;
Expand Down
4 changes: 4 additions & 0 deletions client/less/userlist.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
overflow-y: auto;
overflow-x: hidden;
margin-top: 3px;
position: absolute;
top: 0;
bottom: 0;
right: 0;

div.members-title {
padding: 10px;
Expand Down
3 changes: 0 additions & 3 deletions client/templates/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
<script src="/build/ircanywhere.js"></script>

<link rel="stylesheet" type="text/css" href="/build/ircanywhere.css" />
<!--[if lte IE 9]>
<link rel="stylesheet" type="text/css" href="/css/ie.css" />
<![endif]-->
</head>
<body>
<script type="text/x-handlebars">
Expand Down
56 changes: 33 additions & 23 deletions client/templates/titlebar.hbs
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
<div class="topic-wrap">
<span class="chan-title">{{tab.title}}</span>
<span class="chan-modes">{{tab.modes}}</span>
<span class="chan-desc">{{ircParse tab.desc tab.networkId}}</span>
</div>
<ul id="options-menu">
<li class="dropdown"><a href="#" {{action toggleProperty "showMenu"}} class="dropdown-toggle">Options</a>
{{#if showMenu}}
<ul class="dropdown-menu">
{{#if tab.isChannel}}
<li><a href="#" {{action setTopic}}>Set Topic</a></li>
<li class="divider"></li>
<li><a href="#" {{action toggleUsers}}>{{toggleUsersText}}</a></li>
<li><a href="#" {{action toggleEvents}}>{{toggleEventsText}}</a></li>
<li class="divider"></li>
<li><a href="#" {{action toggleCycle}}>{{channelLink}}</a></li>
<tr>
<td>
<div class="topic-wrap">
<span class="chan-title">{{tab.title}}</span>
<span class="chan-modes">{{tab.modes}}</span>
<span class="chan-desc">{{ircParse tab.desc tab.networkId}}</span>
</div>
</td>
<td>
<ul id="options-menu">
<li class="dropdown"><a href="#" {{action toggleProperty "showMenu"}} class="dropdown-toggle">Options</a>
{{#if showMenu}}
<ul class="dropdown-menu">
{{#if tab.isChannel}}
<li><a href="#" {{action setTopic}}>Set Topic</a></li>
<li class="divider"></li>
<li><a href="#" {{action toggleUsers}}>{{toggleUsersText}}</a></li>
<li><a href="#" {{action toggleEvents}}>{{toggleEventsText}}</a></li>
<li class="divider"></li>
<li><a href="#" {{action toggleCycle}}>{{channelLink}}</a></li>
{{/if}}
<li><a href="#" {{action toggleConnect}}>{{connectionLink}}</a></li>
</ul>
{{/if}}
<li><a href="#" {{action toggleConnect}}>{{connectionLink}}</a></li>
</ul>
{{/if}}
</li>
<li><a href="#" {{action closeWindow}}>Close</a></li>
</ul>
<div class="topbar inner"></div>
</li>
<li><a href="#" {{action closeWindow}}>Close</a></li>
</ul>
</td>
</tr>
<tr>
<td colspan="2">
<div class="topbar inner"></div>
</td>
</tr>
4 changes: 4 additions & 0 deletions server/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,10 @@ CommandManager.prototype.close = function(user, client, target, params) {
var tab = application.Tabs.sync.findOne({target: target, network: client._id});
// get the tab in question

if (!tab) {
return false;
}

if (tab.type === 'channel') {
if (tab.active) {
ircFactory.send(client._id, 'part', [target]);
Expand Down
2 changes: 1 addition & 1 deletion server/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ EventManager.prototype._insert = function(client, message, type, user, force) {
}
};

application.Events.sync.insert(output);
application.Events.sync.insert(output, {safe: false});
// get the prefix, construct an output and insert it
});
}
Expand Down

0 comments on commit 667c238

Please sign in to comment.