This commit is contained in:
Edison Su 2012-08-10 11:35:54 -07:00
commit 406550b2f7
3 changed files with 26 additions and 2 deletions

View File

@ -6802,6 +6802,15 @@ div.panel.ui-dialog div.list-view div.fixed-header {
text-shadow: 0px 1px #FFFFFF;
}
.multi-edit .disabled .button.custom-action {
/*+opacity:50%;*/
filter: alpha(opacity=50);
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
cursor: not-allowed;
}
.multi-edit .button.custom-action:hover {
background: #808080 url(../images/bg-gradients.png);
color: #FFFFFF;

View File

@ -1323,8 +1323,14 @@
guestGateway: { label: 'label.guest.gateway' },
guestNetmask: { label: 'label.guest.netmask' },
guestStartIp: { label: 'label.guest.start.ip' },
guestEndIp: { label: 'label.guest.end.ip' },
guestStartIp: {
label: 'label.guest.start.ip',
validation: { required: true }
},
guestEndIp: {
label: 'label.guest.end.ip',
validation: { required: true }
},
networkdomain: { label: 'label.network.domain' }
}
},

View File

@ -172,6 +172,8 @@
$button.html(data && data[fieldName] && data[fieldName]['_buttonLabel'] ?
_l(data[fieldName]['_buttonLabel']) : _l(field.custom.buttonLabel));
$button.click(function() {
if ($td.hasClass('disabled')) return false;
var $button = $(this);
field.custom.action({
@ -187,6 +189,8 @@
}
}
});
return true;
});
$button.appendTo($td);
}
@ -201,6 +205,11 @@
var targetWidth = $multi.find('th.' + fieldName).width() + 5;
$td.width(targetWidth);
if (data._hideFields &&
$.inArray(fieldName, data._hideFields) > -1) {
$td.addClass('disabled');
}
return true;
});