diff options
| author | Alex Yatskov <alex@foosoft.net> | 2017-03-28 20:49:26 -0700 | 
|---|---|---|
| committer | Alex Yatskov <alex@foosoft.net> | 2017-03-28 20:49:26 -0700 | 
| commit | f15f30019b50e84844375e98dc3734d6463ee2c5 (patch) | |
| tree | b4e6f8fe1da154edb8804c501c86c1006008162f /ext/mixed/js | |
| parent | 9de0d34af398b385e140a365a500ff20dda45a7a (diff) | |
version bump, cloze support1.1.9
Diffstat (limited to 'ext/mixed/js')
| -rw-r--r-- | ext/mixed/js/display.js | 18 | 
1 files changed, 10 insertions, 8 deletions
| diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index db14a43c..9738319a 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -22,10 +22,12 @@ class Display {          this.spinner = spinner;          this.container = container;          this.definitions = []; -        this.audioCache = {}; -        this.responseCache = {}; +        this.options = null; +        this.context = null;          this.sequence = 0;          this.index = 0; +        this.audioCache = {}; +        this.responseCache = {};          $(document).keydown(this.onKeyDown.bind(this));      } @@ -72,8 +74,8 @@ class Display {          if (context) {              for (const definition of definitions) { -                definition.sentence = context.sentence || ''; -                definition.url = context.url || ''; +                definition.cloze = context.cloze; +                definition.url = context.url;              }          } @@ -106,8 +108,8 @@ class Display {          if (context) {              for (const definition of definitions) { -                definition.sentence = context.sentence || ''; -                definition.url = context.url || ''; +                definition.cloze = context.cloze; +                definition.url = context.url;              }          } @@ -179,7 +181,7 @@ class Display {          };          if (this.context) { -            context.sentence = this.context.sentence; +            context.cloze = this.context.cloze;              context.url = this.context.url;          } @@ -306,7 +308,7 @@ class Display {          if (this.context && this.context.source) {              const context = {                  url: this.context.source.url, -                sentence: this.context.source.sentence, +                cloze: this.context.source.cloze,                  index: this.context.source.index              }; |