Skip to content

Commit 9100738

Browse files
Merge pull request #2537 from adaptlearning/release/bugpatch
Release 0.10.4
2 parents 28247b0 + ab9b806 commit 9100738

File tree

29 files changed

+686
-532
lines changed

29 files changed

+686
-532
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ All notable changes to the Adapt authoring tool are documented in this file.
55
**IMPORTANT**: For information on how to **correctly and safely** update your installation, please consult **INSTALL.md**.<br/>
66
_Note that we adhere to the [semantic versioning](http://semver.org/) scheme for release numbering._
77

8+
## [0.10.4] - 2020-08-21
9+
10+
Bugfix release.
11+
12+
### Fixed
13+
- Copied articles sometimes get pasted into the wrong place ([#1892](https://github.com/adaptlearning/adapt_authoring/issues/1892))
14+
- Install breaks if any config values contain true/false ([#2133](https://github.com/adaptlearning/adapt_authoring/issues/2133))
15+
- Upgrade script replaces all core-bundled plugins ([#2316](https://github.com/adaptlearning/adapt_authoring/issues/2316))
16+
- Copied and pasted pages have out of order articles ([#2404](https://github.com/adaptlearning/adapt_authoring/issues/2404))
17+
- Tooltip overflow in sidebar 'modal' ([#2414](https://github.com/adaptlearning/adapt_authoring/issues/2414))
18+
- Error: Failed to determine user's tenant! ([#2504](https://github.com/adaptlearning/adapt_authoring/issues/2504))
19+
- Export fails as it requires LESS variables for plugins that aren't in the project ([#2510](https://github.com/adaptlearning/adapt_authoring/issues/2510))
20+
- Top navigation obscures save button on small window sizes ([#2511](https://github.com/adaptlearning/adapt_authoring/issues/2511))
21+
- Support Node 14 ([#2514](https://github.com/adaptlearning/adapt_authoring/issues/2514))
22+
- Reset not working ([#2518](https://github.com/adaptlearning/adapt_authoring/issues/2518))
23+
- Wrong state for display title icon ([#2523](https://github.com/adaptlearning/adapt_authoring/issues/2523))
24+
- Get 500 error when copying items with assets in Project Settings. Can also break courseassets in other items. ([#2534](https://github.com/adaptlearning/adapt_authoring/issues/2534))
25+
- default FW -> AT import issues - PLP settings ([adaptlearning/adapt_framework#2841](https://github.com/adaptlearning/adapt_framework/issues/2841))
26+
27+
### Added
28+
- Option to customise the 'contact support' message with details of who to contact ([#2477](https://github.com/adaptlearning/adapt_authoring/issues/2477))
29+
- Remove 'field-help' icon if there isn't any 'help' text ([#2509](https://github.com/adaptlearning/adapt_authoring/issues/2509))
30+
- Customise help link ([#2527](https://github.com/adaptlearning/adapt_authoring/issues/2527))
31+
832
## [0.10.3] - 2020-02-21
933

1034
Bugfix release.
@@ -687,6 +711,7 @@ Initial release.
687711
- Loading screen of death
688712
- Session cookie security issues
689713

714+
[0.10.4]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.3...v0.10.4
690715
[0.10.3]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.2...v0.10.3
691716
[0.10.2]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.1...v0.10.2
692717
[0.10.1]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.0...v0.10.1

frontend/src/core/helpers.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,11 @@ define(function(require){
326326
}
327327
}
328328
return flatProperties;
329+
},
330+
331+
importConstants: function() {
332+
this.constants = Origin.constants;
333+
return '';
329334
}
330335
};
331336

frontend/src/core/models/blockModel.js

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,14 @@ define(function(require) {
1010
// Block specific properties
1111
layoutOptions: null,
1212
dragLayoutOptions: null,
13-
// These are the only attributes which should be permitted on a save
14-
// TODO look into this...
15-
whitelistAttributes: [
16-
'_id',
17-
'_courseId',
18-
'_parentId',
19-
'_layoutOptions',
20-
'_type',
21-
'_sortOrder',
22-
'_classes',
23-
'_isOptional',
24-
'_isAvailable',
25-
'body',
26-
'displayTitle',
27-
'title',
28-
'_extensions',
29-
'themeSettings',
30-
'_onScreen',
31-
'_isVisible',
32-
'_isHidden',
33-
'instruction',
34-
'_colorLabel'
13+
attributeBlacklist: [
14+
'_isDeleted',
15+
'_tenantId',
16+
'_trackingId',
17+
'createdBy',
18+
'createdAt',
19+
'layoutOptions',
20+
'updatedAt'
3521
]
3622
});
3723

frontend/src/core/models/componentModel.js

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,11 @@ define(function(require) {
66
urlRoot: 'api/content/component',
77
_parentType: 'block',
88
_siblingTypes: 'component',
9-
// These are the only attributes which should be permitted on a save
10-
// TODO look into this...
11-
whitelistAttributes: [
12-
'_id',
13-
'_componentType',
14-
'_courseId',
15-
'_layout',
16-
'_parentId',
17-
'_type',
18-
'properties',
19-
'_component',
20-
'_extensions',
21-
'_classes',
22-
'_isOptional',
23-
'_isAvailable',
24-
'body',
25-
'displayTitle',
26-
'title',
27-
'version',
28-
'themeSettings',
29-
'_onScreen',
30-
'_isVisible',
31-
'_isHidden',
32-
'instruction',
33-
'_colorLabel'
9+
attributeBlacklist: [
10+
'_isDeleted',
11+
'createdBy',
12+
'createdAt',
13+
'updatedAt'
3414
]
3515
});
3616

frontend/src/core/models/contentModel.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ define(function(require) {
77

88
var ContentModel = Backbone.Model.extend({
99
idAttribute: '_id',
10-
whitelistAttributes: null,
10+
attributeBlacklist: null,
1111

1212
initialize: function(options) {
1313
this.on('sync', this.loadedData, this);
@@ -89,17 +89,13 @@ define(function(require) {
8989
return JSON.stringify(this);
9090
},
9191

92-
// Remove any attributes which are not on the whitelist (called before a save)
9392
pruneAttributes: function() {
94-
var self = this;
95-
// Ensure that only valid attributes are pushed back on the save
96-
if (self.whitelistAttributes) {
97-
_.each(_.keys(self.attributes), function(key) {
98-
if (!_.contains(self.whitelistAttributes, key)) {
99-
self.unset(key);
100-
}
101-
});
102-
}
93+
if (!this.attributeBlacklist) return;
94+
Object.keys(this.attributes).forEach(function(key) {
95+
if (_.contains(this.attributeBlacklist, key)) {
96+
this.unset(key);
97+
}
98+
}, this);
10399
}
104100
});
105101

frontend/src/modules/editor/contentObject/views/editorPageArticleView.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ define(function(require){
4848
var events = {};
4949
events['editorView:moveBlock:' + id] = this.render;
5050
events['editorView:deleteArticle:' + id] = this.deletePageArticle;
51-
events['editorView:pasted:' + id] = this.onPaste;
51+
events['editorView:pasted:' + id] = this.render;
5252
this.listenTo(Origin, events);
5353
}
5454

@@ -282,20 +282,6 @@ define(function(require){
282282
duration = 0;
283283
}
284284
this.$('.article-content').velocity(shouldCollapse ? 'slideUp' : 'slideDown', duration);
285-
},
286-
287-
onPaste: function(data) {
288-
(new BlockModel({ _id: data._id })).fetch({
289-
success: _.bind(function(model) {
290-
this.addBlockView(model);
291-
}, this),
292-
error: function(data) {
293-
Origin.Notify.alert({
294-
type: 'error',
295-
text: 'app.errorfetchingdata'
296-
});
297-
}
298-
});
299285
}
300286

301287
}, {

frontend/src/modules/editor/contentObject/views/editorPageView.js

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ define(function(require){
2727
'pageView:itemAnimated': this.evaluateChildStatus
2828
};
2929
originEvents['editorView:moveArticle:' + id] = this.render;
30-
originEvents['editorView:pasted:' + id] = this.onPaste;
30+
originEvents['editorView:pasted:' + id] = this.render;
3131
this.listenTo(Origin, originEvents);
3232

3333
Origin.options.addItems([
@@ -109,7 +109,7 @@ define(function(require){
109109
$.scrollTo(newArticleView.$el, 200);
110110
}
111111
// Increment the 'sortOrder' property
112-
articleModel.set('_pasteZoneSortOrder', sortOrder++);
112+
articleModel.set('_pasteZoneSortOrder', sortOrder + 1);
113113
// Post-article paste zone - sort order of placeholder will be one greater
114114
this.$('.page-articles').append(new EditorPasteZoneView({ model: articleModel }).$el);
115115
return newArticleView;
@@ -159,20 +159,6 @@ define(function(require){
159159
Origin.trigger('contextMenu:open', fakeView, event);
160160
},
161161

162-
onPaste: function(data) {
163-
(new ArticleModel({ _id: data._id })).fetch({
164-
success: _.bind(function(model) {
165-
this.addArticleView(model);
166-
}, this),
167-
error: function(data) {
168-
Origin.Notify.alert({
169-
type: 'error',
170-
text: 'app.errorfetchingdata'
171-
});
172-
}
173-
});
174-
},
175-
176162
onCutArticle: function(view) {
177163
this.once('pageView:postRender', view.showPasteZones);
178164
this.render();

frontend/src/modules/help/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ define(function(require) {
22
var Origin = require('core/origin');
33

44
Origin.on('navigation:help', function() {
5-
openWikiLink(getLink());
5+
var override = Origin.constants.supportLink;
6+
if (override) {
7+
window.open(override);
8+
} else {
9+
openWikiLink(getLink());
10+
}
611
});
712

813
function getLink() {

frontend/src/modules/navigation/less/navigation.less

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@
4646
}
4747

4848
.navigation-left {
49-
width:50%;
5049
float:left;
5150
.navigation-product-name {
5251
.no-select;
5352
}
5453
}
5554

5655
.navigation-right {
57-
width:47%;
5856
padding-right: 20px;
5957
float:right;
6058
text-align:right;

frontend/src/modules/scaffold/less/displayTitle.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
display: none;
55
}
66
.field-editor input {
7-
width: 81%;
7+
width: calc(90% - 80px);
88
}
99
}
1010

0 commit comments

Comments
 (0)