Skip to content

Instantly share code, notes, and snippets.

@craigtaub
Created February 6, 2014 16:58
Show Gist options
  • Save craigtaub/8848226 to your computer and use it in GitHub Desktop.
Save craigtaub/8848226 to your computer and use it in GitHub Desktop.
<~method domReadyInit>
require([
'iplayer/controllers/DrawerManager',
'iplayer/controllers/OverlayManager',
'iplayer/controllers/UserRecommendations',
'iplayer/controllers/FriendsActivity',
'iplayer/controllers/RadioUpsell',
'iplayer/controllers/IstatsLinkTracking',
'iplayer/controllers/Arialandmarks',
'iplayer/controllers/Preview'
], function(DrawerManager, OverlayManager, UserRecommendations, FriendsActivity, RadioUpsell, IstatsLinkTracking, AriaLandmarks, Preview) {
iplayer.managers = {
drawerManager: new DrawerManager('#drawer-container')
};
// we need to make sure that the user and friends drawer exist
// TODO: GR - WE NEED TO GET AWAY FROM THIS WEEK DEPENDENCY (SEE IPLAYER.MANAGERS ...)JK
// These draws have been disabled for now
// if (glow.dom.get('#drawer-4').length) {
// new UserRecommendations();
// new FriendsActivity();
//}
new OverlayManager('#drawer-container');
<?php if($this->radioUpsell): ?>
new RadioUpsell('#radio-upsell');
<?php endif ?>
new IstatsLinkTracking("HOMEPAGE");
new AriaLandmarks("HOMEPAGE");
});
</~method>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment