Skip to content

Commit

Permalink
Merge pull request #23 from adaptlearning/issue-1328
Browse files Browse the repository at this point in the history
Resolves #1328, moves removal of 'in-languagepicker' class to remove()
  • Loading branch information
brian-learningpool authored Nov 18, 2016
2 parents 0cd8a5c + 98ebe3c commit e4c0802
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "adapt-contrib-languagePicker",
"repository": "git://github.com/adaptlearning/adapt-contrib-languagePicker.git",
"framework": "^2.0.14",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/adaptlearning/adapt-contrib-languagePicker",
"issues": "https://github.com/adaptlearning/adapt_framework/issues",
"displayName": "Language Picker",
Expand Down
11 changes: 6 additions & 5 deletions js/languagePickerView.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define([

initialize: function () {
this.initializeAccessibility();

$("html").addClass("in-languagepicker");
this.listenTo(Adapt, 'remove', this.remove);
this.render();
},
Expand All @@ -39,10 +39,7 @@ define([
this.model.setLanguage($(event.target).val());
},


initializeAccessibility: function() {
$("html").addClass("in-languagepicker");

this.accessibilityView = new accessibilityView({
model:this.model
});
Expand All @@ -52,9 +49,13 @@ define([
},

destroyAccessibility: function() {
this.accessibilityView.remove();
},

remove: function() {
$("html").removeClass("in-languagepicker");

this.accessibilityView.remove();
Backbone.View.prototype.remove.apply(this, arguments);
}

}, {
Expand Down

0 comments on commit e4c0802

Please sign in to comment.