Added a grid load error indication, since it was lost when we disabled the debug output.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@606 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-17 18:41:17 +00:00
parent 3ba1e8b97a
commit ff37597b81
2 changed files with 15 additions and 0 deletions

View File

@@ -191,6 +191,9 @@ $debug = !empty($this->params['dev']);
if ($debug)
$caption .= '<span class="debug grid-query"> :: <span id="'.$grid_id.'-query"></span></span>';
$caption .= ('<span class="grid-error" id="'.$grid_id.'-error"' .
' style="display:none"> :: Error (Please Reload)</span>');
foreach (array_merge(array('loadComplete' => '', 'loadError' => ''),
$grid_events) AS $event => $statement) {
$params = '';
@@ -207,6 +210,14 @@ foreach (array_merge(array('loadComplete' => '', 'loadError' => ''),
$grid_events[$event] =
array('--special' => "function($params) {url=jQuery('#{$grid_id}').getGridParam('url');url=url+'/debug:1?'; pd=jQuery('#{$grid_id}').getPostData();$.each(pd,function(i){ url+=i+'='+escape(pd[i])+'&'; }); jQuery('#{$grid_id}-query').html('<A HREF=\"'+url+'\">Grid Error Query</A><BR>'); $statement;}");
}
if ($event == 'loadComplete' && !$debug) {
$grid_events[$event] =
array('--special' => "function($params) {jQuery('#{$grid_id}-error').hide(); $statement;}");
}
elseif ($event == 'loadError' && !$debug) {
$grid_events[$event] =
array('--special' => "function($params) {jQuery('#{$grid_id}-error').show(); $statement;}");
}
else {
$grid_events[$event] =
array('--special' => "function($params) { $statement; }");

View File

@@ -267,6 +267,10 @@ form#collected-form input[type=button] { float : left;
div.grid.text-below { margin-bottom: 0; }
span.grid-error {
color: #a00;
}
span.ui-jqgrid-title {
color: #ffb;
font-family:'Gill Sans','lucida grande',helvetica, arial, sans-serif;