add valid way to exit logging in pass through mode

10.3.x-maintenance
cTn 2014-06-20 11:20:29 +02:00
parent cb5bcf9c0a
commit 211bd5b89e
4 changed files with 30 additions and 1 deletions

View File

@ -490,6 +490,9 @@
"loggingStop": { "loggingStop": {
"message": "Stop Logging" "message": "Stop Logging"
}, },
"loggingBack": {
"message": "Leave Logging / Disconnect"
},
"loggingErrorLogFile": { "loggingErrorLogFile": {
"message": "Please select log file" "message": "Please select log file"
}, },

View File

@ -49,7 +49,10 @@
line-height: 20px; line-height: 20px;
} }
.tab-logging .buttons { .tab-logging .buttons {
margin-top: 10px; width: calc(100% - 20px);
position: absolute;
bottom: 10px;
} }
.tab-logging .buttons a { .tab-logging .buttons a {
display: block; display: block;
@ -71,3 +74,9 @@
.tab-logging .buttons a:hover { .tab-logging .buttons a:hover {
background-color: #dedcdc; background-color: #dedcdc;
} }
.tab-logging .buttons .back {
display: none;
float: right;
margin: 0;
}

View File

@ -34,5 +34,6 @@
<div class="buttons"> <div class="buttons">
<a href="#" class="log_file" i18n="loggingButtonLogFile"></a> <a href="#" class="log_file" i18n="loggingButtonLogFile"></a>
<a href="#" class="logging" i18n="loggingStart"></a> <a href="#" class="logging" i18n="loggingStart"></a>
<a href="#" class="back" i18n="loggingBack"></a>
</div> </div>
</div> </div>

View File

@ -112,6 +112,22 @@ function tab_initialize_logging() {
} }
}); });
if (MSP_pass_through) {
$('a.back').show();
$('a.back').click(function() {
if (GUI.connected_to) {
$('a.connect').click();
} else {
GUI.tab_switch_cleanup(function() {
MSP_pass_through = false;
$('#tabs > ul li').removeClass('active');
tab_initialize_default();
});
}
});
}
chrome.storage.local.get('logging_file_entry', function(result) { chrome.storage.local.get('logging_file_entry', function(result) {
if (result.logging_file_entry) { if (result.logging_file_entry) {
chrome.fileSystem.restoreEntry(result.logging_file_entry, function(entry) { chrome.fileSystem.restoreEntry(result.logging_file_entry, function(entry) {