modified: public/lib/inter.js
modified: views/admin/objects/object_groups.ejs modified: views/header.ejs modified: views/load.ejs modified: views/project.ejs modified: views/static/end.ejs modified: views/static/start.ejs
This commit is contained in:
@ -1,15 +1,16 @@
|
||||
|
||||
<style>
|
||||
#obj_group button,#obj_group select{
|
||||
height: 25px;
|
||||
height: 50px;
|
||||
margin: auto 0px;
|
||||
|
||||
}
|
||||
</style>
|
||||
<div id="obj_group">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<h1>группы товаров</h1>
|
||||
<select name="" id="group_select" onchange="edit_get_objs();"></select>
|
||||
<div style="display: flex;justify-content: space-between;width: 220px;">
|
||||
<div style="display: flex;justify-content: space-between;width: 350px;">
|
||||
<button onclick="create_new_group()">создать группу</button>
|
||||
<button onclick="delete_group()">удалить группу</button>
|
||||
</div>
|
||||
|
@ -49,16 +49,19 @@
|
||||
background: ghostwhite;
|
||||
cursor: pointer;
|
||||
border: 1px black dashed;
|
||||
padding: 5px;
|
||||
padding: 2px;
|
||||
width: 220px;
|
||||
}
|
||||
.cmenu{
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
display: grid;
|
||||
background: ghostwhite;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
border: 1px black solid;
|
||||
z-index: 100;
|
||||
border-top: 0px;
|
||||
z-index: 500;
|
||||
/* width: 218px; */
|
||||
}
|
||||
#top_panel_right_main{
|
||||
/* float: right; */
|
||||
@ -129,27 +132,32 @@
|
||||
<div id="user_menu" class="cmenu"></div>
|
||||
|
||||
|
||||
<div id="top_div" style="background-color: rgba(red, green, blue, 0.5); width: 100%;height: 100%;position: absolute;inset: 0px;z-index: 300; display: none;" onclick="hide_menus()"></div>
|
||||
|
||||
<script>
|
||||
// get_from_uuid((res)=>{
|
||||
// let uname = document.getElementById("user_name");
|
||||
// let menu = document.getElementById("user_menu");
|
||||
// let header = document.getElementById("top_panel");
|
||||
// let right = document.getElementById("top_panel_right");
|
||||
// let left = document.getElementById("top_panel_left");
|
||||
get_from_uuid((res)=>{
|
||||
// let uname = document.getElementById("user_name");
|
||||
// let menu = document.getElementById("user_menu");
|
||||
// let header = document.getElementById("top_panel");
|
||||
// let right = document.getElementById("top_panel_right");
|
||||
// let left = document.getElementById("top_panel_left");
|
||||
|
||||
// if(document.title != "main") menu.innerHTML += `<button onclick="goto('/');">проекты</button> <br>`;
|
||||
// right.innerHTML += `<div id="user_name" class="menu_btn">${res["login"]}</div>`;
|
||||
// if(document.title != "main") menu.innerHTML += `<button onclick="goto('/');">проекты</button> <br>`;
|
||||
// right.innerHTML += `<div id="user_name" class="menu_btn">${res["login"]}</div>`;
|
||||
|
||||
// if (res["admin"] == true){
|
||||
// menu.innerHTML += `<button onclick='goto("/admin")'>админ. панель</button><br>`;
|
||||
// }
|
||||
// menu.innerHTML += "<button onclick='logout();'>выйти</button><br>";
|
||||
// });
|
||||
let menu = document.getElementById("top_panel_center");
|
||||
if (res["admin"] == true){
|
||||
menu.innerHTML += `<button onclick='goto("/admin")'>админ. панель</button><br>`;
|
||||
}
|
||||
// menu.innerHTML += "<button onclick='logout();'>выйти</button><br>";
|
||||
});
|
||||
|
||||
onscroll = (e)=>{
|
||||
hide_menus();
|
||||
}
|
||||
onresize = (e)=>{
|
||||
hide_menus();
|
||||
}
|
||||
onclick = (e) => {
|
||||
// e.preventDefault()
|
||||
// console.log(e);
|
||||
@ -214,7 +222,13 @@
|
||||
// document.body.appendChild(menu)
|
||||
|
||||
}
|
||||
else if(e.target.id == "proj_cost"){
|
||||
document.getElementById("cost_list").style = `margin-top:3vw;left:${e.target.getBoundingClientRect().left}px`;
|
||||
console.log("cost_list");
|
||||
}
|
||||
else if(e.target.id == "group_drop"){
|
||||
document.getElementById("group").style = `margin-top:2vw;left:${e.target.getBoundingClientRect().left}px;width: 14vw;padding: 7.5px;`;
|
||||
console.log("group");
|
||||
// hide_menus();
|
||||
// let menu = document.getElementById("object_edit_menu");
|
||||
// let obj = e.target;
|
||||
@ -226,8 +240,8 @@
|
||||
// // document.body.appendChild(menu)
|
||||
|
||||
}
|
||||
else{
|
||||
hide_menus();
|
||||
}
|
||||
// else{
|
||||
// hide_menus();
|
||||
// }
|
||||
}
|
||||
</script>
|
@ -53,6 +53,7 @@
|
||||
logo.style.left = loaded_pos.x;
|
||||
logo.style.top = loaded_pos.y;
|
||||
logo.style.width = loaded_pos.w
|
||||
load_div.style.height = `${document.getElementsByTagName("body")[0].scrollHeight}px`;
|
||||
}
|
||||
function loading(){
|
||||
let logo = document.getElementById("load_logo");
|
||||
@ -63,5 +64,6 @@
|
||||
logo.style.left = loading_pos.x;
|
||||
logo.style.top = loading_pos.y;
|
||||
logo.style.width = loading_pos.w
|
||||
load_div.style.height = `${document.getElementsByTagName("body")[0].scrollHeight}px`;
|
||||
}
|
||||
</script>
|
@ -112,7 +112,6 @@
|
||||
position: absolute;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -142,6 +141,27 @@
|
||||
<label for="wall_color" style="margin: auto;">цвет стены</label>
|
||||
<input type="color" id="wall_color" style="width: 50px;" value="#000000" onchange="wall_color_change()">
|
||||
</div>
|
||||
<div style="display: flex;width: 15vw;justify-content: space-between; background-color: #aaa;">
|
||||
<input type="button" id="proj_cost" class="menu_btn" value="Расчет стоимости" onclick="cost_drop();open_menu();" style="width: 100%;">
|
||||
<style>
|
||||
#cost_list li{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 14vw;
|
||||
}
|
||||
#cost_list{
|
||||
list-style-type: none;
|
||||
padding-left: 0px;
|
||||
margin-top: 59px;
|
||||
position: absolute;
|
||||
width: 14vw;
|
||||
padding: 0.45vw;
|
||||
}
|
||||
</style>
|
||||
<ul id="cost_list" class="cmenu">
|
||||
</ul>
|
||||
<!-- <div style="display: flex;"><div id="proj_cost"></div> руб.</div> -->
|
||||
</div>
|
||||
<!-- <div style="display: flex;width: 150px;justify-content: space-between;">
|
||||
<label style="margin: auto;">Расчёт стоимости</label>
|
||||
</div> -->
|
||||
@ -154,14 +174,9 @@
|
||||
<div class="wall dropzone" id="wall"></div>
|
||||
</div>
|
||||
|
||||
<div style="display:flex; justify-content: space-around;"><div style="display: flex;"><div id="proj_cost"></div> руб.</div></div>
|
||||
<div style="display:flex; justify-content: space-around;"></div>
|
||||
|
||||
<div class="inputs" style="display: flex;justify-content: space-between;">
|
||||
<div id="obj_group" style="display: flex;justify-content: space-between; width: 30vw;">
|
||||
<!-- <button name="" id="group_drop" >Помехи на стене</button> -->
|
||||
<button name="" id="group_drop" onclick="group_drop()">Оборудование</button>
|
||||
<ul id="group" class="cmenu"></ul>
|
||||
</div>
|
||||
<div style="display: flex;justify-content: space-between; width: 20vw;">
|
||||
<div>copy</div>
|
||||
<div>back</div>
|
||||
@ -173,6 +188,14 @@
|
||||
<div>load</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inputs" style="display: flex;justify-content: space-between;margin-top: 0px;">
|
||||
<div id="obj_group" style="display: flex;justify-content:space-evenly; width: 100vw;">
|
||||
<!-- <button name="" id="group_drop" >Помехи на стене</button> -->
|
||||
<button name="" id="group_drop" class="menu_btn" onclick="group_drop();open_menu();" style="width: 15vw;padding: 2px;">Оборудование</button>
|
||||
<button name="" id="group_drop" class="menu_btn" onclick="group_drop();open_menu();" style="width: 15vw;padding: 2px;">помехи</button>
|
||||
<ul id="group" class="cmenu"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="czones" style="height: 500px;"></div>
|
||||
|
||||
|
||||
@ -182,9 +205,9 @@
|
||||
|
||||
function group_drop(){
|
||||
let e = document.getElementById("group_drop")
|
||||
// document.getElementById("group").style = `top:${e.getBoundingClientRect().top+40}px;left:${e.getBoundingClientRect().left - 5}px`;
|
||||
setTimeout(()=>{
|
||||
document.getElementById("group").style.display = "block";
|
||||
// document.getElementById("group").style.left = document.getElementById("group_drop").getBoundingClientRect().left;
|
||||
let childs = document.getElementById("group").getElementsByTagName("input");
|
||||
let i = 0;
|
||||
Object.entries(childs).forEach(([key,value]) => {
|
||||
@ -201,6 +224,28 @@
|
||||
});
|
||||
},1)
|
||||
}
|
||||
|
||||
function cost_drop(id){
|
||||
// let e = document.getElementById("cost")
|
||||
// setTimeout(()=>{
|
||||
// document.getElementById("group").style.display = "block";
|
||||
// // document.getElementById("group").style.left = document.getElementById("group_drop").getBoundingClientRect().left;
|
||||
// let childs = document.getElementById("group").getElementsByTagName("input");
|
||||
// let i = 0;
|
||||
// Object.entries(childs).forEach(([key,value]) => {
|
||||
// console.log(key,value);
|
||||
// if(value.checked == true){
|
||||
// get_objs(value)
|
||||
// i++;
|
||||
// }
|
||||
// if (i==0){
|
||||
// document.getElementsByClassName("czones")[0].innerHTML = "";
|
||||
// drag_start()
|
||||
// // e.removeChild(e.getElementsByClassName(value))
|
||||
// }
|
||||
// });
|
||||
// },1)
|
||||
}
|
||||
|
||||
function wall_color_change(){
|
||||
let wall = document.getElementById("wall")
|
||||
|
@ -14,6 +14,13 @@
|
||||
Object.entries(menus).forEach(([key,menu]) => {
|
||||
menu.style.display = "none";
|
||||
});
|
||||
let menu_screen = document.getElementById("top_div");
|
||||
menu_screen.style.display = "none";
|
||||
}
|
||||
function open_menu(){
|
||||
let menu_screen = document.getElementById("top_div");
|
||||
menu_screen.style.display = "block";
|
||||
menu_screen.style.height = `${document.getElementsByTagName("body")[0].scrollHeight}px`;
|
||||
}
|
||||
hide_menus();
|
||||
$('form').on('submit', function(event) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
:root{
|
||||
--login-inp-w:30vw;
|
||||
--login-inp-h: 7.8vh;
|
||||
--main-font-size: 1.5vw;
|
||||
--main-font-size: 1.3vw;
|
||||
}
|
||||
.main{
|
||||
width: 90vw;
|
||||
|
Reference in New Issue
Block a user