use requirejs if available
This commit is contained in:
parent
c933d261e2
commit
ad3953f794
@ -4,6 +4,9 @@ Changelog
|
|||||||
2.4.0 (unreleased)
|
2.4.0 (unreleased)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
- use requirejs if available
|
||||||
|
[vangheem]
|
||||||
|
|
||||||
- Rename @@discussion-settings to @@discussion-controlpanel
|
- Rename @@discussion-settings to @@discussion-controlpanel
|
||||||
[maartenkling]
|
[maartenkling]
|
||||||
|
|
||||||
|
@ -3,7 +3,17 @@
|
|||||||
* jQuery functions for the plone.app.discussion comment viewlet and form.
|
* jQuery functions for the plone.app.discussion comment viewlet and form.
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
(function ($) {
|
|
||||||
|
if(require === undefined){
|
||||||
|
require = function(reqs, torun){
|
||||||
|
'use strict';
|
||||||
|
return torun(window.jQuery);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
require([
|
||||||
|
'jquery'
|
||||||
|
], function ($) {
|
||||||
// This unnamed function allows us to use $ inside of a block of code
|
// This unnamed function allows us to use $ inside of a block of code
|
||||||
// without permanently overwriting $.
|
// without permanently overwriting $.
|
||||||
// http://docs.jquery.com/Using_jQuery_with_Other_Libraries
|
// http://docs.jquery.com/Using_jQuery_with_Other_Libraries
|
||||||
@ -249,4 +259,4 @@
|
|||||||
|
|
||||||
//#JSCOVERAGE_ENDIF
|
//#JSCOVERAGE_ENDIF
|
||||||
|
|
||||||
}(jQuery));
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user