Pull jquery using require.js rather than as a script tag and fix require to pass jquery as a parameter
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-bootload="/customize/main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-bootload="/customize/main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-bootload="/customize/main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
define([
|
||||
'jquery',
|
||||
'/customize/application_config.js',
|
||||
'/common/cryptpad-common.js',
|
||||
'/bower_components/jquery/dist/jquery.min.js',
|
||||
], function (Config, Cryptpad) {
|
||||
var $ = window.$;
|
||||
'/common/cryptpad-common.js'
|
||||
], function ($, Config, Cryptpad) {
|
||||
|
||||
var APP = window.APP = {
|
||||
Cryptpad: Cryptpad,
|
||||
@@ -191,4 +190,3 @@ define([
|
||||
console.log("ready");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -23,12 +23,10 @@ var getLanguage = function () {
|
||||
};
|
||||
var language = getLanguage();
|
||||
|
||||
var req = ['/customize/translations/messages.js'];
|
||||
var req = ['jquery', '/customize/translations/messages.js'];
|
||||
if (language && map[language]) { req.push('/customize/translations/messages.' + language + '.js'); }
|
||||
req.push('/bower_components/jquery/dist/jquery.min.js');
|
||||
|
||||
define(req, function(Default, Language) {
|
||||
var $ = window.jQuery;
|
||||
define(req, function($, Default, Language) {
|
||||
|
||||
var externalMap = JSON.parse(JSON.stringify(map));
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-bootload="/customize/main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
@@ -163,12 +163,8 @@
|
||||
|
||||
if (typeof(module) !== 'undefined' && module.exports) {
|
||||
module.exports = Frame;
|
||||
}
|
||||
else if ((typeof(define) !== 'undefined' && define !== null) &&
|
||||
(define.amd !== null)) {
|
||||
define([
|
||||
'/bower_components/jquery/dist/jquery.min.js',
|
||||
], function () {
|
||||
} else if (typeof(define) === 'function' && define.amd) {
|
||||
define(['jquery'], function ($) {
|
||||
return Frame;
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
define([
|
||||
'/customize/share/frame.js',
|
||||
'/bower_components/jquery/dist/jquery.min.js',
|
||||
], function (Frame) {
|
||||
var $ = window.jQuery;
|
||||
'jquery',
|
||||
'/customize/share/frame.js'
|
||||
], function ($, Frame) {
|
||||
|
||||
var domain = 'https://beta.cryptpad.fr';
|
||||
|
||||
@@ -123,4 +122,3 @@ define([
|
||||
}].forEach(runTest);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
{{script}}
|
||||
</head>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-bootload="/customize/main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user