show message when preferences are saved to localStorage
This commit is contained in:
10
js/config.js
10
js/config.js
@@ -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);
|
||||
|
@@ -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">
|
||||
|
@@ -1434,3 +1434,7 @@ fieldset .group-field th {
|
||||
.config-form dd:before {
|
||||
content: "\25B8 ";
|
||||
}
|
||||
|
||||
.click-hide-message {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
Reference in New Issue
Block a user