Skip to content
Permalink
Browse files

Ericg/enhanced sort (#41)

#17  add reviewer name and sorting to A file tables
    - add reivewer column
    - use jquery.tablesorter for client side sorting
    - shorten long nav panel links
    - widen main table div
    - remove redundent date table from a file listing
    - shorten long functions
    - use single quotes for class names

* update per comments from jim
   - show disk categories as a string
   - Contact Us -> Submit Music
   - remove merge terds
   - remove unnecessary server side A file sorting
   - remove show tag logic
   - show reivew iff user logged in
   - restore print link
   - tighten up table vertical spacing
   - show logged in user's name
   - fix Activity table header names
   - support jquery import with https
  • Loading branch information...
eric-gilbertson authored and RocketMan committed Jul 1, 2019
1 parent bfaf08b commit 7c0c9cf29ae1c3209df963d64eabcf79fd58e573
@@ -111,7 +111,7 @@
* menu items here are appended to the defaults
*/
'custom_menu' => [
// [ 'a', 'contact%', 'Contact Example Music', ZK\UI\Example_Contacts::class ],
// [ 'a', 'contact%', 'Submit Music', ZK\UI\Example_Contacts::class ],
],
/**
@@ -108,7 +108,7 @@
* menu items here are appended to the defaults
*/
'custom_menu' => [
[ 'a', 'contact%', 'Contact KZSU Music', ZK\UI\KzsuContacts::class ],
[ 'a', 'contact%', 'Submit Music', ZK\UI\KzsuContacts::class ],
],
/**
@@ -35,13 +35,13 @@
[ 'a', 'find%', 'Find It!', ZK\UI\Search::class ],
[ 'a', 'search', 'Classic Search', ZK\UI\Search::class ],
[ 'm', 'editor', 'Library Editor', ZK\UI\Editor::class ],
[ 'a', 'viewRecent%', 'Recent Album Reviews', ZK\UI\Reviews::class ],
[ 'a', 'viewRecent%', 'Recent Reviews', ZK\UI\Reviews::class ],
[ 'a', 'searchReview%', 0, ZK\UI\Reviews::class ],
[ 'a', 'addmgr', 'A-File', ZK\UI\AddManager::class ],
[ 'u', 'newList%', 'New Playlist', ZK\UI\Playlists::class ],
[ 'u', 'editList%', 'Edit Playlist', ZK\UI\Playlists::class ],
[ 'u', 'showLink', 'Link to Playlist', ZK\UI\Playlists::class ],
[ 'u', 'importExport', 'Import/Export Playlist', ZK\UI\Playlists::class ],
[ 'u', 'importExport', 'Import/Export', ZK\UI\Playlists::class ],
[ 'a', 'viewDJ%', 'DJ Zone!', ZK\UI\Playlists::class ],
[ 'a', 'viewDate', 'Playlists by Date', ZK\UI\Playlists::class ],
[ 'u', 'updateDJInfo', 'Update Profile', ZK\UI\Playlists::class ],
@@ -0,0 +1,189 @@
/*************
Default Theme
*************/
/* overall */
.tablesorter-default {
width: 100%;
font: 12px/18px Arial, Sans-serif;
color: #333;
background-color: #fff;
border-spacing: 0;
margin: 10px 0 15px;
text-align: left;
}

/* header */
.tablesorter-default th,
.tablesorter-default thead td {
font: bold 12px/18px Arial, Sans-serif;
color: #000;
background-color: #fff;
border-collapse: collapse;
border-bottom: #ccc 2px solid;
padding: 0;
}
.tablesorter-default tfoot th,
.tablesorter-default tfoot td {
border: 0;
}
.tablesorter-default .header,
.tablesorter-default .tablesorter-header {
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
background-position: center right;
background-repeat: no-repeat;
cursor: pointer;
white-space: normal;
padding: 4px 20px 4px 4px;
}
.tablesorter-default thead .headerSortUp,
.tablesorter-default thead .tablesorter-headerSortUp,
.tablesorter-default thead .tablesorter-headerAsc {
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
border-bottom: #000 2px solid;
}
.tablesorter-default thead .headerSortDown,
.tablesorter-default thead .tablesorter-headerSortDown,
.tablesorter-default thead .tablesorter-headerDesc {
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
border-bottom: #000 2px solid;
}
.tablesorter-default thead .sorter-false {
background-image: none;
cursor: default;
padding: 4px;
}

/* tfoot */
.tablesorter-default tfoot .tablesorter-headerSortUp,
.tablesorter-default tfoot .tablesorter-headerSortDown,
.tablesorter-default tfoot .tablesorter-headerAsc,
.tablesorter-default tfoot .tablesorter-headerDesc {
border-top: #000 2px solid;
}

/* tbody */
.tablesorter-default td {
background-color: #fff;
border-bottom: #ccc 1px solid;
padding: 4px;
vertical-align: top;
}

/* hovered row colors */
.tablesorter-default tbody > tr:hover > td,
.tablesorter-default tbody > tr.even:hover > td,
.tablesorter-default tbody > tr.odd:hover > td {
background: #fff;
color: #000;
}

/* table processing indicator */
.tablesorter-default .tablesorter-processing {
background-position: center center !important;
background-repeat: no-repeat !important;
/* background-image: url(../addons/pager/icons/loading.gif) !important; */
background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=') !important;
}

/* Zebra Widget - row alternating colors */
.tablesorter-default tr.odd td {
background-color: #dfdfdf;
}
.tablesorter-default tr.even td {
background-color: #efefef;
}

/* Column Widget - column sort colors */
.tablesorter-default tr.odd td.primary {
background-color: #bfbfbf;
}
.tablesorter-default td.primary,
.tablesorter-default tr.even td.primary {
background-color: #d9d9d9;
}
.tablesorter-default tr.odd td.secondary {
background-color: #d9d9d9;
}
.tablesorter-default td.secondary,
.tablesorter-default tr.even td.secondary {
background-color: #e6e6e6;
}
.tablesorter-default tr.odd td.tertiary {
background-color: #e6e6e6;
}
.tablesorter-default td.tertiary,
.tablesorter-default tr.even td.tertiary {
background-color: #f2f2f2;
}

/* caption */
caption {
background: #fff;
}

/* filter widget */
.tablesorter-default .tablesorter-filter-row td {
background: #eee;
border-bottom: #ccc 1px solid;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-default .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-default .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-default .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-default .tablesorter-filter {
width: 95%;
height: auto;
margin: 4px;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* rows hidden by filtering (needed for child rows) */
.tablesorter .filtered {
display: none;
}

/* ajax error row */
.tablesorter .tablesorter-errorRow td {
text-align: center;
cursor: pointer;
background-color: #e6bf99;
}
@@ -211,7 +211,7 @@ DIV.leftNav {
margin-top: 0px;
margin-left: 2px;
text-align: left;
width: 195px;
width: 165px;
}
DIV.leftNav A {
color: #000000;
@@ -238,8 +238,8 @@ DIV.headerLogo IMG {
}
DIV.content {
float: right;
width: 650px;
padding: 10px 10px 30px 30px;
width: 710px;
padding: 10px;
min-height: 450px;
margin-left: auto;
margin-right: auto;
@@ -510,6 +510,15 @@ A.calLink {
background-image: URL('../img/list_dn.gif');
}

/* tighten up tablesorter's spacing */
.tablesorter-default td {
padding: 0;
}

.tablesorter-default .header, .tablesorter-default .tablesorter-header {
padding: 0px 16px 0px 0px;
}

/* up/down & edit links for playlist edits */
.songManager {
top: 8px;
@@ -526,6 +535,7 @@ A.calLink {
width: 10px;
height: 4px;
}

.songEdit {
top: -2px;
left: 12px;
@@ -535,6 +545,7 @@ A.calLink {
.songLabel {
font-size:10px;
}

.songDivider hr {
position: relative;
top: 3px;
@@ -256,16 +256,18 @@ public function markAlbumsReviewed(&$albums, $loggedIn = 0) {
$tags[$tag] = $i;
}
}
$query = "SELECT tag FROM reviews WHERE " .
$query = "SELECT tag, user FROM reviews WHERE " .
"tag IN (0" . $queryset . ")";
if(!$loggedIn)
$query .= " AND private = 0";
$query .= " GROUP BY tag";
$stmt = $this->prepare($query);
$stmt->execute();
while($row = $stmt->fetch()) {
for($next = $tags[$row[0]]; $next >= 0; $next = array_key_exists($next, $chain)?$chain[$next]:-1)
for($next = $tags[$row[0]]; $next >= 0; $next = array_key_exists($next, $chain)?$chain[$next]:-1) {
$albums[$next]["REVIEWED"] = 1;
$albums[$next]["REVIEWER"] = $row[1];
}
}
}

Large diffs are not rendered by default.

0 comments on commit 7c0c9cf

Please sign in to comment.
You can’t perform that action at this time.