Commit 983e8a59 authored by joelalju's avatar joelalju Committed by Francesc Guasch
Browse files

[#404] Erased unnecessary code

parent 079f4a42
......@@ -154,9 +154,9 @@
$scope.reload_page_msg = false;
$scope.fail_page_msg = false;
$scope.screenshot = function(target,action,machineId, isActive){
$scope.screenshot = function(machineId, isActive){
if (isActive) {
$http.get('/'+target+'/'+action+'/'+machineId+'.json');
$http.get('/machine/screenshot/'+machineId+'.json');
$scope.fail_page_msg = false;
$scope.reload_page_msg = true;
setTimeout(function () {
......@@ -172,9 +172,9 @@
$scope.reload_page_copy_msg = false;
$scope.fail_page_copy_msg = false;
$scope.copy_done = false;
$scope.copy_screenshot = function(target, action, machineId, fileScreenshot){
$scope.copy_screenshot = function(machineId, fileScreenshot){
if (fileScreenshot != '') {
$http.get('/'+target+'/'+action+'/'+machineId+'.json');
$http.get('/machine/copy_screenshot/'+machineId+'.json');
$scope.fail_page_copy_msg = false;
$scope.reload_page_copy_msg = true;
setTimeout(function () {
......
......@@ -1333,13 +1333,6 @@ sub settings_machine {
) if $c->param('start') && !$domain->is_active;
_enable_buttons($c, $domain);
my $file_screenshot = "$DOCUMENT_ROOT/img/screenshots/".$domain->id.".png";
my $req3 = Ravada::Request->copy_screenshot (
id_domain => $domain->id
,filename => $file_screenshot
) if $c->param('copy_screenshot');
$c->stash(message => '');
my @reqs = ();
......
......@@ -2,11 +2,11 @@
<div class="form-group">
<div ng-hide= "<%= $domain->is_base %>" class="row" ng-cloak>
<div class="col-lg-2">
<button ng-click="screenshot('machine','screenshot',<%= $domain->id %>, <%= $domain->is_active %>)">
<button ng-click="screenshot(<%= $domain->id %>, <%= $domain->is_active %>)">
<%=l "Take screenshot" %></a>
</div>
<div class="col-lg-2">
<button ng-click="copy_screenshot('machine','copy_screenshot',<%= $domain->id %>, '<%= $domain->file_screenshot %>')">
<button ng-click="copy_screenshot(<%= $domain->id %>, '<%= $domain->file_screenshot %>')">
<%=l "Set base picture" %></button>
</div>
<i ng-show="reload_page_msg" ng-cloak><font color="green">Saving the screenshot, please wait a moment...</font></i>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment