mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
BUGFIX: Fix Javascript for document type buttons. Style adds to only to selected doc type
This commit is contained in:
parent
aa9075af79
commit
546546ced1
@ -3,29 +3,27 @@
|
||||
$.entwine('ss', function($) {
|
||||
|
||||
$('#DocumentTypeID ul li').entwine({
|
||||
onmatch: function() {
|
||||
this.addClass('ui-button ss-ui-button ui-corner-all ui-state-default ui-widget ui-button-text-only');
|
||||
this.parents('ul').removeClass('ui-tabs-nav');
|
||||
},
|
||||
});
|
||||
|
||||
$('#DocumentTypeID ul li').entwine({
|
||||
onclick: function(e) {
|
||||
if ($('input[type=radio]:checked').length > 0) {
|
||||
this.addClass('selected');
|
||||
}
|
||||
//not.(this).removeClass('selected');
|
||||
/* e.preventDefault();
|
||||
this.parents('.cms-preview').loadUrl(this.attr('href'));
|
||||
this.addClass('disabled');
|
||||
this.parents('.cms-preview-states').find('a').not(this).removeClass('disabled');
|
||||
//This hides all watermarks
|
||||
this.parents('.cms-preview-states').find('.cms-preview-watermark').hide();
|
||||
//Show the watermark for the current state
|
||||
this.siblings('.cms-preview-watermark').show();*/
|
||||
onadd: function() {
|
||||
this.addClass('ui-button ss-ui-button ui-corner-all ui-state-default ui-widget ui-button-text-only');
|
||||
this.parents('ul').removeClass('ui-tabs-nav');
|
||||
},
|
||||
});
|
||||
|
||||
$('#DocumentTypeID input[type=radio]').entwine({
|
||||
onadd: function() {
|
||||
if (this.is(':checked')) {
|
||||
this.change();
|
||||
}
|
||||
},
|
||||
onchange: function(e) {
|
||||
$('#DocumentTypeID').find('li').removeClass('selected');
|
||||
|
||||
if (this.is(':checked')) {
|
||||
this.parent('li').addClass('selected');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#Actions ul li').entwine({
|
||||
onclick: function(e) {
|
||||
e.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user