Test From PyCharm
parent
997d9e87c5
commit
1dc140b1b7
|
|
@ -5,7 +5,7 @@ block_cipher = None
|
|||
|
||||
|
||||
a = Analysis(['main.py'],
|
||||
pathex=['S:\\SIGHTPLACE\\DEV'],
|
||||
pathex=['S:\\SIGHTPLACE\\DEV\\sightplace-rep'],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
|
|
|
|||
|
|
@ -4,13 +4,57 @@ if(navigator.userAgent.indexOf("QtWebEngine") > 0) {
|
|||
window.sight = channel.objects.handler;
|
||||
});
|
||||
}
|
||||
/*
|
||||
function docReady(fn) {
|
||||
if(document.readyState === "complete" || document.readyState === "interactive") {
|
||||
setTimeout(fn, 1);
|
||||
} else {
|
||||
setTimeout(fn, 2);
|
||||
document.addEventListener("DOMContentLoaded", fn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.querySelectorAll('a').forEach(link => {
|
||||
link.onclick = function() { alert("ss"); }
|
||||
|
||||
link.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
alert("sds");
|
||||
});
|
||||
});
|
||||
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
|
||||
|
||||
document.querySelectorAll('#screate').forEach(link => {
|
||||
alert("1");
|
||||
link.addEventListener("click", (e) => {
|
||||
alert("sds");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
const screate = document.getElementById("screate");
|
||||
screate.addEventListener("click",myFunc);
|
||||
|
||||
document.getElementById("screate").onclick = e => {
|
||||
alert("ss")
|
||||
}
|
||||
});*/
|
||||
/*
|
||||
document.getElementById("screate").onclick = e => {
|
||||
alert("ss")
|
||||
}*/
|
||||
|
||||
/*const screate = document;*/
|
||||
|
||||
(function ( $ ) {
|
||||
$.fn.s_create = function() {
|
||||
$(document).on( "click", "#screate", function() {
|
||||
event.preventDefault();
|
||||
window.sight.create($(this).data("id"), $(this).data("type"), function(sight_id) {
|
||||
/*alert(sight_id)*/
|
||||
|
||||
});
|
||||
})
|
||||
};
|
||||
|
|
@ -131,13 +175,29 @@ function sclose() {
|
|||
function setTitle(title) {
|
||||
$("#stitle").text(title);
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
// LOAD the contents into the Sight
|
||||
if (typeof s_contents !== 'undefined') {
|
||||
for ( const [id_name,content_folder] of Object.entries( s_contents ) ) {
|
||||
$("#"+id_name).load("content/"+content_folder+"/content.html");
|
||||
/*$("#"+id_name).load("content/"+content_folder+"/content.html", function() {
|
||||
document.querySelectorAll('#screate').forEach(link => {
|
||||
link.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
window.sight.create(e.target.dataset.id, e.target.dataset.type, function(sight_id) {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// INIT the Sight from init_sight variable
|
||||
if (typeof init_sight !== 'undefined') {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,17 +4,60 @@ if(navigator.userAgent.indexOf("QtWebEngine") > 0) {
|
|||
window.sight = channel.objects.handler;
|
||||
});
|
||||
}
|
||||
/*
|
||||
function docReady(fn) {
|
||||
if(document.readyState === "complete" || document.readyState === "interactive") {
|
||||
setTimeout(fn, 1);
|
||||
} else {
|
||||
setTimeout(fn, 2);
|
||||
document.addEventListener("DOMContentLoaded", fn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.querySelectorAll('a').forEach(link => {
|
||||
link.onclick = function() { alert("ss"); }
|
||||
|
||||
link.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
alert("sds");
|
||||
});
|
||||
});
|
||||
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
|
||||
|
||||
document.querySelectorAll('#screate').forEach(link => {
|
||||
alert("1");
|
||||
link.addEventListener("click", (e) => {
|
||||
alert("sds");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
const screate = document.getElementById("screate");
|
||||
screate.addEventListener("click",myFunc);
|
||||
|
||||
document.getElementById("screate").onclick = e => {
|
||||
alert("ss")
|
||||
}
|
||||
});*/
|
||||
/*
|
||||
document.getElementById("screate").onclick = e => {
|
||||
alert("ss")
|
||||
}*/
|
||||
|
||||
/*const screate = document;*/
|
||||
|
||||
(function ( $ ) {
|
||||
$.fn.s_create = function() {
|
||||
/* $.fn.s_create = function() {
|
||||
$(document).on( "click", "#screate", function() {
|
||||
event.preventDefault();
|
||||
var data_id = ""
|
||||
window.sight.create(data_id, $(this).data("type"), function(sight_id) {
|
||||
/*alert(sight_id)*/
|
||||
window.sight.create($(this).data("id"), $(this).data("type"), function(sight_id) {
|
||||
|
||||
});
|
||||
})
|
||||
};
|
||||
};*/
|
||||
$.fn.s_close = function() {
|
||||
$("body").on( "click", "#sclose", function() {
|
||||
event.preventDefault();
|
||||
|
|
@ -132,13 +175,29 @@ function sclose() {
|
|||
function setTitle(title) {
|
||||
$("#stitle").text(title);
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
// LOAD the contents into the Sight
|
||||
if (typeof s_contents !== 'undefined') {
|
||||
for ( const [id_name,content_folder] of Object.entries( s_contents ) ) {
|
||||
$("#"+id_name).load("content/"+content_folder+"/content.html");
|
||||
/*$("#"+id_name).load("content/"+content_folder+"/content.html");*/
|
||||
$("#"+id_name).load("content/"+content_folder+"/content.html", function() {
|
||||
document.querySelectorAll('#screate').forEach(link => {
|
||||
link.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
window.sight.create(e.target.dataset.id, e.target.dataset.type, function(sight_id) {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// INIT the Sight from init_sight variable
|
||||
if (typeof init_sight !== 'undefined') {
|
||||
|
||||
|
|
@ -195,7 +254,7 @@ $(document).ready(function(){
|
|||
});*/
|
||||
// INIT END
|
||||
|
||||
$( "#screate" ).s_create();
|
||||
/*$( "#screate" ).s_create();*/
|
||||
$( "#sclose" ).s_close();
|
||||
$( "#sexit" ).s_exit();
|
||||
$( "#smaximized" ).s_maximized();
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
<a href="#" id="screate" data-type="other">Create an "Other" sight!</a>
|
||||
<a href="#" id="screate" data-type="other" data-id="other">Create an "Other" sight!</a>
|
||||
<a href="http://192.168.1.2:5000/audio/">test</a>
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
<script src="../../js/sight.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
addData("name", "Balazs", true);
|
||||
getData("name");
|
||||
/*addData("name", "Balazs", true);
|
||||
getData("name");*/
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
<div id="sminimize"></div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<a href="main.html">Open the main inside this sight!</a>
|
||||
<div id="main_content"></div>
|
||||
MAIN
|
||||
<div id="main_text"></div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue