Skip to content

Commit

Permalink
Make the queue page fit on a smartphone screen.
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Sep 28, 2015
1 parent 3ac5e11 commit b1e690c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions perl/saliweb/frontend.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,7 @@ sub display_submit_page {
sub display_queue_page {
my $self = shift;
try {
$self->{responsive} = 1;
$self->set_page_title("Queue");
$self->{canonical_url} = $self->queue_url;
$self->check_page_access('queue');
Expand Down
6 changes: 5 additions & 1 deletion web/css/server.css
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,11 @@ h5 {
font-style: italic;
}

@media only screen and (max-device-width: 480px) {
@media only screen and (max-device-width: 970px) {
html {
max-width: 970px;
}

#left {
display: none
}
Expand Down
8 changes: 7 additions & 1 deletion web/js/salilab.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ function convert_utc_dates_to_local() {
var nrows = e.rows.length;
var first = true;
var d = new Date();
var style = window.getComputedStyle(document.documentElement, null);
var max_width = style.getPropertyValue("max-width");
for (var i = 0; i < nrows; i++) {
if (e.rows[i].cells.length == 3) {
if (first) {
Expand All @@ -374,7 +376,11 @@ function convert_utc_dates_to_local() {
d.setUTCHours(inner.substr(11, 2));
d.setUTCMinutes(inner.substr(14, 2));
d.setUTCSeconds(inner.substr(17, 2));
e.rows[i].cells[1].innerHTML = d.toString();
if (max_width == "970px") {
e.rows[i].cells[1].innerHTML = d.toDateString();
} else {
e.rows[i].cells[1].innerHTML = d.toString();
}
}
}
}
Expand Down

0 comments on commit b1e690c

Please sign in to comment.