--- a/plugins/gallery/browser.php Thu Aug 09 12:31:24 2007 -0400
+++ b/plugins/gallery/browser.php Thu Aug 09 12:34:39 2007 -0400
@@ -352,8 +352,7 @@
{
if ( !isset($first_row['folder_id']) )
{
- // $first_row['folder_id'] =& $first_row['img_id'];
- $first_row['folder_id'] = 'NULL';
+ $first_row['folder_id'] =& $first_row['img_id'];
}
if ( !isset($first_row['folder_id']) )
{
@@ -489,21 +488,8 @@
$per_page = $rows_in_browser * 5;
- if ( $db->numrows($img_query) < 1 )
- {
- $html = '';
- if ( $session->user_level >= USER_LEVEL_ADMIN )
- {
- $html .= '<p><a href="' . makeUrlNS('Special', 'GalleryUpload', 'folder=' . $first_row['img_id'], true) . '">Upload an image</a></p>';
- }
-
- echo '<p>There are no items in this folder.</p>' . $html;
- }
- else
- {
- $html = paginate($img_query, '{img_id}', $db->numrows($img_query), makeUrl($paths->fullpage, 'sort=' . $sort_column . '&order=' . $sort_order . '&start=%s', true), $start, $per_page, $callers, '<table border="0" cellspacing="8"><tr>', '</tr></table>');
- echo $html;
- }
+ $html = paginate($img_query, '{img_id}', $db->numrows($img_query), makeUrl($paths->fullpage, 'sort=' . $sort_column . '&order=' . $sort_order . '&start=%s', false), $start, $per_page, $callers, '<table border="0" cellspacing="8"><tr>', '</tr></table>');
+ echo $html;
if ( $session->user_level >= USER_LEVEL_ADMIN )
{
--- a/plugins/gallery/gallery-bits.js Thu Aug 09 12:31:24 2007 -0400
+++ b/plugins/gallery/gallery-bits.js Thu Aug 09 12:34:39 2007 -0400
@@ -1,5 +1,5 @@
/*
- * Misc functions for Enano.Img Gallery.
+ * Misc functions for Snapr.
*/
function gal_toggle(elem, img, img_open, img_close)
@@ -9,15 +9,19 @@
img_close = scriptPath + '/plugins/gallery/toggle-closed.png';
img_open = scriptPath + '/plugins/gallery/toggle-open.png';
}
- if ( elem.style.display == 'block' )
+ if ( elem.style.display == 'none' || !elem.style.display )
{
- elem.style.display = 'none';
- img.src = img_close;
+ elem.style.display = 'block';
+ try {
+ img.src = img_open;
+ } catch(e) {};
}
else
{
- elem.style.display = 'block';
- img.src = img_open;
+ elem.style.display = 'none';
+ try {
+ img.src = img_close;
+ } catch(e) {};
}
}
--- a/plugins/gallery/upload.php Thu Aug 09 12:31:24 2007 -0400
+++ b/plugins/gallery/upload.php Thu Aug 09 12:34:39 2007 -0400
@@ -390,7 +390,7 @@
<td class="row2">Move to folder:</td>
<td class="row1">
<div class="toggle">
- <div class="head" onclick="gal_toggle(this.nextSibling.nextSibling, this.childNodes[1]);">
+ <div class="head" onclick="gal_toggle( ( IE ? this.nextSibling : this.nextSibling.nextSibling ), this.childNodes[1]);">
<img alt=">>" src="<?php echo scriptPath; ?>/plugins/gallery/toggle-closed.png" class="toggler" />
Select folder
</div>
@@ -465,7 +465,7 @@
<td class="row2">Move to folder:</td>
<td class="row1">
<div class="toggle">
- <div class="head" onclick="gal_toggle(this.nextSibling.nextSibling, this.childNodes[1]);">
+ <div class="head" onclick="gal_toggle( ( IE ? this.nextSibling : this.nextSibling.nextSibling ), this.childNodes[1]);">
<img alt=">>" src="<?php echo scriptPath; ?>/plugins/gallery/toggle-closed.png" class="toggler" />
Select folder
</div>
@@ -508,7 +508,7 @@
<td class="row2">Move all to folder:<br /><small>Other folder fields on this page can override this for individual images.</small></td>
<td class="row1" style="width: 70%;">
<div class="toggle">
- <div class="head" onclick="gal_toggle(this.nextSibling.nextSibling, this.childNodes[1]);">
+ <div class="head" onclick="gal_toggle( ( IE ? this.nextSibling : this.nextSibling.nextSibling ), this.childNodes[1]);">
<img alt=">>" src="<?php echo scriptPath; ?>/plugins/gallery/toggle-closed.png" class="toggler" />
Select folder
</div>
@@ -1062,7 +1062,7 @@
<td class="row2">Upload to folder:</td>
<td class="row1">
<div class="toggle">
- <div class="head" onclick="gal_toggle(this.nextSibling.nextSibling, this.childNodes[1]);">
+ <div class="head" onclick="gal_toggle( ( IE ? this.nextSibling : this.nextSibling.nextSibling ), this.childNodes[1]);">
<img alt=">>" src="<?php echo scriptPath; ?>/plugins/gallery/toggle-closed.png" class="toggler" />
Select folder
</div>