~juju-gui/juju-gui/trunk

« back to all changes in this revision

Viewing changes to app/assets/javascripts/d3-components.js

  • Committer: Benjamin Saller
  • Author(s): Benjamin Saller
  • Date: 2013-01-24 14:22:53 UTC
  • mfrom: (340.1.4 phantom-testing)
  • Revision ID: bcsaller@gmail.com-20130124142253-7iy334tw9shdvs8x
PhantomJS Testing support

Change test server to use phantomjs. To get this branch working you'll need

sudo npm install -g phantomjs
sudo npm install -g mocha-phantomjs

After that make test-debug and test-prod should work with CLI exit codes
and .lbox.check should run the tests as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
      }
159
159
 
160
160
      if (!result.callback) {
161
 
        console.error('No Event handler for', selector, module.name);
 
161
        //console.error('No Event handler for', selector, module.name);
162
162
        return;
163
163
      }
164
164
      if (!L.isFunction(result.callback)) {
253
253
                // (re)Register the event to bubble.
254
254
                self.publish(name, {emitFacade: true});
255
255
              }
256
 
              console.debug('yui event binding', module.name, eventPhase, name);
257
256
              subscriptions.push(
258
257
                  target[eventPhase](
259
258
                  name, callback, handler.context));
317
316
          adapter = function() {
318
317
            var selection = d3.select(this),
319
318
                d = selection.data()[0];
320
 
            console.debug('D3 Handler for', selector, trigger);
 
319
            //console.debug('D3 Handler for', selector, trigger);
321
320
            return handler.callback.call(this, d, handler.context);
322
321
          };
323
322
          d3.selectAll(selector).on(trigger, adapter);
495
494
    all: function(methodName) {
496
495
      Y.each(this.modules, function(mod, name) {
497
496
        if (methodName in mod) {
498
 
          console.log('Component', methodName, 'on', name);
 
497
          //console.log('Component', methodName, 'on', name);
499
498
          mod[methodName]();
500
499
        }
501
500
      });