Using jQueries detach method to move the webcam stream

No template file is required anymore
This commit is contained in:
malnvenshorn
2018-01-13 14:09:23 +01:00
parent 030b270a33
commit d27517218f
3 changed files with 9 additions and 44 deletions

View File

@ -51,14 +51,15 @@ $(function() {
}
};
self.onStartup = function() {
var container = $("#control #webcam_container");
if (container.length) {
var hint = container.next();
if (hint.attr("data-bind") === "visible: keycontrolPossible") {
hint.remove();
self.onAfterBinding = function() {
var tab = $("#tab_plugin_webcamtab");
var webcam = $("#webcam_container");
if (webcam) {
var hint = webcam.next();
tab.append(webcam.detach());
if (hint && hint.attr("data-bind") === "visible: keycontrolPossible") {
tab.append(hint.detach());
}
container.remove();
}
};
};