summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorJoakim Reinert <mail@jreinert.com>2015-05-02 00:01:00 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-05 12:21:27 +0200
commit46f0516a885ff28d63699c892eecd7a34b6a9ac3 (patch)
tree47daf7d8e43cc360763a396b6b59a2bc8ca76022 /data
parent1b7aeb5619638661f09ecaa6aba4b94e02b616ab (diff)
Explicitly load vendor js in modules that need them
Diffstat (limited to 'data')
-rw-r--r--data/js/application.js7
-rw-r--r--data/js/lexer-input.js2
-rw-r--r--data/js/tabwidth-input.js2
-rw-r--r--data/js/thumbnail-view.js2
-rw-r--r--data/js/uploader.js2
-rw-r--r--data/js/vendor.js17
6 files changed, 9 insertions, 23 deletions
diff --git a/data/js/application.js b/data/js/application.js
index c503da4f1..310362dd9 100644
--- a/data/js/application.js
+++ b/data/js/application.js
@@ -9,7 +9,9 @@ define(
'thumbnail-view',
'uploader',
'tablesorter',
- 'vendor'
+ 'jquery',
+ 'jquery.lazyload',
+ 'bootstrap'
],
function (
require,
@@ -18,7 +20,8 @@ define(
TabwidthInput,
ThumbnailView,
Uploader,
- TableSorter
+ TableSorter,
+ $
) {
var ui = {
lazyLoadingImages: 'img.lazyload'
diff --git a/data/js/lexer-input.js b/data/js/lexer-input.js
index 85c4a5432..02dda36dd 100644
--- a/data/js/lexer-input.js
+++ b/data/js/lexer-input.js
@@ -1,6 +1,6 @@
(function () {
'use strict';
-define(['util', 'underscore', 'jquery-ui'], function (Util, _) {
+define(['util', 'underscore', 'jquery', 'jquery-ui'], function (Util, _, $) {
var PrivateFunctions = {
switchLexer: function (lexer, baseUrl) {
var url = baseUrl + '/' + Util.fixedEncodeURIComponent(lexer);
diff --git a/data/js/tabwidth-input.js b/data/js/tabwidth-input.js
index 62e2bb3f2..9cc37516d 100644
--- a/data/js/tabwidth-input.js
+++ b/data/js/tabwidth-input.js
@@ -1,6 +1,6 @@
(function () {
'use strict';
-define(['jquery', 'util'], function ($, Util) {
+define(['jquery', 'underscore', 'util'], function ($, _, Util) {
var PrivateFunctions = {
setupEvents: function () {
$('.tabwidth-toggle').on('click', _.bind(function (event) {
diff --git a/data/js/thumbnail-view.js b/data/js/thumbnail-view.js
index 5478cdca9..88b89033b 100644
--- a/data/js/thumbnail-view.js
+++ b/data/js/thumbnail-view.js
@@ -1,6 +1,6 @@
(function () {
'use strict';
-define(['jquery'], function ($) {
+define(['jquery', 'underscore'], function ($, _) {
var ui = {
thumbnailLinks: '.upload_thumbnails a',
deleteButton: '#delete_button',
diff --git a/data/js/uploader.js b/data/js/uploader.js
index 31a16abb1..11ffc8d4a 100644
--- a/data/js/uploader.js
+++ b/data/js/uploader.js
@@ -1,6 +1,6 @@
(function () {
'use strict';
-define(['jquery'], function ($) {
+define(['jquery', 'underscore'], function ($, _) {
var ui = {
uploadButton: '#upload_button',
uploadInputs: 'input.file-upload',
diff --git a/data/js/vendor.js b/data/js/vendor.js
deleted file mode 100644
index b0b3862d3..000000000
--- a/data/js/vendor.js
+++ /dev/null
@@ -1,17 +0,0 @@
-(function () {
-'use strict';
-define([
- 'jquery',
- 'underscore',
- 'jquery-ui',
- 'bootstrap',
- 'jquery.colorbox',
- 'jquery.lazyload',
- 'jquery.tablesorter'
-], function (jquery, underscore) {
- return {
- $: jquery,
- _: underscore
- };
-});
-})();