From b49eff3e1330025e202d2ff22dc27da9583f5b2b Mon Sep 17 00:00:00 2001 From: spocky Date: Mon, 15 Oct 2007 21:02:50 +0000 Subject: Updated ajax loader Updated pager html/css Fixed some Greysme's bugs Didn't fix ajax links w3c conformance :) --- lib/class/ajax.class.php | 8 ++++++- templates/list_header.inc.php | 25 +++++++------------- themes/classic/images/ajax-loader.gif | Bin 0 -> 404 bytes themes/classic/templates/default.css | 43 ++++++++++------------------------ themes/greysme/images/ajax-loader.gif | Bin 0 -> 5144 bytes themes/greysme/images/ampache.png | Bin 16648 -> 16627 bytes themes/greysme/templates/default.css | 35 ++++++++++++++------------- 7 files changed, 46 insertions(+), 65 deletions(-) create mode 100644 themes/classic/images/ajax-loader.gif create mode 100644 themes/greysme/images/ajax-loader.gif diff --git a/lib/class/ajax.class.php b/lib/class/ajax.class.php index 2c0c9aff..f5984912 100644 --- a/lib/class/ajax.class.php +++ b/lib/class/ajax.class.php @@ -81,7 +81,13 @@ class Ajax { else { $source_txt = "'$source'"; } - + + /* + Replaces ampersand with & for w3c conformance. + Fixme: ajax doesn't seem to work anymore with this... + */ + //$url = htmlspecialchars($url); + if ($post) { $ajax_string = "ajaxPost('$url','$post',$source_txt)"; } diff --git a/templates/list_header.inc.php b/templates/list_header.inc.php index bf5381a5..9469cd85 100644 --- a/templates/list_header.inc.php +++ b/templates/list_header.inc.php @@ -93,12 +93,10 @@ ksort($page_data['down']); // are there enough items to even need this view? if ($pages > 1) { ?> - - - - - - -
- - +
+ + + $offset) { @@ -106,30 +104,25 @@ if ($pages > 1) { else { // Hack Alert $page++; - echo Ajax::text('?action=page&start=' . $offset,$page,'browse_' . $uid . 'page_' . $page,'','list-header'); + echo Ajax::text('?action=page&start=' . $offset,$page,'browse_' . $uid . 'page_' . $page,'','page-nb'); } } // end foreach down /* Echo Out current Page */ $current_page = $current_page +1; ?> -
+ $offset) { if ($offset === '...') { echo '... '; } else { - echo Ajax::text('?action=page&start=' . $offset,$page,'browse_' . $uid . 'page_' . $page,'','list-header'); + echo Ajax::text('?action=page&start=' . $offset,$page,'browse_' . $uid . 'page_' . $page,'','page-nb'); } // end else } // end foreach up ?> -
- -
+ diff --git a/themes/classic/images/ajax-loader.gif b/themes/classic/images/ajax-loader.gif new file mode 100644 index 00000000..62ece0b9 Binary files /dev/null and b/themes/classic/images/ajax-loader.gif differ diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css index 3b6ab80d..d979f36f 100644 --- a/themes/classic/templates/default.css +++ b/themes/classic/templates/default.css @@ -556,29 +556,12 @@ h3#content_title span { /************************************************/ /* List Header Styles */ /************************************************/ -table.list-header { - margin:3px; -} -div.list-header { - cursor:pointer; - text-decoration: none; - font-size: 0.8em; - padding:2px 4px 0px 4px; - border: 1px solid #000; - display:inline; -} -div.list-header-selected { - text-decoration: none; - font-size: 0.8em; - padding:2px 4px 0px 4px; - border: 1px solid #000; - background: #e0e0e0; - display:inline; -} -div.list-header:hover { - background: #d0d0d0; -} - +.list-header{margin:7px 0; text-align:center; font-size: 0.8em;} +.list-header .prev{float:left;} +.list-header .next{float:right;} +.list-header .selected{background: #e0e0e0;} +.list-header .page-nb{padding:1px;border: 1px solid #ccc;text-decoration: none;} +.list-header .page-nb:hover{background: #d0d0d0;} /************************************************/ /* Text Action Styles */ @@ -738,14 +721,14 @@ td.user_disabled { #ajax-loading { position: absolute; - right: 0px; - top: 0px; - float: right; - z-index: 100; - background: #99ccff; + top:42px; + left:345px; + width:43px; + height:11px; + z-index:100; + background: url(../images/ajax-loader.gif) no-repeat; display: none; - padding: 3px 25px 5px 25px; - border: 1px solid #000; + text-indent:-9999em; } #mpdpl td { diff --git a/themes/greysme/images/ajax-loader.gif b/themes/greysme/images/ajax-loader.gif new file mode 100644 index 00000000..30fdb5d5 Binary files /dev/null and b/themes/greysme/images/ajax-loader.gif differ diff --git a/themes/greysme/images/ampache.png b/themes/greysme/images/ampache.png index 5107bdb5..4145ac62 100644 Binary files a/themes/greysme/images/ampache.png and b/themes/greysme/images/ampache.png differ diff --git a/themes/greysme/templates/default.css b/themes/greysme/templates/default.css index e7d11213..19ff832e 100644 --- a/themes/greysme/templates/default.css +++ b/themes/greysme/templates/default.css @@ -233,7 +233,8 @@ h3#content_title span {} /* Doesn't exist anymore (?) */ position:absolute; right:0px; top:15px; - background: #050505 url(../images/button_back.png) 0 100% repeat-x; + background: #050505 url(../images/button_back.png) 0 100% repeat-x !important; + background: #050505; border:2px solid #e9ad51; width:15em; padding:0.3em; @@ -619,14 +620,12 @@ h3#content_title span {} /* Doesn't exist anymore (?) */ /************************************************/ /* List Header Styles */ /************************************************/ - -.list-header { - text-decoration: none; -} - -.list-header:hover { - color:#071fd4; -} +.list-header{margin:7px 0; text-align:center; font-size: 0.9em;} +.list-header .prev{float:left;} +.list-header .next{float:right;} +.list-header .selected{} +.list-header .page-nb{padding:1px;border: 1px solid #111;} +.list-header a:hover{background: transparent; border-color:#e9ad51;} /************************************************/ @@ -823,15 +822,15 @@ input.text_input { .display {} #ajax-loading { - position: absolute; - right: 0px; - top: 0px; - float: right; - z-index: 100; - background: #99ccff; - display: none; - padding: 3px 25px 5px 25px; - border: 1px solid #000; + position: absolute; + top:106px; + left:42%; + width:265px; + height:50px; + z-index: 100; + background: url(../images/ajax-loader.gif) no-repeat; + text-indent:-9999em; + display: none; } #mpdpl td { -- cgit