jeudi 5 novembre 2015

Angularjs uigrid filter button showing as chinese font

I have used angularjs ui-grid in my project. Below is my code

<link href="@Url.Content("~/Content/js-image-slider.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/js-image-slider.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/ui-grid.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/gemscustomstyle.css")" rel="stylesheet" type="text/css" />
 <script src="@Url.Content("~/Scripts/jquery.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo.web.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo.all.min.js")"></script>
    
    <script src="@Url.Content("~/Scripts/kendo.aspnetmvc.min.js")"></script>
    <script src="@Url.Content("~/Scripts/js-image-slider.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.blockUI.js")"></script>
<script src="@Url.Content("~/Scripts/AngularGrid/angularjs.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/AngularGrid/angular-ng-route.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/AngularGrid/ui-grid.min.js")" type="text/javascript"></script>

<div ng-app = "myapp" ng-controller="CitywiseReportController">
    
    <div id="grid1" ui-grid="gridoptions" ui-grid-grouping ui-grid-resize-columns class="myGrid" style="width: 98%"></div>
    </div>
      
<script type="text/javascript">
   
    var app = angular.module('myapp', ['ui.grid']);

    app.controller('CitywiseReportController', function ($scope, CitywiseReportService) {
      
        $scope.configureHeadCountGrid = function () {
            $scope.gridoptions = {
            data:'cityReportData',
                enableGridMenu: true,
                enableFiltering: true,
                enableColumnResizing: true
            }
            //The grid options
            $scope.gridoptions.columnDefs = [
                            { name: 'Duty Travel ID', field: 'DutyTravelId', width: '90' },
                            { name: 'Staff ID', field: 'StaffNumber', width: '90' },
                            { name: 'Staff Name', field:'StaffName', width: '120' },
                            { name: 'DT Cost Center', field: 'CostCenter', width: '120' },
                            { name: 'DT Travel Category', field: 'TravelCategory', width: '120' },
                            { name: 'City Code', field: 'CityCode', width: '60' },
                            { name: 'City Name', field: 'CityName', width: '100' },
                            { name: 'Departure Date', field: 'DepartureDate', width: '120', type: 'date', format: '{0:dd-MMM-yyyy}' },
                            { name: 'Arrival Date', field: 'ArrivalDate', width: '120', type: 'date', format: '{0:dd-MMM-yyyy}' }
                        ];

        }
        getStudents();
        function getStudents() {
            CitywiseReportService.getStudents()
            .success(function (studs) {
                $scope.cityReportData = studs;
               
            })
            .error(function (error) {
              
                $scope.status = 'Unable to load customer data: ' + error.message;
               
            });
        }
        $scope.configureHeadCountGrid();
    });

    app.factory('CitywiseReportService', ['$http', function ($http) {
        var CitywiseReportService = {};
        CitywiseReportService.getStudents = function () {
           
            return $http.get('/DutyTravel/GetCityWiseDTReport');
        };
        return CitywiseReportService;

    } ]);
</script>

but when grid displays grid filter icon image showing as chinese font.

See this image

and in chrome console it is showing http://localhost:58206/Content/ui-grid.woff http://localhost:58206/Content/ui-grid.ttf

Need help

Aucun commentaire:

Enregistrer un commentaire