INNER CODE UNIT · JavaScript
loadAssetsView
adaptlearning/adapt_authoring · frontend/src/modules/assetManagement/index.js:35
function loadAssetsView() {
(new TagsCollection()).fetch({
success: function(tagsCollection) {
// Load asset collection before so sidebarView has access to it
var assetCollection = new AssetCollection();
// No need to fetch as the collectionView takes care of this
// Mainly due to serverside filtering
Origin.trigger('location:title:hide');
Origin.sidebar.addView(new AssetManagementSidebarView({ collection: tagsCollection }).$el);
Origin.contentPane.setView(AssetManagementView, { collection: assetCollection });
Origin.trigger('assetManagement:loaded');
},
error: function() {
console.log('Error occured getting the tags collection - try refreshing your page');
}
});
}