mirror of
https://github.com/optim-enterprises-bv/control-pane.git
synced 2025-11-01 10:27:55 +00:00
WIP: upgrade button
This commit is contained in:
@@ -159,8 +159,6 @@ class ClonOS {
|
|||||||
}
|
}
|
||||||
echo json_encode($new_array);
|
echo json_encode($new_array);
|
||||||
return;
|
return;
|
||||||
}else{
|
|
||||||
echo json_encode(array('error'=>true,'error_message'=>'PHP Method is not exists: '.$this->mode));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$included_result_array='';
|
$included_result_array='';
|
||||||
@@ -252,6 +250,12 @@ class ClonOS {
|
|||||||
echo json_encode($this->saveHelperValues());
|
echo json_encode($this->saveHelperValues());
|
||||||
return;
|
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;
|
background-color:coral;
|
||||||
text-shadow:1px 1px 2px black;
|
text-shadow:1px 1px 2px black;
|
||||||
}
|
}
|
||||||
|
.buttons .button.hidden {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
.window-box h1 {
|
.window-box h1 {
|
||||||
color:gray;
|
color:gray;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
Check for updates…
|
Check for updates…
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
<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" />
|
<input type="button" value="<?php echo $this->translate('Close');?>" class="button red cancel-but" />
|
||||||
</div>
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ var clonos={
|
|||||||
lastX:0,
|
lastX:0,
|
||||||
oldHash:'',
|
oldHash:'',
|
||||||
authorized:false,
|
authorized:false,
|
||||||
|
updates_exists:false,
|
||||||
|
updates:{},
|
||||||
commands:
|
commands:
|
||||||
{
|
{
|
||||||
'jstart':{stat:['Not launched','Starting','Launched'],cmd:'jailStart'},
|
'jstart':{stat:['Not launched','Starting','Launched'],cmd:'jailStart'},
|
||||||
@@ -882,7 +884,19 @@ var clonos={
|
|||||||
},
|
},
|
||||||
onSettingsUpdateCheck:function(data)
|
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)
|
onUsersAdd:function(data)
|
||||||
@@ -2229,12 +2243,15 @@ var clonos={
|
|||||||
|
|
||||||
checkLatestUpdates:function(data)
|
checkLatestUpdates:function(data)
|
||||||
{
|
{
|
||||||
|
this.updates_exists=false;
|
||||||
for(n in data)
|
for(n in data)
|
||||||
{
|
{
|
||||||
var key='updlist_'+n;
|
var key='updlist_'+n;
|
||||||
$('#'+key).addClass('changed');
|
$('#'+key).addClass('changed');
|
||||||
$('#'+key).find('td:eq(2)').text(data[n]);
|
$('#'+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