fix "restore default" button, should be visible only when field has custom value

added missing validations for setup script
added two field descriptions
added SkipLockedTables to user preferences
This commit is contained in:
Crack
2010-07-16 20:28:11 +02:00
parent 0b30a339fa
commit c5bef4d2da
6 changed files with 15 additions and 9 deletions

View File

@@ -437,8 +437,8 @@ function markField(field) {
* @param {boolean} display
*/
function setRestoreDefaultBtn(field, display) {
var el = $(field).closest('td').find('.restore-default');
el.css('display', (el.css('display') ? '' : 'none'));
var el = $(field).closest('td').find('.restore-default img');
el[display ? 'show' : 'hide']();
}
$(function() {
@@ -596,10 +596,10 @@ $(function() {
$('.restore-default, .set-value').each(function() {
var link = $(this);
// inline-block for IE so opacity inheritance works
link.css('display', 'inline-block').css('opacity', 0.25);
if (!link.hasClass('restore-default')) {
link.css({display: 'inline-block', opacity: 0.25});
if (link.hasClass('restore-default')) {
// restore-default is handled by markField
link.css('display', '');
link.find('img').hide();
}
link.bind({
mouseenter: function() {$(this).css('opacity', 1);},