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


TypeScript knockout.cleanNode函数代码示例

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


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

示例1: Load

    Load() {
        
        var model = this.backboneModel;
       
        model.set("fromBookingDate", helper.FormatDateString(Date.now()));
        model.set("toBookingDate", helper.FormatDateString(Date.now()));
        this.compositeModel = model;

       this.collectionView.listenTo(this.collectionView, "AdminSearchBooking", () => this.GetByCriteria(this.searchViewModel.bbModel));

        this.collectionView.on("CancelForm", () => this.Cancel());
        this.app.MainRegion.show(this.collectionView);

        var vm = kb.viewModel(this.compositeModel);
       

        var fromBookingDate = $('#txtFromBookingDate')[0];
        ko.cleanNode(fromBookingDate);
        ko.applyBindings(vm, fromBookingDate);

        var toBookingDate = $('#txtToBookingDate')[0];
        ko.cleanNode(toBookingDate);
        ko.applyBindings(vm, toBookingDate);

    }
开发者ID:kashifjawed,项目名称:CCTracking,代码行数:25,代码来源:AdminSearchBookingCtrl.ts

示例2: Load

    Load() {
        
        var model = this.backboneModel;
       
        model.set("fromBookingDate", helper.FormatDateString(Date.now()));
        model.set("toBookingDate", helper.FormatDateString(Date.now()));
        this.compositeModel = model;

        this.collectionView.listenTo(this.collectionView, "AdminSearchBooking", () => this.GetByCriteria(this.searchViewModel.bbModel));
        this.collectionView.listenTo(this.collectionView, "Event:PrintReport", (p) => {
            helper.PrintReport(this.backboneCollection, this.GetHeaderList(), "Centre Specific Summary Report","Booking");
        });
        this.collectionView.listenTo(this.collectionView, "itemview:CentreBusSummary", (view, id) => { this.ShowCentreBusSummary(id,model); });

        this.collectionView.on("CancelForm", () => this.Cancel());
        this.app.MainRegion.show(this.collectionView);

        var vm = kb.viewModel(this.compositeModel);
       

        var fromBookingDate = $('#txtFromBookingDate')[0];
        ko.cleanNode(fromBookingDate);
        ko.applyBindings(vm, fromBookingDate);

        var toBookingDate = $('#txtToBookingDate')[0];
        ko.cleanNode(toBookingDate);
        ko.applyBindings(vm, toBookingDate);

    }
开发者ID:saeed-ahmed,项目名称:CCTracking,代码行数:29,代码来源:AdminSearchBookingCtrl.ts

示例3: Load

    Load() {
        
        var lookupResponse = JSON.parse(localStorage.getItem('lookupResponse'));
       

        var model = this.backboneModel;
        //var reportFilter = this.app.request("ReportFilterSetting");       
        model.set("fromBookingDate", helper.FormatDateString(Date.now()));
        model.set("toBookingDate", helper.FormatDateString(Date.now()));
        model.set("busList", lookupResponse.bus);
        model.set("busSelected", "");

        //model.set("fromBookingDate", reportFilter.get("fromDate"));
        //model.set("toBookingDate", reportFilter.get("toDate"));
        //model.set("busId", reportFilter.get("busId"));

        this.compositeModel = model;

       this.collectionView.listenTo(this.collectionView, "BusFuelingReport", () => this.GetByCriteria(this.searchViewModel.bbModel));
        this.collectionView.listenTo(this.collectionView, "itemview:BusVisitDetails", (view, id) => { this.ShowBusVisitDetails(id, model); });

        this.collectionView.on("CancelForm", () => this.Cancel());
        this.app.MainRegion.show(this.collectionView);

        var currentView = this.collectionView.$el;
        var vm = kb.viewModel(this.compositeModel);       

        var fromBookingDate = currentView.find('#txtFromBookingDate')[0];
        ko.cleanNode(fromBookingDate);
        ko.applyBindings(vm, fromBookingDate);

        var toBookingDate = currentView.find('#txtToBookingDate')[0];
        ko.cleanNode(toBookingDate);
        ko.applyBindings(vm, toBookingDate);

        var bus = currentView.find('#ddlBusDetails')[0];
        ko.cleanNode(bus);
        ko.applyBindings(vm, bus);

        
        //var bookingSumaryDto = new dto.Models.BookingSummaryDto();
        //bookingSumaryDto.set('busId', reportFilter.get("busId"));
        //bookingSumaryDto.set('fromBookingDate', reportFilter.get("fromDate"));
        //bookingSumaryDto.set('toBookingDate', reportFilter.get("toDate"));

        //var deferred = DAL.GetByCriteria(bookingSumaryDto);
        //deferred.done(p=> this.GetByCriteriaCompleted(p));
    }
开发者ID:saeed-ahmed,项目名称:CCTracking,代码行数:48,代码来源:BusFuelingReportCtrl.ts

示例4: UIBinding

    UIBinding(model: any) {
        
        model.set("isActive", model.get("isActive") ? "1" : "0");

        this.townViewModel.bbModel = model;
        this.townViewModel.model = kb.viewModel(model);
        ko.cleanNode($(this.townView.el)[0]);
        ko.applyBindings(this.townViewModel, this.townView.el);
    }
开发者ID:kashifjawed,项目名称:CCTracking,代码行数:9,代码来源:TownCtrl.ts

示例5: KOBinding

    KOBinding(model) {
        var vm = kb.viewModel(model);
        var currentView = this.searchFormView.$el;

        var element = currentView.find('#ddlGraveyard')[0];
        ko.cleanNode(element);
        ko.applyBindings(vm, element);
        var centre = currentView.find('#ddlCentre')[0];
        ko.cleanNode(centre);
        ko.applyBindings(vm, centre);
        //debugger;
        var bus = currentView.find('#ddlBusDetails')[0];
        ko.cleanNode(bus);
        ko.applyBindings(vm, bus);

        var contactInfo = currentView.find('#txtContactInfo')[0];
        ko.cleanNode(contactInfo);
        ko.applyBindings(vm, contactInfo);

        var deseasedInfo = currentView.find('#txtDeseasedInfo')[0];
        ko.cleanNode(deseasedInfo);
        ko.applyBindings(vm, deseasedInfo);

        var gender = currentView.find('.jsGender')[0];
        ko.cleanNode(gender);
        ko.applyBindings(vm, gender);
        gender = currentView.find('.jsGender')[1];
        ko.cleanNode(gender);
        ko.applyBindings(vm, gender);

        var paymentStatus = currentView.find('.jsPaymentStatus')[0];
        ko.cleanNode(paymentStatus);
        ko.applyBindings(vm, paymentStatus);
        paymentStatus = currentView.find('.jsPaymentStatus')[1];
        ko.cleanNode(paymentStatus);
        ko.applyBindings(vm, paymentStatus);

        var bookingDate = currentView.find('#txtBookingDate')[0];
        ko.cleanNode(bookingDate);
        ko.applyBindings(vm, bookingDate);
    }
开发者ID:saeed-ahmed,项目名称:CCTracking,代码行数:41,代码来源:SearchCtrl.ts

示例6: SimpleLoad

    SimpleLoad() {
       var model = this.backboneModel;
       
        model.set("fromVisitDate", helper.FormatDateString( Date.now()));
        model.set("toVisitDate", helper.FormatDateString(Date.now()));
        this.compositeModel = model;

        this.collectionView.model = this.compositeModel;
        this.collectionView.listenTo(this.collectionView, "Event:BusMilage", () => this.BusMilage(model));
        this.app.MainRegion.show(this.collectionView);
        
        var vm = kb.viewModel(this.compositeModel);
       
        var fromVisitDate = $('#txtFromVisitDate')[0];
        ko.cleanNode(fromVisitDate);
        ko.applyBindings(vm, fromVisitDate);

        var toVisitDate = $('#txtToVisitDate')[0];
        ko.cleanNode(toVisitDate);
        ko.applyBindings(vm, toVisitDate);
    }
开发者ID:kashifjawed,项目名称:CCTracking,代码行数:21,代码来源:BusMilageCtrl.ts

示例7: Load

    Load() {
        
        var model = this.backboneModel;
        var reportFilter = this.app.request("ReportFilterSetting");       
        //model.set("fromBookingDate", helper.FormatDateString(Date.now()));
        //model.set("toBookingDate", helper.FormatDateString(Date.now()));

        model.set("fromBookingDate", reportFilter.get("fromDate"));
        model.set("toBookingDate", reportFilter.get("toDate"));
        model.set("centreId", reportFilter.get("centreId"));

        this.compositeModel = model;

        this.collectionView.listenTo(this.collectionView, "BusCentreReport", () => this.GetByCriteria(this.searchViewModel.bbModel));
        this.collectionView.listenTo(this.collectionView, "Event:PrintReport", (p) => {
            helper.PrintReport(this.backboneCollection, this.GetHeaderList(), "Centre Specific Bus Details","Mileage");
        });
        this.collectionView.listenTo(this.collectionView, "itemview:BusVisitDetails", (view, id) => { this.ShowBusVisitDetails(id, model); });

        this.collectionView.on("CancelForm", () => this.Cancel());
        this.app.MainRegion.show(this.collectionView);

        var vm = kb.viewModel(this.compositeModel);       

        var fromBookingDate = $('#txtFromBookingDate')[0];
        ko.cleanNode(fromBookingDate);
        ko.applyBindings(vm, fromBookingDate);

        var toBookingDate = $('#txtToBookingDate')[0];
        ko.cleanNode(toBookingDate);
        ko.applyBindings(vm, toBookingDate);

        var bookingSumaryDto = new dto.Models.BookingSummaryDto();
        bookingSumaryDto.set('centreId', reportFilter.get("centreId"));
        bookingSumaryDto.set('fromBookingDate', reportFilter.get("fromDate"));
        bookingSumaryDto.set('toBookingDate', reportFilter.get("toDate"));

        var deferred = DAL.GetByCriteria(bookingSumaryDto);
        deferred.done(p=> this.GetByCriteriaCompleted(p));
    }
开发者ID:saeed-ahmed,项目名称:CCTracking,代码行数:40,代码来源:BusCentreReportCtrl.ts

示例8: Show

    Show() {
        var model = this.backboneModel;
        model.set("fromDate", helper.FormatDateString(Date.now()));
        model.set("toDate", helper.FormatDateString(Date.now()));
        this.compositeModel = model;
        this.collectionView.model = model;

        //var deferred = DAL.GetAllAuditBooking(null);
        //deferred.done(p=> this.AuditBookingCompleted(p));
        this.app.MainRegion.show(this.collectionView);
        this.collectionView.listenTo(this.collectionView, "Event:AuditRefundBooking", (auditRequest) => this.GetAuditRefundBookingDetial(auditRequest));

        var vm = kb.viewModel(this.compositeModel);

        var fromDate = $('#txtFromDate')[0];
        ko.cleanNode(fromDate);
        ko.applyBindings(vm, fromDate);

        var toDate = $('#txtToDate')[0];
        ko.cleanNode(toDate);
        ko.applyBindings(vm, toDate);

    }
开发者ID:kashifjawed,项目名称:CCTracking,代码行数:23,代码来源:AuditRefundBookingCtrl.ts

示例9: UIBinding

    UIBinding(model: any) {

        var lookupResponse = JSON.parse(localStorage.getItem('lookupResponse'));

        model.set("unionCouncilList", lookupResponse.unionCouncil);
        var unionCouncil = _.filter(lookupResponse.unionCouncil, (p) => { return p.id == model.get("ucId"); });
        model.set("unionCouncilIdSelected", unionCouncil[0]);

        model.set("isActive", model.get("isActive") ? "1" : "0");

        this.landmarkViewModel.bbModel = model;
        this.landmarkViewModel.model = kb.viewModel(model);
        ko.cleanNode($(this.landmarkView.el)[0]);
        ko.applyBindings(this.landmarkViewModel, this.landmarkView.el);
    }
开发者ID:saeed-ahmed,项目名称:CCTracking,代码行数:15,代码来源:LandmarkCtrl.ts

示例10: SimpleLoad

    SimpleLoad() {
        var lookupResponse = JSON.parse(localStorage.getItem('lookupResponse'));
        this.compositeModel.set("busList", lookupResponse.bus);
        this.compositeModel.set("busSelected", "");
        this.collectionView.model = this.compositeModel;
        //this.collectionView.on("itemview:ShowDetail", (view) => this.GetByIdCompleted(view.model));
        this.collectionView.listenTo(this.collectionView, "Event:SearchVisit", (busId) => this.SearchVisit(busId));
        this.app.MainRegion.show(this.collectionView);

        var vm = kb.viewModel(this.compositeModel);
        vm.setOptionDisable = this.collectionView.setOptionDisable;
        var element = $('#ddlBusDetails')[0];
        ko.cleanNode(element);
        ko.applyBindings(vm, element);
    }
开发者ID:kashifjawed,项目名称:CCTracking,代码行数:15,代码来源:BusVisitCtrl.ts


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