3
다른 모든 브라우저에서 모든 필드를 올바르게 정렬합니다.jquery tablesorter가 입력/선택 필드 (IE8)에서 작동하지 않고 IE8의 다른 모든 텍스트 필드에서 올바르게 작동합니다.
필드가 입력 필드 (jquery datepicker)이거나 특정 상자를 선택하는 경우 IE8 만 문제입니다.
<tr class="proj_rec" data-id="<?php echo $project->get_id(); ?>">
<td class="proj_id">
<?php echo $project->get_id(); ?>
</td>
<td>
<?php echo $project->get_desc(); ?>
</td>
<td class="edit">
<select class="touch">
<?php echo $opt_html_business_area; ?>
</select>
<span class="look">
<?php echo $project->get_business_area(); ?>
</span>
</td>
<td class="edit">
<select class="touch">
<?php echo $opt_html_status; ?>
</select>
<span class="look">
<?php echo $project->get_status(); ?>
</span>
</td>
<td class="edit">
<select class="touch">
<?php echo $opt_html_type; ?>
</select>
<span class="look">
<?php echo $project->get_type(); ?>
</span>
</td>
<td class="edit">
<input type="text" class="touch">
</input>
<span class="look">
<?php echo $project->get_owner(); ?>
</span>
</td>
<td>
<?php echo $project->get_enter_date(); ?>
</td>
<td class="edit">
<input type="text" class="touch dtpick">
</input>
<span class="look">
<?php echo $project->get_est_date(); ?>
</span>
</td>
<td class="edit">
<input type="text" class="touch dtpick">
</input>
<span class="look">
<?php echo $project->get_due_date(); ?>
</span>
</td>
<td class="edit">
<input type="text" class="touch dtpick">
</input>
<span class="look">
<?php echo $project->get_next_date(); ?>
</span>
</td>
//project events that happen only on page load
function on_load_events() {
// Adding a new slot
$('#add_project').click(function() {
var emp = $('#entered_new').val();
add_project(emp);
});
$('#project_table').bind('sortStart',function() {
back_to_look();
$('span.cmnt_active').each(function() {
remove_comments($(this));
});
});
$('#project_table').tablesorter({
textExtraction: myTextExtraction
});
//todo: try getting the dataTable to work...
// it might be way better, just not sure how it would handle
// adding unrelated rows on the fly (comments)
//$('#project_table').dataTable();
}
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');};
var myTextExtraction = function(node)
{
var elem = $(node);
var theVal = null;
if (elem.hasClass('edit')) {
elem.children().each(function() {
if ($(this).css('display') != 'none') {
theVal = $(this).val();
}
});
} else {
theVal = elem.text();
}
//console.log(theVal);
var c = node.childNodes.length;
if (c == 1) {
theVal = node.innerHTML.trim();
} else if (c == 5) {
theVal = node.childNodes[3].innerHTML.trim();
}
//console.log(theVal);
return theVal;
}
이 피들과 같은 조건문이 있어야합니까?
http://jsfiddle.net/Mottie/AqXEA/1/
어떤 도움
주시면 감사하겠습니다.