mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: Remove commented code
This commit is contained in:
parent
a50fc5180a
commit
7f7d6b3bea
@ -74,46 +74,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
* Upon focusing on a filter <input> element, move "filter" and "reset" buttons and display next to the current <input> element
|
|
||||||
* ToDo ensure filter-button state is maintained after filtering (see resetState param)
|
|
||||||
* ToDo get working in IE 6-7
|
|
||||||
*/
|
|
||||||
/*$('.ss-gridfield input.ss-gridfield-sort').entwine({
|
|
||||||
onfocusin: function(e) {
|
|
||||||
// Dodgy results in IE <=7 & ignore if only one filter-field
|
|
||||||
countfields = $('.ss-gridfield input.ss-gridfield-sort').length;
|
|
||||||
if(($.browser.msie && $.browser.version <= 7) || countfields == 1) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var eleInput = $(this);
|
|
||||||
|
|
||||||
// Remove existing <div> and <button> elements in-lieu of cloning
|
|
||||||
this.getGridField().find('th > div').each(function(i,v) {$(v).remove();});
|
|
||||||
|
|
||||||
var eleButtonSetFilter = $('#action_filter');
|
|
||||||
var eleButtonResetFilter = $('#action_reset');
|
|
||||||
// Retain current widths to ensure <th>'s don't shift widths
|
|
||||||
var eleButtonWidth = eleButtonSetFilter.width();
|
|
||||||
// Check <th> doesn't already have an (extra) cloned <button> appended, otherwise clone
|
|
||||||
if(eleInput.closest('th').children().length == 1) {
|
|
||||||
var newButtonCss = {
|
|
||||||
'position':'absolute',
|
|
||||||
'top':'-23px',
|
|
||||||
'left':'0',
|
|
||||||
'border':'#EEE solid 1px',
|
|
||||||
'padding':'0',
|
|
||||||
'margin-left':'0'
|
|
||||||
};
|
|
||||||
// Append a <div> element used purely for CSS positioning - table elements on their own are untrustworthy to style in this manner
|
|
||||||
$('<div/>').append(
|
|
||||||
eleButtonSetFilter.clone().css(newButtonCss),
|
|
||||||
eleButtonResetFilter.clone().css(newButtonCss).css('left',(eleButtonWidth+4)+'px')
|
|
||||||
).css({'position':'relative','margin':'0 auto','width':'65%'}).appendTo(eleInput.closest('th'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});*/
|
|
||||||
|
|
||||||
$('fieldset.ss-gridfield .new-link').entwine({
|
$('fieldset.ss-gridfield .new-link').entwine({
|
||||||
onclick: function(e) {
|
onclick: function(e) {
|
||||||
$(this).trigger('opennewview', $(this).prop('href'));
|
$(this).trigger('opennewview', $(this).prop('href'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user