Skip to content

Commit

Permalink
Merge pull request #2337 from adaptlearning/release/bugpatch
Browse files Browse the repository at this point in the history
Release/bugpatch
  • Loading branch information
tomgreenfield authored May 23, 2019
2 parents 0b18c11 + 60bddd5 commit 169df20
Show file tree
Hide file tree
Showing 56 changed files with 178 additions and 134 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to the Adapt authoring tool are documented in this file.
**IMPORTANT**: For information on how to **correctly and safely** update your installation, please consult **INSTALL.md**.<br/>
_Note that we adhere to the [semantic versioning](http://semver.org/) scheme for release numbering._

## [0.8.1] - 2019-05-23

Bugfix release.

### Fixed
- Publish spinner shows through force rebuild button ([#2295](https://github.com/adaptlearning/adapt_authoring/issues/2295))
- Tag preview not showing via upload asset from component ([#2300](https://github.com/adaptlearning/adapt_authoring/issues/2300))
- hard-coded placeholder text in sidebarFilter.hbs ([#2309](https://github.com/adaptlearning/adapt_authoring/issues/2309))
- Admins can see other users' unshared courses ([#2312](https://github.com/adaptlearning/adapt_authoring/issues/2312))
- No new migrations are run for upgrades ([#2317](https://github.com/adaptlearning/adapt_authoring/issues/2317))

## [0.8.0] - 2019-05-03

Adds a UI to allow the editing of a supported theme.
Expand Down Expand Up @@ -591,6 +602,7 @@ Initial release.
- Loading screen of death
- Session cookie security issues

[0.8.1]: https://github.com/adaptlearning/adapt_authoring/compare/v0.8.0...v0.8.1
[0.8.0]: https://github.com/adaptlearning/adapt_authoring/compare/v0.7.1...v0.8.0
[0.7.1]: https://github.com/adaptlearning/adapt_authoring/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/adaptlearning/adapt_authoring/compare/v0.6.5...v0.7.0
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/collections/tagsCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ define(function(require) {

var TagsCollection = Backbone.Collection.extend({

url: '/api/autocomplete/tag'
url: 'api/autocomplete/tag'

});

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/articleModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function(require) {
var ContentModel = require('./contentModel');

var ArticleModel = ContentModel.extend({
urlRoot: '/api/content/article',
urlRoot: 'api/content/article',
_parentType: 'contentobject',
_siblingTypes: 'article',
_childTypes: 'block',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/blockModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function(require) {
var ContentModel = require('./contentModel');

var BlockModel = ContentModel.extend({
urlRoot: '/api/content/block',
urlRoot: 'api/content/block',
_parentType: 'article',
_siblingTypes: 'block',
_childTypes: 'component',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/clipboardModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function(require) {
var ContentModel = require('./contentModel');

var ClipboardModel = ContentModel.extend({
urlRoot: '/api/content/clipboard',
urlRoot: 'api/content/clipboard',
});

return ClipboardModel;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/componentModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function(require) {
var ContentModel = require('./contentModel');

var ComponentModel = ContentModel.extend({
urlRoot: '/api/content/component',
urlRoot: 'api/content/component',
_parentType: 'block',
_siblingTypes: 'component',
// These are the only attributes which should be permitted on a save
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/componentTypeModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(function(require) {

var ComponentTypeModel = ContentModel.extend({
idAttribute: '_id',
urlRoot: '/api/componenttype',
urlRoot: 'api/componenttype',
_parent: 'block',

comparator: function(model) {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/core/models/configModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ define(function(require) {

switch (method.toLowerCase()) {
case 'read':
options.url = '/api/content/config/' + this.get('_courseId');
options.url = 'api/content/config/' + this.get('_courseId');
break;
case 'update':
case 'patch':
options.url = '/api/content/config/' + this.get('_id');
options.url = 'api/content/config/' + this.get('_id');
break;
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/contentObjectModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(function(require) {
var ContentModel = require('./contentModel');

var ContentObjectModel = ContentModel.extend({
urlRoot: '/api/content/contentobject',
urlRoot: 'api/content/contentobject',
_parentType: 'contentobject',
_siblingTypes: 'contentobject',
_childTypes: ['contentobject', 'article'],
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/courseAssetModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ define(function(require) {

var CourseAssetModel = Backbone.Model.extend({
idAttribute: '_id',
urlRoot: '/api/content/courseasset'
urlRoot: 'api/content/courseasset'
});

return CourseAssetModel;
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/core/models/courseModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ define(function(require) {
var ContentModel = require('./contentModel');

var CourseModel = ContentModel.extend({
urlRoot: '/api/content/course',
urlRoot: 'api/content/course',
_type: 'course',
_childTypes: 'contentobject',

getHeroImageURI: function () {
if(Helpers.isAssetExternal(this.get('heroImage'))) {
return this.get('heroImage');
}
return '/api/asset/thumb/' + this.get('heroImage');
return 'api/asset/thumb/' + this.get('heroImage');
},

isEditable: function () {
return this.get('_isShared') || this.get('createdBy') == Origin.sessionModel.get('id');
},

getDuplicateURI: function () {
return '/api/duplicatecourse/' + this.get('_id');
return 'api/duplicatecourse/' + this.get('_id');
}
});

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/extensionTypeModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function(require) {
var ContentModel = require('./contentModel');

var ExtensionTypeModel = ContentModel.extend({
urlRoot: '/api/extensiontype',
urlRoot: 'api/extensiontype',
idAttribute: '_id',
_type: 'extension'
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/menuTypeModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function(require) {
var ContentModel = require('./contentModel');

var MenuTypeModel = ContentModel.extend({
urlRoot: '/api/menutype',
urlRoot: 'api/menutype',
idAttribute: '_id',
_type: 'menu'
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/models/themeTypeModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function(require) {
var ContentModel = require('./contentModel');

var ThemeTypeModel = ContentModel.extend({
urlRoot: '/api/themetype',
urlRoot: 'api/themetype',
idAttribute: '_id',
_type: 'theme'
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/core/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ define(function(require) {
var loc = Origin.location;
if (loc && loc.module == 'dashboard') {
var suffix = loc.route1 ? '/' + loc.route1 : '';
Origin.dashboardRoute = '/#/dashboard' + suffix;
Origin.dashboardRoute = '#/dashboard' + suffix;
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,33 @@
top: 60px;
z-index: 5;
}

.asset-management-modal-new-asset-inner .form-group.tags .selectize-control {
@item-padding: 4px 7px;

.selectize-input {
box-sizing: inherit;
width: 90%;
padding: 11px 10px;

.item, .item.active,
.option, .option.active {
background-color: @secondary-color;
background-image: none;
border: none;
border-radius: 0;
text-shadow: none;
padding: @item-padding;
}
}
.selectize-dropdown {
.option {
padding: @item-padding;
cursor: pointer;
&[data-disabled="true"] { cursor: not-allowed; }
}
.create {
.selectize-dropdown .option;
}
}
}
2 changes: 1 addition & 1 deletion frontend/src/modules/assetManagement/models/assetModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(function(require) {

var AssetModel = Backbone.Model.extend({
idAttribute: '_id',
urlRoot: '/api/asset'
urlRoot: 'api/asset'
});

return AssetModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</button>
<div class="asset-management-modal-new-asset-inner">
<!-- Begin upload form -->
<form class="asset-form forms asset-form" action="/api/asset" method="post">
<form class="asset-form forms asset-form" action="api/asset" method="post">
<div class="form-group">
<label for="file">
{{t 'app.assetfile'}} <span class="req">*</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="asset-management-new-asset-inner inner">
<!-- Begin upload form -->
<form class="asset-form forms asset-form" action="/api/asset" method="post">
<form class="asset-form forms asset-form" action="api/asset" method="post">
<div class="form-group">
<label for="file">
{{t 'app.assetfile'}} <span class="req">*</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,22 @@ define(function(require){

postRender: function() {
// tagging
this.$('#tags_control').tagsInput({
autocomplete_url: '/api/autocomplete/tag',
onAddTag: _.bind(this.onAddTag, this),
onRemoveTag: _.bind(this.onRemoveTag, this),
'minChars' : 3,
'maxChars' : 30
this.$('#tags_control').selectize({
create: true,
labelField: 'title',
load: function(query, callback) {
$.ajax({
url: 'api/autocomplete/tag',
method: 'GET',
error: callback,
success: callback
});
},
onItemAdd: this.onAddTag.bind(this),
onItemRemove: this.onRemoveTag.bind(this),
searchField: [ 'title' ]
});

// Set view to ready
this.setViewToReady();
},
Expand Down Expand Up @@ -144,7 +153,7 @@ define(function(require){
onAddTag: function (tag) {
var model = this.model;
$.ajax({
url: '/api/content/tag',
url: 'api/content/tag',
method: 'POST',
data: { title: tag }
}).done(function (data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ define(function(require){
postRender: function() {
// tagging
this.$('#tags_control').tagsInput({
autocomplete_url: '/api/autocomplete/tag',
autocomplete_url: 'api/autocomplete/tag',
onAddTag: _.bind(this.onAddTag, this),
onRemoveTag: _.bind(this.onRemoveTag, this),
'minChars' : 3,
Expand Down Expand Up @@ -142,7 +142,7 @@ define(function(require){
onAddTag: function (tag) {
var model = this.model;
$.ajax({
url: '/api/content/tag',
url: 'api/content/tag',
method: 'POST',
data: { title: tag }
}).done(function (data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ define(function(require){

if (confirmed) {
$.ajax({
url: '/api/asset/trash/' + self.model.get('_id'),
url: 'api/asset/trash/' + self.model.get('_id'),
type: 'PUT',
success: function() {
if (Origin.permissions.hasPermissions(["*"])) {
Expand Down Expand Up @@ -87,7 +87,7 @@ define(function(require){

if (confirmed) {
$.ajax({
url: '/api/asset/restore/' + self.model.get('_id'),
url: 'api/asset/restore/' + self.model.get('_id'),
type: 'PUT',
success: function() {
self.model.set({_isDeleted: false});
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/modules/editor/contentObject/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define(function(require) {

Origin.sidebar.addView(new EditorPageSidebarView().$el, {
backButtonText: Origin.l10n.t('app.backtomenu'),
backButtonRoute: "/#/editor/" + Origin.location.route1 + "/menu"
backButtonRoute: "#/editor/" + Origin.location.route1 + "/menu"
});
Origin.contentPane.setView(EditorView, {
currentCourseId: Origin.location.route1,
Expand All @@ -58,7 +58,7 @@ define(function(require) {

Origin.sidebar.addView(new EditorMenuSidebarView().$el, {
backButtonText: Origin.l10n.t('app.backtoprojects'),
backButtonRoute: Origin.dashboardRoute || '/#/dashboard'
backButtonRoute: Origin.dashboardRoute || '#/dashboard'
});
Origin.contentPane.setView(EditorView, {
currentCourseId: Origin.location.route1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ define(function(require){

$.ajax({
type: 'PUT',
url:'/api/content/component/' + componentId,
url:'api/content/component/' + componentId,
data: newData,
success: function(jqXHR, textStatus, errorThrown) {
// Re-render the move-from block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ define(function(require){
var parentId = this.model.get('_parentId');
$.ajax({
type: 'PUT',
url:'/api/content/component/' + id,
url:'api/content/component/' + id,
data: {
_layout: layout,
_parentId: parentId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ define(function(require) {
// Store the component types
var componentTypes = new EditorCollection(null, {
model: ComponentTypeModel,
url: '/api/componenttype',
url: 'api/componenttype',
_type: 'componentTypes'
});
componentTypes.fetch({
Expand All @@ -132,7 +132,7 @@ define(function(require) {
componentModel.save(null, {
error: _.bind(this.onSaveError, this),
success: function() {
Origin.router.navigateTo('/editor/' + componentModel.get('_courseId') + '/menu');
Origin.router.navigateTo('editor/' + componentModel.get('_courseId') + '/menu');
}
});
}, this)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/modules/editor/extensions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ define(function(require) {
});
var route1 = Origin.location.route1;
// Check whether the user came from the page editor or menu editor
var backButtonRoute = "/#/editor/" + route1 + "/menu";
var backButtonRoute = "#/editor/" + route1 + "/menu";
var backButtonText = Origin.l10n.t('app.backtomenu');
if (Origin.previousLocation.route2 === "page") {
backButtonRoute = "/#/editor/" + route1 + "/page/" + Origin.previousLocation.route3;
backButtonRoute = "#/editor/" + route1 + "/page/" + Origin.previousLocation.route3;
backButtonText = Origin.l10n.t('app.backtopage');
}
Origin.sidebar.addView(new EditorExtensionsEditSidebarView().$el, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ define(function(require) {
},

addExtension: function() {
this.postData('/api/extension/enable/');
this.postData('api/extension/enable/');
},

removeExtension: function() {
this.postData('/api/extension/disable/');
this.postData('api/extension/disable/');
},

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ define(function(require){
var parentId = this.model.get('_parentId');
var droppedOnId = $component.attr('data-' + this.model.get('_parent') + '-id');
$.ajax({
url: '/api/content/' + type + '/' + contentId,
url: 'api/content/' + type + '/' + contentId,
type: 'PUT',
data: {
_parentId: parentId,
Expand Down
Loading

0 comments on commit 169df20

Please sign in to comment.