X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fexpression-functions.php;h=743e4a450b2096d1a2626491b2f12eb552b62ba9;hb=1a2db3555e25e6ef6bc397cc9a15b2afb8c7557e;hp=3e8da702f936ba04e5f8e5d034e9aa767d54e5e0;hpb=c5e4e7531db6a636c66ba2e672b832f9a13be648;p=mailer.git diff --git a/inc/expression-functions.php b/inc/expression-functions.php index 3e8da702f9..743e4a450b 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -524,19 +524,32 @@ function doExpressionFormClose ($data) { // Expression call-back to handle jquery inclusion function doExpressionJquery ($data) { // Default is compressed - $jquery = 'jquery.js'; + $jquery = 'jquery'; + $data['output_mode'] = ''; + + // Is there JS-mode? + if ($data['callback'] == 'js') { + // Switch to it + $data['output_mode'] = ',js'; + } // END - if + + // Is there a value? + if ($data['callback'] == 'js') { + // Then load special library + $jquery .= '-' . $data['value']; + } // END - if // Is debug mode enabled? if ((isGetRequestElementSet('jquery')) || (isSessionVariableSet('jquery'))) { // Then use uncompressed - $jquery = 'jquery-uncompressed.js'; + $jquery .= '.uncompressed'; // Remember it in session setSession('jquery', '1'); } // END - if // Add {%url%} around it - $replacer = '{%url=js/' . $jquery . '?dummy=1%}'; + $replacer = '{%url' . $data['output_mode'] . '=js/' . $jquery . '.js?dummy=1%}'; // Replace the code $code = replaceExpressionCode($data, $replacer);