1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +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. | e107 website system - Javascript File.
| |
| $Source: /cvs_backup/e107_0.8/e107_files/e107.js,v $ | $Source: /cvs_backup/e107_0.8/e107_files/e107.js,v $
| $Revision: 1.4 $ | $Revision: 1.5 $
| $Date: 2007-04-12 23:29:09 $ | $Date: 2007-05-28 18:49:08 $
| $Author: e107coders $ | $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 ta;
var desti
var desti = src_val + '_prev'; var desti = src_val + '_prev';
ta = document.getElementById(src_val).value; ta = document.getElementById(src_val).value;
if(ta){ if(ta){
document.getElementById(desti).src = img_path + ta; document.getElementById(desti).src = img_path + ta;
}else{ }else{
document.getElementById(desti).src = img_path + 'generic/blank.gif'; document.getElementById(desti).src = not_found;
} }
return; 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; global $sql,$parm;
@@ -24,7 +24,7 @@ global $sql,$parm;
$height = ($height) ? $height : "*"; $height = ($height) ? $height : "*";
$label = ($label) ? $label : " -- -- "; $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"; <option value=''>".$label."</option>\n";
foreach($imagelist as $icon) foreach($imagelist as $icon)
{ {
@@ -34,7 +34,7 @@ global $sql,$parm;
} }
$text .= "</select>"; $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"; $text .= "&nbsp;<img id='{$name}_prev' src='{$pvw_default}' alt='' style='width:{$width};height:{$height}' />\n";