Compare commits

..

3 Commits

Author SHA1 Message Date
Balazs Birtalan 6bb1efc432 Merge remote-tracking branch 'origin/main' 2023-10-26 09:39:42 +01:00
Balazs Birtalan a8977fc038 Test From PyCharm 2023-10-26 09:39:09 +01:00
Balazs Birtalan 1dc140b1b7 Test From PyCharm 2023-10-26 09:30:47 +01:00
11 changed files with 180 additions and 12 deletions

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/sightplace-rep.iml" filepath="$PROJECT_DIR$/.idea/sightplace-rep.iml" />
</modules>
</component>
</project>

15
.idea/sightplace-rep.iml Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/place/templates" />
</list>
</option>
</component>
</module>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -5,7 +5,7 @@ block_cipher = None
a = Analysis(['main.py'], a = Analysis(['main.py'],
pathex=['S:\\SIGHTPLACE\\DEV'], pathex=['S:\\SIGHTPLACE\\DEV\\sightplace-rep'],
binaries=[], binaries=[],
datas=[], datas=[],
hiddenimports=[], hiddenimports=[],

View File

@ -4,13 +4,57 @@ if(navigator.userAgent.indexOf("QtWebEngine") > 0) {
window.sight = channel.objects.handler; 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 ( $ ) { (function ( $ ) {
$.fn.s_create = function() { $.fn.s_create = function() {
$(document).on( "click", "#screate", function() { $(document).on( "click", "#screate", function() {
event.preventDefault(); event.preventDefault();
window.sight.create($(this).data("id"), $(this).data("type"), function(sight_id) { window.sight.create($(this).data("id"), $(this).data("type"), function(sight_id) {
/*alert(sight_id)*/
}); });
}) })
}; };
@ -131,13 +175,29 @@ function sclose() {
function setTitle(title) { function setTitle(title) {
$("#stitle").text(title); $("#stitle").text(title);
} }
$(document).ready(function(){ $(document).ready(function(){
// LOAD the contents into the Sight // LOAD the contents into the Sight
if (typeof s_contents !== 'undefined') { if (typeof s_contents !== 'undefined') {
for ( const [id_name,content_folder] of Object.entries( s_contents ) ) { 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 // INIT the Sight from init_sight variable
if (typeof init_sight !== 'undefined') { if (typeof init_sight !== 'undefined') {

View File

@ -4,17 +4,60 @@ if(navigator.userAgent.indexOf("QtWebEngine") > 0) {
window.sight = channel.objects.handler; 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 ( $ ) { (function ( $ ) {
$.fn.s_create = function() { /* $.fn.s_create = function() {
$(document).on( "click", "#screate", function() { $(document).on( "click", "#screate", function() {
event.preventDefault(); event.preventDefault();
var data_id = "" window.sight.create($(this).data("id"), $(this).data("type"), function(sight_id) {
window.sight.create(data_id, $(this).data("type"), function(sight_id) {
/*alert(sight_id)*/
}); });
}) })
}; };*/
$.fn.s_close = function() { $.fn.s_close = function() {
$("body").on( "click", "#sclose", function() { $("body").on( "click", "#sclose", function() {
event.preventDefault(); event.preventDefault();
@ -132,13 +175,29 @@ function sclose() {
function setTitle(title) { function setTitle(title) {
$("#stitle").text(title); $("#stitle").text(title);
} }
$(document).ready(function(){ $(document).ready(function(){
// LOAD the contents into the Sight // LOAD the contents into the Sight
if (typeof s_contents !== 'undefined') { if (typeof s_contents !== 'undefined') {
for ( const [id_name,content_folder] of Object.entries( s_contents ) ) { 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 // INIT the Sight from init_sight variable
if (typeof init_sight !== 'undefined') { if (typeof init_sight !== 'undefined') {
@ -195,7 +254,7 @@ $(document).ready(function(){
});*/ });*/
// INIT END // INIT END
$( "#screate" ).s_create(); /*$( "#screate" ).s_create();*/
$( "#sclose" ).s_close(); $( "#sclose" ).s_close();
$( "#sexit" ).s_exit(); $( "#sexit" ).s_exit();
$( "#smaximized" ).s_maximized(); $( "#smaximized" ).s_maximized();

View File

@ -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>

View File

@ -16,8 +16,8 @@
<script src="../../js/sight.js"></script> <script src="../../js/sight.js"></script>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
addData("name", "Balazs", true); /*addData("name", "Balazs", true);
getData("name"); getData("name");*/
}); });
</script> </script>
</head> </head>
@ -30,6 +30,7 @@
<div id="sminimize"></div> <div id="sminimize"></div>
</div> </div>
<div id="content"> <div id="content">
<a href="main.html">Open the main inside this sight!</a>
<div id="main_content"></div> <div id="main_content"></div>
MAIN MAIN
<div id="main_text"></div> <div id="main_text"></div>