/** * Created by Zhong on 2017/11/24. */ let projDisplayView = { datas: null,//just for view init:function () { this.datas = projectInfoObj.projectInfo.property.displaySetting; this.datas = this.datas === undefined ? { autoHeight: true, disPlayMainMaterial: true } : this.datas; $("#autoHeight").attr("checked",this.datas.autoHeight); $("#disPlayMainMaterial").attr("checked",this.datas.disPlayMainMaterial); //$('#disPlayMainMateria').prop('checked') }, needUpdate: function(autoHeight, disPlayMainMaterial) { if(this.datas==null){ return; } return autoHeight !== this.datas.autoHeight || disPlayMainMaterial !== this.datas.disPlayMainMaterial; }, updateChecking:function (projectID,properties) { if(this.datas==null){ return; } var autoHeight = $('#autoHeight').prop('checked'); var disPlayMainMaterial = $('#disPlayMainMaterial').prop('checked'); if(this.datas.autoHeight!==autoHeight||this.datas.disPlayMainMaterial!==disPlayMainMaterial){ this.datas.autoHeight=autoHeight; this.datas.disPlayMainMaterial=disPlayMainMaterial; // let updateData = {sourceType: 'properties', updateType: 'update', updateData: {ID: projectID, 'property.displaySetting':this.datas}}; properties['property.displaySetting'] = this.datas; } } }; $(document).ready(function () { $('#tab_display_setting').on('shown.bs.tab', function () { projDisplayView.init(); }); });