Changeset 447
- Timestamp:
- 01/13/06 13:53:36 (7 years ago)
- Location:
- trunk/plugins/ImageManager
- Files:
-
- 9 modified
-
Classes/GD.php (modified) (2 diffs)
-
Classes/IM.php (modified) (1 diff)
-
Classes/NetPBM.php (modified) (1 diff)
-
assets/imagelist.css (modified) (1 diff)
-
assets/images.js (modified) (1 diff)
-
assets/manager.js (modified) (4 diffs)
-
config.inc.php (modified) (1 diff)
-
images.php (modified) (4 diffs)
-
manager.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/ImageManager/Classes/GD.php
r43 r447 333 333 * better result. 334 334 * 335 * @param $new_x intnew width336 * @param $new_y intnew height335 * @param int $new_x new width 336 * @param int $new_y new height 337 337 * 338 338 * @return true on success or pear error … … 438 438 * Save the image file 439 439 * 440 * @param $filename stringthe name of the file to write to441 * @param $quality intoutput DPI, default is 85442 * @param $types stringdefine the output format, default440 * @param string $filename the name of the file to write to 441 * @param int $quality output DPI, default is 85 442 * @param string $types define the output format, default 443 443 * is the current used format 444 444 * -
trunk/plugins/ImageManager/Classes/IM.php
r174 r447 183 183 * Save the image file 184 184 * 185 * @param $filename stringthe name of the file to write to186 * @param $quality qualityimage dpi, default=75187 * @param $type string(JPG,PNG...)185 * @param string $filename the name of the file to write to 186 * @param quality $quality image dpi, default=75 187 * @param string $type (JPG,PNG...) 188 188 * 189 189 * @return none -
trunk/plugins/ImageManager/Classes/NetPBM.php
r43 r447 206 206 * Save the image file 207 207 * 208 * @param $filename stringthe name of the file to write to208 * @param string $filename the name of the file to write to 209 209 * @param string $type (jpeg,png...); 210 210 * @param int $quality 75 -
trunk/plugins/ImageManager/assets/imagelist.css
r256 r447 41 41 border:none; 42 42 } 43 .listview { width:100% } 44 .listview td, .listview th { text-align:left; font-size:small; } 45 .listview td.actions { text-align:right; } 46 .listview td.actions img { border:0px; } -
trunk/plugins/ImageManager/assets/images.js
r419 r447 56 56 var obj = topDoc.getElementById('orginal_width'); obj.value = width; 57 57 var obj = topDoc.getElementById('orginal_height'); obj.value = height; 58 // Set preview for the selected 59 topDoc.getElementById('f_preview').src = window.parent._backend_url + '__function=thumbs&img=' + filename; 60 58 61 update_selected(); 59 62 } -
trunk/plugins/ImageManager/assets/manager.js
r419 r447 56 56 if (param) 57 57 { 58 var image_src = param.f_url;59 58 var image_regex = new RegExp( '(https?://[^/]*)?' + base_url.replace(/\/$/, '') ); 60 59 param.f_url = param.f_url.replace( image_regex, "" ); 61 60 61 // The image URL may reference one of the automatically resized images 62 // (when the user alters the dimensions in the picker), clean that up 63 // so it looks right and we get back to a normal f_url 64 var rd = _resized_dir.replace(HTMLArea.RE_Specials, '\\$1'); 65 var rp = _resized_prefix.replace(HTMLArea.RE_Specials, '\\$1'); 66 var dreg = new RegExp('^(.*/)' + rd + '/' + rp + '_([0-9]+)x([0-9]+)_([^/]+)$'); 67 68 if(dreg.test(param.f_url)) 69 { 70 param.f_url = RegExp.$1 + RegExp.$4; 71 param.f_width = RegExp.$2; 72 param.f_height = RegExp.$3; 73 } 74 62 75 for (var id in param) 63 76 { … … 76 89 77 90 // Locate to the correct directory 78 var rd = _resized_dir.replace(HTMLArea.RE_Specials, '\\$1'); 79 var rp = _resized_prefix.replace(HTMLArea.RE_Specials, '\\$1'); 80 var dreg = new RegExp('^(.*/)(?:'+rd+')?(?:'+rp+'_[0-9]+x[0-9]+_)?([^/]+)$'); 81 91 var dreg = new RegExp('^(.*/)([^/]+)$'); 82 92 if(dreg.test(param['f_url'])) 83 93 { … … 93 103 } 94 104 } 105 document.getElementById('f_preview').src = _backend_url + '__function=thumbs&img=' + param.f_url; 95 106 } 96 107 … … 98 109 99 110 // For some reason dialog is not shrinkwrapping correctly in IE so we have to explicitly size it for now. 100 if(HTMLArea.is_ie) window.resizeTo(600, 460);111 // if(HTMLArea.is_ie) window.resizeTo(600, 460); 101 112 }; 102 113 -
trunk/plugins/ImageManager/config.inc.php
r256 r447 271 271 272 272 273 $IMConfig['ViewMode'] = 'thumbs'; 273 274 274 275 -
trunk/plugins/ImageManager/images.php
r293 r447 57 57 global $IMConfig; 58 58 59 switch($IMConfig['ViewMode']) 60 { 61 case 'details': 62 { 63 ?> 64 <script language="Javascript"> 65 <!-- 66 function showPreview(f_url) 67 { 68 69 window.parent.document.getElementById('f_preview').src = 70 window.parent._backend_url + '__function=thumbs&img=' + f_url; 71 } 72 //--> 73 </script> 74 <table class="listview"> 75 <thead> 76 <tr><th>Name</th><th>Filesize</th><th>Dimensions</th></tr></thead> 77 <tbody> 78 <?php 79 foreach($list as $entry => $file) 80 { 81 ?> 82 <tr> 83 <th><a href="#" class="thumb" style="cursor: pointer;" onclick="selectImage('<?php echo $file['relative'];?>', '<?php echo $entry; ?>', <?php echo $file['image'][0];?>, <?php echo $file['image'][1]; ?>);return false;" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>" onmouseover="showPreview('<?php echo $file['relative'];?>')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" ><?php echo $entry ?></a></th> 84 <td><?php echo Files::formatSize($file['stat']['size']); ?></td> 85 <td><?php if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } ?> 86 <td class="actions"> 87 <a href="<?php print $IMConfig['backend_url']; ?>__function=images&dir=<?php echo $relative; ?>&delf=<?php echo rawurlencode($file['relative']);?>" title="Trash" onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" border="0" /></a> 88 89 <a href="javascript:;" title="Edit" onclick="editImage('<?php echo rawurlencode($file['relative']);?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit" border="0" /></a> 90 </td> 91 </tr> 92 <?php 93 } 94 ?> 95 </tbody> 96 </table> 97 <?php 98 } 99 break; 100 101 case 'thumbs': 102 default : 103 { 59 104 foreach($list as $entry => $file) 60 105 { … … 73 118 </div> 74 119 <?php 75 }//foreach 120 } 121 } 122 } 76 123 }//function drawFiles 77 124 … … 85 132 global $IMConfig; 86 133 134 switch($IMConfig['ViewMode']) 135 { 136 case 'details': 137 { 138 139 } 140 break; 141 142 case 'thumbs': 143 default : 144 { 87 145 foreach($list as $path => $dir) 88 146 { ?> … … 97 155 <?php 98 156 } //foreach 157 } 158 } 159 160 99 161 }//function drawDirs 100 162 -
trunk/plugins/ImageManager/manager.php
r256 r447 106 106 <!-- image properties --> 107 107 108 <table border="0" cellspacing="0" cellpadding="0" >108 <table border="0" cellspacing="0" cellpadding="0" width="100%"> 109 109 <tr> 110 110 <th align="left">Description:</th> 111 111 <td colspan="6"> 112 <input type="text" id="f_alt" style="width:100%"/> 112 <input type="text" id="f_alt" style="width:95%"/> 113 </td> 114 <td rowspan="4" width="100" height="100" valign="middle" style="padding:4px;background-color:#CCC;border:1px inset;"> 115 <img src="" id="f_preview" /> 113 116 </td> 114 117 </tr>
