* Kurzbeschreibung : Expression-Callback-Funktionen *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2015 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Replace the code
$code = replaceExpressionCode($data, $replacer);
- // Load include once
- loadIncludeOnce('inc/math-functions.php');
-
// Return the (maybe) replaced code
return $code;
}
// Expression call-back to handle jquery inclusion
function doExpressionJquery ($data) {
- // Default is compressed
- $jquery = 'jquery';
+ // Default is uncompressed
+ $scriptName = 'jquery';
$data['output_mode'] = '';
// Is there JS-mode?
// Is there a value?
if ($data['callback'] == 'js') {
// Then load special library
- $jquery .= '-' . $data['value'];
+ $scriptName .= '-' . $data['value'];
} // END - if
- // Is debug mode enabled?
- if ((isGetRequestElementSet('jquery')) || (isSessionVariableSet('jquery'))) {
- // Then use uncompressed
- $jquery .= '.uncompressed';
-
- // Remember it in session
+ // Is debug-mode enabled and parameter/session key 'jquery' given?
+ if ((!isDebugModeEnabled()) || ((!isGetRequestElementSet('jquery')) && (!isSessionVariableSet('jquery')))) {
+ // Productive systems want minimized version
+ $scriptName .= '.min';
+ } else {
+ // Debug version is uncompressed, remember it in session
setSession('jquery', '1');
- } // END - if
+ }
// Add {%url%} around it
- $replacer = '{%url' . $data['output_mode'] . '=js/' . $jquery . '.js?dummy=1%}';
+ $replacer = sprintf('{%%url%s=js/jquery/%s.js?dummy=1%%}', $data['output_mode'], $scriptName);
// Replace the code
$code = replaceExpressionCode($data, $replacer);
return $code;
}
-// [EOF]
-?>
+// Expression call-back to handle JavaScript inclusion
+function doExpressionJs ($data) {
+ die('<pre>'.print_r($data, TRUE));
+}