From d088234d67f3aa422796d922e08a07949dc53d83 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 4 Jun 2015 23:10:31 +0200 Subject: Move public files to ./public_html ./data/local is not moved because it contains likely untracked files and moving it would throw an error when updating. Signed-off-by: Florian Pritz --- data/js/lexer-input.js | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 data/js/lexer-input.js (limited to 'data/js/lexer-input.js') diff --git a/data/js/lexer-input.js b/data/js/lexer-input.js deleted file mode 100644 index 02dda36dd..000000000 --- a/data/js/lexer-input.js +++ /dev/null @@ -1,48 +0,0 @@ -(function () { -'use strict'; -define(['util', 'underscore', 'jquery', 'jquery-ui'], function (Util, _, $) { - var PrivateFunctions = { - switchLexer: function (lexer, baseUrl) { - var url = baseUrl + '/' + Util.fixedEncodeURIComponent(lexer); - window.location = url; - }, - lexerSelected: function (event, ui) { - event.preventDefault(); - var baseUrl = $(event.target).data('base-url'); - this.switchLexer(ui.item.value, baseUrl); - }, - setupAutocomplete: function () { - var lexerSource = []; - for (var key in appConfig.lexers) { - lexerSource.push({ label: appConfig.lexers[key], value: key }); - } - - $('.lexer-form input').autocomplete({ - source: lexerSource, - select: _.bind(PrivateFunctions.lexerSelected, PrivateFunctions) - }); - }, - setupEvents: function () { - $('.lexer-form').on('submit', _.bind(function (event) { - event.preventDefault(); - var input = $(event.target).find('input'); - var lexer = input.val(); - var baseUrl = input.data('base-url'); - this.switchLexer(lexer, baseUrl); - }, this)); - - $('.lexer-toggle').on('click', _.bind(function(event) { - Util.focusDropdownInput(event.target); - }, Util)); - } - }; - var LexerInput = { - initialize: function () { - PrivateFunctions.setupAutocomplete(); - PrivateFunctions.setupEvents(); - } - }; - - return LexerInput; -}); -})(); -- cgit v1.2.3-24-g4f1b