Skip to content

Commit

Permalink
saving progress. bug fix. got UI building separate from the client. n…
Browse files Browse the repository at this point in the history
…eed to work out kinks. #87
  • Loading branch information
Henry Rapley committed Sep 28, 2013
1 parent 0248558 commit 697677a
Show file tree
Hide file tree
Showing 8 changed files with 256 additions and 116 deletions.
39 changes: 37 additions & 2 deletions dist/chatterbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,35 @@ Chatterbox.STATE = 'beta';

Chatterbox._gum = function( ) {};


// jQuery hook.

( function( $ ) {
$.fn.chatterbox = function( method, client, options ) {

var ui = $(window).data('chatterbox');

if( method == 'init' || ui === undefined ) {
if( ui == undefined ) {
ui = new Chatterbox.UI( $(this), client, options, ($.browser.mozilla || false) );
$(window).resize(ui.resize);
}
$(window).data('chatterbox', ui);
}

if( method != 'init' && method != undefined ) {
method = 'jq_' + method;
if( method in ui )
ui[method]( $(this), options);
}

return ui;

};

} )( jQuery );


/**
* This object is the platform for the wsc UI. Everything can be used and
* loaded from here.
Expand All @@ -22,7 +51,7 @@ Chatterbox._gum = function( ) {};
* @param mozilla {Boolean} Is the browser in use made by Mozilla?
* @param [events] {Object} EventEmitter object.
**/
Chatterbox.UI = function( client, view, options, mozilla, events ) {
Chatterbox.UI = function( view, client, options, mozilla, events ) {

this.client = client;
this.events = events || new EventEmitter();
Expand Down Expand Up @@ -4046,7 +4075,11 @@ Chatterbox.Popup.ItemPicker.Page.prototype.hide = function( ) {


/**
* Parser for dAmn-like protocols.
* Rendering for dAmn-like protocols.
*
* This object is mainly used for constructing LogMessage objects with the
* right data. Seemed to make more sense than having multiple definitions of
* LogMessage and/or if...else/switch...case blocks.
*
* @class Chatterbox.Protocol
* @constructor
Expand Down Expand Up @@ -4267,6 +4300,8 @@ Chatterbox.Protocol.prototype.log = function( event ) {
*/
Chatterbox.Protocol.LogMessage = function( event, options ) {

options = options || {};

this.event = event;
this.template = options.template || '';
this.keys = options.keys || [];
Expand Down
28 changes: 14 additions & 14 deletions dist/chatterbox.min.js

Large diffs are not rendered by default.

39 changes: 37 additions & 2 deletions dist/wsc.dAmn.js
Original file line number Diff line number Diff line change
Expand Up @@ -4196,6 +4196,35 @@ Chatterbox.STATE = 'beta';

Chatterbox._gum = function( ) {};


// jQuery hook.

( function( $ ) {
$.fn.chatterbox = function( method, client, options ) {

var ui = $(window).data('chatterbox');

if( method == 'init' || ui === undefined ) {
if( ui == undefined ) {
ui = new Chatterbox.UI( $(this), client, options, ($.browser.mozilla || false) );
$(window).resize(ui.resize);
}
$(window).data('chatterbox', ui);
}

if( method != 'init' && method != undefined ) {
method = 'jq_' + method;
if( method in ui )
ui[method]( $(this), options);
}

return ui;

};

} )( jQuery );


/**
* This object is the platform for the wsc UI. Everything can be used and
* loaded from here.
Expand All @@ -4208,7 +4237,7 @@ Chatterbox._gum = function( ) {};
* @param mozilla {Boolean} Is the browser in use made by Mozilla?
* @param [events] {Object} EventEmitter object.
**/
Chatterbox.UI = function( client, view, options, mozilla, events ) {
Chatterbox.UI = function( view, client, options, mozilla, events ) {

this.client = client;
this.events = events || new EventEmitter();
Expand Down Expand Up @@ -8232,7 +8261,11 @@ Chatterbox.Popup.ItemPicker.Page.prototype.hide = function( ) {


/**
* Parser for dAmn-like protocols.
* Rendering for dAmn-like protocols.
*
* This object is mainly used for constructing LogMessage objects with the
* right data. Seemed to make more sense than having multiple definitions of
* LogMessage and/or if...else/switch...case blocks.
*
* @class Chatterbox.Protocol
* @constructor
Expand Down Expand Up @@ -8453,6 +8486,8 @@ Chatterbox.Protocol.prototype.log = function( event ) {
*/
Chatterbox.Protocol.LogMessage = function( event, options ) {

options = options || {};

this.event = event;
this.template = options.template || '';
this.keys = options.keys || [];
Expand Down
94 changes: 47 additions & 47 deletions dist/wsc.dAmn.min.js

Large diffs are not rendered by default.

39 changes: 37 additions & 2 deletions dist/wsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4196,6 +4196,35 @@ Chatterbox.STATE = 'beta';

Chatterbox._gum = function( ) {};


// jQuery hook.

( function( $ ) {
$.fn.chatterbox = function( method, client, options ) {

var ui = $(window).data('chatterbox');

if( method == 'init' || ui === undefined ) {
if( ui == undefined ) {
ui = new Chatterbox.UI( $(this), client, options, ($.browser.mozilla || false) );
$(window).resize(ui.resize);
}
$(window).data('chatterbox', ui);
}

if( method != 'init' && method != undefined ) {
method = 'jq_' + method;
if( method in ui )
ui[method]( $(this), options);
}

return ui;

};

} )( jQuery );


/**
* This object is the platform for the wsc UI. Everything can be used and
* loaded from here.
Expand All @@ -4208,7 +4237,7 @@ Chatterbox._gum = function( ) {};
* @param mozilla {Boolean} Is the browser in use made by Mozilla?
* @param [events] {Object} EventEmitter object.
**/
Chatterbox.UI = function( client, view, options, mozilla, events ) {
Chatterbox.UI = function( view, client, options, mozilla, events ) {

this.client = client;
this.events = events || new EventEmitter();
Expand Down Expand Up @@ -8232,7 +8261,11 @@ Chatterbox.Popup.ItemPicker.Page.prototype.hide = function( ) {


/**
* Parser for dAmn-like protocols.
* Rendering for dAmn-like protocols.
*
* This object is mainly used for constructing LogMessage objects with the
* right data. Seemed to make more sense than having multiple definitions of
* LogMessage and/or if...else/switch...case blocks.
*
* @class Chatterbox.Protocol
* @constructor
Expand Down Expand Up @@ -8453,6 +8486,8 @@ Chatterbox.Protocol.prototype.log = function( event ) {
*/
Chatterbox.Protocol.LogMessage = function( event, options ) {

options = options || {};

this.event = event;
this.template = options.template || '';
this.keys = options.keys || [];
Expand Down
Loading

0 comments on commit 697677a

Please sign in to comment.