新建标签相关
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
let pageNum = null;
|
let pageNum = null;
|
||||||
let pageAll = null;
|
let pageAll = null;
|
||||||
let pageUrl = '/';
|
let pageUrl = '/';
|
||||||
@@ -108,22 +106,28 @@ $("#commitnewtags").click(function(){
|
|||||||
var header = $("meta[name='_csrf_header']").attr("content");
|
var header = $("meta[name='_csrf_header']").attr("content");
|
||||||
var token = $("meta[name='_csrf']").attr("content");
|
var token = $("meta[name='_csrf']").attr("content");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var name = $("#tagsname").val();
|
var name = $("#tagsname").val();
|
||||||
|
|
||||||
var tagColor = $("#tagColor").val();
|
var tagColor = $("#tagColor").val();
|
||||||
var tagIcon = $("#tagIcon").val();
|
var tagIcon = $("#tagIcon").val();
|
||||||
var parentTag = $("#parentTag").val();
|
var parentTag = $("#parentTag").val();
|
||||||
|
|
||||||
|
let coloricon = tagColor + ',' + tagIcon
|
||||||
|
var tagdescription = $("#tagdescription").val();
|
||||||
|
|
||||||
console.log(tagColor);
|
console.log(tagColor);
|
||||||
console.log(tagIcon);
|
console.log(tagIcon);
|
||||||
console.log(parentTag);
|
console.log(parentTag);
|
||||||
|
console.log(tagdescription);
|
||||||
console.log(name);
|
console.log(name);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "/newtags",
|
url: "/newtags",
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
name: name,
|
name: name,
|
||||||
|
color: coloricon,
|
||||||
|
description: tagdescription,
|
||||||
|
parentId: parentTag
|
||||||
}),
|
}),
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
beforeSend: function (xhr) {
|
beforeSend: function (xhr) {
|
||||||
|
|||||||
@@ -72,6 +72,11 @@
|
|||||||
<label>标签名</label>
|
<label>标签名</label>
|
||||||
<input type="text" placeholder="标签名" id="tagsname">
|
<input type="text" placeholder="标签名" id="tagsname">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="two fields">
|
||||||
|
<div class="field" id="createNewtagsDiv" style="display:none">
|
||||||
|
<label>描述</label>
|
||||||
|
<input type="text" placeholder="描述" id="tagdescription">
|
||||||
|
</div>
|
||||||
<div class="field" id="createNewtagsDiv" style="display:none">
|
<div class="field" id="createNewtagsDiv" style="display:none">
|
||||||
<label>父标签</label>
|
<label>父标签</label>
|
||||||
<select class="ui fluid dropdown" id="parentTag">
|
<select class="ui fluid dropdown" id="parentTag">
|
||||||
@@ -80,6 +85,7 @@
|
|||||||
</#list>
|
</#list>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="two fields">
|
<div class="two fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>选择颜色</label>
|
<label>选择颜色</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user