Sindbad~EG File Manager
/**
* Javascript to initialise the Recently accessed items block.
*
* @module block_recentlyaccesseditems/main
* @copyright 2018 Victor Deniz <victor@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("block_recentlyaccesseditems/main",["jquery","block_recentlyaccesseditems/repository","core/templates","core/notification"],(function($,Repository,Templates,Notification){var SELECTORS_CARDDECK_CONTAINER='[data-region="recentlyaccesseditems-view"]',SELECTORS_CARDDECK='[data-region="recentlyaccesseditems-view-content"]';return{init:function(root){var limit,itemsContainer=(root=$(root)).find(SELECTORS_CARDDECK_CONTAINER),itemsContent=root.find(SELECTORS_CARDDECK),itemsPromise=(limit=9,Repository.getRecentItems(limit));itemsPromise.then((function(items){var pageContentPromise=function(root,items){if(items.length>0)return Templates.render("block_recentlyaccesseditems/view-cards",{items:items});var noitemsimgurl=root.attr("data-noitemsimgurl");return Templates.render("block_recentlyaccesseditems/no-items",{noitemsimgurl:noitemsimgurl})}(itemsContainer,items);return pageContentPromise.then((function(html,js){return Templates.replaceNodeContents(itemsContent,html,js)})).catch(Notification.exception),itemsPromise})).catch(Notification.exception)}}}));
//# sourceMappingURL=main.min.js.map
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists