Skip to content

Commit

Permalink
# This is a combination of 15 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

Add HLS support

Update files from develop branch

Fixed German translation file syntax

Closes opencast#173.

Add Emacs configuration

`npm update && npm audit fix`

Changed `less` plugin for `grunt`

This switches from `assemble-less` to `grunt-contrib-less`
and updates the latter at least a bit,
all in order to get rid of a few security vulnerabilities.
Further updates pending mostly because of incompatibilities.

Updated `grunt-contrib-less` to the latest version

More package updates

# This is the commit message #2:

Removed unused grunt plugin

# This is the commit message #3:

Removed some unused dependencies

# This is the commit message #4:

Improved code quality

# This is the commit message #5:

Removed some dead code and obsolete comments

# This is the commit message #6:

Got rid of `box-sizing`-'polyfill"

Box sizing has good enough support now.
If we still want backwards compat,
I feel like a CSS postprocessor
would be a better approach.

# This is the commit message opencast#7:

Simplified some event handling code

# This is the commit message opencast#8:

Refactored comment model slightly

Comments should be creatable without text.
But I **do** see the problem this brings.
So why not make the empty string the default text? ;)

# This is the commit message opencast#9:

Refactored some view cleanup and deleted related dead code

# This is the commit message opencast#10:

Allowed editing multiple annotations simultaneously

# This is the commit message opencast#11:

Use `maven-enforcer-plugin` instead of `prerequisites`

Fixes opencast#187.

# This is the commit message opencast#12:

Pinned `maven-install-plugin`

Fixes opencast#185.

# This is the commit message opencast#13:

Added an `npm start` script

# This is the commit message opencast#14:

Updated `grunt-cli`

# This is the commit message opencast#15:

Improved code quality
  • Loading branch information
mliradelc committed Jun 24, 2019
1 parent 944b085 commit 5024850
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 34 deletions.
20 changes: 1 addition & 19 deletions frontend/js/views/list-annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,6 @@ define(["jquery",
throw "The annotations have to be given to the annotate view.";
}

// Bind function to the good context
_.bindAll(this, "render",
"deleteFull",
"onSelect",
"saveStart",
"saveEnd",
"saveFreeText",
"saveScaling",
"toggleEditState",
"toggleCollapsedState",
"toggleExpandedState",
"toggleCommentsState",
"setCurrentTimeAsStart",
"setCurrentTimeAsEnd",
"setState",
"getState",
"handleEsc");

this.model = attr.annotation;

this.id = this.model.get("id");
Expand Down Expand Up @@ -408,7 +390,7 @@ define(["jquery",

if (modelJSON.hasScale && this.scale) {
scaleValues = this.scaleValues.toJSON();
selectedScaleValue = _.where(scaleValues, {id: modelJSON.scale_value_id});
selectedScaleValue = _.where(scaleValues, { id: modelJSON.scale_value_id });

if (selectedScaleValue.length > 0) {
selectedScaleValue[0].isSelected = true;
Expand Down
16 changes: 5 additions & 11 deletions frontend/js/views/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ define(["jquery",
* @type {object}
*/
events: {
"click .collapse-all" : "collapseAll",
"click .expand-all" : "expandAll"
"click .collapse-all": "collapseAll",
"click .expand-all": "expandAll"
},

/**
Expand All @@ -104,9 +104,7 @@ define(["jquery",
"getViewFromAnnotation",
"insertView",
"select",
"expandAll",
"renderSelect",
"collapseAll",
"updateView",
"potentiallyOpenCurrentItems");

Expand Down Expand Up @@ -176,7 +174,7 @@ define(["jquery",
addAnnotation: function (annotation, track, isPartofList) {
var view;

// Wait that the id has be set to the model before to add it
// Wait that the id has been set on the model before to add it
if (_.isUndefined(annotation.get("id"))) {
annotation.once("ready", function () {
this.addAnnotation(annotation, track, isPartofList);
Expand Down Expand Up @@ -375,19 +373,15 @@ define(["jquery",
* @alias module:views-list.List#expandAll
*/
expandAll: function (event) {
_.each(this.annotationViews, function (annView) {
annView.toggleExpandedState(event, true);
});
_.invoke(this.annotationViews, "expand");
},

/**
* Collapse all annotations in the list
* @alias module:views-list.List#collapseAll
*/
collapseAll: function (event) {
_.each(this.annotationViews, function (annView) {
annView.toggleCollapsedState(event, true);
});
_.invoke(this.annotationViews, "collapse");
},

/**
Expand Down
5 changes: 2 additions & 3 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"grunt": "^1.0.3",
"grunt-cli": "^1.3.1",
"grunt-cli": "gruntjs/grunt-cli",
"grunt-concurrent": "^2.3.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-copy": "^1.0.0",
Expand Down

0 comments on commit 5024850

Please sign in to comment.