-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/v0.4.1' into issue/1790
* release/v0.4.1: (22 commits) Editor performance improvements (#1798) use debounce instead of throttle throttle callbacks use on to properly remove scroll listener in remove function Fix bug with restoring dashboard preferences Fix issues with window resizing and dashboard paging Make dashboard layouts a bit less hard-coded Fix issues highlighted by review article view now generated after article model saved Amend check to allow undefined data Switch to local log func Stop throwing error if repo update check failed Fix version check Rewrite projectsView.js to fix pagination Add override for removal of list items Handle response errors better Fix bug with recursive function call Remove testing header Update CHANGELOG for release 0.4.0 (#1739) Enchancements to install/update (#1726) Amend contentModel._children to allow for arrays ... # Conflicts: # frontend/src/modules/scaffold/views/scaffoldAssetView.js
- Loading branch information
Showing
43 changed files
with
1,537 additions
and
1,765 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE | ||
define(function(require) { | ||
var Backbone = require('backbone'); | ||
var Origin = require('core/origin'); | ||
var Helpers = require('core/helpers'); | ||
|
||
var ContentCollection = Backbone.Collection.extend({ | ||
initialize : function(models, options) { | ||
this._type = options._type; | ||
this.model = Helpers.contentModelMap(this._type); | ||
this._courseId = options._courseId; | ||
this._parentId = options._parentId; | ||
this.url = options.url || 'api/content/' + options._type + this.buildQuery(); | ||
|
||
this.on('reset', this.loadedData, this); | ||
}, | ||
|
||
buildQuery: function() { | ||
var query = ''; | ||
if(this._courseId) { | ||
query += '_courseId=' + this._courseId | ||
} | ||
if(this._parentId) { | ||
query += '_parentId=' + this._parentId | ||
} | ||
return query ? '?' + query : ''; | ||
}, | ||
|
||
loadedData: function() { | ||
Origin.trigger('contentCollection:dataLoaded', this._type); | ||
} | ||
}); | ||
|
||
return ContentCollection; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.