Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 引导表未呈现meteor中工具栏的某些元素_Javascript_Twitter Bootstrap_Meteor - Fatal编程技术网

Javascript 引导表未呈现meteor中工具栏的某些元素

Javascript 引导表未呈现meteor中工具栏的某些元素,javascript,twitter-bootstrap,meteor,Javascript,Twitter Bootstrap,Meteor,这是我的javascript代码。我试图让表格使标题可排序,并显示其他元素,如搜索、刷新和其他功能。 我一直在 而不是这个 <template name="eventDashboard"> <div class="wrapper"> <div class="container"> <div class="row"> <div class="col-md-8 co

这是我的javascript代码。我试图让表格使标题可排序,并显示其他元素,如搜索、刷新和其他功能。 我一直在

而不是这个

<template name="eventDashboard">
    <div class="wrapper">
        <div class="container">
            <div class="row">
                <div class="col-md-8 col-md-offset-2">

                    <div class="fresh-table full-color-azure">
                        <!--    Available colors for the full background: full-color-blue, full-color-azure, full-color-green, full-color-red, full-color-orange
                                Available colors only for the toolbar: toolbar-color-blue, toolbar-color-azure, toolbar-color-green, toolbar-color-red, toolbar-color-orange
                        -->

                        <div class="toolbar">
                            <button id="alertBtn" class="btn btn-default">Alert</button>
                        </div>

                        <table id="fresh-table" class="table" data-toggle="table"
                               data-search="true"
                               data-show-refresh="true"
                               data-show-toggle="true"
                               data-show-columns="true">
                            <thead>
                            <th data-field="name" data-sortable="true">Name</th>
                            <th data-field="class" data-sortable="true">Class</th>
                            <th data-field="price" data-sortable="true">price</th>
                            <th data-field="location">Location</th>
                            <th data-field="actions">Actions</th>
                            </thead>
                            <tbody>
                            {{#each tickets}}
                                <tr>
                                    <td>{{name}}</td>
                                    <td>{{class}}</td>
                                    <td>{{money price}}</td>
                                    <td>{{location}}</td>
                                    <td>
                                        <a href="{{pathFor 'edit'}}" rel="tooltip" title="Edit" class="table-action edit" id="edit"><i class="fa fa-edit"></i></a>
                                        <a rel="tooltip" title="Remove" class="table-action remove" id="delete"><i class="fa fa-remove"></i></a>
                                    </td>
                                </tr>
                            {{/each}}
                            </tbody>
                        </table>
                    </div>


                </div>
            </div>
        </div>
    </div>
</template>
Template.eventDashboard.events({
    "click #alertBtn": function (events) {
        event.preventDefault();
        alert("You pressed on Alert");
    },
    "click #delete": function (events)
    {
        event.preventDefault();
        if(confirm("Are you sure?"))
        {
            Tickets.remove(this._id);
            toastr.success("Ticket Deleted");

        }
    }
});


Template.eventDashboard.onRendered = function () {
    $table = $('#fresh-table');
    $().ready(function () {
        $table.bootstrapTable({
            toolbar: ".toolbar",

            showRefresh: true,
            search: true,
            showToggle: true,
            showColumns: true,
            pagination: true,
            striped: true,
            pageSize: 8,
            pageList: [8, 10, 25, 50, 100],
            icons: {
                refresh: 'fa fa-refresh',
                toggle: 'fa fa-th-list',
                columns: 'fa fa-columns',
                detailOpen: 'fa fa-plus-circle',
                detailClose: 'fa fa-minus-circle'
            }
        });
    })
}