Please Login here
\ No newline at end of file diff --git a/frontend/src/core/dashboard/views/dashboardSidebarView.js b/frontend/src/core/dashboard/views/dashboardSidebarView.js deleted file mode 100644 index c4a3f2fd9c..0000000000 --- a/frontend/src/core/dashboard/views/dashboardSidebarView.js +++ /dev/null @@ -1,179 +0,0 @@ -// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE -define(function(require) { - - var Origin = require('coreJS/app/origin'); - var SidebarItemView = require('coreJS/sidebar/views/sidebarItemView'); - - var DashboardSidebarView = SidebarItemView.extend({ - settings: { - autoRender: true - }, - - events: { - 'click .dashboard-sidebar-add-course' : 'addCourse', - 'click .dashboard-sidebar-my-courses' : 'gotoMyCourses', - 'click .dashboard-sidebar-shared-courses' : 'gotoSharedCourses', - 'keyup .dashboard-sidebar-filter-search-input':'filterProjectsByTitle', - 'click .sidebar-filter-clear': 'clearFilterInput', - 'click .dashboard-sidebar-tag': 'onFilterButtonClicked', - 'click .dashboard-sidebar-add-tag': 'onAddTagClicked', - 'click .dashboard-sidebar-row-filter': 'onFilterRemovedClicked' - }, - - postRender: function() { - this.listenTo(Origin, 'sidebarFilter:filterByTags', this.filterProjectsByTags); - this.listenTo(Origin, 'sidebarFilter:addTagToSidebar', this.addTagToSidebar); - this.listenTo(Origin, 'sidebar:update:ui', this.updateUI); - this.tags = []; - this.usedTags = []; - }, - - highlightSearchBox: function(){ - this.$('.dashboard-sidebar-filter-search-input').removeClass('search-highlight') - if (this.$('.dashboard-sidebar-filter-search-input').val()) { - this.$('.dashboard-sidebar-filter-search-input').addClass('search-highlight') - } - }, - - updateUI: function(userPreferences) { - if (userPreferences.search) { - this.$('.dashboard-sidebar-filter-search-input').val(userPreferences.search); - } - this.highlightSearchBox(); - if (userPreferences.tags) { - this.tags = userPreferences.tags; - var systemTags = [/*'archive', 'favourites'*/]; - _.each(userPreferences.tags, function(tag) { - // If this tag is part of the systemTags - // select this tag - if (_.contains(systemTags, tag)) { - this.$('.dashboard-sidebar-tag-'+tag.title).addClass('selected'); - } else { - this.addTagToSidebar(tag); - } - }, this); - } - }, - - addCourse: function() { - Origin.router.navigate('#/project/new', {trigger:true}); - }, - - gotoMyCourses: function() { - Origin.router.navigate('#/dashboard', {trigger: true}); - }, - - gotoSharedCourses: function() { - Origin.router.navigate('#/dashboard/shared', {trigger: true}); - }, - - filterProjectsByTitle: function(event, filter) { - if (event) { - event.preventDefault(); - } - var filterText = $(event.currentTarget).val().trim(); - Origin.trigger('dashboard:dashboardSidebarView:filterBySearch', filterText); - - this.highlightSearchBox(); - }, - - clearFilterInput: function(event) { - event.preventDefault(); - var $currentTarget = $(event.currentTarget); - $currentTarget.prev('.dashboard-sidebar-filter-input').val('').trigger('keyup', [true]); - this.highlightSearchBox(); - }, - - onFilterButtonClicked: function(event) { - $currentTarget = $(event.currentTarget); - var filterType = $currentTarget.attr('data-tag'); - - // If this filter is already selected - remove filter - // else add the filter - if ($currentTarget.hasClass('selected')) { - $currentTarget.removeClass('selected'); - Origin.trigger('dashboard:sidebarFilter:remove', filterType); - } else { - $currentTarget.addClass('selected'); - Origin.trigger('dashboard:sidebarFilter:add', filterType); - } - - }, - - onAddTagClicked: function(event) { - event.preventDefault(); - var availableTags = []; - // Go through each tag in the collection and filter out duplicate tags - // to create an array of unique project tags - - this.collection.each(function(tag) { - var availableTagsTitles = _.pluck(availableTags, 'title'); - var usedTagTitles = _.pluck(this.usedTags, 'title'); - if (!_.contains(availableTagsTitles, tag.get('title')) && !_.contains(usedTagTitles, tag.get('title'))) { - availableTags.push(tag.attributes); - } - - }, this); - - Origin.trigger('sidebar:sidebarFilter:add', { - title:'Filter by Tags', - items: availableTags - }); - }, - - onTagClicked: function(event) { - var tag = $(event.currentTarget).toggleClass('selected').attr('data-tag'); - this.filterProjectsByTags(tag); - }, - - filterProjectsByTags: function(tag) { - - // Check if the tag is already being filtered and remove it - if (_.findWhere(this.tags, { id: tag.id } )) { - this.tags = _.reject(this.tags, function(tagItem) { - return tagItem.id === tag.id; - }); - } else { - // Else add it to array - this.tags.push(tag); - } - - Origin.trigger('dashboard:dashboardSidebarView:filterByTags', this.tags); - }, - - addTagToSidebar: function(tag) { - this.usedTags.push(tag); - - var template = Handlebars.templates['sidebarRowFilter']; - var data = { - rowClasses: 'sidebar-row-filter', - buttonClasses:'dashboard-sidebar-row-filter', - tag: tag - }; - - this.$('.dashboard-sidebar-add-tag').parent().after(template(data)); - }, - - onFilterRemovedClicked: function(event) { - var tag = { - title: $(event.currentTarget).attr('data-title'), - id: $(event.currentTarget).attr('data-id') - } - - // Remove this tag from the usedTags - this.usedTags = _.reject(this.usedTags, function(item) { - return item.id === tag.id; - }); - - this.filterProjectsByTags(tag); - - $(event.currentTarget).parent().remove(); - } - - }, { - template: 'dashboardSidebar' - }); - - return DashboardSidebarView; - -}); diff --git a/frontend/src/core/editingOverlay/editingOverlay.js b/frontend/src/core/editingOverlay/editingOverlay.js deleted file mode 100644 index a55155c8a8..0000000000 --- a/frontend/src/core/editingOverlay/editingOverlay.js +++ /dev/null @@ -1,26 +0,0 @@ -// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE -define(function(require) { - - var Origin = require('coreJS/app/origin'); - var EditingOverlayView = require('coreJS/editingOverlay/views/editingOverlayView'); - - Origin.editingOverlay = {}; - - Origin.editingOverlay.addView = function(element) { - // Trigger to remove current views - Origin.trigger('editingOverlay:views:remove'); - - // Check if element is a view element - if (_.isElement(element[0]) !== true) { - return console.log("Editing Overlay - Cannot add this object to the editing overlay view. Please make sure it's the views $el"); - } - - Origin.trigger('editingOverlay:views:show', element); - - } - - Origin.on('app:dataReady', function() { - $('.app-inner').append(new EditingOverlayView().$el); - }); - -}); \ No newline at end of file diff --git a/frontend/src/core/editingOverlay/less/editingOverlay.less b/frontend/src/core/editingOverlay/less/editingOverlay.less deleted file mode 100644 index 66fae12483..0000000000 --- a/frontend/src/core/editingOverlay/less/editingOverlay.less +++ /dev/null @@ -1,19 +0,0 @@ -.editing-overlay { - position:absolute; - z-index:10; - top:0px; - left:10%; - opacity:0; - width:100%; - opacity:0; - overflow-y: scroll; -} - -.editing-overlay-panel-content { - input, textarea { - min-width: 50%; - } - ul li { - margin-left:0px; - } -} diff --git a/frontend/src/core/editingOverlay/templates/editingOverlay.hbs b/frontend/src/core/editingOverlay/templates/editingOverlay.hbs deleted file mode 100644 index 644750a385..0000000000 --- a/frontend/src/core/editingOverlay/templates/editingOverlay.hbs +++ /dev/null @@ -1,2 +0,0 @@ - \ No newline at end of file diff --git a/frontend/src/core/editingOverlay/views/editingOverlayView.js b/frontend/src/core/editingOverlay/views/editingOverlayView.js deleted file mode 100644 index 72d084c009..0000000000 --- a/frontend/src/core/editingOverlay/views/editingOverlayView.js +++ /dev/null @@ -1,70 +0,0 @@ -// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE -define(function(require) { - - var Origin = require('coreJS/app/origin'); - - var EditingOverlayView = Backbone.View.extend({ - - className: 'editing-overlay display-none', - - initialize: function() { - this.listenTo(Origin, 'editingOverlay:views:show', this.showOverlay); - this.listenTo(Origin, 'editingOverlay:views:hide', this.hideOverlay); - $(window).on("resize", _.bind(this.resizeOverlay, this)); - this.resizeOverlay(); - this.render(); - }, - - render: function() { - var template = Handlebars.templates[this.constructor.template]; - this.$el.html(template()); - _.defer(_.bind(function() { - this.postRender(); - }, this)); - return this; - }, - - postRender: function() { - - }, - - showOverlay: function(element) { - if (this._isVisible) { - return; - } - - this.$('.editing-overlay-inner').html(element); - _.defer(_.bind(function() { - this.$el.removeClass('display-none'); - this.$el.velocity({left: 0, opacity: 1}, 300, _.bind(function() { - this._isVisible = true; - this.resizeOverlay(); - }, this)); - this.listenToOnce(Origin, 'remove:views', this.hideOverlay); - }, this)); - }, - - hideOverlay: function() { - if (!this._isVisible) { - return; - } - - this.$el.velocity({left: '10%', opacity: 0}, 300, _.bind(function() { - this.$el.addClass('display-none'); - this._isVisible = false; - }, this)); - }, - - resizeOverlay: function() { - _.defer(_.bind(function() { - var windowHeight = $(window).height(); - this.$el.height(windowHeight - this.$el.offset().top); - }, this)); - } - }, { - template: 'editingOverlay' - }); - - return EditingOverlayView; - -}); diff --git a/frontend/src/core/editor/config/models/editorConfigModel.js b/frontend/src/core/editor/config/models/editorConfigModel.js deleted file mode 100644 index fecc54321e..0000000000 --- a/frontend/src/core/editor/config/models/editorConfigModel.js +++ /dev/null @@ -1,29 +0,0 @@ -// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE -define(function(require) { - var EditorModel = require('editorGlobal/models/editorModel'); - var EditorConfigModel = EditorModel.extend({ - - sync: function(method, model, options) { - options = options || {}; - - switch (method.toLowerCase()) { - case 'read': - options.url = '/api/content/config/' + this.get('_courseId'); - break; - case 'update': - case 'patch': - options.url = '/api/content/config/' + this.get('_id'); - break; - } - - return Backbone.sync.apply(this, arguments); - }, - - _siblings: '', - _children: '', - _parent: 'course', - _type: 'config' - }); - - return EditorConfigModel; -}); \ No newline at end of file diff --git a/frontend/src/core/editor/config/templates/editorConfigEdit.hbs b/frontend/src/core/editor/config/templates/editorConfigEdit.hbs deleted file mode 100644 index a0d6efafc9..0000000000 --- a/frontend/src/core/editor/config/templates/editorConfigEdit.hbs +++ /dev/null @@ -1,2 +0,0 @@ -We've received a request to reset the password for your Adapt authoring tool account.
If you weren't expecting this email, don't worry! You can safely ignore it. Otherwise, please click the button below.
", "app.edittenant": "Edit Tenant", "app.addtenant": "Add Tenant", "app.tenant": "Tenant", - "app.rolemanagement": "Role Management", - "app.roleassignments": "Role Assignments", - "app.norolesassigned": "No roles assigned", - "app.assignroles": "Assign Roles", - "app.selectroles": "Select roles to assign to the user %{username}", - "app.unassignrole": "Unassign Role", - "app.assignrole": "Assign Role", - "app.addrole": "Add Role", - "app.editrole": "Edit Role", + "app.role": "Role", "app.version": "Version", - "app.policystatements": "Policy Statements", - "app.norolestoassign": "No roles to assign", - "app.confirmroleunassign": "Are you sure you want to remove the %{role} role?", - "app.errorunassigningrole": "Could not unassign role!", - "app.errorassigningrole": "Could not assign role!", - "app.productmanagement": "Product Management", - "app.addproduct": "Add Product", - "app.editproduct": "Edit Product", - "app.product": "Product", "app.enabled": "Enabled", - "app.actions": "Actions", - "app.managecourses": "Manage Courses", - "app.availablecourses": "Available Courses", - "app.selectedcourses": "Selected Courses", "app.tenantnotenabled": "Your tenant is currently disabled. Please contact an administrator.", "app.accountnotactive": "Your account is not currently active. Please contact an administrator.", - "app.loginas": "Login As", "app.errorlogginginas": "Error logging in as selected user.", - "app.managesubscriptions": "Manage Subscriptions", - "app.addsubscription": "Add Subscription", - "app.editsubscription": "Edit Subscription", - "app.timestart": "Time Start", - "app.timeend": "Time End", - "app.unlimited": "Unlimited", - "app.deletesubscription": "Delete Subscription", - "app.confirmdeletesubscription": "Are you sure you want to delete this subscription?", "app.errormenueditorbody": "An error occurred during the save", "app.validationfailed": "Validation failed", "app.validationfailedmessage": "You need to fix the following before you can save your data:", "app.successdefaulttitle": "Success", "app.export": "Export source code", "app.exporting": "Exporting source code", - "app.exportcoursetitle": "Exporting course", "app.exporterrortitle": "Course export failed", - "app.exportcoursetext": "Please stand by, this may take a few moments.", "app.exportcoursesuccess": "Course exported successfully!", "app.infodefaulttitle": "Information", "app.errordefaulttitle": "Error", + "app.warningdefaulttitle": "Warning", "app.confirmdefaulttitle": "Are you sure?", "app.confirmdefaultyes": "Yes, I'm sure", "app.confirmwait": "Wait", @@ -301,24 +255,58 @@ "app.errordeleteasset": "Couldn't delete this asset, %{message}", "app.errorsave": "Something went wrong while saving your data.