frontend jquery.noConflict mode set deprecated
and make this configurable by $serendipity['capabilities']['jquery-noconflict'] = false; References #166
This commit is contained in:
parent
4437e01af7
commit
13c9b4b74d
20
docs/NEWS
20
docs/NEWS
@ -4,19 +4,31 @@
|
||||
Version 2.0-beta3 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Alle frontend themes that use the pre set jquery library
|
||||
will have the jquery.noConflict-mode activated for compat reasons.
|
||||
This mode is now set deprecated and will be removed in future.
|
||||
If you (have already) set
|
||||
$serendipity['capabilities']['jquery'] = false;
|
||||
there is no need to do anything further. For the ones wanting to
|
||||
use the core set jquery lib, but do not want to rely on the
|
||||
noConflict-mode, please use (the now recommended)
|
||||
$serendipity['capabilities']['jquery-noconflict'] = false;
|
||||
in your serendipity_config_local.inc.php or your templates
|
||||
config.inc.php file.
|
||||
|
||||
* Due to distinction of backend and frontend themes, each theme
|
||||
that provides a custom jquery.js now only does so for the
|
||||
frontend. The backend now listens to a:
|
||||
|
||||
|
||||
$serendipity['capabilities']['jquery_backend'] = false;
|
||||
|
||||
|
||||
variable, and the file needs to be jquery_backend.js that
|
||||
a backend theme would reference to.
|
||||
|
||||
|
||||
* Changed 2k11's config.inc.php file to provide a more stable
|
||||
call of event hooks so that other templates can also hook
|
||||
their own events.
|
||||
|
||||
|
||||
* Changed JS for category filtering and its reset button to be a
|
||||
reusable function, which is now also used in the list of
|
||||
installable plugins.
|
||||
|
@ -15,8 +15,9 @@ include_once S9Y_INCLUDE_PATH . 'include/functions.inc.php';
|
||||
* Future use: Global variable can be customized/overriden by your own plugin on the frontend_configure event
|
||||
* or during runtime,
|
||||
*/
|
||||
$serendipity['capabilities']['jquery'] = true;
|
||||
$serendipity['capabilities']['jquery_backend'] = true;
|
||||
$serendipity['capabilities']['jquery'] = true;
|
||||
$serendipity['capabilities']['jquery_backend'] = true;
|
||||
$serendipity['capabilities']['jquery-noconflict'] = true; //set as being deprecated
|
||||
$serendipity['core_events']['frontend_header']['jquery'] = 'serendipity_plugin_api_frontend_header';
|
||||
$serendipity['core_events']['backend_header']['jquery'] = 'serendipity_plugin_api_backend_header';
|
||||
|
||||
@ -32,8 +33,12 @@ function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData,
|
||||
if (!$check && $serendipity['capabilities']['jquery']) {
|
||||
?>
|
||||
<script src="<?php echo $serendipity['serendipityHTTPPath']; ?>templates/jquery.js"></script>
|
||||
<?php
|
||||
if ($serendipity['capabilities']['jquery-noconflict']) {
|
||||
?>
|
||||
<script>jQuery.noConflict();</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user