summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspocky <spocky@ampache>2007-10-15 21:02:50 +0000
committerspocky <spocky@ampache>2007-10-15 21:02:50 +0000
commitb49eff3e1330025e202d2ff22dc27da9583f5b2b (patch)
tree3ec5f30c3e533519c936abf454bd40f1dbb7397f
parent0f0ec52f25badff588468177b3e80c10c92b3a30 (diff)
downloadampache-b49eff3e1330025e202d2ff22dc27da9583f5b2b.tar.gz
ampache-b49eff3e1330025e202d2ff22dc27da9583f5b2b.tar.bz2
ampache-b49eff3e1330025e202d2ff22dc27da9583f5b2b.zip
Updated ajax loader
Updated pager html/css Fixed some Greysme's bugs Didn't fix ajax links w3c conformance :)
-rw-r--r--lib/class/ajax.class.php8
-rw-r--r--templates/list_header.inc.php25
-rw-r--r--themes/classic/images/ajax-loader.gifbin0 -> 404 bytes
-rw-r--r--themes/classic/templates/default.css43
-rw-r--r--themes/greysme/images/ajax-loader.gifbin0 -> 5144 bytes
-rw-r--r--themes/greysme/images/ampache.pngbin16648 -> 16627 bytes
-rw-r--r--themes/greysme/templates/default.css35
7 files changed, 46 insertions, 65 deletions
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 &amp; 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) {
?>
-<table class="list-header" cellpadding="1" cellspacing="0" width="100%">
-<tr>
- <td valign="top">
- <?php echo Ajax::text('?action=page&start=' . $prev_offset,_('Prev'),'browse_' . $uid . 'prev','','list-header'); ?>
- </td>
- <td align="center">
+<div class="list-header">
+
+ <?php echo Ajax::text('?action=page&start=' . $prev_offset,_('Prev'),'browse_' . $uid . 'prev','','prev'); ?>
+ <?php echo Ajax::text('?action=page&start=' . $next_offset,_('Next'),'browse_' . $uid . 'next','','next'); ?>
<?php
/* Echo Everything below us */
foreach ($page_data['down'] as $page => $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;
?>
- <div class="list-header-selected"><?php echo $current_page; ?></div>
+ <span class="page-nb selected"><?php echo $current_page; ?></span>
<?php
-
+
/* Echo Out Everything Above Us */
foreach ($page_data['up'] as $page=>$offset) {
if ($offset === '...') { echo '...&nbsp;'; }
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
?>
- </td>
- <td valign="top">
- <?php echo Ajax::text('?action=page&start=' . $next_offset,_('Next'),'browse_' . $uid . 'next','','list-header'); ?>
- </td>
-</tr>
-</table>
+</div>
<?php
} // if stuff
?>
diff --git a/themes/classic/images/ajax-loader.gif b/themes/classic/images/ajax-loader.gif
new file mode 100644
index 00000000..62ece0b9
--- /dev/null
+++ b/themes/classic/images/ajax-loader.gif
Binary files 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
--- /dev/null
+++ b/themes/greysme/images/ajax-loader.gif
Binary files differ
diff --git a/themes/greysme/images/ampache.png b/themes/greysme/images/ampache.png
index 5107bdb5..4145ac62 100644
--- a/themes/greysme/images/ampache.png
+++ b/themes/greysme/images/ampache.png
Binary files 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 {