MDL-57445 block_myoverview: remove timeline_view_dates.js

Removed the JS for the timeline_view_dates template as it is no longer
required.

Part of MDL-55611 epic.
This commit is contained in:
Ryan Wyllie
2017-04-03 11:35:38 +08:00
committed by Damyon Wiese
parent 1d0cbd7746
commit ed9c238cae
2 changed files with 0 additions and 63 deletions
@@ -1 +0,0 @@
define(["core/custom_interaction_events","block_myoverview/event_list"],function(a,b){var c={VIEW_MORE_BUTTON:'[data-action="view-more"]',EVENT_LIST_CONTAINER:'[data-region="event-list-container"]'},d=function(a){a.each(function(){b.load(this)})};return{init:function(b){var e=b.find(c.EVENT_LIST_CONTAINER);d(e),a.define(b,[a.events.activate]),b.on(a.events.activate,c.VIEW_MORE_BUTTON,function(){d(e)})}}});
@@ -1,62 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Enhance the timeline view dates templates to load the calendar events.
*
* @module block_myoverview/timeline_view_dates
* @package block_myoverview
* @copyright 2016 Ryan Wyllie <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['core/custom_interaction_events', 'block_myoverview/event_list'], function(CustomEvents, EventList) {
var SELECTORS = {
VIEW_MORE_BUTTON: '[data-action="view-more"]',
EVENT_LIST_CONTAINER: '[data-region="event-list-container"]',
};
/**
* Trigger the event list loading for the given containers.
*
* @private
* @method loadFromContainers
* @param {array} containers A list of container elements
*/
var loadForContainers = function(containers) {
containers.each(function() {
EventList.load(this);
});
};
return {
/**
* Initialise the javascript on the root element.
*
* @method init
* @param {object} jQuery element
*/
init: function(root) {
var containers = root.find(SELECTORS.EVENT_LIST_CONTAINER);
loadForContainers(containers);
CustomEvents.define(root, [CustomEvents.events.activate]);
root.on(CustomEvents.events.activate, SELECTORS.VIEW_MORE_BUTTON, function() {
loadForContainers(containers);
});
}
};
});