From 9d655df205ce983378fd5ac6f14b3b3d189034a5 Mon Sep 17 00:00:00 2001 From: abhishekparmar1200 Date: Sun, 11 Apr 2021 03:02:27 +0530 Subject: [PATCH] 1. fixed the project settings button #issue23. 2. added delete project functionality in the project settings page --- src/modules/index.js | 4 ++-- src/modules/project/project.js | 4 ++-- src/modules/user/user.js | 22 +++++++++++++++------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/modules/index.js b/src/modules/index.js index d302280..757e73c 100644 --- a/src/modules/index.js +++ b/src/modules/index.js @@ -61,7 +61,7 @@ function userProjectButtons(){ projectBackButton(); }); }); - + $(".opencodeeditor").click((value) => { userjs.setProject(value); userjs.startTensorboard(globaljs.projectDetails.name); @@ -72,7 +72,7 @@ function userProjectButtons(){ codeeditorSaveButton(); }); }); - + $(".opennodeeditor").click((value) => { userjs.setProject(value); loadPage("nodeeditor/nodeeditor.html", ()=>{ diff --git a/src/modules/project/project.js b/src/modules/project/project.js index 84c7d8e..917ee5d 100644 --- a/src/modules/project/project.js +++ b/src/modules/project/project.js @@ -2,7 +2,7 @@ function init(){ $("#project-name").val(globaljs.projectDetails.name); $("#project-description").val(globaljs.projectDetails.details); - + $(".updatebuttons").click((value) => { // swal({ // text: "Project Name", @@ -63,4 +63,4 @@ function init(){ module.exports = { init: init -} \ No newline at end of file +} diff --git a/src/modules/user/user.js b/src/modules/user/user.js index 0650a70..97850df 100644 --- a/src/modules/user/user.js +++ b/src/modules/user/user.js @@ -16,7 +16,7 @@ function init(){ if (!fs.existsSync(projects_path)) { fs.mkdirSync(projects_path); } - + if (!fs.existsSync(projects_path + dir)) { swal({ text: "Project Details", @@ -80,7 +80,7 @@ def train(): X, Y = getTrainingData() model.fit(x = X,y = Y,batch_size = None,epochs = 10,verbose = 0,callbacks = [tensorboard],validation_split = 0,validation_data = None,shuffle = True) -train() +train() ` fs.writeFileSync(path.join(projects_path, dir, "graph.json"), JSON.stringify(initgraph)); fs.writeFileSync(path.join(projects_path, dir, "editor.py"), initeditor); @@ -136,7 +136,7 @@ function killTensorboard(){ } function setProject(value) { - let pdosi = $(value.target).parent().parent().parent()[0].children; + let pdosi = $(value.target).parent().parent().parent().parent()[0].children; globaljs.projectDetails.name = pdosi[0].innerText; globaljs.projectDetails.details = pdosi[1].innerText; } @@ -165,11 +165,19 @@ function loadProjects() { - - + + + @@ -197,4 +205,4 @@ module.exports = { // globaljs.functionsText = ""; // globaljs.isLoaded.nodeeditor = false; // globaljs.graph = undefined; -// }); \ No newline at end of file +// });