# HG changeset patch # User Dan # Date 1186677279 14400 # Node ID b38afb86dcad6761b751168ee2cc353124dea31c # Parent ebd7003e73c6151b66f5b015ee17ace4ad12c2e9 Merging with bugfixes on Scribus diff -r ebd7003e73c6 -r b38afb86dcad plugins/gallery/browser.php --- 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 .= '

Upload an image

'; - } - - echo '

There are no items in this folder.

' . $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, '', '
'); - 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, '', '
'); + echo $html; if ( $session->user_level >= USER_LEVEL_ADMIN ) { diff -r ebd7003e73c6 -r b38afb86dcad plugins/gallery/gallery-bits.js --- 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) {}; } } diff -r ebd7003e73c6 -r b38afb86dcad plugins/gallery/upload.php --- 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 @@ Move to folder:
-
+
>> Select folder
@@ -465,7 +465,7 @@ Move to folder:
-
+
>> Select folder
@@ -508,7 +508,7 @@ Move all to folder:
Other folder fields on this page can override this for individual images.
-
+
>> Select folder
@@ -1062,7 +1062,7 @@ Upload to folder:
-
+
>> Select folder