3

また、他のすべてのブラウザーですべてのフィールドを適切に並べ替えます。

フィールドが入力フィールド(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/

どんな助けでも大歓迎です。

4

1 に答える 1