Create a gist now

Instantly share code, notes, and snippets.

anonymous /module.js
Created Feb 1, 2012

Javascript Large
define(["jquery", "use!underscore", "Aura/facade", "Aura/mediator"],
function ($, _, facade, mediator) {
facade.subscribe('mBlocksSubscriber', 'mobily', function(selector){
$(selector).mobilyblocks();
});
facade.subscribe('BtnsRenderer','renderBtns', function (context, Buttons, SBView) {
_.each( Buttons, function(coll){
$.when(
new SBView({collection: coll, currentID: coll.name}),
coll.fetch()
).then(function(){
mediator.publish('mobily', 'div[id ^="solfg_"]');
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment