1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Bugtracker #3926 - ensure absolute path to default 'blank.gif'

This commit is contained in:
e107steved
2007-05-28 18:49:08 +00:00
parent ed97494830
commit 29e44895b2
2 changed files with 10 additions and 10 deletions

View File

@@ -5,9 +5,9 @@
| e107 website system - Javascript File.
|
| $Source: /cvs_backup/e107_0.8/e107_files/e107.js,v $
| $Revision: 1.4 $
| $Date: 2007-04-12 23:29:09 $
| $Author: e107coders $
| $Revision: 1.5 $
| $Date: 2007-05-28 18:49:08 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -362,16 +362,16 @@ function duplicateHTML(copy,paste,baseid){
}
}
function preview_image(src_val,img_path){
function preview_image(src_val,img_path, not_found)
{
var ta;
var desti
var desti = src_val + '_prev';
ta = document.getElementById(src_val).value;
if(ta){
document.getElementById(desti).src = img_path + ta;
}else{
document.getElementById(desti).src = img_path + 'generic/blank.gif';
document.getElementById(desti).src = not_found;
}
return;
}

View File

@@ -1,4 +1,4 @@
// $Id: imageselector.sc,v 1.1.1.1 2006-12-02 04:33:39 mcfly_e107 Exp $
// $Id: imageselector.sc,v 1.2 2007-05-28 18:49:08 e107steved Exp $
global $sql,$parm;
@@ -24,7 +24,7 @@ global $sql,$parm;
$height = ($height) ? $height : "*";
$label = ($label) ? $label : " -- -- ";
$text .= "<select {$multi} class='tbox' name='$name' id='$name' onchange=\"preview_image('$name','$path');\">
$text .= "<select {$multi} class='tbox' name='$name' id='$name' onchange=\"preview_image('$name','$path','".e_IMAGE_ABS."generic/blank.gif');\">
<option value=''>".$label."</option>\n";
foreach($imagelist as $icon)
{
@@ -34,7 +34,7 @@ global $sql,$parm;
}
$text .= "</select>";
$pvw_default = ($default) ? $path.$default : e_IMAGE."generic/blank.gif";
$pvw_default = ($default) ? $path.$default : e_IMAGE_ABS."generic/blank.gif";
$text .= "&nbsp;<img id='{$name}_prev' src='{$pvw_default}' alt='' style='width:{$width};height:{$height}' />\n";