diff --git a/analytics_dashboard/static/apps/learners/common/collections/learners.js b/analytics_dashboard/static/apps/learners/common/collections/learners.js index 1110b563d..b56c6d3ce 100644 --- a/analytics_dashboard/static/apps/learners/common/collections/learners.js +++ b/analytics_dashboard/static/apps/learners/common/collections/learners.js @@ -1,7 +1,7 @@ define(function (require) { 'use strict'; - var PagingCollection = require('uitk/js/pagination/paging-collection'), + var PagingCollection = require('uitk/pagination/paging-collection'), LearnerModel = require('learners/common/models/learner'), LearnerUtils = require('learners/common/utils'), diff --git a/analytics_dashboard/static/js/config.js b/analytics_dashboard/static/js/config.js index 213de2ed4..ffc729498 100644 --- a/analytics_dashboard/static/js/config.js +++ b/analytics_dashboard/static/js/config.js @@ -37,9 +37,8 @@ require.config({ 'cldr-data': 'bower_components/cldr-data', globalize: 'bower_components/globalize/dist/globalize', globalization: 'js/utils/globalization', - disclosure: 'bower_components/edx-ui-toolkit/src/js/disclosure/disclosure-view', marionette: 'bower_components/marionette/lib/core/backbone.marionette.min', - uitk: 'bower_components/edx-ui-toolkit/src', + uitk: 'bower_components/edx-ui-toolkit/src/js', // URI and its dependencies URI: 'bower_components/uri.js/src/URI', IPv6: 'bower_components/uri.js/src/IPv6', diff --git a/analytics_dashboard/static/js/engagement-video-timeline-main.js b/analytics_dashboard/static/js/engagement-video-timeline-main.js index b9d6d7d79..979d8596b 100644 --- a/analytics_dashboard/static/js/engagement-video-timeline-main.js +++ b/analytics_dashboard/static/js/engagement-video-timeline-main.js @@ -5,58 +5,68 @@ require(['vendor/domReady!', 'load/init-page'], function(doc, page) { 'use strict'; - require(['disclosure', 'underscore', 'views/data-table-view', 'views/iframe-view', 'views/stacked-timeline-view'], - function (DisclosureView, _, DataTableView, IFrameView, StackedTimelineView) { - - var courseModel = page.models.courseModel, - timelineSettings = [ - { - key: 'num_users', - title: gettext('Unique Viewers'), - className: 'text-right', - type: 'number', - color: 'rgb(61,162,229)' - }, - { - key: 'num_replays', - title: gettext('Replays'), - className: 'text-right', - type: 'number', - color: 'rgb(18,46,204)' - } - ], - tableColumns = [ - {key: 'start_time', title: gettext('Time'), type: 'time'} - ]; - - tableColumns = tableColumns.concat(timelineSettings); - - new DisclosureView({ - el: '.module-preview-disclosure' - }); - - // loading the iframe blocks content, so load it after the rest of the page loads - new IFrameView({ - el: '#module-preview', - loadingSelector: '#module-loading' - }); - - new StackedTimelineView({ - el: '#chart-view', - model: courseModel, - modelAttribute: 'videoTimeline', - trends: timelineSettings, - x: { key: 'start_time', title: 'Time' }, - y: { key: 'num_users' } - }); - - new DataTableView({ - el: '[data-role=data-table]', - model: courseModel, - modelAttribute: 'videoTimeline', - columns: tableColumns - }); - - } - ); + require([ + 'uitk/disclosure/disclosure-view', + 'underscore', + 'views/data-table-view', + 'views/iframe-view', + 'views/stacked-timeline-view' + ], function ( + DisclosureView, + _, + DataTableView, + IFrameView, + StackedTimelineView + ) { + + var courseModel = page.models.courseModel, + timelineSettings = [ + { + key: 'num_users', + title: gettext('Unique Viewers'), + className: 'text-right', + type: 'number', + color: 'rgb(61,162,229)' + }, + { + key: 'num_replays', + title: gettext('Replays'), + className: 'text-right', + type: 'number', + color: 'rgb(18,46,204)' + } + ], + tableColumns = [ + {key: 'start_time', title: gettext('Time'), type: 'time'} + ]; + + tableColumns = tableColumns.concat(timelineSettings); + + new DisclosureView({ + el: '.module-preview-disclosure' + }); + + // loading the iframe blocks content, so load it after the rest of the page loads + new IFrameView({ + el: '#module-preview', + loadingSelector: '#module-loading' + }); + + new StackedTimelineView({ + el: '#chart-view', + model: courseModel, + modelAttribute: 'videoTimeline', + trends: timelineSettings, + x: { key: 'start_time', title: 'Time' }, + y: { key: 'num_users' } + }); + + new DataTableView({ + el: '[data-role=data-table]', + model: courseModel, + modelAttribute: 'videoTimeline', + columns: tableColumns + }); + + }); });