Skip to content

Commit

Permalink
issue/#649
Browse files Browse the repository at this point in the history
desc: remove the course asset from the db when remove is clicked.
  • Loading branch information
finbartracey1 committed Apr 21, 2015
1 parent 526cf16 commit 0f12921
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/core/scaffold/views/scaffoldAssetView.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ define(function(require) {
checkValueHasChanged: function() {
var contentTypeId = Origin.scaffold.getCurrentModel().get('_id');
var contentType = Origin.scaffold.getCurrentModel().get('_type');
var fieldname = (this.value) ? this.value.replace('course/assets/', '') : '';
var fieldname = this.getValue() ? this.getValue().replace('course/assets/', '') : '';
this.removeCourseAsset(contentTypeId, contentType, fieldname);
this.value = this.getValue();
},
Expand Down Expand Up @@ -141,9 +141,9 @@ define(function(require) {

onClearButtonClicked: function(event) {
event.preventDefault();
this.checkValueHasChanged();
this.setValue('');
this.toggleFieldAvailibility();
this.checkValueHasChanged();
},

findAsset: function (contentTypeId, contentType, fieldname) {
Expand Down

0 comments on commit 0f12921

Please sign in to comment.