diff --git a/db.js b/db.js index b733043..8464580 100644 --- a/db.js +++ b/db.js @@ -1,6 +1,6 @@ const mysql = require('mysql'); const vars = require('./vars'); -const db_host = "localhost"; +const db_host = "db"; const admin = mysql.createConnection({ host: db_host, diff --git a/views/admin/objects/object_creation.ejs b/views/admin/objects/object_creation.ejs index 57198d8..6fa8d11 100644 --- a/views/admin/objects/object_creation.ejs +++ b/views/admin/objects/object_creation.ejs @@ -236,7 +236,9 @@ } else if(res["out"] == "good"){ msg("товар добавлен"); - edit_get_objs(); + setTimeout(()=>{ + edit_get_objs(); + },500) } }); } diff --git a/views/project.ejs b/views/project.ejs index e2427f8..6f91742 100644 --- a/views/project.ejs +++ b/views/project.ejs @@ -341,7 +341,7 @@ spawn.src = ""; }) if(cost == true){ - width += 252; + width += document.getElementById("proj_cost").getBoundingClientRect().width; document.getElementById("drags").append(document.getElementById("cost_div")); document.getElementById("cost_div").style.marginLeft = `${parseInt(document.getElementById("wall").style.width) + 4}px`; document.getElementById("cost_list").style.display = "block";