• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript knockback.viewModel函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Load

    Load() {

        var lookupResponse = JSON.parse(localStorage.getItem('lookupResponse'));
        //var model = new dto.Models.BusDto();
        var model = this.backboneModel;
        this.busViewModel.bbModel = model;
        this.busViewModel.model = kb.viewModel(model);
        // debugger;
        model.set("trackingDeviceId", "");
        model.set("vehicleNo", "");
        model.set("alkhidmatCentreList", lookupResponse.alkhidmatCentre);
        model.set("alkhidmatCentreSelected", "");
        model.set("busModelList", lookupResponse.busModel);
        model.set("busModelSelected", "");
        model.set("no", "");
        model.set("description", "");
        model.set("initialReading","");
        model.set("isActive", "1");

        this.busViewModel = new views.BusViewModel(model, this);
        this.busView = new views.BusView({ viewModel: this.busViewModel });
        this.busView.on("SaveBus", () => this.Save(this.busViewModel.bbModel));

        this.busView.on("CancelForm", () => this.Cancel());
        //this.layout = app.AppLayout;
        this.app.MainRegion.show(this.busView);
        //this.GetAll();
    }
开发者ID:kashifjawed,项目名称:CCTracking,代码行数:28,代码来源:BusCtrl.ts


示例2: Load

    Load() {

        var lookupResponse = JSON.parse(localStorage.getItem('lookupResponse'));
        //var model = new dto.Models.DriverDto();
        var model = this.backboneModel;
        this.driverViewModel.bbModel = model;
        this.driverViewModel.model = kb.viewModel(model);
        // debugger;
        model.set("firstName", "");
        model.set("lastName", "");
        model.set("alkhidmatCentreList", lookupResponse.alkhidmatCentre);
        model.set("alkhidmatCentreSelected", "");
        model.set("cnic", "");
        model.set("address", "");
        model.set("city", "");
        model.set("mobile", "");
        model.set("isActive", "");

        this.driverViewModel = new views.DriverViewModel(model, this);
        this.driverView = new views.DriverView({ viewModel: this.driverViewModel });
        this.driverView.on("SaveDriver", () => this.Save(this.driverViewModel.bbModel));

        this.driverView.on("CancelForm", () => this.Cancel());
        //this.layout = app.AppLayout;
        this.app.MainRegion.show(this.driverView);
        //this.GetAll();
    }
开发者ID:kashifjawed,项目名称:CCTracking,代码行数:27,代码来源:DriverCtrl.ts


示例3: Load

    Load() {

        var lookupResponse = JSON.parse(localStorage.getItem('lookupResponse'));
        //var model = new dto.Models.StationDto();
        var model = this.backboneModel;
        this.stationViewModel.bbModel = model;
        this.stationViewModel.model = kb.viewModel(model);

        model.set("name", "");
        model.set("address", "");
        model.set("landmarkIdSelected", "");
        model.set("landmarkList", lookupResponse.landmark);
        model.set("contactNo1", "");
        model.set("contactNo2", "");
        model.set("isCoPartner", "");
        model.set("isActive", "");

        this.stationViewModel = new views.StationViewModel(model, this);
        this.stationView = new views.StationView({ viewModel: this.stationViewModel });
        this.stationView.on("SaveAlkhidmatCentre", () => this.Save(this.stationViewModel.bbModel));

        this.stationView.on("CancelForm", () => this.Cancel());
        //this.layout = app.AppLayout;
        this.app.MainRegion.show(this.stationView);
        //this.GetAll();
    }
开发者ID:kashifjawed,项目名称:CCTracking,代码行数:26,代码来源:AlkhidmatCentreCtrl.ts


示例4: Load

    Load() {

        var lookupResponse = JSON.parse(localStorage.getItem('lookupResponse'));
        var model = this.backboneModel;
        this.userViewModel.bbModel = model;
        this.userViewModel.model = kb.viewModel(model);
        // debugger;
        model.set("firstName", "");
        model.set("lastName", "");
        model.set("alkhidmatCentreList", lookupResponse.alkhidmatCentre);
        model.set("alkhidmatCentreSelected", "");
        model.set("roleList", lookupResponse.role);
        model.set("roleSelected", "");
        model.set("cnic", "");
        model.set("userName", "");
        model.set("address", "");
        model.set("city", "");
        model.set("mobile", "");
        model.set("email", "");
        model.set("isActive", "1");

        this.userViewModel = new views.UserViewModel(model, this);
        this.userView = new views.UserView({ viewModel: this.userViewModel });
        this.userView.on("SaveUser", () => this.Save(this.userViewModel.bbModel));

        this.userView.on("CancelForm", () => this.Cancel());
        this.app.MainRegion.show(this.userView);
    }
开发者ID:kashifjawed,项目名称:CCTracking,代码行数:28,代码来源:UserCtrl.ts


示例5: 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


示例6: Load

    Load() {

        var lookupResponse = JSON.parse(localStorage.getItem('lookupResponse'));
        var model = this.backboneModel;
        this.nearestCentreSetupViewModel.bbModel = model;
        this.nearestCentreSetupViewModel.model = kb.viewModel(model);

       
        // debugger;
        
        model.set("alkhidmatCentreList", lookupResponse.alkhidmatCentre);
        model.set("alkhidmatCentreSelected", "");        
        model.set("nearestCentreSelected", "");        
        model.set("nearestLevel", "");   
        model.set("isActive", "1");

        this.nearestCentreSetupViewModel = new views.NearestCentreSetupViewModel(model, this);
        this.nearestCentreSetupView = new views.NearestCentreSetupView({ viewModel: this.nearestCentreSetupViewModel });
        
        this.nearestCentreSetupView.on("SaveNearestCentreSetup", () => this.Save(this.nearestCentreSetupViewModel.bbModel));

      

        this.nearestCentreSetupView.on("CancelForm", () => this.Cancel());
        //this.layout = app.AppLayout;
        this.app.MainRegion.show(this.nearestCentreSetupView);
        //this.GetAll();
    }
开发者ID:saeed-ahmed,项目名称:CCTracking,代码行数:28,代码来源:NearestCentreSetupCtrl.ts


示例7: 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


示例8: 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


示例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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript knockout.applyBindings函数代码示例发布时间:2022-05-25
下一篇:
TypeScript knexClient.default函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap