MDL-60558 calendar: Remove old SELECTORS
authorAndrew Nicols <andrew@nicols.co.uk>
Thu, 26 Oct 2017 02:07:48 +0000 (10:07 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 2 Nov 2017 03:53:49 +0000 (11:53 +0800)
calendar/amd/build/selectors.min.js
calendar/amd/build/view_manager.min.js
calendar/amd/src/selectors.js
calendar/amd/src/view_manager.js

index 41c6b2e..5bb7643 100644 (file)
Binary files a/calendar/amd/build/selectors.min.js and b/calendar/amd/build/selectors.min.js differ
index 5f66279..d3ad2cd 100644 (file)
Binary files a/calendar/amd/build/view_manager.min.js and b/calendar/amd/build/view_manager.min.js differ
index d74e8a7..d8ead43 100644 (file)
@@ -56,7 +56,11 @@ define([], function() {
         wrapper: '.calendarwrapper',
         eventItem: '[data-type="event"]',
         links: {
+            navLink: '.calendarwrapper .arrow_link',
             eventLink: "[data-region='event-item']",
         },
+        containers: {
+            loadingIcon: '[data-region="overlay-icon-container"]',
+        },
     };
 });
index 7679e43..d46697c 100644 (file)
@@ -45,11 +45,6 @@ define([
     SummaryModal
 ) {
 
-        var SELECTORS = {
-            CALENDAR_NAV_LINK: ".calendarwrapper .arrow_link",
-            LOADING_ICON_CONTAINER: '[data-region="overlay-icon-container"]'
-        };
-
         /**
          * Register event listeners for the module.
          *
@@ -88,7 +83,8 @@ define([
                 }
             });
 
-            root.on('click', SELECTORS.CALENDAR_NAV_LINK, function(e) {
+
+            root.on('click', CalendarSelectors.links.navLink, function(e) {
                 var wrapper = root.find(CalendarSelectors.wrapper);
                 var view = wrapper.data('view');
                 var courseId = wrapper.data('courseid');
@@ -287,7 +283,7 @@ define([
          * @method startLoading
          */
         var startLoading = function(root) {
-            var loadingIconContainer = root.find(SELECTORS.LOADING_ICON_CONTAINER);
+            var loadingIconContainer = root.find(CalendarSelectors.containers.loadingIcon);
 
             loadingIconContainer.removeClass('hidden');
         };
@@ -299,7 +295,7 @@ define([
          * @method stopLoading
          */
         var stopLoading = function(root) {
-            var loadingIconContainer = root.find(SELECTORS.LOADING_ICON_CONTAINER);
+            var loadingIconContainer = root.find(CalendarSelectors.containers.loadingIcon);
 
             loadingIconContainer.addClass('hidden');
         };