Commit 4259b7f4 authored by jonnybradley's avatar jonnybradley

[FIX] Changed (new) {img} 'thumb' mode to use {popup} (and thus jQuery ClueTip for mouseover).

Implemented 'background' param and fixes for params with values.
parent b3422623
......@@ -115,10 +115,11 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
var options = new Object();
for (param in params) {
var val = "";
if (params[param].indexOf("=") > -1) {
var arr = param.split("=");
pam = arr[0].toLowerCase();
val = arr[1];
var i = params[param].indexOf("=");
if (i > -1) {
var arr = params[param].split("=", 2);
pam = params[param].substring(0, i).toLowerCase();
val = params[param].substring(i+1);
} else {
pam = params[param].toLowerCase();
}
......@@ -129,6 +130,10 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
case "fullhtml":
options.cluetipClass = 'fullhtml';
break;
case "background":
options.cluetipClass = 'fullhtml';
tip = '<div style="background-image: url(' + val + '); height:' + options.height + 'px">' + tip + '</div>';
break;
case "onclick":
options.activation = 'click';
break;
......@@ -184,7 +189,7 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
// options.sticky = true; useful for css work
$jq(element).cluetip(options);
if (options.activation == "click") {
$jq(element).trigger('click');
} else {
......
......@@ -37,13 +37,13 @@ function smarty_function_popup($params, &$smarty)
case 'inarray':
$$_key = (string)$_value;
if ($_key == 'function' || $_key == 'inarray')
$append .= ',\'' . strtoupper($_key) . "'='$_value'";
$append .= ',\'' . strtoupper($_key) . "=$_value'";
break;
case 'caption':
case 'closetext':
case 'status':
$append .= ',\'' . strtoupper($_key) . "'=" . str_replace("'","\'",$_value) . "'";
$append .= ',\'' . strtoupper($_key) . "=" . str_replace("'","\'",$_value) . "'";
break;
case 'fgcolor':
......@@ -60,7 +60,7 @@ function smarty_function_popup($params, &$smarty)
case 'capicon':
case 'background':
case 'frame':
$append .= ',\'' . strtoupper($_key) . "'='$_value'";
$append .= ',\'' . strtoupper($_key) . "=$_value'";
break;
case 'textsize':
......@@ -79,7 +79,7 @@ function smarty_function_popup($params, &$smarty)
case 'pady':
case 'timeout':
case 'delay':
$append .= ',\'' . strtoupper($_key) . "'='$_value'";
$append .= ',\'' . strtoupper($_key) . "=$_value'";
break;
case 'sticky':
......
......@@ -592,13 +592,14 @@ function wikiplugin_img_info() {
$link = 'tiki-browse_image.php?imageId=' . $imgdata['id'];
} elseif (($imgdata['thumb'] == 'mouseover') || ($imgdata['thumb'] == 'mousesticky')) {
$javaset = 'true';
$link = 'javascript:void()';
$script = "\r\t" . '<script type="text/javascript" src="lib/overlib.js"></script>';
$mouseover = " onmouseover=\"return overlib('$data',BACKGROUND,'$browse_full_image',WIDTH,'$fwidth',HEIGHT,'$fheight'";
$link = 'javascript:void(0)';
$popup_params = array( 'text'=>$data, 'width'=>$fwidth, 'height'=>$fheight, 'background'=>$browse_full_image);
if ($imgdata['thumb'] == 'mousesticky') {
$mouseover .= ',STICKY';
$popup_params['sticky'] = true;
}
$mouseover .= ");\" onmouseout=\"nd();\"";
require_once $smarty->_get_plugin_filepath('function', 'popup');
$mouseover = ' ' . smarty_function_popup($popup_params, $smarty);
} else {
$link = $browse_full_image;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment