当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript angular.IAugmentedJQuery类代码示例

本文整理汇总了TypeScript中angular.IAugmentedJQuery的典型用法代码示例。如果您正苦于以下问题:TypeScript IAugmentedJQuery类的具体用法?TypeScript IAugmentedJQuery怎么用?TypeScript IAugmentedJQuery使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了IAugmentedJQuery类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: function

    this.compileDirectiveTemplates = function () {
        if (!$element.hasClass('ng-table')) {
            $scope.templates = {
                header: ($attrs.templateHeader ? $attrs.templateHeader : 'ng-table/header.html'),
                pagination: ($attrs.templatePagination ? $attrs.templatePagination : 'ng-table/pager.html')
            };
            $element.addClass('ng-table');
            var headerTemplate: IAugmentedJQuery = null;

            // $element.find('> thead').length === 0 doesn't work on jqlite
            var theadFound = false;
            ng1.forEach($element.children(), function (e) {
                if (e.tagName === 'THEAD') {
                    theadFound = true;
                }
            });
            if (!theadFound) {
                headerTemplate = ng1.element('<thead ng-include="templates.header"></thead>', $document);
                $element.prepend(headerTemplate);
            }
            var paginationTemplate = ng1.element(
                '<div ng-table-pagination="params" template-url="templates.pagination"></div>',
                $document
            );
            $element.after(paginationTemplate);
            if (headerTemplate) {
                $compile(headerTemplate)($scope);
            }
            $compile(paginationTemplate)($scope);
        }
    };
开发者ID:Timeyit,项目名称:main,代码行数:31,代码来源:ngTableController.ts

示例2:

        var getTitles = () => {
            var thead = elm.find('thead');
            var rows = thead.find('tr');
            var titles = ng1.element(rows[0]).find('th');

            return ng1.element(titles).text().trim().split(/\s+/g)
        };
开发者ID:Timeyit,项目名称:main,代码行数:7,代码来源:tableDynamicSpec.spec.ts

示例3: it

        it('should show/hide columns', inject(function (NgTableParams: ITableParamsConstructor<IPerson>) {
            var tbody = elm.find('tbody');

            scope.tableParams = new NgTableParams({
                page: 1, // show first page
                count: 10 // count per page
            }, {
                    dataset: dataset
                });
            scope.$digest();

            var headerRow = ng1.element(elm.find('thead').find('tr')[0]);
            expect(headerRow.find('th').length).toBe(3);

            var filterRow = ng1.element(elm.find('thead').find('tr')[1]);
            expect(filterRow.find('th').length).toBe(3);

            var dataRow = ng1.element(elm.find('tbody').find('tr')[0]);
            expect(dataRow.find('td').length).toBe(3);

            scope.cols[0].show = false;
            scope.$digest();
            expect(headerRow.find('th').length).toBe(2);
            expect(filterRow.find('th').length).toBe(2);
            expect(dataRow.find('td').length).toBe(2);
            expect(ng1.element(headerRow.find('th')[0]).text().trim()).toBe('Age');
            expect(ng1.element(headerRow.find('th')[1]).text().trim()).toBe('Money');
            expect(ng1.element(filterRow.find('th')[0]).find('input').length).toBe(0);
            expect(ng1.element(filterRow.find('th')[1]).find('select').length).toBe(1);
        }));
开发者ID:Timeyit,项目名称:main,代码行数:30,代码来源:tableDynamicSpec.spec.ts

示例4: it

        it('should show/hide columns', () => {
            const tbody = tableElm.find('tbody');

            scope.tableParams = new NgTableParams({
                page: 1, // show first page
                count: 10 // count per page
            }, {
                    dataset: dataset
                });
            scope.$digest();

            const headerRow = ng1.element(tableElm.find('thead').find('tr')[0]);
            expect(headerRow.find('th').length).toBe(3);

            const filterRow = ng1.element(tableElm.find('thead').find('tr')[1]);
            expect(filterRow.find('th').length).toBe(3);

            const dataRow = ng1.element(tableElm.find('tbody').find('tr')[0]);
            expect(dataRow.find('td').length).toBe(3);

            scope.cols[0].show = false;
            scope.$digest();
            expect(headerRow.find('th').length).toBe(2);
            expect(filterRow.find('th').length).toBe(2);
            expect(dataRow.find('td').length).toBe(2);
            expect(ng1.element(headerRow.find('th')[0]).text().trim()).toBe('Age');
            expect(ng1.element(headerRow.find('th')[1]).text().trim()).toBe('Money');
            expect(ng1.element(filterRow.find('th')[0]).find('input').length).toBe(0);
            expect(ng1.element(filterRow.find('th')[1]).find('select').length).toBe(1);
        });
开发者ID:QuBaR,项目名称:ng-table,代码行数:30,代码来源:tableDynamic.spec.ts

示例5: it

        it('should show/hide columns', () => {
            var tbody = elm.find('tbody');

            scope.tableParams = new NgTableParams({}, {
                dataset: dataset
            });
            scope.$digest();

            var headerRow = ng1.element(elm.find('thead').find('tr')[0]);
            expect(headerRow.find('th').length).toBe(3);

            var filterRow = ng1.element(elm.find('thead').find('tr')[1]);
            expect(filterRow.find('th').length).toBe(3);

            var dataRow = ng1.element(elm.find('tbody').find('tr')[0]);
            expect(dataRow.find('td').length).toBe(3);

            scope.showName = false;
            scope.$digest();
            expect(headerRow.find('th').length).toBe(2);
            expect(filterRow.find('th').length).toBe(2);
            expect(dataRow.find('td').length).toBe(2);
            expect(ng1.element(headerRow.find('th')[0]).text().trim()).toBe('Age');
            expect(ng1.element(headerRow.find('th')[1]).text().trim()).toBe('Money');
            expect(ng1.element(filterRow.find('th')[0]).find('input').length).toBe(0);
            expect(ng1.element(filterRow.find('th')[1]).find('select').length).toBe(1);
        });
开发者ID:Timeyit,项目名称:main,代码行数:27,代码来源:tableSpec.spec.ts

示例6: updateView

 updateView () {
   if (this.$element) {
     if (this.left === undefined || this.width === undefined) {
       this.$element.css('display', 'none')
     } else {
       this.$element.css('display', '')
       this.$element.css('left', this.left + 'px')
       this.$element.css('width', this.width + 'px')
     }
   }
 }
开发者ID:angular-gantt,项目名称:angular-gantt,代码行数:11,代码来源:timespan.factory.ts


注:本文中的angular.IAugmentedJQuery类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。