HTML5 data attribute showing error

HTML5 data attribute showing error

jLinuxjLinux Posts: 981Questions: 73Answers: 75

I was trying to use the html5 data attributes, like in this example, to sort columns by the actual timestamp, rather than the formatted date.

Heres the HTML thus far:

<table id="data-table" class="table width-full display compact table-condensed" data-partition-id="1" data-partition-name="Server Asset Management">
    <thead>
    <tr>
        <th id="column-creator">Creator</th>
        <th id="column-created">Created</th>
        <th id="column-modifier">Modifier</th>
        <th id="column-modified">Modified</th>
        <th id="column-server_hostname">Server Hostname</th>
        <th id="column-operating_system">Operating System</th>
        <th id="column-applications">Applications</th>
        <th id="column-monitoring">Monitoring</th>
    </tr>
    </thead>
    <thead id="header-filters" >
    <tr>
        <th id="column-filter-0"></th>
        <th id="column-filter-1"></th>
        <th id="column-filter-2"></th>
        <th id="column-filter-3"></th>
        <th id="column-filter-4"></th>
        <th id="column-filter-5"></th>
        <th id="column-filter-6"></th>
        <th id="column-filter-7"></th>
    </tr>
    </thead>
    <tbody>
    <tr data-row-id="1" class="asset-context box">
        <td class="creator"><a href="/account/details/1">DemoAdmin</a></td>
        <!-- Sort this col by the real created timestamp -->
        <td class="created" data-order="1441294069">Sep 3, 2015, 8:27:49 MST</td>
        <td class="modifier">N/A</td>
        <!-- Sort this col by the real modified timestamp -->
        <td class="modified" data-order="1442176266">Sep 13, 2015, 13:31:06 MST</td>
        <td>
            <a href="#" id="server_hostname" class="string-edit" data-placeholder="____.server.ad" data-type="text" data-pk="1" data-asset_id="idkwtf" data-title="Enter Server Hostname">lqdasseat21.server.ad</a>                    </td>
        <td>
            <a href="#" id="operating_system" class="select-edit" data-type="select2" data-pk="1" data-title="Enter Operating System" data-value="CentOS 4">CentOS 4</a>                    </td>
        <td>
            <a href="#" id="applications" class="multiselect-edit" data-type="checklist" data-pk="1" data-title="Enter Applications" data-value="Apache,Jenkins,Tomcat,Nagios,Chef,RHDS">Apache, Jenkins, Tomcat, Nagios, Chef, RHDS</a>                    </td>
        <td>
            <a href="#" id="monitoring" class="boolean-edit" data-type="select" data-pk="1" data-title="Enter Monitoring">False</a>                    </td>
    </tr>
    </tbody>
</table>

The errors im getting are:
Looks like you have forgot to define the html5_data attribute for the 1 column
Looks like you have forgot to define the html5_data attribute for the 3 column

Im not quite sure what im doing wrong, Ive seen a few examples, and I think im following them properly.

Answers

This discussion has been closed.