瀏覽代碼

添加标签库

unknown 6 年之前
父節點
當前提交
36b47eda1c

+ 0 - 110
src/jy/admin/rule.go

@@ -3,33 +3,18 @@ package admin
 
 import (
 	. "jy/mongodbutil"
-	"regexp"
-	"strings"
 	"time"
 
 	"github.com/gin-gonic/gin"
 )
 
-var Date_Short_Layout = "2006-01-02"
-
 func init() {
-	//rulepre
 	Admin.GET("/rulepre", func(c *gin.Context) {
 		version := c.Query("version")
 		c.HTML(200, "rule_prelist.html", gin.H{"version": version})
 	})
 	Admin.POST("/rulepre/data", RulePreData)
 	Admin.POST("/rulepre/save", RulePreSave)
-
-	//ruletag
-	Admin.GET("/ruletag", func(c *gin.Context) {
-		version := c.Query("version")
-		c.HTML(200, "rule_taglist.html", gin.H{"version": version})
-	})
-	Admin.POST("/ruletag/data", RuleTagData)
-	Admin.POST("/ruletag/save", RuleTagSave)
-	Admin.POST("/ruletag/del", RuleTagDel)
-	Admin.POST("/ruletag/editsave", RuleTagEditSave)
 }
 
 //前置规则列表
@@ -60,98 +45,3 @@ func RulePreSave(c *gin.Context) {
 		c.JSON(200, gin.H{"rep": false})
 	}
 }
-
-//标签库列表
-func RuleTagData(c *gin.Context) {
-	version, _ := c.GetPostForm("version")
-	data, _ := Mgo.Find("rule_tag", `{"version":"`+version+`"}`, `{"_id":-1}`, nil, false, -1, -1)
-	for _, d := range *data {
-		timeStr := time.Unix(d["intime"].(int64), 0).Format(Date_Short_Layout)
-		d["intime"] = timeStr
-	}
-	c.JSON(200, gin.H{"data": data})
-}
-
-//添加标签
-func RuleTagSave(c *gin.Context) {
-	name, _ := c.GetPostForm("name")
-	version, _ := c.GetPostForm("version")
-	contentStr, _ := c.GetPostForm("content")
-	username, _ := c.GetPostForm("username")
-	tp, _ := c.GetPostForm("tp")
-	content := strings.Split(contentStr, ",")
-	data, _ := Mgo.FindOne("rule_tag", `{"name":"`+name+`"}`)
-	if len(*data) > 0 { //判重,防止添加name相同的标签
-		c.JSON(200, gin.H{"rep": false})
-		return
-	}
-	if tp == "正则" { //验证是否是正则
-		for _, ct := range content {
-			_, err := regexp.Compile(ct)
-			if err != nil {
-				c.JSON(200, gin.H{"rep": false})
-				return
-			}
-		}
-	}
-	save := map[string]interface{}{
-		"name":    name,
-		"version": version,
-		"content": content,
-		"creater": username,
-		"intime":  time.Now().Unix(),
-		"type":    tp,
-	}
-	b := Mgo.Save("rule_tag", save)
-	if b != "" {
-		c.JSON(200, gin.H{"rep": true})
-	} else {
-		c.JSON(200, gin.H{"rep": false})
-	}
-}
-
-//删除标签
-func RuleTagDel(c *gin.Context) {
-	_id, _ := c.GetPostForm("_id")
-	b := Mgo.Del("rule_tag", `{"_id":"`+_id+`"}`)
-	if b {
-		c.JSON(200, gin.H{"rep": true})
-	} else {
-		c.JSON(200, gin.H{"rep": false})
-	}
-}
-
-//编辑保存
-func RuleTagEditSave(c *gin.Context) {
-	_id, _ := c.GetPostForm("_id")
-	contentStr, _ := c.GetPostForm("content")
-	content := strings.Split(contentStr, ",")
-	data, _ := Mgo.FindOne("rule_tag", `{"_id":"`+_id+`"}`)
-	if (*data)["type"] == "正则" { //验证是否是正则
-		for _, ct := range content {
-			_, err := regexp.Compile(ct)
-			if err != nil {
-				c.JSON(200, gin.H{"rep": false})
-				return
-			}
-		}
-	}
-	if len(*data) > 0 {
-		set := map[string]interface{}{
-			"name":    (*data)["name"],
-			"version": (*data)["version"],
-			"creater": (*data)["creater"],
-			"intime":  (*data)["intime"],
-			"type":    (*data)["type"],
-			"content": content,
-		}
-		b := Mgo.Update("rule_tag", `{"_id":"`+_id+`"}`, set, false, false)
-		if b {
-			c.JSON(200, gin.H{"rep": true})
-		} else {
-			c.JSON(200, gin.H{"rep": false})
-		}
-	} else {
-		c.JSON(200, gin.H{"rep": false})
-	}
-}

+ 186 - 0
src/jy/admin/tag.go

@@ -0,0 +1,186 @@
+// rule
+package admin
+
+import (
+	"encoding/json"
+	. "jy/mongodbutil"
+	"time"
+
+	"github.com/gin-gonic/gin"
+)
+
+var Date_Short_Layout = "2006-01-02"
+
+func init() {
+	//tag
+	Admin.GET("/tag", func(c *gin.Context) {
+		version := c.Query("version")
+		c.HTML(200, "taglist.html", gin.H{"version": version})
+	})
+	Admin.POST("/tag/data", TagData)
+	Admin.POST("/tag/save", TagSave)
+	Admin.POST("/tag/del", TagDel)
+
+	//onetag
+	Admin.GET("/onetag", func(c *gin.Context) {
+		version := c.Query("version")
+		tagname := c.Query("tagname")
+		tp := c.Query("tp")
+		c.HTML(200, "onetag.html", gin.H{"version": version, "tagname": tagname, "tp": tp})
+	})
+	Admin.POST("/onetag/data", OneTagData)
+	Admin.POST("/onetag/save", OneTagSave)
+	Admin.POST("/onetag/del", OneTagDel)
+	Admin.POST("/onetag/edit", OneTagEdit)
+
+	//jsoneditor.html
+	Admin.GET("/onetag/jsonhtml", func(c *gin.Context) {
+		_id := c.Query("_id")
+		data := make(map[string]interface{})
+		if _id != "" {
+			data, _ := Mgo.FindOne("tagdetailinfo", `{"_id":"`+_id+`"}`)
+			c.HTML(200, "jsoneditor.html", gin.H{"data": data})
+		} else {
+			c.HTML(200, "jsoneditor.html", gin.H{"data": data})
+		}
+
+	})
+}
+
+//标签库列表
+func TagData(c *gin.Context) {
+	version, _ := c.GetPostForm("version")
+	data, _ := Mgo.Find("tag", `{"version":"`+version+`"}`, `{"_id":-1}`, nil, false, -1, -1)
+	for _, d := range *data {
+		timeStr := time.Unix(d["intime"].(int64), 0).Format(Date_Short_Layout)
+		d["intime"] = timeStr
+	}
+	c.JSON(200, gin.H{"data": data})
+}
+
+//添加标签
+func TagSave(c *gin.Context) {
+	tagname, _ := c.GetPostForm("tagname")
+	version, _ := c.GetPostForm("version")
+	username, _ := c.GetPostForm("username")
+	tp, _ := c.GetPostForm("tp")
+	data, _ := Mgo.FindOne("tag", `{"tagname":"`+tagname+`"}`)
+	if len(*data) > 0 { //判重,防止添加name相同的标签
+		c.JSON(200, gin.H{"rep": false})
+		return
+	}
+	save := map[string]interface{}{
+		"tagname": tagname,
+		"version": version,
+		"creater": username,
+		"type":    tp,
+		"intime":  time.Now().Unix(),
+	}
+	b := Mgo.Save("tag", save)
+	if b != "" {
+		c.JSON(200, gin.H{"rep": true})
+	} else {
+		c.JSON(200, gin.H{"rep": false})
+	}
+}
+
+//删除标签
+func TagDel(c *gin.Context) {
+	_id, _ := c.GetPostForm("_id")
+	b := Mgo.Del("tag", `{"_id":"`+_id+`"}`)
+	if b {
+		c.JSON(200, gin.H{"rep": true})
+	} else {
+		c.JSON(200, gin.H{"rep": false})
+	}
+}
+
+//查找某个tag的信息
+func OneTagData(c *gin.Context) {
+	version, _ := c.GetPostForm("version")
+	tagname, _ := c.GetPostForm("tagname")
+	data, _ := Mgo.Find("tagdetailinfo", `{"version":"`+version+`","pratagname":"`+tagname+`"}`, `{"_id":-1}`, nil, false, -1, -1)
+	for _, d := range *data {
+		timeStr := time.Unix(d["intime"].(int64), 0).Format(Date_Short_Layout)
+		d["intime"] = timeStr
+	}
+	c.JSON(200, gin.H{"data": data})
+}
+
+//添加详细标签
+func OneTagSave(c *gin.Context) {
+	name, _ := c.GetPostForm("name") //name or select
+	pratagname, _ := c.GetPostForm("pratagname")
+	data, _ := Mgo.FindOne("tagdetailinfo", `{"name":"`+name+`","pratagname":"`+pratagname+`"}`)
+	if len(*data) > 0 { //判重
+		c.JSON(200, gin.H{"rep": false})
+		return
+	}
+	version, _ := c.GetPostForm("version")
+	tp, _ := c.GetPostForm("tp")
+	contentStr, _ := c.GetPostForm("content")
+	username, _ := c.GetPostForm("username")
+	var jsondata interface{}
+	err := json.Unmarshal([]byte(contentStr), &jsondata)
+	if err != nil { //不是json格式
+		c.JSON(200, gin.H{"rep": false})
+		return
+	}
+	save := make(map[string]interface{})
+	save = map[string]interface{}{
+		"pratagname": pratagname,
+		"name":       name,
+		"version":    version,
+		"creater":    username,
+		"type":       tp,
+		"intime":     time.Now().Unix(),
+		"content":    jsondata,
+	}
+	b := Mgo.Save("tagdetailinfo", save)
+	if b != "" {
+		c.JSON(200, gin.H{"rep": true})
+	} else {
+		c.JSON(200, gin.H{"rep": false})
+	}
+}
+
+//删除某个详细标签
+func OneTagDel(c *gin.Context) {
+	_id, _ := c.GetPostForm("_id")
+	b := Mgo.Del("tagdetailinfo", `{"_id":"`+_id+`"}`)
+	if b {
+		c.JSON(200, gin.H{"rep": true})
+	} else {
+		c.JSON(200, gin.H{"rep": false})
+	}
+}
+
+//修改某个详细标签
+func OneTagEdit(c *gin.Context) {
+	_id, _ := c.GetPostForm("_id")
+	content, _ := c.GetPostForm("content")
+	tp, _ := c.GetPostForm("tp")
+	var jsondata interface{}
+	var err error
+	if tp == "地区" {
+		err = json.Unmarshal([]byte(content), &jsondata)
+	} else {
+		err = json.Unmarshal([]byte(content), &jsondata)
+	}
+	if err != nil { //不是json格式
+		c.JSON(200, gin.H{"rep": false})
+		return
+	}
+	set := make(map[string]interface{})
+	set["content"] = jsondata
+	if jsondata != nil {
+		b := Mgo.Update("tagdetailinfo", `{"_id":"`+_id+`"}`, map[string]interface{}{"$set": set}, false, false)
+		if b {
+			c.JSON(200, gin.H{"rep": true})
+		} else {
+			c.JSON(200, gin.H{"rep": false})
+		}
+	} else {
+		c.JSON(200, gin.H{"rep": false})
+	}
+}

+ 75 - 0
src/web/res/js/jsonformat.js

@@ -0,0 +1,75 @@
+  	function getFormatData(json) {
+        var json = json+"";
+        if(json.indexOf('{')==-1 && json.indexOf('[')==-1) {
+            return json;
+        }else{
+            return(formatJson(json));
+        }
+    }
+	function repeat(s, count) {
+       return new Array(count + 1).join(s)
+   	}
+
+    function formatJson(json) {
+        var i = 0,
+            il = 0,
+            tab = "    ",
+            newJson = "",
+            indentLevel = 0,
+            inString = false,
+            currentChar = null;
+        for(i = 0, il = json.length; i < il; i += 1) {
+            currentChar = json.charAt(i);
+            switch(currentChar) {
+                case '{':
+                case '[':
+                    if(!inString) {
+                        newJson += currentChar + "\n" + repeat(tab, indentLevel + 1);
+                        indentLevel += 1
+                    } else {
+                        newJson += currentChar
+                    }
+                    break;
+                case '}':
+                case ']':
+                    if(!inString) {
+                        indentLevel -= 1;
+                        newJson += "\n" + repeat(tab, indentLevel) + currentChar
+                    } else {
+                        newJson += currentChar
+                    }
+                    break;
+                case ',':
+                    if(!inString) {
+                        newJson += ",\n" + repeat(tab, indentLevel)
+                    } else {
+                        newJson += currentChar
+                    }
+                    break;
+                case ':':
+                    if(!inString) {
+                        newJson += ": "
+                    } else {
+                        newJson += currentChar
+                    }
+                    break;
+                case ' ':
+                case "\n":
+                case "\t":
+                    if(inString) {
+                        newJson += currentChar
+                    }
+                    break;
+                case '"':
+                    if(i > 0 && json.charAt(i - 1) !== '\\') {
+                        inString = !inString
+                    }
+                    newJson += currentChar;
+                    break;
+                default:
+                    newJson += currentChar;
+                    break
+            }
+        }
+        return newJson
+    }

+ 1928 - 0
src/web/res/jsoneditor/css/jsoneditor.css

@@ -0,0 +1,1928 @@
+/* reset styling (prevent conflicts with bootstrap, materialize.css, etc.) */
+
+div.jsoneditor .jsoneditor-search input {
+  height: auto;
+  border: inherit;
+}
+
+div.jsoneditor .jsoneditor-search input:focus {
+  border: none !important;
+  box-shadow: none !important;
+}
+
+div.jsoneditor table {
+  border-collapse: collapse;
+  width: auto;
+}
+
+div.jsoneditor td,
+div.jsoneditor th {
+  padding: 0;
+  display: table-cell;
+  text-align: left;
+  vertical-align: inherit;
+  border-radius: inherit;
+}
+
+
+div.jsoneditor-field,
+div.jsoneditor-value,
+div.jsoneditor-readonly {
+  border: 1px solid transparent;
+  min-height: 16px;
+  min-width: 32px;
+  padding: 2px;
+  margin: 1px;
+  word-wrap: break-word;
+  float: left;
+}
+
+/* adjust margin of p elements inside editable divs, needed for Opera, IE */
+
+div.jsoneditor-field p,
+div.jsoneditor-value p {
+  margin: 0;
+}
+
+div.jsoneditor-value {
+  word-break: break-word;
+}
+
+div.jsoneditor-readonly {
+  min-width: 16px;
+  color: #808080;
+}
+
+div.jsoneditor-empty {
+  border-color: #d3d3d3;
+  border-style: dashed;
+  border-radius: 2px;
+}
+
+div.jsoneditor-field.jsoneditor-empty::after,
+div.jsoneditor-value.jsoneditor-empty::after {
+  pointer-events: none;
+  color: #d3d3d3;
+  font-size: 8pt;
+}
+
+div.jsoneditor-field.jsoneditor-empty::after {
+  content: "field";
+}
+
+div.jsoneditor-value.jsoneditor-empty::after {
+  content: "value";
+}
+
+div.jsoneditor-value.jsoneditor-url,
+a.jsoneditor-value.jsoneditor-url {
+  color: green;
+  text-decoration: underline;
+}
+
+a.jsoneditor-value.jsoneditor-url {
+  display: inline-block;
+  padding: 2px;
+  margin: 2px;
+}
+
+a.jsoneditor-value.jsoneditor-url:hover,
+a.jsoneditor-value.jsoneditor-url:focus {
+  color: #ee422e;
+}
+
+div.jsoneditor td.jsoneditor-separator {
+  padding: 3px 0;
+  vertical-align: top;
+  color: #808080;
+}
+
+div.jsoneditor-field[contenteditable=true]:focus,
+div.jsoneditor-field[contenteditable=true]:hover,
+div.jsoneditor-value[contenteditable=true]:focus,
+div.jsoneditor-value[contenteditable=true]:hover,
+div.jsoneditor-field.jsoneditor-highlight,
+div.jsoneditor-value.jsoneditor-highlight {
+  background-color: #FFFFAB;
+  border: 1px solid yellow;
+  border-radius: 2px;
+}
+
+div.jsoneditor-field.jsoneditor-highlight-active,
+div.jsoneditor-field.jsoneditor-highlight-active:focus,
+div.jsoneditor-field.jsoneditor-highlight-active:hover,
+div.jsoneditor-value.jsoneditor-highlight-active,
+div.jsoneditor-value.jsoneditor-highlight-active:focus,
+div.jsoneditor-value.jsoneditor-highlight-active:hover {
+  background-color: #ffee00;
+  border: 1px solid #ffc700;
+  border-radius: 2px;
+}
+
+div.jsoneditor-value.jsoneditor-string {
+  color: #008000;
+}
+
+div.jsoneditor-value.jsoneditor-object,
+div.jsoneditor-value.jsoneditor-array {
+  min-width: 16px;
+  color: #808080;
+}
+
+div.jsoneditor-value.jsoneditor-number {
+  color: #ee422e;
+}
+
+div.jsoneditor-value.jsoneditor-boolean {
+  color: #ff8c00;
+}
+
+div.jsoneditor-value.jsoneditor-null {
+  color: #004ED0;
+}
+
+div.jsoneditor-value.jsoneditor-invalid {
+  color: #000000;
+}
+
+div.jsoneditor-tree button.jsoneditor-button {
+  width: 24px;
+  height: 24px;
+  padding: 0;
+  margin: 0;
+  border: none;
+  cursor: pointer;
+  background: transparent url("/res/jsoneditor/img/jsoneditor-icons.svg");
+}
+
+div.jsoneditor-mode-view tr.jsoneditor-expandable td.jsoneditor-tree,
+div.jsoneditor-mode-form tr.jsoneditor-expandable td.jsoneditor-tree {
+  cursor: pointer;
+}
+
+div.jsoneditor-tree button.jsoneditor-collapsed {
+  background-position: 0 -48px;
+}
+
+div.jsoneditor-tree button.jsoneditor-expanded {
+  background-position: 0 -72px;
+}
+
+div.jsoneditor-tree button.jsoneditor-contextmenu {
+  background-position: -48px -72px;
+}
+
+div.jsoneditor-tree button.jsoneditor-contextmenu:hover,
+div.jsoneditor-tree button.jsoneditor-contextmenu:focus,
+div.jsoneditor-tree button.jsoneditor-contextmenu.jsoneditor-selected,
+tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu {
+  background-position: -48px -48px;
+}
+
+div.jsoneditor-tree *:focus {
+  outline: none;
+}
+
+div.jsoneditor-tree button.jsoneditor-button:focus {
+  /* TODO: nice outline for buttons with focus
+  outline: #97B0F8 solid 2px;
+  box-shadow: 0 0 8px #97B0F8;
+  */
+  background-color: #f5f5f5;
+  outline: #e5e5e5 solid 1px;
+}
+
+div.jsoneditor-tree button.jsoneditor-invisible {
+  visibility: hidden;
+  background: none;
+}
+
+div.jsoneditor-tree div.jsoneditor-show-more {
+  display: inline-block;
+  padding: 3px 4px;
+  margin: 2px 0;
+  background-color: #e5e5e5;
+  border-radius: 3px;
+  color: #808080;
+  font-family: arial, sans-serif;
+  font-size: 10pt;
+}
+
+div.jsoneditor-tree div.jsoneditor-show-more a {
+  display: inline-block;
+  color: #808080;
+}
+
+div.jsoneditor-tree div.jsoneditor-show-more a:hover,
+div.jsoneditor-tree div.jsoneditor-show-more a:focus {
+  color: #ee422e;
+}
+
+div.jsoneditor-tree div.jsoneditor-color {
+  display: inline-block;
+  width: 12px;
+  height: 12px;
+  margin: 4px;
+  border: 1px solid #808080;
+  cursor: pointer;
+}
+
+div.jsoneditor div.jsoneditor-anchor .picker_wrapper.popup.popup_bottom {
+  top: 28px;
+  left: -10px;
+}
+
+div.jsoneditor-tree div.jsoneditor-date {
+  background: #a1a1a1;
+  color: white;
+  font-family: arial, sans-serif;
+  border-radius: 3px;
+  display: inline-block;
+  padding: 3px;
+  margin: 0 3px;
+}
+
+div.jsoneditor {
+  color: #1A1A1A;
+  border: 1px solid #a8afbb;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  width: 100%;
+  height: 100%;
+  position: relative;
+  padding: 0;
+  line-height: 100%;
+}
+
+div.jsoneditor-tree table.jsoneditor-tree {
+  border-collapse: collapse;
+  border-spacing: 0;
+  width: 100%;
+}
+
+div.jsoneditor-tree div.jsoneditor-tree-inner {
+  padding-bottom: 300px;
+}
+
+div.jsoneditor-outer {
+  position: static;
+  width: 100%;
+  height: 100%;
+  margin: -35px 0 0 0;
+  padding: 35px 0 0 0;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+div.jsoneditor-outer.has-nav-bar {
+  margin: -61px 0 0 0;
+  padding: 61px 0 0 0;
+}
+
+div.jsoneditor-outer.has-status-bar {
+  margin: -35px 0 -26px 0;
+  padding: 35px 0 26px 0;
+}
+
+textarea.jsoneditor-text,
+.ace-jsoneditor {
+  min-height: 150px;
+}
+
+div.jsoneditor-tree {
+  width: 100%;
+  height: 100%;
+  position: relative;
+  overflow: auto;
+}
+
+textarea.jsoneditor-text {
+  width: 100%;
+  height: 100%;
+  margin: 0;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  outline-width: 0;
+  border: none;
+  background-color: white;
+  resize: none;
+}
+
+tr.jsoneditor-highlight,
+tr.jsoneditor-selected {
+  background-color: #d3d3d3;
+}
+
+tr.jsoneditor-selected button.jsoneditor-dragarea,
+tr.jsoneditor-selected button.jsoneditor-contextmenu {
+  visibility: hidden;
+}
+
+tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea,
+tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu {
+  visibility: visible;
+}
+
+div.jsoneditor-tree button.jsoneditor-dragarea {
+  background: url("/res/jsoneditor/img/jsoneditor-icons.svg") -72px -72px;
+  cursor: move;
+}
+
+div.jsoneditor-tree button.jsoneditor-dragarea:hover,
+div.jsoneditor-tree button.jsoneditor-dragarea:focus,
+tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea {
+  background-position: -72px -48px;
+}
+
+div.jsoneditor tr,
+div.jsoneditor th,
+div.jsoneditor td {
+  padding: 0;
+  margin: 0;
+}
+
+div.jsoneditor td {
+  vertical-align: top;
+}
+
+div.jsoneditor td.jsoneditor-tree {
+  vertical-align: top;
+}
+
+div.jsoneditor-field,
+div.jsoneditor-value,
+div.jsoneditor td,
+div.jsoneditor th,
+div.jsoneditor textarea,
+.jsoneditor-schema-error {
+  font-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif;
+  font-size: 10pt;
+  color: #1A1A1A;
+}
+
+/* popover */
+
+.jsoneditor-schema-error {
+  cursor: default;
+  display: inline-block;
+  /*font-family: arial, sans-serif;*/
+  height: 24px;
+  line-height: 24px;
+  position: relative;
+  text-align: center;
+  width: 24px;
+}
+
+div.jsoneditor-tree .jsoneditor-button.jsoneditor-schema-error {
+  width: 24px;
+  height: 24px;
+  padding: 0;
+  margin: 0 4px 0 0;
+  background: url("/res/jsoneditor/img/jsoneditor-icons.svg")  -168px -48px;
+}
+
+.jsoneditor-text-errors tr.jump-to-line:hover {
+  text-decoration: underline;
+  cursor: pointer;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover {
+  background-color: #4c4c4c;
+  border-radius: 3px;
+  box-shadow: 0 0 5px rgba(0,0,0,0.4);
+  color: #fff;
+  display: none;
+  padding: 7px 10px;
+  position: absolute;
+  width: 200px;
+  z-index: 4;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-above {
+  bottom: 32px;
+  left: -98px;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-below {
+  top: 32px;
+  left: -98px;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-left {
+  top: -7px;
+  right: 32px;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-right {
+  top: -7px;
+  left: 32px;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover:before {
+  border-right: 7px solid transparent;
+  border-left: 7px solid transparent;
+  content: '';
+  display: block;
+  left: 50%;
+  margin-left: -7px;
+  position: absolute;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-above:before {
+  border-top: 7px solid #4c4c4c;
+  bottom: -7px;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-below:before {
+  border-bottom: 7px solid #4c4c4c;
+  top: -7px;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-left:before {
+  border-left: 7px solid #4c4c4c;
+  border-top: 7px solid transparent;
+  border-bottom: 7px solid transparent;
+  content: '';
+  top: 19px;
+  right: -14px;
+  left: inherit;
+  margin-left: inherit;
+  margin-top: -7px;
+  position: absolute;
+}
+
+.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-right:before {
+  border-right: 7px solid #4c4c4c;
+  border-top: 7px solid transparent;
+  border-bottom: 7px solid transparent;
+  content: '';
+  top: 19px;
+  left: -14px;
+  margin-left: inherit;
+  margin-top: -7px;
+  position: absolute;
+}
+
+.jsoneditor-schema-error:hover .jsoneditor-popover,
+.jsoneditor-schema-error:focus .jsoneditor-popover {
+  display: block;
+  -webkit-animation: fade-in .3s linear 1, move-up .3s linear 1;
+  -moz-animation: fade-in .3s linear 1, move-up .3s linear 1;
+  -ms-animation: fade-in .3s linear 1, move-up .3s linear 1;
+}
+
+@-webkit-keyframes fade-in {
+  from {
+    opacity: 0;
+  }
+
+  to {
+    opacity: 1;
+  }
+}
+
+@-moz-keyframes fade-in {
+  from {
+    opacity: 0;
+  }
+
+  to {
+    opacity: 1;
+  }
+}
+
+@-ms-keyframes fade-in {
+  from {
+    opacity: 0;
+  }
+
+  to {
+    opacity: 1;
+  }
+}
+
+/*@-webkit-keyframes move-up {*/
+
+/*from   { bottom: 24px; }*/
+
+/*to { bottom: 32px; }*/
+
+/*}*/
+
+/*@-moz-keyframes move-up {*/
+
+/*from   { bottom: 24px; }*/
+
+/*to { bottom: 32px; }*/
+
+/*}*/
+
+/*@-ms-keyframes move-up {*/
+
+/*from   { bottom: 24px; }*/
+
+/*to { bottom: 32px; }*/
+
+/*}*/
+
+/* JSON schema errors displayed at the bottom of the editor in mode text and code */
+
+.jsoneditor .jsoneditor-validation-errors-container {
+  max-height: 130px;
+  overflow-y: auto;
+}
+
+.jsoneditor .jsoneditor-additional-errors {
+  position: absolute;
+  margin: auto;
+  bottom: 31px;
+  left: calc(50% - 92px);
+  color: #808080;
+  background-color: #ebebeb;
+  padding: 7px 15px;
+  border-radius: 8px;
+}
+
+.jsoneditor .jsoneditor-additional-errors.visible {
+  visibility: visible;
+  opacity: 1;
+  transition: opacity 2s linear;
+}
+
+.jsoneditor .jsoneditor-additional-errors.hidden {
+  visibility: hidden;
+  opacity: 0;
+  transition: visibility 0s 2s, opacity 2s linear;
+}
+
+.jsoneditor .jsoneditor-text-errors {
+  width: 100%;
+  border-collapse: collapse;
+  border-top: 1px solid #ffd700;
+}
+
+.jsoneditor .jsoneditor-text-errors td {
+  padding: 3px 6px;
+  vertical-align: middle;
+}
+
+.jsoneditor .jsoneditor-text-errors tr {
+  background-color: #ffef8b;
+}
+
+.jsoneditor .jsoneditor-text-errors tr.parse-error {
+  background-color: #ee2e2e70;
+}
+
+.jsoneditor-text-errors .jsoneditor-schema-error {
+  border: none;
+  width: 24px;
+  height: 24px;
+  padding: 0;
+  margin: 0 4px 0 0;
+  cursor: pointer;
+}
+
+.jsoneditor-text-errors tr .jsoneditor-schema-error {
+  background: url("/res/jsoneditor/img/jsoneditor-icons.svg")  -168px -48px;
+}
+
+.jsoneditor-text-errors tr.parse-error .jsoneditor-schema-error {
+  background: url("/res/jsoneditor/img/jsoneditor-icons.svg")   -25px 0px;
+}
+
+.fadein {
+  -webkit-animation: fadein .3s;
+  animation: fadein .3s;
+  -moz-animation: fadein .3s;
+  -o-animation: fadein .3s;
+}
+
+@-webkit-keyframes fadein {
+  0% {
+    opacity: 0;
+  }
+
+  100% {
+    opacity: 1;
+  }
+}
+
+@-moz-keyframes fadein {
+  0% {
+    opacity: 0;
+  }
+
+  100% {
+    opacity: 1;
+  }
+}
+
+@keyframes fadein {
+  0% {
+    opacity: 0;
+  }
+
+  100% {
+    opacity: 1;
+  }
+}
+
+@-o-keyframes fadein {
+  0% {
+    opacity: 0;
+  }
+
+  100% {
+    opacity: 1;
+  }
+}
+/* ContextMenu - main menu */
+
+div.jsoneditor-contextmenu-root {
+  position: relative;
+  width: 0;
+  height: 0;
+}
+
+div.jsoneditor-contextmenu {
+  position: absolute;
+  box-sizing: content-box;
+  z-index: 99999;
+}
+
+div.jsoneditor-contextmenu ul,
+div.jsoneditor-contextmenu li {
+  box-sizing: content-box;
+  position: relative;
+}
+
+div.jsoneditor-contextmenu ul {
+  position: relative;
+  left: 0;
+  top: 0;
+  width: 128px;
+  background: white;
+  border: 1px solid #d3d3d3;
+  box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3);
+  list-style: none;
+  margin: 0;
+  padding: 0;
+}
+
+div.jsoneditor-contextmenu ul li button {
+  position: relative;
+  padding: 0 4px 0 0;
+  margin: 0;
+  width: 128px;
+  height: auto;
+  border: none;
+  cursor: pointer;
+  color: #4d4d4d;
+  background: transparent;
+  font-size: 10pt;
+  font-family: arial, sans-serif;
+  box-sizing: border-box;
+  text-align: left;
+}
+
+/* Fix button padding in firefox */
+
+div.jsoneditor-contextmenu ul li button::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+
+div.jsoneditor-contextmenu ul li button:hover,
+div.jsoneditor-contextmenu ul li button:focus {
+  color: #1a1a1a;
+  background-color: #f5f5f5;
+  outline: none;
+}
+
+div.jsoneditor-contextmenu ul li button.jsoneditor-default {
+  width: 96px;
+  /* 128px - 32px */
+}
+
+div.jsoneditor-contextmenu ul li button.jsoneditor-expand {
+  float: right;
+  width: 32px;
+  height: 24px;
+  border-left: 1px solid #e5e5e5;
+}
+
+div.jsoneditor-contextmenu div.jsoneditor-icon {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 24px;
+  height: 24px;
+  border: none;
+  padding: 0;
+  margin: 0;
+  background-image: url("/res/jsoneditor/img/jsoneditor-icons.svg");
+}
+
+div.jsoneditor-contextmenu ul li ul div.jsoneditor-icon {
+  margin-left: 24px;
+}
+
+div.jsoneditor-contextmenu div.jsoneditor-text {
+  padding: 4px 0 4px 24px;
+  word-wrap: break-word;
+}
+
+div.jsoneditor-contextmenu div.jsoneditor-text.jsoneditor-right-margin {
+  padding-right: 24px;
+}
+
+div.jsoneditor-contextmenu ul li button div.jsoneditor-expand {
+  position: absolute;
+  top: 0;
+  right: 0;
+  width: 24px;
+  height: 24px;
+  padding: 0;
+  margin: 0 4px 0 0;
+  background: url("/res/jsoneditor/img/jsoneditor-icons.svg") 0 -72px;
+}
+
+div.jsoneditor-contextmenu div.jsoneditor-separator {
+  height: 0;
+  border-top: 1px solid #e5e5e5;
+  padding-top: 5px;
+  margin-top: 5px;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-remove > div.jsoneditor-icon {
+  background-position: -24px 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-append > div.jsoneditor-icon {
+  background-position: 0 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-insert > div.jsoneditor-icon {
+  background-position: 0 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-duplicate > div.jsoneditor-icon {
+  background-position: -48px 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-sort-asc > div.jsoneditor-icon {
+  background-position: -168px 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-sort-desc > div.jsoneditor-icon {
+  background-position: -192px 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-transform > div.jsoneditor-icon {
+  background-position: -216px 0;
+}
+
+/* ContextMenu - sub menu */
+
+div.jsoneditor-contextmenu ul li button.jsoneditor-selected,
+div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover,
+div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus {
+  color: white;
+  background-color: #ee422e;
+}
+
+div.jsoneditor-contextmenu ul li {
+  overflow: hidden;
+}
+
+div.jsoneditor-contextmenu ul li ul {
+  display: none;
+  position: relative;
+  left: -10px;
+  top: 0;
+  border: none;
+  box-shadow: inset 0 0 10px rgba(128, 128, 128, 0.5);
+  padding: 0 10px;
+  /* TODO: transition is not supported on IE8-9 */
+  -webkit-transition: all 0.3s ease-out;
+  -moz-transition: all 0.3s ease-out;
+  -o-transition: all 0.3s ease-out;
+  transition: all 0.3s ease-out;
+}
+
+
+
+div.jsoneditor-contextmenu ul li ul li button {
+  padding-left: 24px;
+  animation: all ease-in-out 1s;
+}
+
+div.jsoneditor-contextmenu ul li ul li button:hover,
+div.jsoneditor-contextmenu ul li ul li button:focus {
+  background-color: #f5f5f5;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-type-string > div.jsoneditor-icon {
+  background-position: -144px 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-type-auto > div.jsoneditor-icon {
+  background-position: -120px 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-type-object > div.jsoneditor-icon {
+  background-position: -72px 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-type-array > div.jsoneditor-icon {
+  background-position: -96px 0;
+}
+
+div.jsoneditor-contextmenu button.jsoneditor-type-modes > div.jsoneditor-icon {
+  background-image: none;
+  width: 6px;
+}
+
+/* pico modal styling */
+
+.jsoneditor-modal-overlay {
+  position: absolute !important;
+  background: rgb(1,1,1) !important;
+  opacity: 0.3 !important;
+}
+
+.jsoneditor-modal {
+  position: absolute !important;
+  max-width: 95% !important;
+  width: auto !important;
+  border-radius: 2px !important;
+  padding: 45px 15px 15px 15px !important;
+  box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3) !important;
+  color: #4d4d4d;
+  line-height: 1.3em;
+}
+
+.jsoneditor-modal.jsoneditor-modal-transform {
+  width: 600px !important;
+}
+
+.jsoneditor-modal .pico-modal-header {
+  position: absolute;
+  box-sizing: border-box;
+  top: 0;
+  left: 0;
+  width: 100%;
+  padding: 0 10px;
+  height: 30px;
+  line-height: 30px;
+  font-family: arial, sans-serif;
+  font-size: 11pt;
+  background: #3883fa;
+  color: white;
+}
+
+.jsoneditor-modal table {
+  width: 100%;
+}
+
+.jsoneditor-modal table th,
+.jsoneditor-modal table td {
+  padding: 5px 20px 5px 0;
+  text-align: left;
+  vertical-align: top;
+  font-weight: normal;
+  color: #4d4d4d;
+  line-height: 32px;
+}
+
+.jsoneditor-modal p:first-child {
+  margin-top: 0;
+}
+
+.jsoneditor-modal a {
+  color: #3883fa;
+}
+
+
+
+.jsoneditor-modal table td.jsoneditor-modal-input {
+  text-align: right;
+  padding-right: 0;
+  white-space: nowrap;
+}
+
+.jsoneditor-modal table td.jsoneditor-modal-actions {
+  padding-top: 15px;
+}
+
+.jsoneditor-modal .pico-close {
+  background: none !important;
+  font-size: 24px !important;
+  top: 7px !important;
+  right: 7px !important;
+  color: white;
+}
+
+.jsoneditor-modal select,
+.jsoneditor-modal textarea,
+.jsoneditor-modal input,
+.jsoneditor-modal #query {
+  background: #ffffff;
+  border: 1px solid #d3d3d3;
+  color: #4d4d4d;
+  border-radius: 3px;
+  padding: 4px;
+}
+
+.jsoneditor-modal,
+.jsoneditor-modal table td,
+.jsoneditor-modal table th,
+.jsoneditor-modal select,
+.jsoneditor-modal option,
+.jsoneditor-modal textarea,
+.jsoneditor-modal input,
+.jsoneditor-modal #query {
+  font-size: 10.5pt;
+  font-family: arial, sans-serif;
+}
+
+.jsoneditor-modal #query,
+.jsoneditor-modal .jsoneditor-transform-preview {
+  font-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif;
+  font-size: 10pt;
+}
+
+.jsoneditor-modal input[type="button"],
+.jsoneditor-modal input[type="submit"] {
+  background: #f5f5f5;
+  padding: 4px 20px;
+}
+
+.jsoneditor-modal select,
+.jsoneditor-modal input {
+  cursor: pointer;
+}
+
+.jsoneditor-modal input {
+  padding: 4px;
+}
+
+.jsoneditor-modal input[type="text"] {
+  cursor: inherit;
+}
+
+.jsoneditor-modal input[disabled] {
+  background: #d3d3d3;
+  color: #808080;
+}
+
+.jsoneditor-modal .jsoneditor-select-wrapper {
+  position: relative;
+  display: inline-block;
+}
+
+.jsoneditor-modal .jsoneditor-select-wrapper:after {
+  content: "";
+  width: 0;
+  height: 0;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+  border-top: 6px solid #666;
+  position: absolute;
+  right: 8px;
+  top: 14px;
+  pointer-events: none;
+}
+
+.jsoneditor-modal select {
+  padding: 3px 24px 3px 10px;
+  min-width: 180px;
+  max-width: 350px;
+  -webkit-appearance: none;
+  -moz-appearance: none;
+  appearance: none;
+  text-indent: 0;
+  text-overflow: "";
+  font-size: 10pt;
+  line-height: 1.5em;
+}
+
+.jsoneditor-modal select::-ms-expand {
+  display: none;
+}
+
+.jsoneditor-modal .jsoneditor-button-group input {
+  padding: 4px 10px;
+  margin: 0;
+  border-radius: 0;
+  border-left-style: none;
+}
+
+.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-first {
+  border-top-left-radius: 3px;
+  border-bottom-left-radius: 3px;
+  border-left-style: solid;
+}
+
+.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-last {
+  border-top-right-radius: 3px;
+  border-bottom-right-radius: 3px;
+}
+
+.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-asc input.jsoneditor-button-asc,
+.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-desc input.jsoneditor-button-desc {
+  background: #3883fa;
+  border-color: #3883fa;
+  color: white;
+}
+
+.jsoneditor-modal #query,
+.jsoneditor-modal .jsoneditor-transform-preview {
+  width: 100%;
+  box-sizing: border-box;
+}
+
+.jsoneditor-modal .jsoneditor-transform-preview {
+  background: #f5f5f5;
+  height: 200px;
+}
+
+.jsoneditor-modal .jsoneditor-transform-preview.jsoneditor-error {
+  color: #ee422e;
+}
+
+.jsoneditor-modal .jsoneditor-jmespath-wizard {
+  line-height: 1.2em;
+  width: 100%;
+  background: #ffffe0;
+  border: 1px solid #ffe99a;
+  padding: 0 10px 10px;
+  border-radius: 3px;
+}
+
+.jsoneditor-modal .jsoneditor-jmespath-wizard-label {
+  font-style: italic;
+  margin: 4px 0 2px 0;
+}
+
+.jsoneditor-modal .jsoneditor-inline {
+  position: relative;
+  display: inline-block;
+  width: 100%;
+  padding: 2px;
+}
+
+.jsoneditor-modal .jsoneditor-jmespath-filter {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.jsoneditor-modal .jsoneditor-jmespath-filter-field {
+  width: 170px;
+}
+
+.jsoneditor-modal .jsoneditor-jmespath-filter-relation {
+  width: 100px;
+}
+
+.jsoneditor-modal .jsoneditor-jmespath-filter-value {
+  min-width: 100px;
+  flex: 1;
+}
+
+.jsoneditor-modal .jsoneditor-jmespath-sort-field {
+  width: 170px;
+}
+
+.jsoneditor-modal .jsoneditor-jmespath-sort-order {
+  width: 150px;
+}
+
+.jsoneditor-modal .jsoneditor-jmespath-select-fields {
+  width: 100%;
+}
+
+.jsoneditor-modal .selectr-selected {
+  border-color: #d3d3d3;
+  padding: 4px 28px 4px 8px;
+}
+
+.jsoneditor-modal .selectr-selected .selectr-tag {
+  background-color: #3883fa;
+  border-radius: 5px;
+}
+div.jsoneditor-menu {
+  width: 100%;
+  height: 35px;
+  padding: 2px;
+  margin: 0;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: white;
+  background-color: #a8afbb;
+  border-bottom: 1px solid #a8afbb;
+}
+
+div.jsoneditor-menu > button,
+div.jsoneditor-menu > div.jsoneditor-modes > button {
+  width: 26px;
+  height: 26px;
+  margin: 2px;
+  padding: 0;
+  border-radius: 2px;
+  border: 1px solid transparent;
+  background: transparent url("/res/jsoneditor/img/jsoneditor-icons.svg");
+  color: white;
+  opacity: 0.8;
+  font-family: arial, sans-serif;
+  font-size: 10pt;
+  float: left;
+}
+
+div.jsoneditor-menu > button:hover,
+div.jsoneditor-menu > div.jsoneditor-modes > button:hover {
+  background-color: rgba(255,255,255,0.2);
+  border: 1px solid rgba(255,255,255,0.4);
+}
+
+div.jsoneditor-menu > button:focus,
+div.jsoneditor-menu > button:active,
+div.jsoneditor-menu > div.jsoneditor-modes > button:focus,
+div.jsoneditor-menu > div.jsoneditor-modes > button:active {
+  background-color: rgba(255,255,255,0.3);
+}
+
+div.jsoneditor-menu > button:disabled,
+div.jsoneditor-menu > div.jsoneditor-modes > button:disabled {
+  opacity: 0.5;
+}
+
+div.jsoneditor-menu > button.jsoneditor-collapse-all {
+  background-position: 0 -96px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-expand-all {
+  background-position: 0 -120px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-sort {
+  background-position: -120px -96px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-transform {
+  background-position: -144px -96px;
+}
+
+div.jsoneditor.jsoneditor-mode-view > div.jsoneditor-menu > button.jsoneditor-sort,
+div.jsoneditor.jsoneditor-mode-form > div.jsoneditor-menu > button.jsoneditor-sort,
+div.jsoneditor.jsoneditor-mode-view > div.jsoneditor-menu > button.jsoneditor-transform,
+div.jsoneditor.jsoneditor-mode-form > div.jsoneditor-menu > button.jsoneditor-transform {
+  display: none;
+}
+
+div.jsoneditor-menu > button.jsoneditor-undo {
+  background-position: -24px -96px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-undo:disabled {
+  background-position: -24px -120px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-redo {
+  background-position: -48px -96px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-redo:disabled {
+  background-position: -48px -120px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-compact {
+  background-position: -72px -96px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-format {
+  background-position: -72px -120px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-repair {
+  background-position: -96px -96px;
+}
+
+div.jsoneditor-menu > div.jsoneditor-modes {
+  display: inline-block;
+  float: left;
+}
+
+div.jsoneditor-menu > div.jsoneditor-modes > button {
+  background-image: none;
+  width: auto;
+  padding-left: 6px;
+  padding-right: 6px;
+}
+
+div.jsoneditor-menu > button.jsoneditor-separator,
+div.jsoneditor-menu > div.jsoneditor-modes > button.jsoneditor-separator {
+  margin-left: 10px;
+}
+
+div.jsoneditor-menu a {
+  font-family: arial, sans-serif;
+  font-size: 10pt;
+  color: white;
+  opacity: 0.8;
+  vertical-align: middle;
+}
+
+div.jsoneditor-menu a:hover {
+  opacity: 1;
+}
+
+div.jsoneditor-menu a.jsoneditor-poweredBy {
+  font-size: 8pt;
+  position: absolute;
+  right: 0;
+  top: 0;
+  padding: 10px;
+}
+table.jsoneditor-search input,
+table.jsoneditor-search div.jsoneditor-results {
+  font-family: arial, sans-serif;
+  font-size: 10pt;
+  color: #1A1A1A;
+  background: transparent;
+  /* For Firefox */
+}
+
+table.jsoneditor-search div.jsoneditor-results {
+  color: white;
+  padding-right: 5px;
+  line-height: 24px;
+  padding-top: 2px;
+}
+
+table.jsoneditor-search {
+  position: absolute;
+  right: 4px;
+  top: 4px;
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+
+table.jsoneditor-search div.jsoneditor-frame {
+  border: 1px solid transparent;
+  background-color: white;
+  padding: 0 2px;
+  margin: 0;
+}
+
+table.jsoneditor-search div.jsoneditor-frame table {
+  border-collapse: collapse;
+}
+
+table.jsoneditor-search input {
+  width: 120px;
+  border: none;
+  outline: none;
+  margin: 1px;
+  line-height: 20px;
+}
+
+table.jsoneditor-search button {
+  width: 16px;
+  height: 24px;
+  padding: 0;
+  margin: 0;
+  border: none;
+  background: url("/res/jsoneditor/img/jsoneditor-icons.svg");
+  vertical-align: top;
+}
+
+table.jsoneditor-search button:hover {
+  background-color: transparent;
+}
+
+table.jsoneditor-search button.jsoneditor-refresh {
+  width: 18px;
+  background-position: -99px -73px;
+}
+
+table.jsoneditor-search button.jsoneditor-next {
+  cursor: pointer;
+  background-position: -124px -73px;
+}
+
+table.jsoneditor-search button.jsoneditor-next:hover {
+  background-position: -124px -49px;
+}
+
+table.jsoneditor-search button.jsoneditor-previous {
+  cursor: pointer;
+  background-position: -148px -73px;
+  margin-right: 2px;
+}
+
+table.jsoneditor-search button.jsoneditor-previous:hover {
+  background-position: -148px -49px;
+}
+div.jsoneditor div.autocomplete.dropdown {
+  position: absolute;
+  background: white;
+  box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3);
+  border: 1px solid #d3d3d3;
+  z-index: 100;
+  overflow-x: hidden;
+  overflow-y: auto;
+  cursor: default;
+  margin: 0;
+  padding-left: 2pt;
+  padding-right: 5pt;
+  text-align: left;
+  outline: 0;
+  font-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif;
+  font-size: 10pt;
+}
+
+div.jsoneditor div.autocomplete.dropdown .item {
+  color: #333;
+}
+
+div.jsoneditor div.autocomplete.dropdown .item.hover {
+  background-color: #ddd;
+}
+
+div.jsoneditor div.autocomplete.hint {
+  color: #aaa;
+  top: 4px;
+  left: 4px;
+}
+div.jsoneditor-treepath {
+  padding: 0 5px;
+  overflow: hidden;
+}
+
+div.jsoneditor-treepath div.jsoneditor-contextmenu-root {
+  position: absolute;
+  left: 0;
+}
+
+div.jsoneditor-treepath span.jsoneditor-treepath-element {
+  margin: 1px;
+  font-family: arial, sans-serif;
+  font-size: 10pt;
+}
+
+div.jsoneditor-treepath span.jsoneditor-treepath-seperator {
+  margin: 2px;
+  font-size: 9pt;
+  font-family: arial, sans-serif;
+}
+
+div.jsoneditor-treepath span.jsoneditor-treepath-element:hover,
+div.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover {
+  cursor: pointer;
+  text-decoration: underline;
+}
+div.jsoneditor-statusbar {
+  line-height: 26px;
+  height: 26px;
+  margin-top: -1px;
+  color: #808080;
+  background-color: #ebebeb;
+  border-top: 1px solid #d3d3d3;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  font-size: 10pt;
+}
+
+div.jsoneditor-statusbar > .jsoneditor-curserinfo-label {
+  margin: 0 2px 0 4px;
+}
+
+div.jsoneditor-statusbar > .jsoneditor-curserinfo-val {
+  margin-right: 12px;
+}
+
+div.jsoneditor-statusbar > .jsoneditor-curserinfo-count {
+  margin-left: 4px;
+}
+
+div.jsoneditor-statusbar > .jsoneditor-validation-error-icon {
+  float: right;
+  width: 24px;
+  height: 24px;
+  padding: 0;
+  margin-top: 1px;
+  background: url("/res/jsoneditor/img/jsoneditor-icons.svg") -168px -48px;
+}
+
+div.jsoneditor-statusbar > .jsoneditor-validation-error-count {
+  float: right;
+  margin: 0 4px 0 0;
+}
+
+div.jsoneditor-statusbar > .jsoneditor-parse-error-icon {
+  float: right;
+  width: 24px;
+  height: 24px;
+  padding: 0;
+  margin: 1px;
+  background: url("/res/jsoneditor/img/jsoneditor-icons.svg") -25px 0px;
+}
+div.jsoneditor-navigation-bar {
+  width: 100%;
+  height: 26px;
+  line-height: 26px;
+  padding: 0;
+  margin: 0;
+  border-bottom: 1px solid #d3d3d3;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: #808080;
+  background-color: #ebebeb;
+  overflow: hidden;
+  font-family: arial, sans-serif;
+  font-size: 10pt;
+}
+/*!
+ * Selectr 2.4.0
+ * https://github.com/Mobius1/Selectr
+ *
+ * Released under the MIT license
+ */
+
+.selectr-container {
+  position: relative;
+}
+
+.selectr-container li {
+  list-style: none;
+}
+
+.selectr-hidden {
+  position: absolute;
+  overflow: hidden;
+  clip: rect(0px, 0px, 0px, 0px);
+  width: 1px;
+  height: 1px;
+  margin: -1px;
+  padding: 0;
+  border: 0 none;
+}
+
+.selectr-visible {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  opacity: 0;
+  z-index: 11;
+}
+
+.selectr-desktop.multiple .selectr-visible {
+  display: none;
+}
+
+.selectr-desktop.multiple.native-open .selectr-visible {
+  top: 100%;
+  min-height: 200px !important;
+  height: auto;
+  opacity: 1;
+  display: block;
+}
+
+.selectr-container.multiple.selectr-mobile .selectr-selected {
+  z-index: 0;
+}
+
+.selectr-selected {
+  position: relative;
+  z-index: 1;
+  box-sizing: border-box;
+  width: 100%;
+  padding: 7px 28px 7px 14px;
+  cursor: pointer;
+  border: 1px solid #999;
+  border-radius: 3px;
+  background-color: #fff;
+}
+
+.selectr-selected::before {
+  position: absolute;
+  top: 50%;
+  right: 10px;
+  width: 0;
+  height: 0;
+  content: '';
+  -o-transform: rotate(0deg) translate3d(0px, -50%, 0px);
+  -ms-transform: rotate(0deg) translate3d(0px, -50%, 0px);
+  -moz-transform: rotate(0deg) translate3d(0px, -50%, 0px);
+  -webkit-transform: rotate(0deg) translate3d(0px, -50%, 0px);
+  transform: rotate(0deg) translate3d(0px, -50%, 0px);
+  border-width: 4px 4px 0 4px;
+  border-style: solid;
+  border-color: #6c7a86 transparent transparent;
+}
+
+.selectr-container.open .selectr-selected::before,
+.selectr-container.native-open .selectr-selected::before {
+  border-width: 0 4px 4px 4px;
+  border-style: solid;
+  border-color: transparent transparent #6c7a86;
+}
+
+.selectr-label {
+  display: none;
+  overflow: hidden;
+  width: 100%;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
+.selectr-placeholder {
+  color: #6c7a86;
+}
+
+.selectr-tags {
+  margin: 0;
+  padding: 0;
+  white-space: normal;
+}
+
+.has-selected .selectr-tags {
+  margin: 0 0 -2px;
+}
+
+.selectr-tag {
+  list-style: none;
+  position: relative;
+  float: left;
+  padding: 2px 25px 2px 8px;
+  margin: 0 2px 2px 0;
+  cursor: default;
+  color: #fff;
+  border: medium none;
+  border-radius: 10px;
+  background: #acb7bf none repeat scroll 0 0;
+}
+
+.selectr-container.multiple.has-selected .selectr-selected {
+  padding: 5px 28px 5px 5px;
+}
+
+.selectr-options-container {
+  position: absolute;
+  z-index: 10000;
+  top: calc(100% - 1px);
+  left: 0;
+  display: none;
+  box-sizing: border-box;
+  width: 100%;
+  border-width: 0 1px 1px;
+  border-style: solid;
+  border-color: transparent #999 #999;
+  border-radius: 0 0 3px 3px;
+  background-color: #fff;
+}
+
+.selectr-container.open .selectr-options-container {
+  display: block;
+}
+
+.selectr-input-container {
+  position: relative;
+  display: none;
+}
+
+.selectr-clear,
+.selectr-input-clear,
+.selectr-tag-remove {
+  position: absolute;
+  top: 50%;
+  right: 22px;
+  width: 20px;
+  height: 20px;
+  padding: 0;
+  cursor: pointer;
+  -o-transform: translate3d(0px, -50%, 0px);
+  -ms-transform: translate3d(0px, -50%, 0px);
+  -moz-transform: translate3d(0px, -50%, 0px);
+  -webkit-transform: translate3d(0px, -50%, 0px);
+  transform: translate3d(0px, -50%, 0px);
+  border: medium none;
+  background-color: transparent;
+  z-index: 11;
+}
+
+.selectr-clear,
+.selectr-input-clear {
+  display: none;
+}
+
+.selectr-container.has-selected .selectr-clear,
+.selectr-input-container.active .selectr-input-clear {
+  display: block;
+}
+
+.selectr-selected .selectr-tag-remove {
+  right: 2px;
+}
+
+.selectr-clear::before,
+.selectr-clear::after,
+.selectr-input-clear::before,
+.selectr-input-clear::after,
+.selectr-tag-remove::before,
+.selectr-tag-remove::after {
+  position: absolute;
+  top: 5px;
+  left: 9px;
+  width: 2px;
+  height: 10px;
+  content: ' ';
+  background-color: #6c7a86;
+}
+
+.selectr-tag-remove::before,
+.selectr-tag-remove::after {
+  top: 4px;
+  width: 3px;
+  height: 12px;
+  background-color: #fff;
+}
+
+.selectr-clear:before,
+.selectr-input-clear::before,
+.selectr-tag-remove::before {
+  -o-transform: rotate(45deg);
+  -ms-transform: rotate(45deg);
+  -moz-transform: rotate(45deg);
+  -webkit-transform: rotate(45deg);
+  transform: rotate(45deg);
+}
+
+.selectr-clear:after,
+.selectr-input-clear::after,
+.selectr-tag-remove::after {
+  -o-transform: rotate(-45deg);
+  -ms-transform: rotate(-45deg);
+  -moz-transform: rotate(-45deg);
+  -webkit-transform: rotate(-45deg);
+  transform: rotate(-45deg);
+}
+
+.selectr-input-container.active,
+.selectr-input-container.active .selectr-clear {
+  display: block;
+}
+
+.selectr-input {
+  top: 5px;
+  left: 5px;
+  box-sizing: border-box;
+  width: calc(100% - 30px);
+  margin: 10px 15px;
+  padding: 7px 30px 7px 9px;
+  border: 1px solid #999;
+  border-radius: 3px;
+}
+
+.selectr-notice {
+  display: none;
+  box-sizing: border-box;
+  width: 100%;
+  padding: 8px 16px;
+  border-top: 1px solid #999;
+  border-radius: 0 0 3px 3px;
+  background-color: #fff;
+}
+
+.selectr-container.notice .selectr-notice {
+  display: block;
+}
+
+.selectr-container.notice .selectr-selected {
+  border-radius: 3px 3px 0 0;
+}
+
+.selectr-options {
+  position: relative;
+  top: calc(100% + 2px);
+  display: none;
+  overflow-x: auto;
+  overflow-y: scroll;
+  max-height: 200px;
+  margin: 0;
+  padding: 0;
+}
+
+.selectr-container.open .selectr-options,
+.selectr-container.open .selectr-input-container,
+.selectr-container.notice .selectr-options-container {
+  display: block;
+}
+
+.selectr-option {
+  position: relative;
+  display: block;
+  padding: 5px 20px;
+  list-style: outside none none;
+  cursor: pointer;
+  font-weight: normal;
+}
+
+.selectr-options.optgroups > .selectr-option {
+  padding-left: 25px;
+}
+
+.selectr-optgroup {
+  font-weight: bold;
+  padding: 0;
+}
+
+.selectr-optgroup--label {
+  font-weight: bold;
+  margin-top: 10px;
+  padding: 5px 15px;
+}
+
+.selectr-match {
+  text-decoration: underline;
+}
+
+.selectr-option.selected {
+  background-color: #ddd;
+}
+
+.selectr-option.active {
+  color: #fff;
+  background-color: #5897fb;
+}
+
+.selectr-option.disabled {
+  opacity: 0.4;
+}
+
+.selectr-option.excluded {
+  display: none;
+}
+
+.selectr-container.open .selectr-selected {
+  border-color: #999 #999 transparent #999;
+  border-radius: 3px 3px 0 0;
+}
+
+.selectr-container.open .selectr-selected::after {
+  -o-transform: rotate(180deg) translate3d(0px, 50%, 0px);
+  -ms-transform: rotate(180deg) translate3d(0px, 50%, 0px);
+  -moz-transform: rotate(180deg) translate3d(0px, 50%, 0px);
+  -webkit-transform: rotate(180deg) translate3d(0px, 50%, 0px);
+  transform: rotate(180deg) translate3d(0px, 50%, 0px);
+}
+
+.selectr-disabled {
+  opacity: .6;
+}
+
+.selectr-empty,
+.has-selected .selectr-placeholder {
+  display: none;
+}
+
+.has-selected .selectr-label {
+  display: block;
+}
+
+/* TAGGABLE */
+
+.taggable .selectr-selected {
+  padding: 4px 28px 4px 4px;
+}
+
+.taggable .selectr-selected::after {
+  display: table;
+  content: " ";
+  clear: both;
+}
+
+.taggable .selectr-label {
+  width: auto;
+}
+
+.taggable .selectr-tags {
+  float: left;
+  display: block;
+}
+
+.taggable .selectr-placeholder {
+  display: none;
+}
+
+.input-tag {
+  float: left;
+  min-width: 90px;
+  width: auto;
+}
+
+.selectr-tag-input {
+  border: medium none;
+  padding: 3px 10px;
+  width: 100%;
+  font-family: inherit;
+  font-weight: inherit;
+  font-size: inherit;
+}
+
+.selectr-input-container.loading::after {
+  position: absolute;
+  top: 50%;
+  right: 20px;
+  width: 20px;
+  height: 20px;
+  content: '';
+  -o-transform: translate3d(0px, -50%, 0px);
+  -ms-transform: translate3d(0px, -50%, 0px);
+  -moz-transform: translate3d(0px, -50%, 0px);
+  -webkit-transform: translate3d(0px, -50%, 0px);
+  transform: translate3d(0px, -50%, 0px);
+  -o-transform-origin: 50% 0 0;
+  -ms-transform-origin: 50% 0 0;
+  -moz-transform-origin: 50% 0 0;
+  -webkit-transform-origin: 50% 0 0;
+  transform-origin: 50% 0 0;
+  -moz-animation: 500ms linear 0s normal forwards infinite running spin;
+  -webkit-animation: 500ms linear 0s normal forwards infinite running spin;
+  animation: 500ms linear 0s normal forwards infinite running spin;
+  border-width: 3px;
+  border-style: solid;
+  border-color: #aaa #ddd #ddd;
+  border-radius: 50%;
+}
+
+@-webkit-keyframes spin {
+  0% {
+    -webkit-transform: rotate(0deg) translate3d(0px, -50%, 0px);
+    transform: rotate(0deg) translate3d(0px, -50%, 0px);
+  }
+
+  100% {
+    -webkit-transform: rotate(360deg) translate3d(0px, -50%, 0px);
+    transform: rotate(360deg) translate3d(0px, -50%, 0px);
+  }
+}
+
+@keyframes spin {
+  0% {
+    -webkit-transform: rotate(0deg) translate3d(0px, -50%, 0px);
+    transform: rotate(0deg) translate3d(0px, -50%, 0px);
+  }
+
+  100% {
+    -webkit-transform: rotate(360deg) translate3d(0px, -50%, 0px);
+    transform: rotate(360deg) translate3d(0px, -50%, 0px);
+  }
+}
+
+.selectr-container.open.inverted .selectr-selected {
+  border-color: transparent #999 #999;
+  border-radius: 0 0 3px 3px;
+}
+
+.selectr-container.inverted .selectr-options-container {
+  border-width: 1px 1px 0;
+  border-color: #999 #999 transparent;
+  border-radius: 3px 3px 0 0;
+  background-color: #fff;
+}
+
+.selectr-container.inverted .selectr-options-container {
+  top: auto;
+  bottom: calc(100% - 1px);
+}
+
+.selectr-container ::-webkit-input-placeholder {
+  color: #6c7a86;
+  opacity: 1;
+}
+
+.selectr-container ::-moz-placeholder {
+  color: #6c7a86;
+  opacity: 1;
+}
+
+.selectr-container :-ms-input-placeholder {
+  color: #6c7a86;
+  opacity: 1;
+}
+
+.selectr-container ::placeholder {
+  color: #6c7a86;
+  opacity: 1;
+}

+ 736 - 0
src/web/res/jsoneditor/img/jsoneditor-icons.svg

@@ -0,0 +1,736 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="240"
+   height="144"
+   id="svg4136"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="jsoneditor-icons.svg">
+  <title
+     id="title6512">JSON Editor Icons</title>
+  <metadata
+     id="metadata4148">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>JSON Editor Icons</dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4146" />
+  <sodipodi:namedview
+     pagecolor="#ff63ff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1026"
+     id="namedview4144"
+     showgrid="true"
+     inkscape:zoom="4"
+     inkscape:cx="101.95756"
+     inkscape:cy="63.092516"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg4136"
+     showguides="false"
+     borderlayer="false"
+     inkscape:showpageshadow="true"
+     showborder="true">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4640"
+       empspacing="24" />
+  </sodipodi:namedview>
+  <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
+  <rect
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none;stroke-width:0"
+     id="svg_1"
+     height="16"
+     width="16"
+     y="4"
+     x="4" />
+  <rect
+     id="svg_1-7"
+     height="16"
+     width="16"
+     y="3.999995"
+     x="28.000006"
+     style="fill:#ec3f29;fill-opacity:0.94117647;stroke:none;stroke-width:0" />
+  <rect
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none;stroke-width:0"
+     x="52.000004"
+     y="3.999995"
+     width="16"
+     height="16"
+     id="rect4165" />
+  <rect
+     id="rect4175"
+     height="16"
+     width="16"
+     y="3.9999852"
+     x="172.00002"
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none;stroke-width:0" />
+  <rect
+     id="rect4175-3"
+     height="16"
+     width="16"
+     y="3.999995"
+     x="196"
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none;stroke-width:0" />
+  <g
+     id="g4299"
+     style="stroke:none">
+    <rect
+       x="7.0000048"
+       y="10.999998"
+       width="9.9999924"
+       height="1.9999986"
+       id="svg_1-1"
+       style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0" />
+    <rect
+       x="11.000005"
+       y="7.0000114"
+       width="1.9999955"
+       height="9.9999838"
+       id="svg_1-1-1"
+       style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0" />
+  </g>
+  <g
+     id="g4299-3"
+     transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,19.029435,12.000001)"
+     style="stroke:none">
+    <rect
+       x="7.0000048"
+       y="10.999998"
+       width="9.9999924"
+       height="1.9999986"
+       id="svg_1-1-0"
+       style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0" />
+    <rect
+       x="11.000005"
+       y="7.0000114"
+       width="1.9999955"
+       height="9.9999838"
+       id="svg_1-1-1-9"
+       style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0" />
+  </g>
+  <rect
+     id="svg_1-7-5"
+     height="6.9999905"
+     width="6.9999909"
+     y="7.0000048"
+     x="55.000004"
+     style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0" />
+  <rect
+     style="fill:#ffffff;fill-opacity:1;stroke:#4c4c4c;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     x="58"
+     y="10.00001"
+     width="6.9999909"
+     height="6.9999905"
+     id="rect4354" />
+  <rect
+     id="svg_1-7-5-7"
+     height="6.9999905"
+     width="6.9999909"
+     y="10.000005"
+     x="58.000004"
+     style="fill:#ffffff;fill-opacity:1;stroke:#3c80df;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647" />
+  <g
+     id="g4378">
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0"
+       x="198"
+       y="10.999999"
+       width="7.9999909"
+       height="1.9999965"
+       id="svg_1-7-5-3" />
+    <rect
+       id="rect4374"
+       height="1.9999946"
+       width="11.999995"
+       y="7.0000005"
+       x="198"
+       style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0" />
+    <rect
+       id="rect4376"
+       height="1.9999995"
+       width="3.9999928"
+       y="14.999996"
+       x="198"
+       style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0" />
+  </g>
+  <g
+     transform="matrix(1,0,0,-1,-23.999995,23.999995)"
+     id="g4383">
+    <rect
+       id="rect4385"
+       height="1.9999965"
+       width="7.9999909"
+       y="10.999999"
+       x="198"
+       style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0"
+       x="198"
+       y="7.0000005"
+       width="11.999995"
+       height="1.9999946"
+       id="rect4387" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0"
+       x="198"
+       y="14.999996"
+       width="3.9999928"
+       height="1.9999995"
+       id="rect4389" />
+  </g>
+  <rect
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none"
+     id="rect3754-4"
+     width="16"
+     height="16"
+     x="76"
+     y="3.9999199" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     d="m 85.10447,6.0157384 -0.0156,1.4063 c 3.02669,-0.2402 0.33008,3.6507996 2.48438,4.5780996 -2.18694,1.0938 0.49191,4.9069 -2.45313,4.5781 l -0.0156,1.4219 c 5.70828,0.559 1.03264,-5.1005 4.70313,-5.2656 l 0,-1.4063 c -3.61303,-0.027 1.11893,-5.7069996 -4.70313,-5.3124996 z"
+     id="path4351"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccccccc" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     d="m 82.78125,5.9984384 0.0156,1.4063 c -3.02668,-0.2402 -0.33007,3.6506996 -2.48437,4.5780996 2.18694,1.0938 -0.49192,4.9069 2.45312,4.5781 l 0.0156,1.4219 c -5.70827,0.559 -1.03263,-5.1004 -4.70312,-5.2656 l 0,-1.4063 c 3.61303,-0.027 -1.11894,-5.7070996 4.70312,-5.3124996 z"
+     id="path4351-9"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccccccc" />
+  <rect
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none"
+     id="rect3754-25"
+     width="16"
+     height="16"
+     x="100"
+     y="3.9999199" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;stroke:none"
+     d="m 103.719,5.6719384 0,12.7187996 3.03125,0 0,-1.5313 -1.34375,0 0,-9.6249996 1.375,0 0,-1.5625 z"
+     id="path2987"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;stroke:none"
+     d="m 112.2185,5.6721984 0,12.7187996 -3.03125,0 0,-1.5313 1.34375,0 0,-9.6249996 -1.375,0 0,-1.5625 z"
+     id="path2987-1"
+     inkscape:connector-curvature="0" />
+  <rect
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none"
+     id="rect3754-73"
+     width="16"
+     height="16"
+     x="124"
+     y="3.9999199" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;stroke:none"
+     d="m 126.2824,17.602938 1.78957,0 1.14143,-2.8641 5.65364,0 1.14856,2.8641 1.76565,0 -4.78687,-11.1610996 -1.91903,0 z"
+     id="path3780"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccccccccc" />
+  <path
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none"
+     d="m 129.72704,13.478838 4.60852,0.01 -2.30426,-5.5497996 z"
+     id="path3782"
+     inkscape:connector-curvature="0" />
+  <rect
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none"
+     id="rect3754-35"
+     width="16"
+     height="16"
+     x="148"
+     y="3.9999199" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;stroke:none"
+     d="m 156.47655,5.8917384 0,2.1797 0.46093,2.3983996 1.82813,0 0.39844,-2.3983996 0,-2.1797 z"
+     id="path5008-2"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccccccc" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;stroke:none"
+     d="m 152.51561,5.8906384 0,2.1797 0.46094,2.3983996 1.82812,0 0.39844,-2.3983996 0,-2.1797 z"
+     id="path5008-2-8"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccccccc" />
+  <rect
+     id="svg_1-7-2"
+     height="1.9999961"
+     width="11.999996"
+     y="64"
+     x="54"
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0" />
+  <rect
+     id="svg_1-7-2-2"
+     height="2.9999905"
+     width="2.9999907"
+     y="52"
+     x="80.000008"
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0" />
+  <rect
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0"
+     x="85.000008"
+     y="52"
+     width="2.9999907"
+     height="2.9999905"
+     id="rect4561" />
+  <rect
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0"
+     x="80.000008"
+     y="58"
+     width="2.9999907"
+     height="2.9999905"
+     id="rect4563" />
+  <rect
+     id="rect4565"
+     height="2.9999905"
+     width="2.9999907"
+     y="58"
+     x="85.000008"
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0" />
+  <rect
+     id="rect4567"
+     height="2.9999905"
+     width="2.9999907"
+     y="64"
+     x="80.000008"
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0" />
+  <rect
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0"
+     x="85.000008"
+     y="64"
+     width="2.9999907"
+     height="2.9999905"
+     id="rect4569" />
+  <circle
+     style="opacity:1;fill:none;fill-opacity:1;stroke:#4c4c4c;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
+     id="path4571"
+     cx="110.06081"
+     cy="57.939209"
+     r="4.7438836" />
+  <rect
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0"
+     x="116.64566"
+     y="-31.79752"
+     width="4.229713"
+     height="6.4053884"
+     id="rect4563-2"
+     transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)" />
+  <path
+     style="fill:#4c4c4c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     d="M 125,56 138.77027,56.095 132,64 Z"
+     id="path4613"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccc" />
+  <path
+     sodipodi:nodetypes="cccc"
+     inkscape:connector-curvature="0"
+     id="path4615"
+     d="M 149,64 162.77027,63.905 156,56 Z"
+     style="fill:#4c4c4c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+  <rect
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0"
+     x="54"
+     y="53"
+     width="11.999996"
+     height="1.9999961"
+     id="rect4638" />
+  <rect
+     id="svg_1-7-2-24"
+     height="1.9999957"
+     width="12.99999"
+     y="-56"
+     x="53"
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0"
+     transform="matrix(0,1,-1,0,0,0)" />
+  <rect
+     transform="matrix(0,1,-1,0,0,0)"
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0"
+     x="53"
+     y="-66"
+     width="12.99999"
+     height="1.9999957"
+     id="rect4657" />
+  <rect
+     id="rect4659"
+     height="0.99999291"
+     width="11.999999"
+     y="57"
+     x="54"
+     style="fill:#4c4c4c;fill-opacity:0.98431373;stroke:none;stroke-width:0" />
+  <rect
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1"
+     x="54"
+     y="88.000122"
+     width="11.999996"
+     height="1.9999961"
+     id="rect4661" />
+  <rect
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1"
+     x="80.000008"
+     y="76.000122"
+     width="2.9999907"
+     height="2.9999905"
+     id="rect4663" />
+  <rect
+     id="rect4665"
+     height="2.9999905"
+     width="2.9999907"
+     y="76.000122"
+     x="85.000008"
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1" />
+  <rect
+     id="rect4667"
+     height="2.9999905"
+     width="2.9999907"
+     y="82.000122"
+     x="80.000008"
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1" />
+  <rect
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1"
+     x="85.000008"
+     y="82.000122"
+     width="2.9999907"
+     height="2.9999905"
+     id="rect4669" />
+  <rect
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1"
+     x="80.000008"
+     y="88.000122"
+     width="2.9999907"
+     height="2.9999905"
+     id="rect4671" />
+  <rect
+     id="rect4673"
+     height="2.9999905"
+     width="2.9999907"
+     y="88.000122"
+     x="85.000008"
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1" />
+  <circle
+     r="4.7438836"
+     cy="81.939331"
+     cx="110.06081"
+     id="circle4675"
+     style="opacity:1;fill:none;fill-opacity:1;stroke:#d3d3d3;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+  <rect
+     transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)"
+     id="rect4677"
+     height="6.4053884"
+     width="4.229713"
+     y="-14.826816"
+     x="133.6163"
+     style="fill:#d3d3d3;fill-opacity:1;stroke:#d3d3d3;stroke-width:0;stroke-opacity:1" />
+  <path
+     sodipodi:nodetypes="cccc"
+     inkscape:connector-curvature="0"
+     id="path4679"
+     d="m 125,80.000005 13.77027,0.09499 L 132,87.999992 Z"
+     style="fill:#d3d3d3;fill-opacity:1;fill-rule:evenodd;stroke:#d3d3d3;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+  <path
+     style="fill:#d3d3d3;fill-opacity:1;fill-rule:evenodd;stroke:#d3d3d3;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     d="M 149,88.0002 162.77027,87.9052 156,80.0002 Z"
+     id="path4681"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccc" />
+  <rect
+     id="rect4683"
+     height="1.9999961"
+     width="11.999996"
+     y="77.000122"
+     x="54"
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1" />
+  <rect
+     transform="matrix(0,1,-1,0,0,0)"
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1"
+     x="77.000122"
+     y="-56"
+     width="12.99999"
+     height="1.9999957"
+     id="rect4685" />
+  <rect
+     id="rect4687"
+     height="1.9999957"
+     width="12.99999"
+     y="-66"
+     x="77.000122"
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1"
+     transform="matrix(0,1,-1,0,0,0)" />
+  <rect
+     style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:0;stroke-opacity:1"
+     x="54"
+     y="81.000122"
+     width="11.999999"
+     height="0.99999291"
+     id="rect4689" />
+  <rect
+     id="rect4761-1"
+     height="1.9999945"
+     width="15.99999"
+     y="101"
+     x="76.000008"
+     style="fill:#ffffff;fill-opacity:0.8;stroke:none;stroke-width:0" />
+  <rect
+     id="rect4761-0"
+     height="1.9999945"
+     width="15.99999"
+     y="105"
+     x="76.000008"
+     style="fill:#ffffff;fill-opacity:0.8;stroke:none;stroke-width:0" />
+  <rect
+     id="rect4761-7"
+     height="1.9999945"
+     width="9"
+     y="109"
+     x="76.000008"
+     style="fill:#ffffff;fill-opacity:0.8;stroke:none;stroke-width:0" />
+  <rect
+     id="rect4761-1-1"
+     height="1.9999945"
+     width="12"
+     y="125"
+     x="76.000008"
+     style="fill:#ffffff;fill-opacity:0.8;stroke:none;stroke-width:0" />
+  <rect
+     id="rect4761-1-1-4"
+     height="1.9999945"
+     width="10"
+     y="137"
+     x="76.000008"
+     style="fill:#ffffff;fill-opacity:0.8;stroke:none;stroke-width:0" />
+  <rect
+     id="rect4761-1-1-4-4"
+     height="1.9999945"
+     width="10"
+     y="129"
+     x="82"
+     style="fill:#ffffff;fill-opacity:0.8;stroke:none;stroke-width:0" />
+  <rect
+     id="rect4761-1-1-4-4-3"
+     height="1.9999945"
+     width="9"
+     y="133"
+     x="82"
+     style="fill:#ffffff;fill-opacity:0.8;stroke:none;stroke-width:0" />
+  <path
+     inkscape:connector-curvature="0"
+     style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.8;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.66157866;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+     d="m 36.398438,100.0254 c -0.423362,-0.013 -0.846847,0.01 -1.265626,0.062 -1.656562,0.2196 -3.244567,0.9739 -4.507812,2.2266 L 29,100.5991 l -2.324219,7.7129 7.826172,-1.9062 -1.804687,-1.9063 c 1.597702,-1.5308 4.048706,-1.8453 5.984375,-0.7207 1.971162,1.1452 2.881954,3.3975 2.308593,5.5508 -0.573361,2.1533 -2.533865,3.6953 -4.830078,3.6953 l 0,3.0742 c 3.550756,0 6.710442,-2.4113 7.650391,-5.9414 0.939949,-3.5301 -0.618463,-7.2736 -3.710938,-9.0703 -1.159678,-0.6738 -2.431087,-1.0231 -3.701171,-1.0625 z"
+     id="path4138" />
+  <path
+     inkscape:connector-curvature="0"
+     style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.8;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.66157866;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+     d="m 59.722656,99.9629 c -1.270084,0.039 -2.541493,0.3887 -3.701172,1.0625 -3.092475,1.7967 -4.650886,5.5402 -3.710937,9.0703 0.939949,3.5301 4.09768,5.9414 7.648437,5.9414 l 0,-3.0742 c -2.296214,0 -4.256717,-1.542 -4.830078,-3.6953 -0.573361,-2.1533 0.337432,-4.4056 2.308594,-5.5508 1.935731,-1.1246 4.38863,-0.8102 5.986326,0.7207 l -1.806638,1.9063 7.828128,1.9062 -2.32422,-7.7129 -1.62696,1.7168 c -1.26338,-1.2531 -2.848917,-2.0088 -4.505855,-2.2285 -0.418778,-0.055 -0.842263,-0.076 -1.265625,-0.062 z"
+     id="path4138-1" />
+  <path
+     inkscape:connector-curvature="0"
+     style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.96599996;stroke-miterlimit:4;stroke-dasharray:none"
+     d="m 10.5,100 0,2 -2.4999996,0 L 12,107 l 4,-5 -2.5,0 0,-2 -3,0 z"
+     id="path3055-0-77" />
+  <path
+     style="opacity:0.8;fill:none;stroke:#ffffff;stroke-width:1.96599996;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     d="m 4.9850574,108.015 14.0298856,-0.03"
+     id="path5244-5-0-5"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+  <path
+     style="opacity:0.8;fill:none;stroke:#ffffff;stroke-width:1.96599996;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     d="m 4.9849874,132.015 14.0298866,-0.03"
+     id="path5244-5-0-5-8"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cc" />
+  <path
+     inkscape:connector-curvature="0"
+     style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.4;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#4d4d4d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.66157866;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+     d="m 36.398438,123.9629 c -0.423362,-0.013 -0.846847,0.01 -1.265626,0.062 -1.656562,0.2196 -3.244567,0.9739 -4.507812,2.2266 L 29,124.5366 l -2.324219,7.7129 7.826172,-1.9062 -1.804687,-1.9063 c 1.597702,-1.5308 4.048706,-1.8453 5.984375,-0.7207 1.971162,1.1453 2.881954,3.3975 2.308593,5.5508 -0.573361,2.1533 -2.533864,3.6953 -4.830078,3.6953 l 0,3.0742 c 3.550757,0 6.710442,-2.4093 7.650391,-5.9394 0.939949,-3.5301 -0.618463,-7.2756 -3.710938,-9.0723 -1.159678,-0.6737 -2.431087,-1.0231 -3.701171,-1.0625 z"
+     id="path4138-12" />
+  <path
+     inkscape:connector-curvature="0"
+     style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.4;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#4d4d4d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.66157866;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+     d="m 59.722656,123.9629 c -1.270084,0.039 -2.541493,0.3888 -3.701172,1.0625 -3.092475,1.7967 -4.650886,5.5422 -3.710937,9.0723 0.939949,3.5301 4.09768,5.9394 7.648437,5.9394 l 0,-3.0742 c -2.296214,0 -4.256717,-1.542 -4.830078,-3.6953 -0.573361,-2.1533 0.337432,-4.4055 2.308594,-5.5508 1.935731,-1.1246 4.38863,-0.8102 5.986326,0.7207 l -1.806638,1.9063 7.828128,1.9062 -2.32422,-7.7129 -1.62696,1.7168 c -1.26338,-1.2531 -2.848917,-2.0088 -4.505855,-2.2285 -0.418778,-0.055 -0.842263,-0.076 -1.265625,-0.062 z"
+     id="path4138-1-3" />
+  <path
+     id="path6191"
+     d="m 10.5,116 0,-2 -2.4999996,0 L 12,109 l 4,5 -2.5,0 0,2 -3,0 z"
+     style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.96599996;stroke-miterlimit:4;stroke-dasharray:none"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.96599996;stroke-miterlimit:4;stroke-dasharray:none"
+     d="m 10.5,129 0,-2 -2.4999996,0 L 12,122 l 4,5 -2.5,0 0,2 -3,0 z"
+     id="path6193" />
+  <path
+     id="path6195"
+     d="m 10.5,135 0,2 -2.4999996,0 L 12,142 l 4,-5 -2.5,0 0,-2 -3,0 z"
+     style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.96599996;stroke-miterlimit:4;stroke-dasharray:none"
+     inkscape:connector-curvature="0" />
+  <path
+     sodipodi:type="star"
+     style="fill:#4d4d4d;fill-opacity:0.90196078;stroke:#d3d3d3;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
+     id="path4500"
+     sodipodi:sides="3"
+     sodipodi:cx="11.55581"
+     sodipodi:cy="60.073242"
+     sodipodi:r1="5.1116104"
+     sodipodi:r2="2.5558052"
+     sodipodi:arg1="0"
+     sodipodi:arg2="1.0471976"
+     inkscape:flatsided="false"
+     inkscape:rounded="0"
+     inkscape:randomized="0"
+     d="m 16.66742,60.073242 -3.833708,2.213392 -3.8337072,2.213393 0,-4.426785 0,-4.426784 3.8337082,2.213392 z"
+     inkscape:transform-center-x="-1.2779026" />
+  <path
+     inkscape:transform-center-x="1.277902"
+     d="m -31.500004,60.073242 -3.833708,2.213392 -3.833707,2.213393 0,-4.426785 0,-4.426784 3.833707,2.213392 z"
+     inkscape:randomized="0"
+     inkscape:rounded="0"
+     inkscape:flatsided="false"
+     sodipodi:arg2="1.0471976"
+     sodipodi:arg1="0"
+     sodipodi:r2="2.5558052"
+     sodipodi:r1="5.1116104"
+     sodipodi:cy="60.073242"
+     sodipodi:cx="-36.611614"
+     sodipodi:sides="3"
+     id="path4502"
+     style="fill:#4d4d4d;fill-opacity:0.90196078;stroke:#d3d3d3;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
+     sodipodi:type="star"
+     transform="scale(-1,1)" />
+  <path
+     d="m 16.66742,60.073212 -3.833708,2.213392 -3.8337072,2.213392 0,-4.426784 0,-4.426785 3.8337082,2.213392 z"
+     inkscape:randomized="0"
+     inkscape:rounded="0"
+     inkscape:flatsided="false"
+     sodipodi:arg2="1.0471976"
+     sodipodi:arg1="0"
+     sodipodi:r2="2.5558052"
+     sodipodi:r1="5.1116104"
+     sodipodi:cy="60.073212"
+     sodipodi:cx="11.55581"
+     sodipodi:sides="3"
+     id="path4504"
+     style="fill:#4d4d4d;fill-opacity:0.90196078;stroke:#d3d3d3;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
+     sodipodi:type="star"
+     transform="matrix(0,1,-1,0,72.0074,71.7877)"
+     inkscape:transform-center-y="1.2779029" />
+  <path
+     inkscape:transform-center-y="-1.2779026"
+     transform="matrix(0,-1,-1,0,96,96)"
+     sodipodi:type="star"
+     style="fill:#4d4d4d;fill-opacity:0.90196078;stroke:#d3d3d3;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
+     id="path4506"
+     sodipodi:sides="3"
+     sodipodi:cx="11.55581"
+     sodipodi:cy="60.073212"
+     sodipodi:r1="5.1116104"
+     sodipodi:r2="2.5558052"
+     sodipodi:arg1="0"
+     sodipodi:arg2="1.0471976"
+     inkscape:flatsided="false"
+     inkscape:rounded="0"
+     inkscape:randomized="0"
+     d="m 16.66742,60.073212 -3.833708,2.213392 -3.8337072,2.213392 0,-4.426784 0,-4.426785 3.8337082,2.213392 z" />
+  <path
+     sodipodi:nodetypes="cccc"
+     inkscape:connector-curvature="0"
+     id="path4615-5"
+     d="m 171.82574,65.174193 16.34854,0 -8.17427,-13.348454 z"
+     style="fill:#fbb917;fill-opacity:1;fill-rule:evenodd;stroke:#fbb917;stroke-width:1.65161395;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+  <path
+     style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 179,55 0,6 2,0 0,-6"
+     id="path4300"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccc" />
+  <path
+     style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 179,62 0,2 2,0 0,-2"
+     id="path4300-6"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccc" />
+  <path
+     style="fill:#ffffff;fill-opacity:0.8;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:0.8"
+     d="M 99.994369,113.0221 102,114.98353 l 7,-6.9558 3,0.97227 2,-1 1,-2 0,-3 -3,3 -3,-3 3,-3 -3,0 -2,1 -1,2 0.99437,3.0221 z"
+     id="path4268"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccccccccccccccc" />
+  <rect
+     id="rect4175-3-5"
+     height="16"
+     width="16"
+     y="4"
+     x="220"
+     style="fill:#4c4c4c;fill-opacity:1;stroke:none;stroke-width:0" />
+  <path
+     style="fill:#ffffff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 234,6 0,2 -5,5 0,5 -2,0 0,-5 -5,-5 0,-2"
+     id="path3546"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccccccc" />
+  <g
+     transform="matrix(1.3333328,0,0,-1.5999992,-139.9999,127.19999)"
+     id="g4383-6">
+    <rect
+       id="rect4385-2"
+       height="1.2499905"
+       width="5.9999924"
+       y="12.625005"
+       x="198.00002"
+       style="fill:#ffffff;fill-opacity:0.8;stroke:#000000;stroke-width:0" />
+    <rect
+       style="fill:#ffffff;fill-opacity:0.8;stroke:#000000;stroke-width:0"
+       x="198.00002"
+       y="15.125007"
+       width="7.4999928"
+       height="1.2499949"
+       id="rect4387-9" />
+    <rect
+       style="fill:#ffffff;fill-opacity:0.8;stroke:#000000;stroke-width:0"
+       x="198.00002"
+       y="7.6250024"
+       width="2.9999909"
+       height="1.2499905"
+       id="rect4389-1-0" />
+    <rect
+       style="fill:#ffffff;fill-opacity:0.8;stroke:#000000;stroke-width:0"
+       x="198.00002"
+       y="10.125004"
+       width="4.4999919"
+       height="1.2499905"
+       id="rect4389-1-9" />
+    <path
+       style="fill:#ffffff;fill-opacity:0.8;fill-rule:evenodd;stroke:none;stroke-width:0.68465352px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 207.00001,16.375004 0,-5.625005 -2.25,0 3,-3.1250014 3,3.1250014 -2.25,0 0,5.625005 -1.5,0"
+       id="path4402"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccccccc" />
+  </g>
+  <path
+     style="fill:#ffffff;fill-opacity:0.8;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 164,100 0,3 -6,6 0,7 -4,0 0,-7 -6,-6 0,-3"
+     id="path3546-2-2"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccccccc" />
+</svg>

文件差異過大導致無法顯示
+ 7866 - 0
src/web/res/jsoneditor/js/jsoneditor.js


+ 113 - 0
src/web/templates/admin/jsoneditor.html

@@ -0,0 +1,113 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>JSONEditor | Switch mode</title>
+
+  <!-- when using the mode "code", it's important to specify charset utf-8 -->
+  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+  <link href="/res/jsoneditor/css/jsoneditor.css" rel="stylesheet" type="text/css">
+  <script src="/res/jsoneditor/js/jsoneditor.js"></script>
+  <script src="/res/bower_components/jquery/dist/jquery.min.js"></script>
+
+  <style type="text/css">
+    body {
+      font: 10.5pt arial;
+      color: #4d4d4d;
+      line-height: 150%;
+      width: 500px;
+    }
+    code {
+      background-color: #f5f5f5;
+    }
+
+    #jsoneditor {
+      width: 440px;
+      height:400px;
+    }
+  </style>
+</head>
+<body>
+<div id="jsoneditor"></div>
+<script>
+  	var container = document.getElementById('jsoneditor');
+ 	var options = {
+    	mode: 'code',
+    	modes: ['code', 'tree'], // allowed modes
+    	onError: function (err) {
+      	alert(err.toString());
+    	}
+  	};
+	var content = {{.data.content}}
+	var editor =  new JSONEditor(container, options, content);
+	//编辑保存
+	window.parent.document.getElementById('savedata').onclick = function () {
+	   	var newcontent = editor.getText().replace(/[\\n\s]*/g,"");
+		var oldcontent=JSON.stringify(content)
+		var sy = document.getElementById('errorjson').style.display;
+		if(newcontent == "" || newcontent == oldcontent || sy == "block"){
+			alert("表单填写不完整或内容未修改!");
+				return false;
+		}
+		$.ajax({
+			url:"/admin/onetag/edit",
+			type:"post",
+			data:{"_id":{{.data._id}},"content":newcontent,"tp":{{.data.type}}},
+			success:function(r){
+				if(r.rep){
+					//调用父页面的方法刷新页面,关闭模态框
+					window.parent.modalout("edit");
+				}else{
+					alert("保存失败");
+				}
+			}
+		})
+    };
+	
+	window.parent.document.getElementById('addonesave').onclick = function () {
+		var tp = window.parent.tp;
+		var pratagname = window.parent.pratagname;
+		var username = window.parent.username;
+		var version = window.parent.version;
+		var tagname =$("#addone-name",parent.document).val(); //字符串
+		var tagareaname =$("#addone-area",parent.document).val();//区域
+		var name = "";
+		var content = ""
+		$("#ace_text-edittext .ace_line_group").each(function(i){
+			content = content + $(this).find(".ace_line").text();
+        })
+		content = content.replace(/\s+/g,"");
+		if(content == "" || content == "[]" || content == "{}"){
+			alert("表单填写不完整!");
+				return false;
+		}
+		if(tagname == undefined){//选择区域
+			if(tagareaname == ""){
+				alert("表单填写不完整!");
+				return false;
+			}
+			name = tagareaname;
+		}else{//字符串
+			if(tagname == ""){
+				alert("表单填写不完整!");
+				return false;
+			}
+			name = tagname
+		}
+		$.ajax({
+			url:"/admin/onetag/save",
+			type:"post",
+			data:{"pratagname":pratagname,"name":name,"version":version,"tp":tp,
+			"content":content,"username":username},
+			success:function(r){
+				if(r.rep){
+					window.parent.modalout("create");
+				}else{
+					alert("保存失败");
+				}
+			}
+		})
+    };
+</script>
+
+</body>
+</html>

+ 237 - 0
src/web/templates/admin/onetag.html

@@ -0,0 +1,237 @@
+{{template "inc"}}
+<!-- Main Header -->
+{{template "header"}}
+<!-- Left side column. 权限菜单 -->
+{{template "memu"}}
+	<!--<link href="../res/jsoneditor/css/jsoneditor.css" rel="stylesheet" type="text/css">-->
+ 	<!-- <script src="../res/jsoneditor/js/jsoneditor.js"></script>-->
+	<!--<script src="../res/js/jsonformat.js"></script>-->
+<!-- Content Wrapper. Contains page content -->
+<div class="content-wrapper">
+	<section class="content-header">
+		<h1>
+			<small><button class="btn btn-primary createOneTag" onclick='createOneTag("")'>新建<span style="color:#212d33">{{.tagname}}</span>标签</button></small>
+		</h1>
+		<ol class="breadcrumb">
+		  <li><a href="/admin/version"><i class="fa fa-dashboard"></i> 版本控制</a></li>
+		  <li><a href="/admin/version">版本管理</a></li>
+		  <li><a href="/admin/tag?version={{.version}}">标签库</a></li>
+		  <li class="active"><a href="#">{{.tagname}}</a></li>
+		</ol>
+    </section>
+  <!-- Main content -->
+  <section class="content">
+      <div class="row">
+	      <div class="col-xs-12">
+	        <div class="box">
+		        <div class="box-body">
+		            <table id="dataTagTable" class="table table-bordered table-hover">
+		              <thead>
+		              <tr>
+		                <th>名称</th>
+						<th>创建人</th>
+						<th>创建时间</th>
+						<th>类型</th>
+						<th>内容</th>
+						<th>操作</th>
+		              </tr>
+		              </thead>
+		            </table>
+		        </div>
+	          <!-- /.box-body -->
+	        </div>
+        <!-- /.box -->
+		</div>
+	</div>
+  </section>
+
+</div>
+<!--新增标签--> 
+<div class="modal fade" id="modal-info-addonetag">
+  	<div class="modal-dialog">
+	    <form id="addone-dataform" class="form-horizontal" role="form">
+		<div class="modal-content">
+		    <div class="modal-header">
+		        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+		          <span aria-hidden="true">&times;</span></button>
+		        <h4 class="modal-title">{{.tagname}}信息</h4>
+		    </div>
+		    <div class="modal-body">
+				{{if eq .tp "字符串" "正则"}}
+		     	<div class="form-group">
+				    <label for="code" class="col-sm-2 control-label">名称:</label>
+				    <div class="col-sm-10">
+				      <input id="addone-name" type="text" class="form-control" placeholder="请输名称">
+				    </div>
+				</div>
+				{{else if eq .tp "地区"}}
+				<div class="form-group">
+				    <label for="code" class="col-sm-2 control-label">省/直辖市:</label>
+				    <div class="col-sm-10">
+					   	<select class="form-control" id="addone-area"></select>
+					</div>
+					<!--<span class="modifyCheck hide check">请选择</span>-->
+				</div>
+				{{end}}
+				<div class="form-group">
+				    <label for="code" class="col-sm-2 control-label">版本:</label>
+				    <div class="col-sm-10">
+				      <input id="addone-version" type="text" value="{{.version}}" class="form-control" disabled>
+				    </div>
+				</div>
+				<div class="form-group">
+				    <label for="code" class="col-sm-2 control-label">内容:</label>
+				    <div class="col-sm-10">
+				     <iframe id="childframe2" src="/admin/onetag/jsonhtml" style="width: 470px;height: 400px;"></iframe>
+				    </div>
+				</div>
+		    </div>
+		    <div class="modal-footer">
+		        <button type="button" class="btn btn-default" data-dismiss="modal" onclick="reset()">取消</button>
+		        <button type="button" class="btn btn-primary" id="addonesave">保存</button>
+	    	</div>
+		</div>
+	    <!-- /.modal-content -->
+	    </form>
+  	</div>
+  <!-- /.modal-dialog -->
+</div>
+<!-- /.modal -->
+<!--编辑标签--> 
+<div class="modal fade" id="modal-info-editonetag">
+  	<div class="modal-dialog">
+	    <form id="editone-dataform" class="form-horizontal" role="form">
+		<div class="modal-content">
+		    <div class="modal-header">
+		        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+		          <span aria-hidden="true">&times;</span></button>
+		        <h4 class="modal-title">{{.tagname}}信息</h4>
+		    </div>
+		    <div class="modal-body">
+		     	<div class="form-group">
+				    <label for="code" class="col-sm-2 control-label">名称:</label>
+				    <div class="col-sm-10">
+				      <input id="editone-name" type="text" class="form-control" disabled>
+				    </div>
+				</div>
+				<div class="form-group">
+				    <label for="code" class="col-sm-2 control-label">内容:</label>
+				    <div class="col-sm-10">
+				     <iframe id="childframe" src="/admin/onetag/jsonhtml" style="width: 470px;height: 400px;"></iframe>
+				    </div>
+				</div>
+		    </div>
+		    <div class="modal-footer">
+		        <button type="button" class="btn btn-default" data-dismiss="modal" onclick="reset()">取消</button>
+		        <button type="button" class="btn btn-primary" id="savedata">保存</button>
+	    	</div>
+			<!--<div class="modal-footer">
+		         <input id="editone-id" type="hidden" class="form-control" name="_id">
+	    	</div>-->
+		</div>
+	    <!-- /.modal-content -->
+	    </form>
+  	</div>
+  <!-- /.modal-dialog -->
+</div>
+<!-- /.modal -->
+
+<!-- footer -->
+{{template "footer"}}
+
+<script>
+menuActive("version")
+var ttableonetag
+var tp = {{.tp}};
+var pratagname = {{.tagname}};
+var version = {{ .version}};
+var username = {{index (session "user") "name" }};
+$(function () {
+	ttableonetag=$('#dataTagTable').DataTable({
+		"lengthChange": false,
+		"searching"   : true,
+		"ordering"    : false,
+		"info"        : true,
+		"autoWidth"   : false,
+		"paging"	  : true,
+		
+		"ajax": {
+			"url": "/admin/onetag/data",
+			"type": "post",
+			"data":{"version":{{ .version}},"tagname":{{.tagname}} }
+		 },
+		"language": {
+            "url": "../res/dist/js/dataTables.chinese.lang"
+        },
+		{{if eq .tp "地区"}}
+		"columnDefs": [
+				{ "targets": 4 ,"bVisible": false} //隐藏列
+			],
+		{{end}}
+		"columns": [
+            { "data": "name"},
+			{ "data": "creater"},
+			{ "data": "intime"},
+			{ "data": "type"},
+			{ "data": "content"},
+			{ "data": "_id",render:function(val,a,row){
+				return  "<a href='#' onclick=\"editonetag('"+val+"','"+row["name"]+"')\"><i class='fa fa-fw fa-edit text-yellow'></i></a> &nbsp;"+
+						"<a href='#' onclick='delonetag(\""+val+"\")'><i class='fa fa-fw fa-trash text-red'></i></a>"
+			}}
+       	]
+	});
+	//ttableonetag.on('init.dt', function () {});
+})
+
+//编辑
+var content = ""
+function editonetag(_id,name){
+	$("#childframe").attr("src","/admin/onetag/jsonhtml?_id="+_id)
+	$("#editone-name").val(name);
+	$("#modal-info-editonetag").modal("show");
+}
+
+//子页面调用父页面的modalout方法关闭模态框,刷新页面
+function modalout(param){
+	if(param == "edit"){
+		$("#editone-dataform")[0].reset();
+		$("#modal-info-editonetag").modal("hide");
+	}else{
+		$("#addone-dataform")[0].reset();
+		$("#modal-info-addonetag").modal("hide");
+	}
+	ttableonetag.ajax.reload();
+}
+
+//删除标签
+function delonetag(_id){
+	showConfirm("确定删除?", function() {
+		$.ajax({
+			url:"/admin/onetag/del",
+			type:"post",
+			data:{"_id":_id},
+			success:function(r){
+				if(r.rep){				
+					ttableonetag.ajax.reload();
+				}else{
+					showTip("删除失败", 1000, function() {});
+				}
+			}
+		})
+	});
+}
+
+//创建标签
+function createOneTag(){
+	{{if eq .tp "地区"}}
+	var area = ["北京市","浙江省","江西省","湖北省","山西省","吉林省","海南省","甘肃省","河北省","广东省","重庆市","陕西省","辽宁省","山东省","河南省","云南省","台湾省","天津市","福建省","贵州省","江苏省","上海市","安徽省","湖南省","四川省","青海省","黑龙江省","西藏自治区","新疆维吾尔自治区","内蒙古自治区","宁夏回族自治区","澳门特别行政区","广西壮族自治区","香港特别行政区"];
+	$("#addone-area").empty();
+	$("#addone-area").append("<option value=''>--请选择--</option>");
+	for(var i in area){
+		$("#addone-area").append("<option value='"+area[i]+"'>"+area[i]+"</option>");
+	}
+	{{end}}
+	$("#childframe2").attr("src","/admin/onetag/jsonhtml?_id=")
+	$("#modal-info-addonetag").modal("show");
+}
+</script>

+ 41 - 56
src/web/templates/admin/rule_taglist.html → src/web/templates/admin/rule_arealist.html

@@ -8,7 +8,7 @@
 <div class="content-wrapper">
 	<section class="content-header">
 		<h1>
-			<small><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-info-addtag">新增标签</button></small>
+			<small><button class="btn btn-primary createAreaTag" onclick='createAreaTag("")'>新建标签</button></small>
 		</h1>
 		<ol class="breadcrumb">
 		  <li><a href="/admin/version"><i class="fa fa-dashboard"></i> 版本控制</a></li>
@@ -22,10 +22,10 @@
 	      <div class="col-xs-12">
 	        <div class="box">
 		        <div class="box-body">
-		            <table id="dataTable" class="table table-bordered table-hover">
+		            <table id="dataAreaTable" class="table table-bordered table-hover">
 		              <thead>
 		              <tr>
-		                <th>名称</th>
+		                <th>省/直辖市</th>
 						<th>创建人</th>
 						<th>创建时间</th>
 						<th>类型</th>
@@ -43,9 +43,9 @@
   </section>
 </div>
 <!--新增标签--> 
-<div class="modal fade" id="modal-info-addtag">
+<div class="modal fade" id="modal-info-areaAddTag">
   	<div class="modal-dialog">
-	    <form id="add-dataform" class="form-horizontal" role="form">
+	    <form id="areaAdd-dataform" class="form-horizontal" role="form">
 		<div class="modal-content">
 		    <div class="modal-header">
 		        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
@@ -54,34 +54,22 @@
 		    </div>
 		    <div class="modal-body">
 		     	<div class="form-group">
-				    <label for="code" class="col-sm-2 control-label">名称:</label>
+				    <label for="code" class="col-sm-2 control-label">省/直辖市:</label>
 				    <div class="col-sm-10">
-				      <input id="add-name" type="text" class="form-control" placeholder="请输名称">
-				    </div>
+					   	<select class="form-control" id="areaAdd-area"></select>
+					</div>
+					<span class="modifyCheck hide check">--请选择--</span>
 				</div>
 				<div class="form-group">
 				    <label for="code" class="col-sm-2 control-label">版本:</label>
 				    <div class="col-sm-10">
-				      <input id="add-version" type="text" value="{{.version}}" class="form-control" disabled>
-				    </div>
-				</div>
-				<div class="form-group">
-				    <label for="code" class="col-sm-2 control-label">类型:</label>
-				    <div class="col-sm-10" id="add-checkbox">
-				      <input type="radio" name="tp" id="add-str" value="str">字符串</input>&nbsp;&nbsp;&nbsp;&nbsp;
-					  <input type="radio" name="tp" id="add-reg" value="reg">正则</input>
+				      <input id="areaAdd-version" type="text" value="{{.version}}" class="form-control" disabled>
 				    </div>
 				</div>
-				<div class="form-group">
-				    <label for="code" class="col-sm-2 control-label">内容:</label>
-				    <div class="col-sm-10">
-				      <textarea id="add-content" class="form-control" placeholder="内容"></textarea>
-					</div>
-				</div>
 		    </div>
 		    <div class="modal-footer">
 		        <button type="button" class="btn btn-default" data-dismiss="modal" onclick="reset()">取消</button>
-		        <button type="button" class="btn btn-primary" onclick="addsave()">保存</button>
+		        <button type="button" class="btn btn-primary" onclick="areaAddsave()">保存</button>
 	    	</div>
 		</div>
 	    <!-- /.modal-content -->
@@ -91,9 +79,9 @@
 </div>
 <!-- /.modal -->
 <!--编辑标签--> 
-<div class="modal fade" id="modal-info-edittag">
+<div class="modal fade" id="modal-info-areaEditTag">
   	<div class="modal-dialog">
-	    <form id="edit-dataform" class="form-horizontal" role="form">
+	    <form id="areaEdit-dataform" class="form-horizontal" role="form">
 		<div class="modal-content">
 		    <div class="modal-header">
 		        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
@@ -104,22 +92,22 @@
 		     	<div class="form-group">
 				    <label for="code" class="col-sm-2 control-label">名称:</label>
 				    <div class="col-sm-10">
-				      <input id="edit-name" type="text" class="form-control" disabled>
+				      <input id="areaEdit-name" type="text" class="form-control" disabled>
 				    </div>
 				</div>
 				<div class="form-group">
 				    <label for="code" class="col-sm-2 control-label">内容:</label>
 				    <div class="col-sm-10">
-				      <textarea id="edit-content" class="form-control" placeholder="内容"></textarea>
+				      <textarea id="areaEdit-content" class="form-control" placeholder="内容"></textarea>
 					</div>
 				</div>
 		    </div>
 		    <div class="modal-footer">
 		        <button type="button" class="btn btn-default" data-dismiss="modal" onclick="reset()">取消</button>
-		        <button type="button" class="btn btn-primary" onclick="editsave()">保存</button>
+		        <button type="button" class="btn btn-primary" onclick="areaEditsave()">保存</button>
 	    	</div>
 			<div class="modal-footer">
-		         <input id="edit-id" type="hidden" class="form-control" name="_id">
+		         <input id="areaEdit-id" type="hidden" class="form-control" name="_id">
 	    	</div>
 		</div>
 	    <!-- /.modal-content -->
@@ -135,8 +123,7 @@
 <script>
 menuActive("version")
 $(function () {
-	ttabletag=$('#dataTable').DataTable({
-		"paging"      : false,
+	ttableAreatag=$('#dataAreaTable').DataTable({
 		"lengthChange": false,
 		"searching"   : true,
 		"ordering"    : false,
@@ -145,7 +132,7 @@ $(function () {
 		"paging"	  : true,
 		
 		"ajax": {
-			"url": "/admin/ruletag/data",
+			"url": "/admin/rulearea/data",
 			"type": "post",
 			"data":{"version":{{ .version}} }
 		 },
@@ -164,38 +151,36 @@ $(function () {
 			}}
        	]
 	});
-	//ttabletag.on('init.dt', function () {});
+	//ttableAreatag.on('init.dt', function () {});
 })
+
+
+function createAreaTag(){
+	var area = ["四川","甘肃","台湾","港陆","长达","济钢","黑龙江","包钢","本钢","梅钢","天铁","宝钢","福建","湖南","天钢","泰钢","新疆","昆钢","韶钢","香港","南钢","浙江","河北","云南","北京","江苏","宁夏","山东","莱钢","柳钢","北台","宁钢","华伟","安徽","青海","兆顺","临钢","重钢","上海","吉林","天津","国丰","太钢","春冶","攀钢","重庆","八钢","文丰","沙钢","广西","河南","海南","西和县","澳门","通钢","鞍钢","陕西","马钢","武钢","西城","德龙","首钢","山西","鄂钢","萍钢","安钢","涟钢","湖北","广东","内蒙古","普阳","新金","酒钢","兆泰","新钢","湘钢","西藏","江西","贵州","辽宁","飞达","镇","乡","市","局","厅","滇","辽","沪","浙","皖","闽","赣","鲁","豫","鄂","湘","粤","桂","琼","渝","川","藏","陕","甘","黑","蒙","吉","澳","湾","山","河",]
+	$("#areaAdd-area").empty();
+	$("#areaAdd-area").append("<option value=''>--请选择--</option>");
+	for(var i in area){
+		$("#areaAdd-area").append("<option value='"+area[i]+"'>"+area[i]+"</option>");
+	}
+	$("#modal-info-areaAddTag").modal("show");
+}
+
 //新建保存
-function addsave(){
-	name=$("#add-name").val();
-	version=$("#add-version").val();
-	content=$("#add-content").val();
-	tp = "";
-	$("#add-checkbox input[type=radio]").each(function(){
-		if($(this).prop("checked")){
-			tp = $(this).val();
-		}
-	});
-	if(name==""||content=="" || tp == ""){
-		alert("表单填写不完整!");
+function areaAddsave(){
+	selectVal = $("#areaAdd-area").val();
+	if (selectVal == ""){
+		alert("请选择省/直辖市!");
 		return false;
 	}
-	if(tp == "str"){
-		tp = "字符串";
-	}else{
-		tp = "正则";
-	}
 	$.ajax({
-		url:"/admin/ruletag/save",
+		url:"/admin/rulearea/save",
 		type:"post",
-		data:{"name":name,"version":version,"tp":tp,
-		"content":content,"username":{{index (session "user") "name" }}},
+		data:{"selectVal":selectVal},
 		success:function(r){
 			if(r.rep){
 				$("#add-dataform")[0].reset();
 				$("#modal-info-addtag").modal("hide");
-				ttabletag.ajax.reload();
+				ttableAreatag.ajax.reload();
 			}else{
 				$("#add-dataform")[0].reset();
 				$("#modal-info-addtag").modal("hide");
@@ -227,7 +212,7 @@ function editsave(){
 			if(r.rep){
 				$("#edit-dataform")[0].reset();
 				$("#modal-info-edittag").modal("hide");
-				ttabletag.ajax.reload();
+				ttableAreatag.ajax.reload();
 			}else{
 				alert("保存失败");
 			}
@@ -243,7 +228,7 @@ function del(_id){
 			data:{"_id":_id},
 			success:function(r){
 				if(r.rep){				
-					ttabletag.ajax.reload();
+					ttableAreatag.ajax.reload();
 				}else{
 					showTip("删除失败", 1000, function() {});
 				}

+ 194 - 0
src/web/templates/admin/taglist.html

@@ -0,0 +1,194 @@
+{{template "inc"}}
+<!-- Main Header -->
+{{template "header"}}
+<!-- Left side column. 权限菜单 -->
+{{template "memu"}}
+
+<!-- Content Wrapper. Contains page content -->
+<div class="content-wrapper">
+	<section class="content-header">
+		<h1>
+			<small><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-info-addtag">新增标签</button></small>
+		</h1>
+		<ol class="breadcrumb">
+		  <li><a href="/admin/version"><i class="fa fa-dashboard"></i> 版本控制</a></li>
+		  <li><a href="/admin/version">版本管理</a></li>
+		  <li class="active"><a href="#">标签库</a></li>
+		</ol>
+    </section>
+  <!-- Main content -->
+  <section class="content">
+      <div class="row">
+	      <div class="col-xs-12">
+	        <div class="box">
+		        <div class="box-body">
+		            <table id="dataTagTable" class="table table-bordered table-hover">
+		              <thead>
+		              <tr>
+		                <th>名称</th>
+						<th>版本</th>
+						<th>创建人</th>
+						<th>创建时间</th>
+						<th>类型</th>
+						<th>操作</th>
+		              </tr>
+		              </thead>
+		            </table>
+		        </div>
+	          <!-- /.box-body -->
+	        </div>
+        <!-- /.box -->
+		</div>
+	</div>
+  </section>
+</div>
+<!--新增标签--> 
+<div class="modal fade" id="modal-info-addtag">
+  	<div class="modal-dialog">
+	    <form id="add-dataform" class="form-horizontal" role="form">
+		<div class="modal-content">
+		    <div class="modal-header">
+		        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+		          <span aria-hidden="true">&times;</span></button>
+		        <h4 class="modal-title">标签信息</h4>
+		    </div>
+		    <div class="modal-body">
+		     	<div class="form-group">
+				    <label for="code" class="col-sm-2 control-label">名称:</label>
+				    <div class="col-sm-10">
+				      <input id="add-name" type="text" class="form-control" placeholder="请输名称">
+				    </div>
+				</div>
+				<div class="form-group">
+				    <label for="code" class="col-sm-2 control-label">版本:</label>
+				    <div class="col-sm-10">
+				      <input id="add-version" type="text" value="{{.version}}" class="form-control" disabled>
+				    </div>
+				</div>
+				<div class="form-group">
+				   <label for="code" class="col-sm-2 control-label">类型:</label>
+				    <div class="col-sm-10" id="add-checkbox">
+				      <input type="radio" name="tp" id="add-str" value="str">字符串</input>&nbsp;&nbsp;&nbsp;&nbsp;
+					  <input type="radio" name="tp" id="add-reg" value="reg">正则</input>&nbsp;&nbsp;&nbsp;&nbsp;
+					   <input type="radio" name="tp" id="add-area" value="area">地区</input>
+				    </div>
+				</div>
+		    </div>
+		    <div class="modal-footer">
+		        <button type="button" class="btn btn-default" data-dismiss="modal" onclick="reset()">取消</button>
+		        <button type="button" class="btn btn-primary" onclick="addsave()">保存</button>
+	    	</div>
+		</div>
+	    <!-- /.modal-content -->
+	    </form>
+  	</div>
+  <!-- /.modal-dialog -->
+</div>
+<!-- /.modal -->
+
+
+<!-- footer -->
+{{template "footer"}}
+
+<script>
+menuActive("version")
+$(function () {
+	ttabletag=$('#dataTagTable').DataTable({
+		"lengthChange": false,
+		"searching"   : true,
+		"ordering"    : false,
+		"info"        : true,
+		"autoWidth"   : false,
+		"paging"	  : true,
+		
+		"ajax": {
+			"url": "/admin/tag/data",
+			"type": "post",
+			"data":{"version":{{ .version}} }
+		 },
+		"language": {
+            "url": "../res/dist/js/dataTables.chinese.lang"
+        },
+		"columns": [
+            { "data": "tagname",render:function(val,a,row){
+				//return "<a href='#' onclick='searchOneTag(\""+val+"\",\""+row["version"]+"\")'>"+val+"</a>"
+				return '<a href="/admin/onetag?version='+row.version+'&tagname='+row.tagname+'&tp='+row.type+'">'+val+'</a>';
+			}},
+			{ "data": "version"},
+			{ "data": "creater"},
+			{ "data": "intime"},
+			{ "data": "type"},
+			{ "data": "_id",render:function(val,a,row){
+				return  "<a href='#' onclick='del(\""+val+"\")'><i class='fa fa-fw fa-trash text-red'></i></a>"
+				//"<a href='#' onclick='edit(\""+val+"\",\""+row["name"]+"\",\""+row["content"]+"\")'><i class='fa fa-fw fa-edit text-yellow'></i></a> &nbsp;"+
+			}}
+       	]
+	});
+	//ttabletag.on('init.dt', function () {});
+})
+//新建保存
+function addsave(){
+	name=$("#add-name").val();
+	tp = "";
+	$("#add-checkbox input[type=radio]").each(function(){
+		if($(this).prop("checked")){
+			tp = $(this).val();
+		}
+	});
+	version=$("#add-version").val();
+	if(name=="" || tp==""){
+		alert("表单填写不完整!");
+		return false;
+	}
+	if(tp == "str"){
+		tp = "字符串";
+	}else if(tp == "reg"){
+		tp = "正则";
+	}else{
+		tp = "地区";
+	}
+	$.ajax({
+		url:"/admin/tag/save",
+		type:"post",
+		data:{"tagname":name,"tp":tp,"version":version,"username":{{index (session "user") "name" }}},
+		success:function(r){
+			if(r.rep){
+				$("#add-dataform")[0].reset();
+				$("#modal-info-addtag").modal("hide");
+				ttabletag.ajax.reload();
+			}else{
+				$("#add-dataform")[0].reset();
+				$("#modal-info-addtag").modal("hide");
+				alert("保存失败");
+			}
+		}
+	})
+}
+
+//删除
+function del(_id){
+	showConfirm("确定删除?", function() {
+		$.ajax({
+			url:"/admin/tag/del",
+			type:"post",
+			data:{"_id":_id},
+			success:function(r){
+				if(r.rep){				
+					ttabletag.ajax.reload();
+				}else{
+					showTip("删除失败", 1000, function() {});
+				}
+			}
+		})
+	});
+}
+
+//function searchOneTag(tagname,version,type){
+//	$.ajax({
+//			url:"/admin/onetag/searchOneTag",
+//			type:"get",
+//			data:{"tagname":tagname,"version":version,"type":type},
+//		})
+//}
+ 
+</script>

+ 3 - 3
src/web/templates/admin/version.html

@@ -114,7 +114,7 @@ $(function () {
 			"url": "/admin/version/data",
 			"type": "post",
 			"data":{}
-		 },
+		},
 		"language": {
             "url": "../res/dist/js/dataTables.chinese.lang"
         },
@@ -132,12 +132,12 @@ $(function () {
 				}
 				return tmp
 			}},
-			{"data":"_id","width":"25%",render:function(val,a,row){
+			{"data":"_id","width":"30%",render:function(val,a,row){
 				tmp = '<div class="btn-group">'+
 					'<a class="btn btn-sm btn-primary" href="/admin/rulepre?version='+row.version+'">前置规则</a>'+
 					'<a class="btn btn-sm btn-success" href="/admin/ruleback?version='+row.version+'">后置规则</a>'+
 					'<a class="btn btn-sm btn-info" href="/admin/rulelogic?version='+row.version+'">抽取逻辑</a>'+
-					'<a class="btn btn-sm btn-warning" href="/admin/ruletag?version='+row.version+'">标签库</a>';
+					'<a class="btn btn-sm btn-warning" href="/admin/tag?version='+row.version+'">标签库</a>';
 				return  tmp
 			}}
        	]

部分文件因文件數量過多而無法顯示