Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow binding to global events with the "global:" prefix on controlle…

…r event names
  • Loading branch information...
commit 86c93bac3e29291f7bdf2713dfeff7da46ccbc59 1 parent 9be2d77
Pindi Albert authored

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. +4 1 agility.js
5 agility.js
@@ -923,7 +923,10 @@
923 923 // Bind all controllers to their events
924 924 for (var ev in object.controller) {
925 925 if (typeof object.controller[ev] === 'function') {
926   - object.bind(ev, object.controller[ev]);
  926 + if(ev.match(/^global:/))
  927 + $$.document.bind(ev.slice('7'), object.controller[ev]);
  928 + else
  929 + object.bind(ev, object.controller[ev]);
927 930 }
928 931 }
929 932

0 comments on commit 86c93ba

Please sign in to comment.
Something went wrong with that request. Please try again.