mirror of
				https://github.com/optim-enterprises-bv/control-pane.git
				synced 2025-10-31 09:57:57 +00:00 
			
		
		
		
	WIP: upgrade button
This commit is contained in:
		| @@ -159,8 +159,6 @@ class ClonOS { | ||||
| 				} | ||||
| 				echo json_encode($new_array); | ||||
| 				return; | ||||
| 			}else{ | ||||
| 				echo json_encode(array('error'=>true,'error_message'=>'PHP Method is not exists: '.$this->mode)); | ||||
| 			} | ||||
|  | ||||
| 			$included_result_array=''; | ||||
| @@ -252,6 +250,12 @@ class ClonOS { | ||||
| 					echo json_encode($this->saveHelperValues()); | ||||
| 					return; | ||||
| */ | ||||
| 				if(!method_exists($this,$cfunc)) | ||||
| 				{ | ||||
| 					//echo json_encode(array('error'=>true,'error_message'=>'PHP Method is not exists: '.$this->mode)); | ||||
| 					$this->vars['error']=true; | ||||
| 					$this->vars['error_message']='PHP Method is not exists: '.$this->mode; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
| @@ -870,6 +870,9 @@ dialog.fullscreen #vnc-iframe { | ||||
| 	background-color:coral; | ||||
| 	text-shadow:1px 1px 2px black; | ||||
| } | ||||
| .buttons .button.hidden { | ||||
| 	display:none; | ||||
| } | ||||
|  | ||||
| .window-box h1 { | ||||
| 	color:gray; | ||||
|   | ||||
| @@ -4,6 +4,7 @@ | ||||
| 		Check for updates… | ||||
| 	</div> | ||||
| 	<div class="buttons"> | ||||
| 		<input type="button" value="<?php echo $this->translate('Get updates');?>" class="new button ok-but hidden"> | ||||
| 		<input type="button" value="<?php echo $this->translate('Close');?>" class="button red cancel-but" /> | ||||
| 	</div> | ||||
| </dialog> | ||||
|   | ||||
| @@ -5,6 +5,8 @@ var clonos={ | ||||
| 	lastX:0, | ||||
| 	oldHash:'', | ||||
| 	authorized:false, | ||||
| 	updates_exists:false, | ||||
| 	updates:{}, | ||||
| 	commands: | ||||
| 	{ | ||||
| 		'jstart':{stat:['Not launched','Starting','Launched'],cmd:'jailStart'}, | ||||
| @@ -882,7 +884,19 @@ var clonos={ | ||||
| 	}, | ||||
| 	onSettingsUpdateCheck:function(data) | ||||
| 	{ | ||||
| 		$('dialog#settings-update .window-content').append('<p>'+data.installed+'</p>'); | ||||
| 		var msg='<p>'+this.translate('No updates…')+'</p>'; | ||||
| 		if(this.updates_exists) | ||||
| 		{ | ||||
| 			msg='<p>'+this.translate('Updates available:')+'</p>'; | ||||
| 			for(n in this.updates) | ||||
| 			{ | ||||
| 				msg+='<p>'+n+', version: '+this.updates[n]+'</p>'; | ||||
| 			} | ||||
| 			$('#settings-update .button.ok-but').removeClass('hidden'); | ||||
| 		}else{ | ||||
| 			$('#settings-update .button.ok-but').addClass('hidden'); | ||||
| 		} | ||||
| 		$('dialog#settings-update .window-content').html(msg); | ||||
| 	}, | ||||
| 	 | ||||
| 	onUsersAdd:function(data) | ||||
| @@ -2229,12 +2243,15 @@ var clonos={ | ||||
| 	 | ||||
| 	checkLatestUpdates:function(data) | ||||
| 	{ | ||||
| 		this.updates_exists=false; | ||||
| 		for(n in data) | ||||
| 		{ | ||||
| 			var key='updlist_'+n; | ||||
| 			$('#'+key).addClass('changed'); | ||||
| 			$('#'+key).find('td:eq(2)').text(data[n]); | ||||
| 			this.updates_exists=true; | ||||
| 		} | ||||
| 		if(this.updates_exists) this.updates=data; | ||||
| 	}, | ||||
| 	 | ||||
| 	 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 olevole
					olevole