Skip to content

Loading…

Reall goof'd this one up #158

Merged
merged 2 commits into from

2 participants

@marcoceppi

I messed up and didn't commit this last bit in. As a result web interface is borken :\

@thedjpetersen thedjpetersen merged commit e7a01e2 into thedjpetersen:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 15, 2012
  1. @marcoceppi

    Reall goof'd this one up

    marcoceppi committed
  2. @marcoceppi
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 10 deletions.
  1. +15 −9 assets/js/client.js
  2. +2 −1 assets/js/collections.js
View
24 assets/js/client.js
@@ -19,7 +19,7 @@ window.irc = {
};
window.unity = {
- api: external.getUnityObject(1.0),
+ api: null,
connected: false
};
@@ -27,14 +27,20 @@ $(function() {
// window.app = new ChatApplicationRouter;
irc.appView = new ChatApplicationView();
-
- window.unity.init({
- name: "Subay IRC",
- iconUrl: window.location.protocol+"//"+window.location.host+"/assets/images/subway.png",
- onInit: function() {
- window.unity.connected = true;
- }
- });
+ try {
+ window.unity.api = external.getUnityObject(1.0);
+ window.unity.init({
+ name: "Subay IRC",
+ iconUrl: window.location.protocol+"//"+window.location.host+"/assets/images/subway.png",
+ onInit: function() {
+ window.unity.connected = true;
+ console.log('Unity support enabled');
+ }
+ });
+ } catch(e) {
+ window.unity.api = null;
+ console.log('Unity support not available');
+ }
// EVENTS //
View
3 assets/js/collections.js
@@ -67,7 +67,7 @@ var WindowList = Backbone.Collection.extend({
}, 0);
return count;
- }
+ },
unreadByChannel: function() {
var channels = this.byType('channel');
@@ -83,6 +83,7 @@ var WindowList = Backbone.Collection.extend({
});
return windowCounts;
+ }
});
var UserList = Backbone.Collection.extend({
Something went wrong with that request. Please try again.