Преглед изворни кода

아직 만들다만 여러 문서 이동 기능

잉여개발기 (SPDV) пре 2 година
родитељ
комит
3f092f4edc

+ 1 - 0
app.py

@@ -557,6 +557,7 @@ app.route('/delete_multiple', methods = ['POST', 'GET'])(edit_delete_multiple)
 app.route('/revert/<int:num>/<everything:name>', methods = ['POST', 'GET'])(edit_revert)
 
 app.route('/move/<everything:name>', methods = ['POST', 'GET'])(edit_move)
+app.route('/move_all')(edit_move_all)
 
 # Func-topic
 app.route('/topic/<everything:name>', methods = ['POST', 'GET'])(topic_list)

+ 2 - 0
route/__init__.py

@@ -177,6 +177,8 @@ from route.n_setting_404_page import setting_404_page
 
 from route.n_bbs_main import bbs_main
 
+from route.n_edit_move_all import edit_move_all
+
 from route.go_api_func_llm import api_func_llm
 from route.go_api_func_language import api_func_language
 from route.go_api_func_sha224 import api_func_sha224

+ 1 - 1
route/edit_move.py

@@ -262,5 +262,5 @@ def edit_move(name):
                         <button type="submit">''' + get_lang(conn, 'move') + '''</button>
                     </form>
                 ''',
-                menu = [['w/' + url_pas(name), get_lang(conn, 'return')]]
+                menu = [['w/' + url_pas(name), get_lang(conn, 'return')], ['move_all', get_lang(conn, 'multiple_move')]]
             ))

+ 13 - 0
route/n_edit_move_all.py

@@ -0,0 +1,13 @@
+from .tool.func import *
+
+def edit_move_all():
+    with get_db_connect() as conn:
+        return easy_minify(conn, flask.render_template(skin_check(conn),
+            imp = [get_lang(conn, 'multiple_move'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            data = '' + \
+                '<div id="opennamu_edit_move_all"></div>' + \
+                '<script defer src="/views/main_css/js/route/edit_move_all.js' + cache_v() + '"></script>' + \
+                '<script>window.addEventListener("DOMContentLoaded", function() { opennamu_edit_move_all(); });</script>' + \
+            '',
+            menu = [['other', get_lang(conn, 'return')]]
+        ))

+ 25 - 0
route_go/route/api_edit_move_all.go

@@ -0,0 +1,25 @@
+package route
+
+import (
+	"encoding/json"
+	"opennamu/route/tool"
+)
+
+func Api_edit_move_all(call_arg []string) string {
+	db_set := map[string]string{}
+	json.Unmarshal([]byte(call_arg[0]), &db_set)
+
+	other_set := map[string]string{}
+	json.Unmarshal([]byte(call_arg[1]), &other_set)
+
+	db := tool.DB_connect(db_set)
+	defer db.Close()
+
+	if other_set["select"] == "include" {
+
+	} else if other_set["select"] == "start" {
+
+	} else {
+
+	}
+}

+ 5 - 0
route_go/route/tool/document.go

@@ -0,0 +1,5 @@
+package tool
+
+func Add_history() {
+
+}

+ 27 - 0
views/main_css/js/route/edit_move_all.js

@@ -0,0 +1,27 @@
+function opennamu_edit_move_all() {
+    let lang_data = new FormData();
+    lang_data.append('data', 'title_start_document title_end_document title_include_document move document_name');
+
+    fetch('/api/lang', {
+        method : 'post',
+        body : lang_data,
+    }).then(function(res) {
+        return res.json();
+    }).then(function(lang) {
+        lang = lang["data"];
+    
+        document.getElementById('opennamu_edit_move_all').innerHTML = '' +
+            '<input placeholder="' + lang[4] + '"></input>' +
+            '<hr class="main_hr"> ' +
+            '<input placeholder="' + lang[4] + '"></input>' +
+            '<hr class="main_hr">' +
+            '<select>' +
+                '<option>' + lang[0] + '</option>' +
+                '<option>' + lang[1] + '</option>' +
+                '<option>' + lang[2] + '</option>' +
+            '</select>' +
+            '<hr class="main_hr">' +
+            '<button>' + lang[3] + '</button>' +
+        '';
+    });
+}