You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							49 lines
						
					
					
						
							1.4 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							49 lines
						
					
					
						
							1.4 KiB
						
					
					
				| var EditLineWidth = function (parent) { | |
|     this.Parent = parent; | |
|     this.Dialog = $('#edit-line-width-dialog'); | |
|     this.Config = {}; | |
| 
 | |
|     this.Setup = function () { | |
|         $("#width-sure-btn").on("click", this.OnSureButtonClick.bind(this)); | |
|         $("#width-cancel-btn").on("click", this.HideDialog.bind(this)); | |
|         $("#width-close").on("click", this.HideDialog.bind(this)); | |
|     }; | |
| 
 | |
|     this.Show = function (data) { | |
|         this.Dialog.show(); | |
|         this.Config = data; | |
|         $("#width").textbox('setValue', data.Value); | |
|     }; | |
| 
 | |
|     this.OnSureButtonClick = function () { | |
|         this.validation(); | |
|     }; | |
| 
 | |
|     this.validation = function () { | |
|         if ($("#width").textbox('getValue').trim() === '' || $("#width").textbox('getValue').trim === null) { | |
|             alert('请输入宽度值'); | |
|             return | |
|         } else { | |
|             this.Config.Value = $('#width').textbox('getValue'); | |
|             this.UpdateLineWidth(); | |
|             this.Dialog.hide(); | |
|             this.Parent.DisabledEvent(); | |
|         } | |
|     }; | |
| 
 | |
|     this.UpdateLineWidth = function () { | |
|         $.ajax({ | |
|             type: "POST", | |
|             dataType: 'text', | |
|             url: '/ConfigManagement/Update', | |
|             data: this.Config, | |
|             success: function () { | |
|                 this.Parent.ReLoadTableData(); | |
|             }.bind(this) | |
|         }); | |
|     }; | |
| 
 | |
|     this.HideDialog = function () { | |
|         this.Dialog.hide(); | |
|     }; | |
| }; |