From 1c85db030e548e6bf7434e86070e4ba05917a325 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 6 May 2008 05:17:55 +0000 Subject: added in the ajax-loading div display on catalog processes, also relaxed the restrictions on filenames of non-site_charset, warning rather then fatal error --- admin/catalog.php | 9 +++++++++ docs/CHANGELOG | 3 +++ lib/class/catalog.class.php | 3 +-- lib/class/user.class.php | 2 +- lib/javascript-base.js | 14 +++++++++++++- lib/ui.lib.php | 17 +++++++++++++++-- 6 files changed, 42 insertions(+), 6 deletions(-) diff --git a/admin/catalog.php b/admin/catalog.php index 29f3db27..c9b470ff 100644 --- a/admin/catalog.php +++ b/admin/catalog.php @@ -40,6 +40,7 @@ switch ($_REQUEST['action']) { $catalog = new Catalog(); $_REQUEST['catalogs'] = $catalog->get_catalog_ids(); case 'add_to_catalog': + toggle_visible('ajax-loading'); ob_end_flush(); if (Config::get('demo_mode')) { break; } if ($_REQUEST['catalogs'] ) { @@ -52,10 +53,12 @@ switch ($_REQUEST['action']) { $title = _('Catalog Updated'); $body = ''; show_confirmation($title,$body,$url); + toggle_visible('ajax-loading'); break; case 'update_all_catalogs': $_REQUEST['catalogs'] = Catalog::get_catalog_ids(); case 'update_catalog': + toggle_visible('ajax-loading'); ob_end_flush(); /* If they are in demo mode stop here */ if (Config::get('demo_mode')) { break; } @@ -70,8 +73,10 @@ switch ($_REQUEST['action']) { $title = _('Catalog Updated'); $body = ''; show_confirmation($title,$body,$url); + toggle_visible('ajax-loading'); break; case 'full_service': + toggle_visible('ajax-loading'); ob_end_flush(); /* Make sure they aren't in demo mode */ if (Config::get('demo_mode')) { access_denied(); break; } @@ -93,6 +98,7 @@ switch ($_REQUEST['action']) { $title = _('Catalog Updated'); $body = ''; show_confirmation($title,$body,$url); + toggle_visible('ajax-loading'); break; case 'delete_catalog': /* Make sure they aren't in demo mode */ @@ -123,6 +129,7 @@ switch ($_REQUEST['action']) { $catalog = new Catalog(); $_REQUEST['catalogs'] = Catalog::get_catalog_ids(); case 'clean_catalog': + toggle_visible('ajax-loading'); ob_end_flush(); /* If they are in demo mode stop them here */ if (Config::get('demo_mode')) { break; } @@ -139,6 +146,7 @@ switch ($_REQUEST['action']) { $title = _('Catalog Cleaned'); $body = ''; show_confirmation($title,$body,$url); + toggle_visible('ajax-loading'); break; case 'update_catalog_settings': /* No Demo Here! */ @@ -246,6 +254,7 @@ switch ($_REQUEST['action']) { require_once Config::get('prefix') . '/templates/show_edit_catalog.inc.php'; break; case 'gather_album_art': + toggle_visible('ajax-loading'); ob_end_flush(); $catalogs = $_REQUEST['catalogs'] ? $_REQUEST['catalogs'] : Catalog::get_catalogs(); diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 175a2774..42cc54fc 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,9 @@ -------------------------------------------------------------------------- v.3.4 + - Relaxed Charset restrictions on catalog add filename with invalid + characters is now a warning, not a fatal error + - Fixed lack of loading indication during catalog processes - Fixed flash player not working if playlist_method included clear - Fixed album art thumbs never saving due to incorrect table reference - Fixed download having no filename if no catalog pattern diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 311697cf..bde17ed9 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -504,7 +504,6 @@ class Catalog { if (strcmp($full_file,iconv(Config::get('site_charset'),Config::get('site_charset') . '//IGNORE',$full_file)) != '0') { debug_event('read',$full_file . ' has non-' . Config::get('site_charset') . ' characters and can not be indexed','1'); Error::add('catalog_add',$full_file . ' ' . _('does not match site charset')); - continue; } } // end if iconv @@ -1395,7 +1394,7 @@ class Catalog { $file = str_replace(array('(',')','\''),'',$results['file']); echo "\n"; flush(); } //echos song count diff --git a/lib/class/user.class.php b/lib/class/user.class.php index ceeb7332..ae53038c 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -1,7 +1,7 @@ \n"; + echo "toggle_visible('$element');"; + echo "\n\n"; + +} // toggle_visible + + ?> -- cgit