From 7d729361bb407434b0c4ede473a594766d2f6c6e Mon Sep 17 00:00:00 2001 From: Aris Feryanto Date: Fri, 22 Jul 2011 11:55:25 +0800 Subject: [PATCH] Grid edit: add loading icon when loading and posting data --- js/makegrid.js | 4 ++++ themes/original/css/theme_right.css.php | 8 +++++++- themes/pmahomme/css/theme_right.css.php | 7 ++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/js/makegrid.js b/js/makegrid.js index af632d99ae..5f6cc532b4 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -952,8 +952,12 @@ 'goto' : 'sql.php', 'submit_type' : 'save' }; + + var $editArea = $(g.cEdit).find('.edit_area'); + $editArea.addClass('edit_area_posting'); $.post('tbl_replace.php', post_params, function(data) { + $editArea.removeClass('edit_area_posting'); if(data.success == true) { PMA_ajaxShowMessage(data.message); if (new_clause != '') { diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index a3f2a17f63..2a64ba84a8 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -2488,8 +2488,14 @@ span.mysql-number { margin: 0.3em 0.2em; } -.edit_area_loading { +.cEdit .edit_area_loading { background: #FFF url(getImgPath(); ?>ajax_clock_small.gif) no-repeat center; height: 10em; } + +.cEdit .edit_area_posting { + background: #FFF url(getImgPath(); ?>ajax_clock_small.gif) no-repeat center top; + padding-top: 1.5em; +} + diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 2d030c0080..8988d10da5 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -2899,8 +2899,13 @@ span.mysql-number { margin: 0.3em 0.2em; } -.edit_area_loading { +.cEdit .edit_area_loading { background: #FFF url(./themes/pmahomme/img/ajax_clock_small.gif) no-repeat center; height: 10em; } +.cEdit .edit_area_posting { + background: #FFF url(./themes/pmahomme/img/ajax_clock_small.gif) no-repeat center top; + padding-top: 1.5em; +} +