show message when preferences are saved to localStorage

This commit is contained in:
Crack
2010-07-12 14:02:45 +02:00
parent 956315e0b2
commit 625b9edca8
3 changed files with 20 additions and 0 deletions

View File

@@ -678,6 +678,12 @@ $(function() {
form.find('input[name=json]').val(window.localStorage['config']);
}
});
$('.click-hide-message').live('click', function(){
var div = $(this);
div.hide().parent('.group').css('height', '');
div.next('form').show();
});
});
/**
@@ -706,6 +712,10 @@ function savePrefsToLocalStorage(form)
updatePrefsDate();
$('.localStorage-empty').hide();
$('.localStorage-exists').show();
var group = form.parent('.group');
group.css('height', group.height() + 'px');
form.hide('fast');
form.prev('.click-hide-message').show('fast');
},
complete: function() {
submit.attr('disabled', false);

View File

@@ -174,6 +174,12 @@ PMA_printJsValue("PMA_messages['strSavedOn']", __('Saved on: __DATE__'));
<div id="main_pane_right">
<div class="group">
<h2><?php echo __('Export') ?></h2>
<div class="click-hide-message group-cnt" style="display:none">
<?php
$message = PMA_Message::rawSuccess(__('Configuration has been saved'));
$message->display();
?>
</div>
<form class="group-cnt prefs-form" name="prefs_export" action="prefs_manage.php" method="post">
<?php echo PMA_generate_common_hidden_inputs() . "\n" ?>
<div style="padding-bottom:0.5em">

View File

@@ -1434,3 +1434,7 @@ fieldset .group-field th {
.config-form dd:before {
content: "\25B8 ";
}
.click-hide-message {
cursor: pointer;
}