summaryrefslogtreecommitdiffstats
path: root/data/js/lexer-input.js
diff options
context:
space:
mode:
authorJoakim Reinert <mail@jreinert.com>2015-05-01 22:28:54 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-05 12:21:27 +0200
commitda835670f796774d1f98c05dfdf7da1c7ba2655a (patch)
tree22922112e521779d76c7f2b2c418cee64a729e17 /data/js/lexer-input.js
parentf7da6a0ee8c3b79deb8995e592a130a4a409dc70 (diff)
Use global appConfig js variable instead of passing it down
Initialize it in header
Diffstat (limited to 'data/js/lexer-input.js')
-rw-r--r--data/js/lexer-input.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/data/js/lexer-input.js b/data/js/lexer-input.js
index a4d3c7058..85c4a5432 100644
--- a/data/js/lexer-input.js
+++ b/data/js/lexer-input.js
@@ -11,10 +11,10 @@ define(['util', 'underscore', 'jquery-ui'], function (Util, _) {
var baseUrl = $(event.target).data('base-url');
this.switchLexer(ui.item.value, baseUrl);
},
- setupAutocomplete: function (lexers) {
+ setupAutocomplete: function () {
var lexerSource = [];
- for (var key in lexers) {
- lexerSource.push({ label: lexers[key], value: key });
+ for (var key in appConfig.lexers) {
+ lexerSource.push({ label: appConfig.lexers[key], value: key });
}
$('.lexer-form input').autocomplete({
@@ -37,8 +37,8 @@ define(['util', 'underscore', 'jquery-ui'], function (Util, _) {
}
};
var LexerInput = {
- initialize: function (lexers) {
- PrivateFunctions.setupAutocomplete(lexers);
+ initialize: function () {
+ PrivateFunctions.setupAutocomplete();
PrivateFunctions.setupEvents();
}
};