Author: jfthomps
Date: Wed Aug 10 12:57:46 2016
New Revision: 1755736
URL: http://svn.apache.org/viewvc?rev=1755736&view=rev
Log:
minor tweaks
computer.php:
-modified fieldWidth: added check for Edge browser when determining to set
widths based in pixels or em
-modified AJshowReservations and AJshowReservationHistory: added check to
return there are no reservations to list if no current reservations or history
for the selected computer
groups.php: removed functionality that jumps to "startscroll" on page load
-modified viewGroups: removed id=startscroll for H2 header
groups.js: removed functionality that jumps to "startscroll" on page load
-modified buildUserFilterStores: removed check for firstscroll and call to
doInitialScroll
-removed doInitialScroll
requests.php: modified AJconfirmDeleteRequest: removed preg_replace that wraps
text at 70 characters to allow dijit.Dialog to handle the wrapping (it was
getting wrapped at odd places)
computer.js: modified buildExtraFilters: added 'autoWidth: true' to definition
of extrafiltergrid
Modified:
vcl/trunk/web/.ht-inc/computer.php
vcl/trunk/web/.ht-inc/groups.php
vcl/trunk/web/.ht-inc/requests.php
vcl/trunk/web/js/groups.js
vcl/trunk/web/js/resources/computer.js
Modified: vcl/trunk/web/.ht-inc/computer.php
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/computer.php?rev=1755736&r1=1755735&r2=1755736&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/computer.php (original)
+++ vcl/trunk/web/.ht-inc/computer.php Wed Aug 10 12:57:46 2016
@@ -124,7 +124,8 @@ class Computer extends Resource {
return '';
}
if(preg_match('/MSIE/i', $_SERVER['HTTP_USER_AGENT']) ||
- preg_match('/Trident/i', $_SERVER['HTTP_USER_AGENT']))
+ preg_match('/Trident/i', $_SERVER['HTTP_USER_AGENT']) ||
+ preg_match('/Edge/i', $_SERVER['HTTP_USER_AGENT']))
$w = round($w * 11.5) . 'px';
else
$w = "{$w}em";
@@ -4831,9 +4832,13 @@ class Computer extends Resource {
}
uasort($data, 'sortKeepIndex');
$msg = '';
- foreach($data as $item)
- $msg .= $item['msg'];
- $msg = substr($msg, 0, -4);
+ if(count($data) != 0) {
+ foreach($data as $item)
+ $msg .= $item['msg'];
+ $msg = substr($msg, 0, -4);
+ }
+ else
+ $msg = "No reservations for selected computer(s).";
$ret = array('status' => 'onestep',
'title' => 'Reservation Information',
@@ -4906,9 +4911,13 @@ class Computer extends Resource {
$data[] = array('name' => $row['hostname'], 'msg' =>
$msg);
}
$msg = '';
- foreach($data as $item)
- $msg .= $item['msg'];
- $msg = substr($msg, 0, -4);
+ if(count($data) != 0) {
+ foreach($data as $item)
+ $msg .= $item['msg'];
+ $msg = substr($msg, 0, -4);
+ }
+ else
+ $msg = "No reservation history for selected
computer(s).";
$ret = array('status' => 'onestep',
'title' => 'Reservation History',
Modified: vcl/trunk/web/.ht-inc/groups.php
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/groups.php?rev=1755736&r1=1755735&r2=1755736&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/groups.php (original)
+++ vcl/trunk/web/.ht-inc/groups.php Wed Aug 10 12:57:46 2016
@@ -48,7 +48,7 @@ function viewGroups() {
global $user, $mode;
$modetype = getContinuationVar("type");
- print "<H2 id=\"startscroll\">User Groups</H2>\n";
+ print "<H2>User Groups</H2>\n";
if($modetype == "user") {
if($mode == "submitAddGroup") {
print "<font color=\"#008000\">User group successfully
added";
Modified: vcl/trunk/web/.ht-inc/requests.php
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/requests.php?rev=1755736&r1=1755735&r2=1755736&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/requests.php (original)
+++ vcl/trunk/web/.ht-inc/requests.php Wed Aug 10 12:57:46 2016
@@ -3913,7 +3913,7 @@ function AJconfirmDeleteRequest() {
if($fromtimetable)
$cdata['ttdata'] = getContinuationVar('ttdata');
$cont = addContinuationsEntry('AJsubmitDeleteRequest', $cdata,
SECINDAY, 0, 0);
- $text = preg_replace("/(.{1,70}([ \n]|$))/", '\1<br>', $text) . '<br>';
+ $text .= "<br><br>";
$data = array('content' => $text,
'cont' => $cont,
'requestid' => $requestid,
Modified: vcl/trunk/web/js/groups.js
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/js/groups.js?rev=1755736&r1=1755735&r2=1755736&view=diff
==============================================================================
--- vcl/trunk/web/js/groups.js (original)
+++ vcl/trunk/web/js/groups.js Wed Aug 10 12:57:46 2016
@@ -218,10 +218,6 @@ function buildUserFilterStores() {
}
dijit.byId('editgroupfilter').setStore(editgroupstore,
'', {query: {id: '*'}});
delete usergroupstore.editgroups;
- if(firstscroll == 1) {
- firstscroll = 0;
- doInitialScroll();
- }
}
});
}
@@ -333,11 +329,6 @@ function buildResourceFilterStores() {
});
}
-function doInitialScroll() {
- var pos = dojo.position(dojo.byId('startscroll'));
- window.scroll(pos.x, pos.y);
-}
-
function fmtDuration(len, rowIndex, cell) {
var rowdata = this.grid.getItem(rowIndex);
var field = cell.field + 'disp';
Modified: vcl/trunk/web/js/resources/computer.js
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/js/resources/computer.js?rev=1755736&r1=1755735&r2=1755736&view=diff
==============================================================================
--- vcl/trunk/web/js/resources/computer.js (original)
+++ vcl/trunk/web/js/resources/computer.js Wed Aug 10 12:57:46 2016
@@ -438,7 +438,8 @@ function buildExtraFilters() {
store: filterstore,
structure: layout,
canSort: function() {return false;},
- onCellClick: combofocus
+ onCellClick: combofocus,
+ autoWidth: true
}, document.createElement('div'));
dojo.byId('extrafiltersdiv').appendChild(extrafiltergrid.domNode);
extrafiltergrid.startup();