diff --git a/COMCMS.Web/Areas/AdminCP/Controllers/AttachController.cs b/COMCMS.Web/Areas/AdminCP/Controllers/AttachController.cs index 34adc71..5fbf9c1 100644 --- a/COMCMS.Web/Areas/AdminCP/Controllers/AttachController.cs +++ b/COMCMS.Web/Areas/AdminCP/Controllers/AttachController.cs @@ -49,15 +49,301 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers #region 获取附件所有目录 [HttpPost] - [MyAuthorize("viewlist", "attach","JSON")] + [MyAuthorize("viewlist", "attach", "JSON")] public IActionResult GetDirList(string subdir) { //string attachPath = $"{_env.WebRootPath}{Path.DirectorySeparatorChar}{attach.AttachPatch}{Path.DirectorySeparatorChar}"; + List list = getAllAttach(subdir); + return Json(new { code = 0, message = "success", data = list }); + } + #endregion - + #region 获取指定目录下的文件 + [HttpPost] + [MyAuthorize("viewlist", "attach", "JSON")] + public IActionResult GetFileList(string path) + { + string basePath = $"{_env.WebRootPath}{Path.DirectorySeparatorChar}{attach.AttachPatch}{Path.DirectorySeparatorChar}"; + string currentPath = basePath; + if (!string.IsNullOrEmpty(path)) + { + currentPath = Path.Combine(basePath, path.TrimStart('/').Replace("/", Path.DirectorySeparatorChar.ToString())); + } - //Directory.GetDirectories() - return Json(tip); + if (!Directory.Exists(currentPath)) + { + return Json(new { code = 1, message = "目录不存在" }); + } + + List list = new List(); + DirectoryInfo dir = new DirectoryInfo(currentPath); + + // 获取子目录 + foreach (var d in dir.GetDirectories()) + { + if (d.Name.Equals("_thumbs", StringComparison.OrdinalIgnoreCase)) continue; // 过滤缩略图目录 + list.Add(new AttachFileInfo + { + name = d.Name, + path = (string.IsNullOrEmpty(path) ? "" : path + "/") + d.Name, + updateTime = d.LastWriteTime, + isDir = true, + type = "folder" + }); + } + + // 获取文件 + foreach (var f in dir.GetFiles()) + { + string ext = f.Extension.ToLower(); + string type = "file"; + if (IsImage(ext)) type = "image"; + else if (IsVideo(ext)) type = "video"; + + list.Add(new AttachFileInfo + { + name = f.Name, + path = (string.IsNullOrEmpty(path) ? "" : path + "/") + f.Name, + ext = ext, + size = f.Length, + updateTime = f.LastWriteTime, + isDir = false, + type = type + }); + } + + return Json(new { code = 0, message = "success", data = list }); + } + #endregion + + #region 创建文件夹 + [HttpPost] + [MyAuthorize("add", "attach", "JSON")] + public IActionResult CreateDir(string path, string name) + { + if (string.IsNullOrEmpty(name)) return Json(new { code = 1, message = "文件夹名称不能为空" }); + if (!IsSafeName(name)) return Json(new { code = 1, message = "文件夹名称包含非法字符" }); + + string basePath = $"{_env.WebRootPath}{Path.DirectorySeparatorChar}{attach.AttachPatch}{Path.DirectorySeparatorChar}"; + string currentPath = basePath; + if (!string.IsNullOrEmpty(path)) + { + currentPath = Path.Combine(basePath, path.TrimStart('/').Replace("/", Path.DirectorySeparatorChar.ToString())); + } + + string newDirPath = Path.Combine(currentPath, name); + if (Directory.Exists(newDirPath)) + { + return Json(new { code = 1, message = "文件夹已存在" }); + } + + try + { + Directory.CreateDirectory(newDirPath); + return Json(new { code = 0, message = "创建成功" }); + } + catch (Exception ex) + { + return Json(new { code = 1, message = "创建失败:" + ex.Message }); + } + } + #endregion + + #region 删除文件或文件夹 + [HttpPost] + [MyAuthorize("del", "attach", "JSON")] + public IActionResult DeleteFile(string path, bool isDir) + { + if (string.IsNullOrEmpty(path)) return Json(new { code = 1, message = "路径不能为空" }); + + string basePath = $"{_env.WebRootPath}{Path.DirectorySeparatorChar}{attach.AttachPatch}{Path.DirectorySeparatorChar}"; + string fullPath = Path.Combine(basePath, path.TrimStart('/').Replace("/", Path.DirectorySeparatorChar.ToString())); + + // 安全检查,防止删除基础目录以外的文件 + if (!Path.GetFullPath(fullPath).StartsWith(Path.GetFullPath(basePath))) + { + return Json(new { code = 1, message = "非法路径" }); + } + + try + { + if (isDir) + { + if (Directory.Exists(fullPath)) + { + Directory.Delete(fullPath, true); // 递归删除 + return Json(new { code = 0, message = "删除成功" }); + } + } + else + { + if (System.IO.File.Exists(fullPath)) + { + System.IO.File.Delete(fullPath); + return Json(new { code = 0, message = "删除成功" }); + } + } + return Json(new { code = 1, message = "文件或目录不存在" }); + } + catch (Exception ex) + { + return Json(new { code = 1, message = "删除失败:" + ex.Message }); + } + } + #endregion + + #region 重命名文件或文件夹 + [HttpPost] + [MyAuthorize("edit", "attach", "JSON")] + public IActionResult RenameFile(string path, string newName, bool isDir) + { + if (string.IsNullOrEmpty(path) || string.IsNullOrEmpty(newName)) return Json(new { code = 1, message = "参数不能为空" }); + if (!IsSafeName(newName)) return Json(new { code = 1, message = "新名称包含非法字符" }); + + string basePath = $"{_env.WebRootPath}{Path.DirectorySeparatorChar}{attach.AttachPatch}{Path.DirectorySeparatorChar}"; + string fullPath = Path.Combine(basePath, path.TrimStart('/').Replace("/", Path.DirectorySeparatorChar.ToString())); + + // 安全检查 + if (!Path.GetFullPath(fullPath).StartsWith(Path.GetFullPath(basePath))) + { + return Json(new { code = 1, message = "非法路径" }); + } + + try + { + string parentDir = Path.GetDirectoryName(fullPath); + string newFullPath = Path.Combine(parentDir, newName); + + if (isDir) + { + if (!Directory.Exists(fullPath)) return Json(new { code = 1, message = "原文件夹不存在" }); + if (Directory.Exists(newFullPath)) return Json(new { code = 1, message = "目标文件夹已存在" }); + Directory.Move(fullPath, newFullPath); + } + else + { + if (!System.IO.File.Exists(fullPath)) return Json(new { code = 1, message = "原文件不存在" }); + // 保持扩展名一致性检查(可选,这里简单处理,如果newName没有扩展名则加上原扩展名,或者要求用户输入完整文件名) + // 假设前端传来的 newName 是完整文件名 + if (System.IO.File.Exists(newFullPath)) return Json(new { code = 1, message = "目标文件已存在" }); + System.IO.File.Move(fullPath, newFullPath); + } + return Json(new { code = 0, message = "重命名成功" }); + } + catch (Exception ex) + { + return Json(new { code = 1, message = "重命名失败:" + ex.Message }); + } + } + #endregion + + #region 上传文件 + [HttpPost] + [MyAuthorize("add", "attach", "JSON")] + public async Task UploadFile(string path) + { + // 安全检查:禁止在根目录上传 + if (string.IsNullOrEmpty(path)) + { + return Json(new { code = 1, message = "根目录不允许上传文件,请选择子目录" }); + } + + var files = Request.Form.Files; + if (files == null || files.Count == 0) + { + return Json(new { code = 1, message = "请选择文件" }); + } + + string basePath = $"{_env.WebRootPath}{Path.DirectorySeparatorChar}{attach.AttachPatch}{Path.DirectorySeparatorChar}"; + string currentPath = basePath; + if (!string.IsNullOrEmpty(path)) + { + currentPath = Path.Combine(basePath, path.TrimStart('/').Replace("/", Path.DirectorySeparatorChar.ToString())); + } + + // 安全检查:防止目录遍历 + if (!Path.GetFullPath(currentPath).StartsWith(Path.GetFullPath(basePath))) + { + return Json(new { code = 1, message = "非法路径" }); + } + + if (!Directory.Exists(currentPath)) + { + return Json(new { code = 1, message = "目录不存在" }); + } + + int successCount = 0; + string msg = ""; + + foreach (var file in files) + { + string fileName = file.FileName; + // 安全检查:文件名 + if (!IsSafeName(fileName)) + { + msg += $"文件 {fileName} 名称非法; "; + continue; + } + + // 检查扩展名 + string ext = Path.GetExtension(fileName).ToLower(); + string allowedExts = _attachsetting.FileAllowedExtensions + "," + _attachsetting.ImageAllowedExtensions + "," + _attachsetting.MediaAllowedExtensions; + if (!allowedExts.ToLower().Split(',').Contains(ext.TrimStart('.'))) + { + msg += $"文件 {fileName} 类型不允许; "; + continue; + } + + string fullPath = Path.Combine(currentPath, fileName); + // 如果文件存在,重命名 + if (System.IO.File.Exists(fullPath)) + { + string nameNoExt = Path.GetFileNameWithoutExtension(fileName); + fileName = $"{nameNoExt}_{Utils.GetOrderNum()}{ext}"; + fullPath = Path.Combine(currentPath, fileName); + } + + try + { + using (var stream = new FileStream(fullPath, FileMode.Create)) + { + await file.CopyToAsync(stream); + } + successCount++; + } + catch (Exception ex) + { + msg += $"文件 {fileName} 上传失败: {ex.Message}; "; + } + } + + if (successCount > 0) + { + return Json(new { code = 0, message = $"成功上传 {successCount} 个文件. {msg}" }); + } + else + { + return Json(new { code = 1, message = msg }); + } + } + #endregion + + #region 辅助方法 + private bool IsImage(string ext) + { + return new[] { ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp" }.Contains(ext); + } + + private bool IsVideo(string ext) + { + return new[] { ".mp4", ".avi", ".mov", ".wmv", ".flv", ".mkv" }.Contains(ext); + } + + private bool IsSafeName(string str) + { + if (string.IsNullOrEmpty(str)) return false; + // 允许字母、数字、下划线、中划线、点、中文 + return System.Text.RegularExpressions.Regex.IsMatch(str, @"^[\u4e00-\u9fa5a-zA-Z0-9_\-\.]+$"); } #endregion @@ -76,17 +362,22 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers basePath += subdir.Replace("/", Path.DirectorySeparatorChar.ToString()); } + if (!Directory.Exists(basePath)) return list; + string[] arrDirs = Directory.GetDirectories(basePath); - - if (arrDirs !=null && arrDirs.Length > 0) + + if (arrDirs != null && arrDirs.Length > 0) { foreach (var item in arrDirs) { - string nextSubDir = subdir + "/" + item.Substring(item.LastIndexOf(Path.DirectorySeparatorChar)+1); + string dirName = item.Substring(item.LastIndexOf(Path.DirectorySeparatorChar) + 1); + if (dirName.Equals("_thumbs", StringComparison.OrdinalIgnoreCase)) continue; // 过滤缩略图目录 + + string nextSubDir = string.IsNullOrEmpty(subdir) ? dirName : subdir + "/" + dirName; var tpmList = getAllAttach(nextSubDir); list.Add(new DirInfo() { - name = item.Substring(item.LastIndexOf(Path.DirectorySeparatorChar)+1), + name = dirName, path = nextSubDir, //fullPath = item, subList = tpmList @@ -98,4 +389,22 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers } #endregion } + + public class DirInfo + { + public string name { get; set; } + public string path { get; set; } + public List subList { get; set; } + } + + public class AttachFileInfo + { + public string name { get; set; } + public string path { get; set; } + public string ext { get; set; } + public long size { get; set; } + public DateTime updateTime { get; set; } + public bool isDir { get; set; } + public string type { get; set; } + } } diff --git a/COMCMS.Web/Areas/AdminCP/Controllers/PermissionController.cs b/COMCMS.Web/Areas/AdminCP/Controllers/PermissionController.cs index 5a26dff..9a48f71 100644 --- a/COMCMS.Web/Areas/AdminCP/Controllers/PermissionController.cs +++ b/COMCMS.Web/Areas/AdminCP/Controllers/PermissionController.cs @@ -498,7 +498,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers using (Stream stream = fileProvider.GetFileInfo(logname).CreateReadStream()) { byte[] buffer = new byte[stream.Length]; - await stream.ReadAsync(buffer, 0, buffer.Length); + await stream.ReadExactlyAsync(buffer); detail.Append(Encoding.Default.GetString(buffer)); } diff --git a/COMCMS.Web/Areas/AdminCP/Controllers/UploadController.cs b/COMCMS.Web/Areas/AdminCP/Controllers/UploadController.cs index 4d80269..a23a799 100644 --- a/COMCMS.Web/Areas/AdminCP/Controllers/UploadController.cs +++ b/COMCMS.Web/Areas/AdminCP/Controllers/UploadController.cs @@ -909,7 +909,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers { // 保存为byte[] byte[] byData = new byte[stream.Length]; - stream.Read(byData, 0, byData.Length); + stream.ReadExactly(byData); stream.Dispose(); return byData; } diff --git a/COMCMS.Web/Areas/AdminCP/Views/Attach/AttachList.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Attach/AttachList.cshtml index 601e84a..4e644fc 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Attach/AttachList.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Attach/AttachList.cshtml @@ -1,75 +1,673 @@ -@{ +@using Newtonsoft.Json +@{ ViewBag.title = "附件管理"; + var folderJson = ViewBag.folderJson as string; } + + +
+
+
+
+
+
文件夹
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+
+ +
+ / +
+
+
+
+
+ 松开鼠标上传文件 +
+
+
正在加载...
-
+
+ + + + diff --git a/COMCMS.Web/Areas/AdminCP/Views/Index/Main.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Index/Main.cshtml index 00496ed..9a01aee 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Index/Main.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Index/Main.cshtml @@ -27,7 +27,6 @@ - diff --git a/COMCMS.Web/Areas/AdminCP/Views/Login/Index.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Login/Index.cshtml index f16d4eb..ff016e9 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Login/Index.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Login/Index.cshtml @@ -22,7 +22,8 @@ -
+ +
COMCMS @@ -80,6 +81,89 @@ }; DoAdminLogin("loginForm", rules); }); + // --- 科技感粒子连线动画特效 (原生JS实现,无需引入额外库) --- + (function() { + var canvas = document.getElementById('canvas-bg'); + var ctx = canvas.getContext('2d'); + var width, height; + var particles = []; + + // 特效配置 + var config = { + count: 80, // 粒子数量 + dist: 160, // 连线距离 + radius: 2, // 粒子大小 + color: '26, 179, 148',// 主色调 RGB (#1ab394) + speed: 0.8 // 移动速度 + }; + + function resize() { + width = window.innerWidth; + height = window.innerHeight; + canvas.width = width; + canvas.height = height; + } + + function Particle() { + this.x = Math.random() * width; + this.y = Math.random() * height; + this.vx = (Math.random() - 0.5) * config.speed; + this.vy = (Math.random() - 0.5) * config.speed; + } + + Particle.prototype.update = function() { + this.x += this.vx; + this.y += this.vy; + if (this.x < 0 || this.x > width) this.vx = -this.vx; + if (this.y < 0 || this.y > height) this.vy = -this.vy; + }; + + Particle.prototype.draw = function() { + ctx.beginPath(); + ctx.arc(this.x, this.y, config.radius, 0, Math.PI * 2); + ctx.fillStyle = 'rgba(' + config.color + ', 0.6)'; + ctx.fill(); + }; + + function init() { + resize(); + particles = []; + for (var i = 0; i < config.count; i++) { + particles.push(new Particle()); + } + } + + function animate() { + ctx.clearRect(0, 0, width, height); + + for (var i = 0; i < particles.length; i++) { + var p1 = particles[i]; + p1.update(); + p1.draw(); + + for (var j = i + 1; j < particles.length; j++) { + var p2 = particles[j]; + var dx = p1.x - p2.x; + var dy = p1.y - p2.y; + var dist = Math.sqrt(dx * dx + dy * dy); + + if (dist < config.dist) { + ctx.beginPath(); + ctx.strokeStyle = 'rgba(' + config.color + ',' + (1 - dist / config.dist) * 0.4 + ')'; + ctx.lineWidth = 1; + ctx.moveTo(p1.x, p1.y); + ctx.lineTo(p2.x, p2.y); + ctx.stroke(); + } + } + } + requestAnimationFrame(animate); + } + + window.addEventListener('resize', resize); + init(); + animate(); + })(); diff --git a/COMCMS.Web/Areas/AdminCP/Views/Shared/_CommonLayout.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Shared/_CommonLayout.cshtml index 95611eb..cd2a714 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Shared/_CommonLayout.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Shared/_CommonLayout.cshtml @@ -8,12 +8,12 @@ - + @@ -35,6 +35,7 @@ + @@ -55,6 +56,7 @@ + diff --git a/COMCMS.Web/COMCMS.Web.csproj b/COMCMS.Web/COMCMS.Web.csproj index 732e763..c38ffa9 100644 --- a/COMCMS.Web/COMCMS.Web.csproj +++ b/COMCMS.Web/COMCMS.Web.csproj @@ -390,8 +390,6 @@ - - diff --git a/COMCMS.Web/Controllers/HomeController.cs b/COMCMS.Web/Controllers/HomeController.cs index e9d364b..280d4a2 100644 --- a/COMCMS.Web/Controllers/HomeController.cs +++ b/COMCMS.Web/Controllers/HomeController.cs @@ -154,10 +154,7 @@ namespace COMCMS.Web.Controllers string sqlname = "comcms_sqlserver.sql"; if (sqltype == "mysql") { - if (mysqltype == "linux") - sqlname = "comcms_for_linux.sql"; - else - sqlname = "comcms_for_windows.sql"; + sqlname = "comcms_mysql.sql"; } string sqlPath = $"{_env.WebRootPath}{Path.DirectorySeparatorChar}install{Path.DirectorySeparatorChar}"; diff --git a/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/dialogs/html5video.js b/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/dialogs/html5video.js index ada03ec..de5407e 100644 --- a/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/dialogs/html5video.js +++ b/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/dialogs/html5video.js @@ -38,6 +38,31 @@ CKEDITOR.dialog.add( 'html5video', function( editor ) { hidden: true, filebrowser: 'info:url' } ] + }, + { + type: 'hbox', + widths: [ '365px', '110px' ], + align: 'right', + children: [ { + type: 'text', + id: 'poster', + label: editor.lang.html5video.poster, + setup: function( widget ) { + this.setValue( widget.data.poster ); + }, + commit: function( widget ) { + widget.setData( 'poster', this.getValue() ); + } + }, + { + type: 'button', + id: 'browsePoster', + style: 'display:inline-block;margin-top:14px;', + align: 'center', + label: editor.lang.common.browseServer, + hidden: true, + filebrowser: 'info:poster' + } ] } ] }, { @@ -126,6 +151,20 @@ CKEDITOR.dialog.add( 'html5video', function( editor ) { filebrowser: 'info:url', label: editor.lang.html5video.btnUpload, 'for': [ 'Upload', 'upload' ] + }, + { + type: 'file', + id: 'uploadPoster', + label: editor.lang.html5video.posterUpload, + style: 'height:40px', + size: 38 + }, + { + type: 'fileButton', + id: 'uploadButtonPoster', + filebrowser: 'info:poster', + label: editor.lang.html5video.btnUpload, + 'for': [ 'Upload', 'uploadPoster' ] } ] }, { diff --git a/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/lang/en.js b/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/lang/en.js index 88b54e3..e74ffea 100644 --- a/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/lang/en.js +++ b/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/lang/en.js @@ -11,5 +11,7 @@ CKEDITOR.plugins.setLang( 'html5video', 'en', { autoplay: 'Autoplay?', yes: 'Yes', no: 'No', - responsive: 'Responsive width' + responsive: 'Responsive width', + poster: 'Poster image', + posterUpload: 'Upload poster image' } ); diff --git a/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/lang/zh-cn.js b/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/lang/zh-cn.js index 559236c..265902d 100644 --- a/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/lang/zh-cn.js +++ b/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/lang/zh-cn.js @@ -11,5 +11,7 @@ CKEDITOR.plugins.setLang('html5video', 'zh-cn', { autoplay: '自动播放?', yes: '是', no: '否', - responsive: '响应式宽度' + responsive: '响应式宽度', + poster: '封面图', + posterUpload: '上传封面图' }); diff --git a/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/plugin.js b/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/plugin.js index bbf057c..5d85a17 100644 --- a/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/plugin.js +++ b/COMCMS.Web/wwwroot/editor/ckeditor/plugins/html5video/plugin.js @@ -11,7 +11,7 @@ CKEDITOR.plugins.add( 'html5video', { * - div-s with text-align,float,margin-left,margin-right inline style rules and required ckeditor-html5-video class. * - video tags with src, controls, width and height attributes. */ - allowedContent: 'div[data-responsive](!ckeditor-html5-video){text-align,float,margin-left,margin-right}; video[src,controls,autoplay,width, height]{max-width,height};', + allowedContent: 'div[data-responsive](!ckeditor-html5-video){text-align,float,margin-left,margin-right}; video[src,controls,autoplay,width,height,poster]{max-width,height};', requiredContent: 'div(ckeditor-html5-video); video[src,controls];', upcast: function( element ) { return element.name === 'div' && element.hasClass( 'ckeditor-html5-video' ); @@ -21,6 +21,7 @@ CKEDITOR.plugins.add( 'html5video', { var src = ''; var autoplay = ''; var align = this.element.getStyle( 'text-align' ); + var poster = ''; var width = ''; var height = ''; @@ -32,6 +33,7 @@ CKEDITOR.plugins.add( 'html5video', { width = this.element.getChild( 0 ).getAttribute( 'width' ); height = this.element.getChild( 0 ).getAttribute( 'height' ); autoplay = this.element.getChild( 0 ).getAttribute( 'autoplay' ); + poster = this.element.getChild( 0 ).getAttribute( 'poster' ); responsive = this.element.getAttribute( 'data-responsive' ); } @@ -55,7 +57,11 @@ CKEDITOR.plugins.add( 'html5video', { if ( autoplay ) { this.setData( 'autoplay', 'yes' ); } - + + if ( poster ) { + this.setData('poster', poster); + } + if ( responsive ) { this.setData( 'responsive', responsive ); } @@ -76,6 +82,7 @@ CKEDITOR.plugins.add( 'html5video', { this.element.getChild( 0 ).setAttribute( 'src', this.data.src ); if (this.data.width) this.element.getChild( 0 ).setAttribute( 'width', this.data.width ); if (this.data.height) this.element.getChild( 0 ).setAttribute( 'height', this.data.height ); + if (this.data.poster) this.element.getChild( 0 ).setAttribute( 'poster', this.data.poster ); if ( this.data.responsive ) { this.element.setAttribute("data-responsive", this.data.responsive); diff --git a/COMCMS.Web/wwwroot/hplus/css/login.css b/COMCMS.Web/wwwroot/hplus/css/login.css index ce3f143..d59622a 100644 --- a/COMCMS.Web/wwwroot/hplus/css/login.css +++ b/COMCMS.Web/wwwroot/hplus/css/login.css @@ -1,93 +1,129 @@ -html{height: 100%;} -body.signin { - background: #18c8f6; - height: auto; - background:url("../img/login-background.jpg") no-repeat center fixed; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; - color: rgba(255,255,255,.95); +/* login-tech.css */ + +/* ¶¨ÒåÖ÷ɫµ÷±äÁ¿ */ +:root { + --primary-color: #1ab394; + --primary-glow: rgba(26, 179, 148, 0.5); + --bg-dark: #0f1319; + --text-color: #e0e0e0; } -.signinpanel { - width: 750px; - margin: 10% auto 0 auto; +body.gray-bg { + background: var(--bg-dark); + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + color: var(--text-color); + overflow: hidden; /* ·Àֹ¹ö¶¯Ìõ³öÏÖ */ } -.signinpanel .logopanel { +/* ¶¯̬±³¾° Canvas */ +#canvas-bg { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -1; +} + +/* µÇ¼¿òÖ÷Ìå - ë²£Á§ÌØЧ */ +.middle-box { + background: rgba(255, 255, 255, 0.05); + backdrop-filter: blur(10px); /* ë²£Á§ģºý */ + -webkit-backdrop-filter: blur(10px); + padding: 40px; + border-radius: 10px; + border: 1px solid rgba(255, 255, 255, 0.1); + box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); + margin: 50px auto auto auto; /* µ÷Õû´¹ֱλÖà */ + max-width: 400px; + width: 100%; float: none; - width: auto; - padding: 0; - background: none; + /* display: inline-block;*/ + position: relative; + z-index: 10; + top: 50px } -.signinpanel .signin-info ul { - list-style: none; - padding: 0; - margin: 20px 0; +/* ±êÌâÑùʽ */ +.logo-name { + color: var(--primary-color); + font-size: 60px; + font-weight: 800; + letter-spacing: 2px; + margin-bottom: 10px; + text-shadow: 0 0 10px var(--primary-glow); } -.signinpanel .form-control { - display: block; - margin-top: 15px; +.middle-box h3 { + color: #fff; + font-weight: 300; + margin-bottom: 30px; } -.signinpanel .uname { - background: #fff url(../img/user.png) no-repeat 95% center;color:#333; +/* ÊäÈë¿òÖØд - ¿Ƽ¼¸ÐÏ»®Ï߷ç¸ñ */ +.form-control { + background-color: transparent !important; + border: none; + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 0; + color: #fff !important; + box-shadow: none; + padding-left: 0; + transition: all 0.3s ease; + height: 40px; } -.signinpanel .pword { - background: #fff url(../img/locked.png) no-repeat 95% center;color:#333; -} - -.signinpanel .btn { - margin-top: 15px; -} - -.signinpanel form { - background: rgba(255, 255, 255, 0.2); - border: 1px solid rgba(255,255,255,.3); - -moz-box-shadow: 0 3px 0 rgba(12, 12, 12, 0.03); - -webkit-box-shadow: 0 3px 0 rgba(12, 12, 12, 0.03); - box-shadow: 0 3px 0 rgba(12, 12, 12, 0.03); - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - padding: 30px; -} - -.signup-footer{border-top: solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top: 15px;} - -@media screen and (max-width: 768px) { - .signinpanel, - .signuppanel { - margin: 0 auto; - width: 420px!important; - padding: 20px; - } - .signinpanel form { - margin-top: 20px; - } - .signup-footer { - margin-bottom: 10px; - } - .signuppanel .form-control { - margin-bottom: 10px; - } - .signup-footer .pull-left, - .signup-footer .pull-right { - float: none !important; - text-align: center; - } - .signinpanel .signin-info ul { - display: none; + .form-control:focus { + border-bottom: 1px solid var(--primary-color); + box-shadow: 0 1px 0 0 var(--primary-glow); + color: #fff; } + +/* Õë¶Ôä¯ÀÀÆ÷×Զ¯Ìî³䱳¾°ɫµÄ Hack */ +input:-webkit-autofill, +input:-webkit-autofill:hover, +input:-webkit-autofill:focus, +input:-webkit-autofill:active { + -webkit-box-shadow: 0 0 0 30px #151a23 inset !important; + -webkit-text-fill-color: white !important; + transition: background-color 5000s ease-in-out 0s; } -@media screen and (max-width: 320px) { - .signinpanel, - .signuppanel { - margin:0 20px; - width:auto; + +.form-control::-webkit-input-placeholder { + color: rgba(255,255,255,0.4); +} + +.form-control:-moz-placeholder { + color: rgba(255,255,255,0.4); +} + +/* Ñé֤ÂëÊäÈë¿òµ÷Õû */ +.input-group-addon { + background: transparent; + border: none; + border-bottom: 1px solid rgba(255, 255, 255, 0.2); +} + +/* °´ťÑùʽ - Ä޺ç¹âЧ */ +.btn-primary { + background-color: var(--primary-color); + border-color: var(--primary-color); + color: #fff; + font-weight: bold; + border-radius: 25px; /* Բ½ǰ´ť */ + transition: all 0.3s ease; + box-shadow: 0 4px 15px var(--primary-glow); + margin-top: 20px; +} + + .btn-primary:hover, .btn-primary:active, .btn-primary:focus { + background-color: #15947a !important; + border-color: #15947a !important; + box-shadow: 0 6px 20px rgba(26, 179, 148, 0.8); + transform: translateY(-2px); } -} \ No newline at end of file + +/* µײ¿ÎÄ×Ö */ +.text-muted { + color: rgba(255, 255, 255, 0.5) !important; +} diff --git a/COMCMS.Web/wwwroot/install/comcms_for_linux.sql b/COMCMS.Web/wwwroot/install/comcms_for_linux.sql deleted file mode 100644 index b927c59..0000000 --- a/COMCMS.Web/wwwroot/install/comcms_for_linux.sql +++ /dev/null @@ -1,2453 +0,0 @@ --- phpMyAdmin SQL Dump --- version 4.8.5 --- https://www.phpmyadmin.net/ --- --- 主机: localhost --- 生成日期: 2020-03-20 12:11:32 --- 服务器版本: 5.7.29-log --- PHP 版本: 7.1.29 - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -SET AUTOCOMMIT = 0; -START TRANSACTION; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - --- --- 数据库: `demo_comcms_cn` --- - --- -------------------------------------------------------- - --- --- 表的结构 `Admin` --- - -CREATE TABLE `Admin` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UserName` varchar(20) DEFAULT NULL COMMENT '用户名', - `PassWord` varchar(50) DEFAULT NULL COMMENT '密码', - `Salt` varchar(20) DEFAULT NULL COMMENT '盐值', - `RealName` varchar(20) DEFAULT NULL COMMENT '姓名', - `Tel` varchar(20) DEFAULT NULL COMMENT '电话', - `Email` varchar(100) DEFAULT NULL COMMENT '邮件', - `UserLevel` int(11) NOT NULL COMMENT '级别', - `RoleId` int(11) NOT NULL COMMENT '管理组', - `GroupId` int(11) NOT NULL COMMENT '用户组', - `LastLoginTime` datetime DEFAULT NULL COMMENT '最后登录时间', - `LastLoginIP` varchar(20) DEFAULT NULL COMMENT '上次登录IP', - `ThisLoginTime` datetime DEFAULT NULL COMMENT '本次登录时间', - `ThisLoginIP` varchar(20) DEFAULT NULL COMMENT '本次登录IP', - `IsLock` int(11) NOT NULL COMMENT '是否是锁定' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理员' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `Admin` --- - -INSERT INTO `Admin` (`Id`, `UserName`, `PassWord`, `Salt`, `RealName`, `Tel`, `Email`, `UserLevel`, `RoleId`, `GroupId`, `LastLoginTime`, `LastLoginIP`, `ThisLoginTime`, `ThisLoginIP`, `IsLock`) VALUES -(1, 'admin', '8788C77C8FA36CF9D3718026355AB571', 'fOtOFYYpLO90', 'admin', '', '', 100, 1, 0, '2020-03-20 12:08:41', '127.0.0.1', '2018-04-16 00:17:43', '127.0.0.1', 0); - --- -------------------------------------------------------- - --- --- 表的结构 `AdminLog` --- - -CREATE TABLE `AdminLog` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '管理员ID', - `GUID` varchar(50) DEFAULT NULL COMMENT '唯一ID', - `UserName` varchar(20) DEFAULT NULL COMMENT '用户名', - `PassWord` varchar(50) DEFAULT NULL COMMENT '密码', - `LoginTime` datetime DEFAULT NULL COMMENT '登录时间', - `LoginIP` varchar(20) DEFAULT NULL COMMENT '登录IP', - `IsLoginOK` int(11) NOT NULL COMMENT '是否登录成功', - `Actions` text COMMENT '记录', - `LastUpdateTime` datetime DEFAULT NULL COMMENT '登录时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理日志表' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `AdminLog` --- - -INSERT INTO `AdminLog` (`Id`, `UId`, `GUID`, `UserName`, `PassWord`, `LoginTime`, `LoginIP`, `IsLoginOK`, `Actions`, `LastUpdateTime`) VALUES -(1, 0, '5d8b265b-342d-45f1-ab92-425791cd0b10', 'admin', '******', '2018-04-16 00:30:06', '127.0.0.1', 1, '查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;修改站点基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;', '2018-04-16 01:04:56'), -(2, 0, '49ebe38a-3cfb-4e16-afa8-718d0c0758a1', 'admin', '******', '2018-04-16 01:09:35', '123.1.189.126', 1, '查看基本配置;', '2018-04-16 01:14:19'), -(3, 0, '592f0755-0b3b-4871-a33a-32b137bff2fd', 'admin', '******', '2018-04-16 08:43:30', '60.166.72.54', 1, '查看基本配置;', '2018-04-16 08:43:36'), -(4, 0, '363eb952-0d60-4eb7-82b6-419c710bb89c', 'admin', '******', '2018-04-16 10:19:15', '61.140.236.194', 1, NULL, '2018-04-16 10:19:15'), -(5, 0, 'e1699742-94c3-4eb7-8bda-0fe815533e57', 'admin', '******', '2018-04-16 10:19:52', '116.24.101.123', 1, '查看基本配置;查看基本配置;', '2018-04-16 10:26:05'), -(6, 0, 'f1b1264d-6b65-4573-b3d1-ae6135aa18f4', 'admin', '******', '2018-04-16 10:24:57', '116.226.70.126', 1, '查看基本配置;查看基本配置;', '2018-04-16 10:25:15'), -(7, 0, '453c6021-7bf7-4b38-9913-27536d827bfc', 'admin', '******', '2018-04-16 10:25:10', '112.64.119.42', 1, '查看基本配置;', '2018-04-16 10:25:41'), -(8, 0, '5796a8c3-4eaf-4bba-8742-7378135dd93b', 'admin', '******', '2018-04-16 10:32:07', '113.118.198.128', 1, '查看基本配置;', '2018-04-16 10:32:25'), -(9, 0, '46f181aa-4747-4633-8fad-099f06799fe6', 'admin', '******', '2018-04-16 10:35:19', '59.172.251.218', 1, NULL, '2018-04-16 10:35:19'), -(10, 0, 'b2c7c5d3-9e9f-4b35-825c-041c71bb3e68', 'admin', '******', '2018-04-17 22:53:58', '59.42.239.56', 1, '查看后台事件列表(keyword:;page:0;limit:20);查看后台事件列表(keyword:;page:0;limit:20);查看后台事件列表(keyword:;page:0;limit:20);查看基本配置;查看SMTP配置;查看附件配置;查看附件配置;查看后台事件列表(keyword:;page:0;limit:20);查看Robots.txt;', '2018-04-18 00:20:16'), -(11, 0, '9283b94f-d4ac-42d8-8ae8-ffb462877401', 'admin', '******', '2018-04-18 09:50:49', '61.140.238.15', 1, '查看Robots.txt;查看附件配置;查看附件配置;查看附件配置;修改附件配置;查看附件配置;', '2018-04-18 11:27:05'), -(12, 0, '1a19389a-b14d-453a-9970-1f154dd5331b', 'admin', '******', '2018-04-18 09:52:15', '116.226.70.126', 1, '查看后台事件列表(keyword:;page:0;limit:20);', '2018-04-18 09:52:26'), -(13, 0, '659402f8-b25a-42d8-9761-bbbbd349096f', 'admin', '******', '2018-04-18 09:53:41', '171.221.146.125', 1, '查看基本配置;查看后台事件列表(keyword:;page:0;limit:20);查看后台事件列表(keyword:;page:0;limit:25);', '2018-04-18 10:15:50'), -(14, 0, 'e724d952-5c46-4c70-ac25-35b98c0dd121', 'admin', '******', '2018-04-18 09:54:47', '202.106.86.136', 1, '查看SMTP配置;', '2018-04-18 09:55:00'), -(15, 0, '99d7a774-b6ec-42f9-96ef-1525ff6eae79', 'admin', '******', '2018-04-18 09:55:11', '182.242.249.54', 1, '查看基本配置;', '2018-04-18 09:55:27'), -(16, 0, '596709a4-fe24-4141-8a4b-8c761d0a7e48', 'admin', '******', '2018-04-18 09:55:23', '113.57.27.145', 1, '查看基本配置;', '2018-04-18 09:55:29'), -(17, 0, 'ba87f31b-075c-4de7-afa8-f99272b00a12', 'admin', '******', '2018-04-18 09:58:16', '121.33.75.50', 1, '查看基本配置;查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;', '2018-04-18 09:58:53'), -(18, 0, 'f68c98ad-4fb1-441c-bbfb-e6734d46d07f', 'Admin', '******', '2018-04-18 09:58:23', '36.98.143.127', 1, '查看附件配置;', '2018-04-18 10:03:38'), -(19, 0, 'c6b26c99-e361-44db-9969-df2799caca60', 'admin', '******', '2018-04-18 10:01:41', '106.120.233.218', 1, NULL, '2018-04-18 10:01:41'), -(20, 0, '161763c2-d840-4949-a672-4ac3e6339ffb', 'admin', '******', '2018-04-18 10:08:42', '223.104.108.31', 1, NULL, '2018-04-18 10:08:42'), -(21, 0, '0ed86444-f812-4ac7-840f-b0809a1be406', 'admin', '******', '2018-04-18 10:17:16', '171.221.146.125', 1, '查看后台事件列表(keyword:;page:0;limit:20);查看SMTP配置;查看附件配置;查看Robots.txt;查看后台事件列表(keyword:;page:0;limit:20);查看附件配置;查看SMTP配置;查看Robots.txt;查看后台事件列表(keyword:;page:0;limit:20);查看后台事件列表(keyword:;page:0;limit:10);查看后台事件列表(keyword:;page:0;limit:25);查看附件配置;修改附件配置;查看附件配置;', '2018-04-18 11:29:19'), -(22, 0, '7aa7d5b4-4420-4918-b631-63c0a45ec141', 'admin', '******', '2018-04-18 10:21:01', '115.195.129.93', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看基本配置;查看SMTP配置;查看基本配置;查看SMTP配置;查看附件配置;', '2018-04-18 10:22:40'), -(23, 0, 'ae5c1441-bedd-49fb-bb39-96ddbfd20dc0', 'admin', '******', '2018-04-18 10:24:51', '222.195.191.87', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看基本配置;查看基本配置;查看基本配置;', '2018-04-18 10:31:21'), -(24, 0, 'eb783940-71cb-4681-940c-7faf15b2aeb0', 'admin', '******', '2018-04-18 10:27:43', '59.174.113.164', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看后台事件列表(keyword:;page:0;limit:20);查看基本配置;', '2018-04-18 10:32:29'), -(25, 0, '1a7dbe72-653c-4f3e-a11f-07f3e384e374', 'admin', '******', '2018-04-18 11:13:45', '125.113.143.165', 1, NULL, '2018-04-18 11:13:45'), -(26, 0, '1efdb7b8-674b-4490-9466-8cf56adedb90', 'admin', '******', '2018-04-18 13:45:03', '171.221.146.125', 1, NULL, '2018-04-18 13:45:03'), -(27, 0, '8d7e7655-93d1-4e1c-9276-0c00ab5e0558', 'admin', '******', '2018-04-18 18:06:51', '113.109.108.136', 1, '查看文章栏目列表页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看文章栏目列表页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看文章栏目列表页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;添加文章栏目(id:1);查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;修改文章栏目(id:1);查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;查看文章列表;查看添加文章页面;查看文章列表;查看添加文章页面;添加文章(id:1);查看文章(1);编辑文章(id:1);查看附件配置;修改附件配置;查看附件配置;查看文章(1);查看文章栏目列表页面;', '2018-04-18 20:37:31'), -(28, 0, 'f0d958c6-8bc0-4a0f-9123-ae3f72699622', 'admin', '******', '2018-04-20 00:46:38', '59.42.239.53', 1, '查看管理组列表;查看管理员列表查看/编辑我的信息;查看管理组(1)详情;', '2018-04-20 00:46:56'), -(29, 0, 'a70a5e94-155e-47c4-897a-32ba606eb144', 'admin', '******', '2018-04-20 09:21:35', '113.109.108.136', 1, '查看管理组列表;查看管理组(1)详情;', '2018-04-20 09:21:53'), -(30, 0, '6d7cb9c2-ef4c-4c8d-b8a0-7a640a10efba', 'admin', '******', '2018-04-20 22:00:35', '61.140.237.4', 1, '查看用户组列表;查看/编辑用户组(3)详情;查看/编辑用户组(3)详情;查看文章列表;查看文章(1);编辑文章(id:1);', '2018-04-20 22:17:58'), -(31, 0, '8ff2a995-8efc-4823-b825-0f677e34afbe', 'admin', '******', '2018-04-21 00:16:09', '59.42.236.154', 1, '查看商品栏目列表页面;查看商品栏目列表页面;查看添加商品栏目页面;查看添加商品栏目页面;查看商品栏目列表页面;', '2018-04-21 00:18:53'), -(32, 0, 'efe65537-8fe7-44a0-91ce-639e0bf6ea76', 'admin', '******', '2018-04-22 00:12:54', '59.42.239.179', 1, '查看基本配置;查看基本配置;查看管理组列表;查看留言分类列表页面;查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看在线支付订单列表;查看订单列表;查看商品栏目列表页面;查看商品列表;查看用户组列表;查看用户列表;', '2018-04-22 00:24:47'), -(33, 0, 'f900e14c-a662-4b7a-8b3c-4534c3218813', 'admin', '******', '2018-04-22 00:18:57', '112.28.148.95', 1, '查看订单列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看用户列表;查看用户组列表;查看商品栏目列表页面;查看商品列表;查看留言分类列表页面;查看留言列表(page:1);', '2018-04-22 00:23:07'), -(34, 0, 'a288c172-2181-4dfc-b4d8-696041e99898', 'admin', '******', '2018-04-22 00:19:08', '211.142.109.83', 1, '查看订单列表;', '2018-04-22 00:19:27'), -(35, 0, 'c102708c-83d6-40ec-813e-fabd3ca22f85', 'admin', '******', '2018-04-22 00:21:36', '61.180.252.105', 1, '查看基本配置;查看文章栏目列表页面;查看管理组列表;查看广告分类列表页面;查看用户组列表;查看商品栏目列表页面;查看商品列表;', '2018-04-22 00:46:01'), -(36, 0, '419c105e-0a58-48a6-9cb0-84c0cdb0b3ce', 'admin', '******', '2018-04-22 00:22:14', '61.170.169.232', 1, NULL, '2018-04-22 00:22:14'), -(37, 0, '4e6f9033-d5a8-435a-b1c9-a1973b10062f', 'admin', '******', '2018-04-22 01:02:00', '112.28.148.95', 1, NULL, '2018-04-22 01:02:00'), -(38, 0, 'b32f41bf-0e4c-4146-b36b-6bfee726a082', 'admin', '******', '2018-04-22 07:30:48', '14.106.184.184', 1, NULL, '2018-04-22 07:30:48'), -(39, 0, '8e676218-3baa-47fb-93d7-18eb489d6363', 'admin', '******', '2018-04-22 08:25:40', '114.219.105.142', 1, '查看基本配置;查看文章栏目列表页面;查看商品栏目列表页面;查看订单列表;', '2018-04-22 08:26:16'), -(40, 0, '2c8f65ee-21ac-4771-9bdb-49b6d5afe913', 'admin', '******', '2018-04-22 11:16:41', '117.75.19.125', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;查看文章列表;查看文章列表;查看商品栏目列表页面;查看在线支付订单列表;查看订单列表;查看用户列表;查看用户组列表;查看管理组列表;查看后台事件列表(keyword:;page:0;limit:20);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看/编辑用户组(1)详情;编辑用户组(1);查看用户组列表;查看/编辑用户组(3)详情;查看文章列表;', '2018-04-22 11:18:52'), -(41, 0, '9e4bff89-bb3e-485b-8d4b-a86a8133c5e6', 'admin', '******', '2018-04-22 12:09:51', '171.221.145.174', 1, '查看商品栏目列表页面;查看商品列表;', '2018-04-22 12:10:06'), -(42, 0, '9065b5c8-7e6e-498b-8b10-979af9e3404d', 'admin', '******', '2018-04-23 00:11:57', '59.42.239.179', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;后台管理日志留言列表(page:1);查看管理日志详情(42);后台管理日志留言列表(page:2);查看/编辑我的信息;后台管理日志留言列表(page:1);', '2018-04-23 00:54:01'), -(43, 0, 'cbfc1730-84d9-4048-b153-4e00fdab2f61', 'admin', '******', '2018-04-23 15:34:52', '61.140.237.4', 1, '查看文章列表;查看文章(1);查看文章(1);查看文章(1);查看文章(1);查看文章(1);查看文章(1);查看文章(1);查看文章(1);查看文章(1);查看文章(1);查看文章(1);查看文章(1);', '2018-04-23 15:38:48'), -(44, 0, '5c79eb2d-1dac-4a0e-a512-dbcd4dd6af6f', 'admin', '******', '2018-04-23 21:54:53', '61.140.237.4', 1, NULL, '2018-04-23 21:54:53'), -(45, 0, '429e91d8-4865-4339-9bbb-c4d4288fc5f9', 'admin', '******', '2018-04-24 21:56:31', '61.140.237.4', 1, NULL, '2018-04-24 21:56:31'), -(46, 0, '10168cf9-915f-4ca3-bfe6-06edc0014153', 'cjcjf', 'fucjc', '2018-04-24 21:58:59', '1.94.48.141', 0, '登录失败:用户名错误。', '2018-04-24 21:58:59'), -(47, 0, '1de18fca-1c07-4f31-baa1-1559451100d9', 'admin', '******', '2018-04-25 08:36:47', '125.37.89.32', 1, '查看基本配置;查看基本配置;查看基本配置;', '2018-04-25 08:37:02'), -(48, 0, 'dcd0a1bc-2a53-482f-b83a-b098945d8475', 'admin', '******', '2018-04-25 11:33:14', '118.205.137.159', 1, '查看商品栏目列表页面;', '2018-04-25 11:33:28'), -(49, 0, '98b77dee-c53b-4cd6-9eb4-702bbefed89e', 'admin', '******', '2018-04-25 13:43:23', '113.119.166.81', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章列表;查看文章栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看/编辑用户组(1)详情;查看管理组列表;查看管理组(1)详情;查看管理组(1)详情;查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);查看SMTP配置;', '2018-04-25 13:45:55'), -(50, 0, 'd63e053b-89e6-4140-9c51-fb84d0837d9e', 'admin', '******', '2018-04-25 16:18:27', '222.174.185.139', 1, '查看基本配置;查看SMTP配置;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看添加商品页面;查看订单列表;查看在线支付订单列表;查看管理组列表;查看管理员列表查看留言分类列表页面;查看广告分类列表页面;', '2018-04-25 16:19:24'), -(51, 0, 'dca85da2-0252-4f66-bd91-7ba222e387b7', 'admin', '******', '2018-04-25 23:43:30', '61.178.118.38', 1, '查看文章栏目列表页面;', '2018-04-25 23:43:55'), -(52, 0, 'dbf9da81-39b6-4a57-a783-570edad25452', 'admin', '******', '2018-05-08 22:05:12', '61.140.234.154', 1, '查看Robots.txt;', '2018-05-08 22:05:34'), -(53, 0, 'ac8d0204-ba64-4487-86fe-420893b6970b', 'admin', '******', '2018-05-09 11:15:05', '61.140.234.154', 1, '查看文章列表;查看文章(1);编辑文章(id:1);查看文章(1);查看文章(1);查看文章(1);', '2018-05-09 11:47:30'), -(54, 0, '17348522-7f99-4f97-b3b8-57acdb3f000d', 'admin', '******', '2018-05-09 11:16:26', '180.169.154.102', 1, '查看基本配置;查看留言分类列表页面;查看留言列表(page:1);查看文章列表;查看文章(1);编辑文章(id:1);查看文章(1);查看添加文章页面;添加文章(id:2);查看文章(2);编辑文章(id:2);查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;修改文章栏目(id:1);查看文章栏目列表页面;查看留言列表(page:1);', '2018-05-09 11:19:55'), -(55, 0, '9acb3e4d-5c5c-47ab-86a8-718d8904fdfa', 'admin', '******', '2018-05-09 11:16:34', '58.38.221.169', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看文章(1);查看商品栏目列表页面;查看商品列表;查看添加商品页面;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理组(1)详情;查看后台事件列表(keyword:;page:0;limit:20);查看广告分类列表页面;查看广告列表;', '2018-05-09 11:19:01'), -(56, 0, 'd8d0a104-ee4f-4bd3-9835-4b4ac102d9cd', 'admin', '******', '2018-05-09 11:16:52', '115.223.159.228', 1, '查看SMTP配置;查看文章栏目列表页面;查看用户组列表;查看商品栏目列表页面;查看添加商品栏目页面;查看基本配置;查看Robots.txt;查看订单列表;查看用户列表;查看管理组列表;查看管理员列表查看/编辑管理员(admin);后台管理日志留言列表(page:1);查看留言分类列表页面;查看广告分类列表页面;查看广告列表;查看基本配置;查看SMTP配置;查看附件配置;查看文章栏目列表页面;查看文章列表;查看添加文章页面;添加文章(id:3);查看文章(3);', '2018-05-09 11:21:35'), -(57, 0, '764e85cc-e20f-4516-a253-7e5c1a3e0a11', 'admin', '******', '2018-05-09 11:17:06', '113.65.211.126', 1, '查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看添加商品栏目页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看管理组列表;查看管理组(1)详情;查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看/编辑我的信息;查看后台事件列表(keyword:;page:0;limit:20);查看管理员列表', '2018-05-09 11:18:56'), -(58, 0, 'a984116b-6931-46a7-aea1-bfe44aed6057', 'admin', '******', '2018-05-09 11:17:56', '222.72.44.130', 1, '查看SMTP配置;查看基本配置;', '2018-05-09 11:21:42'), -(59, 0, '185ae227-0c3c-4fb2-bafa-97eb2cb118fd', 'admin', '******', '2018-05-09 11:18:28', '122.224.230.90', 1, '查看基本配置;', '2018-05-09 11:18:41'), -(60, 0, '982231f0-ca55-412c-bfb9-ccbcfd00aef6', 'admin', '******', '2018-05-09 11:19:31', '182.200.45.61', 1, '查看基本配置;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;', '2018-05-09 11:19:58'), -(61, 0, 'ae71a175-840d-4dac-86d2-705cd5cb500e', 'admin', '******', '2018-05-09 11:21:42', '36.110.112.202', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看基本配置;查看SMTP配置;查看商品栏目列表页面;查看商品栏目列表页面;查看订单列表;查看订单列表;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看文章列表;查看添加文章页面;查看SMTP配置;查看附件配置;查看添加文章页面;添加文章(id:4);查看文章(4);查看文章列表;查看添加文章页面;', '2018-05-09 11:58:37'), -(62, 0, '8a14fb5e-f132-4a51-892c-6d19563d1256', 'admin', '******', '2018-05-09 11:23:26', '49.118.237.16', 1, '查看基本配置;查看文章栏目列表页面;查看SMTP配置;查看订单列表;查看留言分类列表页面;查看用户组列表;查看用户组列表;查看用户组列表;查看用户组列表;查看用户组列表;查看用户组列表;查看基本配置;查看SMTP配置;查看附件配置;查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;查看/编辑文章栏目(id:1)页面;查看/编辑文章栏目(id:1)页面;', '2018-05-09 11:28:01'), -(63, 0, '9771682a-1fb9-4dbb-b1aa-ed7e601cc67b', 'admin', '******', '2018-05-09 11:25:14', '125.70.0.241', 1, '查看文章栏目列表页面;查看文章列表;查看添加文章页面;', '2018-05-09 11:25:31'), -(64, 0, '2bf3b457-21c8-4b2e-864b-cf7d85882f9a', 'admin', '******', '2018-05-09 11:29:20', '59.174.115.122', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看管理组列表;后台管理日志留言列表(page:1);查看管理日志详情(64);后台管理日志留言列表(page:1);查看友情链接列表;查看广告分类列表页面;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;查看管理日志详情(64);', '2018-05-09 11:30:45'), -(65, 0, 'e82b4390-b80c-46f0-a247-fca0359d7313', 'admin', '******', '2018-05-09 11:47:44', '183.160.105.104', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);查看管理日志详情(45);查看管理日志详情(46);查看留言分类列表页面;查看留言列表(page:1);', '2018-05-09 11:49:29'), -(66, 0, 'ffb4b03b-1d0b-4368-8b8f-b40456baabca', 'admin', '******', '2018-05-09 11:48:52', '222.131.59.41', 1, NULL, '2018-05-09 11:48:52'), -(67, 0, '8edf3b50-648b-4ff2-b30c-9fcc3b7a94cc', 'admin', '******', '2018-05-09 11:58:03', '202.101.140.157', 1, '查看基本配置;查看文章栏目列表页面;查看添加文章栏目页面;', '2018-05-09 11:58:29'), -(68, 0, 'a7780616-f5ab-46fd-8885-ce77ee446c44', 'admin', '******', '2018-05-09 11:58:51', '222.82.254.34', 1, '查看基本配置;查看Robots.txt;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看用户组列表;查看/编辑用户组(1)详情;查看/编辑用户组(2)详情;查看管理组列表;查看留言分类列表页面;查看广告分类列表页面;查看SMTP配置;查看附件配置;查看文章列表;查看SMTP配置;查看订单列表;查看在线支付订单列表;查看基本配置;', '2018-05-09 12:01:16'), -(69, 0, '05aed6ff-3a95-4dee-bcea-56e9f1267850', 'admin', '******', '2018-05-09 12:28:31', '223.73.236.139', 1, '查看基本配置;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看订单列表;查看用户组列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接列表;', '2018-05-09 12:30:23'), -(70, 0, 'bd40f3db-ead2-4ef7-97b5-9a2b0bb2bfe5', 'admin', '******', '2018-05-09 13:55:20', '211.94.117.114', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章列表;查看文章栏目列表页面;查看留言分类列表页面;', '2018-05-09 13:55:50'), -(71, 0, 'f2c451b4-a952-44be-b6bf-224daa29d324', 'admin', '******', '2018-05-09 13:55:31', '111.85.27.178', 1, '查看文章栏目列表页面;查看添加文章栏目页面;', '2018-05-09 13:55:49'), -(72, 0, 'c73bc03e-9b8a-4eae-a0eb-c76cc767c3ff', 'admin', '******', '2018-05-09 13:55:43', '113.201.51.219', 1, '查看基本配置;', '2018-05-09 13:55:49'), -(73, 0, '4d5f143b-3138-49db-92d5-a3361bc40782', 'admin', '******', '2018-05-09 13:55:46', '218.56.32.164', 1, '查看基本配置;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;', '2018-05-09 13:58:12'), -(74, 0, 'ca2ea3eb-0e6c-41b4-aa74-dc69100d7704', 'admin', '******', '2018-05-09 13:55:48', '113.246.105.32', 1, NULL, '2018-05-09 13:55:48'), -(75, 0, '04d23a5e-c99f-44b2-8c82-92a1418671f1', 'admin', '******', '2018-05-09 13:56:06', '222.209.200.129', 1, '查看基本配置;查看广告分类列表页面;查看文章栏目列表页面;查看添加文章栏目页面;', '2018-05-09 13:58:05'), -(76, 0, 'fc5fc509-3f74-4a43-b618-a38dcf1dc72c', 'admin', '******', '2018-05-09 13:56:09', '59.42.29.156', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;', '2018-05-09 13:56:28'), -(77, 0, '94174aa5-dd06-44ed-baff-5a331b377685', 'admin', '******', '2018-05-09 13:56:25', '113.116.124.217', 1, '查看用户组列表;查看/编辑用户组(1)详情;查看订单列表;', '2018-05-09 13:58:10'), -(78, 0, 'b0a282e2-57ad-4ea8-97d0-19939ec445b9', 'admin', '******', '2018-05-09 13:56:42', '60.209.8.183', 1, '查看SMTP配置;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;', '2018-05-09 13:59:00'), -(79, 0, 'c5696011-87bc-434a-8987-1dbc525fcbb1', 'admin', '******', '2018-05-09 13:56:45', '125.111.118.42', 1, '查看文章栏目列表页面;查看管理组列表;查看管理组(1)详情;', '2018-05-09 13:57:46'), -(80, 0, '34a6064d-1097-4379-8480-b9e4ae3a0fd8', 'admin', '******', '2018-05-09 13:57:03', '123.126.110.41', 1, NULL, '2018-05-09 13:57:03'), -(81, 0, 'e3dbef89-3969-4a5b-ad16-f491a8b4d97b', 'admin', '******', '2018-05-09 13:57:07', '113.109.211.125', 1, '查看SMTP配置;查看Robots.txt;查看Robots.txt;查看附件配置;查看文章栏目列表页面;查看添加文章栏目页面;查看添加文章栏目页面;查看商品栏目列表页面;查看商品列表;查看订单列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);后台管理日志留言列表(page:1);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;', '2018-05-09 14:00:45'), -(82, 0, '32a572eb-544b-4d39-8568-cc8efc33e51d', 'admin', '******', '2018-05-09 13:57:32', '219.143.33.50', 1, '查看基本配置;修改站点基本配置;查看基本配置;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看管理日志详情(67);查看商品栏目列表页面;查看商品列表;', '2018-05-09 14:01:16'), -(83, 0, 'b6c171c9-c1b3-41fb-a9ab-4f02b979f0e3', 'admin2', 'admin', '2018-05-09 13:57:41', '59.42.29.156', 0, '登录失败:用户名错误。', '2018-05-09 13:57:41'), -(84, 0, '42a1c3fb-54ae-4d42-bf5b-e143a7fc0c74', 'admin2', 'admin2', '2018-05-09 13:57:44', '59.42.29.156', 0, '登录失败:用户名错误。', '2018-05-09 13:57:44'), -(85, 0, '8124d4bd-b273-49fc-bd6e-27c34b693089', 'admin', 'admin2', '2018-05-09 13:57:46', '59.42.29.156', 0, '登录失败:密码错误。', '2018-05-09 13:57:46'), -(86, 0, '066f7d7e-9b54-4b66-85d1-b597ffed2ccd', 'admin', '******', '2018-05-09 13:57:52', '118.242.27.110', 1, '查看管理组列表;查看管理组(1)详情;查看用户列表;查看留言分类列表页面;', '2018-05-09 13:59:27'), -(87, 0, '3185de5b-ff4c-4069-8f76-711b1b712aa7', 'admin', '******', '2018-05-09 13:58:23', '218.56.32.164', 1, '查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);', '2018-05-09 13:58:46'), -(88, 0, '0959449e-5208-4231-8663-09a15d118db6', 'admin', '******', '2018-05-09 13:58:45', '180.168.70.38', 1, '查看基本配置;查看SMTP配置;查看商品栏目列表页面;查看商品列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看留言列表(page:1);查看留言分类列表页面;查看添加后台事件页面;查看广告列表;查看广告分类列表页面;查看友情链接分类列表页面;查看友情链接列表;', '2018-05-09 14:02:17'), -(89, 0, '9c199fea-7725-4985-85b7-f62495947e65', 'admin', '******', '2018-05-09 14:00:58', '61.185.204.50', 1, '查看基本配置;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看用户组列表;查看用户列表;查看订单列表;查看在线支付订单列表;查看添加商品页面;', '2018-05-09 14:01:54'), -(90, 0, 'cafdbbca-a8d0-4e34-a512-812d4bf4ae84', 'admin', '123456', '2018-05-09 14:06:18', '60.1.217.107', 0, '登录失败:密码错误。', '2018-05-09 14:06:18'), -(91, 0, '0203bf66-9313-463a-9e12-ab456685bb95', 'administrator', '123456', '2018-05-09 14:06:38', '60.1.217.107', 0, '登录失败:用户名错误。', '2018-05-09 14:06:38'), -(92, 0, 'e240dd2e-b4b1-4d76-878e-59d6b9ca0925', 'administrator', 'admin', '2018-05-09 14:06:52', '60.1.217.107', 0, '登录失败:用户名错误。', '2018-05-09 14:06:52'), -(93, 0, '069b61fa-99fa-459b-8d7f-0af2e9b6ff22', 'admin', '******', '2018-05-09 14:07:16', '113.111.61.221', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看文章(4);查看广告分类列表页面;查看留言分类列表页面;查看留言列表(page:1);查看用户组列表;查看用户列表;查看商品列表;查看文章(4);查看文章(3);查看文章(2);查看文章(1);', '2018-05-09 14:09:50'), -(94, 0, 'd35c7e99-1502-4ec1-98ee-0952cec0586d', '쇌သ龾闡ᦟ즇', '쇌သ龾闡ᦟ즇', '2018-05-09 14:07:40', '60.1.217.107', 0, '登录失败:用户名错误。', '2018-05-09 14:07:40'), -(95, 0, '3b473683-cc20-4cdc-a75e-41afc55dc390', 'admin', '******', '2018-05-09 14:07:44', '218.244.55.154', 1, '查看商品栏目列表页面;查看文章栏目列表页面;查看文章列表;查看/编辑文章栏目(id:1)页面;修改文章栏目(id:1);查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;查看文章栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户列表;查看用户组列表;查看/编辑用户组(1)详情;编辑用户组(1);查看/编辑用户组(1)详情;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);', '2018-05-09 14:09:44'), -(96, 0, '7b008ca5-c06b-4f8d-8645-c4a44fe49b08', '쇌သ龾闡ᦟ즇', '쇌သ龾闡ᦟ즇', '2018-05-09 14:07:50', '60.1.217.107', 0, '登录失败:用户名错误。', '2018-05-09 14:07:50'), -(97, 0, '318d766c-1620-4fc5-bbe9-4c32d49588de', 'admin', '******', '2018-05-09 14:08:13', '120.37.184.70', 1, '查看管理组列表;查看管理组(1)详情;查看管理组(1)详情;', '2018-05-09 14:27:21'), -(98, 0, '29395ffe-6aa9-4a23-b27a-b44625f6b71c', 'admin', '******', '2018-05-09 14:08:24', '60.190.100.98', 1, '查看基本配置;查看管理组列表;查看管理组(1)详情;查看添加管理页面;查看管理员列表查看/编辑管理员(admin);查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);查看管理日志详情(104);查看留言分类列表页面;查看留言列表(page:1);查看用户组列表;查看用户列表;查看添加管理员页面;查看添加管理页面;查看管理组列表;', '2018-05-09 14:13:42'), -(99, 0, '4d409ad6-77f2-4e13-8bdd-f3dbd64f3cb1', '쇌သ龾闡ᦟ즇', '쇌သ龾闡ᦟ즇', '2018-05-09 14:09:19', '60.1.217.107', 0, '登录失败:用户名错误。', '2018-05-09 14:09:19'), -(100, 0, 'c4bdfe33-1873-493f-b61e-fdb541a4b10d', 'admin', '******', '2018-05-09 14:09:35', '117.136.72.2', 1, '查看基本配置;查看文章栏目列表页面;查看文章栏目列表页面;查看文章列表;查看商品列表;查看订单列表;', '2018-05-09 15:17:44'), -(101, 0, '673d2ef9-f5e1-4dfa-8446-0c5d8542298f', '쇌သ龾闡ᦟ즇', '쇌သ龾闡ᦟ즇', '2018-05-09 14:09:38', '60.1.217.107', 0, '登录失败:用户名错误。', '2018-05-09 14:09:38'), -(102, 0, '9338467d-9781-4f78-962b-0911a59c3ce9', 'admin', '******', '2018-05-09 14:10:11', '115.239.244.234', 1, '查看广告分类列表页面;查看订单列表;查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;', '2018-05-09 14:10:49'), -(103, 0, 'c07e93d5-aab3-40f3-82e2-ece9508b9ad8', 'admin', '******', '2018-05-09 14:11:02', '219.76.153.140', 1, '查看文章栏目列表页面;查看在线支付订单列表;查看留言分类列表页面;查看留言列表(page:1);查看SMTP配置;查看附件配置;查看用户组列表;查看用户列表;查看管理组列表;查看添加管理页面;查看添加管理页面;查看留言分类列表页面;查看商品栏目列表页面;查看商品列表;查看附件配置;查看SMTP配置;', '2018-05-09 14:14:02'), -(104, 0, 'd5e086ad-715d-4cdf-951b-a46d200c6954', 'admin', '******', '2018-05-09 14:11:10', '171.221.148.32', 1, '查看商品栏目列表页面;查看添加商品栏目页面;查看添加商品栏目页面;', '2018-05-09 14:11:33'), -(105, 0, '750f212d-f59f-4f48-bc67-67822f14a9c0', 'b1002', 'ddddd', '2018-05-09 14:12:27', '122.231.79.55', 0, '登录失败:用户名错误。', '2018-05-09 14:12:27'), -(106, 0, 'aa1fde62-5edd-46be-874a-97fac5ffb32a', 'admin', '******', '2018-05-09 14:14:10', '116.25.96.70', 1, '查看文章栏目列表页面;查看文章列表;查看文章(4);查看商品栏目列表页面;查看添加商品栏目页面;查看商品列表;查看添加商品页面;查看订单列表;查看在线支付订单列表;查看用户列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看留言列表(page:1);查看留言分类列表页面;查看广告分类列表页面;查看广告列表;查看添加广告页面;', '2018-05-09 14:18:49'), -(107, 0, '2c147b0f-7751-4903-b3b5-31368176b73d', 'admin', '******', '2018-05-09 14:15:01', '101.81.71.222', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看文章(4);查看订单列表;查看在线支付订单列表;查看广告分类列表页面;查看SMTP配置;查看Robots.txt;修改Robots.txt成功;查看Robots.txt;修改Robots.txt成功;查看Robots.txt;修改Robots.txt成功;查看Robots.txt;修改Robots.txt成功;查看Robots.txt;修改Robots.txt成功;查看Robots.txt;修改Robots.txt成功;查看Robots.txt;修改Robots.txt成功;查看Robots.txt;修改Robots.txt成功;查看Robots.txt;修改Robots.txt成功;查看Robots.txt;查看文章栏目列表页面;删除文章栏目(id:1);查看文章栏目列表页面;查看添加文章栏目页面;添加文章栏目(id:2);查看文章栏目列表页面;查看文章栏目列表页面;查看文章栏目列表页面;查看订单列表;查看在线支付订单列表;查看用户列表;查看用户组列表;查看/编辑用户组(1)详情;查看/编辑用户组(2)详情;编辑用户组(2);查看用户组列表;查看/编辑用户组(3)详情;编辑用户组(3);查看用户组列表;查看用户组列表;查看用户组列表;', '2018-05-09 14:17:39'), -(108, 0, 'dc031126-5a70-4a9f-8d19-3082cfc94980', 'admin', '******', '2018-05-09 14:15:27', '182.50.115.53', 1, '查看友情链接分类列表页面;查看友情链接列表;', '2018-05-09 14:17:20'), -(109, 0, 'a4e13b3e-5952-4973-b613-d4218ed4ab03', 'admin', '******', '2018-05-09 14:15:54', '112.64.30.17', 1, '查看文章栏目列表页面;查看文章列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看用户组列表;查看用户列表;查看订单列表;查看在线支付订单列表;查看商品栏目列表页面;查看商品列表;查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;', '2018-05-09 14:31:08'), -(110, 0, '3f94a6f5-251d-43c6-af49-26ee7e4310e9', 'admin', '******', '2018-05-09 14:17:15', '182.242.103.76', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;', '2018-05-09 14:19:08'), -(111, 0, '8699f81e-4d7e-45ab-8329-ddfd6c7d63ba', 'admin', '******', '2018-05-09 14:17:43', '101.81.71.222', 1, NULL, '2018-05-09 14:17:43'), -(112, 0, 'c8fe13a3-faec-47e5-9de7-b811492c2ae8', 'admin', '******', '2018-05-09 14:23:46', '36.110.112.202', 1, '查看基本配置;查看文章列表;查看添加文章页面;查看添加文章页面;查看文章栏目列表页面;查看添加文章页面;查看添加文章栏目页面;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;查看管理组列表;', '2018-05-09 14:28:18'), -(113, 0, '5ca816ae-9766-49e1-a479-dda5458e5a2a', 'admin', '******', '2018-05-09 14:25:57', '220.178.65.131', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看/编辑我的信息;后台管理日志留言列表(page:1);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接列表;查看文章栏目列表页面;查看添加文章栏目页面;添加文章栏目(id:3);查看文章栏目列表页面;查看/编辑文章栏目(id:2)页面;查看/编辑文章栏目(id:3)页面;查看基本配置;查看SMTP配置;查看附件配置;查看订单列表;查看在线支付订单列表;查看用户列表;查看用户组列表;查看用户组列表;', '2018-05-09 14:34:04'), -(114, 0, '243f6616-7dd3-4f12-8967-36cd320c0e89', 'admin', '******', '2018-05-09 14:29:38', '60.190.100.98', 1, '查看管理组列表;查看管理员列表查看添加管理员页面;查看添加管理页面;', '2018-05-09 14:30:18'), -(115, 0, '38471b44-5fda-4925-ac79-1f1bb4e88a7d', 'admin', '******', '2018-05-09 14:35:05', '115.236.68.205', 1, '查看基本配置;查看SMTP配置;查看在线支付订单列表;查看管理组列表;查看管理员列表', '2018-05-09 14:35:52'), -(116, 0, '24ad62b6-1b78-41ab-a6e6-af7570b6ae73', 'admin', '******', '2018-05-09 14:35:29', '113.140.27.178', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);', '2018-05-09 14:36:05'), -(117, 0, 'e069ce27-4844-4eb1-9153-02a138ae3925', 'admin', '******', '2018-05-09 15:25:19', '180.157.157.128', 1, '查看基本配置;查看附件配置;查看SMTP配置;查看Robots.txt;查看文章栏目列表页面;查看添加文章栏目页面;查看广告分类列表页面;查看留言分类列表页面;查看留言列表(page:1);查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);', '2018-05-09 15:29:49'), -(118, 0, '77fef592-cda3-4eb1-9f81-9d9601814edf', 'admin', '******', '2018-05-09 15:29:12', '219.142.102.162', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看管理日志详情(118);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看管理员列表查看留言分类列表页面;修改附件配置;查看附件配置;修改附件配置;查看附件配置;修改附件配置;查看附件配置;查看广告列表;查看友情链接列表;查看后台事件列表(keyword:;page:0;limit:20);查看基本配置;', '2018-05-09 15:51:21'), -(119, 0, '71eba7dd-d453-4e26-806e-e898a550cb95', 'a', 'asssss', '2018-05-09 15:34:08', '125.120.158.205', 0, '登录失败:用户名错误。', '2018-05-09 15:34:08'), -(120, 0, 'fb6448be-0f6a-466f-bd02-f0fe7ffe80cb', 'a', 'asssss', '2018-05-09 15:34:13', '125.120.158.205', 0, '登录失败:用户名错误。', '2018-05-09 15:34:13'), -(121, 0, 'a9683318-df2d-49a1-9347-abb55d534757', 'a', 'asssss', '2018-05-09 15:34:15', '125.120.158.205', 0, '登录失败:用户名错误。', '2018-05-09 15:34:15'), -(122, 0, '7e81cde7-a801-4b5a-914b-0adb2791e42d', 'admin', '******', '2018-05-09 16:01:22', '116.4.8.229', 1, '查看用户组列表;查看/编辑用户组(1)详情;查看用户列表;查看管理组列表;查看管理员列表查看/编辑管理员(admin);查看后台事件列表(keyword:;page:0;limit:20);查看添加管理页面;查看留言分类列表页面;查看留言列表(page:1);后台管理日志留言列表(page:1);查看/编辑我的信息;查看文章栏目列表页面;查看文章列表;查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看商品栏目列表页面;查看商品列表;查看订单列表;查看基本配置;查看管理组列表;查看管理组(1)详情;查看管理组列表;', '2018-05-09 16:17:46'), -(123, 0, '1c783940-f37b-4d53-850f-b90077b3f87d', 'admin', '******', '2018-05-09 16:13:47', '182.139.182.231', 1, '查看用户组列表;查看用户列表;查看管理组列表;查看添加管理页面;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看/编辑我的信息;查看添加后台事件页面;查看基本配置;查看文章列表;查看商品栏目列表页面;查看添加商品栏目页面;查看商品列表;查看管理组(1)详情;查看用户组列表;', '2018-05-09 16:22:39'), -(124, 0, 'd3a8559f-251c-4f23-8190-0937e598ba59', 'admin', '******', '2018-05-09 16:18:30', '116.24.101.113', 1, '查看文章栏目列表页面;查看/编辑文章栏目(id:2)页面;查看添加文章栏目页面;查看/编辑文章栏目(id:3)页面;查看文章列表;查看管理组列表;查看管理组(1)详情;查看添加管理页面;查看管理员列表查看添加管理员页面;查看后台事件列表(keyword:;page:0;limit:20);查看添加后台事件页面;查看/编辑我的信息;后台管理日志留言列表(page:1);查看管理日志详情(124);查看友情链接列表;查看友情链接分类列表页面;查看广告列表;查看广告分类列表页面;查看/编辑管理员(admin);查看/编辑管理员(admin);查看添加管理员页面;后台管理日志留言列表(page:1);查看管理日志详情(125);查看管理日志详情(125);查看添加后台事件页面;', '2018-05-09 16:56:51'), -(125, 0, 'f79d2fb7-ca04-496c-b6e7-53327796f109', 'admin', '******', '2018-05-09 16:35:23', '113.109.211.125', 1, '查看文章栏目列表页面;查看添加文章栏目页面;查看添加文章栏目页面;查看/编辑文章栏目(id:2)页面;修改文章栏目(id:2);查看文章栏目列表页面;查看/编辑文章栏目(id:2)页面;查看文章栏目列表页面;查看文章栏目列表页面;', '2018-05-09 16:55:24'), -(126, 0, '701238b2-4955-43a5-951d-5ba337f8cfd4', 'admin', '******', '2018-05-09 19:45:25', '223.104.3.147', 1, '查看文章栏目列表页面;查看商品列表;查看商品栏目列表页面;', '2018-05-09 19:45:58'), -(127, 0, '2257d112-3395-41ce-8748-4f6bbc73dc9b', 'admin', '******', '2018-05-10 08:03:17', '14.16.245.199', 1, NULL, '2018-05-10 08:03:17'), -(128, 0, 'a33e3b15-b1f4-46ae-ac9d-aa9028f34a05', 'admin', '******', '2018-05-10 14:03:17', '115.238.81.206', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看SMTP配置;查看文章栏目列表页面;查看文章栏目列表页面;查看文章栏目列表页面;查看添加文章栏目页面;查看/编辑文章栏目(id:2)页面;修改文章栏目(id:2);查看文章栏目列表页面;查看文章栏目列表页面;查看文章列表;查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;', '2018-05-10 14:05:22'), -(129, 0, '4c746df8-1afd-4d20-aadb-9a6776b258f2', 'admin', '******', '2018-05-10 18:29:28', '116.24.101.29', 1, '查看后台事件列表(keyword:;page:0;limit:20);', '2018-05-10 18:29:37'), -(130, 0, 'bcf3fb96-38a7-42c0-abbe-5d4146107c9d', 'admin', '******', '2018-05-10 18:33:01', '116.24.101.29', 1, '查看文章栏目列表页面;查看商品列表;查看商品栏目列表页面;查看管理员列表', '2018-05-10 18:33:48'), -(131, 0, '80f8193d-b2e3-4be6-88f7-d67b27628357', 'admin', '******', '2018-05-15 10:50:15', '113.109.210.16', 1, '查看文章栏目列表页面;查看文章列表;', '2018-05-15 10:51:00'), -(132, 0, '2d39cf17-8163-41dc-896f-5618c9fa5364', 'admin', '******', '2018-05-15 19:56:39', '61.140.234.154', 1, '后台管理日志留言列表(page:1);查看管理日志详情(131);查看文章栏目列表页面;查看文章列表;后台管理日志留言列表(page:1);', '2018-05-15 20:09:18'), -(133, 0, 'f15003bb-7465-4574-a469-8a54859819eb', 'admin', '******', '2018-05-15 19:59:52', '223.104.65.143', 1, NULL, '2018-05-15 19:59:52'), -(134, 0, 'c7452568-8475-4d0c-8539-94ad7f0774d2', 'admin', '******', '2018-05-15 20:02:08', '112.65.48.77', 1, NULL, '2018-05-15 20:02:08'), -(135, 0, 'a153f85d-01f8-4bfb-8021-bfeaa5945aa6', 'admin', '******', '2018-05-15 20:04:02', '112.28.148.191', 1, '查看基本配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看管理组列表;查看管理员列表查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;', '2018-05-15 20:04:59'), -(136, 0, '0ec2feaf-cd6c-4fa7-8efe-9842c8ec2072', 'admin', '******', '2018-05-15 20:05:41', '1.68.33.172', 1, '查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看SMTP配置;查看基本配置;', '2018-05-15 20:15:38'), -(137, 0, '17d7a604-479c-47b3-8b7f-97c6f155d4c4', 'admin', '******', '2018-05-15 20:17:40', '60.190.4.14', 1, '查看基本配置;查看Robots.txt;查看商品列表;查看商品栏目列表页面;查看用户组列表;查看/编辑用户组(1)详情;查看管理组列表;查看管理组(1)详情;查看管理员列表查看留言分类列表页面;查看文章栏目列表页面;查看添加文章栏目页面;查看用户列表;查看文章列表;查看用户组列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看Robots.txt;查看附件配置;查看商品列表;查看广告列表;查看添加广告页面;', '2018-05-15 20:27:17'), -(138, 0, 'ccdc86d0-c78a-4e76-92dc-472717b8d4b6', 'admin', '******', '2018-05-15 20:21:32', '182.42.64.116', 1, '查看基本配置;查看管理组列表;查看商品栏目列表页面;查看SMTP配置;查看添加商品栏目页面;查看商品栏目列表页面;', '2018-05-15 20:21:57'), -(139, 0, 'ea4f9a23-83e4-4a2b-a613-5a941693c1a7', 'admin', '******', '2018-05-17 11:54:56', '61.140.234.154', 1, '查看文章栏目列表页面;查看文章列表;', '2018-05-17 11:55:10'), -(140, 0, 'd43aac73-e932-4afd-854d-21f77e893302', 'admin', '******', '2018-05-17 22:07:48', '119.39.248.50', 1, NULL, '2018-05-17 22:07:48'), -(141, 0, '12a2d97e-464c-4202-89a3-120a30c8a547', 'admin', '******', '2018-05-17 22:08:37', '119.39.248.50', 1, '查看商品栏目列表页面;查看订单列表;查看商品列表;', '2018-05-17 22:10:31'), -(142, 0, '09e22830-2ade-4bbb-94b6-38e825bb7c9f', 'admin', '******', '2018-05-17 22:09:22', '61.140.234.154', 1, '查看后台事件列表(keyword:;page:0;limit:20);查看管理组列表;查看管理组(1)详情;', '2018-05-17 22:09:58'), -(143, 0, '1545bb1b-ce37-43d7-ab2e-188913fe5b76', 'admin', '******', '2018-05-17 22:13:49', '60.6.229.156', 1, '查看基本配置;查看SMTP配置;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看添加后台事件页面;查看/编辑我的信息;查看订单列表;查看在线支付订单列表;查看商品栏目列表页面;查看商品列表;查看文章栏目列表页面;查看文章列表;查看附件配置;查看Robots.txt;查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;', '2018-05-17 22:15:10'), -(144, 0, '1c4bd7ee-fbbb-42bf-9cb7-07a6ba974fb9', 'admin', '******', '2018-05-19 14:32:23', '180.157.148.69', 1, '查看基本配置;查看SMTP配置;修改站点基本配置;查看基本配置;修改站点基本配置;查看基本配置;查看SMTP配置;修改站点基本配置;查看基本配置;', '2018-05-19 14:34:59'), -(145, 0, 'dcc296f8-42e5-4994-822e-65ea540af165', 'admin', '******', '2018-06-01 19:54:32', '113.109.108.143', 1, NULL, '2018-06-01 19:54:32'), -(146, 0, '46a3662f-7423-4a65-81b9-e52dba4af553', 'admin', '******', '2018-06-02 09:58:21', '113.109.108.143', 1, '查看文章栏目列表页面;查看基本配置;查看/编辑文章栏目(id:2)页面;查看广告分类列表页面;', '2018-06-02 10:02:45'), -(147, 0, '085ffb3a-78fc-4422-9abe-915aa0259982', 'admin', '******', '2018-06-02 09:59:38', '111.58.212.103', 1, '查看基本配置;查看文章栏目列表页面;查看文章列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看SMTP配置;查看Robots.txt;查看附件配置;', '2018-06-02 10:18:57'), -(148, 0, 'f940430b-3980-4e46-883d-a33b4c4e5527', 'admin', '******', '2018-06-02 10:06:17', '121.18.229.234', 1, '查看基本配置;查看文章列表;查看商品列表;查看在线支付订单列表;查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看广告列表;', '2018-06-02 10:06:43'), -(149, 0, '7343f2f8-0646-4a80-88c2-19807789f0fa', 'admin', '******', '2018-06-02 10:08:12', '61.242.61.116', 1, '查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;', '2018-06-02 10:08:34'), -(150, 0, 'bbc5d8de-c4dc-4ca5-bcdb-1b8f7ef64b88', 'admin', '******', '2018-06-02 10:11:03', '119.98.80.219', 1, '查看基本配置;查看文章栏目列表页面;查看/编辑文章栏目(id:2)页面;查看添加文章栏目页面;查看文章列表;查看订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);', '2018-06-02 11:22:07'), -(151, 0, 'bd7fc48c-8600-44f7-aeb4-e9f659d1d79d', 'admin', '123456', '2018-06-02 10:16:05', '61.154.168.4', 0, '登录失败:密码错误。', '2018-06-02 10:16:05'), -(152, 0, '74a30aeb-8e4b-4617-9658-786995edd12d', 'admin', '******', '2018-06-02 10:49:06', '1.202.91.134', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看添加文章栏目页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户列表;查看用户组列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);', '2018-06-02 10:50:55'), -(153, 0, '58f0d0e3-f3b2-40d1-acdd-960029536d18', 'admin', '******', '2018-06-02 10:52:23', '113.110.215.47', 1, '查看基本配置;查看SMTP配置;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看管理组列表;查看添加管理页面;', '2018-06-02 10:52:51'), -(154, 0, '797a6e0b-50b0-4786-9dd2-a43c5217c9de', 'admin', '******', '2018-06-02 11:17:19', '101.81.105.93', 1, '查看用户组列表;查看用户列表;查看管理组列表;查看管理组(1)详情;查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);查看管理员列表查看添加管理员页面;查看添加管理页面;', '2018-06-02 11:20:06'), -(155, 0, '841a0532-59c5-4d2d-9e00-1989c5b27bfc', 'admin', '******', '2018-06-02 12:30:28', '223.73.119.179', 1, '查看基本配置;查看附件配置;查看文章栏目列表页面;', '2018-06-02 12:30:36'), -(156, 0, '0522a44d-9ab9-41dc-a74d-8c66f3f5180e', 'admin', '******', '2018-06-02 13:17:07', '180.166.232.222', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看商品列表;查看商品栏目列表页面;查看添加商品栏目页面;添加商品栏目(id:1);查看商品栏目列表页面;查看用户列表;查看用户组列表;查看/编辑用户组(3)详情;查看用户组列表;查看用户组列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看广告分类列表页面;查看广告列表;查看友情链接列表;查看SMTP配置;查看商品列表;查看管理组列表;', '2018-06-02 13:19:09'), -(157, 0, 'd817d924-a851-4b01-8f1b-7412cd345822', 'admin', '******', '2018-06-02 13:32:48', '222.82.254.34', 1, '查看文章栏目列表页面;查看订单列表;查看基本配置;查看SMTP配置;查看广告分类列表页面;后台管理日志留言列表(page:1);查看管理日志详情(157);查看管理日志详情(151);查看管理日志详情(149);查看管理日志详情(148);查看管理日志详情(139);查看管理日志详情(157);查看管理日志详情(157);', '2018-06-02 13:39:34'), -(158, 0, 'a5dc72e8-854a-44dc-a4c0-505bb8d1046e', 'admin', '123456', '2018-06-02 14:20:53', '101.81.105.93', 0, '登录失败:密码错误。', '2018-06-02 14:20:53'), -(159, 0, '1d8abef7-4eda-493e-ad0d-4250cb76bf90', 'admin', '******', '2018-06-02 14:20:58', '101.81.105.93', 1, NULL, '2018-06-02 14:20:58'), -(160, 0, '9077c39d-1275-4b2a-ab07-77a451faf576', 'admin', '******', '2018-06-02 20:22:05', '223.73.119.179', 1, '查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看/编辑文章栏目(id:3)页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看管理日志详情(158);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;', '2018-06-02 22:08:15'), -(161, 0, 'b1db977d-56af-40e7-ab47-8e371b8d7e2c', 'admin', '******', '2018-06-08 21:35:01', '113.109.108.174', 1, '查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看留言分类列表页面;查看留言列表(page:1);', '2018-06-08 21:39:11'), -(162, 0, '20ee0564-fa23-4c3a-b968-f0be34f833c4', 'admin', '******', '2018-06-08 21:35:11', '39.130.100.69', 1, '查看商品栏目列表页面;查看/编辑商品栏目(id:1)页面;查看添加商品栏目页面;', '2018-06-08 21:35:40'), -(163, 0, '18be152b-b762-49d4-ba9e-476088f21a80', 'admin', '******', '2018-06-08 21:45:04', '125.89.29.248', 1, '查看文章栏目列表页面;', '2018-06-08 21:45:28'), -(164, 0, '46fe1bfc-ba03-4451-a9a9-1522efbfd61c', 'admin', '******', '2018-06-08 21:45:07', '106.34.132.231', 1, '查看订单列表;查看管理员列表查看添加管理员页面;查看商品栏目列表页面;查看添加商品栏目页面;查看商品列表;查看添加商品页面;查看用户列表;查看基本配置;查看SMTP配置;后台管理日志留言列表(page:1);查看管理日志详情(164);查看管理日志详情(158);后台管理日志留言列表(page:7);查看/编辑我的信息;', '2018-06-08 21:49:07'), -(165, 0, 'fc896c7f-e3b0-445b-aef1-ee77b8633289', 'a', 'aaaaa', '2018-06-08 21:48:24', '118.251.54.102', 0, '登录失败:用户名错误。', '2018-06-08 21:48:24'), -(166, 0, '8d1aa748-3ccd-4844-a4b6-a20edec68ed5', 'aaaaaaa', 'aaaaa', '2018-06-08 21:48:27', '118.251.54.102', 0, '登录失败:用户名错误。', '2018-06-08 21:48:27'), -(167, 0, '5268ef75-2380-4a3f-8a25-7528985201b9', 'admin', '******', '2018-06-08 21:48:34', '118.251.54.102', 1, '查看订单列表;', '2018-06-08 21:48:45'), -(168, 0, 'aaeb0171-13d7-4281-86a2-f5ff4db0c92c', 'admin', '123456', '2018-06-08 22:07:40', '113.109.108.174', 0, '登录失败:密码错误。', '2018-06-08 22:07:40'), -(169, 0, 'b26f049f-3fc6-44fd-8462-15efba7772a1', 'a594723492', 'aaaaa', '2018-06-08 22:09:27', '118.251.54.102', 0, '登录失败:用户名错误。', '2018-06-08 22:09:27'), -(170, 0, '2eab0e0b-1345-4c2e-9557-d7361db38b5f', 'admin', 'aaaaa', '2018-06-08 22:23:17', '118.251.54.102', 0, '登录失败:密码错误。', '2018-06-08 22:23:17'), -(171, 0, '45782105-ad82-4312-bf8d-c829ced20f27', 'admin', 'aaaaa', '2018-06-08 22:23:19', '118.251.54.102', 0, '登录失败:密码错误。', '2018-06-08 22:23:19'), -(172, 0, 'c281dad2-4b54-4b98-b3f2-decdacea5745', 'admin', 'aaaaa', '2018-06-08 22:23:20', '118.251.54.102', 0, '登录失败:密码错误。', '2018-06-08 22:23:20'), -(173, 0, '266affb4-293d-47c2-bd5a-7878701f3b7a', 'admin', 'aaaaa', '2018-06-08 22:23:21', '118.251.54.102', 0, '登录失败:密码错误。', '2018-06-08 22:23:21'), -(174, 0, '48ffd14a-6484-4b86-8de1-1af0fbbcdf89', 'admin', 'aaaaa', '2018-06-08 22:23:23', '118.251.54.102', 0, '登录失败:密码错误。', '2018-06-08 22:23:23'), -(175, 0, 'ad63e080-7959-4bc1-8dcb-a40d1d0319da', 'admin', 'aaaaa', '2018-06-08 22:23:24', '118.251.54.102', 0, '登录失败:密码错误。', '2018-06-08 22:23:24'), -(176, 0, 'aacd92c7-685a-4d43-82e4-94f4520c7029', 'admin', 'aaaaa', '2018-06-08 22:23:25', '118.251.54.102', 0, '登录失败:密码错误。', '2018-06-08 22:23:25'), -(177, 0, '48db6b14-929a-4634-a3a7-26cfde43809a', 'admin', 'aaaaa', '2018-06-08 22:23:27', '118.251.54.102', 0, '登录失败:密码错误。', '2018-06-08 22:23:27'), -(178, 0, 'c4c83909-22fe-4a06-816d-924463979314', 'admin', 'aaaaa', '2018-06-08 22:23:28', '118.251.54.102', 0, '登录失败:密码错误。', '2018-06-08 22:23:28'), -(179, 0, '66e38204-ce22-4056-9015-fb20ffd7b718', '是', 's aaaaa', '2018-06-08 22:25:26', '118.251.54.102', 0, '登录失败:用户名错误。', '2018-06-08 22:25:26'), -(180, 0, '44796697-1247-4f64-a4ea-d22c5c43297e', 'admin', '******', '2018-06-08 22:32:24', '117.140.73.45', 1, '查看管理组列表;查看用户组列表;查看基本配置;查看文章栏目列表页面;查看商品栏目列表页面;查看在线支付订单列表;查看留言分类列表页面;查看后台事件列表(keyword:;page:0;limit:20);', '2018-06-08 22:36:23'), -(181, 0, 'e14d23b7-b6a2-487d-acb1-e3a7f12793f0', 'abx', 'accxd', '2018-06-08 23:03:38', '101.206.170.224', 0, '登录失败:用户名错误。', '2018-06-08 23:03:38'), -(182, 0, '82c269ed-379c-467c-b4cb-2e37a5820401', 'abx', 'accxd', '2018-06-08 23:03:40', '101.206.170.224', 0, '登录失败:用户名错误。', '2018-06-08 23:03:40'), -(183, 0, '74589ecb-f907-4662-bb2b-8066bacb3dc1', 'abx', 'accxd', '2018-06-08 23:03:43', '101.206.170.224', 0, '登录失败:用户名错误。', '2018-06-08 23:03:43'), -(184, 0, '0d95a0ae-1d9e-43fd-a76a-50af26f42b57', 'adminsss', 'admin', '2018-06-08 23:28:22', '101.206.170.224', 0, '登录失败:用户名错误。', '2018-06-08 23:28:22'), -(185, 0, '70787464-afc7-41a6-a6cc-5523377f382d', 'admin', '******', '2018-06-08 23:28:26', '101.206.170.224', 1, NULL, '2018-06-08 23:28:26'), -(186, 0, '2e2eb8e5-fec6-4808-96de-ba16cc78b83a', 'admin', 'adminjdj', '2018-06-08 23:29:01', '101.206.170.224', 0, '登录失败:密码错误。', '2018-06-08 23:29:01'), -(187, 0, 'a9fb43b9-4991-42fb-8175-e3b707fdef5d', 'admin', '******', '2018-06-08 23:29:08', '101.206.170.224', 1, '查看基本配置;查看文章栏目列表页面;查看文章栏目列表页面;查看添加文章栏目页面;', '2018-06-08 23:29:47'), -(188, 0, '3cd77dcf-b15c-4326-8bec-cd1b7690ebdf', 'ssj', 'ddjdddd', '2018-06-08 23:33:44', '101.206.170.224', 0, '登录失败:用户名错误。', '2018-06-08 23:33:44'), -(189, 0, '98daff06-2000-43d5-8014-add0b5eb3b8e', 'sms', 'sssdd', '2018-06-08 23:36:28', '101.206.170.224', 0, '登录失败:用户名错误。', '2018-06-08 23:36:28'), -(190, 0, '60b85d04-3ba3-4875-aced-04690304f5b8', 'zzm', 'znnxxxx', '2018-06-08 23:37:13', '101.206.170.224', 0, '登录失败:用户名错误。', '2018-06-08 23:37:13'), -(191, 0, '84ceb5ac-658e-4f64-b10e-3f55bff885e4', 'admin', 'ssmmnndn', '2018-06-08 23:37:28', '101.206.170.224', 0, '登录失败:密码错误。', '2018-06-08 23:37:28'), -(192, 0, '9147e73e-c7d5-4d69-92ba-eb4a87454847', 'admin', 'asdfadsf', '2018-06-08 23:37:37', '171.214.224.98', 0, '登录失败:密码错误。', '2018-06-08 23:37:37'), -(193, 0, 'b90a7028-0c89-45e5-8b25-f85c21529cc9', 'admin', '123456', '2018-06-08 23:42:30', '171.214.224.98', 0, '登录失败:密码错误。', '2018-06-08 23:42:30'), -(194, 0, '949011c2-142b-4eda-bfc4-3ccdcd017a8f', 'admin', '123456', '2018-06-08 23:42:53', '171.214.224.98', 0, '登录失败:密码错误。', '2018-06-08 23:42:53'), -(195, 0, '97b76241-bc77-42ef-8e36-719d5221a6f8', 'admin', '******', '2018-06-08 23:43:12', '171.214.224.98', 1, NULL, '2018-06-08 23:43:12'), -(196, 0, 'f2a9ca8f-e40e-4b51-816d-0db25765df5b', 'abcde', 'abcde', '2018-06-08 23:45:08', '171.214.224.98', 0, '登录失败:用户名错误。', '2018-06-08 23:45:08'), -(197, 0, '0e0a0d86-1f9e-4a1b-93d5-6049dc191655', 'abcde', 'abcde', '2018-06-09 00:01:22', '171.214.224.98', 0, '登录失败:用户名错误。', '2018-06-09 00:01:22'), -(198, 0, '7df4a88a-a246-4d33-b04a-dd0bbb63c4df', '123123', '123123', '2018-06-09 01:54:50', '171.214.224.98', 0, '登录失败:用户名错误。', '2018-06-09 01:54:50'), -(199, 0, 'c7196d1b-bd3a-4e84-9af4-0e850804872d', 'admin', '******', '2018-06-09 02:04:13', '171.214.224.98', 1, NULL, '2018-06-09 02:04:13'), -(200, 0, '05e6043c-df70-461a-bda0-5ace961c519e', 'admin', '******', '2018-06-09 02:08:48', '171.214.224.98', 1, NULL, '2018-06-09 02:08:48'), -(201, 0, '87f9a838-698e-48b0-90fa-ce6d53725c49', 'admin', '******', '2018-06-09 02:11:19', '171.214.224.98', 1, NULL, '2018-06-09 02:11:19'), -(202, 0, '3e7b4e39-05f4-4172-b0cd-41a38f74883c', 'admin', '******', '2018-06-09 02:24:53', '171.214.224.98', 1, NULL, '2018-06-09 02:24:53'), -(203, 0, 'b16aa946-b72d-4261-8b46-168571e63a33', 'admin', '******', '2018-06-09 02:25:48', '171.214.224.98', 1, NULL, '2018-06-09 02:25:48'), -(204, 0, 'd665bb91-dbce-45dd-8949-7dccb45d41c7', 'admin', '******', '2018-06-09 02:26:10', '171.214.224.98', 1, NULL, '2018-06-09 02:26:10'), -(205, 0, '2facef25-599f-46d7-9366-382637fe82c1', 'admin', '******', '2018-06-09 02:27:01', '171.214.224.98', 1, NULL, '2018-06-09 02:27:01'), -(206, 0, '99850533-eb48-4e07-ab1f-182038930bcb', 'admin', '******', '2018-07-06 15:22:13', '127.0.0.1', 1, '查看基本配置;修改站点基本配置;查看基本配置;查看附件配置;查看Robots.txt;后台管理日志留言列表(page:1);查看基本配置;修改站点基本配置;查看基本配置;', '2018-07-06 16:45:03'), -(207, 0, '117e92b5-cb13-438a-b66d-93539af36557', 'admin', '******', '2018-07-06 15:24:24', '127.0.0.1', 1, '查看广告分类列表页面;查看订单列表;查看在线支付订单列表;查看商品栏目列表页面;查看SMTP配置;查看附件配置;查看Robots.txt;查看广告分类列表页面;查看友情链接分类列表页面;查看广告列表;查看用户组列表;查看用户列表;查看商品栏目列表页面;查看商品列表;查看添加商品页面;', '2018-07-06 15:25:47'), -(208, 0, '4c8676a3-9c81-4f2c-9ca8-4ac97f0adaa2', 'admin', '******', '2018-07-06 15:25:54', '127.0.0.1', 1, '查看订单列表;查看用户列表;查看商品栏目列表页面;查看商品列表;查看基本配置;查看SMTP配置;查看附件配置;', '2018-07-06 15:26:15'), -(209, 0, 'b2ab302a-303f-4b05-bb17-01b89c28d6ca', 'admin', '******', '2018-07-06 15:27:41', '127.0.0.1', 1, '查看附件配置;', '2018-07-06 15:28:54'), -(210, 0, '352470ef-c216-404c-a1c2-36a289170d9d', 'admin', '******', '2018-07-06 15:30:02', '127.0.0.1', 1, '查看基本配置;查看SMTP配置;查看友情链接分类列表页面;查看广告分类列表页面;', '2018-07-06 15:30:19'), -(211, 0, '2a2893de-cbd9-40cf-b56b-936919003105', 'admin', '123456', '2018-07-06 15:32:25', '127.0.0.1', 0, '登录失败:密码错误。', '2018-07-06 15:32:25'), -(212, 0, '23f0c94c-6de4-4cf8-9d78-6d6e72e72857', 'admin', '******', '2018-07-06 15:43:32', '127.0.0.1', 1, '查看广告分类列表页面;查看SMTP配置;查看附件配置;查看Robots.txt;查看基本配置;', '2018-07-06 15:44:51'), -(213, 0, '7e3160ef-2b7d-4909-b1f6-c72ac0d0b648', 'admin', '******', '2018-07-06 15:48:50', '127.0.0.1', 1, '查看SMTP配置;查看文章栏目列表页面;查看添加文章栏目页面;', '2018-07-06 15:49:12'), -(214, 0, '9b81acf9-e516-4573-a859-3a1c9a95252f', 'admin', '******', '2018-07-06 16:22:38', '127.0.0.1', 1, '查看文章栏目列表页面;查看添加文章栏目页面;查看文章列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看基本配置;查看附件配置;查看Robots.txt;查看在线支付订单列表;查看订单列表;', '2018-07-06 16:24:02'), -(215, 0, 'df783e02-f995-49aa-94e9-04de9ba5e7b1', 'admin', '******', '2018-07-06 16:45:59', '127.0.0.1', 1, NULL, '2018-07-06 16:45:59'), -(216, 0, '3ea20b01-f7c2-4955-986b-e459d3e30470', 'admin', '******', '2018-07-06 16:46:29', '127.0.0.1', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看基本配置;查看SMTP配置;查看后台事件列表(keyword:;page:0;limit:20);查看管理组列表;查看添加管理页面;查看管理员列表查看添加管理员页面;查看添加后台事件页面;查看/编辑我的信息;后台管理日志留言列表(page:1);查看留言列表(page:1);查看留言分类列表页面;查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看附件配置;查看Robots.txt;', '2018-07-06 16:50:42'), -(217, 0, '40fd3f78-e887-4cd8-bf32-ccf0c7f357d4', 'admin', '******', '2018-07-07 12:13:23', '127.0.0.1', 1, '查看基本配置;查看用户组列表;', '2018-07-07 12:15:03'), -(218, 0, '22940c83-ff42-4ac0-9a6f-665a3929a1cc', 'admin', '******', '2018-07-09 00:01:08', '127.0.0.1', 1, NULL, '2018-07-09 00:01:08'), -(219, 0, 'cd7e2240-3c40-4f8b-9e4a-fdbe1c09212d', 'admin', '******', '2018-07-09 00:15:39', '127.0.0.1', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看广告分类列表页面;查看管理组列表;查看添加管理页面;查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);', '2018-07-09 00:19:17'), -(220, 0, '20a6709e-0c41-46e2-8268-1226ce03e1e2', 'admin', '******', '2018-07-09 00:28:17', '127.0.0.1', 1, '查看文章列表;', '2018-07-09 00:28:39'), -(221, 0, 'f6423680-ecc2-4c02-8aca-a17aad5fb418', 'admin', '******', '2018-07-09 06:49:22', '127.0.0.1', 1, '查看基本配置;查看商品栏目列表页面;查看商品列表;查看管理组列表;查看管理组(1)详情;', '2018-07-09 06:50:07'), -(222, 0, 'c1cec74a-7e82-4543-baea-39dbc0e77f0e', 'admin', '******', '2018-07-09 08:59:02', '127.0.0.1', 1, '查看基本配置;查看Robots.txt;查看附件配置;查看SMTP配置;查看文章栏目列表页面;查看文章列表;查看/编辑文章栏目(id:2)页面;查看商品栏目列表页面;查看商品列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看管理日志详情(222);查看/编辑我的信息;查看添加管理员页面;查看添加管理员页面;查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看基本配置;查看SMTP配置;查看Robots.txt;查看用户组列表;查看用户列表;查看在线支付订单列表;查看订单列表;查看文章栏目列表页面;查看文章列表;查看附件配置;查看留言分类列表页面;查看留言列表(page:1);查看商品栏目列表页面;查看商品列表;查看/编辑我的信息;', '2018-07-09 09:05:33'), -(223, 0, 'd36e9cee-d281-4b7e-b973-10cd1a2f5e1a', 'admin', '******', '2018-07-09 10:36:30', '127.0.0.1', 1, '查看基本配置;查看文章栏目列表页面;查看/编辑文章栏目(id:2)页面;查看商品栏目列表页面;查看/编辑商品栏目(id:1)页面;查看商品列表;查看添加商品页面;查看订单列表;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看/编辑管理员(admin);后台管理日志留言列表(page:1);查看管理日志详情(205);查看管理日志详情(199);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看添加广告页面;查看友情链接分类列表页面;查看友情链接列表;查看添加友情链接页面;查看/编辑我的信息;后台管理日志留言列表(page:1);查看管理日志详情(223);查看管理日志详情(221);查看管理日志详情(201);查看管理日志详情(199);', '2018-07-09 10:42:46'), -(224, 0, '8f3c68b5-798e-44c9-b3a1-8ed300724b1b', 'admin', '123456', '2018-07-09 15:41:29', '127.0.0.1', 0, '登录失败:密码错误。', '2018-07-09 15:41:29'), -(225, 0, '13045117-a3eb-4da7-9ab2-7fbea89ee30a', 'admin', '******', '2018-07-09 15:41:36', '127.0.0.1', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看文章栏目列表页面;查看文章列表;查看商品栏目列表页面;查看商品列表;查看添加商品页面;查看订单列表;查看在线支付订单列表;查看用户组列表;查看用户列表;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;后台管理日志留言列表(page:1);查看留言分类列表页面;查看留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;', '2018-07-09 15:46:16'), -(226, 0, '5a16710b-9a46-43bb-aefd-b6dda0417ba8', 'admin', '******', '2018-08-02 17:24:29', '127.0.0.1', 1, '后台管理日志留言列表(page:1);', '2018-08-02 17:24:44'), -(227, 0, '5c7ddec0-c3bd-49d8-a180-c8afe56c7ac8', 'admin', '******', '2018-08-10 10:10:35', '127.0.0.1', 1, '查看SMTP配置;', '2018-08-10 10:11:58'), -(228, 0, 'ea5128e4-114a-4d49-be43-15a6402bc24e', 'admin', '******', '2018-08-10 10:11:05', '127.0.0.1', 1, '查看基本配置;查看管理组列表;查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);后台管理日志留言列表(page:1);查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看订单列表;查看在线支付订单列表;', '2018-08-10 10:53:26'), -(229, 0, 'e0c1eb46-bc82-4c62-b562-7ed90adb86c4', 'admin', '******', '2018-08-10 10:11:19', '127.0.0.1', 1, NULL, '2018-08-10 10:11:19'), -(230, 0, '0cfa6f4c-8820-43eb-ab2f-e29c1d55cc77', 'admin', '******', '2018-08-10 10:11:27', '127.0.0.1', 1, '查看基本配置;查看文章栏目列表页面;查看/编辑文章栏目(id:2)页面;', '2018-08-10 10:13:05'), -(231, 0, '35f3d8a3-3c1b-42f3-863a-e8558e8096ae', 'admin', '123456', '2018-08-10 10:14:53', '127.0.0.1', 0, '登录失败:密码错误。', '2018-08-10 10:14:53'), -(232, 0, '6191b58d-f92e-48e4-8b7b-2bcdde3b558c', 'admin', '******', '2018-08-10 10:15:08', '127.0.0.1', 1, '查看基本配置;查看附件配置;查看Robots.txt;查看订单列表;查看管理组列表;查看管理员列表后台管理日志留言列表(page:1);', '2018-08-10 10:15:56'), -(233, 0, 'd668271a-3004-4ce1-8004-31caf6470d10', 'admin', '******', '2018-08-10 10:21:57', '127.0.0.1', 1, '查看管理组列表;查看管理组(1)详情;查看订单列表;查看商品栏目列表页面;查看文章栏目列表页面;查看文章列表;查看添加文章栏目页面;查看广告分类列表页面;查看广告列表;查看友情链接分类列表页面;查看友情链接列表;查看留言分类列表页面;查看留言列表(page:1);查看管理员列表查看后台事件列表(keyword:;page:0;limit:20);查看/编辑我的信息;', '2018-08-10 10:27:44'), -(234, 0, '24c3a9c5-7e7a-42bb-83d1-c10a6cd40c81', 'admin', '******', '2020-03-19 16:43:19', '127.0.0.1', 1, NULL, '2020-03-19 16:43:19'), -(235, 0, '0cb9989f-a6ef-414a-8ce3-266622852df3', 'Admin', 'Admin', '2020-03-19 18:52:25', '127.0.0.1', 0, '登录失败:密码错误。', '2020-03-19 18:52:25'); -INSERT INTO `AdminLog` (`Id`, `UId`, `GUID`, `UserName`, `PassWord`, `LoginTime`, `LoginIP`, `IsLoginOK`, `Actions`, `LastUpdateTime`) VALUES -(236, 0, '642c8250-9621-4c08-8ae4-4553e46151cb', 'Admin', 'Admin', '2020-03-19 18:52:32', '127.0.0.1', 0, '登录失败:密码错误。', '2020-03-19 18:52:32'), -(237, 0, '37693f68-c183-4fcd-9014-8eba70c2f78b', 'admin', '******', '2020-03-20 12:08:41', '127.0.0.1', 1, NULL, '2020-03-20 12:08:41'); - --- -------------------------------------------------------- - --- --- 表的结构 `AdminMenu` --- - -CREATE TABLE `AdminMenu` ( - `Id` int(11) NOT NULL COMMENT '编号', - `MenuKey` varchar(50) DEFAULT NULL COMMENT '标识key', - `MenuName` varchar(50) DEFAULT NULL COMMENT '页面名称', - `PermissionKey` varchar(50) DEFAULT NULL COMMENT '页面名称', - `Description` varchar(250) DEFAULT NULL COMMENT '介绍', - `Link` varchar(250) DEFAULT NULL COMMENT '页面连接地址', - `PId` int(11) NOT NULL COMMENT '上级ID', - `Level` int(11) NOT NULL COMMENT '级别', - `Location` varchar(100) DEFAULT NULL COMMENT '路径', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `Rank` int(11) NOT NULL COMMENT '排序', - `Icon` varchar(100) DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) DEFAULT NULL COMMENT '样式名称' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='后台菜单' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `AdminMenu` --- - -INSERT INTO `AdminMenu` (`Id`, `MenuKey`, `MenuName`, `PermissionKey`, `Description`, `Link`, `PId`, `Level`, `Location`, `IsHide`, `Rank`, `Icon`, `ClassName`) VALUES -(1, 'home', '主页', NULL, NULL, 'Index/Main', 0, 0, '0,', 0, 0, NULL, 'fa-home'), -(2, 'system', '系统设置', NULL, NULL, '#', 0, 0, '0,', 0, 1, NULL, 'fa-gears'), -(3, 'baseconfig', '基本配置', NULL, NULL, 'System/BaseConfig', 2, 1, '0,2,', 0, 0, NULL, NULL), -(4, 'smptconfig', 'SMTP设置', NULL, NULL, 'System/SmtpConfig', 2, 1, '0,2,', 0, 0, NULL, NULL), -(5, 'attachconfig', '附件设置', NULL, NULL, 'System/AttachConfig', 2, 1, '0,2,', 0, 0, NULL, NULL), -(6, 'articlesys', '文章系统', NULL, NULL, '#', 0, 0, '0,', 0, 2, NULL, 'fa-book'), -(7, 'articlecategory', '文章栏目管理', NULL, NULL, 'Article/ArticleCategoryList', 6, 1, '0,6,', 0, 0, NULL, NULL), -(8, 'article', '文章管理', NULL, NULL, 'Article/ArticleList', 6, 1, '0,6,', 0, 0, NULL, NULL), -(9, 'productsys', '商品系统', NULL, NULL, '#', 0, 0, '0,', 0, 3, NULL, 'fa-balance-scale'), -(10, 'productcategory', '商品分类管理', NULL, NULL, 'Product/CategoryList', 9, 1, '0,9,', 0, 0, NULL, NULL), -(11, 'product', '商品管理', NULL, NULL, 'Product/ProductList', 9, 1, '0,9,', 0, 1, NULL, NULL), -(12, 'ordersys', '订单系统', NULL, NULL, '#', 0, 0, '0,', 0, 4, NULL, 'fa-shopping-bag'), -(13, 'order', '商品订单管理', NULL, NULL, 'Order/OrderList', 12, 1, '0,12,', 0, 0, NULL, NULL), -(14, 'payonline', '支付记录', NULL, NULL, 'Order/PayOnlineList', 12, 1, '0,12,', 0, 1, NULL, NULL), -(15, 'user', '用户系统', NULL, NULL, '#', 0, 0, '0,', 0, 5, NULL, 'fa-user'), -(16, 'memberrole', '用户组管理', NULL, NULL, 'Member/MemberRole', 15, 1, '0,15,', 0, 0, NULL, NULL), -(17, 'members', '用户管理', NULL, NULL, 'Member/Members', 15, 1, '0,15,', 0, 1, NULL, NULL), -(18, 'permissionsys', '后台权限', NULL, NULL, '#', 0, 0, '0,', 0, 6, NULL, 'fa-users'), -(19, 'adminrole', '管理组管理', NULL, NULL, 'Member/AdminRole', 18, 1, '0,18,', 0, 0, NULL, NULL), -(20, 'admins', '管理员管理', NULL, NULL, 'Member/Admins', 18, 1, '0,18,', 0, 1, NULL, NULL), -(21, 'eventkey', '事件权限管理', NULL, NULL, 'Permission/EventKey', 18, 1, '0,18,', 0, 3, NULL, NULL), -(22, 'adminmenu', '后台栏目管理', NULL, NULL, 'Permission/AdminMenuList', 18, 1, '0,18,', 0, 4, NULL, NULL), -(23, 'editme', ' 修改密码', NULL, NULL, 'Member/EditMe', 18, 1, '0,18,', 0, 5, NULL, NULL), -(24, 'guestbooksys', '留言系统', NULL, NULL, '#', 0, 0, '0,', 0, 7, NULL, 'fa-rss-square'), -(25, 'guestbookkinds', '留言分类管理', NULL, NULL, 'Guestbook/GuestbookCategorys', 24, 1, '0,24,', 0, 0, NULL, NULL), -(26, 'guestbook', '留言管理', NULL, NULL, 'Guestbook/GuestbookList', 24, 1, '0,24,', 0, 0, NULL, NULL), -(27, 'other', '其他', NULL, NULL, '#', 0, 0, '0,', 0, 99, NULL, 'fa-square-o'), -(28, 'adskinds', '广告分类管理', NULL, NULL, 'Other/AdsCategoryList', 27, 1, '0,27,', 0, 0, NULL, NULL), -(29, 'ads', '广告管理', NULL, NULL, 'Other/AdsList', 27, 1, '0,27,', 0, 1, NULL, NULL), -(30, 'linkkinds', '友情连接分类管理', NULL, NULL, 'Other/LinkCategoryList', 27, 1, '0,27,', 0, 2, NULL, NULL), -(31, 'link', '友情连接管理', NULL, NULL, 'Other/LinkList', 27, 1, '0,27,', 0, 3, NULL, NULL), -(32, 'weixinsys', '微信公众号管理', NULL, NULL, '#', 0, 0, '0,', 0, 8, NULL, 'fa-file-word-o'), -(33, 'wxautoreply', '关注自动回复', NULL, NULL, 'Weixin/SubscribeReply', 32, 1, '0,32,', 0, 0, NULL, NULL), -(34, 'wxmenu', '自定义菜单管理', NULL, NULL, 'Weixin/Menu', 32, 1, '0,32,', 0, 0, NULL, NULL), -(35, 'wxkeywordreply', '关键字回复', NULL, NULL, 'Weixin/ReplyRule', 32, 1, '0,32,', 0, 0, NULL, NULL), -(36, 'clickreplyrule', '点击事件自动回复', NULL, NULL, 'Weixin/ClickReplyRule', 32, 1, '0,32,', 0, 0, NULL, NULL), -(37, 'robots', 'Robots文档设置', NULL, NULL, 'System/Robots', 2, 1, '0,2,', 0, 3, NULL, NULL), -(38, 'admincplog', '后台管理日志', NULL, NULL, 'Member/AdminCPLogList', 18, 1, '0,18,', 0, 10, NULL, NULL); - --- -------------------------------------------------------- - --- --- 表的结构 `AdminMenuEvent` --- - -CREATE TABLE `AdminMenuEvent` ( - `Id` int(11) NOT NULL COMMENT '编号', - `MenuId` int(11) NOT NULL COMMENT '菜单ID', - `MenuKey` varchar(100) DEFAULT NULL COMMENT '菜单key', - `EventId` int(11) NOT NULL COMMENT '事件ID', - `EventKey` varchar(100) DEFAULT NULL COMMENT '事件key', - `EventName` varchar(100) DEFAULT NULL COMMENT '事件名称' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='后台菜单对应的事件权限' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `AdminMenuEvent` --- - -INSERT INTO `AdminMenuEvent` (`Id`, `MenuId`, `MenuKey`, `EventId`, `EventKey`, `EventName`) VALUES -(1, 1, 'home', 4, 'view', '查看'), -(2, 3, 'baseconfig', 2, 'edit', '修改'), -(3, 3, 'baseconfig', 4, 'view', '查看'), -(4, 4, 'smptconfig', 2, 'edit', '修改'), -(5, 4, 'smptconfig', 4, 'view', '查看'), -(6, 5, 'attachconfig', 2, 'edit', '修改'), -(7, 5, 'attachconfig', 4, 'view', '查看'), -(8, 7, 'articlecategory', 1, 'add', '添加'), -(9, 7, 'articlecategory', 2, 'edit', '修改'), -(10, 7, 'articlecategory', 3, 'del', '删除'), -(11, 7, 'articlecategory', 4, 'view', '查看'), -(12, 7, 'articlecategory', 5, 'viewlist', '查看列表'), -(13, 7, 'articlecategory', 10, 'recycle', '回收站'), -(14, 8, 'article', 1, 'add', '添加'), -(15, 8, 'article', 2, 'edit', '修改'), -(16, 8, 'article', 3, 'del', '删除'), -(17, 8, 'article', 4, 'view', '查看'), -(18, 8, 'article', 5, 'viewlist', '查看列表'), -(19, 8, 'article', 6, 'import', '导入'), -(20, 8, 'article', 7, 'export', '导出'), -(21, 8, 'article', 8, 'filter', '搜索'), -(22, 8, 'article', 9, 'batch', '批量操作'), -(23, 8, 'article', 10, 'recycle', '回收站'), -(24, 8, 'article', 11, 'confirm', '确认'), -(25, 10, 'productcategory', 1, 'add', '添加'), -(26, 10, 'productcategory', 2, 'edit', '修改'), -(27, 10, 'productcategory', 3, 'del', '删除'), -(28, 10, 'productcategory', 4, 'view', '查看'), -(29, 10, 'productcategory', 5, 'viewlist', '查看列表'), -(30, 10, 'productcategory', 10, 'recycle', '回收站'), -(31, 11, 'product', 1, 'add', '添加'), -(32, 11, 'product', 2, 'edit', '修改'), -(33, 11, 'product', 3, 'del', '删除'), -(34, 11, 'product', 4, 'view', '查看'), -(35, 11, 'product', 5, 'viewlist', '查看列表'), -(36, 11, 'product', 6, 'import', '导入'), -(37, 11, 'product', 7, 'export', '导出'), -(38, 11, 'product', 8, 'filter', '搜索'), -(39, 11, 'product', 9, 'batch', '批量操作'), -(40, 11, 'product', 10, 'recycle', '回收站'), -(41, 11, 'product', 11, 'confirm', '确认'), -(42, 13, 'order', 1, 'add', '添加'), -(43, 13, 'order', 2, 'edit', '修改'), -(44, 13, 'order', 3, 'del', '删除'), -(45, 13, 'order', 4, 'view', '查看'), -(46, 13, 'order', 5, 'viewlist', '查看列表'), -(47, 13, 'order', 6, 'import', '导入'), -(48, 13, 'order', 7, 'export', '导出'), -(49, 13, 'order', 8, 'filter', '搜索'), -(50, 13, 'order', 9, 'batch', '批量操作'), -(51, 13, 'order', 10, 'recycle', '回收站'), -(52, 13, 'order', 11, 'confirm', '确认'), -(53, 14, 'payonline', 2, 'edit', '修改'), -(54, 14, 'payonline', 3, 'del', '删除'), -(55, 14, 'payonline', 4, 'view', '查看'), -(56, 14, 'payonline', 5, 'viewlist', '查看列表'), -(57, 14, 'payonline', 6, 'import', '导入'), -(58, 14, 'payonline', 7, 'export', '导出'), -(59, 14, 'payonline', 8, 'filter', '搜索'), -(60, 14, 'payonline', 9, 'batch', '批量操作'), -(61, 14, 'payonline', 10, 'recycle', '回收站'), -(62, 14, 'payonline', 11, 'confirm', '确认'), -(63, 16, 'memberrole', 1, 'add', '添加'), -(64, 16, 'memberrole', 2, 'edit', '修改'), -(65, 16, 'memberrole', 3, 'del', '删除'), -(66, 16, 'memberrole', 4, 'view', '查看'), -(67, 16, 'memberrole', 5, 'viewlist', '查看列表'), -(68, 16, 'memberrole', 11, 'confirm', '确认'), -(69, 17, 'members', 1, 'add', '添加'), -(70, 17, 'members', 2, 'edit', '修改'), -(71, 17, 'members', 3, 'del', '删除'), -(72, 17, 'members', 4, 'view', '查看'), -(73, 17, 'members', 5, 'viewlist', '查看列表'), -(74, 17, 'members', 6, 'import', '导入'), -(75, 17, 'members', 7, 'export', '导出'), -(76, 17, 'members', 8, 'filter', '搜索'), -(77, 17, 'members', 9, 'batch', '批量操作'), -(78, 17, 'members', 10, 'recycle', '回收站'), -(79, 17, 'members', 11, 'confirm', '确认'), -(80, 19, 'adminrole', 1, 'add', '添加'), -(81, 19, 'adminrole', 2, 'edit', '修改'), -(82, 19, 'adminrole', 3, 'del', '删除'), -(83, 19, 'adminrole', 4, 'view', '查看'), -(84, 19, 'adminrole', 5, 'viewlist', '查看列表'), -(85, 19, 'adminrole', 8, 'filter', '搜索'), -(86, 19, 'adminrole', 11, 'confirm', '确认'), -(87, 20, 'admins', 1, 'add', '添加'), -(88, 20, 'admins', 2, 'edit', '修改'), -(89, 20, 'admins', 3, 'del', '删除'), -(90, 20, 'admins', 4, 'view', '查看'), -(91, 20, 'admins', 5, 'viewlist', '查看列表'), -(92, 20, 'admins', 6, 'import', '导入'), -(93, 20, 'admins', 7, 'export', '导出'), -(94, 20, 'admins', 8, 'filter', '搜索'), -(95, 20, 'admins', 9, 'batch', '批量操作'), -(96, 20, 'admins', 10, 'recycle', '回收站'), -(97, 20, 'admins', 11, 'confirm', '确认'), -(98, 21, 'eventkey', 1, 'add', '添加'), -(99, 21, 'eventkey', 2, 'edit', '修改'), -(100, 21, 'eventkey', 4, 'view', '查看'), -(101, 21, 'eventkey', 5, 'viewlist', '查看列表'), -(102, 21, 'eventkey', 8, 'filter', '搜索'), -(103, 21, 'eventkey', 10, 'recycle', '回收站'), -(104, 21, 'eventkey', 11, 'confirm', '确认'), -(105, 22, 'adminmenu', 1, 'add', '添加'), -(106, 22, 'adminmenu', 2, 'edit', '修改'), -(107, 22, 'adminmenu', 3, 'del', '删除'), -(108, 22, 'adminmenu', 4, 'view', '查看'), -(109, 22, 'adminmenu', 5, 'viewlist', '查看列表'), -(110, 22, 'adminmenu', 6, 'import', '导入'), -(111, 22, 'adminmenu', 7, 'export', '导出'), -(112, 22, 'adminmenu', 8, 'filter', '搜索'), -(113, 22, 'adminmenu', 9, 'batch', '批量操作'), -(114, 22, 'adminmenu', 10, 'recycle', '回收站'), -(115, 22, 'adminmenu', 11, 'confirm', '确认'), -(116, 23, 'editme', 2, 'edit', '修改'), -(117, 23, 'editme', 4, 'view', '查看'), -(118, 25, 'guestbookkinds', 1, 'add', '添加'), -(119, 25, 'guestbookkinds', 2, 'edit', '修改'), -(120, 25, 'guestbookkinds', 3, 'del', '删除'), -(121, 25, 'guestbookkinds', 4, 'view', '查看'), -(122, 25, 'guestbookkinds', 5, 'viewlist', '查看列表'), -(123, 25, 'guestbookkinds', 8, 'filter', '搜索'), -(124, 25, 'guestbookkinds', 10, 'recycle', '回收站'), -(125, 25, 'guestbookkinds', 11, 'confirm', '确认'), -(126, 26, 'guestbook', 2, 'edit', '修改'), -(127, 26, 'guestbook', 3, 'del', '删除'), -(128, 26, 'guestbook', 4, 'view', '查看'), -(129, 26, 'guestbook', 5, 'viewlist', '查看列表'), -(130, 26, 'guestbook', 6, 'import', '导入'), -(131, 26, 'guestbook', 7, 'export', '导出'), -(132, 26, 'guestbook', 8, 'filter', '搜索'), -(133, 26, 'guestbook', 9, 'batch', '批量操作'), -(134, 26, 'guestbook', 10, 'recycle', '回收站'), -(135, 26, 'guestbook', 11, 'confirm', '确认'), -(136, 28, 'adskinds', 1, 'add', '添加'), -(137, 28, 'adskinds', 2, 'edit', '修改'), -(138, 28, 'adskinds', 3, 'del', '删除'), -(139, 28, 'adskinds', 4, 'view', '查看'), -(140, 28, 'adskinds', 5, 'viewlist', '查看列表'), -(141, 29, 'ads', 1, 'add', '添加'), -(142, 29, 'ads', 2, 'edit', '修改'), -(143, 29, 'ads', 3, 'del', '删除'), -(144, 29, 'ads', 4, 'view', '查看'), -(145, 29, 'ads', 5, 'viewlist', '查看列表'), -(146, 30, 'linkkinds', 1, 'add', '添加'), -(147, 30, 'linkkinds', 2, 'edit', '修改'), -(148, 30, 'linkkinds', 3, 'del', '删除'), -(149, 30, 'linkkinds', 4, 'view', '查看'), -(150, 30, 'linkkinds', 5, 'viewlist', '查看列表'), -(151, 31, 'link', 1, 'add', '添加'), -(152, 31, 'link', 2, 'edit', '修改'), -(153, 31, 'link', 3, 'del', '删除'), -(154, 31, 'link', 4, 'view', '查看'), -(155, 31, 'link', 5, 'viewlist', '查看列表'), -(156, 31, 'link', 6, 'import', '导入'), -(157, 31, 'link', 7, 'export', '导出'), -(158, 31, 'link', 8, 'filter', '搜索'), -(159, 31, 'link', 9, 'batch', '批量操作'), -(160, 31, 'link', 10, 'recycle', '回收站'), -(161, 31, 'link', 11, 'confirm', '确认'), -(162, 33, 'wxautoreply', 2, 'edit', '修改'), -(163, 33, 'wxautoreply', 4, 'view', '查看'), -(164, 34, 'wxmenu', 2, 'edit', '修改'), -(165, 34, 'wxmenu', 4, 'view', '查看'), -(166, 35, 'wxkeywordreply', 1, 'add', '添加'), -(167, 35, 'wxkeywordreply', 2, 'edit', '修改'), -(168, 35, 'wxkeywordreply', 3, 'del', '删除'), -(169, 35, 'wxkeywordreply', 4, 'view', '查看'), -(170, 35, 'wxkeywordreply', 5, 'viewlist', '查看列表'), -(171, 35, 'wxkeywordreply', 6, 'import', '导入'), -(172, 35, 'wxkeywordreply', 7, 'export', '导出'), -(173, 35, 'wxkeywordreply', 8, 'filter', '搜索'), -(174, 35, 'wxkeywordreply', 9, 'batch', '批量操作'), -(175, 35, 'wxkeywordreply', 10, 'recycle', '回收站'), -(176, 35, 'wxkeywordreply', 11, 'confirm', '确认'), -(177, 36, 'clickreplyrule', 1, 'add', '添加'), -(178, 36, 'clickreplyrule', 2, 'edit', '修改'), -(179, 36, 'clickreplyrule', 3, 'del', '删除'), -(180, 36, 'clickreplyrule', 4, 'view', '查看'), -(181, 36, 'clickreplyrule', 5, 'viewlist', '查看列表'), -(182, 36, 'clickreplyrule', 6, 'import', '导入'), -(183, 36, 'clickreplyrule', 7, 'export', '导出'), -(184, 36, 'clickreplyrule', 8, 'filter', '搜索'), -(185, 36, 'clickreplyrule', 9, 'batch', '批量操作'), -(186, 36, 'clickreplyrule', 10, 'recycle', '回收站'), -(187, 36, 'clickreplyrule', 11, 'confirm', '确认'), -(188, 37, 'robots', 2, 'edit', '修改'), -(189, 37, 'robots', 4, 'view', '查看'), -(190, 38, 'admincplog', 4, 'view', '查看'), -(191, 38, 'admincplog', 5, 'viewlist', '查看列表'), -(192, 3, 'baseconfig', 5, 'viewlist', '查看列表'), -(193, 3, 'baseconfig', 6, 'import', '导入'); - --- -------------------------------------------------------- - --- --- 表的结构 `AdminRoles` --- - -CREATE TABLE `AdminRoles` ( - `Id` int(11) NOT NULL COMMENT '编号', - `RoleType` int(11) NOT NULL COMMENT '角色类型', - `RoleName` varchar(50) DEFAULT NULL COMMENT '角色名称', - `RoleDescription` varchar(250) DEFAULT NULL COMMENT '角色简单介绍', - `IsSuperAdmin` int(11) NOT NULL COMMENT '是否是超级管理员', - `Stars` int(11) NOT NULL COMMENT '星级', - `NotAllowDel` int(11) NOT NULL COMMENT '是否不允许删除', - `Rank` int(11) NOT NULL COMMENT '排序', - `Color` varchar(20) DEFAULT NULL COMMENT '颜色', - `Menus` text COMMENT '管理菜单', - `Powers` text COMMENT '权限' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理角色' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `AdminRoles` --- - -INSERT INTO `AdminRoles` (`Id`, `RoleType`, `RoleName`, `RoleDescription`, `IsSuperAdmin`, `Stars`, `NotAllowDel`, `Rank`, `Color`, `Menus`, `Powers`) VALUES -(1, 0, '超级管理员', '系统超级管理员', 1, 5, 1, 0, '', '', ''); - --- -------------------------------------------------------- - --- --- 表的结构 `Ads` --- - -CREATE TABLE `Ads` ( - `Id` int(11) NOT NULL COMMENT '编号', - `Title` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '广告标题', - `Content` text COMMENT '广告详情JSON', - `KId` int(11) NOT NULL COMMENT '分类ID', - `TId` int(11) NOT NULL COMMENT '广告代码类型:0代码、1文字广告、2图片广告、3Flash广告、4幻灯片广告、5漂浮广告、6对联浮动图片广告', - `StartTime` datetime DEFAULT NULL COMMENT '起始时间', - `EndTime` datetime DEFAULT NULL COMMENT '结束时间', - `IsDisabled` enum('N','Y') NOT NULL COMMENT '是否禁用广告', - `Sequence` int(11) NOT NULL COMMENT '排序,默认999' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='广告详情' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `Ads` --- - -INSERT INTO `Ads` (`Id`, `Title`, `Content`, `KId`, `TId`, `StartTime`, `EndTime`, `IsDisabled`, `Sequence`) VALUES -(1, '首页banner广告', '[{\"img\":\"/images/default/slide-1.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"},{\"img\":\"/images/default/slide-2.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"},{\"img\":\"/images/default/slide-3.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"},{\"img\":\"/images/default/slide-4.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"},{\"img\":\"/images/default/slide-5.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"}]', 1, 4, '2000-01-01 00:00:00', '2999-01-01 00:00:00', 'N', 999), -(2, '移动端首页Banner', '[{\"img\":\"/images/default/slide-1.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"},{\"img\":\"/images/default/slide-2.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"},{\"img\":\"/images/default/slide-3.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"},{\"img\":\"/images/default/slide-4.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"},{\"img\":\"/images/default/slide-5.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"}]', 1, 4, '2000-01-01 00:00:00', '2999-01-01 00:00:00', 'N', 999); - --- -------------------------------------------------------- - --- --- 表的结构 `AdsKind` --- - -CREATE TABLE `AdsKind` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KindName` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '广告类别名称', - `KindInfo` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '简单说明', - `Rank` int(11) NOT NULL COMMENT '排序' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='广告类别' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `AdsKind` --- - -INSERT INTO `AdsKind` (`Id`, `KindName`, `KindInfo`, `Rank`) VALUES -(1, '默认广告', NULL, 0); - --- -------------------------------------------------------- - --- --- 表的结构 `Article` --- - -CREATE TABLE `Article` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KId` int(11) NOT NULL COMMENT '栏目ID', - `Title` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '标题', - `SubTitle` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '副标题', - `Content` text COMMENT '内容', - `Keyword` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板', - `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', - `IsNew` int(11) NOT NULL COMMENT '是否最新', - `IsBest` int(11) NOT NULL COMMENT '是否推荐', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsTop` int(11) NOT NULL COMMENT '是否置顶', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `Hits` int(11) NOT NULL COMMENT '点击数量', - `Sequence` int(11) NOT NULL COMMENT '排序', - `CommentCount` int(11) NOT NULL COMMENT '评论数量', - `Icon` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT 'banner图片', - `Pic` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - `Tags` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT 'TAG', - `Origin` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '来源', - `OriginURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '来源地址', - `ItemImg` text COMMENT '更多图片', - `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime DEFAULT NULL COMMENT '时间', - `Location` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '路径', - `FilePath` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '存放目录' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `Article` --- - -INSERT INTO `Article` (`Id`, `KId`, `Title`, `SubTitle`, `Content`, `Keyword`, `Description`, `LinkURL`, `TitleColor`, `TemplateFile`, `IsRecommend`, `IsNew`, `IsBest`, `IsHide`, `IsLock`, `IsDel`, `IsTop`, `IsComment`, `IsMember`, `Hits`, `Sequence`, `CommentCount`, `Icon`, `ClassName`, `BannerImg`, `Pic`, `AdsId`, `Tags`, `Origin`, `OriginURL`, `ItemImg`, `AuthorId`, `AddTime`, `UpdateTime`, `Location`, `FilePath`) VALUES -(1, 1, '关于我们', 'About Us', '

内容管理系统(英语:content management system,缩写为 CMS)是指在一个合作模式下,用于管理工作流程的一套制度。该系统可应用于手工操作中,也可以应用到计算机或网络里。作为一种中央储存器(central repository),内容管理系统可将相关内容集中储存并具有群组管理、版本控制等功能。版本控制是内容管理系统的一个主要优势。

\n\n

内容是任何类型的数字信息的结合体,可以是文本、图形图像、Web页面、业务文档、数据库表单、视频、声音、XML文件等。应该说,内容是一个比数据、文档和信息更广的概念,是对各种结构化数据、非结构化文档、信息的聚合。管理就是施加在“内容”对象上的一系列处理过程,包括收集、存储、审批、整理、定位、转换、分发、搜索、分析等,目的是为了使“内容”能够在正确的时间、以正确的形式传递到正确的地点和人。

\n\n

内容管理可以定义为:协助组织和个人,借助信息技术,实现内容的创建、储存、分享、应用、检索,并在企业个人、组织、业务、战略等诸方面产生价值的过程。而内容管理系统就是能够支撑内容管理的一种工具或一套工具的软件系统。

\n\n

内容管理系统的定义可以很狭窄,通常是指门户或商业网站的发布和管理系统;定义也可以很宽泛,个人网站系统也可归入其中。Wiki也是一种内容管理系统,Blog也算是一种内容管理系统。

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 999, 0, NULL, NULL, NULL, '/images/default/slide-3.jpg', 0, NULL, NULL, NULL, '/userfiles/images/2018/20180413145904(1).png|||', 1, '2018-04-18 20:35:54', '2018-12-02 17:14:13', NULL, NULL), -(2, 10, '联系我们', NULL, '

联系我们

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-15 23:58:24', '2018-12-01 22:44:45', NULL, NULL), -(3, 1, '企业文化', NULL, '

企业文化

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:19', NULL, NULL, NULL), -(4, 1, '发展历程', NULL, '

发展历程

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:28', NULL, NULL, NULL), -(5, 1, '组织架构', NULL, '

组织架构

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:38', NULL, NULL, NULL), -(6, 1, '荣誉证书', NULL, '

荣誉证书

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:49', NULL, NULL, NULL), -(7, 6, 'COMCMS v0.9 正式发布,PC版前端演示', 'COMCMS v0.9 正式发布,PC版前端演示', '

COMCMS v0.9 正式发布,PC版前端演示

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:52:15', NULL, NULL, NULL), -(8, 7, '行业资讯行业资讯行业资讯行业资讯', NULL, '

行业资讯行业资讯行业资讯行业资讯

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:54:48', NULL, NULL, NULL), -(9, 6, 'COMCMS v0.9 正式发布,PC版前端演示2', NULL, '

COMCMS v0.9 正式发布,PC版前端演示2

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:55:39', NULL, NULL, NULL), -(10, 6, 'COMCMS v0.9 正式发布,PC版前端演示3', NULL, '

COMCMS v0.9 正式发布,PC版前端演示3

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:56:18', NULL, NULL, NULL), -(11, 6, 'COMCMS v0.9 正式发布,PC版前端演示4', NULL, '

COMCMS v0.9 正式发布,PC版前端演示4

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:56:27', '2019-10-30 17:10:39', NULL, NULL); - --- -------------------------------------------------------- - --- --- 表的结构 `ArticleCategory` --- - -CREATE TABLE `ArticleCategory` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KindName` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '栏目名称', - `SubTitle` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '栏目副标题', - `KindTitle` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '栏目标题,填写则在浏览器替换此标题', - `Keyword` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板', - `DetailTemplateFile` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '详情模板', - `KindDomain` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '类别域名(保留)', - `IsList` int(11) NOT NULL COMMENT '是否为列表页面', - `PageSize` int(11) NOT NULL COMMENT '每页显示数量', - `PId` int(11) NOT NULL COMMENT '上级ID', - `Level` int(11) NOT NULL COMMENT '级别', - `Location` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '路径', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsShowSubDetail` int(11) NOT NULL COMMENT '是否显示下级栏目内容', - `CatalogId` int(11) NOT NULL COMMENT '模型ID', - `Counts` int(11) NOT NULL COMMENT '详情数量,缓存', - `Rank` int(11) NOT NULL COMMENT '排序', - `Icon` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT 'banner图片', - `KindInfo` text COMMENT '栏目详细介绍', - `Pic` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - `FilePath` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '目录路径' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章栏目' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `ArticleCategory` --- - -INSERT INTO `ArticleCategory` (`Id`, `KindName`, `SubTitle`, `KindTitle`, `Keyword`, `Description`, `LinkURL`, `TitleColor`, `TemplateFile`, `DetailTemplateFile`, `KindDomain`, `IsList`, `PageSize`, `PId`, `Level`, `Location`, `IsHide`, `IsLock`, `IsDel`, `IsComment`, `IsMember`, `IsShowSubDetail`, `CatalogId`, `Counts`, `Rank`, `Icon`, `ClassName`, `BannerImg`, `KindInfo`, `Pic`, `AdsId`, `FilePath`) VALUES -(1, '关于我们', NULL, NULL, NULL, NULL, '1', NULL, 'Index.cshtml', 'Detail_About.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 5, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(2, '新闻资讯', NULL, NULL, NULL, NULL, '/Article/Index/6', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(3, '项目案例', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(4, '用户服务', NULL, NULL, NULL, NULL, '/Article/Index/8', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(5, '联系我们', NULL, NULL, NULL, NULL, '/Article/Index/10', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(6, '公司新闻', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 2, 2, 1, '0,2,', 0, 0, 0, 0, 0, 1, 0, 4, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(7, '行业资讯', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 2, 1, '0,2,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(8, '产品使用', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(9, '产品下载', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(10, '联系方式', NULL, NULL, NULL, NULL, '2', NULL, 'Index.cshtml', 'Detail_Contact.cshtml', NULL, 1, 15, 5, 1, '0,5,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(11, '在线留言', NULL, NULL, NULL, NULL, NULL, NULL, 'Index_Guestbook.cshtml', 'Detail.cshtml', NULL, 0, 15, 5, 1, '0,5,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(12, '常见问题', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); - --- -------------------------------------------------------- - --- --- 表的结构 `BalanceChangeLog` --- - -CREATE TABLE `BalanceChangeLog` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `AdminId` int(11) NOT NULL COMMENT '管理员ID', - `UserName` varchar(20) DEFAULT NULL COMMENT '用户名', - `AddTime` datetime DEFAULT NULL COMMENT '时间', - `IP` varchar(20) DEFAULT NULL COMMENT '登录IP', - `Actions` varchar(100) DEFAULT NULL COMMENT '记录', - `Reward` decimal(10,0) NOT NULL COMMENT '总积分', - `BeforChange` decimal(10,0) NOT NULL COMMENT '总积分', - `AfterChange` decimal(10,0) NOT NULL COMMENT '总积分', - `LogDetails` varchar(250) DEFAULT NULL COMMENT '详细记录', - `TypeId` int(11) NOT NULL COMMENT '类型 0 充值 1 购买 2 赠送 3 退款 4 分销提成', - `OrderId` int(11) NOT NULL COMMENT '订单ID', - `OrderNum` varchar(50) DEFAULT NULL COMMENT '订单号' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户余额变化记录' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `Category` --- - -CREATE TABLE `Category` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KindName` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '栏目名称', - `SubTitle` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '栏目副标题', - `KindTitle` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '栏目标题,填写则在浏览器替换此标题', - `Keyword` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板', - `DetailTemplateFile` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '详情模板', - `KindDomain` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '类别域名(保留)', - `IsList` int(11) NOT NULL COMMENT '是否为列表页面', - `PageSize` int(11) NOT NULL COMMENT '每页显示数量', - `PId` int(11) NOT NULL COMMENT '上级ID', - `Level` int(11) NOT NULL COMMENT '级别', - `Location` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '路径', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsShowSubDetail` int(11) NOT NULL COMMENT '是否显示下级栏目内容', - `CatalogId` int(11) NOT NULL COMMENT '模型ID', - `Counts` int(11) NOT NULL COMMENT '详情数量,缓存', - `Rank` int(11) NOT NULL COMMENT '排序', - `Icon` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT 'banner图片', - `KindInfo` text COMMENT '栏目详细介绍', - `Pic` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - `FilePath` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '目录路径' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品栏目' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `Category` --- - -INSERT INTO `Category` (`Id`, `KindName`, `SubTitle`, `KindTitle`, `Keyword`, `Description`, `LinkURL`, `TitleColor`, `TemplateFile`, `DetailTemplateFile`, `KindDomain`, `IsList`, `PageSize`, `PId`, `Level`, `Location`, `IsHide`, `IsLock`, `IsDel`, `IsComment`, `IsMember`, `IsShowSubDetail`, `CatalogId`, `Counts`, `Rank`, `Icon`, `ClassName`, `BannerImg`, `KindInfo`, `Pic`, `AdsId`, `FilePath`) VALUES -(1, '网站系统', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 2, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(2, '微商城系统', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 2, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL), -(3, '小程序系统', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); - --- -------------------------------------------------------- - --- --- 表的结构 `Config` --- - -CREATE TABLE `Config` ( - `Id` int(11) NOT NULL COMMENT '编号', - `SiteName` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '站点名称', - `SiteUrl` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '站点URL', - `SiteLogo` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '站点LOGO', - `ICP` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT 'ICP备案', - `SiteEmail` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '联系我们Email', - `SiteTel` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '网站电话', - `Copyright` text COMMENT '版权所有', - `IsCloseSite` enum('N','Y') NOT NULL COMMENT '是否关闭网站', - `CloseReason` text COMMENT '关闭原因', - `CountScript` text COMMENT '统计代码', - `WeiboQRCode` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '微博二维码', - `WinxinQRCode` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '微信二维码', - `Keyword` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '关键字', - `Description` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '描述', - `IndexTitle` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '首页标题', - `IsRewrite` int(11) NOT NULL COMMENT '是否URL地址重写', - `SearchMinTime` int(11) NOT NULL COMMENT '搜索最小时间间距 秒', - `OnlineQQ` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '在线QQ', - `OnlineSkype` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '在线Skype', - `OnlineWangWang` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '在线阿里旺旺', - `SkinName` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '站点URL', - `OfficialName` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '公众号名称', - `OfficialDecsription` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '公众号介绍', - `OfficialOriginalId` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '公众号原始ID', - `WexinAccount` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '微信名称', - `Token` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT 'Token', - `AppId` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT 'AppId', - `AppSecret` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT 'AppSecret', - `FllowTipPageURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '引导关注素材地址', - `OfficialType` int(11) NOT NULL COMMENT '公众号类型:0普通订阅号 1普通服务号 2认证订阅号 3认证服务号 4企业号 5认证企业号', - `EncodingAESKey` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT 'EncodingAESKey', - `DEType` int(11) NOT NULL COMMENT '解密方式0,明文', - `OfficialQRCode` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '公众号二维码地址', - `OfficialImg` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '公众号头像', - `LastUpdateTime` datetime DEFAULT NULL COMMENT '最后更新时间', - `LastCacheTime` datetime DEFAULT NULL COMMENT '最后缓存时间', - `MCHId` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '微信商家MCHId', - `MCHKey` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '微信商家key', - `DefaultFare` decimal(10,0) NOT NULL COMMENT '默认运费', - `MaxFreeFare` decimal(10,0) NOT NULL COMMENT '最大免运费金额', - `WXAppId` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '微信小程序AppId', - `WXAppSecret` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '微信小程序AppSecret', - `IsResetData` int(11) NOT NULL COMMENT '小程序首页是否显示清除数据按钮' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统配置' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `Config` --- - -INSERT INTO `Config` (`Id`, `SiteName`, `SiteUrl`, `SiteLogo`, `ICP`, `SiteEmail`, `SiteTel`, `Copyright`, `IsCloseSite`, `CloseReason`, `CountScript`, `WeiboQRCode`, `WinxinQRCode`, `Keyword`, `Description`, `IndexTitle`, `IsRewrite`, `SearchMinTime`, `OnlineQQ`, `OnlineSkype`, `OnlineWangWang`, `SkinName`, `OfficialName`, `OfficialDecsription`, `OfficialOriginalId`, `WexinAccount`, `Token`, `AppId`, `AppSecret`, `FllowTipPageURL`, `OfficialType`, `EncodingAESKey`, `DEType`, `OfficialQRCode`, `OfficialImg`, `LastUpdateTime`, `LastCacheTime`, `MCHId`, `MCHKey`, `DefaultFare`, `MaxFreeFare`, `WXAppId`, `WXAppSecret`, `IsResetData`) VALUES -(1, 'COMCMS', 'http://www.comcms.com', '/images/logo.png', '', NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, '2018-12-05 11:49:59', '2018-12-05 11:49:59', NULL, NULL, '0', '0', NULL, NULL, 0); - --- -------------------------------------------------------- - --- --- 表的结构 `Coupon` --- - -CREATE TABLE `Coupon` ( - `Id` int(11) NOT NULL COMMENT '编号', - `ItemNO` varchar(20) DEFAULT NULL COMMENT '券号', - `KId` int(11) NOT NULL COMMENT '类别,0默认没限制', - `CouponType` int(11) NOT NULL COMMENT '优惠券类型,0 现金用券,1打折券', - `DiscuountRates` decimal(10,0) NOT NULL COMMENT '打折率,只有是打折券才有用', - `IsLimit` int(11) NOT NULL COMMENT '是否有类别限制,0 无限制;1 是类别限制,2是商品限制', - `Price` decimal(10,0) NOT NULL COMMENT '面额', - `NeedPrice` decimal(10,0) NOT NULL COMMENT '需要消费面额', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `StartTime` datetime DEFAULT NULL COMMENT '添加时间', - `EndTime` datetime DEFAULT NULL COMMENT '添加时间', - `TotalCount` int(11) NOT NULL COMMENT '最大领取数量', - `TotalUseCount` int(11) NOT NULL COMMENT '已使用次数', - `SpreadUId` int(11) NOT NULL COMMENT '推广员ID,可选', - `UId` int(11) NOT NULL COMMENT '用户Id', - `MyType` int(11) NOT NULL COMMENT '可使用类型' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='优惠券' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `CouponKind` --- - -CREATE TABLE `CouponKind` ( - `Id` int(11) NOT NULL COMMENT '编号', - `IsLimit` int(11) NOT NULL COMMENT '是否有类别限制,0 无限制;1 是类别限制,2是商品限制', - `KindName` varchar(200) DEFAULT NULL COMMENT '类别名称', - `CouponType` int(11) NOT NULL COMMENT '优惠券类型,0 现金用券,1打折券', - `KIds` text COMMENT '类别按逗号分开', - `PIds` text COMMENT '商品ID,按逗号分开', - `KindNote` varchar(250) DEFAULT NULL COMMENT '类别说明', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `MyType` int(11) NOT NULL COMMENT '可使用类型' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='优惠券分类' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `CouponUseLog` --- - -CREATE TABLE `CouponUseLog` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `CouponId` int(11) NOT NULL COMMENT '优惠券ID', - `ItemNO` varchar(20) DEFAULT NULL COMMENT '优惠券编号', - `OrderNum` varchar(50) DEFAULT NULL COMMENT '订单号', - `OrderId` int(11) NOT NULL COMMENT '订单编号', - `UserName` varchar(200) DEFAULT NULL COMMENT '用户名', - `Title` varchar(200) DEFAULT NULL COMMENT '订单名称', - `AddTime` datetime DEFAULT NULL COMMENT '时间', - `IP` varchar(20) DEFAULT NULL COMMENT '登录IP', - `Actions` varchar(250) DEFAULT NULL COMMENT '记录详情' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='优惠券使用记录' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `Food` --- - -CREATE TABLE `Food` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KId` int(11) NOT NULL COMMENT '栏目ID', - `BId` int(11) NOT NULL COMMENT '品牌ID', - `ShopId` int(11) NOT NULL COMMENT '店铺ID', - `CId` int(11) NOT NULL COMMENT '颜色ID', - `SupportId` int(11) NOT NULL COMMENT '供货商ID', - `Title` varchar(250) DEFAULT NULL COMMENT '标题', - `ItemNO` varchar(50) DEFAULT NULL COMMENT '编号', - `SubTitle` varchar(250) DEFAULT NULL COMMENT '副标题', - `Unit` varchar(250) DEFAULT NULL COMMENT '商品单位', - `Spec` varchar(250) DEFAULT NULL COMMENT '商品规格尺寸', - `Color` varchar(250) DEFAULT NULL COMMENT '颜色', - `Weight` varchar(50) DEFAULT NULL COMMENT '重量', - `Price` decimal(10,0) NOT NULL COMMENT '价格', - `MarketPrice` decimal(10,0) NOT NULL COMMENT '市场价格', - `SpecialPrice` decimal(10,0) NOT NULL COMMENT '特价,如有特价,以特价为准', - `Fare` decimal(10,0) NOT NULL COMMENT '运费', - `Discount` decimal(10,0) NOT NULL COMMENT '折扣', - `Material` varchar(250) DEFAULT NULL COMMENT '材料', - `Front` varchar(250) DEFAULT NULL COMMENT '封面', - `Credits` int(11) NOT NULL COMMENT '积分', - `Stock` int(11) NOT NULL COMMENT '库存', - `WarnStock` int(11) NOT NULL COMMENT '警告库存', - `IsSubProduct` int(11) NOT NULL COMMENT '是否为子商品', - `PPId` int(11) NOT NULL COMMENT '父商品ID。如果为子商品,则需要填写父商品ID。实现多颜色功能', - `Content` text COMMENT '内容', - `Parameters` text COMMENT '商品参数', - `Keyword` varchar(250) DEFAULT NULL COMMENT '描述', - `Description` varchar(250) DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) DEFAULT NULL COMMENT '模板', - `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsTop` int(11) NOT NULL COMMENT '是否置顶', - `IsBest` int(11) NOT NULL COMMENT '是否精华', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsNew` int(11) NOT NULL COMMENT '是否新品', - `IsSpecial` int(11) NOT NULL COMMENT '是否特价', - `IsPromote` int(11) NOT NULL COMMENT '是否促销', - `IsHotSales` int(11) NOT NULL COMMENT '是否热销', - `IsBreakup` int(11) NOT NULL COMMENT '是否缺货', - `IsShelves` int(11) NOT NULL COMMENT '是否下架', - `IsVerify` int(11) NOT NULL COMMENT '是否审核,1为已经审核前台显示', - `Hits` int(11) NOT NULL COMMENT '点击数量', - `IsGift` int(11) NOT NULL COMMENT '是否为礼品商品', - `IsPart` int(11) NOT NULL COMMENT '是否为配件', - `Sequence` int(11) NOT NULL COMMENT '排序', - `CommentCount` int(11) NOT NULL COMMENT '评论数量', - `Icon` varchar(100) DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) DEFAULT NULL COMMENT 'banner图片', - `Pic` varchar(250) DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - `Tags` varchar(250) DEFAULT NULL COMMENT 'TAG', - `ItemImg` text COMMENT '更多图片', - `Service` text COMMENT '售后服务', - `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime DEFAULT NULL COMMENT '时间', - `Location` varchar(100) DEFAULT NULL COMMENT '路径', - `FilePath` varchar(100) DEFAULT NULL COMMENT '存放目录' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='快餐' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `Guestbook` --- - -CREATE TABLE `Guestbook` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KId` int(11) NOT NULL COMMENT '分类ID', - `UId` int(11) NOT NULL COMMENT '用户ID', - `Title` varchar(250) DEFAULT NULL COMMENT '留言标题', - `Content` text COMMENT '详细介绍', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `IsVerify` int(11) NOT NULL COMMENT '是否审核通过', - `IsRead` int(11) NOT NULL COMMENT '是否阅读', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IP` varchar(20) DEFAULT NULL COMMENT '用户IP', - `Nickname` varchar(50) DEFAULT NULL COMMENT '昵称', - `Email` varchar(100) DEFAULT NULL COMMENT '邮箱', - `Tel` varchar(50) DEFAULT NULL COMMENT '电话', - `QQ` varchar(20) DEFAULT NULL COMMENT 'QQ', - `Skype` varchar(100) DEFAULT NULL COMMENT 'Skype', - `HomePage` varchar(250) DEFAULT NULL COMMENT '主页', - `Address` varchar(250) DEFAULT NULL COMMENT '地址', - `Company` varchar(250) DEFAULT NULL COMMENT '公司', - `ReplyTitle` varchar(250) DEFAULT NULL COMMENT '回复标题', - `ReplyContent` text COMMENT '回复的详情', - `ReplyAddTime` datetime DEFAULT NULL COMMENT '回复时间', - `ReplyIP` varchar(20) DEFAULT NULL COMMENT '用户回复IP', - `ReplyAdminId` int(11) NOT NULL COMMENT '用户的管理员ID', - `ReplyNickName` varchar(20) DEFAULT NULL COMMENT '回复者昵称' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='留言详情' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `GuestbookCategory` --- - -CREATE TABLE `GuestbookCategory` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KindName` varchar(50) DEFAULT NULL COMMENT '类别名称', - `KindInfo` varchar(250) DEFAULT NULL COMMENT '简单说明', - `Pic` varchar(250) DEFAULT NULL COMMENT '分类图片', - `Rank` int(11) NOT NULL COMMENT '排序' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='留言分类' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `HotelRoom` --- - -CREATE TABLE `HotelRoom` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KId` int(11) NOT NULL COMMENT '栏目ID', - `BId` int(11) NOT NULL COMMENT '品牌ID', - `ShopId` int(11) NOT NULL COMMENT '店铺ID', - `CId` int(11) NOT NULL COMMENT '颜色ID', - `SupportId` int(11) NOT NULL COMMENT '供货商ID', - `Title` varchar(250) DEFAULT NULL COMMENT '标题', - `ItemNO` varchar(50) DEFAULT NULL COMMENT '编号', - `SubTitle` varchar(250) DEFAULT NULL COMMENT '副标题', - `Unit` varchar(250) DEFAULT NULL COMMENT '商品单位', - `Spec` varchar(250) DEFAULT NULL COMMENT '商品规格尺寸', - `Color` varchar(250) DEFAULT NULL COMMENT '颜色', - `Weight` varchar(50) DEFAULT NULL COMMENT '重量', - `Price` decimal(10,0) NOT NULL COMMENT '价格', - `MarketPrice` decimal(10,0) NOT NULL COMMENT '市场价格', - `SpecialPrice` decimal(10,0) NOT NULL COMMENT '特价,如有特价,以特价为准', - `Fare` decimal(10,0) NOT NULL COMMENT '运费', - `Discount` decimal(10,0) NOT NULL COMMENT '折扣', - `Material` varchar(250) DEFAULT NULL COMMENT '材料', - `Front` varchar(250) DEFAULT NULL COMMENT '封面', - `Credits` int(11) NOT NULL COMMENT '积分', - `Stock` int(11) NOT NULL COMMENT '库存', - `WarnStock` int(11) NOT NULL COMMENT '警告库存', - `IsSubProduct` int(11) NOT NULL COMMENT '是否为子商品', - `PPId` int(11) NOT NULL COMMENT '父商品ID。如果为子商品,则需要填写父商品ID。实现多颜色功能', - `Content` text COMMENT '内容', - `Parameters` text COMMENT '商品参数', - `Keyword` varchar(250) DEFAULT NULL COMMENT '描述', - `Description` varchar(250) DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) DEFAULT NULL COMMENT '模板', - `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsTop` int(11) NOT NULL COMMENT '是否置顶', - `IsBest` int(11) NOT NULL COMMENT '是否精华', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsNew` int(11) NOT NULL COMMENT '是否新品', - `IsSpecial` int(11) NOT NULL COMMENT '是否特价', - `IsPromote` int(11) NOT NULL COMMENT '是否促销', - `IsHotSales` int(11) NOT NULL COMMENT '是否热销', - `IsBreakup` int(11) NOT NULL COMMENT '是否缺货', - `IsShelves` int(11) NOT NULL COMMENT '是否下架', - `IsVerify` int(11) NOT NULL COMMENT '是否审核,1为已经审核前台显示', - `Hits` int(11) NOT NULL COMMENT '点击数量', - `IsGift` int(11) NOT NULL COMMENT '是否为礼品商品', - `IsPart` int(11) NOT NULL COMMENT '是否为配件', - `Sequence` int(11) NOT NULL COMMENT '排序', - `CommentCount` int(11) NOT NULL COMMENT '评论数量', - `Icon` varchar(100) DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) DEFAULT NULL COMMENT 'banner图片', - `Pic` varchar(250) DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - `Tags` varchar(250) DEFAULT NULL COMMENT 'TAG', - `ItemImg` text COMMENT '更多图片', - `Service` text COMMENT '售后服务', - `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime DEFAULT NULL COMMENT '时间', - `Location` varchar(100) DEFAULT NULL COMMENT '路径', - `FilePath` varchar(100) DEFAULT NULL COMMENT '存放目录', - `PriceList` text COMMENT '日期价格' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='酒店房间' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `Link` --- - -CREATE TABLE `Link` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KId` int(11) NOT NULL COMMENT '分类ID', - `Title` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '站点标题', - `LinkURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '站点连接', - `Info` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '介绍', - `Logo` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '站点LOGO', - `IsHide` enum('N','Y') NOT NULL COMMENT '是否隐藏友情链接', - `Sequence` int(11) NOT NULL COMMENT '排序,默认999' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='友情连接详情' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `Link` --- - -INSERT INTO `Link` (`Id`, `KId`, `Title`, `LinkURL`, `Info`, `Logo`, `IsHide`, `Sequence`) VALUES -(1, 1, 'Google', 'https://www.google.com', NULL, '/userfiles/images/2018/46704eae13e45ead.png', 'N', 999), -(2, 1, '谷歌', 'https://www.google.com', NULL, '/userfiles/images/2018/46704eae13e45ead.png', 'N', 999); - --- -------------------------------------------------------- - --- --- 表的结构 `LinkKind` --- - -CREATE TABLE `LinkKind` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KindName` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '类别名称', - `KindInfo` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '简单说明', - `Pic` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '分类图片', - `Rank` int(11) NOT NULL COMMENT '排序' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='友情链接分类' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `LinkKind` --- - -INSERT INTO `LinkKind` (`Id`, `KindName`, `KindInfo`, `Pic`, `Rank`) VALUES -(1, '友情链接', NULL, NULL, 0); - --- -------------------------------------------------------- - --- --- 表的结构 `Member` --- - -CREATE TABLE `Member` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UserName` varchar(20) DEFAULT NULL COMMENT '用户名', - `PassWord` varchar(50) DEFAULT NULL COMMENT '密码', - `Salt` varchar(20) DEFAULT NULL COMMENT '盐值', - `RealName` varchar(20) DEFAULT NULL COMMENT '姓名', - `Tel` varchar(20) DEFAULT NULL COMMENT '手机', - `Email` varchar(100) DEFAULT NULL COMMENT '邮件', - `RoleId` int(11) NOT NULL COMMENT '会员组,代理级别', - `LastLoginTime` datetime DEFAULT NULL COMMENT '最后登录时间', - `LastLoginIP` varchar(20) DEFAULT NULL COMMENT '上次登录IP', - `ThisLoginTime` datetime DEFAULT NULL COMMENT '本次登录时间', - `ThisLoginIP` varchar(20) DEFAULT NULL COMMENT '本次登录IP', - `IsLock` int(11) NOT NULL COMMENT '是否是锁定', - `Nickname` varchar(200) DEFAULT NULL COMMENT '昵称', - `UserImg` varchar(250) DEFAULT NULL COMMENT '头像', - `Sex` int(11) NOT NULL COMMENT '性别 0 保密 1 男 2女', - `Birthday` datetime DEFAULT NULL COMMENT '生日', - `Phone` varchar(20) DEFAULT NULL COMMENT '电话', - `Fax` varchar(20) DEFAULT NULL COMMENT '传真', - `QQ` varchar(20) DEFAULT NULL COMMENT 'QQ', - `Weixin` varchar(50) DEFAULT NULL COMMENT '微信', - `Alipay` varchar(50) DEFAULT NULL COMMENT '支付宝', - `Skype` varchar(100) DEFAULT NULL COMMENT 'skype', - `Homepage` varchar(100) DEFAULT NULL COMMENT '主页', - `Company` varchar(100) DEFAULT NULL COMMENT '公司', - `IDNO` varchar(20) DEFAULT NULL COMMENT '身份证', - `Country` varchar(50) DEFAULT NULL COMMENT '国家', - `Province` varchar(50) DEFAULT NULL COMMENT '省', - `City` varchar(50) DEFAULT NULL COMMENT '市', - `District` varchar(50) DEFAULT NULL COMMENT '区', - `Address` varchar(250) DEFAULT NULL COMMENT '详细地址', - `Postcode` varchar(20) DEFAULT NULL COMMENT '邮政编码', - `RegIP` varchar(20) DEFAULT NULL COMMENT '注册IP', - `RegTime` datetime DEFAULT NULL COMMENT '注册时间', - `LoginCount` int(11) NOT NULL COMMENT '登录次数', - `RndNum` varchar(50) DEFAULT NULL COMMENT '随机字符', - `RePassWordTime` datetime DEFAULT NULL COMMENT '找回密码时间', - `Question` varchar(50) DEFAULT NULL COMMENT '保密问题', - `Answer` varchar(50) DEFAULT NULL COMMENT '保密答案', - `Balance` decimal(10,0) NOT NULL COMMENT '可用余额', - `GiftBalance` decimal(10,0) NOT NULL COMMENT '赠送余额', - `Rebate` decimal(10,0) NOT NULL COMMENT '返利,分销提成', - `Bank` varchar(50) DEFAULT NULL COMMENT '银行', - `BankCardNO` varchar(50) DEFAULT NULL COMMENT '银行卡号', - `BankBranch` varchar(50) DEFAULT NULL COMMENT '支行名称', - `BankRealname` varchar(50) DEFAULT NULL COMMENT '银行卡姓名', - `YearsPerformance` decimal(10,0) NOT NULL COMMENT '年业务量', - `ExtCredits1` decimal(10,0) NOT NULL COMMENT '备用积分1', - `ExtCredits2` decimal(10,0) NOT NULL COMMENT '备用积分2', - `ExtCredits3` decimal(10,0) NOT NULL COMMENT '备用积分3', - `ExtCredits4` decimal(10,0) NOT NULL COMMENT '备用积分4', - `ExtCredits5` decimal(10,0) NOT NULL COMMENT '备用积分5', - `TotalCredits` decimal(10,0) NOT NULL COMMENT '总积分', - `Parent` int(11) NOT NULL COMMENT '父级用户ID', - `Grandfather` int(11) NOT NULL COMMENT '爷级用户ID', - `IsSellers` int(11) NOT NULL COMMENT '是否是分销商', - `IsVerifySellers` int(11) NOT NULL COMMENT '是否已经认证的分销商,缴纳费用', - `WeixinOpenId` varchar(100) DEFAULT NULL COMMENT '微信公众号OpenId', - `WeixinAppOpenId` varchar(100) DEFAULT NULL COMMENT '微信OpenId', - `QQOpenId` varchar(100) DEFAULT NULL COMMENT 'QQ OpenId', - `WeiboOpenId` varchar(100) DEFAULT NULL COMMENT '微博OpenId' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `MemberAddress` --- - -CREATE TABLE `MemberAddress` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `RealName` varchar(20) DEFAULT NULL COMMENT '姓名', - `Tel` varchar(20) DEFAULT NULL COMMENT '手机', - `Email` varchar(100) DEFAULT NULL COMMENT '邮件', - `IsDefault` enum('N','Y') NOT NULL COMMENT '是否是默认', - `Phone` varchar(20) DEFAULT NULL COMMENT '电话', - `Company` varchar(100) DEFAULT NULL COMMENT '公司', - `Country` varchar(50) DEFAULT NULL COMMENT '国家', - `Province` varchar(50) DEFAULT NULL COMMENT '省', - `City` varchar(50) DEFAULT NULL COMMENT '市', - `District` varchar(50) DEFAULT NULL COMMENT '区', - `Address` varchar(250) DEFAULT NULL COMMENT '详细地址', - `Postcode` varchar(20) DEFAULT NULL COMMENT '邮政编码', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime DEFAULT NULL COMMENT '更新时间', - `Rank` int(11) NOT NULL COMMENT '排序' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户地址' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `MemberCoupon` --- - -CREATE TABLE `MemberCoupon` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `ItemNO` varchar(20) DEFAULT NULL COMMENT '券号', - `CouponId` int(11) NOT NULL COMMENT '优惠券ID', - `CouponType` int(11) NOT NULL COMMENT '优惠券类型,0 现金用券,1打折券', - `DiscuountRates` decimal(10,0) NOT NULL COMMENT '打折率,只有是打折券才有用', - `IsLimit` int(11) NOT NULL COMMENT '是否有类别限制,0 无限制;1 是类别限制,2是商品限制', - `Price` decimal(10,0) NOT NULL COMMENT '面额', - `NeedPrice` decimal(10,0) NOT NULL COMMENT '需要消费面额', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `StartTime` datetime DEFAULT NULL COMMENT '添加时间', - `EndTime` datetime DEFAULT NULL COMMENT '添加时间', - `IsUse` int(11) NOT NULL COMMENT '是否使用', - `UseTime` datetime DEFAULT NULL COMMENT '使用时间', - `OrderNum` varchar(50) DEFAULT NULL COMMENT '订单号(使用后)', - `OrderId` int(11) NOT NULL COMMENT '订单编号(使用后)' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户优惠券' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `MemberLog` --- - -CREATE TABLE `MemberLog` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '管理员ID', - `GUID` varchar(50) DEFAULT NULL COMMENT '唯一ID', - `UserName` varchar(20) DEFAULT NULL COMMENT '用户名', - `PassWord` varchar(50) DEFAULT NULL COMMENT '密码', - `LoginTime` datetime DEFAULT NULL COMMENT '登录时间', - `LoginIP` varchar(20) DEFAULT NULL COMMENT '登录IP', - `IsLoginOK` int(11) NOT NULL COMMENT '是否登录成功', - `Actions` text COMMENT '记录', - `LastUpdateTime` datetime DEFAULT NULL COMMENT '登录时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户日志表' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `MemberRoles` --- - -CREATE TABLE `MemberRoles` ( - `Id` int(11) NOT NULL COMMENT '编号', - `RoleName` varchar(50) DEFAULT NULL COMMENT '角色名称', - `RoleDescription` varchar(250) DEFAULT NULL COMMENT '角色简单介绍', - `Stars` int(11) NOT NULL COMMENT '星级', - `NotAllowDel` int(11) NOT NULL COMMENT '是否不允许删除', - `Rank` int(11) NOT NULL COMMENT '排序', - `Color` varchar(20) DEFAULT NULL COMMENT '颜色', - `CashBack` decimal(10,0) NOT NULL COMMENT '返现百分比', - `ParentCashBack` decimal(10,0) NOT NULL COMMENT '父级返现百分比', - `GrandfatherCashBack` decimal(10,0) NOT NULL COMMENT '爷级返现百分比', - `IsDefault` int(11) NOT NULL COMMENT '是否是默认角色', - `IsHalved` int(11) NOT NULL COMMENT '超过级别是否减半', - `HalvedParentCashBack` decimal(10,0) NOT NULL COMMENT '超过级别父级返现百分比', - `HalvedGrandfatherCashBack` decimal(10,0) NOT NULL COMMENT '超过级别爷级返现百分比', - `YearsPerformance` decimal(10,0) NOT NULL COMMENT '年业务量', - `IsSellers` int(11) NOT NULL COMMENT '是否是分销商', - `JoinPrice` decimal(10,0) NOT NULL COMMENT '加入分销商价格' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户角色' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `MemberRoles` --- - -INSERT INTO `MemberRoles` (`Id`, `RoleName`, `RoleDescription`, `Stars`, `NotAllowDel`, `Rank`, `Color`, `CashBack`, `ParentCashBack`, `GrandfatherCashBack`, `IsDefault`, `IsHalved`, `HalvedParentCashBack`, `HalvedGrandfatherCashBack`, `YearsPerformance`, `IsSellers`, `JoinPrice`) VALUES -(1, '钻石代理', '钻石代理(一级代理)', 5, 1, 0, '', '50', '10', '5', 0, 0, '10', '5', '100000', 1, '50000'), -(2, '白金代理', '白金代理(二级代理)', 4, 1, 0, '', '30', '10', '0', 0, 0, '5', '0', '50000', 0, '0'), -(3, '普通会员', '普通会员', 1, 1, 0, '', '0', '0', '0', 1, 0, '0', '0', '0', 0, '0'); - --- -------------------------------------------------------- - --- --- 表的结构 `OnlinePayOrder` --- - -CREATE TABLE `OnlinePayOrder` ( - `Id` int(11) NOT NULL COMMENT '编号', - `PayOrderNum` varchar(50) DEFAULT NULL COMMENT '在线支付订单号,唯一', - `OrderId` int(11) NOT NULL COMMENT '订单ID', - `OrderNum` varchar(50) DEFAULT NULL COMMENT '订单号', - `PayId` int(11) NOT NULL COMMENT '支付方式ID', - `PayType` varchar(50) DEFAULT NULL COMMENT '付款方式', - `PayTypeNotes` varchar(250) DEFAULT NULL COMMENT '支付备注', - `Actions` varchar(200) DEFAULT NULL COMMENT '日志记录', - `UId` int(11) NOT NULL COMMENT '用户ID', - `UserName` varchar(50) DEFAULT NULL COMMENT '用户名', - `TotalQty` int(11) NOT NULL COMMENT '总数量', - `TotalPrice` decimal(10,0) NOT NULL COMMENT '总价格', - `PaymentStatus` varchar(50) DEFAULT NULL COMMENT '支付状态:未支付、已支付、已退款', - `PaymentNotes` varchar(250) DEFAULT NULL COMMENT '支付备注', - `IsOK` int(11) NOT NULL COMMENT '是否完成', - `IP` varchar(20) DEFAULT NULL COMMENT '下单IP', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `ReceiveTime` datetime DEFAULT NULL COMMENT '回传时间', - `TypeId` int(11) NOT NULL COMMENT '支付的类型', - `MyType` int(11) NOT NULL COMMENT '系统类型', - `Title` varchar(50) DEFAULT NULL COMMENT '订单标题', - `OutTradeNo` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '支付成功流水号' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='在线支付订单' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `Order` --- - -CREATE TABLE `Order` ( - `Id` int(11) NOT NULL COMMENT '编号', - `OrderNum` varchar(50) DEFAULT NULL COMMENT '订单号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `UserName` varchar(50) DEFAULT NULL COMMENT '下单用户名', - `ShopId` int(11) NOT NULL COMMENT '商户ID', - `Credit` int(11) NOT NULL COMMENT '积分', - `TotalQty` int(11) NOT NULL COMMENT '总数量', - `TotalPrice` decimal(10,0) NOT NULL COMMENT '总价格', - `Discount` decimal(10,0) NOT NULL COMMENT '折扣', - `Fare` decimal(10,0) NOT NULL COMMENT '运费', - `TotalTax` decimal(10,0) NOT NULL COMMENT '税', - `TotalPay` decimal(10,0) NOT NULL COMMENT '总支付价格', - `BackCredits` int(11) NOT NULL COMMENT '返现积分', - `RealName` varchar(50) DEFAULT NULL COMMENT '姓名', - `Country` varchar(50) DEFAULT NULL COMMENT '国家', - `Province` varchar(50) DEFAULT NULL COMMENT '省份', - `City` varchar(50) DEFAULT NULL COMMENT '城市', - `District` varchar(50) DEFAULT NULL COMMENT '区', - `Address` varchar(250) DEFAULT NULL COMMENT '详细地址', - `PostCode` varchar(20) DEFAULT NULL COMMENT '邮编', - `Tel` varchar(20) DEFAULT NULL COMMENT '手机', - `Mobile` varchar(20) DEFAULT NULL COMMENT '手机', - `Email` varchar(100) DEFAULT NULL COMMENT '邮箱', - `Notes` varchar(250) DEFAULT NULL COMMENT '备注', - `AdminNotes` varchar(250) DEFAULT NULL COMMENT '管理员备注', - `Pic` text COMMENT '图片', - `DeliverId` int(11) NOT NULL COMMENT '配送方式ID', - `DeliverType` varchar(50) DEFAULT NULL COMMENT '配送方式名称', - `DeliverNO` varchar(50) DEFAULT NULL COMMENT '运单号', - `DeliverNotes` varchar(250) DEFAULT NULL COMMENT '配送备注', - `PayId` int(11) NOT NULL COMMENT '支付方式ID', - `PayType` varchar(50) DEFAULT NULL COMMENT '付款方式', - `PayTypeNotes` varchar(250) DEFAULT NULL COMMENT '支付备注', - `OrderStatus` varchar(50) DEFAULT NULL COMMENT '订单状态:未确认、已确认、已完成、已取消', - `PaymentStatus` varchar(50) DEFAULT NULL COMMENT '支付状态:未支付、已支付、已退款', - `DeliverStatus` varchar(50) DEFAULT NULL COMMENT '配送状态:未配送、配货中、已配送、已收到、退货中、已退货', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `IP` varchar(20) DEFAULT NULL COMMENT '下单IP', - `IsInvoice` int(11) NOT NULL COMMENT '是否需要发票', - `InvoiceCompanyName` varchar(50) DEFAULT NULL COMMENT '抬头', - `InvoiceCompanyID` varchar(100) DEFAULT NULL COMMENT '纳税人识别号', - `InvoiceType` varchar(50) DEFAULT NULL COMMENT '发票内容', - `InvoiceNote` varchar(250) DEFAULT NULL COMMENT '发票备注', - `IsRead` int(11) NOT NULL COMMENT '是否未读', - `IsEnd` int(11) NOT NULL COMMENT '是否结束', - `EndTime` datetime DEFAULT NULL COMMENT '结束时间', - `IsOk` int(11) NOT NULL COMMENT '订单是否顺利完成', - `IsComment` int(11) NOT NULL COMMENT '订单已经评论', - `Flag1` varchar(200) DEFAULT NULL COMMENT '预留字段1', - `Flag2` varchar(200) DEFAULT NULL COMMENT '预留字段2', - `Flag3` varchar(200) DEFAULT NULL COMMENT '预留字段3', - `Title` varchar(200) DEFAULT NULL COMMENT '订单名称', - `LastModTime` datetime DEFAULT NULL COMMENT '最后操作时间', - `OrderType` int(11) NOT NULL COMMENT '订单类型,0为商品订单', - `MyType` int(11) NOT NULL COMMENT '系统类型', - `OutTradeNo` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '支付成功流水号' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `OrderDetail` --- - -CREATE TABLE `OrderDetail` ( - `Id` int(11) NOT NULL COMMENT '编号', - `OrderId` int(11) NOT NULL COMMENT '订单ID', - `OrderNum` varchar(50) DEFAULT NULL COMMENT '订单号', - `ShopId` int(11) NOT NULL COMMENT '商户ID', - `UId` int(11) NOT NULL COMMENT '用户ID', - `PId` int(11) NOT NULL COMMENT '商品ID', - `TypeId` int(11) NOT NULL COMMENT '类型ID', - `PriceId` int(11) NOT NULL COMMENT '价格ID', - `Title` varchar(250) DEFAULT NULL COMMENT '商品名称', - `Pic` varchar(250) DEFAULT NULL COMMENT '商品名称', - `Attr` varchar(250) DEFAULT NULL COMMENT '商品属性', - `Color` varchar(50) DEFAULT NULL COMMENT '商品颜色', - `Spec` varchar(50) DEFAULT NULL COMMENT '规格', - `ItemNO` varchar(50) DEFAULT NULL COMMENT '编号', - `Qty` int(11) NOT NULL COMMENT '数量', - `Price` decimal(10,0) NOT NULL COMMENT '商品价格', - `MarketPrice` decimal(10,0) NOT NULL COMMENT '商品市场价格', - `SpecialPrice` decimal(10,0) NOT NULL COMMENT '商品特价', - `Discount` decimal(10,0) NOT NULL COMMENT '商品优惠', - `Tax` decimal(10,0) NOT NULL COMMENT '商品税', - `Credit` int(11) NOT NULL COMMENT '积分', - `BackCredits` int(11) NOT NULL COMMENT '返现积分', - `IsOK` int(11) NOT NULL COMMENT '是否完成', - `IsComment` int(11) NOT NULL COMMENT '是否已经评论', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `CheckInDate` datetime DEFAULT NULL COMMENT '入住日期', - `LeaveDate` datetime DEFAULT NULL COMMENT '离开日期', - `MyType` int(11) NOT NULL COMMENT '系统类型' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单详情' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `OrderLog` --- - -CREATE TABLE `OrderLog` ( - `Id` int(11) NOT NULL COMMENT '编号', - `OrderId` int(11) NOT NULL COMMENT '订单ID', - `OrderNum` varchar(50) DEFAULT NULL COMMENT '订单号', - `Actions` varchar(200) DEFAULT NULL COMMENT '日志记录', - `UId` int(11) NOT NULL COMMENT '用户ID', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单日志' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `OtherConfig` --- - -CREATE TABLE `OtherConfig` ( - `Id` int(11) NOT NULL COMMENT '编号', - `ConfigName` varchar(50) DEFAULT NULL COMMENT '配置名称', - `ConfigValue` text COMMENT '配置值 JSON', - `LastUpdateTime` datetime DEFAULT NULL COMMENT '最后更新时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='其他配置' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `OtherConfig` --- - -INSERT INTO `OtherConfig` (`Id`, `ConfigName`, `ConfigValue`, `LastUpdateTime`) VALUES -(1, 'attach', '{\"SiteId\":0,\"AttachPatch\":\"userfiles\",\"SaveType\":0,\"IsCreateThum\":0,\"ThumQty\":80,\"ThumMaxWidth\":200,\"ThumMaxHeight\":200,\"IsWaterMark\":1,\"WaterMarkType\":0,\"WaterMarkMinWidth\":400,\"WaterMarkMinHeight\":400,\"WaterMarkImg\":\"/userfiles/images/2018/c8ada75b1952188f.jpg\",\"WaterMarkText\":\"\",\"WaterMarkTextColor\":\"#0FF\",\"WaterMarkPlace\":9,\"WaterMarkQty\":80,\"WaterMarkDiaphaneity\":80,\"IsRandomFileName\":1,\"ImgMaxWidth\":1920,\"ImgMaxHeight\":2000}', '2018-05-09 15:32:18'), -(2, 'smtp', '{\"SiteId\":0,\"SmtpEmail\":\"\",\"SmtpHost\":\"\",\"SmtpProt\":\"25\",\"SmtpEmailPwd\":\"\",\"PostUserName\":\"\"}', '2018-04-16 00:55:57'); - --- -------------------------------------------------------- - --- --- 表的结构 `Product` --- - -CREATE TABLE `Product` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KId` int(11) NOT NULL COMMENT '栏目ID', - `BId` int(11) NOT NULL COMMENT '品牌ID', - `ShopId` int(11) NOT NULL COMMENT '店铺ID', - `CId` int(11) NOT NULL COMMENT '颜色ID', - `SupportId` int(11) NOT NULL COMMENT '供货商ID', - `Title` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '标题', - `ItemNO` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '编号', - `SubTitle` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '副标题', - `Unit` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '商品单位', - `Spec` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '商品规格尺寸', - `Color` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '颜色', - `Weight` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '重量', - `Price` decimal(10,0) NOT NULL COMMENT '价格', - `MarketPrice` decimal(10,0) NOT NULL COMMENT '市场价格', - `SpecialPrice` decimal(10,0) NOT NULL COMMENT '特价,如有特价,以特价为准', - `Fare` decimal(10,0) NOT NULL COMMENT '运费', - `Discount` decimal(10,0) NOT NULL COMMENT '折扣', - `Material` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '材料', - `Front` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '封面', - `Credits` int(11) NOT NULL COMMENT '积分', - `Stock` int(11) NOT NULL COMMENT '库存', - `WarnStock` int(11) NOT NULL COMMENT '警告库存', - `IsSubProduct` int(11) NOT NULL COMMENT '是否为子商品', - `PPId` int(11) NOT NULL COMMENT '父商品ID。如果为子商品,则需要填写父商品ID。实现多颜色功能', - `Content` text COMMENT '内容', - `Parameters` text COMMENT '商品参数', - `Keyword` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板', - `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsTop` int(11) NOT NULL COMMENT '是否置顶', - `IsBest` int(11) NOT NULL COMMENT '是否精华', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsNew` int(11) NOT NULL COMMENT '是否新品', - `IsSpecial` int(11) NOT NULL COMMENT '是否特价', - `IsPromote` int(11) NOT NULL COMMENT '是否促销', - `IsHotSales` int(11) NOT NULL COMMENT '是否热销', - `IsBreakup` int(11) NOT NULL COMMENT '是否缺货', - `IsShelves` int(11) NOT NULL COMMENT '是否下架', - `IsVerify` int(11) NOT NULL COMMENT '是否审核,1为已经审核前台显示', - `Hits` int(11) NOT NULL COMMENT '点击数量', - `IsGift` int(11) NOT NULL COMMENT '是否为礼品商品', - `IsPart` int(11) NOT NULL COMMENT '是否为配件', - `Sequence` int(11) NOT NULL COMMENT '排序', - `CommentCount` int(11) NOT NULL COMMENT '评论数量', - `Icon` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT 'banner图片', - `Pic` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - `Tags` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT 'TAG', - `ItemImg` text COMMENT '更多图片', - `Service` text COMMENT '售后服务', - `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime DEFAULT NULL COMMENT '时间', - `Location` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '路径', - `FilePath` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '存放目录' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `Product` --- - -INSERT INTO `Product` (`Id`, `KId`, `BId`, `ShopId`, `CId`, `SupportId`, `Title`, `ItemNO`, `SubTitle`, `Unit`, `Spec`, `Color`, `Weight`, `Price`, `MarketPrice`, `SpecialPrice`, `Fare`, `Discount`, `Material`, `Front`, `Credits`, `Stock`, `WarnStock`, `IsSubProduct`, `PPId`, `Content`, `Parameters`, `Keyword`, `Description`, `LinkURL`, `TitleColor`, `TemplateFile`, `IsRecommend`, `IsHide`, `IsLock`, `IsDel`, `IsTop`, `IsBest`, `IsComment`, `IsMember`, `IsNew`, `IsSpecial`, `IsPromote`, `IsHotSales`, `IsBreakup`, `IsShelves`, `IsVerify`, `Hits`, `IsGift`, `IsPart`, `Sequence`, `CommentCount`, `Icon`, `ClassName`, `BannerImg`, `Pic`, `AdsId`, `Tags`, `ItemImg`, `Service`, `AuthorId`, `AddTime`, `UpdateTime`, `Location`, `FilePath`) VALUES -(1, 1, 0, 0, 0, 0, 'CMS系统', NULL, NULL, NULL, NULL, NULL, NULL, '5000', '6000', '0', '0', '0', NULL, NULL, 0, 0, 0, 0, 0, '

CMS系统

\n\n

CMS系统

\n\n

CMS系统

\n\n

CMS系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-4.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:17:53', NULL, NULL, NULL), -(2, 2, 0, 0, 0, 0, 'PC+手机商城系统', NULL, NULL, NULL, NULL, NULL, NULL, '18000', '0', '0', '0', '0', NULL, NULL, 0, 0, 0, 0, 0, '

PC+手机商城系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-5.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:21:43', NULL, NULL, NULL), -(3, 2, 0, 0, 0, 0, '微商城Shop系统', NULL, NULL, NULL, NULL, NULL, NULL, '25000', '0', '0', '0', '0', NULL, NULL, 0, 0, 0, 0, 0, '

微商城Shop系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-3.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:22:19', NULL, NULL, NULL), -(4, 3, 0, 0, 0, 0, '小程序商城系统', NULL, NULL, NULL, NULL, NULL, NULL, '18000', '0', '0', '0', '0', NULL, NULL, 0, 0, 0, 0, 0, '

小程序商城系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:23:02', NULL, NULL, NULL), -(5, 1, 0, 0, 0, 0, '博客系统', NULL, NULL, NULL, NULL, NULL, NULL, '10000', '0', '0', '0', '0', NULL, NULL, 0, 0, 0, 0, 0, '

博客系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-1.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:49:43', NULL, NULL, NULL); - --- -------------------------------------------------------- - --- --- 表的结构 `RebateChangeLog` --- - -CREATE TABLE `RebateChangeLog` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `AdminId` int(11) NOT NULL COMMENT '管理员ID', - `UserName` varchar(200) DEFAULT NULL COMMENT '用户名', - `AddTime` datetime DEFAULT NULL COMMENT '时间', - `IP` varchar(20) DEFAULT NULL COMMENT '登录IP', - `Actions` varchar(100) DEFAULT NULL COMMENT '记录', - `Reward` decimal(10,0) NOT NULL COMMENT '返现、扣除金额', - `BeforChange` decimal(10,0) NOT NULL COMMENT '变化前', - `AfterChange` decimal(10,0) NOT NULL COMMENT '变化后', - `LogDetails` varchar(250) DEFAULT NULL COMMENT '详细记录', - `TypeId` int(11) NOT NULL COMMENT '类型 0 充值 1 购买 2 赠送 3 退款 4 分销提成', - `MyType` int(11) NOT NULL COMMENT '消费类型,见MyType', - `OrderId` int(11) NOT NULL COMMENT '订单ID', - `OrderNum` varchar(50) DEFAULT NULL COMMENT '订单号' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户返现余额变化记录' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `Shop` --- - -CREATE TABLE `Shop` ( - `Id` int(11) NOT NULL COMMENT '编号', - `ShopName` varchar(200) DEFAULT NULL COMMENT '店铺名称', - `KId` int(11) NOT NULL COMMENT '商家分类ID', - `AId` int(11) NOT NULL COMMENT '地区ID', - `Sequence` int(11) NOT NULL COMMENT '排序', - `Latitude` decimal(10,0) NOT NULL COMMENT '纬度', - `Longitude` decimal(10,0) NOT NULL COMMENT '经度', - `Country` varchar(50) DEFAULT NULL COMMENT '国家', - `Province` varchar(50) DEFAULT NULL COMMENT '省', - `City` varchar(50) DEFAULT NULL COMMENT '市', - `District` varchar(50) DEFAULT NULL COMMENT '区', - `Address` varchar(250) DEFAULT NULL COMMENT '详细地址', - `Postcode` varchar(20) DEFAULT NULL COMMENT '邮政编码', - `IsDel` int(11) NOT NULL COMMENT '是否删除', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsDisabled` int(11) NOT NULL COMMENT '是否禁用', - `Content` text COMMENT '店铺介绍', - `Keyword` varchar(250) DEFAULT NULL COMMENT '关键字', - `Description` varchar(250) DEFAULT NULL COMMENT '描述', - `BannerImg` varchar(250) DEFAULT NULL COMMENT 'banner图片', - `Balance` decimal(10,0) NOT NULL COMMENT '余额', - `IsTop` int(11) NOT NULL COMMENT '是否置顶', - `IsVip` int(11) NOT NULL COMMENT '是否vip', - `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', - `Likes` int(11) NOT NULL COMMENT '点赞数', - `AvgScore` decimal(10,0) NOT NULL COMMENT '平均分数', - `ServiceScore` decimal(10,0) NOT NULL COMMENT '服务分数', - `SpeedScore` decimal(10,0) NOT NULL COMMENT '速度分数', - `EnvironmentScore` decimal(10,0) NOT NULL COMMENT '环境分数', - `Pic` varchar(250) DEFAULT NULL COMMENT '图片', - `MorePics` text COMMENT '店铺所有图片', - `Email` varchar(100) DEFAULT NULL COMMENT '邮箱', - `Tel` varchar(50) DEFAULT NULL COMMENT '电话', - `Phone` varchar(50) DEFAULT NULL COMMENT '固定电话', - `QQ` varchar(20) DEFAULT NULL COMMENT 'QQ', - `Skype` varchar(100) DEFAULT NULL COMMENT 'Skype', - `HomePage` varchar(250) DEFAULT NULL COMMENT '主页', - `Weixin` varchar(50) DEFAULT NULL COMMENT '微信', - `IsShip` int(11) NOT NULL COMMENT '是否配送', - `OpenTime` datetime DEFAULT NULL COMMENT '开店时间', - `CloseTime` datetime DEFAULT NULL COMMENT '关店时间', - `ShippingStartTime` datetime DEFAULT NULL COMMENT '配送开始时间', - `ShippingEndTime` datetime DEFAULT NULL COMMENT '配送结束时间', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `Hits` int(11) NOT NULL COMMENT '点击量', - `MyType` int(11) NOT NULL COMMENT '店铺类型', - `DefaultFare` decimal(10,0) NOT NULL COMMENT '默认运费', - `MaxFreeFare` decimal(10,0) NOT NULL COMMENT '最大免运费金额' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商家' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `ShopCategory` --- - -CREATE TABLE `ShopCategory` ( - `Id` int(11) NOT NULL COMMENT '编号', - `KindName` varchar(250) DEFAULT NULL COMMENT '栏目名称', - `SubTitle` varchar(250) DEFAULT NULL COMMENT '栏目副标题', - `KindTitle` varchar(250) DEFAULT NULL COMMENT '栏目标题,填写则在浏览器替换此标题', - `Keyword` varchar(250) DEFAULT NULL COMMENT '描述', - `Description` varchar(250) DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) DEFAULT NULL COMMENT '模板', - `DetailTemplateFile` varchar(250) DEFAULT NULL COMMENT '详情模板', - `KindDomain` varchar(250) DEFAULT NULL COMMENT '类别域名(保留)', - `IsList` int(11) NOT NULL COMMENT '是否为列表页面', - `PageSize` int(11) NOT NULL COMMENT '每页显示数量', - `PId` int(11) NOT NULL COMMENT '上级ID', - `Level` int(11) NOT NULL COMMENT '级别', - `Location` varchar(100) DEFAULT NULL COMMENT '路径', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsShowSubDetail` int(11) NOT NULL COMMENT '是否显示下级栏目内容', - `CatalogId` int(11) NOT NULL COMMENT '模型ID', - `Counts` int(11) NOT NULL COMMENT '详情数量,缓存', - `Rank` int(11) NOT NULL COMMENT '排序', - `Icon` varchar(100) DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) DEFAULT NULL COMMENT 'banner图片', - `KindInfo` text COMMENT '栏目详细介绍', - `Pic` varchar(250) DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商家分类' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `ShoppingCart` --- - -CREATE TABLE `ShoppingCart` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `GUID` varchar(50) DEFAULT NULL COMMENT '唯一GUID,没登录用户使用', - `Details` text COMMENT '购物车内容,JOSN', - `AddTime` datetime DEFAULT NULL COMMENT '加入购物车时间', - `UpdateTime` datetime DEFAULT NULL COMMENT '最后更新时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='购物车' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `TargetEvent` --- - -CREATE TABLE `TargetEvent` ( - `Id` int(11) NOT NULL COMMENT '编号', - `EventKey` varchar(50) DEFAULT NULL COMMENT '事件key', - `EventName` varchar(50) DEFAULT NULL COMMENT '事件名称', - `IsDisable` int(11) NOT NULL COMMENT '是否禁用', - `Rank` int(11) NOT NULL COMMENT '排序' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='目标事件' ROW_FORMAT=DYNAMIC; - --- --- 转存表中的数据 `TargetEvent` --- - -INSERT INTO `TargetEvent` (`Id`, `EventKey`, `EventName`, `IsDisable`, `Rank`) VALUES -(1, 'add', '添加', 0, 0), -(2, 'edit', '修改', 0, 0), -(3, 'del', '删除', 0, 0), -(4, 'view', '查看', 0, 0), -(5, 'viewlist', '查看列表', 0, 0), -(6, 'import', '导入', 0, 0), -(7, 'export', '导出', 0, 0), -(8, 'filter', '搜索', 0, 0), -(9, 'batch', '批量操作', 0, 0), -(10, 'recycle', '回收站', 0, 0), -(11, 'confirm', '确认', 0, 0); - --- -------------------------------------------------------- - --- --- 表的结构 `WeixinRequestContent` --- - -CREATE TABLE `WeixinRequestContent` ( - `Id` int(11) NOT NULL COMMENT '编号', - `RuleId` int(11) NOT NULL COMMENT '规则名称', - `Title` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '回复标题', - `Content` longtext COMMENT '回复内容', - `LinkUrl` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '详情链接地址', - `ImgURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '图片地址', - `MediaURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '语音或视频地址', - `MeidaHdURL` varchar(250) CHARACTER SET utf8 DEFAULT NULL COMMENT '高清语音或者视频地址', - `MediaID` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '返回的素材ID', - `WXAppAppId` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '小程序APPId', - `WXAppPage` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '小程序页面', - `Rank` int(11) NOT NULL COMMENT '排序', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime DEFAULT NULL COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='请求回复的内容'; - --- --- 转存表中的数据 `WeixinRequestContent` --- - -INSERT INTO `WeixinRequestContent` (`Id`, `RuleId`, `Title`, `Content`, `LinkUrl`, `ImgURL`, `MediaURL`, `MeidaHdURL`, `MediaID`, `WXAppAppId`, `WXAppPage`, `Rank`, `AddTime`, `UpdateTime`) VALUES -(1, 1, NULL, '关注公众号自动回复文本', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); - --- -------------------------------------------------------- - --- --- 表的结构 `WeixinRequestRule` --- - -CREATE TABLE `WeixinRequestRule` ( - `Id` int(11) NOT NULL COMMENT '编号', - `RuleName` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '规则名称', - `Keywords` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '请求关键词,逗号分隔', - `RequestType` int(11) NOT NULL COMMENT '请求类型(0默认回复1文字2图片3语音4链接5地理位置6关注7取消关注8扫描带参数二维码事件9上报地理位置事件10自定义菜单事件)', - `ResponseType` int(11) NOT NULL COMMENT '回复类型(1文本2图文3语音4视频5第三方接口)', - `IsLikeQuery` int(11) NOT NULL COMMENT '是否模糊查询 0 是完全匹配;1是模糊匹配', - `IsDefault` int(11) NOT NULL COMMENT '是否是默认回复', - `Rank` int(11) NOT NULL COMMENT '排序', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime DEFAULT NULL COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微信公众号回复规则'; - --- --- 转存表中的数据 `WeixinRequestRule` --- - -INSERT INTO `WeixinRequestRule` (`Id`, `RuleName`, `Keywords`, `RequestType`, `ResponseType`, `IsLikeQuery`, `IsDefault`, `Rank`, `AddTime`, `UpdateTime`) VALUES -(1, '关注自动回复', NULL, 6, 0, 0, 1, 0, NULL, '2020-03-19 16:43:23'); - --- -------------------------------------------------------- - --- --- 表的结构 `WeixinResponseContent` --- - -CREATE TABLE `WeixinResponseContent` ( - `Id` int(11) NOT NULL COMMENT '编号', - `OpenId` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '用户OpenId', - `RequestType` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '请求类型', - `RequestContent` longtext COMMENT '内容', - `ResponseType` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '回复的类型 文本消息:text 图片消息:image 地理位置消息:location 链接消息:link', - `ReponseContent` longtext COMMENT '系统回复的内容', - `XmlContent` longtext COMMENT 'xml原始内容', - `UpdateTime` datetime DEFAULT NULL COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公众平台回复信息'; - --- -------------------------------------------------------- - --- --- 表的结构 `WithdrawOrder` --- - -CREATE TABLE `WithdrawOrder` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `OrderNum` varchar(50) DEFAULT NULL COMMENT '订单号', - `UserName` varchar(200) DEFAULT NULL COMMENT '用户名', - `Title` varchar(100) DEFAULT NULL COMMENT '订单名称', - `AddTime` datetime DEFAULT NULL COMMENT '时间', - `IP` varchar(20) DEFAULT NULL COMMENT '登录IP', - `Actions` varchar(250) DEFAULT NULL COMMENT '记录详情', - `Price` decimal(10,0) NOT NULL COMMENT '提现金额', - `VerifyAdminId` int(11) NOT NULL COMMENT '审核管理员ID', - `IsVerify` int(11) NOT NULL COMMENT '是否通过审核', - `VerifyTime` datetime DEFAULT NULL COMMENT '审核时间', - `FormId` varchar(50) DEFAULT NULL COMMENT '小程序FormId' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户提现订单' ROW_FORMAT=DYNAMIC; - --- -------------------------------------------------------- - --- --- 表的结构 `WXAppSession` --- - -CREATE TABLE `WXAppSession` ( - `Id` int(11) NOT NULL COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `IP` varchar(20) DEFAULT NULL COMMENT '登录IP', - `Key` varchar(50) DEFAULT NULL COMMENT '系统生成Key', - `SessionKey` varchar(50) DEFAULT NULL COMMENT '微信SessionKey', - `OpenId` varchar(50) DEFAULT NULL COMMENT '微信小程序OpenId', - `AddTime` datetime DEFAULT NULL COMMENT '添加时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小程序Session' ROW_FORMAT=DYNAMIC; - --- --- 转储表的索引 --- - --- --- 表的索引 `Admin` --- -ALTER TABLE `Admin` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `AdminLog` --- -ALTER TABLE `AdminLog` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `AdminMenu` --- -ALTER TABLE `AdminMenu` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `AdminMenuEvent` --- -ALTER TABLE `AdminMenuEvent` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `AdminRoles` --- -ALTER TABLE `AdminRoles` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Ads` --- -ALTER TABLE `Ads` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `AdsKind` --- -ALTER TABLE `AdsKind` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Article` --- -ALTER TABLE `Article` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `ArticleCategory` --- -ALTER TABLE `ArticleCategory` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `BalanceChangeLog` --- -ALTER TABLE `BalanceChangeLog` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Category` --- -ALTER TABLE `Category` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Config` --- -ALTER TABLE `Config` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Coupon` --- -ALTER TABLE `Coupon` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `CouponKind` --- -ALTER TABLE `CouponKind` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `CouponUseLog` --- -ALTER TABLE `CouponUseLog` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Food` --- -ALTER TABLE `Food` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Guestbook` --- -ALTER TABLE `Guestbook` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `GuestbookCategory` --- -ALTER TABLE `GuestbookCategory` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `HotelRoom` --- -ALTER TABLE `HotelRoom` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Link` --- -ALTER TABLE `Link` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `LinkKind` --- -ALTER TABLE `LinkKind` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Member` --- -ALTER TABLE `Member` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `MemberAddress` --- -ALTER TABLE `MemberAddress` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `MemberCoupon` --- -ALTER TABLE `MemberCoupon` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `MemberLog` --- -ALTER TABLE `MemberLog` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `MemberRoles` --- -ALTER TABLE `MemberRoles` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `OnlinePayOrder` --- -ALTER TABLE `OnlinePayOrder` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Order` --- -ALTER TABLE `Order` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `OrderDetail` --- -ALTER TABLE `OrderDetail` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `OrderLog` --- -ALTER TABLE `OrderLog` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `OtherConfig` --- -ALTER TABLE `OtherConfig` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Product` --- -ALTER TABLE `Product` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `RebateChangeLog` --- -ALTER TABLE `RebateChangeLog` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `Shop` --- -ALTER TABLE `Shop` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `ShopCategory` --- -ALTER TABLE `ShopCategory` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `ShoppingCart` --- -ALTER TABLE `ShoppingCart` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `TargetEvent` --- -ALTER TABLE `TargetEvent` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `WeixinRequestContent` --- -ALTER TABLE `WeixinRequestContent` - ADD PRIMARY KEY (`Id`); - --- --- 表的索引 `WeixinRequestRule` --- -ALTER TABLE `WeixinRequestRule` - ADD PRIMARY KEY (`Id`); - --- --- 表的索引 `WeixinResponseContent` --- -ALTER TABLE `WeixinResponseContent` - ADD PRIMARY KEY (`Id`); - --- --- 表的索引 `WithdrawOrder` --- -ALTER TABLE `WithdrawOrder` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 表的索引 `WXAppSession` --- -ALTER TABLE `WXAppSession` - ADD PRIMARY KEY (`Id`) USING BTREE; - --- --- 在导出的表使用AUTO_INCREMENT --- - --- --- 使用表AUTO_INCREMENT `Admin` --- -ALTER TABLE `Admin` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `AdminLog` --- -ALTER TABLE `AdminLog` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=238; - --- --- 使用表AUTO_INCREMENT `AdminMenu` --- -ALTER TABLE `AdminMenu` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=39; - --- --- 使用表AUTO_INCREMENT `AdminMenuEvent` --- -ALTER TABLE `AdminMenuEvent` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=194; - --- --- 使用表AUTO_INCREMENT `AdminRoles` --- -ALTER TABLE `AdminRoles` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `Ads` --- -ALTER TABLE `Ads` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=3; - --- --- 使用表AUTO_INCREMENT `AdsKind` --- -ALTER TABLE `AdsKind` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `Article` --- -ALTER TABLE `Article` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=12; - --- --- 使用表AUTO_INCREMENT `ArticleCategory` --- -ALTER TABLE `ArticleCategory` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=13; - --- --- 使用表AUTO_INCREMENT `BalanceChangeLog` --- -ALTER TABLE `BalanceChangeLog` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `Category` --- -ALTER TABLE `Category` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=4; - --- --- 使用表AUTO_INCREMENT `Config` --- -ALTER TABLE `Config` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `Coupon` --- -ALTER TABLE `Coupon` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `CouponKind` --- -ALTER TABLE `CouponKind` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `CouponUseLog` --- -ALTER TABLE `CouponUseLog` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `Food` --- -ALTER TABLE `Food` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `Guestbook` --- -ALTER TABLE `Guestbook` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `GuestbookCategory` --- -ALTER TABLE `GuestbookCategory` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `HotelRoom` --- -ALTER TABLE `HotelRoom` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `Link` --- -ALTER TABLE `Link` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=3; - --- --- 使用表AUTO_INCREMENT `LinkKind` --- -ALTER TABLE `LinkKind` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `Member` --- -ALTER TABLE `Member` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `MemberAddress` --- -ALTER TABLE `MemberAddress` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `MemberCoupon` --- -ALTER TABLE `MemberCoupon` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `MemberLog` --- -ALTER TABLE `MemberLog` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `MemberRoles` --- -ALTER TABLE `MemberRoles` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=4; - --- --- 使用表AUTO_INCREMENT `OnlinePayOrder` --- -ALTER TABLE `OnlinePayOrder` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `Order` --- -ALTER TABLE `Order` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `OrderDetail` --- -ALTER TABLE `OrderDetail` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `OrderLog` --- -ALTER TABLE `OrderLog` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `OtherConfig` --- -ALTER TABLE `OtherConfig` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=3; - --- --- 使用表AUTO_INCREMENT `Product` --- -ALTER TABLE `Product` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=6; - --- --- 使用表AUTO_INCREMENT `RebateChangeLog` --- -ALTER TABLE `RebateChangeLog` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `Shop` --- -ALTER TABLE `Shop` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `ShopCategory` --- -ALTER TABLE `ShopCategory` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `ShoppingCart` --- -ALTER TABLE `ShoppingCart` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `TargetEvent` --- -ALTER TABLE `TargetEvent` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=12; - --- --- 使用表AUTO_INCREMENT `WeixinRequestContent` --- -ALTER TABLE `WeixinRequestContent` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `WeixinRequestRule` --- -ALTER TABLE `WeixinRequestRule` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `WeixinResponseContent` --- -ALTER TABLE `WeixinResponseContent` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `WithdrawOrder` --- -ALTER TABLE `WithdrawOrder` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; - --- --- 使用表AUTO_INCREMENT `WXAppSession` --- -ALTER TABLE `WXAppSession` - MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号'; -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/COMCMS.Web/wwwroot/install/comcms_for_windows.sql b/COMCMS.Web/wwwroot/install/comcms_mysql.sql similarity index 54% rename from COMCMS.Web/wwwroot/install/comcms_for_windows.sql rename to COMCMS.Web/wwwroot/install/comcms_mysql.sql index f409ece..d665763 100644 --- a/COMCMS.Web/wwwroot/install/comcms_for_windows.sql +++ b/COMCMS.Web/wwwroot/install/comcms_mysql.sql @@ -3,156 +3,20 @@ Source Server : MySQL Source Server Type : MySQL - Source Server Version : 50718 - Source Host : localhost:3306 - Source Schema : comcms2 + Source Server Version : 50736 + Source Host : 127.0.0.1:3306 + Source Schema : comcms Target Server Type : MySQL - Target Server Version : 50718 + Target Server Version : 50736 File Encoding : 65001 - Date: 20/03/2020 12:00:29 + Date: 06/01/2026 15:38:46 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; --- ---------------------------- --- Table structure for activities --- ---------------------------- -DROP TABLE IF EXISTS `activities`; -CREATE TABLE `activities` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目名称', - `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目副标题', - `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `Counts` int(11) NOT NULL COMMENT '参加次数', - `Rank` int(11) NOT NULL COMMENT '排序', - `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', - `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', - `KindInfo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '栏目详细介绍', - `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', - `NeedCredits` decimal(19, 4) NOT NULL COMMENT '参加积分', - `ActivityType` int(11) NOT NULL COMMENT '活动类型', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of activities --- ---------------------------- -INSERT INTO `activities` VALUES (1, '抽奖活动', '抽奖大放送', NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 999, NULL, NULL, NULL, '/userfiles/images/2018/5cd802d771012c7a.jpg', 10.0000, 0, '2018-10-29 10:27:25'); - --- ---------------------------- --- Table structure for activitieslotterylog --- ---------------------------- -DROP TABLE IF EXISTS `activitieslotterylog`; -CREATE TABLE `activitieslotterylog` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `UseCredits` int(11) NOT NULL COMMENT '使用积分', - `RewardCredits` decimal(19, 4) NOT NULL COMMENT '兑换积分', - `RndNumber` int(11) NOT NULL COMMENT '随机产生数字', - `PrizeList` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '总随商品列表', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动抽奖记录' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for activity --- ---------------------------- -DROP TABLE IF EXISTS `activity`; -CREATE TABLE `activity` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目名称', - `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目副标题', - `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `Counts` int(11) NOT NULL COMMENT '参加次数', - `Rank` int(11) NOT NULL COMMENT '排序', - `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', - `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', - `KindInfo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '栏目详细介绍', - `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', - `NeedCredits` decimal(19, 4) NOT NULL COMMENT '参加积分', - `ActivityType` int(11) NOT NULL COMMENT '活动类型', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for activityproduct --- ---------------------------- -DROP TABLE IF EXISTS `activityproduct`; -CREATE TABLE `activityproduct` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `KId` int(11) NOT NULL COMMENT '栏目ID', - `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题', - `ItemNO` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号', - `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副标题', - `Unit` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品单位', - `Spec` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品规格尺寸', - `Color` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '颜色', - `Weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '重量', - `Price` decimal(19, 4) NOT NULL COMMENT '价格', - `MarketPrice` decimal(19, 4) NOT NULL COMMENT '市场价格', - `Material` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '材料', - `Front` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '封面', - `Credits` int(11) NOT NULL COMMENT '积分', - `MaxCredits` int(11) NOT NULL COMMENT '积分', - `Stock` int(11) NOT NULL COMMENT '库存', - `WarnStock` int(11) NOT NULL COMMENT '警告库存', - `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', - `Parameters` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品参数', - `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板', - `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsTop` int(11) NOT NULL COMMENT '是否置顶', - `Sequence` int(11) NOT NULL COMMENT '排序', - `CommentCount` int(11) NOT NULL COMMENT '评论数量', - `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', - `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - `Tags` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'TAG', - `ItemImg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '更多图片', - `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '时间', - `Probability` decimal(19, 4) NOT NULL COMMENT '概率:0.2为0.2%', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动商品' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of activityproduct --- ---------------------------- -INSERT INTO `activityproduct` VALUES (1, 1, 'iPhone Xs Max 256', NULL, NULL, NULL, NULL, NULL, NULL, 0.0000, 0.0000, NULL, NULL, 99999, 99999, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/userfiles/images/2018/4882ef7b9d62b5d5.jpg', 0, NULL, NULL, 0, '2018-10-29 11:51:49', '2018-10-29 11:52:29', 1.0000); -INSERT INTO `activityproduct` VALUES (2, 1, '小天鹅洗衣机', NULL, NULL, NULL, NULL, NULL, NULL, 0.0000, 0.0000, NULL, NULL, 9999, 9999, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/userfiles/images/2018/21bdecc83b3d6894.jpg', 0, NULL, NULL, 0, '2018-10-29 22:12:41', '2018-10-29 22:12:46', 5.0000); -INSERT INTO `activityproduct` VALUES (3, 1, 'iPhone Xs Max 128', NULL, NULL, NULL, NULL, NULL, NULL, 0.0000, 0.0000, NULL, NULL, 59999, 59999, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/userfiles/images/2018/21bdecc83b3d6894.jpg', 0, NULL, NULL, 0, '2018-10-29 14:54:13', '2018-10-29 14:54:16', 2.0000); -INSERT INTO `activityproduct` VALUES (4, 1, '20积分', NULL, NULL, NULL, NULL, NULL, NULL, 0.0000, 0.0000, NULL, NULL, 20, 20, 99999999, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/userfiles/images/2018/757732fb78bf7b74.jpg', 0, NULL, NULL, 0, '2018-10-29 21:37:45', '2018-10-29 21:38:11', 30.0000); -INSERT INTO `activityproduct` VALUES (5, 1, '1-10随机', NULL, NULL, NULL, NULL, NULL, NULL, 0.0000, 0.0000, NULL, NULL, 1, 10, 99999999, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/userfiles/images/2018/206037f458454943.jpg', 0, NULL, NULL, 0, '2018-10-29 21:40:00', '2018-10-29 21:40:17', 60.0000); - -- ---------------------------- -- Table structure for admin -- ---------------------------- @@ -168,89 +32,18 @@ CREATE TABLE `admin` ( `UserLevel` int(11) NOT NULL COMMENT '级别', `RoleId` int(11) NOT NULL COMMENT '管理组', `GroupId` int(11) NOT NULL COMMENT '用户组', - `LastLoginTime` datetime(0) NULL DEFAULT NULL COMMENT '最后登录时间', + `LastLoginTime` datetime NULL DEFAULT NULL COMMENT '最后登录时间', `LastLoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上次登录IP', - `ThisLoginTime` datetime(0) NULL DEFAULT NULL COMMENT '本次登录时间', + `ThisLoginTime` datetime NULL DEFAULT NULL COMMENT '本次登录时间', `ThisLoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '本次登录IP', `IsLock` int(11) NOT NULL COMMENT '是否是锁定', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of admin -- ---------------------------- -INSERT INTO `admin` VALUES (1, 'admin', '8788C77C8FA36CF9D3718026355AB571', 'fOtOFYYpLO90', 'admin', '', '', 100, 1, 0, '2020-03-06 15:40:43', '127.0.0.1', '2018-04-16 00:17:43', '127.0.0.1', 0); - --- ---------------------------- --- Table structure for adminlog --- ---------------------------- -DROP TABLE IF EXISTS `adminlog`; -CREATE TABLE `adminlog` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '管理员ID', - `GUID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '唯一ID', - `UserName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', - `PassWord` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码', - `LoginTime` datetime(0) NULL DEFAULT NULL COMMENT '登录时间', - `LoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP', - `IsLoginOK` int(11) NOT NULL COMMENT '是否登录成功', - `Actions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '记录', - `LastUpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '登录时间', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理日志表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of adminlog --- ---------------------------- -INSERT INTO `adminlog` VALUES (1, 0, '5d8b265b-342d-45f1-ab92-425791cd0b10', 'admin', '******', '2018-04-16 00:30:06', '127.0.0.1', 1, '查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;修改站点基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;查看基本配置;', '2018-04-16 01:04:56'); -INSERT INTO `adminlog` VALUES (2, 0, '49ebe38a-3cfb-4e16-afa8-718d0c0758a1', 'admin', '******', '2018-04-16 01:09:35', '123.1.189.126', 1, '查看基本配置;', '2018-04-16 01:14:19'); -INSERT INTO `adminlog` VALUES (3, 0, '592f0755-0b3b-4871-a33a-32b137bff2fd', 'admin', '******', '2018-04-16 08:43:30', '60.166.72.54', 1, '查看基本配置;', '2018-04-16 08:43:36'); -INSERT INTO `adminlog` VALUES (4, 0, '363eb952-0d60-4eb7-82b6-419c710bb89c', 'admin', '******', '2018-04-16 10:19:15', '61.140.236.194', 1, NULL, '2018-04-16 10:19:15'); -INSERT INTO `adminlog` VALUES (5, 0, 'e1699742-94c3-4eb7-8bda-0fe815533e57', 'admin', '******', '2018-04-16 10:19:52', '116.24.101.123', 1, '查看基本配置;查看基本配置;', '2018-04-16 10:26:05'); -INSERT INTO `adminlog` VALUES (6, 0, 'f1b1264d-6b65-4573-b3d1-ae6135aa18f4', 'admin', '******', '2018-04-16 10:24:57', '116.226.70.126', 1, '查看基本配置;查看基本配置;', '2018-04-16 10:25:15'); -INSERT INTO `adminlog` VALUES (7, 0, '453c6021-7bf7-4b38-9913-27536d827bfc', 'admin', '******', '2018-04-16 10:25:10', '112.64.119.42', 1, '查看基本配置;', '2018-04-16 10:25:41'); -INSERT INTO `adminlog` VALUES (8, 0, '5796a8c3-4eaf-4bba-8742-7378135dd93b', 'admin', '******', '2018-04-16 10:32:07', '113.118.198.128', 1, '查看基本配置;', '2018-04-16 10:32:25'); -INSERT INTO `adminlog` VALUES (9, 0, '46f181aa-4747-4633-8fad-099f06799fe6', 'admin', '******', '2018-04-16 10:35:19', '59.172.251.218', 1, NULL, '2018-04-16 10:35:19'); -INSERT INTO `adminlog` VALUES (10, 0, 'b2c7c5d3-9e9f-4b35-825c-041c71bb3e68', 'admin', '******', '2018-04-17 22:53:58', '59.42.239.56', 1, '查看后台事件列表(keyword:;page:0;limit:20);查看后台事件列表(keyword:;page:0;limit:20);查看后台事件列表(keyword:;page:0;limit:20);查看基本配置;查看SMTP配置;查看附件配置;查看附件配置;查看后台事件列表(keyword:;page:0;limit:20);查看Robots.txt;', '2018-04-18 00:20:16'); -INSERT INTO `adminlog` VALUES (11, 0, '9283b94f-d4ac-42d8-8ae8-ffb462877401', 'admin', '******', '2018-04-18 09:50:49', '61.140.238.15', 1, '查看Robots.txt;查看附件配置;查看附件配置;查看附件配置;修改附件配置;查看附件配置;', '2018-04-18 11:27:05'); -INSERT INTO `adminlog` VALUES (12, 0, '1a19389a-b14d-453a-9970-1f154dd5331b', 'admin', '******', '2018-04-18 09:52:15', '116.226.70.126', 1, '查看后台事件列表(keyword:;page:0;limit:20);', '2018-04-18 09:52:26'); -INSERT INTO `adminlog` VALUES (13, 0, '659402f8-b25a-42d8-9761-bbbbd349096f', 'admin', '******', '2018-04-18 09:53:41', '171.221.146.125', 1, '查看基本配置;查看后台事件列表(keyword:;page:0;limit:20);查看后台事件列表(keyword:;page:0;limit:25);', '2018-04-18 10:15:50'); -INSERT INTO `adminlog` VALUES (14, 0, 'e724d952-5c46-4c70-ac25-35b98c0dd121', 'admin', '******', '2018-04-18 09:54:47', '202.106.86.136', 1, '查看SMTP配置;', '2018-04-18 09:55:00'); -INSERT INTO `adminlog` VALUES (15, 0, '99d7a774-b6ec-42f9-96ef-1525ff6eae79', 'admin', '******', '2018-04-18 09:55:11', '182.242.249.54', 1, '查看基本配置;', '2018-04-18 09:55:27'); -INSERT INTO `adminlog` VALUES (16, 0, '596709a4-fe24-4141-8a4b-8c761d0a7e48', 'admin', '******', '2018-04-18 09:55:23', '113.57.27.145', 1, '查看基本配置;', '2018-04-18 09:55:29'); -INSERT INTO `adminlog` VALUES (17, 0, 'ba87f31b-075c-4de7-afa8-f99272b00a12', 'admin', '******', '2018-04-18 09:58:16', '121.33.75.50', 1, '查看基本配置;查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;', '2018-04-18 09:58:53'); -INSERT INTO `adminlog` VALUES (18, 0, 'f68c98ad-4fb1-441c-bbfb-e6734d46d07f', 'Admin', '******', '2018-04-18 09:58:23', '36.98.143.127', 1, '查看附件配置;', '2018-04-18 10:03:38'); -INSERT INTO `adminlog` VALUES (19, 0, 'c6b26c99-e361-44db-9969-df2799caca60', 'admin', '******', '2018-04-18 10:01:41', '106.120.233.218', 1, NULL, '2018-04-18 10:01:41'); -INSERT INTO `adminlog` VALUES (20, 0, '161763c2-d840-4949-a672-4ac3e6339ffb', 'admin', '******', '2018-04-18 10:08:42', '223.104.108.31', 1, NULL, '2018-04-18 10:08:42'); -INSERT INTO `adminlog` VALUES (21, 0, '0ed86444-f812-4ac7-840f-b0809a1be406', 'admin', '******', '2018-04-18 10:17:16', '171.221.146.125', 1, '查看后台事件列表(keyword:;page:0;limit:20);查看SMTP配置;查看附件配置;查看Robots.txt;查看后台事件列表(keyword:;page:0;limit:20);查看附件配置;查看SMTP配置;查看Robots.txt;查看后台事件列表(keyword:;page:0;limit:20);查看后台事件列表(keyword:;page:0;limit:10);查看后台事件列表(keyword:;page:0;limit:25);查看附件配置;修改附件配置;查看附件配置;', '2018-04-18 11:29:19'); -INSERT INTO `adminlog` VALUES (22, 0, '7aa7d5b4-4420-4918-b631-63c0a45ec141', 'admin', '******', '2018-04-18 10:21:01', '115.195.129.93', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看基本配置;查看SMTP配置;查看基本配置;查看SMTP配置;查看附件配置;', '2018-04-18 10:22:40'); -INSERT INTO `adminlog` VALUES (23, 0, 'ae5c1441-bedd-49fb-bb39-96ddbfd20dc0', 'admin', '******', '2018-04-18 10:24:51', '222.195.191.87', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看基本配置;查看基本配置;查看基本配置;', '2018-04-18 10:31:21'); -INSERT INTO `adminlog` VALUES (24, 0, 'eb783940-71cb-4681-940c-7faf15b2aeb0', 'admin', '******', '2018-04-18 10:27:43', '59.174.113.164', 1, '查看基本配置;查看SMTP配置;查看附件配置;查看Robots.txt;查看后台事件列表(keyword:;page:0;limit:20);查看基本配置;', '2018-04-18 10:32:29'); -INSERT INTO `adminlog` VALUES (25, 0, '1a7dbe72-653c-4f3e-a11f-07f3e384e374', 'admin', '******', '2018-04-18 11:13:45', '125.113.143.165', 1, NULL, '2018-04-18 11:13:45'); -INSERT INTO `adminlog` VALUES (26, 0, '1efdb7b8-674b-4490-9466-8cf56adedb90', 'admin', '******', '2018-04-18 13:45:03', '171.221.146.125', 1, NULL, '2018-04-18 13:45:03'); -INSERT INTO `adminlog` VALUES (27, 0, '8d7e7655-93d1-4e1c-9276-0c00ab5e0558', 'admin', '******', '2018-04-18 18:06:51', '113.109.108.136', 1, '查看文章栏目列表页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看文章栏目列表页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;查看文章栏目列表页面;查看添加文章栏目页面;查看添加文章栏目页面;查看添加文章栏目页面;添加文章栏目(id:1);查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;修改文章栏目(id:1);查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;查看文章栏目列表页面;查看/编辑文章栏目(id:1)页面;查看文章列表;查看添加文章页面;查看文章列表;查看添加文章页面;添加文章(id:1);查看文章(1);编辑文章(id:1);查看附件配置;修改附件配置;查看附件配置;查看文章(1);查看文章栏目列表页面;', '2018-04-18 20:37:31'); -INSERT INTO `adminlog` VALUES (28, 0, 'e3217152-574c-4b7d-b8a6-6579333587fd', 'admin', '******', '2018-11-15 00:44:56', '127.0.0.1', 1, '|||2018-11-15 00:45: 查看文章栏目列表页面;|||2018-11-15 00:45: 查看文章列表;|||2018-11-15 00:45: 查看文章(1);|||2018-11-15 00:45: 查看文章(1);|||2018-11-15 00:45: 查看文章(1);|||2018-11-15 00:45: 查看文章(1);', '2018-11-15 00:45:59'); -INSERT INTO `adminlog` VALUES (29, 0, '6b4d37d3-eb88-4c32-acdf-894632b031b6', 'admin', '******', '2018-11-15 23:43:02', '127.0.0.1', 1, '|||2018-11-15 23:43: 查看基本配置;|||2018-11-15 23:43: 查看文章栏目列表页面;|||2018-11-15 23:44: 查看添加文章栏目页面;|||2018-11-15 23:44: 添加文章栏目(id:2);|||2018-11-15 23:44: 查看文章栏目列表页面;|||2018-11-15 23:44: 查看添加文章栏目页面;|||2018-11-15 23:47: 添加文章栏目(id:3);|||2018-11-15 23:47: 查看文章栏目列表页面;|||2018-11-15 23:47: 查看添加文章栏目页面;|||2018-11-15 23:47: 添加文章栏目(id:4);|||2018-11-15 23:47: 查看文章栏目列表页面;|||2018-11-15 23:47: 查看添加文章栏目页面;|||2018-11-15 23:48: 添加文章栏目(id:5);|||2018-11-15 23:48: 查看文章栏目列表页面;|||2018-11-15 23:48: 查看商品栏目列表页面;|||2018-11-15 23:48: 查看添加商品栏目页面;|||2018-11-15 23:48: 查看添加商品栏目页面;|||2018-11-15 23:48: 添加商品栏目(id:1);|||2018-11-15 23:48: 查看商品栏目列表页面;|||2018-11-15 23:48: 查看添加商品栏目页面;|||2018-11-15 23:49: 添加商品栏目(id:2);|||2018-11-15 23:49: 查看商品栏目列表页面;|||2018-11-15 23:49: 查看添加商品栏目页面;|||2018-11-15 23:49: 添加商品栏目(id:3);|||2018-11-15 23:49: 查看商品栏目列表页面;|||2018-11-15 23:58: 查看文章列表;|||2018-11-15 23:58: 查看添加文章页面;|||2018-11-15 23:58: 添加文章(id:2);|||2018-11-16 00:42: 修改站点基本配置;|||2018-11-16 00:42: 查看基本配置;', '2018-11-16 00:42:24'); -INSERT INTO `adminlog` VALUES (30, 0, '109e74c6-76cb-4d01-8012-40f17d19c49e', 'admin', '******', '2018-11-18 23:30:44', '127.0.0.1', 1, '|||2018-11-18 23:30: 查看基本配置;|||2018-11-18 23:30: 查看文章栏目列表页面;|||2018-11-18 23:31: 查看/编辑文章栏目(id:2)页面;|||2018-11-18 23:31: 修改文章栏目(id:2);|||2018-11-18 23:31: 查看文章栏目列表页面;|||2018-11-18 23:31: 查看添加文章栏目页面;|||2018-11-18 23:31: 添加文章栏目(id:6);|||2018-11-18 23:31: 查看文章栏目列表页面;|||2018-11-18 23:31: 查看添加文章栏目页面;|||2018-11-18 23:31: 添加文章栏目(id:7);|||2018-11-18 23:31: 查看文章栏目列表页面;|||2018-11-18 23:32: 查看/编辑文章栏目(id:4)页面;|||2018-11-18 23:32: 修改文章栏目(id:4);|||2018-11-18 23:32: 查看文章栏目列表页面;|||2018-11-18 23:33: 查看添加文章栏目页面;|||2018-11-18 23:33: 添加文章栏目(id:8);|||2018-11-18 23:33: 查看文章栏目列表页面;|||2018-11-18 23:33: 查看添加文章栏目页面;|||2018-11-18 23:33: 添加文章栏目(id:9);|||2018-11-18 23:33: 查看文章栏目列表页面;|||2018-11-18 23:33: 查看添加文章栏目页面;|||2018-11-18 23:33: 添加文章栏目(id:10);|||2018-11-18 23:33: 查看文章栏目列表页面;|||2018-11-18 23:33: 查看添加文章栏目页面;|||2018-11-18 23:33: 添加文章栏目(id:11);|||2018-11-18 23:33: 查看文章栏目列表页面;|||2018-11-18 23:33: 查看文章列表;|||2018-11-18 23:34: 查看文章(1);|||2018-11-18 23:35: 编辑文章(id:1);|||2018-11-18 23:50: 查看商品栏目列表页面;|||2018-11-19 00:08: 查看添加文章页面;|||2018-11-19 00:08: 添加文章(id:3);|||2018-11-19 00:08: 查看添加文章页面;|||2018-11-19 00:08: 添加文章(id:4);|||2018-11-19 00:08: 查看添加文章页面;|||2018-11-19 00:08: 添加文章(id:5);|||2018-11-19 00:08: 查看添加文章页面;|||2018-11-19 00:08: 添加文章(id:6);|||2018-11-19 00:16: 查看添加文章栏目页面;|||2018-11-19 00:16: 添加文章栏目(id:12);|||2018-11-19 00:16: 查看文章栏目列表页面;', '2018-11-19 00:16:58'); -INSERT INTO `adminlog` VALUES (31, 0, '4bb5af57-640c-43a7-b228-d48041e56775', 'admin', '******', '2018-12-01 21:36:28', '127.0.0.1', 1, '|||2018-12-01 21:36: 查看文章栏目列表页面;|||2018-12-01 21:36: 查看/编辑文章栏目(id:1)页面;|||2018-12-01 21:37: 查看文章栏目列表页面;|||2018-12-01 21:37: 查看/编辑文章栏目(id:1)页面;|||2018-12-01 21:37: 修改文章栏目(id:1);|||2018-12-01 21:37: 查看文章栏目列表页面;|||2018-12-01 21:37: 查看/编辑文章栏目(id:1)页面;|||2018-12-01 21:38: 查看/编辑文章栏目(id:1)页面;|||2018-12-01 21:44: 查看/编辑文章栏目(id:2)页面;|||2018-12-01 21:44: 修改文章栏目(id:2);|||2018-12-01 21:44: 查看文章栏目列表页面;|||2018-12-01 22:25: 查看/编辑文章栏目(id:6)页面;|||2018-12-01 22:25: 修改文章栏目(id:6);|||2018-12-01 22:25: 查看文章栏目列表页面;|||2018-12-01 22:27: 查看/编辑文章栏目(id:2)页面;|||2018-12-01 22:27: 查看/编辑文章栏目(id:4)页面;|||2018-12-01 22:27: 查看/编辑文章栏目(id:6)页面;|||2018-12-01 22:27: 修改文章栏目(id:6);|||2018-12-01 22:27: 查看文章栏目列表页面;|||2018-12-01 22:27: 查看/编辑文章栏目(id:2)页面;|||2018-12-01 22:27: 修改文章栏目(id:2);|||2018-12-01 22:27: 查看文章栏目列表页面;|||2018-12-01 22:27: 查看/编辑文章栏目(id:4)页面;|||2018-12-01 22:27: 修改文章栏目(id:4);|||2018-12-01 22:27: 查看文章栏目列表页面;|||2018-12-01 22:27: 查看/编辑文章栏目(id:5)页面;|||2018-12-01 22:27: 查看/编辑文章栏目(id:5)页面;|||2018-12-01 22:28: 修改文章栏目(id:5);|||2018-12-01 22:28: 查看文章栏目列表页面;|||2018-12-01 22:44: 查看文章列表;|||2018-12-01 22:44: 查看文章(2);|||2018-12-01 22:44: 编辑文章(id:2);|||2018-12-01 23:05: 查看/编辑文章栏目(id:10)页面;|||2018-12-01 23:05: 查看文章栏目列表页面;|||2018-12-01 23:05: 查看/编辑文章栏目(id:10)页面;|||2018-12-01 23:06: 查看/编辑文章栏目(id:1)页面;|||2018-12-01 23:06: 查看文章栏目列表页面;|||2018-12-01 23:06: 查看/编辑文章栏目(id:2)页面;|||2018-12-01 23:06: 查看添加文章栏目页面;|||2018-12-01 23:07: 查看文章栏目列表页面;|||2018-12-01 23:07: 查看/编辑文章栏目(id:10)页面;|||2018-12-01 23:07: 修改文章栏目(id:10);|||2018-12-01 23:07: 查看文章栏目列表页面;|||2018-12-01 23:07: 查看/编辑文章栏目(id:10)页面;|||2018-12-01 23:08: 查看文章栏目列表页面;|||2018-12-01 23:08: 查看/编辑文章栏目(id:10)页面;|||2018-12-01 23:08: 修改文章栏目(id:10);|||2018-12-01 23:08: 查看文章栏目列表页面;', '2018-12-01 23:08:28'); -INSERT INTO `adminlog` VALUES (32, 0, '229bbc0f-65f1-413f-99e3-aaeda53ddd34', 'admin', '******', '2018-12-02 00:31:23', '127.0.0.1', 1, '|||2018-12-02 00:31: 查看文章栏目列表页面;|||2018-12-02 00:31: 查看/编辑文章栏目(id:11)页面;|||2018-12-02 00:31: 查看/编辑文章栏目(id:11)页面;|||2018-12-02 00:32: 修改文章栏目(id:11);|||2018-12-02 00:32: 查看文章栏目列表页面;|||2018-12-02 01:00: 查看留言分类列表页面;|||2018-12-02 01:00: 添加留言分类(1);|||2018-12-02 01:00: 查看留言分类列表页面;', '2018-12-02 01:00:59'); -INSERT INTO `adminlog` VALUES (33, 0, '1fde3cde-8f37-4a1f-b2fb-44dbb9215ca3', 'admin', '******', '2018-12-02 16:32:51', '127.0.0.1', 1, '|||2018-12-02 16:40: 查看友情链接列表;|||2018-12-02 16:40: 查看友情链接分类列表页面;|||2018-12-02 16:40: 添加友情链接分类(1);|||2018-12-02 16:40: 查看友情链接分类列表页面;|||2018-12-02 16:43: 查看添加友情链接页面;|||2018-12-02 16:45: 查看添加友情链接页面;|||2018-12-02 16:45: 添加友情链接(1);|||2018-12-02 16:45: 查看友情链接列表;|||2018-12-02 16:46: 查看友情链接列表;|||2018-12-02 16:46: 查看/编辑友情链接(1);|||2018-12-02 16:46: 查看添加友情链接页面;|||2018-12-02 16:46: 添加友情链接(2);|||2018-12-02 16:46: 查看友情链接列表;|||2018-12-02 16:52: 查看文章列表;|||2018-12-02 16:52: 查看添加文章页面;|||2018-12-02 16:53: 添加文章(id:7);|||2018-12-02 16:54: 查看添加文章页面;|||2018-12-02 16:55: 添加文章(id:8);|||2018-12-02 16:55: 查看添加文章页面;|||2018-12-02 16:55: 添加文章(id:9);|||2018-12-02 16:56: 查看添加文章页面;|||2018-12-02 16:56: 添加文章(id:10);|||2018-12-02 16:56: 查看添加文章页面;|||2018-12-02 16:56: 添加文章(id:11);|||2018-12-02 16:58: 查看文章栏目列表页面;|||2018-12-02 17:05: 查看/编辑文章栏目(id:7)页面;|||2018-12-02 17:05: 查看/编辑文章栏目(id:6)页面;|||2018-12-02 17:09: 查看文章栏目列表页面;|||2018-12-02 17:10: 查看/编辑文章栏目(id:6)页面;|||2018-12-02 17:10: 修改文章栏目(id:6);|||2018-12-02 17:10: 查看文章栏目列表页面;|||2018-12-02 17:11: 查看/编辑文章栏目(id:7)页面;|||2018-12-02 17:11: 修改文章栏目(id:7);|||2018-12-02 17:11: 查看文章栏目列表页面;|||2018-12-02 17:11: 查看/编辑文章栏目(id:8)页面;|||2018-12-02 17:11: 修改文章栏目(id:8);|||2018-12-02 17:11: 查看文章栏目列表页面;|||2018-12-02 17:12: 查看/编辑文章栏目(id:9)页面;|||2018-12-02 17:12: 修改文章栏目(id:9);|||2018-12-02 17:12: 查看文章栏目列表页面;|||2018-12-02 17:12: 查看/编辑文章栏目(id:12)页面;|||2018-12-02 17:12: 修改文章栏目(id:12);|||2018-12-02 17:12: 查看文章栏目列表页面;|||2018-12-02 17:14: 查看文章(7);|||2018-12-02 17:14: 查看文章(1);|||2018-12-02 17:14: 编辑文章(id:1);|||2018-12-02 17:14: 查看商品栏目列表页面;|||2018-12-02 17:14: 查看商品列表;|||2018-12-02 17:14: 查看添加商品页面;|||2018-12-02 17:17: 查看添加商品页面;|||2018-12-02 17:20: 添加商品(id:1);|||2018-12-02 17:21: 查看添加商品页面;|||2018-12-02 17:22: 添加商品(id:2);|||2018-12-02 17:22: 查看添加商品页面;|||2018-12-02 17:23: 添加商品(id:3);|||2018-12-02 17:23: 查看添加商品页面;|||2018-12-02 17:23: 添加商品(id:4);|||2018-12-02 17:49: 查看添加商品页面;|||2018-12-02 17:50: 添加商品(id:5);|||2018-12-02 17:56: 查看广告分类列表页面;|||2018-12-02 17:56: 添加广告栏目(1);|||2018-12-02 17:56: 查看广告分类列表页面;|||2018-12-02 17:56: 查看广告列表;|||2018-12-02 17:56: 查看添加广告页面;|||2018-12-02 18:02: 添加广告(1);|||2018-12-02 18:02: 查看添加广告页面;|||2018-12-02 18:06: 添加广告(2);|||2018-12-02 18:06: 查看/编辑广告(1);|||2018-12-02 18:42: 查看文章栏目列表页面;|||2018-12-02 18:42: 查看/编辑文章栏目(id:6)页面;|||2018-12-02 18:42: 修改文章栏目(id:6);|||2018-12-02 18:42: 查看文章栏目列表页面;', '2018-12-02 18:42:45'); -INSERT INTO `adminlog` VALUES (34, 0, 'b2daaeb3-b094-48bd-978d-8e777713f048', 'admin', '******', '2018-12-05 11:49:54', '127.0.0.1', 1, '|||2018-12-05 11:49: 查看基本配置;|||2018-12-05 11:49: 修改站点基本配置;|||2018-12-05 11:50: 查看基本配置;', '2018-12-05 11:50:00'); -INSERT INTO `adminlog` VALUES (35, 0, '0d7c88f0-873e-4fbc-a3bd-04ad6cecaace', 'admin', '******', '2019-03-19 18:58:02', '127.0.0.1', 1, '|||2019-03-19 18:58: 查看文章列表;|||2019-03-19 18:58: 查看添加文章页面;|||2019-03-19 19:17: 查看文章列表;|||2019-03-19 19:17: 查看文章(9);|||2019-03-19 19:18: 查看文章(1);|||2019-03-19 19:18: 查看文章(1);|||2019-03-19 19:18: 查看文章(1);|||2019-03-19 19:19: 查看文章(1);|||2019-03-19 19:19: 查看文章(1);|||2019-03-19 19:19: 查看文章(1);', '2019-03-19 19:19:51'); -INSERT INTO `adminlog` VALUES (36, 0, 'fd00cebc-39f6-4513-a5bf-91b8e65dfc7a', 'admin', '******', '2019-03-29 15:33:54', '127.0.0.1', 1, '|||2019-03-29 15:33: 查看文章列表;|||2019-03-29 15:35: 查看文章列表;', '2019-03-29 15:35:52'); -INSERT INTO `adminlog` VALUES (37, 0, 'bae22480-fb8c-4e37-9772-8196ce2fe971', 'admin', '******', '2019-09-11 14:42:08', '127.0.0.1', 1, NULL, '2019-09-11 14:42:08'); -INSERT INTO `adminlog` VALUES (38, 0, '8040a28e-a44e-4f76-a499-e0a3891c4262', 'admin', '******', '2019-09-11 14:43:44', '127.0.0.1', 1, NULL, '2019-09-11 14:43:44'); -INSERT INTO `adminlog` VALUES (39, 0, '3ea95a69-3d79-4a2b-ac61-10c91c30c67f', 'admin', '******', '2019-09-11 14:44:20', '127.0.0.1', 1, '|||2019-09-11 14:44: 查看管理组列表;|||2019-09-11 14:44: 查看后台事件列表(keyword:;page:0;limit:20);|||2019-09-11 14:45: 查看管理员列表|||2019-09-11 14:45: 查看/编辑管理员(admin);|||2019-09-11 14:45: 查看管理组(1)详情;', '2019-09-11 14:45:13'); -INSERT INTO `adminlog` VALUES (40, 0, '25df79b6-5b57-4570-982d-365bd0697d65', 'admin', '******', '2019-09-27 17:16:10', '127.0.0.1', 1, '|||2019-09-27 17:16: 查看文章列表;|||2019-09-27 17:16: 查看文章(11);', '2019-09-27 17:16:16'); -INSERT INTO `adminlog` VALUES (41, 0, 'ba65e78c-1b54-4998-93a4-1b6a84fa0651', 'admin', '******', '2019-10-30 17:02:16', '127.0.0.1', 1, NULL, '2019-10-30 17:02:16'); -INSERT INTO `adminlog` VALUES (42, 0, '9756c023-6019-4516-9f15-dc139d870c18', 'admin', '******', '2019-10-30 17:10:16', '127.0.0.1', 1, NULL, '2019-10-30 17:10:16'); -INSERT INTO `adminlog` VALUES (43, 0, '34570af3-d95f-48ae-b1fb-9f1b33bcd5bd', 'admin', '******', '2019-10-30 17:46:24', '127.0.0.1', 1, NULL, '2019-10-30 17:46:24'); -INSERT INTO `adminlog` VALUES (44, 0, '3dd4eb9e-60a6-47e3-a7d0-b7ed4d87c0a2', 'admin', '******', '2019-11-05 10:20:02', '127.0.0.1', 1, NULL, '2019-11-05 10:20:02'); -INSERT INTO `adminlog` VALUES (45, 0, '1aa1b824-d522-4294-aae8-00a4826cfd3c', 'admin', '******', '2019-12-06 16:10:01', '127.0.0.1', 1, NULL, '2019-12-06 16:10:01'); -INSERT INTO `adminlog` VALUES (46, 0, '05efd4b7-0455-4a18-b2ad-19864033f5ff', 'admin', '******', '2020-02-13 11:31:01', '127.0.0.1', 1, NULL, '2020-02-13 11:31:01'); -INSERT INTO `adminlog` VALUES (47, 0, '135246f9-891c-407c-ba04-6b27c29ae3d9', 'admin', '******', '2020-02-19 13:48:53', '127.0.0.1', 1, NULL, '2020-02-19 13:48:53'); -INSERT INTO `adminlog` VALUES (48, 0, 'bd411eb9-8ae0-40eb-8447-dd5b1d5ba25d', 'admin', '******', '2020-02-19 14:41:21', '127.0.0.1', 1, NULL, '2020-02-19 14:41:21'); -INSERT INTO `adminlog` VALUES (49, 0, '0755c829-aa1e-4919-b608-93c92599d30b', 'admin', '******', '2020-03-06 15:40:43', '127.0.0.1', 1, NULL, '2020-03-06 15:40:43'); +INSERT INTO `admin` VALUES (1, 'admin', 'A8D385D64F7578E5985E3FEDF0DC82C1', 'w0gOGhJB2a', 'admin', '', '', 100, 1, 0, '2026-01-06 10:10:23', '127.0.0.1', '2018-04-16 00:17:43', '127.0.0.1', 0); -- ---------------------------- -- Table structure for adminmenu @@ -271,7 +64,7 @@ CREATE TABLE `adminmenu` ( `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '后台菜单' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 40 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '后台菜单' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of adminmenu @@ -314,6 +107,7 @@ INSERT INTO `adminmenu` VALUES (35, 'wxkeywordreply', '关键字回复', NULL, N INSERT INTO `adminmenu` VALUES (36, 'clickreplyrule', '点击事件自动回复', NULL, NULL, 'Weixin/ClickReplyRule', 32, 1, '0,32,', 0, 0, NULL, NULL); INSERT INTO `adminmenu` VALUES (37, 'robots', 'Robots文档设置', NULL, NULL, 'System/Robots', 2, 1, '0,2,', 0, 3, NULL, NULL); INSERT INTO `adminmenu` VALUES (38, 'admincplog', '后台管理日志', NULL, NULL, 'Member/AdminCPLogList', 18, 1, '0,18,', 0, 10, NULL, NULL); +INSERT INTO `adminmenu` VALUES (39, 'attach', '附件管理', NULL, NULL, 'Attach/AttachList', 2, 1, '0,2,', 0, 99, NULL, NULL); -- ---------------------------- -- Table structure for adminmenuevent @@ -327,7 +121,7 @@ CREATE TABLE `adminmenuevent` ( `EventKey` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件key', `EventName` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件名称', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 192 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '后台菜单对应的事件权限' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 203 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '后台菜单对应的事件权限' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of adminmenuevent @@ -523,6 +317,17 @@ INSERT INTO `adminmenuevent` VALUES (188, 37, 'robots', 2, 'edit', '修改'); INSERT INTO `adminmenuevent` VALUES (189, 37, 'robots', 4, 'view', '查看'); INSERT INTO `adminmenuevent` VALUES (190, 38, 'admincplog', 4, 'view', '查看'); INSERT INTO `adminmenuevent` VALUES (191, 38, 'admincplog', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (192, 39, 'attach', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (193, 39, 'attach', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (194, 39, 'attach', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (195, 39, 'attach', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (196, 39, 'attach', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (197, 39, 'attach', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (198, 39, 'attach', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (199, 39, 'attach', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (200, 39, 'attach', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (201, 39, 'attach', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (202, 39, 'attach', 11, 'confirm', '确认'); -- ---------------------------- -- Table structure for adminroles @@ -540,13 +345,17 @@ CREATE TABLE `adminroles` ( `Color` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '颜色', `Menus` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '管理菜单', `Powers` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '权限', + `AuthorizedArticleCagegory` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '已授权文章栏目', + `AuthorizedCagegory` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '已授权商品栏目', + `OnlyEditMyselfArticle` int(11) NULL DEFAULT NULL COMMENT '是否只允许编辑自己的文章', + `OnlyEditMyselfProduct` int(11) NULL DEFAULT NULL COMMENT '是否只允许编辑自己的产品', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理角色' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理角色' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of adminroles -- ---------------------------- -INSERT INTO `adminroles` VALUES (1, 0, '超级管理员', '系统超级管理员', 1, 5, 1, 0, '', '', ''); +INSERT INTO `adminroles` VALUES (1, 0, '超级管理员', '系统超级管理员', 1, 5, 1, 0, '', '', '', NULL, NULL, NULL, NULL); -- ---------------------------- -- Table structure for ads @@ -558,12 +367,12 @@ CREATE TABLE `ads` ( `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '广告详情JSON', `KId` int(11) NOT NULL COMMENT '分类ID', `TId` int(11) NOT NULL COMMENT '广告代码类型:0代码、1文字广告、2图片广告、3Flash广告、4幻灯片广告、5漂浮广告、6对联浮动图片广告', - `StartTime` datetime(0) NULL DEFAULT NULL COMMENT '起始时间', - `EndTime` datetime(0) NULL DEFAULT NULL COMMENT '结束时间', + `StartTime` datetime NULL DEFAULT NULL COMMENT '起始时间', + `EndTime` datetime NULL DEFAULT NULL COMMENT '结束时间', `IsDisabled` enum('N','Y') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否禁用广告', `Sequence` int(11) NOT NULL COMMENT '排序,默认999', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '广告详情' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '广告详情' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of ads @@ -581,7 +390,7 @@ CREATE TABLE `adskind` ( `KindInfo` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '简单说明', `Rank` int(11) NOT NULL COMMENT '排序', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '广告类别' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '广告类别' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of adskind @@ -625,27 +434,28 @@ CREATE TABLE `article` ( `OriginURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '来源地址', `ItemImg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '更多图片', `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '时间', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '时间', `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '存放目录', + `FileName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of article -- ---------------------------- -INSERT INTO `article` VALUES (1, 1, '关于我们', 'About Us', '

内容管理系统(英语:content management system,缩写为 CMS)是指在一个合作模式下,用于管理工作流程的一套制度。该系统可应用于手工操作中,也可以应用到计算机或网络里。作为一种中央储存器(central repository),内容管理系统可将相关内容集中储存并具有群组管理、版本控制等功能。版本控制是内容管理系统的一个主要优势。

\n\n

内容是任何类型的数字信息的结合体,可以是文本、图形图像、Web页面、业务文档、数据库表单、视频、声音、XML文件等。应该说,内容是一个比数据、文档和信息更广的概念,是对各种结构化数据、非结构化文档、信息的聚合。管理就是施加在“内容”对象上的一系列处理过程,包括收集、存储、审批、整理、定位、转换、分发、搜索、分析等,目的是为了使“内容”能够在正确的时间、以正确的形式传递到正确的地点和人。

\n\n

内容管理可以定义为:协助组织和个人,借助信息技术,实现内容的创建、储存、分享、应用、检索,并在企业个人、组织、业务、战略等诸方面产生价值的过程。而内容管理系统就是能够支撑内容管理的一种工具或一套工具的软件系统。

\n\n

内容管理系统的定义可以很狭窄,通常是指门户或商业网站的发布和管理系统;定义也可以很宽泛,个人网站系统也可归入其中。Wiki也是一种内容管理系统,Blog也算是一种内容管理系统。

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 999, 0, NULL, NULL, NULL, '/images/default/slide-3.jpg', 0, NULL, NULL, NULL, '/userfiles/images/2018/20180413145904(1).png|||', 1, '2018-04-18 20:35:54', '2018-12-02 17:14:13', NULL, NULL); -INSERT INTO `article` VALUES (2, 10, '联系我们', NULL, '

联系我们

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-15 23:58:24', '2018-12-01 22:44:45', NULL, NULL); -INSERT INTO `article` VALUES (3, 1, '企业文化', NULL, '

企业文化

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:19', NULL, NULL, NULL); -INSERT INTO `article` VALUES (4, 1, '发展历程', NULL, '

发展历程

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:28', NULL, NULL, NULL); -INSERT INTO `article` VALUES (5, 1, '组织架构', NULL, '

组织架构

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:38', NULL, NULL, NULL); -INSERT INTO `article` VALUES (6, 1, '荣誉证书', NULL, '

荣誉证书

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:49', NULL, NULL, NULL); -INSERT INTO `article` VALUES (7, 6, 'COMCMS v0.9 正式发布,PC版前端演示', 'COMCMS v0.9 正式发布,PC版前端演示', '

COMCMS v0.9 正式发布,PC版前端演示

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:52:15', NULL, NULL, NULL); -INSERT INTO `article` VALUES (8, 7, '行业资讯行业资讯行业资讯行业资讯', NULL, '

行业资讯行业资讯行业资讯行业资讯

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:54:48', NULL, NULL, NULL); -INSERT INTO `article` VALUES (9, 6, 'COMCMS v0.9 正式发布,PC版前端演示2', NULL, '

COMCMS v0.9 正式发布,PC版前端演示2

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:55:39', NULL, NULL, NULL); -INSERT INTO `article` VALUES (10, 6, 'COMCMS v0.9 正式发布,PC版前端演示3', NULL, '

COMCMS v0.9 正式发布,PC版前端演示3

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:56:18', NULL, NULL, NULL); -INSERT INTO `article` VALUES (11, 6, 'COMCMS v0.9 正式发布,PC版前端演示4', NULL, '

COMCMS v0.9 正式发布,PC版前端演示4

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:56:27', '2019-10-30 17:10:39', NULL, NULL); +INSERT INTO `article` VALUES (1, 1, '关于我们', 'About Us', '

内容管理系统(英语:content management system,缩写为 CMS)是指在一个合作模式下,用于管理工作流程的一套制度。该系统可应用于手工操作中,也可以应用到计算机或网络里。作为一种中央储存器(central repository),内容管理系统可将相关内容集中储存并具有群组管理、版本控制等功能。版本控制是内容管理系统的一个主要优势。

\n\n

内容是任何类型的数字信息的结合体,可以是文本、图形图像、Web页面、业务文档、数据库表单、视频、声音、XML文件等。应该说,内容是一个比数据、文档和信息更广的概念,是对各种结构化数据、非结构化文档、信息的聚合。管理就是施加在“内容”对象上的一系列处理过程,包括收集、存储、审批、整理、定位、转换、分发、搜索、分析等,目的是为了使“内容”能够在正确的时间、以正确的形式传递到正确的地点和人。

\n\n

内容管理可以定义为:协助组织和个人,借助信息技术,实现内容的创建、储存、分享、应用、检索,并在企业个人、组织、业务、战略等诸方面产生价值的过程。而内容管理系统就是能够支撑内容管理的一种工具或一套工具的软件系统。

\n\n

内容管理系统的定义可以很狭窄,通常是指门户或商业网站的发布和管理系统;定义也可以很宽泛,个人网站系统也可归入其中。Wiki也是一种内容管理系统,Blog也算是一种内容管理系统。

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 999, 0, NULL, NULL, NULL, '/images/default/slide-3.jpg', 0, NULL, NULL, NULL, '/userfiles/images/2018/20180413145904(1).png|||', 1, '2018-04-18 20:35:54', '2018-12-02 17:14:13', NULL, NULL, NULL); +INSERT INTO `article` VALUES (2, 10, '联系我们', NULL, '

联系我们

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-15 23:58:24', '2018-12-01 22:44:45', NULL, NULL, NULL); +INSERT INTO `article` VALUES (3, 1, '企业文化', NULL, '

企业文化

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:19', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (4, 1, '发展历程', NULL, '

发展历程

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:28', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (5, 1, '组织架构', NULL, '

组织架构

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:38', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (6, 1, '荣誉证书', NULL, '

荣誉证书

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:49', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (7, 6, 'COMCMS v0.9 正式发布,PC版前端演示', 'COMCMS v0.9 正式发布,PC版前端演示', '

COMCMS v0.9 正式发布,PC版前端演示

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:52:15', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (8, 7, '行业资讯行业资讯行业资讯行业资讯', NULL, '

行业资讯行业资讯行业资讯行业资讯

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:54:48', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (9, 6, 'COMCMS v0.9 正式发布,PC版前端演示2', NULL, '

COMCMS v0.9 正式发布,PC版前端演示2

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:55:39', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (10, 6, 'COMCMS v0.9 正式发布,PC版前端演示3', NULL, '

COMCMS v0.9 正式发布,PC版前端演示3

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:56:18', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (11, 6, 'COMCMS v0.9 正式发布,PC版前端演示4', NULL, '

COMCMS v0.9 正式发布,PC版前端演示4

\n\n

 

\n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:56:27', '2026-01-06 10:12:46', NULL, NULL, NULL); -- ---------------------------- -- Table structure for articlecategory @@ -684,46 +494,25 @@ CREATE TABLE `articlecategory` ( `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', `AdsId` int(11) NOT NULL COMMENT '广告ID', `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目录路径', + `AllowIp` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'IP地址限制。每一行一条记录,可以用“-”分割', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章栏目' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章栏目' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of articlecategory -- ---------------------------- -INSERT INTO `articlecategory` VALUES (1, '关于我们', NULL, NULL, NULL, NULL, '1', NULL, 'Index.cshtml', 'Detail_About.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 5, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (2, '新闻资讯', NULL, NULL, NULL, NULL, '/Article/Index/6', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (3, '项目案例', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (4, '用户服务', NULL, NULL, NULL, NULL, '/Article/Index/8', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (5, '联系我们', NULL, NULL, NULL, NULL, '/Article/Index/10', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (6, '公司新闻', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 2, 2, 1, '0,2,', 0, 0, 0, 0, 0, 1, 0, 4, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (7, '行业资讯', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 2, 1, '0,2,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (8, '产品使用', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (9, '产品下载', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (10, '联系方式', NULL, NULL, NULL, NULL, '2', NULL, 'Index.cshtml', 'Detail_Contact.cshtml', NULL, 1, 15, 5, 1, '0,5,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (11, '在线留言', NULL, NULL, NULL, NULL, NULL, NULL, 'Index_Guestbook.cshtml', 'Detail.cshtml', NULL, 0, 15, 5, 1, '0,5,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); -INSERT INTO `articlecategory` VALUES (12, '常见问题', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); - --- ---------------------------- --- Table structure for balancechangelog --- ---------------------------- -DROP TABLE IF EXISTS `balancechangelog`; -CREATE TABLE `balancechangelog` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `AdminId` int(11) NOT NULL COMMENT '管理员ID', - `UserName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '时间', - `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP', - `Actions` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录', - `Reward` decimal(10, 0) NOT NULL COMMENT '总积分', - `BeforChange` decimal(10, 0) NOT NULL COMMENT '总积分', - `AfterChange` decimal(10, 0) NOT NULL COMMENT '总积分', - `LogDetails` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详细记录', - `TypeId` int(11) NOT NULL COMMENT '类型 0 充值 1 购买 2 赠送 3 退款 4 分销提成', - `OrderId` int(11) NOT NULL COMMENT '订单ID', - `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户余额变化记录' ROW_FORMAT = Dynamic; +INSERT INTO `articlecategory` VALUES (1, '关于我们', NULL, NULL, NULL, NULL, '1', NULL, 'Index.cshtml', 'Detail_About.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 5, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (2, '新闻资讯', NULL, NULL, NULL, NULL, '/Article/Index/6', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (3, '项目案例', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (4, '用户服务', NULL, NULL, NULL, NULL, '/Article/Index/8', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (5, '联系我们', NULL, NULL, NULL, NULL, '/Article/Index/10', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (6, '公司新闻', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 2, 2, 1, '0,2,', 0, 0, 0, 0, 0, 1, 0, 4, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (7, '行业资讯', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 2, 1, '0,2,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (8, '产品使用', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (9, '产品下载', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (10, '联系方式', NULL, NULL, NULL, NULL, '2', NULL, 'Index.cshtml', 'Detail_Contact.cshtml', NULL, 1, 15, 5, 1, '0,5,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (11, '在线留言', NULL, NULL, NULL, NULL, NULL, NULL, 'Index_Guestbook.cshtml', 'Detail.cshtml', NULL, 0, 15, 5, 1, '0,5,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (12, '常见问题', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); -- ---------------------------- -- Table structure for category @@ -763,87 +552,15 @@ CREATE TABLE `category` ( `AdsId` int(11) NOT NULL COMMENT '广告ID', `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目录路径', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品栏目' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品栏目' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of category -- ---------------------------- -INSERT INTO `category` VALUES (1, '网站系统', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 2, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); +INSERT INTO `category` VALUES (1, '网站系统', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 2, 0, NULL, NULL, NULL, NULL, NULL, 0, '/wangzhanjitong'); INSERT INTO `category` VALUES (2, '微商城系统', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 2, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); INSERT INTO `category` VALUES (3, '小程序系统', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); --- ---------------------------- --- Table structure for challenge --- ---------------------------- -DROP TABLE IF EXISTS `challenge`; -CREATE TABLE `challenge` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称', - `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副标题', - `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', - `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsEnd` int(11) NOT NULL COMMENT '是否会员栏目', - `JoinUserCounts` int(11) NOT NULL COMMENT '参加人数', - `CompleteUserCounts` int(11) NOT NULL COMMENT '完成人数', - `CompleteCounts` int(11) NOT NULL COMMENT '需要完成次数', - `Rank` int(11) NOT NULL COMMENT '排序', - `DaySteps` int(11) NOT NULL COMMENT '日完成步数', - `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', - `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', - `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '栏目详细介绍', - `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', - `NeedCredits` decimal(19, 4) NOT NULL COMMENT '参加积分', - `RewardCredits` decimal(19, 4) NOT NULL COMMENT '奖励积分', - `ActivityType` int(11) NOT NULL COMMENT '活动类型', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `StartTime` datetime(0) NULL DEFAULT NULL COMMENT '开始时间', - `EndTime` datetime(0) NULL DEFAULT NULL COMMENT '结束时间', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '挑战' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of challenge --- ---------------------------- -INSERT INTO `challenge` VALUES (1, '7天挑战', NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 7, 999, 20000, NULL, NULL, NULL, '/userfiles/images/2018/2746846066a50e13.jpg', 10.0000, 50.0000, 0, '2018-10-31 20:41:42', '2018-11-01 00:00:00', '2018-11-07 00:00:00'); - --- ---------------------------- --- Table structure for challengeapply --- ---------------------------- -DROP TABLE IF EXISTS `challengeapply`; -CREATE TABLE `challengeapply` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `NeedCredits` int(11) NOT NULL COMMENT '使用积分', - `ChallengeId` int(11) NOT NULL COMMENT '挑战Id', - `TargetCounts` int(11) NOT NULL COMMENT '目标总次数', - `CompleteCounts` int(11) NOT NULL COMMENT '完成总次数', - `DaySteps` int(11) NOT NULL COMMENT '我的日完成步数', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `StartTime` datetime(0) NULL DEFAULT NULL COMMENT '开始时间', - `EndTime` datetime(0) NULL DEFAULT NULL COMMENT '结束时间', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '挑战报名' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for challengesuccesslog --- ---------------------------- -DROP TABLE IF EXISTS `challengesuccesslog`; -CREATE TABLE `challengesuccesslog` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `ChallengeId` int(11) NOT NULL COMMENT '挑战Id', - `DaySteps` int(11) NOT NULL COMMENT '我的日完成步数', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `CompleteDay` datetime(0) NULL DEFAULT NULL COMMENT '完成日期,只记录日期', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '挑战成功记录' ROW_FORMAT = Dynamic; - -- ---------------------------- -- Table structure for config -- ---------------------------- @@ -884,8 +601,8 @@ CREATE TABLE `config` ( `DEType` int(11) NOT NULL COMMENT '解密方式0,明文', `OfficialQRCode` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公众号二维码地址', `OfficialImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公众号头像', - `LastUpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '最后更新时间', - `LastCacheTime` datetime(0) NULL DEFAULT NULL COMMENT '最后缓存时间', + `LastUpdateTime` datetime NULL DEFAULT NULL COMMENT '最后更新时间', + `LastCacheTime` datetime NULL DEFAULT NULL COMMENT '最后缓存时间', `MCHId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信商家MCHId', `MCHKey` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信商家key', `DefaultFare` decimal(10, 0) NOT NULL COMMENT '默认运费', @@ -894,145 +611,12 @@ CREATE TABLE `config` ( `WXAppSecret` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信小程序AppSecret', `IsResetData` int(11) NOT NULL COMMENT '小程序首页是否显示清除数据按钮', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统配置' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统配置' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of config -- ---------------------------- -INSERT INTO `config` VALUES (1, 'COMCMS', 'http://www.comcms.com', '/images/logo.png', '', NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, '2018-12-05 11:49:59', '2018-12-05 11:49:59', NULL, NULL, 0, 0, NULL, NULL, 0); - --- ---------------------------- --- Table structure for coupon --- ---------------------------- -DROP TABLE IF EXISTS `coupon`; -CREATE TABLE `coupon` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `ItemNO` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '券号', - `KId` int(11) NOT NULL COMMENT '类别,0默认没限制', - `CouponType` int(11) NOT NULL COMMENT '优惠券类型,0 现金用券,1打折券', - `DiscuountRates` decimal(10, 0) NOT NULL COMMENT '打折率,只有是打折券才有用', - `IsLimit` int(11) NOT NULL COMMENT '是否有类别限制,0 无限制;1 是类别限制,2是商品限制', - `Price` decimal(10, 0) NOT NULL COMMENT '面额', - `NeedPrice` decimal(10, 0) NOT NULL COMMENT '需要消费面额', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `StartTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `EndTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `TotalCount` int(11) NOT NULL COMMENT '最大领取数量', - `TotalUseCount` int(11) NOT NULL COMMENT '已使用次数', - `SpreadUId` int(11) NOT NULL COMMENT '推广员ID,可选', - `UId` int(11) NOT NULL COMMENT '用户Id', - `MyType` int(11) NOT NULL COMMENT '可使用类型', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '优惠券' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for couponkind --- ---------------------------- -DROP TABLE IF EXISTS `couponkind`; -CREATE TABLE `couponkind` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `IsLimit` int(11) NOT NULL COMMENT '是否有类别限制,0 无限制;1 是类别限制,2是商品限制', - `KindName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称', - `CouponType` int(11) NOT NULL COMMENT '优惠券类型,0 现金用券,1打折券', - `KIds` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '类别按逗号分开', - `PIds` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品ID,按逗号分开', - `KindNote` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别说明', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `MyType` int(11) NOT NULL COMMENT '可使用类型', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '优惠券分类' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for couponuselog --- ---------------------------- -DROP TABLE IF EXISTS `couponuselog`; -CREATE TABLE `couponuselog` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `CouponId` int(11) NOT NULL COMMENT '优惠券ID', - `ItemNO` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '优惠券编号', - `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', - `OrderId` int(11) NOT NULL COMMENT '订单编号', - `UserName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', - `Title` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单名称', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '时间', - `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP', - `Actions` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录详情', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '优惠券使用记录' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for food --- ---------------------------- -DROP TABLE IF EXISTS `food`; -CREATE TABLE `food` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `KId` int(11) NOT NULL COMMENT '栏目ID', - `BId` int(11) NOT NULL COMMENT '品牌ID', - `ShopId` int(11) NOT NULL COMMENT '店铺ID', - `CId` int(11) NOT NULL COMMENT '颜色ID', - `SupportId` int(11) NOT NULL COMMENT '供货商ID', - `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题', - `ItemNO` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号', - `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副标题', - `Unit` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品单位', - `Spec` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品规格尺寸', - `Color` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '颜色', - `Weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '重量', - `Price` decimal(10, 0) NOT NULL COMMENT '价格', - `MarketPrice` decimal(10, 0) NOT NULL COMMENT '市场价格', - `SpecialPrice` decimal(10, 0) NOT NULL COMMENT '特价,如有特价,以特价为准', - `Fare` decimal(10, 0) NOT NULL COMMENT '运费', - `Discount` decimal(10, 0) NOT NULL COMMENT '折扣', - `Material` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '材料', - `Front` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '封面', - `Credits` int(11) NOT NULL COMMENT '积分', - `Stock` int(11) NOT NULL COMMENT '库存', - `WarnStock` int(11) NOT NULL COMMENT '警告库存', - `IsSubProduct` int(11) NOT NULL COMMENT '是否为子商品', - `PPId` int(11) NOT NULL COMMENT '父商品ID。如果为子商品,则需要填写父商品ID。实现多颜色功能', - `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', - `Parameters` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品参数', - `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板', - `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsTop` int(11) NOT NULL COMMENT '是否置顶', - `IsBest` int(11) NOT NULL COMMENT '是否精华', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsNew` int(11) NOT NULL COMMENT '是否新品', - `IsSpecial` int(11) NOT NULL COMMENT '是否特价', - `IsPromote` int(11) NOT NULL COMMENT '是否促销', - `IsHotSales` int(11) NOT NULL COMMENT '是否热销', - `IsBreakup` int(11) NOT NULL COMMENT '是否缺货', - `IsShelves` int(11) NOT NULL COMMENT '是否下架', - `IsVerify` int(11) NOT NULL COMMENT '是否审核,1为已经审核前台显示', - `Hits` int(11) NOT NULL COMMENT '点击数量', - `IsGift` int(11) NOT NULL COMMENT '是否为礼品商品', - `IsPart` int(11) NOT NULL COMMENT '是否为配件', - `Sequence` int(11) NOT NULL COMMENT '排序', - `CommentCount` int(11) NOT NULL COMMENT '评论数量', - `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', - `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - `Tags` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'TAG', - `ItemImg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '更多图片', - `Service` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '售后服务', - `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '时间', - `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', - `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '存放目录', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '快餐' ROW_FORMAT = Dynamic; +INSERT INTO `config` VALUES (1, 'comcms', 'https://localhost:44307', '/images/logo.png', '', NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, '2018-12-05 11:49:59', '2018-12-05 11:49:59', NULL, NULL, 0, 0, NULL, NULL, 0); -- ---------------------------- -- Table structure for guestbook @@ -1044,7 +628,7 @@ CREATE TABLE `guestbook` ( `UId` int(11) NOT NULL COMMENT '用户ID', `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '留言标题', `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '详细介绍', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', `IsVerify` int(11) NOT NULL COMMENT '是否审核通过', `IsRead` int(11) NOT NULL COMMENT '是否阅读', `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', @@ -1059,12 +643,16 @@ CREATE TABLE `guestbook` ( `Company` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司', `ReplyTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '回复标题', `ReplyContent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '回复的详情', - `ReplyAddTime` datetime(0) NULL DEFAULT NULL COMMENT '回复时间', + `ReplyAddTime` datetime NULL DEFAULT NULL COMMENT '回复时间', `ReplyIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户回复IP', `ReplyAdminId` int(11) NOT NULL COMMENT '用户的管理员ID', `ReplyNickName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '回复者昵称', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言详情' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言详情' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of guestbook +-- ---------------------------- -- ---------------------------- -- Table structure for guestbookcategory @@ -1077,87 +665,13 @@ CREATE TABLE `guestbookcategory` ( `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类图片', `Rank` int(11) NOT NULL COMMENT '排序', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言分类' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言分类' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of guestbookcategory -- ---------------------------- INSERT INTO `guestbookcategory` VALUES (1, '默认类别', NULL, NULL, 0); --- ---------------------------- --- Table structure for hotelroom --- ---------------------------- -DROP TABLE IF EXISTS `hotelroom`; -CREATE TABLE `hotelroom` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `KId` int(11) NOT NULL COMMENT '栏目ID', - `BId` int(11) NOT NULL COMMENT '品牌ID', - `ShopId` int(11) NOT NULL COMMENT '店铺ID', - `CId` int(11) NOT NULL COMMENT '颜色ID', - `SupportId` int(11) NOT NULL COMMENT '供货商ID', - `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题', - `ItemNO` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号', - `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副标题', - `Unit` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品单位', - `Spec` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品规格尺寸', - `Color` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '颜色', - `Weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '重量', - `Price` decimal(10, 0) NOT NULL COMMENT '价格', - `MarketPrice` decimal(10, 0) NOT NULL COMMENT '市场价格', - `SpecialPrice` decimal(10, 0) NOT NULL COMMENT '特价,如有特价,以特价为准', - `Fare` decimal(10, 0) NOT NULL COMMENT '运费', - `Discount` decimal(10, 0) NOT NULL COMMENT '折扣', - `Material` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '材料', - `Front` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '封面', - `Credits` int(11) NOT NULL COMMENT '积分', - `Stock` int(11) NOT NULL COMMENT '库存', - `WarnStock` int(11) NOT NULL COMMENT '警告库存', - `IsSubProduct` int(11) NOT NULL COMMENT '是否为子商品', - `PPId` int(11) NOT NULL COMMENT '父商品ID。如果为子商品,则需要填写父商品ID。实现多颜色功能', - `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', - `Parameters` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品参数', - `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板', - `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsTop` int(11) NOT NULL COMMENT '是否置顶', - `IsBest` int(11) NOT NULL COMMENT '是否精华', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsNew` int(11) NOT NULL COMMENT '是否新品', - `IsSpecial` int(11) NOT NULL COMMENT '是否特价', - `IsPromote` int(11) NOT NULL COMMENT '是否促销', - `IsHotSales` int(11) NOT NULL COMMENT '是否热销', - `IsBreakup` int(11) NOT NULL COMMENT '是否缺货', - `IsShelves` int(11) NOT NULL COMMENT '是否下架', - `IsVerify` int(11) NOT NULL COMMENT '是否审核,1为已经审核前台显示', - `Hits` int(11) NOT NULL COMMENT '点击数量', - `IsGift` int(11) NOT NULL COMMENT '是否为礼品商品', - `IsPart` int(11) NOT NULL COMMENT '是否为配件', - `Sequence` int(11) NOT NULL COMMENT '排序', - `CommentCount` int(11) NOT NULL COMMENT '评论数量', - `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', - `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - `Tags` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'TAG', - `ItemImg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '更多图片', - `Service` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '售后服务', - `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '时间', - `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', - `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '存放目录', - `PriceList` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '日期价格', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '酒店房间' ROW_FORMAT = Dynamic; - -- ---------------------------- -- Table structure for link -- ---------------------------- @@ -1172,7 +686,7 @@ CREATE TABLE `link` ( `IsHide` enum('N','Y') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否隐藏友情链接', `Sequence` int(11) NOT NULL COMMENT '排序,默认999', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '友情连接详情' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '友情连接详情' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of link @@ -1191,7 +705,7 @@ CREATE TABLE `linkkind` ( `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类图片', `Rank` int(11) NOT NULL COMMENT '排序', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '友情链接分类' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '友情链接分类' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of linkkind @@ -1211,15 +725,15 @@ CREATE TABLE `member` ( `Tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机', `Email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮件', `RoleId` int(11) NOT NULL COMMENT '会员组,代理级别', - `LastLoginTime` datetime(0) NULL DEFAULT NULL COMMENT '最后登录时间', + `LastLoginTime` datetime NULL DEFAULT NULL COMMENT '最后登录时间', `LastLoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上次登录IP', - `ThisLoginTime` datetime(0) NULL DEFAULT NULL COMMENT '本次登录时间', + `ThisLoginTime` datetime NULL DEFAULT NULL COMMENT '本次登录时间', `ThisLoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '本次登录IP', `IsLock` int(11) NOT NULL COMMENT '是否是锁定', `Nickname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称', `UserImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像', `Sex` int(11) NOT NULL COMMENT '性别 0 保密 1 男 2女', - `Birthday` datetime(0) NULL DEFAULT NULL COMMENT '生日', + `Birthday` datetime NULL DEFAULT NULL COMMENT '生日', `Phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话', `Fax` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '传真', `QQ` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'QQ', @@ -1236,10 +750,10 @@ CREATE TABLE `member` ( `Address` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详细地址', `Postcode` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮政编码', `RegIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '注册IP', - `RegTime` datetime(0) NULL DEFAULT NULL COMMENT '注册时间', + `RegTime` datetime NULL DEFAULT NULL COMMENT '注册时间', `LoginCount` int(11) NOT NULL COMMENT '登录次数', `RndNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '随机字符', - `RePassWordTime` datetime(0) NULL DEFAULT NULL COMMENT '找回密码时间', + `RePassWordTime` datetime NULL DEFAULT NULL COMMENT '找回密码时间', `Question` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保密问题', `Answer` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保密答案', `Balance` decimal(10, 0) NOT NULL COMMENT '可用余额', @@ -1265,56 +779,11 @@ CREATE TABLE `member` ( `QQOpenId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'QQ OpenId', `WeiboOpenId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微博OpenId', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户' ROW_FORMAT = DYNAMIC; -- ---------------------------- --- Table structure for memberaddress +-- Records of member -- ---------------------------- -DROP TABLE IF EXISTS `memberaddress`; -CREATE TABLE `memberaddress` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `RealName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '姓名', - `Tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机', - `Email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮件', - `IsDefault` enum('N','Y') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否是默认', - `Phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话', - `Company` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司', - `Country` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '国家', - `Province` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '省', - `City` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '市', - `District` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区', - `Address` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详细地址', - `Postcode` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮政编码', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `Rank` int(11) NOT NULL COMMENT '排序', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户地址' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for membercoupon --- ---------------------------- -DROP TABLE IF EXISTS `membercoupon`; -CREATE TABLE `membercoupon` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `ItemNO` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '券号', - `CouponId` int(11) NOT NULL COMMENT '优惠券ID', - `CouponType` int(11) NOT NULL COMMENT '优惠券类型,0 现金用券,1打折券', - `DiscuountRates` decimal(10, 0) NOT NULL COMMENT '打折率,只有是打折券才有用', - `IsLimit` int(11) NOT NULL COMMENT '是否有类别限制,0 无限制;1 是类别限制,2是商品限制', - `Price` decimal(10, 0) NOT NULL COMMENT '面额', - `NeedPrice` decimal(10, 0) NOT NULL COMMENT '需要消费面额', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `StartTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `EndTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `IsUse` int(11) NOT NULL COMMENT '是否使用', - `UseTime` datetime(0) NULL DEFAULT NULL COMMENT '使用时间', - `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号(使用后)', - `OrderId` int(11) NOT NULL COMMENT '订单编号(使用后)', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户优惠券' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for memberlog @@ -1326,13 +795,17 @@ CREATE TABLE `memberlog` ( `GUID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '唯一ID', `UserName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', `PassWord` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码', - `LoginTime` datetime(0) NULL DEFAULT NULL COMMENT '登录时间', + `LoginTime` datetime NULL DEFAULT NULL COMMENT '登录时间', `LoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP', `IsLoginOK` int(11) NOT NULL COMMENT '是否登录成功', `Actions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '记录', - `LastUpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '登录时间', + `LastUpdateTime` datetime NULL DEFAULT NULL COMMENT '登录时间', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户日志表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户日志表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of memberlog +-- ---------------------------- -- ---------------------------- -- Table structure for memberroles @@ -1357,7 +830,14 @@ CREATE TABLE `memberroles` ( `IsSellers` int(11) NOT NULL COMMENT '是否是分销商', `JoinPrice` decimal(10, 0) NOT NULL COMMENT '加入分销商价格', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of memberroles +-- ---------------------------- +INSERT INTO `memberroles` VALUES (1, '钻石代理', '钻石代理(一级代理)', 5, 1, 0, '', 50, 10, 5, 0, 0, 10, 5, 100000, 1, 5000); +INSERT INTO `memberroles` VALUES (2, '白金代理', '白金代理(二级代理)', 4, 1, 0, '', 30, 10, 0, 0, 1, 5, 0, 50000, 0, 0); +INSERT INTO `memberroles` VALUES (3, '普通会员', '普通会员', 1, 1, 0, '', 0, 0, 0, 1, 1, 0, 0, 0, 0, 0); -- ---------------------------- -- Table structure for onlinepayorder @@ -1380,14 +860,18 @@ CREATE TABLE `onlinepayorder` ( `PaymentNotes` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付备注', `IsOK` int(11) NOT NULL COMMENT '是否完成', `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下单IP', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `ReceiveTime` datetime(0) NULL DEFAULT NULL COMMENT '回传时间', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `ReceiveTime` datetime NULL DEFAULT NULL COMMENT '回传时间', `TypeId` int(11) NOT NULL COMMENT '支付的类型', `MyType` int(11) NOT NULL COMMENT '系统类型', `Title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单标题', `OutTradeNo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付成功流水号', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '在线支付订单' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '在线支付订单' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of onlinepayorder +-- ---------------------------- -- ---------------------------- -- Table structure for order @@ -1430,7 +914,7 @@ CREATE TABLE `order` ( `OrderStatus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单状态:未确认、已确认、已完成、已取消', `PaymentStatus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付状态:未支付、已支付、已退款', `DeliverStatus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配送状态:未配送、配货中、已配送、已收到、退货中、已退货', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下单IP', `IsInvoice` int(11) NOT NULL COMMENT '是否需要发票', `InvoiceCompanyName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '抬头', @@ -1439,19 +923,23 @@ CREATE TABLE `order` ( `InvoiceNote` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发票备注', `IsRead` int(11) NOT NULL COMMENT '是否未读', `IsEnd` int(11) NOT NULL COMMENT '是否结束', - `EndTime` datetime(0) NULL DEFAULT NULL COMMENT '结束时间', + `EndTime` datetime NULL DEFAULT NULL COMMENT '结束时间', `IsOk` int(11) NOT NULL COMMENT '订单是否顺利完成', `IsComment` int(11) NOT NULL COMMENT '订单已经评论', `Flag1` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预留字段1', `Flag2` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预留字段2', `Flag3` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预留字段3', `Title` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单名称', - `LastModTime` datetime(0) NULL DEFAULT NULL COMMENT '最后操作时间', + `LastModTime` datetime NULL DEFAULT NULL COMMENT '最后操作时间', `OrderType` int(11) NOT NULL COMMENT '订单类型,0为商品订单', `MyType` int(11) NOT NULL COMMENT '系统类型', `OutTradeNo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付成功流水号', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of order +-- ---------------------------- -- ---------------------------- -- Table structure for orderdetail @@ -1482,12 +970,16 @@ CREATE TABLE `orderdetail` ( `BackCredits` int(11) NOT NULL COMMENT '返现积分', `IsOK` int(11) NOT NULL COMMENT '是否完成', `IsComment` int(11) NOT NULL COMMENT '是否已经评论', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `CheckInDate` datetime(0) NULL DEFAULT NULL COMMENT '入住日期', - `LeaveDate` datetime(0) NULL DEFAULT NULL COMMENT '离开日期', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `CheckInDate` datetime NULL DEFAULT NULL COMMENT '入住日期', + `LeaveDate` datetime NULL DEFAULT NULL COMMENT '离开日期', `MyType` int(11) NOT NULL COMMENT '系统类型', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单详情' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单详情' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of orderdetail +-- ---------------------------- -- ---------------------------- -- Table structure for orderlog @@ -1499,9 +991,13 @@ CREATE TABLE `orderlog` ( `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', `Actions` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '日志记录', `UId` int(11) NOT NULL COMMENT '用户ID', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单日志' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单日志' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of orderlog +-- ---------------------------- -- ---------------------------- -- Table structure for otherconfig @@ -1511,15 +1007,15 @@ CREATE TABLE `otherconfig` ( `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', `ConfigName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配置名称', `ConfigValue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置值 JSON', - `LastUpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '最后更新时间', + `LastUpdateTime` datetime NULL DEFAULT NULL COMMENT '最后更新时间', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '其他配置' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '其他配置' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of otherconfig -- ---------------------------- INSERT INTO `otherconfig` VALUES (1, 'attach', '{\"SiteId\":0,\"AttachPatch\":\"userfiles\",\"SaveType\":0,\"IsCreateThum\":0,\"ThumQty\":80,\"ThumMaxWidth\":200,\"ThumMaxHeight\":200,\"IsWaterMark\":0,\"WaterMarkType\":0,\"WaterMarkMinWidth\":400,\"WaterMarkMinHeight\":400,\"WaterMarkImg\":null,\"WaterMarkText\":\"\",\"WaterMarkTextColor\":\"#0FF\",\"WaterMarkPlace\":9,\"WaterMarkQty\":80,\"WaterMarkDiaphaneity\":80,\"IsRandomFileName\":1,\"ImgMaxWidth\":1920,\"ImgMaxHeight\":2000}', '2018-04-18 20:36:55'); -INSERT INTO `otherconfig` VALUES (2, 'smtp', '{\"SiteId\":0,\"SmtpEmail\":\"\",\"SmtpHost\":\"\",\"SmtpProt\":\"25\",\"SmtpEmailPwd\":\"\",\"PostUserName\":\"\"}', '2018-04-16 00:55:57'); +INSERT INTO `otherconfig` VALUES (2, 'smtp', '{\"SiteId\":0,\"SmtpEmail\":\"poster@comcms.com\",\"SmtpHost\":\"redbull.mxrouting.net\",\"SmtpProt\":\"25\",\"SmtpEmailPwd\":\"1qaz@WSX\",\"PostUserName\":\"poster@comcms.com\",\"IsSSL\":0}', '2024-03-27 10:53:32'); -- ---------------------------- -- Table structure for product @@ -1587,184 +1083,43 @@ CREATE TABLE `product` ( `ItemImg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '更多图片', `Service` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '售后服务', `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '时间', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '时间', `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '存放目录', + `FileName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of product -- ---------------------------- -INSERT INTO `product` VALUES (1, 1, 0, 0, 0, 0, 'CMS系统', NULL, NULL, NULL, NULL, NULL, NULL, 5000, 6000, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

CMS系统

\n\n

CMS系统

\n\n

CMS系统

\n\n

CMS系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-4.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:17:53', NULL, NULL, NULL); -INSERT INTO `product` VALUES (2, 2, 0, 0, 0, 0, 'PC+手机商城系统', NULL, NULL, NULL, NULL, NULL, NULL, 18000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

PC+手机商城系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-5.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:21:43', NULL, NULL, NULL); -INSERT INTO `product` VALUES (3, 2, 0, 0, 0, 0, '微商城Shop系统', NULL, NULL, NULL, NULL, NULL, NULL, 25000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

微商城Shop系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-3.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:22:19', NULL, NULL, NULL); -INSERT INTO `product` VALUES (4, 3, 0, 0, 0, 0, '小程序商城系统', NULL, NULL, NULL, NULL, NULL, NULL, 18000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

小程序商城系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:23:02', NULL, NULL, NULL); -INSERT INTO `product` VALUES (5, 1, 0, 0, 0, 0, '博客系统', NULL, NULL, NULL, NULL, NULL, NULL, 10000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

博客系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-1.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:49:43', NULL, NULL, NULL); +INSERT INTO `product` VALUES (1, 1, 0, 0, 0, 0, 'CMS系统', NULL, NULL, NULL, NULL, NULL, NULL, 5000, 6000, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

CMS系统

\n\n

CMS系统

\n\n

CMS系统

\n\n

CMS系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-4.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:17:53', NULL, NULL, NULL, NULL); +INSERT INTO `product` VALUES (2, 2, 0, 0, 0, 0, 'PC+手机商城系统', NULL, NULL, NULL, NULL, NULL, NULL, 18000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

PC+手机商城系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-5.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:21:43', NULL, NULL, NULL, NULL); +INSERT INTO `product` VALUES (3, 2, 0, 0, 0, 0, '微商城Shop系统', NULL, NULL, NULL, NULL, NULL, NULL, 25000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

微商城Shop系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-3.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:22:19', NULL, NULL, NULL, NULL); +INSERT INTO `product` VALUES (4, 3, 0, 0, 0, 0, '小程序商城系统', NULL, NULL, NULL, NULL, NULL, NULL, 18000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

小程序商城系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:23:02', NULL, NULL, NULL, NULL); +INSERT INTO `product` VALUES (5, 1, 0, 0, 0, 0, '博客系统', NULL, NULL, NULL, NULL, NULL, NULL, 10000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

博客系统

\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-1.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:49:43', NULL, NULL, NULL, NULL); -- ---------------------------- --- Table structure for rebatechangelog +-- Table structure for tagsdetail -- ---------------------------- -DROP TABLE IF EXISTS `rebatechangelog`; -CREATE TABLE `rebatechangelog` ( +DROP TABLE IF EXISTS `tagsdetail`; +CREATE TABLE `tagsdetail` ( `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `AdminId` int(11) NOT NULL COMMENT '管理员ID', - `UserName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '时间', - `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP', - `Actions` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录', - `Reward` decimal(10, 0) NOT NULL COMMENT '返现、扣除金额', - `BeforChange` decimal(10, 0) NOT NULL COMMENT '变化前', - `AfterChange` decimal(10, 0) NOT NULL COMMENT '变化后', - `LogDetails` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详细记录', - `TypeId` int(11) NOT NULL COMMENT '类型 0 充值 1 购买 2 赠送 3 退款 4 分销提成', - `MyType` int(11) NOT NULL COMMENT '消费类型,见MyType', - `OrderId` int(11) NOT NULL COMMENT '订单ID', - `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户返现余额变化记录' ROW_FORMAT = Dynamic; + `TagsId` int(11) NOT NULL DEFAULT 0 COMMENT '所属标签ID', + `TagName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Tag标签名称', + `TypeId` int(11) NOT NULL DEFAULT 0 COMMENT '类型', + `Title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题', + `Hits` int(11) NOT NULL DEFAULT 0 COMMENT '点击量', + `RId` int(11) NOT NULL DEFAULT 0 COMMENT '目标Id', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + PRIMARY KEY (`Id`) USING BTREE, + INDEX `IX_TagsDetail_TypeId`(`TypeId`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'Tag标签详情' ROW_FORMAT = Dynamic; -- ---------------------------- --- Table structure for shop +-- Records of tagsdetail -- ---------------------------- -DROP TABLE IF EXISTS `shop`; -CREATE TABLE `shop` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `ShopName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '店铺名称', - `KId` int(11) NOT NULL COMMENT '商家分类ID', - `AId` int(11) NOT NULL COMMENT '地区ID', - `Sequence` int(11) NOT NULL COMMENT '排序', - `Latitude` decimal(10, 0) NOT NULL COMMENT '纬度', - `Longitude` decimal(10, 0) NOT NULL COMMENT '经度', - `Country` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '国家', - `Province` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '省', - `City` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '市', - `District` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区', - `Address` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详细地址', - `Postcode` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮政编码', - `IsDel` int(11) NOT NULL COMMENT '是否删除', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsDisabled` int(11) NOT NULL COMMENT '是否禁用', - `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '店铺介绍', - `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关键字', - `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', - `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', - `Balance` decimal(10, 0) NOT NULL COMMENT '余额', - `IsTop` int(11) NOT NULL COMMENT '是否置顶', - `IsVip` int(11) NOT NULL COMMENT '是否vip', - `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', - `Likes` int(11) NOT NULL COMMENT '点赞数', - `AvgScore` decimal(10, 0) NOT NULL COMMENT '平均分数', - `ServiceScore` decimal(10, 0) NOT NULL COMMENT '服务分数', - `SpeedScore` decimal(10, 0) NOT NULL COMMENT '速度分数', - `EnvironmentScore` decimal(10, 0) NOT NULL COMMENT '环境分数', - `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', - `MorePics` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '店铺所有图片', - `Email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱', - `Tel` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话', - `Phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '固定电话', - `QQ` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'QQ', - `Skype` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Skype', - `HomePage` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主页', - `Weixin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信', - `IsShip` int(11) NOT NULL COMMENT '是否配送', - `OpenTime` datetime(0) NULL DEFAULT NULL COMMENT '开店时间', - `CloseTime` datetime(0) NULL DEFAULT NULL COMMENT '关店时间', - `ShippingStartTime` datetime(0) NULL DEFAULT NULL COMMENT '配送开始时间', - `ShippingEndTime` datetime(0) NULL DEFAULT NULL COMMENT '配送结束时间', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `Hits` int(11) NOT NULL COMMENT '点击量', - `MyType` int(11) NOT NULL COMMENT '店铺类型', - `DefaultFare` decimal(10, 0) NOT NULL COMMENT '默认运费', - `MaxFreeFare` decimal(10, 0) NOT NULL COMMENT '最大免运费金额', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商家' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for shopcategory --- ---------------------------- -DROP TABLE IF EXISTS `shopcategory`; -CREATE TABLE `shopcategory` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `KindName` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目名称', - `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目副标题', - `KindTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目标题,填写则在浏览器替换此标题', - `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', - `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', - `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', - `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', - `TemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板', - `DetailTemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详情模板', - `KindDomain` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别域名(保留)', - `IsList` int(11) NOT NULL COMMENT '是否为列表页面', - `PageSize` int(11) NOT NULL COMMENT '每页显示数量', - `PId` int(11) NOT NULL COMMENT '上级ID', - `Level` int(11) NOT NULL COMMENT '级别', - `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', - `IsHide` int(11) NOT NULL COMMENT '是否隐藏', - `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', - `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', - `IsComment` int(11) NOT NULL COMMENT '是否允许评论', - `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', - `IsShowSubDetail` int(11) NOT NULL COMMENT '是否显示下级栏目内容', - `CatalogId` int(11) NOT NULL COMMENT '模型ID', - `Counts` int(11) NOT NULL COMMENT '详情数量,缓存', - `Rank` int(11) NOT NULL COMMENT '排序', - `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', - `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', - `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', - `KindInfo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '栏目详细介绍', - `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', - `AdsId` int(11) NOT NULL COMMENT '广告ID', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商家分类' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for shoppingcart --- ---------------------------- -DROP TABLE IF EXISTS `shoppingcart`; -CREATE TABLE `shoppingcart` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `GUID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '唯一GUID,没登录用户使用', - `Details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '购物车内容,JOSN', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '加入购物车时间', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '最后更新时间', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '购物车' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for stepexchange --- ---------------------------- -DROP TABLE IF EXISTS `stepexchange`; -CREATE TABLE `stepexchange` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `StepDate` datetime(0) NULL DEFAULT NULL COMMENT '步数日期', - `Timestamp` int(11) NOT NULL COMMENT '日期时间戳', - `TotalStep` int(11) NOT NULL COMMENT '总步数', - `ExchangeStep` int(11) NOT NULL COMMENT '兑换步数', - `AbleStep` int(11) NOT NULL COMMENT '可兑换步数', - `RewardStep` int(11) NOT NULL COMMENT '奖励步数', - `OriginalStep` int(11) NOT NULL COMMENT '原始步数', - `LastTime` datetime(0) NULL DEFAULT NULL COMMENT '最后更新时间', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '步数兑换' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for stepexchangelog --- ---------------------------- -DROP TABLE IF EXISTS `stepexchangelog`; -CREATE TABLE `stepexchangelog` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `ExchangeStep` int(11) NOT NULL COMMENT '兑换步数', - `ExchangeCredit` decimal(19, 4) NOT NULL COMMENT '兑换积分', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '步数兑换记录' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for targetevent @@ -1777,7 +1132,7 @@ CREATE TABLE `targetevent` ( `IsDisable` int(11) NOT NULL COMMENT '是否禁用', `Rank` int(11) NOT NULL COMMENT '排序', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '目标事件' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '目标事件' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of targetevent @@ -1811,10 +1166,10 @@ CREATE TABLE `weixinrequestcontent` ( `WXAppAppId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '小程序APPId', `WXAppPage` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '小程序页面', `Rank` int(11) NOT NULL COMMENT '排序', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '请求回复的内容' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '请求回复的内容' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of weixinrequestcontent @@ -1834,10 +1189,10 @@ CREATE TABLE `weixinrequestrule` ( `IsLikeQuery` int(11) NOT NULL COMMENT '是否模糊查询 0 是完全匹配;1是模糊匹配', `IsDefault` int(11) NOT NULL COMMENT '是否是默认回复', `Rank` int(11) NOT NULL COMMENT '排序', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信公众号回复规则' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信公众号回复规则' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of weixinrequestrule @@ -1856,9 +1211,13 @@ CREATE TABLE `weixinresponsecontent` ( `ResponseType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '回复的类型 文本消息:text 图片消息:image 地理位置消息:location 链接消息:link', `ReponseContent` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '系统回复的内容', `XmlContent` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'xml原始内容', - `UpdateTime` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公众平台回复信息' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公众平台回复信息' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of weixinresponsecontent +-- ---------------------------- -- ---------------------------- -- Table structure for withdraworder @@ -1870,30 +1229,19 @@ CREATE TABLE `withdraworder` ( `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', `UserName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', `Title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单名称', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '时间', + `AddTime` datetime NULL DEFAULT NULL COMMENT '时间', `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP', `Actions` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录详情', `Price` decimal(10, 0) NOT NULL COMMENT '提现金额', `VerifyAdminId` int(11) NOT NULL COMMENT '审核管理员ID', `IsVerify` int(11) NOT NULL COMMENT '是否通过审核', - `VerifyTime` datetime(0) NULL DEFAULT NULL COMMENT '审核时间', + `VerifyTime` datetime NULL DEFAULT NULL COMMENT '审核时间', `FormId` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '小程序FormId', PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户提现订单' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户提现订单' ROW_FORMAT = DYNAMIC; -- ---------------------------- --- Table structure for wxappsession +-- Records of withdraworder -- ---------------------------- -DROP TABLE IF EXISTS `wxappsession`; -CREATE TABLE `wxappsession` ( - `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `UId` int(11) NOT NULL COMMENT '用户ID', - `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP', - `Key` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统生成Key', - `SessionKey` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信SessionKey', - `OpenId` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信小程序OpenId', - `AddTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', - PRIMARY KEY (`Id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '小程序Session' ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1; diff --git a/COMCMS.Web/wwwroot/js/jstree/jstree.js b/COMCMS.Web/wwwroot/js/jstree/jstree.js new file mode 100644 index 0000000..588cccc --- /dev/null +++ b/COMCMS.Web/wwwroot/js/jstree/jstree.js @@ -0,0 +1,8745 @@ +/*globals jQuery, define, module, exports, require, window, document, postMessage */ +(function (factory) { + "use strict"; + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } + else if(typeof module !== 'undefined' && module.exports) { + module.exports = factory(require('jquery')); + } + else { + factory(jQuery); + } +}(function ($, undefined) { + "use strict"; +/*! + * jsTree 3.3.17 + * http://jstree.com/ + * + * Copyright (c) 2014 Ivan Bozhanov (http://vakata.com) + * + * Licensed same as jquery - under the terms of the MIT License + * http://www.opensource.org/licenses/mit-license.php + */ +/*! + * if using jslint please allow for the jQuery global and use following options: + * jslint: loopfunc: true, browser: true, ass: true, bitwise: true, continue: true, nomen: true, plusplus: true, regexp: true, unparam: true, todo: true, white: true + */ +/*jshint -W083 */ + + // prevent another load? maybe there is a better way? + if($.jstree) { + return; + } + + /** + * ### jsTree core functionality + */ + + // internal variables + var instance_counter = 0, + ccp_node = false, + ccp_mode = false, + ccp_inst = false, + themes_loaded = [], + src = $('script:last').attr('src'), + document = window.document; // local variable is always faster to access then a global + + var setImmediate = window.setImmediate; + var Promise = window.Promise; + if (!setImmediate && Promise) { + // Good enough approximation of setImmediate + setImmediate = function (cb, arg) { + Promise.resolve(arg).then(cb); + }; + } + + /** + * holds all jstree related functions and variables, including the actual class and methods to create, access and manipulate instances. + * @name $.jstree + */ + $.jstree = { + /** + * specifies the jstree version in use + * @name $.jstree.version + */ + version : '3.3.17', + /** + * holds all the default options used when creating new instances + * @name $.jstree.defaults + */ + defaults : { + /** + * configure which plugins will be active on an instance. Should be an array of strings, where each element is a plugin name. The default is `[]` + * @name $.jstree.defaults.plugins + */ + plugins : [] + }, + /** + * stores all loaded jstree plugins (used internally) + * @name $.jstree.plugins + */ + plugins : {}, + path : src && src.indexOf('/') !== -1 ? src.replace(/\/[^\/]+$/,'') : '', + idregex : /[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g, + root : '#' + }; + + /** + * creates a jstree instance + * @name $.jstree.create(el [, options]) + * @param {DOMElement|jQuery|String} el the element to create the instance on, can be jQuery extended or a selector + * @param {Object} options options for this instance (extends `$.jstree.defaults`) + * @return {jsTree} the new instance + */ + $.jstree.create = function (el, options) { + var tmp = new $.jstree.core(++instance_counter), + opt = options; + options = $.extend(true, {}, $.jstree.defaults, options); + if(opt && opt.plugins) { + options.plugins = opt.plugins; + } + $.each(options.plugins, function (i, k) { + if(i !== 'core') { + tmp = tmp.plugin(k, options[k]); + } + }); + $(el).data('jstree', tmp); + tmp.init(el, options); + return tmp; + }; + /** + * remove all traces of jstree from the DOM and destroy all instances + * @name $.jstree.destroy() + */ + $.jstree.destroy = function () { + $('.jstree:jstree').jstree('destroy'); + $(document).off('.jstree'); + }; + /** + * the jstree class constructor, used only internally + * @private + * @name $.jstree.core(id) + * @param {Number} id this instance's index + */ + $.jstree.core = function (id) { + this._id = id; + this._cnt = 0; + this._wrk = null; + this._data = { + core : { + themes : { + name : false, + dots : false, + icons : false, + ellipsis : false + }, + selected : [], + last_error : {}, + working : false, + worker_queue : [], + focused : null + } + }; + }; + /** + * get a reference to an existing instance + * + * __Examples__ + * + * // provided a container with an ID of "tree", and a nested node with an ID of "branch" + * // all of there will return the same instance + * $.jstree.reference('tree'); + * $.jstree.reference('#tree'); + * $.jstree.reference($('#tree')); + * $.jstree.reference(document.getElementByID('tree')); + * $.jstree.reference('branch'); + * $.jstree.reference('#branch'); + * $.jstree.reference($('#branch')); + * $.jstree.reference(document.getElementByID('branch')); + * + * @name $.jstree.reference(needle) + * @param {DOMElement|jQuery|String} needle + * @return {jsTree|null} the instance or `null` if not found + */ + $.jstree.reference = function (needle) { + var tmp = null, + obj = null; + if(needle && needle.id && (!needle.tagName || !needle.nodeType)) { needle = needle.id; } + + if(!obj || !obj.length) { + try { obj = $(needle); } catch (ignore) { } + } + if(!obj || !obj.length) { + try { obj = $('#' + needle.replace($.jstree.idregex,'\\$&')); } catch (ignore) { } + } + if(obj && obj.length && (obj = obj.closest('.jstree')).length && (obj = obj.data('jstree'))) { + tmp = obj; + } + else { + $('.jstree').each(function () { + var inst = $(this).data('jstree'); + if(inst && inst._model.data[needle]) { + tmp = inst; + return false; + } + }); + } + return tmp; + }; + /** + * Create an instance, get an instance or invoke a command on a instance. + * + * If there is no instance associated with the current node a new one is created and `arg` is used to extend `$.jstree.defaults` for this new instance. There would be no return value (chaining is not broken). + * + * If there is an existing instance and `arg` is a string the command specified by `arg` is executed on the instance, with any additional arguments passed to the function. If the function returns a value it will be returned (chaining could break depending on function). + * + * If there is an existing instance and `arg` is not a string the instance itself is returned (similar to `$.jstree.reference`). + * + * In any other case - nothing is returned and chaining is not broken. + * + * __Examples__ + * + * $('#tree1').jstree(); // creates an instance + * $('#tree2').jstree({ plugins : [] }); // create an instance with some options + * $('#tree1').jstree('open_node', '#branch_1'); // call a method on an existing instance, passing additional arguments + * $('#tree2').jstree(); // get an existing instance (or create an instance) + * $('#tree2').jstree(true); // get an existing instance (will not create new instance) + * $('#branch_1').jstree().select_node('#branch_1'); // get an instance (using a nested element and call a method) + * + * @name $().jstree([arg]) + * @param {String|Object} arg + * @return {Mixed} + */ + $.fn.jstree = function (arg) { + // check for string argument + var is_method = (typeof arg === 'string'), + args = Array.prototype.slice.call(arguments, 1), + result = null; + if(arg === true && !this.length) { return false; } + this.each(function () { + // get the instance (if there is one) and method (if it exists) + var instance = $.jstree.reference(this), + method = is_method && instance ? instance[arg] : null; + // if calling a method, and method is available - execute on the instance + result = is_method && method ? + method.apply(instance, args) : + null; + // if there is no instance and no method is being called - create one + if(!instance && !is_method && (arg === undefined || $.isPlainObject(arg))) { + $.jstree.create(this, arg); + } + // if there is an instance and no method is called - return the instance + if( (instance && !is_method) || arg === true ) { + result = instance || false; + } + // if there was a method call which returned a result - break and return the value + if(result !== null && result !== undefined) { + return false; + } + }); + // if there was a method call with a valid return value - return that, otherwise continue the chain + return result !== null && result !== undefined ? + result : this; + }; + /** + * used to find elements containing an instance + * + * __Examples__ + * + * $('div:jstree').each(function () { + * $(this).jstree('destroy'); + * }); + * + * @name $(':jstree') + * @return {jQuery} + */ + $.expr.pseudos.jstree = $.expr.createPseudo(function(search) { + return function(a) { + return $(a).hasClass('jstree') && + $(a).data('jstree') !== undefined; + }; + }); + + /** + * stores all defaults for the core + * @name $.jstree.defaults.core + */ + $.jstree.defaults.core = { + /** + * data configuration + * + * If left as `false` the HTML inside the jstree container element is used to populate the tree (that should be an unordered list with list items). + * + * You can also pass in a HTML string or a JSON array here. + * + * It is possible to pass in a standard jQuery-like AJAX config and jstree will automatically determine if the response is JSON or HTML and use that to populate the tree. + * In addition to the standard jQuery ajax options here you can supply functions for `data` and `url`, the functions will be run in the current instance's scope and a param will be passed indicating which node is being loaded, the return value of those functions will be used. + * + * The last option is to specify a function, that function will receive the node being loaded as argument and a second param which is a function which should be called with the result. + * + * __Examples__ + * + * // AJAX + * $('#tree').jstree({ + * 'core' : { + * 'data' : { + * 'url' : '/get/children/', + * 'data' : function (node) { + * return { 'id' : node.id }; + * } + * } + * }); + * + * // direct data + * $('#tree').jstree({ + * 'core' : { + * 'data' : [ + * 'Simple root node', + * { + * 'id' : 'node_2', + * 'text' : 'Root node with options', + * 'state' : { 'opened' : true, 'selected' : true }, + * 'children' : [ { 'text' : 'Child 1' }, 'Child 2'] + * } + * ] + * } + * }); + * + * // function + * $('#tree').jstree({ + * 'core' : { + * 'data' : function (obj, callback) { + * callback.call(this, ['Root 1', 'Root 2']); + * } + * }); + * + * @name $.jstree.defaults.core.data + */ + data : false, + /** + * configure the various strings used throughout the tree + * + * You can use an object where the key is the string you need to replace and the value is your replacement. + * Another option is to specify a function which will be called with an argument of the needed string and should return the replacement. + * If left as `false` no replacement is made. + * + * __Examples__ + * + * $('#tree').jstree({ + * 'core' : { + * 'strings' : { + * 'Loading ...' : 'Please wait ...' + * } + * } + * }); + * + * @name $.jstree.defaults.core.strings + */ + strings : false, + /** + * determines what happens when a user tries to modify the structure of the tree + * If left as `false` all operations like create, rename, delete, move or copy are prevented. + * You can set this to `true` to allow all interactions or use a function to have better control. + * + * __Examples__ + * + * $('#tree').jstree({ + * 'core' : { + * 'check_callback' : function (operation, node, node_parent, node_position, more) { + * // operation can be 'create_node', 'rename_node', 'delete_node', 'move_node', 'copy_node' or 'edit' + * // in case of 'rename_node' node_position is filled with the new node name + * return operation === 'rename_node' ? true : false; + * } + * } + * }); + * + * @name $.jstree.defaults.core.check_callback + */ + check_callback : false, + /** + * a callback called with a single object parameter in the instance's scope when something goes wrong (operation prevented, ajax failed, etc) + * @name $.jstree.defaults.core.error + */ + error : $.noop, + /** + * the open / close animation duration in milliseconds - set this to `false` to disable the animation (default is `200`) + * @name $.jstree.defaults.core.animation + */ + animation : 200, + /** + * a boolean indicating if multiple nodes can be selected + * @name $.jstree.defaults.core.multiple + */ + multiple : true, + /** + * theme configuration object + * @name $.jstree.defaults.core.themes + */ + themes : { + /** + * the name of the theme to use (if left as `false` the default theme is used) + * @name $.jstree.defaults.core.themes.name + */ + name : false, + /** + * the URL of the theme's CSS file, leave this as `false` if you have manually included the theme CSS (recommended). You can set this to `true` too which will try to autoload the theme. + * @name $.jstree.defaults.core.themes.url + */ + url : false, + /** + * the location of all jstree themes - only used if `url` is set to `true` + * @name $.jstree.defaults.core.themes.dir + */ + dir : false, + /** + * a boolean indicating if connecting dots are shown + * @name $.jstree.defaults.core.themes.dots + */ + dots : true, + /** + * a boolean indicating if node icons are shown + * @name $.jstree.defaults.core.themes.icons + */ + icons : true, + /** + * a boolean indicating if node ellipsis should be shown - this only works with a fixed with on the container + * @name $.jstree.defaults.core.themes.ellipsis + */ + ellipsis : false, + /** + * a boolean indicating if the tree background is striped + * @name $.jstree.defaults.core.themes.stripes + */ + stripes : false, + /** + * a string (or boolean `false`) specifying the theme variant to use (if the theme supports variants) + * @name $.jstree.defaults.core.themes.variant + */ + variant : false, + /** + * a boolean specifying if a reponsive version of the theme should kick in on smaller screens (if the theme supports it). Defaults to `false`. + * @name $.jstree.defaults.core.themes.responsive + */ + responsive : false + }, + /** + * if left as `true` all parents of all selected nodes will be opened once the tree loads (so that all selected nodes are visible to the user) + * @name $.jstree.defaults.core.expand_selected_onload + */ + expand_selected_onload : true, + /** + * if left as `true` web workers will be used to parse incoming JSON data where possible, so that the UI will not be blocked by large requests. Workers are however about 30% slower. Defaults to `true` + * @name $.jstree.defaults.core.worker + */ + worker : true, + /** + * Force node text to plain text (and escape HTML). Defaults to `false` + * @name $.jstree.defaults.core.force_text + */ + force_text : false, + /** + * Should the node be toggled if the text is double clicked. Defaults to `true` + * @name $.jstree.defaults.core.dblclick_toggle + */ + dblclick_toggle : true, + /** + * Should the loaded nodes be part of the state. Defaults to `false` + * @name $.jstree.defaults.core.loaded_state + */ + loaded_state : false, + /** + * Should the last active node be focused when the tree container is blurred and the focused again. This helps working with screen readers. Defaults to `true` + * @name $.jstree.defaults.core.restore_focus + */ + restore_focus : true, + /** + * Force to compute and set "aria-setsize" and "aria-posinset" explicitly for each treeitem. + * Some browsers may compute incorrect elements position and produce wrong announcements for screen readers. Defaults to `false` + * @name $.jstree.defaults.core.compute_elements_positions + */ + compute_elements_positions : false, + /** + * Default keyboard shortcuts (an object where each key is the button name or combo - like 'enter', 'ctrl-space', 'p', etc and the value is the function to execute in the instance's scope) + * @name $.jstree.defaults.core.keyboard + */ + keyboard : { + 'ctrl-space': function (e) { + // aria defines space only with Ctrl + e.type = "click"; + $(e.currentTarget).trigger(e); + }, + 'enter': function (e) { + // enter + e.type = "click"; + $(e.currentTarget).trigger(e); + }, + 'left': function (e) { + // left + e.preventDefault(); + if(this.is_open(e.currentTarget)) { + this.close_node(e.currentTarget); + } + else { + var o = this.get_parent(e.currentTarget); + if(o && o.id !== $.jstree.root) { this.get_node(o, true).children('.jstree-anchor').trigger('focus'); } + } + }, + 'up': function (e) { + // up + e.preventDefault(); + var o = this.get_prev_dom(e.currentTarget); + if(o && o.length) { o.children('.jstree-anchor').trigger('focus'); } + }, + 'right': function (e) { + // right + e.preventDefault(); + if(this.is_closed(e.currentTarget)) { + this.open_node(e.currentTarget, function (o) { this.get_node(o, true).children('.jstree-anchor').trigger('focus'); }); + } + else if (this.is_open(e.currentTarget)) { + var o = this.get_node(e.currentTarget, true).children('.jstree-children')[0]; + if(o) { $(this._firstChild(o)).children('.jstree-anchor').trigger('focus'); } + } + }, + 'down': function (e) { + // down + e.preventDefault(); + var o = this.get_next_dom(e.currentTarget); + if(o && o.length) { o.children('.jstree-anchor').trigger('focus'); } + }, + '*': function (e) { + // aria defines * on numpad as open_all - not very common + this.open_all(); + }, + 'home': function (e) { + // home + e.preventDefault(); + var o = this._firstChild(this.get_container_ul()[0]); + if(o) { $(o).children('.jstree-anchor').filter(':visible').trigger('focus'); } + }, + 'end': function (e) { + // end + e.preventDefault(); + this.element.find('.jstree-anchor').filter(':visible').last().trigger('focus'); + }, + 'f2': function (e) { + // f2 - safe to include - if check_callback is false it will fail + e.preventDefault(); + this.edit(e.currentTarget); + } + }, + /** + * Should reselecting an already selected node trigger the select and changed callbacks + * @name $.jstree.defaults.core.allow_reselect + */ + allow_reselect : false + }; + $.jstree.core.prototype = { + /** + * used to decorate an instance with a plugin. Used internally. + * @private + * @name plugin(deco [, opts]) + * @param {String} deco the plugin to decorate with + * @param {Object} opts options for the plugin + * @return {jsTree} + */ + plugin : function (deco, opts) { + var Child = $.jstree.plugins[deco]; + if(Child) { + this._data[deco] = {}; + Child.prototype = this; + return new Child(opts, this); + } + return this; + }, + /** + * initialize the instance. Used internally. + * @private + * @name init(el, optons) + * @param {DOMElement|jQuery|String} el the element we are transforming + * @param {Object} options options for this instance + * @trigger init.jstree, loading.jstree, loaded.jstree, ready.jstree, changed.jstree + */ + init : function (el, options) { + this._model = { + data : {}, + changed : [], + force_full_redraw : false, + redraw_timeout : false, + default_state : { + loaded : true, + opened : false, + selected : false, + disabled : false + } + }; + this._model.data[$.jstree.root] = { + id : $.jstree.root, + parent : null, + parents : [], + children : [], + children_d : [], + state : { loaded : false } + }; + + this.element = $(el).addClass('jstree jstree-' + this._id); + this.settings = options; + + this._data.core.ready = false; + this._data.core.loaded = false; + this._data.core.rtl = (this.element.css("direction") === "rtl"); + this.element[this._data.core.rtl ? 'addClass' : 'removeClass']("jstree-rtl"); + this.element.attr('role','tree'); + if(this.settings.core.multiple) { + this.element.attr('aria-multiselectable', true); + } + if(!this.element.attr('tabindex')) { + this.element.attr('tabindex','0'); + } + + this.bind(); + /** + * triggered after all events are bound + * @event + * @name init.jstree + */ + this.trigger("init"); + + this._data.core.original_container_html = this.element.find(" > ul > li").clone(true); + this._data.core.original_container_html + .find("li").addBack() + .contents().filter(function() { + return this.nodeType === 3 && (!this.nodeValue || /^\s+$/.test(this.nodeValue)); + }) + .remove(); + this.element.html("<"+"ul class='jstree-container-ul jstree-children' role='group'><"+"li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none'><"+"a class='jstree-anchor' role='treeitem' href='#'>" + this.get_string("Loading ...") + ""); + this.element.attr('aria-activedescendant','j' + this._id + '_loading'); + this._data.core.li_height = this.get_container_ul().children("li").first().outerHeight() || 24; + this._data.core.node = this._create_prototype_node(); + /** + * triggered after the loading text is shown and before loading starts + * @event + * @name loading.jstree + */ + this.trigger("loading"); + this.load_node($.jstree.root); + }, + /** + * destroy an instance + * @name destroy() + * @param {Boolean} keep_html if not set to `true` the container will be emptied, otherwise the current DOM elements will be kept intact + */ + destroy : function (keep_html) { + /** + * triggered before the tree is destroyed + * @event + * @name destroy.jstree + */ + this.trigger("destroy"); + if(this._wrk) { + try { + window.URL.revokeObjectURL(this._wrk); + this._wrk = null; + } + catch (ignore) { } + } + if(!keep_html) { this.element.empty(); } + this.teardown(); + }, + /** + * Create a prototype node + * @name _create_prototype_node() + * @return {DOMElement} + */ + _create_prototype_node : function () { + var _node = document.createElement('LI'), _temp1, _temp2; + _node.setAttribute('role', 'none'); + _temp1 = document.createElement('I'); + _temp1.className = 'jstree-icon jstree-ocl'; + _temp1.setAttribute('role', 'presentation'); + _node.appendChild(_temp1); + _temp1 = document.createElement('A'); + _temp1.className = 'jstree-anchor'; + _temp1.setAttribute('href','#'); + _temp1.setAttribute('tabindex','-1'); + _temp1.setAttribute('role', 'treeitem'); + _temp2 = document.createElement('I'); + _temp2.className = 'jstree-icon jstree-themeicon'; + _temp2.setAttribute('role', 'presentation'); + _temp1.appendChild(_temp2); + _node.appendChild(_temp1); + _temp1 = _temp2 = null; + + return _node; + }, + _kbevent_to_func : function (e) { + var keys = { + 8: "Backspace", 9: "Tab", 13: "Enter", 19: "Pause", 27: "Esc", + 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", + 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "Print", 45: "Insert", + 46: "Delete", 96: "Numpad0", 97: "Numpad1", 98: "Numpad2", 99 : "Numpad3", + 100: "Numpad4", 101: "Numpad5", 102: "Numpad6", 103: "Numpad7", + 104: "Numpad8", 105: "Numpad9", '-13': "NumpadEnter", 112: "F1", + 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", + 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "Numlock", + 145: "Scrolllock", 16: 'Shift', 17: 'Ctrl', 18: 'Alt', + 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', + 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a', + 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', + 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', + 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', + 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', + 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', + 219: '[', 220: '\\',221: ']', 222: "'", 111: '/', 106: '*', 173: '-' + }; + var parts = []; + if (e.ctrlKey) { parts.push('ctrl'); } + if (e.altKey) { parts.push('alt'); } + if (e.shiftKey) { parts.push('shift'); } + parts.push(keys[e.which] ? keys[e.which].toLowerCase() : e.which); + parts = parts.sort().join('-').toLowerCase(); + if (parts === 'shift-shift' || parts === 'ctrl-ctrl' || parts === 'alt-alt') { + return null; + } + + var kb = this.settings.core.keyboard, i, tmp; + for (i in kb) { + if (kb.hasOwnProperty(i)) { + tmp = i; + if (tmp !== '-' && tmp !== '+') { + tmp = tmp.replace('--', '-MINUS').replace('+-', '-MINUS').replace('++', '-PLUS').replace('-+', '-PLUS'); + tmp = tmp.split(/-|\+/).sort().join('-').replace('MINUS', '-').replace('PLUS', '+').toLowerCase(); + } + if (tmp === parts) { + return kb[i]; + } + } + } + return null; + }, + /** + * part of the destroying of an instance. Used internally. + * @private + * @name teardown() + */ + teardown : function () { + this.unbind(); + this.element + .removeClass('jstree') + .removeData('jstree') + .find("[class^='jstree']") + .addBack() + .attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); }); + this.element = null; + }, + /** + * bind all events. Used internally. + * @private + * @name bind() + */ + bind : function () { + var word = '', + tout = null, + was_click = 0; + this.element + .on("dblclick.jstree", function (e) { + if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; } + if(document.selection && document.selection.empty) { + document.selection.empty(); + } + else { + if(window.getSelection) { + var sel = window.getSelection(); + try { + sel.removeAllRanges(); + sel.collapse(); + } catch (ignore) { } + } + } + }) + .on("mousedown.jstree", function (e) { + if(e.target === this.element[0]) { + e.preventDefault(); // prevent losing focus when clicking scroll arrows (FF, Chrome) + was_click = +(new Date()); // ie does not allow to prevent losing focus + } + }.bind(this)) + .on("mousedown.jstree", ".jstree-ocl", function (e) { + e.preventDefault(); // prevent any node inside from losing focus when clicking the open/close icon + }) + .on("click.jstree", ".jstree-ocl", function (e) { + this.toggle_node(e.target); + }.bind(this)) + .on("dblclick.jstree", ".jstree-anchor", function (e) { + if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; } + if(this.settings.core.dblclick_toggle) { + this.toggle_node(e.target); + } + }.bind(this)) + .on("click.jstree", ".jstree-anchor", function (e) { + e.preventDefault(); + if(e.currentTarget !== document.activeElement) { $(e.currentTarget).trigger('focus'); } + this.activate_node(e.currentTarget, e); + }.bind(this)) + .on('keydown.jstree', '.jstree-anchor', function (e) { + if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; } + if(this._data.core.rtl) { + if(e.which === 37) { e.which = 39; } + else if(e.which === 39) { e.which = 37; } + } + var f = this._kbevent_to_func(e); + if (f) { + var r = f.call(this, e); + if (r === false || r === true) { + return r; + } + } + }.bind(this)) + .on("load_node.jstree", function (e, data) { + if(data.status) { + if(data.node.id === $.jstree.root && !this._data.core.loaded) { + this._data.core.loaded = true; + if(this._firstChild(this.get_container_ul()[0])) { + this.element.attr('aria-activedescendant',this._firstChild(this.get_container_ul()[0]).id); + } + /** + * triggered after the root node is loaded for the first time + * @event + * @name loaded.jstree + */ + this.trigger("loaded"); + } + if(!this._data.core.ready) { + setTimeout(function() { + if(this.element && !this.get_container_ul().find('.jstree-loading').length) { + this._data.core.ready = true; + if(this._data.core.selected.length) { + if(this.settings.core.expand_selected_onload) { + var tmp = [], i, j; + for(i = 0, j = this._data.core.selected.length; i < j; i++) { + tmp = tmp.concat(this._model.data[this._data.core.selected[i]].parents); + } + tmp = $.vakata.array_unique(tmp); + for(i = 0, j = tmp.length; i < j; i++) { + this.open_node(tmp[i], false, 0); + } + } + this.trigger('changed', { 'action' : 'ready', 'selected' : this._data.core.selected }); + } + /** + * triggered after all nodes are finished loading + * @event + * @name ready.jstree + */ + this.trigger("ready"); + } + }.bind(this), 0); + } + } + }.bind(this)) + // quick searching when the tree is focused + .on('keypress.jstree', function (e) { + if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; } + if(tout) { clearTimeout(tout); } + tout = setTimeout(function () { + word = ''; + }, 500); + + var chr = String.fromCharCode(e.which).toLowerCase(), + col = this.element.find('.jstree-anchor').filter(':visible'), + ind = col.index(document.activeElement) || 0, + end = false; + word += chr; + + // match for whole word from current node down (including the current node) + if(word.length > 1) { + col.slice(ind).each(function (i, v) { + if($(v).text().toLowerCase().indexOf(word) === 0) { + $(v).trigger('focus'); + end = true; + return false; + } + }.bind(this)); + if(end) { return; } + + // match for whole word from the beginning of the tree + col.slice(0, ind).each(function (i, v) { + if($(v).text().toLowerCase().indexOf(word) === 0) { + $(v).trigger('focus'); + end = true; + return false; + } + }.bind(this)); + if(end) { return; } + } + // list nodes that start with that letter (only if word consists of a single char) + if(new RegExp('^' + chr.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + '+$').test(word)) { + // search for the next node starting with that letter + col.slice(ind + 1).each(function (i, v) { + if($(v).text().toLowerCase().charAt(0) === chr) { + $(v).trigger('focus'); + end = true; + return false; + } + }.bind(this)); + if(end) { return; } + + // search from the beginning + col.slice(0, ind + 1).each(function (i, v) { + if($(v).text().toLowerCase().charAt(0) === chr) { + $(v).trigger('focus'); + end = true; + return false; + } + }.bind(this)); + if(end) { return; } + } + }.bind(this)) + // THEME RELATED + .on("init.jstree", function () { + var s = this.settings.core.themes; + this._data.core.themes.dots = s.dots; + this._data.core.themes.stripes = s.stripes; + this._data.core.themes.icons = s.icons; + this._data.core.themes.ellipsis = s.ellipsis; + this.set_theme(s.name || "default", s.url); + this.set_theme_variant(s.variant); + }.bind(this)) + .on("loading.jstree", function () { + this[ this._data.core.themes.dots ? "show_dots" : "hide_dots" ](); + this[ this._data.core.themes.icons ? "show_icons" : "hide_icons" ](); + this[ this._data.core.themes.stripes ? "show_stripes" : "hide_stripes" ](); + this[ this._data.core.themes.ellipsis ? "show_ellipsis" : "hide_ellipsis" ](); + }.bind(this)) + .on('blur.jstree', '.jstree-anchor', function (e) { + this._data.core.focused = null; + $(e.currentTarget).filter('.jstree-hovered').trigger('mouseleave'); + this.element.attr('tabindex', '0'); + $(e.currentTarget).attr('tabindex', '-1'); + }.bind(this)) + .on('focus.jstree', '.jstree-anchor', function (e) { + var tmp = this.get_node(e.currentTarget); + if(tmp && (tmp.id || tmp.id === 0)) { + this._data.core.focused = tmp.id; + } + this.element.find('.jstree-hovered').not(e.currentTarget).trigger('mouseleave'); + $(e.currentTarget).trigger('mouseenter'); + this.element.attr('tabindex', '-1'); + $(e.currentTarget).attr('tabindex', '0'); + }.bind(this)) + .on('focus.jstree', function () { + if(+(new Date()) - was_click > 500 && !this._data.core.focused && this.settings.core.restore_focus) { + was_click = 0; + var act = this.get_node(this.element.attr('aria-activedescendant'), true); + if(act) { + act.find('> .jstree-anchor').trigger('focus'); + } + } + }.bind(this)) + .on('mouseenter.jstree', '.jstree-anchor', function (e) { + this.hover_node(e.currentTarget); + }.bind(this)) + .on('mouseleave.jstree', '.jstree-anchor', function (e) { + this.dehover_node(e.currentTarget); + }.bind(this)); + }, + /** + * part of the destroying of an instance. Used internally. + * @private + * @name unbind() + */ + unbind : function () { + this.element.off('.jstree'); + $(document).off('.jstree-' + this._id); + }, + /** + * trigger an event. Used internally. + * @private + * @name trigger(ev [, data]) + * @param {String} ev the name of the event to trigger + * @param {Object} data additional data to pass with the event + */ + trigger : function (ev, data) { + if(!data) { + data = {}; + } + data.instance = this; + this.element.triggerHandler(ev.replace('.jstree','') + '.jstree', data); + }, + /** + * returns the jQuery extended instance container + * @name get_container() + * @return {jQuery} + */ + get_container : function () { + return this.element; + }, + /** + * returns the jQuery extended main UL node inside the instance container. Used internally. + * @private + * @name get_container_ul() + * @return {jQuery} + */ + get_container_ul : function () { + return this.element.children(".jstree-children").first(); + }, + /** + * gets string replacements (localization). Used internally. + * @private + * @name get_string(key) + * @param {String} key + * @return {String} + */ + get_string : function (key) { + var a = this.settings.core.strings; + if($.vakata.is_function(a)) { return a.call(this, key); } + if(a && a[key]) { return a[key]; } + return key; + }, + /** + * gets the first child of a DOM node. Used internally. + * @private + * @name _firstChild(dom) + * @param {DOMElement} dom + * @return {DOMElement} + */ + _firstChild : function (dom) { + dom = dom ? dom.firstChild : null; + while(dom !== null && dom.nodeType !== 1) { + dom = dom.nextSibling; + } + return dom; + }, + /** + * gets the next sibling of a DOM node. Used internally. + * @private + * @name _nextSibling(dom) + * @param {DOMElement} dom + * @return {DOMElement} + */ + _nextSibling : function (dom) { + dom = dom ? dom.nextSibling : null; + while(dom !== null && dom.nodeType !== 1) { + dom = dom.nextSibling; + } + return dom; + }, + /** + * gets the previous sibling of a DOM node. Used internally. + * @private + * @name _previousSibling(dom) + * @param {DOMElement} dom + * @return {DOMElement} + */ + _previousSibling : function (dom) { + dom = dom ? dom.previousSibling : null; + while(dom !== null && dom.nodeType !== 1) { + dom = dom.previousSibling; + } + return dom; + }, + /** + * get the JSON representation of a node (or the actual jQuery extended DOM node) by using any input (child DOM element, ID string, selector, etc) + * @name get_node(obj [, as_dom]) + * @param {mixed} obj + * @param {Boolean} as_dom + * @return {Object|jQuery} + */ + get_node : function (obj, as_dom) { + if(obj && (obj.id || obj.id === 0)) { + obj = obj.id; + } + if (obj instanceof $ && obj.length && obj[0].id) { + obj = obj[0].id; + } + var dom; + try { + if(this._model.data[obj]) { + obj = this._model.data[obj]; + } + else if(typeof obj === "string" && this._model.data[obj.replace(/^#/, '')]) { + obj = this._model.data[obj.replace(/^#/, '')]; + } + else if(typeof obj === "string" && (dom = $('#' + obj.replace($.jstree.idregex,'\\$&'), this.element)).length && this._model.data[dom.closest('.jstree-node').attr('id')]) { + obj = this._model.data[dom.closest('.jstree-node').attr('id')]; + } + else if((dom = this.element.find(obj)).length && this._model.data[dom.closest('.jstree-node').attr('id')]) { + obj = this._model.data[dom.closest('.jstree-node').attr('id')]; + } + else if((dom = this.element.find(obj)).length && dom.hasClass('jstree')) { + obj = this._model.data[$.jstree.root]; + } + else { + return false; + } + + if(as_dom) { + obj = obj.id === $.jstree.root ? this.element : $('#' + obj.id.replace($.jstree.idregex,'\\$&'), this.element); + } + return obj; + } catch (ex) { return false; } + }, + /** + * get the path to a node, either consisting of node texts, or of node IDs, optionally glued together (otherwise an array) + * @name get_path(obj [, glue, ids]) + * @param {mixed} obj the node + * @param {String} glue if you want the path as a string - pass the glue here (for example '/'), if a falsy value is supplied here, an array is returned + * @param {Boolean} ids if set to true build the path using ID, otherwise node text is used + * @return {mixed} + */ + get_path : function (obj, glue, ids) { + obj = obj.parents ? obj : this.get_node(obj); + if(!obj || obj.id === $.jstree.root || !obj.parents) { + return false; + } + var i, j, p = []; + p.push(ids ? obj.id : obj.text); + for(i = 0, j = obj.parents.length; i < j; i++) { + p.push(ids ? obj.parents[i] : this.get_text(obj.parents[i])); + } + p = p.reverse().slice(1); + return glue ? p.join(glue) : p; + }, + /** + * get the next visible node that is below the `obj` node. If `strict` is set to `true` only sibling nodes are returned. + * @name get_next_dom(obj [, strict]) + * @param {mixed} obj + * @param {Boolean} strict + * @return {jQuery} + */ + get_next_dom : function (obj, strict) { + var tmp; + obj = this.get_node(obj, true); + if(obj[0] === this.element[0]) { + tmp = this._firstChild(this.get_container_ul()[0]); + while (tmp && tmp.offsetHeight === 0) { + tmp = this._nextSibling(tmp); + } + return tmp ? $(tmp) : false; + } + if(!obj || !obj.length) { + return false; + } + if(strict) { + tmp = obj[0]; + do { + tmp = this._nextSibling(tmp); + } while (tmp && tmp.offsetHeight === 0); + return tmp ? $(tmp) : false; + } + if(obj.hasClass("jstree-open")) { + tmp = this._firstChild(obj.children('.jstree-children')[0]); + while (tmp && tmp.offsetHeight === 0) { + tmp = this._nextSibling(tmp); + } + if(tmp !== null) { + return $(tmp); + } + } + tmp = obj[0]; + do { + tmp = this._nextSibling(tmp); + } while (tmp && tmp.offsetHeight === 0); + if(tmp !== null) { + return $(tmp); + } + return obj.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first(); + }, + /** + * get the previous visible node that is above the `obj` node. If `strict` is set to `true` only sibling nodes are returned. + * @name get_prev_dom(obj [, strict]) + * @param {mixed} obj + * @param {Boolean} strict + * @return {jQuery} + */ + get_prev_dom : function (obj, strict) { + var tmp; + obj = this.get_node(obj, true); + if(obj[0] === this.element[0]) { + tmp = this.get_container_ul()[0].lastChild; + while (tmp && tmp.offsetHeight === 0) { + tmp = this._previousSibling(tmp); + } + return tmp ? $(tmp) : false; + } + if(!obj || !obj.length) { + return false; + } + if(strict) { + tmp = obj[0]; + do { + tmp = this._previousSibling(tmp); + } while (tmp && tmp.offsetHeight === 0); + return tmp ? $(tmp) : false; + } + tmp = obj[0]; + do { + tmp = this._previousSibling(tmp); + } while (tmp && tmp.offsetHeight === 0); + if(tmp !== null) { + obj = $(tmp); + while(obj.hasClass("jstree-open")) { + obj = obj.children(".jstree-children").first().children(".jstree-node:visible:last"); + } + return obj; + } + tmp = obj[0].parentNode.parentNode; + return tmp && tmp.className && tmp.className.indexOf('jstree-node') !== -1 ? $(tmp) : false; + }, + /** + * get the parent ID of a node + * @name get_parent(obj) + * @param {mixed} obj + * @return {String} + */ + get_parent : function (obj) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + return obj.parent; + }, + /** + * get a jQuery collection of all the children of a node (node must be rendered), returns false on error + * @name get_children_dom(obj) + * @param {mixed} obj + * @return {jQuery} + */ + get_children_dom : function (obj) { + obj = this.get_node(obj, true); + if(obj[0] === this.element[0]) { + return this.get_container_ul().children(".jstree-node"); + } + if(!obj || !obj.length) { + return false; + } + return obj.children(".jstree-children").children(".jstree-node"); + }, + /** + * checks if a node has children + * @name is_parent(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_parent : function (obj) { + obj = this.get_node(obj); + return obj && (obj.state.loaded === false || obj.children.length > 0); + }, + /** + * checks if a node is loaded (its children are available) + * @name is_loaded(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_loaded : function (obj) { + obj = this.get_node(obj); + return obj && obj.state.loaded; + }, + /** + * check if a node is currently loading (fetching children) + * @name is_loading(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_loading : function (obj) { + obj = this.get_node(obj); + return obj && obj.state && obj.state.loading; + }, + /** + * check if a node is opened + * @name is_open(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_open : function (obj) { + obj = this.get_node(obj); + return obj && obj.state.opened; + }, + /** + * check if a node is in a closed state + * @name is_closed(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_closed : function (obj) { + obj = this.get_node(obj); + return obj && this.is_parent(obj) && !obj.state.opened; + }, + /** + * check if a node has no children + * @name is_leaf(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_leaf : function (obj) { + return !this.is_parent(obj); + }, + /** + * loads a node (fetches its children using the `core.data` setting). Multiple nodes can be passed to by using an array. + * @name load_node(obj [, callback]) + * @param {mixed} obj + * @param {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives two arguments - the node and a boolean status + * @return {Boolean} + * @trigger load_node.jstree + */ + load_node : function (obj, callback) { + var dom = this.get_node(obj, true), k, l, i, j, c; + if($.vakata.is_array(obj)) { + this._load_nodes(obj.slice(), callback); + return true; + } + obj = this.get_node(obj); + if(!obj) { + if(callback) { callback.call(this, obj, false); } + return false; + } + // if(obj.state.loading) { } // the node is already loading - just wait for it to load and invoke callback? but if called implicitly it should be loaded again? + if(obj.state.loaded) { + obj.state.loaded = false; + for(i = 0, j = obj.parents.length; i < j; i++) { + this._model.data[obj.parents[i]].children_d = $.vakata.array_filter(this._model.data[obj.parents[i]].children_d, function (v) { + return $.inArray(v, obj.children_d) === -1; + }); + } + for(k = 0, l = obj.children_d.length; k < l; k++) { + if(this._model.data[obj.children_d[k]].state.selected) { + c = true; + } + delete this._model.data[obj.children_d[k]]; + } + if (c) { + this._data.core.selected = $.vakata.array_filter(this._data.core.selected, function (v) { + return $.inArray(v, obj.children_d) === -1; + }); + } + obj.children = []; + obj.children_d = []; + if(c) { + this.trigger('changed', { 'action' : 'load_node', 'node' : obj, 'selected' : this._data.core.selected }); + } + } + obj.state.failed = false; + obj.state.loading = true; + if (obj.id !== $.jstree.root) { + dom.children(".jstree-anchor").attr('aria-busy', true); + } else { + dom.attr('aria-busy', true); + } + dom.addClass("jstree-loading"); + this._load_node(obj, function (status) { + obj = this._model.data[obj.id]; + obj.state.loading = false; + obj.state.loaded = status; + obj.state.failed = !obj.state.loaded; + var dom = this.get_node(obj, true), i = 0, j = 0, m = this._model.data, has_children = false; + for(i = 0, j = obj.children.length; i < j; i++) { + if(m[obj.children[i]] && !m[obj.children[i]].state.hidden) { + has_children = true; + break; + } + } + if(obj.state.loaded && dom && dom.length) { + dom.removeClass('jstree-closed jstree-open jstree-leaf'); + if (!has_children) { + dom.addClass('jstree-leaf'); + } + else { + if (obj.id !== '#') { + dom.addClass(obj.state.opened ? 'jstree-open' : 'jstree-closed'); + } + } + } + if (obj.id !== $.jstree.root) { + dom.children(".jstree-anchor").attr('aria-busy', false); + } else { + dom.attr('aria-busy', false); + } + dom.removeClass("jstree-loading"); + /** + * triggered after a node is loaded + * @event + * @name load_node.jstree + * @param {Object} node the node that was loading + * @param {Boolean} status was the node loaded successfully + */ + this.trigger('load_node', { "node" : obj, "status" : status }); + if(callback) { + callback.call(this, obj, status); + } + }.bind(this)); + return true; + }, + /** + * load an array of nodes (will also load unavailable nodes as soon as they appear in the structure). Used internally. + * @private + * @name _load_nodes(nodes [, callback]) + * @param {array} nodes + * @param {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives one argument - the array passed to _load_nodes + */ + _load_nodes : function (nodes, callback, is_callback, force_reload) { + var r = true, + c = function () { this._load_nodes(nodes, callback, true); }, + m = this._model.data, i, j, tmp = []; + for(i = 0, j = nodes.length; i < j; i++) { + if(m[nodes[i]] && ( (!m[nodes[i]].state.loaded && !m[nodes[i]].state.failed) || (!is_callback && force_reload) )) { + if(!this.is_loading(nodes[i])) { + this.load_node(nodes[i], c); + } + r = false; + } + } + if(r) { + for(i = 0, j = nodes.length; i < j; i++) { + if(m[nodes[i]] && m[nodes[i]].state.loaded) { + tmp.push(nodes[i]); + } + } + if(callback && !callback.done) { + callback.call(this, tmp); + callback.done = true; + } + } + }, + /** + * loads all unloaded nodes + * @name load_all([obj, callback]) + * @param {mixed} obj the node to load recursively, omit to load all nodes in the tree + * @param {function} callback a function to be executed once loading all the nodes is complete, + * @trigger load_all.jstree + */ + load_all : function (obj, callback) { + if(!obj) { obj = $.jstree.root; } + obj = this.get_node(obj); + if(!obj) { return false; } + var to_load = [], + m = this._model.data, + c = m[obj.id].children_d, + i, j; + if(obj.state && !obj.state.loaded) { + to_load.push(obj.id); + } + for(i = 0, j = c.length; i < j; i++) { + if(m[c[i]] && m[c[i]].state && !m[c[i]].state.loaded) { + to_load.push(c[i]); + } + } + if(to_load.length) { + this._load_nodes(to_load, function () { + this.load_all(obj, callback); + }); + } + else { + /** + * triggered after a load_all call completes + * @event + * @name load_all.jstree + * @param {Object} node the recursively loaded node + */ + if(callback) { callback.call(this, obj); } + this.trigger('load_all', { "node" : obj }); + } + }, + /** + * handles the actual loading of a node. Used only internally. + * @private + * @name _load_node(obj [, callback]) + * @param {mixed} obj + * @param {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives one argument - a boolean status + * @return {Boolean} + */ + _load_node : function (obj, callback) { + var s = this.settings.core.data, t; + var notTextOrCommentNode = function notTextOrCommentNode () { + return this.nodeType !== 3 && this.nodeType !== 8; + }; + // use original HTML + if(!s) { + if(obj.id === $.jstree.root) { + return this._append_html_data(obj, this._data.core.original_container_html.clone(true), function (status) { + callback.call(this, status); + }); + } + else { + return callback.call(this, false); + } + // return callback.call(this, obj.id === $.jstree.root ? this._append_html_data(obj, this._data.core.original_container_html.clone(true)) : false); + } + if($.vakata.is_function(s)) { + return s.call(this, obj, function (d) { + if(d === false) { + callback.call(this, false); + } + else { + this[typeof d === 'string' ? '_append_html_data' : '_append_json_data'](obj, typeof d === 'string' ? $($.parseHTML(d)).filter(notTextOrCommentNode) : d, function (status) { + callback.call(this, status); + }); + } + // return d === false ? callback.call(this, false) : callback.call(this, this[typeof d === 'string' ? '_append_html_data' : '_append_json_data'](obj, typeof d === 'string' ? $(d) : d)); + }.bind(this)); + } + if(typeof s === 'object') { + if(s.url) { + s = $.extend(true, {}, s); + if($.vakata.is_function(s.url)) { + s.url = s.url.call(this, obj); + } + if($.vakata.is_function(s.data)) { + s.data = s.data.call(this, obj); + } + return $.ajax(s) + .done(function (d,t,x) { + var type = x.getResponseHeader('Content-Type'); + if((type && type.indexOf('json') !== -1) || typeof d === "object") { + return this._append_json_data(obj, d, function (status) { callback.call(this, status); }); + //return callback.call(this, this._append_json_data(obj, d)); + } + if((type && type.indexOf('html') !== -1) || typeof d === "string") { + return this._append_html_data(obj, $($.parseHTML(d)).filter(notTextOrCommentNode), function (status) { callback.call(this, status); }); + // return callback.call(this, this._append_html_data(obj, $(d))); + } + this._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'core', 'id' : 'core_04', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id, 'xhr' : x }) }; + this.settings.core.error.call(this, this._data.core.last_error); + return callback.call(this, false); + }.bind(this)) + .fail(function (f) { + this._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'core', 'id' : 'core_04', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id, 'xhr' : f }) }; + callback.call(this, false); + this.settings.core.error.call(this, this._data.core.last_error); + }.bind(this)); + } + if ($.vakata.is_array(s)) { + t = $.extend(true, [], s); + } else if ($.isPlainObject(s)) { + t = $.extend(true, {}, s); + } else { + t = s; + } + if(obj.id === $.jstree.root) { + return this._append_json_data(obj, t, function (status) { + callback.call(this, status); + }); + } + else { + this._data.core.last_error = { 'error' : 'nodata', 'plugin' : 'core', 'id' : 'core_05', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id }) }; + this.settings.core.error.call(this, this._data.core.last_error); + return callback.call(this, false); + } + //return callback.call(this, (obj.id === $.jstree.root ? this._append_json_data(obj, t) : false) ); + } + if(typeof s === 'string') { + if(obj.id === $.jstree.root) { + return this._append_html_data(obj, $($.parseHTML(s)).filter(notTextOrCommentNode), function (status) { + callback.call(this, status); + }); + } + else { + this._data.core.last_error = { 'error' : 'nodata', 'plugin' : 'core', 'id' : 'core_06', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id }) }; + this.settings.core.error.call(this, this._data.core.last_error); + return callback.call(this, false); + } + //return callback.call(this, (obj.id === $.jstree.root ? this._append_html_data(obj, $(s)) : false) ); + } + return callback.call(this, false); + }, + /** + * adds a node to the list of nodes to redraw. Used only internally. + * @private + * @name _node_changed(obj [, callback]) + * @param {mixed} obj + */ + _node_changed : function (obj) { + obj = this.get_node(obj); + if (obj && $.inArray(obj.id, this._model.changed) === -1) { + this._model.changed.push(obj.id); + } + }, + /** + * appends HTML content to the tree. Used internally. + * @private + * @name _append_html_data(obj, data) + * @param {mixed} obj the node to append to + * @param {String} data the HTML string to parse and append + * @trigger model.jstree, changed.jstree + */ + _append_html_data : function (dom, data, cb) { + dom = this.get_node(dom); + dom.children = []; + dom.children_d = []; + var dat = data.is('ul') ? data.children() : data, + par = dom.id, + chd = [], + dpc = [], + m = this._model.data, + p = m[par], + s = this._data.core.selected.length, + tmp, i, j; + dat.each(function (i, v) { + tmp = this._parse_model_from_html($(v), par, p.parents.concat()); + if(tmp) { + chd.push(tmp); + dpc.push(tmp); + if(m[tmp].children_d.length) { + dpc = dpc.concat(m[tmp].children_d); + } + } + }.bind(this)); + p.children = chd; + p.children_d = dpc; + for(i = 0, j = p.parents.length; i < j; i++) { + m[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc); + } + /** + * triggered when new data is inserted to the tree model + * @event + * @name model.jstree + * @param {Array} nodes an array of node IDs + * @param {String} parent the parent ID of the nodes + */ + this.trigger('model', { "nodes" : dpc, 'parent' : par }); + if(par !== $.jstree.root) { + this._node_changed(par); + this.redraw(); + } + else { + this.get_container_ul().children('.jstree-initial-node').remove(); + this.redraw(true); + } + if(this._data.core.selected.length !== s) { + this.trigger('changed', { 'action' : 'model', 'selected' : this._data.core.selected }); + } + cb.call(this, true); + }, + /** + * appends JSON content to the tree. Used internally. + * @private + * @name _append_json_data(obj, data) + * @param {mixed} obj the node to append to + * @param {String} data the JSON object to parse and append + * @param {Boolean} force_processing internal param - do not set + * @trigger model.jstree, changed.jstree + */ + _append_json_data : function (dom, data, cb, force_processing) { + if(this.element === null) { return; } + dom = this.get_node(dom); + dom.children = []; + dom.children_d = []; + // *%$@!!! + if(data.d) { + data = data.d; + if(typeof data === "string") { + data = JSON.parse(data); + } + } + if(!$.vakata.is_array(data)) { data = [data]; } + var w = null, + args = { + 'df' : this._model.default_state, + 'dat' : data, + 'par' : dom.id, + 'm' : this._model.data, + 't_id' : this._id, + 't_cnt' : this._cnt, + 'sel' : this._data.core.selected + }, + inst = this, + func = function (data, undefined) { + if(data.data) { data = data.data; } + var dat = data.dat, + par = data.par, + chd = [], + dpc = [], + add = [], + df = data.df, + t_id = data.t_id, + t_cnt = data.t_cnt, + m = data.m, + p = m[par], + sel = data.sel, + tmp, i, j, rslt, + parse_flat = function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = ps.concat(); } + if(p) { ps.unshift(p); } + var tid = d.id.toString(), + i, j, c, e, + tmp = { + id : tid, + text : d.text || '', + icon : d.icon !== undefined ? d.icon : true, + parent : p, + parents : ps, + children : d.children || [], + children_d : d.children_d || [], + data : d.data, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }; + for(i in df) { + if(df.hasOwnProperty(i)) { + tmp.state[i] = df[i]; + } + } + if(d && d.data && d.data.jstree && d.data.jstree.icon) { + tmp.icon = d.data.jstree.icon; + } + if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") { + tmp.icon = true; + } + if(d && d.data) { + tmp.data = d.data; + if(d.data.jstree) { + for(i in d.data.jstree) { + if(d.data.jstree.hasOwnProperty(i)) { + tmp.state[i] = d.data.jstree[i]; + } + } + } + } + if(d && typeof d.state === 'object') { + for (i in d.state) { + if(d.state.hasOwnProperty(i)) { + tmp.state[i] = d.state[i]; + } + } + } + if(d && typeof d.li_attr === 'object') { + for (i in d.li_attr) { + if(d.li_attr.hasOwnProperty(i)) { + tmp.li_attr[i] = d.li_attr[i]; + } + } + } + if(!tmp.li_attr.id) { + tmp.li_attr.id = tid; + } + if(d && typeof d.a_attr === 'object') { + for (i in d.a_attr) { + if(d.a_attr.hasOwnProperty(i)) { + tmp.a_attr[i] = d.a_attr[i]; + } + } + } + if(d && d.children && d.children === true) { + tmp.state.loaded = false; + tmp.children = []; + tmp.children_d = []; + } + m[tmp.id] = tmp; + for(i = 0, j = tmp.children.length; i < j; i++) { + c = parse_flat(m[tmp.children[i]], tmp.id, ps); + e = m[c]; + tmp.children_d.push(c); + if(e.children_d.length) { + tmp.children_d = tmp.children_d.concat(e.children_d); + } + } + delete d.data; + delete d.children; + m[tmp.id].original = d; + if(tmp.state.selected) { + add.push(tmp.id); + } + return tmp.id; + }, + parse_nest = function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = ps.concat(); } + if(p) { ps.unshift(p); } + var tid = false, i, j, c, e, tmp; + do { + tid = 'j' + t_id + '_' + (++t_cnt); + } while(m[tid]); + + tmp = { + id : false, + text : typeof d === 'string' ? d : '', + icon : typeof d === 'object' && d.icon !== undefined ? d.icon : true, + parent : p, + parents : ps, + children : [], + children_d : [], + data : null, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }; + for(i in df) { + if(df.hasOwnProperty(i)) { + tmp.state[i] = df[i]; + } + } + if(d && (d.id || d.id === 0)) { tmp.id = d.id.toString(); } + if(d && d.text) { tmp.text = d.text; } + if(d && d.data && d.data.jstree && d.data.jstree.icon) { + tmp.icon = d.data.jstree.icon; + } + if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") { + tmp.icon = true; + } + if(d && d.data) { + tmp.data = d.data; + if(d.data.jstree) { + for(i in d.data.jstree) { + if(d.data.jstree.hasOwnProperty(i)) { + tmp.state[i] = d.data.jstree[i]; + } + } + } + } + if(d && typeof d.state === 'object') { + for (i in d.state) { + if(d.state.hasOwnProperty(i)) { + tmp.state[i] = d.state[i]; + } + } + } + if(d && typeof d.li_attr === 'object') { + for (i in d.li_attr) { + if(d.li_attr.hasOwnProperty(i)) { + tmp.li_attr[i] = d.li_attr[i]; + } + } + } + if(tmp.li_attr.id && !(tmp.id || tmp.id === 0)) { + tmp.id = tmp.li_attr.id.toString(); + } + if(!(tmp.id || tmp.id === 0)) { + tmp.id = tid; + } + if(!tmp.li_attr.id) { + tmp.li_attr.id = tmp.id; + } + if(d && typeof d.a_attr === 'object') { + for (i in d.a_attr) { + if(d.a_attr.hasOwnProperty(i)) { + tmp.a_attr[i] = d.a_attr[i]; + } + } + } + if(d && d.children && d.children.length) { + for(i = 0, j = d.children.length; i < j; i++) { + c = parse_nest(d.children[i], tmp.id, ps); + e = m[c]; + tmp.children.push(c); + if(e.children_d.length) { + tmp.children_d = tmp.children_d.concat(e.children_d); + } + } + tmp.children_d = tmp.children_d.concat(tmp.children); + } + if(d && d.children && d.children === true) { + tmp.state.loaded = false; + tmp.children = []; + tmp.children_d = []; + } + delete d.data; + delete d.children; + tmp.original = d; + m[tmp.id] = tmp; + if(tmp.state.selected) { + add.push(tmp.id); + } + return tmp.id; + }; + + if(dat.length && dat[0].id !== undefined && dat[0].parent !== undefined) { + // Flat JSON support (for easy import from DB): + // 1) convert to object (foreach) + for(i = 0, j = dat.length; i < j; i++) { + if(!dat[i].children) { + dat[i].children = []; + } + if(!dat[i].state) { + dat[i].state = {}; + } + m[dat[i].id.toString()] = dat[i]; + } + // 2) populate children (foreach) + for(i = 0, j = dat.length; i < j; i++) { + if (!m[dat[i].parent.toString()]) { + if (typeof inst !== "undefined") { + inst._data.core.last_error = { 'error' : 'parse', 'plugin' : 'core', 'id' : 'core_07', 'reason' : 'Node with invalid parent', 'data' : JSON.stringify({ 'id' : dat[i].id.toString(), 'parent' : dat[i].parent.toString() }) }; + inst.settings.core.error.call(inst, inst._data.core.last_error); + } + continue; + } + + m[dat[i].parent.toString()].children.push(dat[i].id.toString()); + // populate parent.children_d + p.children_d.push(dat[i].id.toString()); + } + // 3) normalize && populate parents and children_d with recursion + for(i = 0, j = p.children.length; i < j; i++) { + tmp = parse_flat(m[p.children[i]], par, p.parents.concat()); + dpc.push(tmp); + if(m[tmp].children_d.length) { + dpc = dpc.concat(m[tmp].children_d); + } + } + for(i = 0, j = p.parents.length; i < j; i++) { + m[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc); + } + // ?) three_state selection - p.state.selected && t - (if three_state foreach(dat => ch) -> foreach(parents) if(parent.selected) child.selected = true; + rslt = { + 'cnt' : t_cnt, + 'mod' : m, + 'sel' : sel, + 'par' : par, + 'dpc' : dpc, + 'add' : add + }; + } + else { + for(i = 0, j = dat.length; i < j; i++) { + tmp = parse_nest(dat[i], par, p.parents.concat()); + if(tmp) { + chd.push(tmp); + dpc.push(tmp); + if(m[tmp].children_d.length) { + dpc = dpc.concat(m[tmp].children_d); + } + } + } + p.children = chd; + p.children_d = dpc; + for(i = 0, j = p.parents.length; i < j; i++) { + m[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc); + } + rslt = { + 'cnt' : t_cnt, + 'mod' : m, + 'sel' : sel, + 'par' : par, + 'dpc' : dpc, + 'add' : add + }; + } + if(typeof window === 'undefined' || typeof window.document === 'undefined') { + postMessage(rslt); + } + else { + return rslt; + } + }, + rslt = function (rslt, worker) { + if(this.element === null) { return; } + this._cnt = rslt.cnt; + var i, m = this._model.data; + for (i in m) { + if (m.hasOwnProperty(i) && m[i].state && m[i].state.loading && rslt.mod[i]) { + rslt.mod[i].state.loading = true; + } + } + this._model.data = rslt.mod; // breaks the reference in load_node - careful + + if(worker) { + var j, a = rslt.add, r = rslt.sel, s = this._data.core.selected.slice(); + m = this._model.data; + // if selection was changed while calculating in worker + if(r.length !== s.length || $.vakata.array_unique(r.concat(s)).length !== r.length) { + // deselect nodes that are no longer selected + for(i = 0, j = r.length; i < j; i++) { + if($.inArray(r[i], a) === -1 && $.inArray(r[i], s) === -1) { + m[r[i]].state.selected = false; + } + } + // select nodes that were selected in the mean time + for(i = 0, j = s.length; i < j; i++) { + if($.inArray(s[i], r) === -1) { + m[s[i]].state.selected = true; + } + } + } + } + if(rslt.add.length) { + this._data.core.selected = this._data.core.selected.concat(rslt.add); + } + + this.trigger('model', { "nodes" : rslt.dpc, 'parent' : rslt.par }); + + if(rslt.par !== $.jstree.root) { + this._node_changed(rslt.par); + this.redraw(); + } + else { + // this.get_container_ul().children('.jstree-initial-node').remove(); + this.redraw(true); + } + if(rslt.add.length) { + this.trigger('changed', { 'action' : 'model', 'selected' : this._data.core.selected }); + } + + // If no worker, try to mimic worker behavioour, by invoking cb asynchronously + if (!worker && setImmediate) { + setImmediate(function(){ + cb.call(inst, true); + }); + } + else { + cb.call(inst, true); + } + }; + if(this.settings.core.worker && window.Blob && window.URL && window.Worker) { + try { + if(this._wrk === null) { + this._wrk = window.URL.createObjectURL( + new window.Blob( + ['self.onmessage = ' + func.toString()], + {type:"text/javascript"} + ) + ); + } + if(!this._data.core.working || force_processing) { + this._data.core.working = true; + w = new window.Worker(this._wrk); + w.onmessage = function (e) { + rslt.call(this, e.data, true); + try { w.terminate(); w = null; } catch(ignore) { } + if(this._data.core.worker_queue.length) { + this._append_json_data.apply(this, this._data.core.worker_queue.shift()); + } + else { + this._data.core.working = false; + } + }.bind(this); + w.onerror = function (e) { + rslt.call(this, func(args), false); + if(this._data.core.worker_queue.length) { + this._append_json_data.apply(this, this._data.core.worker_queue.shift()); + } + else { + this._data.core.working = false; + } + }.bind(this); + if(!args.par) { + if(this._data.core.worker_queue.length) { + this._append_json_data.apply(this, this._data.core.worker_queue.shift()); + } + else { + this._data.core.working = false; + } + } + else { + w.postMessage(args); + } + } + else { + this._data.core.worker_queue.push([dom, data, cb, true]); + } + } + catch(e) { + rslt.call(this, func(args), false); + if(this._data.core.worker_queue.length) { + this._append_json_data.apply(this, this._data.core.worker_queue.shift()); + } + else { + this._data.core.working = false; + } + } + } + else { + rslt.call(this, func(args), false); + } + }, + /** + * parses a node from a jQuery object and appends them to the in memory tree model. Used internally. + * @private + * @name _parse_model_from_html(d [, p, ps]) + * @param {jQuery} d the jQuery object to parse + * @param {String} p the parent ID + * @param {Array} ps list of all parents + * @return {String} the ID of the object added to the model + */ + _parse_model_from_html : function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = [].concat(ps); } + if(p) { ps.unshift(p); } + var c, e, m = this._model.data, + data = { + id : false, + text : false, + icon : true, + parent : p, + parents : ps, + children : [], + children_d : [], + data : null, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }, i, tmp, tid; + for(i in this._model.default_state) { + if(this._model.default_state.hasOwnProperty(i)) { + data.state[i] = this._model.default_state[i]; + } + } + tmp = $.vakata.attributes(d, true); + $.each(tmp, function (i, v) { + v = $.vakata.trim(v); + if(!v.length) { return true; } + data.li_attr[i] = v; + if(i === 'id') { + data.id = v.toString(); + } + }); + tmp = d.children('a').first(); + if(tmp.length) { + tmp = $.vakata.attributes(tmp, true); + $.each(tmp, function (i, v) { + v = $.vakata.trim(v); + if(v.length) { + data.a_attr[i] = v; + } + }); + } + tmp = d.children("a").first().length ? d.children("a").first().clone() : d.clone(); + tmp.children("ins, i, ul").remove(); + tmp = tmp.html(); + tmp = $('
').html(tmp); + data.text = this.settings.core.force_text ? tmp.text() : tmp.html(); + tmp = d.data(); + data.data = tmp ? $.extend(true, {}, tmp) : null; + data.state.opened = d.hasClass('jstree-open'); + data.state.selected = d.children('a').hasClass('jstree-clicked'); + data.state.disabled = d.children('a').hasClass('jstree-disabled'); + if(data.data && data.data.jstree) { + for(i in data.data.jstree) { + if(data.data.jstree.hasOwnProperty(i)) { + data.state[i] = data.data.jstree[i]; + } + } + } + tmp = d.children("a").children(".jstree-themeicon"); + if(tmp.length) { + data.icon = tmp.hasClass('jstree-themeicon-hidden') ? false : tmp.attr('rel'); + } + if(data.state.icon !== undefined) { + data.icon = data.state.icon; + } + if(data.icon === undefined || data.icon === null || data.icon === "") { + data.icon = true; + } + tmp = d.children("ul").children("li"); + do { + tid = 'j' + this._id + '_' + (++this._cnt); + } while(m[tid]); + data.id = data.li_attr.id ? data.li_attr.id.toString() : tid; + if(tmp.length) { + tmp.each(function (i, v) { + c = this._parse_model_from_html($(v), data.id, ps); + e = this._model.data[c]; + data.children.push(c); + if(e.children_d.length) { + data.children_d = data.children_d.concat(e.children_d); + } + }.bind(this)); + data.children_d = data.children_d.concat(data.children); + } + else { + if(d.hasClass('jstree-closed')) { + data.state.loaded = false; + } + } + if(data.li_attr['class']) { + data.li_attr['class'] = data.li_attr['class'].replace('jstree-closed','').replace('jstree-open',''); + } + if(data.a_attr['class']) { + data.a_attr['class'] = data.a_attr['class'].replace('jstree-clicked','').replace('jstree-disabled',''); + } + m[data.id] = data; + if(data.state.selected) { + this._data.core.selected.push(data.id); + } + return data.id; + }, + /** + * parses a node from a JSON object (used when dealing with flat data, which has no nesting of children, but has id and parent properties) and appends it to the in memory tree model. Used internally. + * @private + * @name _parse_model_from_flat_json(d [, p, ps]) + * @param {Object} d the JSON object to parse + * @param {String} p the parent ID + * @param {Array} ps list of all parents + * @return {String} the ID of the object added to the model + */ + _parse_model_from_flat_json : function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = ps.concat(); } + if(p) { ps.unshift(p); } + var tid = d.id.toString(), + m = this._model.data, + df = this._model.default_state, + i, j, c, e, + tmp = { + id : tid, + text : d.text || '', + icon : d.icon !== undefined ? d.icon : true, + parent : p, + parents : ps, + children : d.children || [], + children_d : d.children_d || [], + data : d.data, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }; + for(i in df) { + if(df.hasOwnProperty(i)) { + tmp.state[i] = df[i]; + } + } + if(d && d.data && d.data.jstree && d.data.jstree.icon) { + tmp.icon = d.data.jstree.icon; + } + if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") { + tmp.icon = true; + } + if(d && d.data) { + tmp.data = d.data; + if(d.data.jstree) { + for(i in d.data.jstree) { + if(d.data.jstree.hasOwnProperty(i)) { + tmp.state[i] = d.data.jstree[i]; + } + } + } + } + if(d && typeof d.state === 'object') { + for (i in d.state) { + if(d.state.hasOwnProperty(i)) { + tmp.state[i] = d.state[i]; + } + } + } + if(d && typeof d.li_attr === 'object') { + for (i in d.li_attr) { + if(d.li_attr.hasOwnProperty(i)) { + tmp.li_attr[i] = d.li_attr[i]; + } + } + } + if(!tmp.li_attr.id) { + tmp.li_attr.id = tid; + } + if(d && typeof d.a_attr === 'object') { + for (i in d.a_attr) { + if(d.a_attr.hasOwnProperty(i)) { + tmp.a_attr[i] = d.a_attr[i]; + } + } + } + if(d && d.children && d.children === true) { + tmp.state.loaded = false; + tmp.children = []; + tmp.children_d = []; + } + m[tmp.id] = tmp; + for(i = 0, j = tmp.children.length; i < j; i++) { + c = this._parse_model_from_flat_json(m[tmp.children[i]], tmp.id, ps); + e = m[c]; + tmp.children_d.push(c); + if(e.children_d.length) { + tmp.children_d = tmp.children_d.concat(e.children_d); + } + } + delete d.data; + delete d.children; + m[tmp.id].original = d; + if(tmp.state.selected) { + this._data.core.selected.push(tmp.id); + } + return tmp.id; + }, + /** + * parses a node from a JSON object and appends it to the in memory tree model. Used internally. + * @private + * @name _parse_model_from_json(d [, p, ps]) + * @param {Object} d the JSON object to parse + * @param {String} p the parent ID + * @param {Array} ps list of all parents + * @return {String} the ID of the object added to the model + */ + _parse_model_from_json : function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = ps.concat(); } + if(p) { ps.unshift(p); } + var tid = false, i, j, c, e, m = this._model.data, df = this._model.default_state, tmp; + do { + tid = 'j' + this._id + '_' + (++this._cnt); + } while(m[tid]); + + tmp = { + id : false, + text : typeof d === 'string' ? d : '', + icon : typeof d === 'object' && d.icon !== undefined ? d.icon : true, + parent : p, + parents : ps, + children : [], + children_d : [], + data : null, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }; + for(i in df) { + if(df.hasOwnProperty(i)) { + tmp.state[i] = df[i]; + } + } + if(d && (d.id || d.id === 0)) { tmp.id = d.id.toString(); } + if(d && d.text) { tmp.text = d.text; } + if(d && d.data && d.data.jstree && d.data.jstree.icon) { + tmp.icon = d.data.jstree.icon; + } + if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") { + tmp.icon = true; + } + if(d && d.data) { + tmp.data = d.data; + if(d.data.jstree) { + for(i in d.data.jstree) { + if(d.data.jstree.hasOwnProperty(i)) { + tmp.state[i] = d.data.jstree[i]; + } + } + } + } + if(d && typeof d.state === 'object') { + for (i in d.state) { + if(d.state.hasOwnProperty(i)) { + tmp.state[i] = d.state[i]; + } + } + } + if(d && typeof d.li_attr === 'object') { + for (i in d.li_attr) { + if(d.li_attr.hasOwnProperty(i)) { + tmp.li_attr[i] = d.li_attr[i]; + } + } + } + if(tmp.li_attr.id && !(tmp.id || tmp.id === 0)) { + tmp.id = tmp.li_attr.id.toString(); + } + if(!(tmp.id || tmp.id === 0)) { + tmp.id = tid; + } + if(!tmp.li_attr.id) { + tmp.li_attr.id = tmp.id; + } + if(d && typeof d.a_attr === 'object') { + for (i in d.a_attr) { + if(d.a_attr.hasOwnProperty(i)) { + tmp.a_attr[i] = d.a_attr[i]; + } + } + } + if(d && d.children && d.children.length) { + for(i = 0, j = d.children.length; i < j; i++) { + c = this._parse_model_from_json(d.children[i], tmp.id, ps); + e = m[c]; + tmp.children.push(c); + if(e.children_d.length) { + tmp.children_d = tmp.children_d.concat(e.children_d); + } + } + tmp.children_d = tmp.children.concat(tmp.children_d); + } + if(d && d.children && d.children === true) { + tmp.state.loaded = false; + tmp.children = []; + tmp.children_d = []; + } + delete d.data; + delete d.children; + tmp.original = d; + m[tmp.id] = tmp; + if(tmp.state.selected) { + this._data.core.selected.push(tmp.id); + } + return tmp.id; + }, + /** + * redraws all nodes that need to be redrawn. Used internally. + * @private + * @name _redraw() + * @trigger redraw.jstree + */ + _redraw : function () { + var nodes = this._model.force_full_redraw ? this._model.data[$.jstree.root].children.concat([]) : this._model.changed.concat([]), + f = document.createElement('UL'), tmp, i, j, fe = this._data.core.focused; + for(i = 0, j = nodes.length; i < j; i++) { + tmp = this.redraw_node(nodes[i], true, this._model.force_full_redraw); + if(tmp && this._model.force_full_redraw) { + f.appendChild(tmp); + } + } + if(this._model.force_full_redraw) { + f.className = this.get_container_ul()[0].className; + f.setAttribute('role','presentation'); + this.element.empty().append(f); + //this.get_container_ul()[0].appendChild(f); + } + if(fe !== null && this.settings.core.restore_focus) { + tmp = this.get_node(fe, true); + if(tmp && tmp.length && tmp.children('.jstree-anchor')[0] !== document.activeElement) { + tmp.children('.jstree-anchor').trigger('focus'); + } + else { + this._data.core.focused = null; + } + } + this._model.force_full_redraw = false; + this._model.changed = []; + /** + * triggered after nodes are redrawn + * @event + * @name redraw.jstree + * @param {array} nodes the redrawn nodes + */ + this.trigger('redraw', { "nodes" : nodes }); + }, + /** + * redraws all nodes that need to be redrawn or optionally - the whole tree + * @name redraw([full]) + * @param {Boolean} full if set to `true` all nodes are redrawn. + */ + redraw : function (full) { + if(full) { + this._model.force_full_redraw = true; + } + //if(this._model.redraw_timeout) { + // clearTimeout(this._model.redraw_timeout); + //} + //this._model.redraw_timeout = setTimeout($.proxy(this._redraw, this),0); + this._redraw(); + }, + /** + * redraws a single node's children. Used internally. + * @private + * @name draw_children(node) + * @param {mixed} node the node whose children will be redrawn + */ + draw_children : function (node) { + var obj = this.get_node(node), + i = false, + j = false, + k = false, + d = document; + if(!obj) { return false; } + if(obj.id === $.jstree.root) { return this.redraw(true); } + node = this.get_node(node, true); + if(!node || !node.length) { return false; } // TODO: quick toggle + + node.children('.jstree-children').remove(); + node = node[0]; + if(obj.children.length && obj.state.loaded) { + k = d.createElement('UL'); + k.setAttribute('role', 'group'); + k.className = 'jstree-children'; + for(i = 0, j = obj.children.length; i < j; i++) { + k.appendChild(this.redraw_node(obj.children[i], true, true)); + } + node.appendChild(k); + } + }, + /** + * redraws a single node. Used internally. + * @private + * @name redraw_node(node, deep, is_callback, force_render) + * @param {mixed} node the node to redraw + * @param {Boolean} deep should child nodes be redrawn too + * @param {Boolean} is_callback is this a recursion call + * @param {Boolean} force_render should children of closed parents be drawn anyway + */ + redraw_node : function (node, deep, is_callback, force_render) { + var obj = this.get_node(node), + par = false, + ind = false, + old = false, + i = false, + j = false, + k = false, + c = '', + d = document, + m = this._model.data, + f = false, + s = false, + tmp = null, + t = 0, + l = 0, + has_children = false, + last_sibling = false; + if(!obj) { return false; } + if(obj.id === $.jstree.root) { return this.redraw(true); } + deep = deep || obj.children.length === 0; + node = !document.querySelector ? document.getElementById(obj.id) : this.element[0].querySelector('#' + ("0123456789".indexOf(obj.id[0]) !== -1 ? '\\3' + obj.id[0] + ' ' + obj.id.substr(1).replace($.jstree.idregex,'\\$&') : obj.id.replace($.jstree.idregex,'\\$&')) ); //, this.element); + if(!node) { + deep = true; + //node = d.createElement('LI'); + if(!is_callback) { + par = obj.parent !== $.jstree.root ? $('#' + obj.parent.replace($.jstree.idregex,'\\$&'), this.element)[0] : null; + if(par !== null && (!par || !m[obj.parent].state.opened)) { + return false; + } + ind = $.inArray(obj.id, par === null ? m[$.jstree.root].children : m[obj.parent].children); + } + } + else { + node = $(node); + if(!is_callback) { + par = node.parent().parent()[0]; + if(par === this.element[0]) { + par = null; + } + ind = node.index(); + } + // m[obj.id].data = node.data(); // use only node's data, no need to touch jquery storage + if(!deep && obj.children.length && !node.children('.jstree-children').length) { + deep = true; + } + if(!deep) { + old = node.children('.jstree-children')[0]; + } + f = node.children('.jstree-anchor')[0] === document.activeElement; + node.remove(); + //node = d.createElement('LI'); + //node = node[0]; + } + node = this._data.core.node.cloneNode(true); + // node is DOM, deep is boolean + + c = 'jstree-node '; + for(i in obj.li_attr) { + if(obj.li_attr.hasOwnProperty(i)) { + if(i === 'id') { continue; } + if(i !== 'class') { + node.setAttribute(i, obj.li_attr[i]); + } + else { + c += obj.li_attr[i]; + } + } + } + if(!obj.a_attr.id) { + obj.a_attr.id = obj.id + '_anchor'; + } + node.childNodes[1].setAttribute('aria-selected', !!obj.state.selected); + node.childNodes[1].setAttribute('aria-level', obj.parents.length); + if(this.settings.core.compute_elements_positions) { + node.childNodes[1].setAttribute('aria-setsize', m[obj.parent].children.length); + node.childNodes[1].setAttribute('aria-posinset', m[obj.parent].children.indexOf(obj.id) + 1); + } + if(obj.state.disabled) { + node.childNodes[1].setAttribute('aria-disabled', true); + } + + for(i = 0, j = obj.children.length; i < j; i++) { + if(!m[obj.children[i]].state.hidden) { + has_children = true; + break; + } + } + if(obj.parent !== null && m[obj.parent] && !obj.state.hidden) { + i = $.inArray(obj.id, m[obj.parent].children); + last_sibling = obj.id; + if(i !== -1) { + i++; + for(j = m[obj.parent].children.length; i < j; i++) { + if(!m[m[obj.parent].children[i]].state.hidden) { + last_sibling = m[obj.parent].children[i]; + } + if(last_sibling !== obj.id) { + break; + } + } + } + } + + if(obj.state.hidden) { + c += ' jstree-hidden'; + } + if (obj.state.loading) { + c += ' jstree-loading'; + } + if(obj.state.loaded && !has_children) { + c += ' jstree-leaf'; + } + else { + c += obj.state.opened && obj.state.loaded ? ' jstree-open' : ' jstree-closed'; + node.childNodes[1].setAttribute('aria-expanded', (obj.state.opened && obj.state.loaded) ); + } + if(last_sibling === obj.id) { + c += ' jstree-last'; + } + node.id = obj.id; + node.className = c; + c = ( obj.state.selected ? ' jstree-clicked' : '') + ( obj.state.disabled ? ' jstree-disabled' : ''); + for(j in obj.a_attr) { + if(obj.a_attr.hasOwnProperty(j)) { + if(j === 'href' && obj.a_attr[j] === '#') { continue; } + if(j !== 'class') { + node.childNodes[1].setAttribute(j, obj.a_attr[j]); + } + else { + c += ' ' + obj.a_attr[j]; + } + } + } + if(c.length) { + node.childNodes[1].className = 'jstree-anchor ' + c; + } + if((obj.icon && obj.icon !== true) || obj.icon === false) { + if(obj.icon === false) { + node.childNodes[1].childNodes[0].className += ' jstree-themeicon-hidden'; + } + else if(obj.icon.indexOf('/') === -1 && obj.icon.indexOf('.') === -1) { + node.childNodes[1].childNodes[0].className += ' ' + obj.icon + ' jstree-themeicon-custom'; + } + else { + node.childNodes[1].childNodes[0].style.backgroundImage = 'url("'+obj.icon+'")'; + node.childNodes[1].childNodes[0].style.backgroundPosition = 'center center'; + node.childNodes[1].childNodes[0].style.backgroundSize = 'auto'; + node.childNodes[1].childNodes[0].className += ' jstree-themeicon-custom'; + } + } + + if(this.settings.core.force_text) { + node.childNodes[1].appendChild(d.createTextNode(obj.text)); + } + else { + node.childNodes[1].innerHTML += obj.text; + } + + + if(deep && obj.children.length && (obj.state.opened || force_render) && obj.state.loaded) { + k = d.createElement('UL'); + k.setAttribute('role', 'group'); + k.className = 'jstree-children'; + for(i = 0, j = obj.children.length; i < j; i++) { + k.appendChild(this.redraw_node(obj.children[i], deep, true)); + } + node.appendChild(k); + } + if(old) { + node.appendChild(old); + } + if(!is_callback) { + // append back using par / ind + if(!par) { + par = this.element[0]; + } + for(i = 0, j = par.childNodes.length; i < j; i++) { + if(par.childNodes[i] && par.childNodes[i].className && par.childNodes[i].className.indexOf('jstree-children') !== -1) { + tmp = par.childNodes[i]; + break; + } + } + if(!tmp) { + tmp = d.createElement('UL'); + tmp.setAttribute('role', 'group'); + tmp.className = 'jstree-children'; + par.appendChild(tmp); + } + par = tmp; + + if(ind < par.childNodes.length) { + par.insertBefore(node, par.childNodes[ind]); + } + else { + par.appendChild(node); + } + if(f) { + t = this.element[0].scrollTop; + l = this.element[0].scrollLeft; + node.childNodes[1].focus(); + this.element[0].scrollTop = t; + this.element[0].scrollLeft = l; + } + } + if(obj.state.opened && !obj.state.loaded) { + obj.state.opened = false; + setTimeout(function () { + this.open_node(obj.id, false, 0); + }.bind(this), 0); + } + return node; + }, + /** + * opens a node, revealing its children. If the node is not loaded it will be loaded and opened once ready. + * @name open_node(obj [, callback, animation]) + * @param {mixed} obj the node to open + * @param {Function} callback a function to execute once the node is opened + * @param {Number} animation the animation duration in milliseconds when opening the node (overrides the `core.animation` setting). Use `false` for no animation. + * @trigger open_node.jstree, after_open.jstree, before_open.jstree + */ + open_node : function (obj, callback, animation) { + var t1, t2, d, t; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.open_node(obj[t1], callback, animation); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + animation = animation === undefined ? this.settings.core.animation : animation; + if(!this.is_closed(obj)) { + if(callback) { + callback.call(this, obj, false); + } + return false; + } + if(!this.is_loaded(obj)) { + if(this.is_loading(obj)) { + return setTimeout(function () { + this.open_node(obj, callback, animation); + }.bind(this), 500); + } + this.load_node(obj, function (o, ok) { + return ok ? this.open_node(o, callback, animation) : (callback ? callback.call(this, o, false) : false); + }); + } + else { + d = this.get_node(obj, true); + t = this; + if(d.length) { + if(animation && d.children(".jstree-children").length) { + d.children(".jstree-children").stop(true, true); + } + if(obj.children.length && !this._firstChild(d.children('.jstree-children')[0])) { + this.draw_children(obj); + //d = this.get_node(obj, true); + } + if(!animation) { + this.trigger('before_open', { "node" : obj }); + d[0].className = d[0].className.replace('jstree-closed', 'jstree-open'); + d[0].childNodes[1].setAttribute("aria-expanded", true); + } + else { + this.trigger('before_open', { "node" : obj }); + d + .children(".jstree-children").css("display","none").end() + .removeClass("jstree-closed").addClass("jstree-open") + .children('.jstree-anchor').attr("aria-expanded", true).end() + .children(".jstree-children").stop(true, true) + .slideDown(animation, function () { + this.style.display = ""; + if (t.element) { + t.trigger("after_open", { "node" : obj }); + } + }); + } + } + obj.state.opened = true; + if(callback) { + callback.call(this, obj, true); + } + if(!d.length) { + /** + * triggered when a node is about to be opened (if the node is supposed to be in the DOM, it will be, but it won't be visible yet) + * @event + * @name before_open.jstree + * @param {Object} node the opened node + */ + this.trigger('before_open', { "node" : obj }); + } + /** + * triggered when a node is opened (if there is an animation it will not be completed yet) + * @event + * @name open_node.jstree + * @param {Object} node the opened node + */ + this.trigger('open_node', { "node" : obj }); + if(!animation || !d.length) { + /** + * triggered when a node is opened and the animation is complete + * @event + * @name after_open.jstree + * @param {Object} node the opened node + */ + this.trigger("after_open", { "node" : obj }); + } + return true; + } + }, + /** + * opens every parent of a node (node should be loaded) + * @name _open_to(obj) + * @param {mixed} obj the node to reveal + * @private + */ + _open_to : function (obj) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + var i, j, p = obj.parents; + for(i = 0, j = p.length; i < j; i+=1) { + if(i !== $.jstree.root) { + this.open_node(p[i], false, 0); + } + } + return $('#' + obj.id.replace($.jstree.idregex,'\\$&'), this.element); + }, + /** + * closes a node, hiding its children + * @name close_node(obj [, animation]) + * @param {mixed} obj the node to close + * @param {Number} animation the animation duration in milliseconds when closing the node (overrides the `core.animation` setting). Use `false` for no animation. + * @trigger close_node.jstree, after_close.jstree + */ + close_node : function (obj, animation) { + var t1, t2, t, d; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.close_node(obj[t1], animation); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + if(this.is_closed(obj)) { + return false; + } + animation = animation === undefined ? this.settings.core.animation : animation; + t = this; + d = this.get_node(obj, true); + + obj.state.opened = false; + /** + * triggered when a node is closed (if there is an animation it will not be complete yet) + * @event + * @name close_node.jstree + * @param {Object} node the closed node + */ + this.trigger('close_node',{ "node" : obj }); + if(!d.length) { + /** + * triggered when a node is closed and the animation is complete + * @event + * @name after_close.jstree + * @param {Object} node the closed node + */ + this.trigger("after_close", { "node" : obj }); + } + else { + if(!animation) { + d[0].className = d[0].className.replace('jstree-open', 'jstree-closed'); + d.children('.jstree-anchor').attr("aria-expanded", false); + d.children('.jstree-children').remove(); + this.trigger("after_close", { "node" : obj }); + } + else { + d + .children(".jstree-children").attr("style","display:block !important").end() + .removeClass("jstree-open").addClass("jstree-closed") + .children('.jstree-anchor').attr("aria-expanded", false).end() + .children(".jstree-children").stop(true, true).slideUp(animation, function () { + this.style.display = ""; + d.children('.jstree-children').remove(); + if (t.element) { + t.trigger("after_close", { "node" : obj }); + } + }); + } + } + }, + /** + * toggles a node - closing it if it is open, opening it if it is closed + * @name toggle_node(obj) + * @param {mixed} obj the node to toggle + */ + toggle_node : function (obj) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.toggle_node(obj[t1]); + } + return true; + } + if(this.is_closed(obj)) { + return this.open_node(obj); + } + if(this.is_open(obj)) { + return this.close_node(obj); + } + }, + /** + * opens all nodes within a node (or the tree), revealing their children. If the node is not loaded it will be loaded and opened once ready. + * @name open_all([obj, animation, original_obj]) + * @param {mixed} obj the node to open recursively, omit to open all nodes in the tree + * @param {Number} animation the animation duration in milliseconds when opening the nodes, the default is no animation + * @param {jQuery} reference to the node that started the process (internal use) + * @trigger open_all.jstree + */ + open_all : function (obj, animation, original_obj) { + if(!obj) { obj = $.jstree.root; } + obj = this.get_node(obj); + if(!obj) { return false; } + var dom = obj.id === $.jstree.root ? this.get_container_ul() : this.get_node(obj, true), i, j, _this; + if(!dom.length) { + for(i = 0, j = obj.children_d.length; i < j; i++) { + if(this.is_closed(this._model.data[obj.children_d[i]])) { + this._model.data[obj.children_d[i]].state.opened = true; + } + } + return this.trigger('open_all', { "node" : obj }); + } + original_obj = original_obj || dom; + _this = this; + dom = this.is_closed(obj) ? dom.find('.jstree-closed').addBack() : dom.find('.jstree-closed'); + dom.each(function () { + _this.open_node( + this, + function(node, status) { if(status && this.is_parent(node)) { this.open_all(node, animation, original_obj); } }, + animation || 0 + ); + }); + if(original_obj.find('.jstree-closed').length === 0) { + /** + * triggered when an `open_all` call completes + * @event + * @name open_all.jstree + * @param {Object} node the opened node + */ + this.trigger('open_all', { "node" : this.get_node(original_obj) }); + } + }, + /** + * closes all nodes within a node (or the tree), revealing their children + * @name close_all([obj, animation]) + * @param {mixed} obj the node to close recursively, omit to close all nodes in the tree + * @param {Number} animation the animation duration in milliseconds when closing the nodes, the default is no animation + * @trigger close_all.jstree + */ + close_all : function (obj, animation) { + if(!obj) { obj = $.jstree.root; } + obj = this.get_node(obj); + if(!obj) { return false; } + var dom = obj.id === $.jstree.root ? this.get_container_ul() : this.get_node(obj, true), + _this = this, i, j; + if(dom.length) { + dom = this.is_open(obj) ? dom.find('.jstree-open').addBack() : dom.find('.jstree-open'); + $(dom.get().reverse()).each(function () { _this.close_node(this, animation || 0); }); + } + for(i = 0, j = obj.children_d.length; i < j; i++) { + this._model.data[obj.children_d[i]].state.opened = false; + } + /** + * triggered when an `close_all` call completes + * @event + * @name close_all.jstree + * @param {Object} node the closed node + */ + this.trigger('close_all', { "node" : obj }); + }, + /** + * checks if a node is disabled (not selectable) + * @name is_disabled(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_disabled : function (obj) { + obj = this.get_node(obj); + return obj && obj.state && obj.state.disabled; + }, + /** + * enables a node - so that it can be selected + * @name enable_node(obj) + * @param {mixed} obj the node to enable + * @trigger enable_node.jstree + */ + enable_node : function (obj) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.enable_node(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + obj.state.disabled = false; + this.get_node(obj,true).children('.jstree-anchor').removeClass('jstree-disabled').attr('aria-disabled', false); + /** + * triggered when an node is enabled + * @event + * @name enable_node.jstree + * @param {Object} node the enabled node + */ + this.trigger('enable_node', { 'node' : obj }); + }, + /** + * disables a node - so that it can not be selected + * @name disable_node(obj) + * @param {mixed} obj the node to disable + * @trigger disable_node.jstree + */ + disable_node : function (obj) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.disable_node(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + obj.state.disabled = true; + this.get_node(obj,true).children('.jstree-anchor').addClass('jstree-disabled').attr('aria-disabled', true); + /** + * triggered when an node is disabled + * @event + * @name disable_node.jstree + * @param {Object} node the disabled node + */ + this.trigger('disable_node', { 'node' : obj }); + }, + /** + * determines if a node is hidden + * @name is_hidden(obj) + * @param {mixed} obj the node + */ + is_hidden : function (obj) { + obj = this.get_node(obj); + return obj.state.hidden === true; + }, + /** + * hides a node - it is still in the structure but will not be visible + * @name hide_node(obj) + * @param {mixed} obj the node to hide + * @param {Boolean} skip_redraw internal parameter controlling if redraw is called + * @trigger hide_node.jstree + */ + hide_node : function (obj, skip_redraw) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.hide_node(obj[t1], true); + } + if (!skip_redraw) { + this.redraw(); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + if(!obj.state.hidden) { + obj.state.hidden = true; + this._node_changed(obj.parent); + if(!skip_redraw) { + this.redraw(); + } + /** + * triggered when an node is hidden + * @event + * @name hide_node.jstree + * @param {Object} node the hidden node + */ + this.trigger('hide_node', { 'node' : obj }); + } + }, + /** + * shows a node + * @name show_node(obj) + * @param {mixed} obj the node to show + * @param {Boolean} skip_redraw internal parameter controlling if redraw is called + * @trigger show_node.jstree + */ + show_node : function (obj, skip_redraw) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.show_node(obj[t1], true); + } + if (!skip_redraw) { + this.redraw(); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + if(obj.state.hidden) { + obj.state.hidden = false; + this._node_changed(obj.parent); + if(!skip_redraw) { + this.redraw(); + } + /** + * triggered when an node is shown + * @event + * @name show_node.jstree + * @param {Object} node the shown node + */ + this.trigger('show_node', { 'node' : obj }); + } + }, + /** + * hides all nodes + * @name hide_all() + * @trigger hide_all.jstree + */ + hide_all : function (skip_redraw) { + var i, m = this._model.data, ids = []; + for(i in m) { + if(m.hasOwnProperty(i) && i !== $.jstree.root && !m[i].state.hidden) { + m[i].state.hidden = true; + ids.push(i); + } + } + this._model.force_full_redraw = true; + if(!skip_redraw) { + this.redraw(); + } + /** + * triggered when all nodes are hidden + * @event + * @name hide_all.jstree + * @param {Array} nodes the IDs of all hidden nodes + */ + this.trigger('hide_all', { 'nodes' : ids }); + return ids; + }, + /** + * shows all nodes + * @name show_all() + * @trigger show_all.jstree + */ + show_all : function (skip_redraw) { + var i, m = this._model.data, ids = []; + for(i in m) { + if(m.hasOwnProperty(i) && i !== $.jstree.root && m[i].state.hidden) { + m[i].state.hidden = false; + ids.push(i); + } + } + this._model.force_full_redraw = true; + if(!skip_redraw) { + this.redraw(); + } + /** + * triggered when all nodes are shown + * @event + * @name show_all.jstree + * @param {Array} nodes the IDs of all shown nodes + */ + this.trigger('show_all', { 'nodes' : ids }); + return ids; + }, + /** + * called when a node is selected by the user. Used internally. + * @private + * @name activate_node(obj, e) + * @param {mixed} obj the node + * @param {Object} e the related event + * @trigger activate_node.jstree, changed.jstree + */ + activate_node : function (obj, e) { + if(this.is_disabled(obj)) { + return false; + } + if(!e || typeof e !== 'object') { + e = {}; + } + + // ensure last_clicked is still in the DOM, make it fresh (maybe it was moved?) and make sure it is still selected, if not - make last_clicked the last selected node + this._data.core.last_clicked = this._data.core.last_clicked && this._data.core.last_clicked.id !== undefined ? this.get_node(this._data.core.last_clicked.id) : null; + if(this._data.core.last_clicked && !this._data.core.last_clicked.state.selected) { this._data.core.last_clicked = null; } + if(!this._data.core.last_clicked && this._data.core.selected.length) { this._data.core.last_clicked = this.get_node(this._data.core.selected[this._data.core.selected.length - 1]); } + + if(!this.settings.core.multiple || (!e.metaKey && !e.ctrlKey && !e.shiftKey) || (e.shiftKey && (!this._data.core.last_clicked || !this.get_parent(obj) || this.get_parent(obj) !== this._data.core.last_clicked.parent ) )) { + if(!this.settings.core.multiple && (e.metaKey || e.ctrlKey || e.shiftKey) && this.is_selected(obj)) { + this.deselect_node(obj, false, e); + } + else { + if (this.settings.core.allow_reselect || !this.is_selected(obj) || this._data.core.selected.length !== 1) { + this.deselect_all(true); + this.select_node(obj, false, false, e); + } + this._data.core.last_clicked = this.get_node(obj); + } + } + else { + if(e.shiftKey) { + var o = this.get_node(obj).id, + l = this._data.core.last_clicked.id, + p = this.get_node(this._data.core.last_clicked.parent).children, + c = false, + i, j; + for(i = 0, j = p.length; i < j; i += 1) { + // separate IFs work whem o and l are the same + if(p[i] === o) { + c = !c; + } + if(p[i] === l) { + c = !c; + } + if(!this.is_disabled(p[i]) && (c || p[i] === o || p[i] === l)) { + if (!this.is_hidden(p[i])) { + this.select_node(p[i], true, false, e); + } + } + else { + if (!e.ctrlKey) { + this.deselect_node(p[i], true, e); + } + } + } + this.trigger('changed', { 'action' : 'select_node', 'node' : this.get_node(obj), 'selected' : this._data.core.selected, 'event' : e }); + } + else { + if(!this.is_selected(obj)) { + if (e.ctrlKey) { + this._data.core.last_clicked = this.get_node(obj); + } + this.select_node(obj, false, false, e); + } + else { + this.deselect_node(obj, false, e); + } + } + } + /** + * triggered when an node is clicked or intercated with by the user + * @event + * @name activate_node.jstree + * @param {Object} node + * @param {Object} event the ooriginal event (if any) which triggered the call (may be an empty object) + */ + this.trigger('activate_node', { 'node' : this.get_node(obj), 'event' : e }); + }, + /** + * applies the hover state on a node, called when a node is hovered by the user. Used internally. + * @private + * @name hover_node(obj) + * @param {mixed} obj + * @trigger hover_node.jstree + */ + hover_node : function (obj) { + obj = this.get_node(obj, true); + if(!obj || !obj.length || obj.children('.jstree-hovered').length) { + return false; + } + var o = this.element.find('.jstree-hovered'), t = this.element; + if(o && o.length) { this.dehover_node(o); } + + obj.children('.jstree-anchor').addClass('jstree-hovered'); + /** + * triggered when an node is hovered + * @event + * @name hover_node.jstree + * @param {Object} node + */ + this.trigger('hover_node', { 'node' : this.get_node(obj) }); + setTimeout(function () { t.attr('aria-activedescendant', obj[0].id); }, 0); + }, + /** + * removes the hover state from a nodecalled when a node is no longer hovered by the user. Used internally. + * @private + * @name dehover_node(obj) + * @param {mixed} obj + * @trigger dehover_node.jstree + */ + dehover_node : function (obj) { + obj = this.get_node(obj, true); + if(!obj || !obj.length || !obj.children('.jstree-hovered').length) { + return false; + } + obj.children('.jstree-anchor').removeClass('jstree-hovered'); + /** + * triggered when an node is no longer hovered + * @event + * @name dehover_node.jstree + * @param {Object} node + */ + this.trigger('dehover_node', { 'node' : this.get_node(obj) }); + }, + /** + * select a node + * @name select_node(obj [, supress_event, prevent_open]) + * @param {mixed} obj an array can be used to select multiple nodes + * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered + * @param {Boolean} prevent_open if set to `true` parents of the selected node won't be opened + * @trigger select_node.jstree, changed.jstree + */ + select_node : function (obj, supress_event, prevent_open, e) { + var dom, t1, t2, th; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.select_node(obj[t1], supress_event, prevent_open, e); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(!obj.state.selected) { + obj.state.selected = true; + this._data.core.selected.push(obj.id); + if(!prevent_open) { + dom = this._open_to(obj); + } + if(dom && dom.length) { + dom.children('.jstree-anchor').addClass('jstree-clicked').attr('aria-selected', true); + } + /** + * triggered when an node is selected + * @event + * @name select_node.jstree + * @param {Object} node + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this select_node + */ + this.trigger('select_node', { 'node' : obj, 'selected' : this._data.core.selected, 'event' : e }); + if(!supress_event) { + /** + * triggered when selection changes + * @event + * @name changed.jstree + * @param {Object} node + * @param {Object} action the action that caused the selection to change + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this changed event + */ + this.trigger('changed', { 'action' : 'select_node', 'node' : obj, 'selected' : this._data.core.selected, 'event' : e }); + } + } + }, + /** + * deselect a node + * @name deselect_node(obj [, supress_event]) + * @param {mixed} obj an array can be used to deselect multiple nodes + * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered + * @trigger deselect_node.jstree, changed.jstree + */ + deselect_node : function (obj, supress_event, e) { + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.deselect_node(obj[t1], supress_event, e); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(obj.state.selected) { + obj.state.selected = false; + this._data.core.selected = $.vakata.array_remove_item(this._data.core.selected, obj.id); + if(dom.length) { + dom.children('.jstree-anchor').removeClass('jstree-clicked').attr('aria-selected', false); + } + /** + * triggered when an node is deselected + * @event + * @name deselect_node.jstree + * @param {Object} node + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this deselect_node + */ + this.trigger('deselect_node', { 'node' : obj, 'selected' : this._data.core.selected, 'event' : e }); + if(!supress_event) { + this.trigger('changed', { 'action' : 'deselect_node', 'node' : obj, 'selected' : this._data.core.selected, 'event' : e }); + } + } + }, + /** + * select all nodes in the tree + * @name select_all([supress_event]) + * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered + * @trigger select_all.jstree, changed.jstree + */ + select_all : function (supress_event) { + var tmp = this._data.core.selected.concat([]), i, j; + this._data.core.selected = this._model.data[$.jstree.root].children_d.concat(); + for(i = 0, j = this._data.core.selected.length; i < j; i++) { + if(this._model.data[this._data.core.selected[i]]) { + this._model.data[this._data.core.selected[i]].state.selected = true; + } + } + this.redraw(true); + /** + * triggered when all nodes are selected + * @event + * @name select_all.jstree + * @param {Array} selected the current selection + */ + this.trigger('select_all', { 'selected' : this._data.core.selected }); + if(!supress_event) { + this.trigger('changed', { 'action' : 'select_all', 'selected' : this._data.core.selected, 'old_selection' : tmp }); + } + }, + /** + * deselect all selected nodes + * @name deselect_all([supress_event]) + * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered + * @trigger deselect_all.jstree, changed.jstree + */ + deselect_all : function (supress_event) { + var tmp = this._data.core.selected.concat([]), i, j; + for(i = 0, j = this._data.core.selected.length; i < j; i++) { + if(this._model.data[this._data.core.selected[i]]) { + this._model.data[this._data.core.selected[i]].state.selected = false; + } + } + this._data.core.selected = []; + this.element.find('.jstree-clicked').removeClass('jstree-clicked').attr('aria-selected', false); + /** + * triggered when all nodes are deselected + * @event + * @name deselect_all.jstree + * @param {Object} node the previous selection + * @param {Array} selected the current selection + */ + this.trigger('deselect_all', { 'selected' : this._data.core.selected, 'node' : tmp }); + if(!supress_event) { + this.trigger('changed', { 'action' : 'deselect_all', 'selected' : this._data.core.selected, 'old_selection' : tmp }); + } + }, + /** + * checks if a node is selected + * @name is_selected(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_selected : function (obj) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + return obj.state.selected; + }, + /** + * get an array of all selected nodes + * @name get_selected([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + */ + get_selected : function (full) { + return full ? $.map(this._data.core.selected, function (i) { return this.get_node(i); }.bind(this)) : this._data.core.selected.slice(); + }, + /** + * get an array of all top level selected nodes (ignoring children of selected nodes) + * @name get_top_selected([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + */ + get_top_selected : function (full) { + var tmp = this.get_selected(true), + obj = {}, i, j, k, l; + for(i = 0, j = tmp.length; i < j; i++) { + obj[tmp[i].id] = tmp[i]; + } + for(i = 0, j = tmp.length; i < j; i++) { + for(k = 0, l = tmp[i].children_d.length; k < l; k++) { + if(obj[tmp[i].children_d[k]]) { + delete obj[tmp[i].children_d[k]]; + } + } + } + tmp = []; + for(i in obj) { + if(obj.hasOwnProperty(i)) { + tmp.push(i); + } + } + return full ? $.map(tmp, function (i) { return this.get_node(i); }.bind(this)) : tmp; + }, + /** + * get an array of all bottom level selected nodes (ignoring selected parents) + * @name get_bottom_selected([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + */ + get_bottom_selected : function (full) { + var tmp = this.get_selected(true), + obj = [], i, j; + for(i = 0, j = tmp.length; i < j; i++) { + if(!tmp[i].children.length) { + obj.push(tmp[i].id); + } + } + return full ? $.map(obj, function (i) { return this.get_node(i); }.bind(this)) : obj; + }, + /** + * gets the current state of the tree so that it can be restored later with `set_state(state)`. Used internally. + * @name get_state() + * @private + * @return {Object} + */ + get_state : function () { + var state = { + 'core' : { + 'open' : [], + 'loaded' : [], + 'scroll' : { + 'left' : this.element.scrollLeft(), + 'top' : this.element.scrollTop() + }, + /*! + 'themes' : { + 'name' : this.get_theme(), + 'icons' : this._data.core.themes.icons, + 'dots' : this._data.core.themes.dots + }, + */ + 'selected' : [] + } + }, i; + for(i in this._model.data) { + if(this._model.data.hasOwnProperty(i)) { + if(i !== $.jstree.root) { + if(this._model.data[i].state.loaded && this.settings.core.loaded_state) { + state.core.loaded.push(i); + } + if(this._model.data[i].state.opened) { + state.core.open.push(i); + } + if(this._model.data[i].state.selected) { + state.core.selected.push(i); + } + } + } + } + return state; + }, + /** + * sets the state of the tree. Used internally. + * @name set_state(state [, callback]) + * @private + * @param {Object} state the state to restore. Keep in mind this object is passed by reference and jstree will modify it. + * @param {Function} callback an optional function to execute once the state is restored. + * @trigger set_state.jstree + */ + set_state : function (state, callback) { + if(state) { + if(state.core && state.core.selected && state.core.initial_selection === undefined) { + state.core.initial_selection = this._data.core.selected.concat([]).sort().join(','); + } + if(state.core) { + var res, n, t, _this, i; + if(state.core.loaded) { + if(!this.settings.core.loaded_state || !$.vakata.is_array(state.core.loaded) || !state.core.loaded.length) { + delete state.core.loaded; + this.set_state(state, callback); + } + else { + this._load_nodes(state.core.loaded, function (nodes) { + delete state.core.loaded; + this.set_state(state, callback); + }); + } + return false; + } + if(state.core.open) { + if(!$.vakata.is_array(state.core.open) || !state.core.open.length) { + delete state.core.open; + this.set_state(state, callback); + } + else { + this._load_nodes(state.core.open, function (nodes) { + this.open_node(nodes, false, 0); + delete state.core.open; + this.set_state(state, callback); + }); + } + return false; + } + if(state.core.scroll) { + if(state.core.scroll && state.core.scroll.left !== undefined) { + this.element.scrollLeft(state.core.scroll.left); + } + if(state.core.scroll && state.core.scroll.top !== undefined) { + this.element.scrollTop(state.core.scroll.top); + } + delete state.core.scroll; + this.set_state(state, callback); + return false; + } + if(state.core.selected) { + _this = this; + if (state.core.initial_selection === undefined || + state.core.initial_selection === this._data.core.selected.concat([]).sort().join(',') + ) { + this.deselect_all(); + $.each(state.core.selected, function (i, v) { + _this.select_node(v, false, true); + }); + } + delete state.core.initial_selection; + delete state.core.selected; + this.set_state(state, callback); + return false; + } + for(i in state) { + if(state.hasOwnProperty(i) && i !== "core" && $.inArray(i, this.settings.plugins) === -1) { + delete state[i]; + } + } + if($.isEmptyObject(state.core)) { + delete state.core; + this.set_state(state, callback); + return false; + } + } + if($.isEmptyObject(state)) { + state = null; + if(callback) { callback.call(this); } + /** + * triggered when a `set_state` call completes + * @event + * @name set_state.jstree + */ + this.trigger('set_state'); + return false; + } + return true; + } + return false; + }, + /** + * refreshes the tree - all nodes are reloaded with calls to `load_node`. + * @name refresh() + * @param {Boolean} skip_loading an option to skip showing the loading indicator + * @param {Mixed} forget_state if set to `true` state will not be reapplied, if set to a function (receiving the current state as argument) the result of that function will be used as state + * @trigger refresh.jstree + */ + refresh : function (skip_loading, forget_state) { + this._data.core.state = forget_state === true ? {} : this.get_state(); + if(forget_state && $.vakata.is_function(forget_state)) { this._data.core.state = forget_state.call(this, this._data.core.state); } + this._cnt = 0; + this._model.data = {}; + this._model.data[$.jstree.root] = { + id : $.jstree.root, + parent : null, + parents : [], + children : [], + children_d : [], + state : { loaded : false } + }; + this._data.core.selected = []; + this._data.core.last_clicked = null; + this._data.core.focused = null; + + var c = this.get_container_ul()[0].className; + if(!skip_loading) { + this.element.html("<"+"ul class='"+c+"' role='group'><"+"li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none' id='j"+this._id+"_loading'><"+"a class='jstree-anchor' role='treeitem' href='#'>" + this.get_string("Loading ...") + ""); + this.element.attr('aria-activedescendant','j'+this._id+'_loading'); + } + this.load_node($.jstree.root, function (o, s) { + if(s) { + this.get_container_ul()[0].className = c; + if(this._firstChild(this.get_container_ul()[0])) { + this.element.attr('aria-activedescendant',this._firstChild(this.get_container_ul()[0]).id); + } + this.set_state($.extend(true, {}, this._data.core.state), function () { + /** + * triggered when a `refresh` call completes + * @event + * @name refresh.jstree + */ + this.trigger('refresh'); + }); + } + this._data.core.state = null; + }); + }, + /** + * refreshes a node in the tree (reload its children) all opened nodes inside that node are reloaded with calls to `load_node`. + * @name refresh_node(obj) + * @param {mixed} obj the node + * @trigger refresh_node.jstree + */ + refresh_node : function (obj) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + var opened = [], to_load = [], s = this._data.core.selected.concat([]); + to_load.push(obj.id); + if(obj.state.opened === true) { opened.push(obj.id); } + this.get_node(obj, true).find('.jstree-open').each(function() { to_load.push(this.id); opened.push(this.id); }); + this._load_nodes(to_load, function (nodes) { + this.open_node(opened, false, 0); + this.select_node(s); + /** + * triggered when a node is refreshed + * @event + * @name refresh_node.jstree + * @param {Object} node - the refreshed node + * @param {Array} nodes - an array of the IDs of the nodes that were reloaded + */ + this.trigger('refresh_node', { 'node' : obj, 'nodes' : nodes }); + }.bind(this), false, true); + }, + /** + * set (change) the ID of a node + * @name set_id(obj, id) + * @param {mixed} obj the node + * @param {String} id the new ID + * @return {Boolean} + * @trigger set_id.jstree + */ + set_id : function (obj, id) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + var i, j, m = this._model.data, old = obj.id; + id = id.toString(); + // update parents (replace current ID with new one in children and children_d) + m[obj.parent].children[$.inArray(obj.id, m[obj.parent].children)] = id; + for(i = 0, j = obj.parents.length; i < j; i++) { + m[obj.parents[i]].children_d[$.inArray(obj.id, m[obj.parents[i]].children_d)] = id; + } + // update children (replace current ID with new one in parent and parents) + for(i = 0, j = obj.children.length; i < j; i++) { + m[obj.children[i]].parent = id; + } + for(i = 0, j = obj.children_d.length; i < j; i++) { + m[obj.children_d[i]].parents[$.inArray(obj.id, m[obj.children_d[i]].parents)] = id; + } + i = $.inArray(obj.id, this._data.core.selected); + if(i !== -1) { this._data.core.selected[i] = id; } + // update model and obj itself (obj.id, this._model.data[KEY]) + i = this.get_node(obj.id, true); + if(i) { + i.attr('id', id); //.children('.jstree-anchor').attr('id', id + '_anchor').end().attr('aria-labelledby', id + '_anchor'); + if(this.element.attr('aria-activedescendant') === obj.id) { + this.element.attr('aria-activedescendant', id); + } + } + delete m[obj.id]; + obj.id = id; + obj.li_attr.id = id; + m[id] = obj; + /** + * triggered when a node id value is changed + * @event + * @name set_id.jstree + * @param {Object} node + * @param {String} old the old id + */ + this.trigger('set_id',{ "node" : obj, "new" : obj.id, "old" : old }); + return true; + }, + /** + * get the text value of a node + * @name get_text(obj) + * @param {mixed} obj the node + * @return {String} + */ + get_text : function (obj) { + obj = this.get_node(obj); + return (!obj || obj.id === $.jstree.root) ? false : obj.text; + }, + /** + * set the text value of a node. Used internally, please use `rename_node(obj, val)`. + * @private + * @name set_text(obj, val) + * @param {mixed} obj the node, you can pass an array to set the text on multiple nodes + * @param {String} val the new text value + * @return {Boolean} + * @trigger set_text.jstree + */ + set_text : function (obj, val) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.set_text(obj[t1], val); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + obj.text = val; + if(this.get_node(obj, true).length) { + this.redraw_node(obj.id); + } + /** + * triggered when a node text value is changed + * @event + * @name set_text.jstree + * @param {Object} obj + * @param {String} text the new value + */ + this.trigger('set_text',{ "obj" : obj, "text" : val }); + return true; + }, + /** + * gets a JSON representation of a node (or the whole tree) + * @name get_json([obj, options]) + * @param {mixed} obj + * @param {Object} options + * @param {Boolean} options.no_state do not return state information + * @param {Boolean} options.no_id do not return ID + * @param {Boolean} options.no_children do not include children + * @param {Boolean} options.no_data do not include node data + * @param {Boolean} options.no_li_attr do not include LI attributes + * @param {Boolean} options.no_a_attr do not include A attributes + * @param {Boolean} options.flat return flat JSON instead of nested + * @return {Object} + */ + get_json : function (obj, options, flat) { + obj = this.get_node(obj || $.jstree.root); + if(!obj) { return false; } + if(options && options.flat && !flat) { flat = []; } + var tmp = { + 'id' : obj.id, + 'text' : obj.text, + 'icon' : this.get_icon(obj), + 'li_attr' : $.extend(true, {}, obj.li_attr), + 'a_attr' : $.extend(true, {}, obj.a_attr), + 'state' : {}, + 'data' : options && options.no_data ? false : $.extend(true, $.vakata.is_array(obj.data)?[]:{}, obj.data) + //( this.get_node(obj, true).length ? this.get_node(obj, true).data() : obj.data ), + }, i, j; + if(options && options.flat) { + tmp.parent = obj.parent; + } + else { + tmp.children = []; + } + if(!options || !options.no_state) { + for(i in obj.state) { + if(obj.state.hasOwnProperty(i)) { + tmp.state[i] = obj.state[i]; + } + } + } else { + delete tmp.state; + } + if(options && options.no_li_attr) { + delete tmp.li_attr; + } + if(options && options.no_a_attr) { + delete tmp.a_attr; + } + if(options && options.no_id) { + delete tmp.id; + if(tmp.li_attr && tmp.li_attr.id) { + delete tmp.li_attr.id; + } + if(tmp.a_attr && tmp.a_attr.id) { + delete tmp.a_attr.id; + } + } + if(options && options.flat && obj.id !== $.jstree.root) { + flat.push(tmp); + } + if(!options || !options.no_children) { + for(i = 0, j = obj.children.length; i < j; i++) { + if(options && options.flat) { + this.get_json(obj.children[i], options, flat); + } + else { + tmp.children.push(this.get_json(obj.children[i], options)); + } + } + } + return options && options.flat ? flat : (obj.id === $.jstree.root ? tmp.children : tmp); + }, + /** + * create a new node (do not confuse with load_node) + * @name create_node([par, node, pos, callback, is_loaded]) + * @param {mixed} par the parent node (to create a root node use either "#" (string) or `null`) + * @param {mixed} node the data for the new node (a valid JSON object, or a simple string with the name) + * @param {mixed} pos the index at which to insert the node, "first" and "last" are also supported, default is "last" + * @param {Function} callback a function to be called once the node is created + * @param {Boolean} is_loaded internal argument indicating if the parent node was succesfully loaded + * @return {String} the ID of the newly create node + * @trigger model.jstree, create_node.jstree + */ + create_node : function (par, node, pos, callback, is_loaded) { + if(par === null) { par = $.jstree.root; } + par = this.get_node(par); + if(!par) { return false; } + pos = pos === undefined ? "last" : pos; + if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) { + return this.load_node(par, function () { this.create_node(par, node, pos, callback, true); }); + } + if(!node) { node = { "text" : this.get_string('New node') }; } + if(typeof node === "string") { + node = { "text" : node }; + } else { + node = $.extend(true, {}, node); + } + if(node.text === undefined) { node.text = this.get_string('New node'); } + var tmp, dpc, i, j; + + if(par.id === $.jstree.root) { + if(pos === "before") { pos = "first"; } + if(pos === "after") { pos = "last"; } + } + switch(pos) { + case "before": + tmp = this.get_node(par.parent); + pos = $.inArray(par.id, tmp.children); + par = tmp; + break; + case "after" : + tmp = this.get_node(par.parent); + pos = $.inArray(par.id, tmp.children) + 1; + par = tmp; + break; + case "inside": + case "first": + pos = 0; + break; + case "last": + pos = par.children.length; + break; + default: + if(!pos) { pos = 0; } + break; + } + if(pos > par.children.length) { pos = par.children.length; } + if(node.id === undefined) { node.id = true; } + if(!this.check("create_node", node, par, pos)) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + if(node.id === true) { delete node.id; } + node = this._parse_model_from_json(node, par.id, par.parents.concat()); + if(!node) { return false; } + tmp = this.get_node(node); + dpc = []; + dpc.push(node); + dpc = dpc.concat(tmp.children_d); + this.trigger('model', { "nodes" : dpc, "parent" : par.id }); + + par.children_d = par.children_d.concat(dpc); + for(i = 0, j = par.parents.length; i < j; i++) { + this._model.data[par.parents[i]].children_d = this._model.data[par.parents[i]].children_d.concat(dpc); + } + node = tmp; + tmp = []; + for(i = 0, j = par.children.length; i < j; i++) { + tmp[i >= pos ? i+1 : i] = par.children[i]; + } + tmp[pos] = node.id; + par.children = tmp; + + this.redraw_node(par, true); + /** + * triggered when a node is created + * @event + * @name create_node.jstree + * @param {Object} node + * @param {String} parent the parent's ID + * @param {Number} position the position of the new node among the parent's children + */ + this.trigger('create_node', { "node" : this.get_node(node), "parent" : par.id, "position" : pos }); + if(callback) { callback.call(this, this.get_node(node)); } + return node.id; + }, + /** + * set the text value of a node + * @name rename_node(obj, val) + * @param {mixed} obj the node, you can pass an array to rename multiple nodes to the same name + * @param {String} val the new text value + * @return {Boolean} + * @trigger rename_node.jstree + */ + rename_node : function (obj, val) { + var t1, t2, old; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.rename_node(obj[t1], val); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + old = obj.text; + if(!this.check("rename_node", obj, this.get_parent(obj), val)) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + this.set_text(obj, val); // .apply(this, Array.prototype.slice.call(arguments)) + /** + * triggered when a node is renamed + * @event + * @name rename_node.jstree + * @param {Object} node + * @param {String} text the new value + * @param {String} old the old value + */ + this.trigger('rename_node', { "node" : obj, "text" : val, "old" : old }); + return true; + }, + /** + * remove a node + * @name delete_node(obj) + * @param {mixed} obj the node, you can pass an array to delete multiple nodes + * @return {Boolean} + * @trigger delete_node.jstree, changed.jstree + */ + delete_node : function (obj) { + var t1, t2, par, pos, tmp, i, j, k, l, c, top, lft; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.delete_node(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + par = this.get_node(obj.parent); + pos = $.inArray(obj.id, par.children); + c = false; + if(!this.check("delete_node", obj, par, pos)) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + if(pos !== -1) { + par.children = $.vakata.array_remove(par.children, pos); + } + tmp = obj.children_d.concat([]); + tmp.push(obj.id); + for(i = 0, j = obj.parents.length; i < j; i++) { + this._model.data[obj.parents[i]].children_d = $.vakata.array_filter(this._model.data[obj.parents[i]].children_d, function (v) { + return $.inArray(v, tmp) === -1; + }); + } + for(k = 0, l = tmp.length; k < l; k++) { + if(this._model.data[tmp[k]].state.selected) { + c = true; + break; + } + } + if (c) { + this._data.core.selected = $.vakata.array_filter(this._data.core.selected, function (v) { + return $.inArray(v, tmp) === -1; + }); + } + /** + * triggered when a node is deleted + * @event + * @name delete_node.jstree + * @param {Object} node + * @param {String} parent the parent's ID + */ + this.trigger('delete_node', { "node" : obj, "parent" : par.id }); + if(c) { + this.trigger('changed', { 'action' : 'delete_node', 'node' : obj, 'selected' : this._data.core.selected, 'parent' : par.id }); + } + for(k = 0, l = tmp.length; k < l; k++) { + delete this._model.data[tmp[k]]; + } + if($.inArray(this._data.core.focused, tmp) !== -1) { + this._data.core.focused = null; + top = this.element[0].scrollTop; + lft = this.element[0].scrollLeft; + if(par.id === $.jstree.root) { + if (this._model.data[$.jstree.root].children[0]) { + this.get_node(this._model.data[$.jstree.root].children[0], true).children('.jstree-anchor').trigger('focus'); + } + } + else { + this.get_node(par, true).children('.jstree-anchor').trigger('focus'); + } + this.element[0].scrollTop = top; + this.element[0].scrollLeft = lft; + } + this.redraw_node(par, true); + return true; + }, + /** + * check if an operation is premitted on the tree. Used internally. + * @private + * @name check(chk, obj, par, pos) + * @param {String} chk the operation to check, can be "create_node", "rename_node", "delete_node", "copy_node" or "move_node" + * @param {mixed} obj the node + * @param {mixed} par the parent + * @param {mixed} pos the position to insert at, or if "rename_node" - the new name + * @param {mixed} more some various additional information, for example if a "move_node" operations is triggered by DND this will be the hovered node + * @return {Boolean} + */ + check : function (chk, obj, par, pos, more) { + obj = obj && obj.id ? obj : this.get_node(obj); + par = par && par.id ? par : this.get_node(par); + var tmp = chk.match(/^(move_node|copy_node|create_node)$/i) ? par : obj, + chc = this.settings.core.check_callback; + if(chk === "move_node" || chk === "copy_node") { + if((!more || !more.is_multi) && (chk === "move_node" && $.inArray(obj.id, par.children) === pos)) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_08', 'reason' : 'Moving node to its current position', 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + return false; + } + if((!more || !more.is_multi) && (obj.id === par.id || (chk === "move_node" && $.inArray(obj.id, par.children) === pos) || $.inArray(par.id, obj.children_d) !== -1)) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_01', 'reason' : 'Moving parent inside child', 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + return false; + } + } + if(tmp && tmp.data) { tmp = tmp.data; } + if(tmp && tmp.functions && (tmp.functions[chk] === false || tmp.functions[chk] === true)) { + if(tmp.functions[chk] === false) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_02', 'reason' : 'Node data prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + } + return tmp.functions[chk]; + } + if(chc === false || ($.vakata.is_function(chc) && chc.call(this, chk, obj, par, pos, more) === false) || (chc && chc[chk] === false)) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_03', 'reason' : 'User config for core.check_callback prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + return false; + } + return true; + }, + /** + * get the last error + * @name last_error() + * @return {Object} + */ + last_error : function () { + return this._data.core.last_error; + }, + /** + * move a node to a new parent + * @name move_node(obj, par [, pos, callback, is_loaded]) + * @param {mixed} obj the node to move, pass an array to move multiple nodes + * @param {mixed} par the new parent + * @param {mixed} pos the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer `0` + * @param {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position + * @param {Boolean} is_loaded internal parameter indicating if the parent node has been loaded + * @param {Boolean} skip_redraw internal parameter indicating if the tree should be redrawn + * @param {Boolean} instance internal parameter indicating if the node comes from another instance + * @trigger move_node.jstree + */ + move_node : function (obj, par, pos, callback, is_loaded, skip_redraw, origin) { + var t1, t2, old_par, old_pos, new_par, old_ins, is_multi, dpc, tmp, i, j, k, l, p; + + par = this.get_node(par); + pos = pos === undefined ? 0 : pos; + if(!par) { return false; } + if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) { + return this.load_node(par, function () { this.move_node(obj, par, pos, callback, true, false, origin); }); + } + + if($.vakata.is_array(obj)) { + if(obj.length === 1) { + obj = obj[0]; + } + else { + //obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + if((tmp = this.move_node(obj[t1], par, pos, callback, is_loaded, false, origin))) { + par = tmp; + pos = "after"; + } + } + this.redraw(); + return true; + } + } + obj = obj && (obj.id !== undefined) ? obj : this.get_node(obj); + + if(!obj || obj.id === $.jstree.root) { return false; } + + old_par = (obj.parent || $.jstree.root).toString(); + new_par = (!pos.toString().match(/^(before|after)$/) || par.id === $.jstree.root) ? par : this.get_node(par.parent); + old_ins = origin ? origin : (this._model.data[obj.id] ? this : $.jstree.reference(obj.id)); + is_multi = !old_ins || !old_ins._id || (this._id !== old_ins._id); + old_pos = old_ins && old_ins._id && old_par && old_ins._model.data[old_par] && old_ins._model.data[old_par].children ? $.inArray(obj.id, old_ins._model.data[old_par].children) : -1; + if(old_ins && old_ins._id) { + obj = old_ins._model.data[obj.id]; + } + + if(is_multi) { + if((tmp = this.copy_node(obj, par, pos, callback, is_loaded, false, origin))) { + if(old_ins) { old_ins.delete_node(obj); } + return tmp; + } + return false; + } + //var m = this._model.data; + if(par.id === $.jstree.root) { + if(pos === "before") { pos = "first"; } + if(pos === "after") { pos = "last"; } + } + switch(pos) { + case "before": + pos = $.inArray(par.id, new_par.children); + break; + case "after" : + pos = $.inArray(par.id, new_par.children) + 1; + break; + case "inside": + case "first": + pos = 0; + break; + case "last": + pos = new_par.children.length; + break; + default: + if(!pos) { pos = 0; } + break; + } + if(pos > new_par.children.length) { pos = new_par.children.length; } + if(!this.check("move_node", obj, new_par, pos, { 'core' : true, 'origin' : origin, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id) })) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + if(obj.parent === new_par.id) { + dpc = new_par.children.concat(); + tmp = $.inArray(obj.id, dpc); + if(tmp !== -1) { + dpc = $.vakata.array_remove(dpc, tmp); + if(pos > tmp) { pos--; } + } + tmp = []; + for(i = 0, j = dpc.length; i < j; i++) { + tmp[i >= pos ? i+1 : i] = dpc[i]; + } + tmp[pos] = obj.id; + new_par.children = tmp; + this._node_changed(new_par.id); + this.redraw(new_par.id === $.jstree.root); + } + else { + // clean old parent and up + tmp = obj.children_d.concat(); + tmp.push(obj.id); + for(i = 0, j = obj.parents.length; i < j; i++) { + dpc = []; + p = old_ins._model.data[obj.parents[i]].children_d; + for(k = 0, l = p.length; k < l; k++) { + if($.inArray(p[k], tmp) === -1) { + dpc.push(p[k]); + } + } + old_ins._model.data[obj.parents[i]].children_d = dpc; + } + old_ins._model.data[old_par].children = $.vakata.array_remove_item(old_ins._model.data[old_par].children, obj.id); + + // insert into new parent and up + for(i = 0, j = new_par.parents.length; i < j; i++) { + this._model.data[new_par.parents[i]].children_d = this._model.data[new_par.parents[i]].children_d.concat(tmp); + } + dpc = []; + for(i = 0, j = new_par.children.length; i < j; i++) { + dpc[i >= pos ? i+1 : i] = new_par.children[i]; + } + dpc[pos] = obj.id; + new_par.children = dpc; + new_par.children_d.push(obj.id); + new_par.children_d = new_par.children_d.concat(obj.children_d); + + // update object + obj.parent = new_par.id; + tmp = new_par.parents.concat(); + tmp.unshift(new_par.id); + p = obj.parents.length; + obj.parents = tmp; + + // update object children + tmp = tmp.concat(); + for(i = 0, j = obj.children_d.length; i < j; i++) { + this._model.data[obj.children_d[i]].parents = this._model.data[obj.children_d[i]].parents.slice(0,p*-1); + Array.prototype.push.apply(this._model.data[obj.children_d[i]].parents, tmp); + } + + if(old_par === $.jstree.root || new_par.id === $.jstree.root) { + this._model.force_full_redraw = true; + } + if(!this._model.force_full_redraw) { + this._node_changed(old_par); + this._node_changed(new_par.id); + } + if(!skip_redraw) { + this.redraw(); + } + } + if(callback) { callback.call(this, obj, new_par, pos); } + /** + * triggered when a node is moved + * @event + * @name move_node.jstree + * @param {Object} node + * @param {String} parent the parent's ID + * @param {Number} position the position of the node among the parent's children + * @param {String} old_parent the old parent of the node + * @param {Number} old_position the old position of the node + * @param {Boolean} is_multi do the node and new parent belong to different instances + * @param {jsTree} old_instance the instance the node came from + * @param {jsTree} new_instance the instance of the new parent + */ + this.trigger('move_node', { "node" : obj, "parent" : new_par.id, "position" : pos, "old_parent" : old_par, "old_position" : old_pos, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id), 'old_instance' : old_ins, 'new_instance' : this }); + return obj.id; + }, + /** + * copy a node to a new parent + * @name copy_node(obj, par [, pos, callback, is_loaded]) + * @param {mixed} obj the node to copy, pass an array to copy multiple nodes + * @param {mixed} par the new parent + * @param {mixed} pos the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer `0` + * @param {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position + * @param {Boolean} is_loaded internal parameter indicating if the parent node has been loaded + * @param {Boolean} skip_redraw internal parameter indicating if the tree should be redrawn + * @param {Boolean} instance internal parameter indicating if the node comes from another instance + * @trigger model.jstree copy_node.jstree + */ + copy_node : function (obj, par, pos, callback, is_loaded, skip_redraw, origin) { + var t1, t2, dpc, tmp, i, j, node, old_par, new_par, old_ins, is_multi; + + par = this.get_node(par); + pos = pos === undefined ? 0 : pos; + if(!par) { return false; } + if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) { + return this.load_node(par, function () { this.copy_node(obj, par, pos, callback, true, false, origin); }); + } + + if($.vakata.is_array(obj)) { + if(obj.length === 1) { + obj = obj[0]; + } + else { + //obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + if((tmp = this.copy_node(obj[t1], par, pos, callback, is_loaded, true, origin))) { + par = tmp; + pos = "after"; + } + } + this.redraw(); + return true; + } + } + obj = obj && (obj.id !== undefined) ? obj : this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + + old_par = (obj.parent || $.jstree.root).toString(); + new_par = (!pos.toString().match(/^(before|after)$/) || par.id === $.jstree.root) ? par : this.get_node(par.parent); + old_ins = origin ? origin : (this._model.data[obj.id] ? this : $.jstree.reference(obj.id)); + is_multi = !old_ins || !old_ins._id || (this._id !== old_ins._id); + + if(old_ins && old_ins._id) { + obj = old_ins._model.data[obj.id]; + } + + if(par.id === $.jstree.root) { + if(pos === "before") { pos = "first"; } + if(pos === "after") { pos = "last"; } + } + switch(pos) { + case "before": + pos = $.inArray(par.id, new_par.children); + break; + case "after" : + pos = $.inArray(par.id, new_par.children) + 1; + break; + case "inside": + case "first": + pos = 0; + break; + case "last": + pos = new_par.children.length; + break; + default: + if(!pos) { pos = 0; } + break; + } + if(pos > new_par.children.length) { pos = new_par.children.length; } + if(!this.check("copy_node", obj, new_par, pos, { 'core' : true, 'origin' : origin, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id) })) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + node = old_ins ? old_ins.get_json(obj, { no_id : true, no_data : true, no_state : true }) : obj; + if(!node) { return false; } + if(node.id === true) { delete node.id; } + node = this._parse_model_from_json(node, new_par.id, new_par.parents.concat()); + if(!node) { return false; } + tmp = this.get_node(node); + if(obj && obj.state && obj.state.loaded === false) { tmp.state.loaded = false; } + dpc = []; + dpc.push(node); + dpc = dpc.concat(tmp.children_d); + this.trigger('model', { "nodes" : dpc, "parent" : new_par.id }); + + // insert into new parent and up + for(i = 0, j = new_par.parents.length; i < j; i++) { + this._model.data[new_par.parents[i]].children_d = this._model.data[new_par.parents[i]].children_d.concat(dpc); + } + dpc = []; + for(i = 0, j = new_par.children.length; i < j; i++) { + dpc[i >= pos ? i+1 : i] = new_par.children[i]; + } + dpc[pos] = tmp.id; + new_par.children = dpc; + new_par.children_d.push(tmp.id); + new_par.children_d = new_par.children_d.concat(tmp.children_d); + + if(new_par.id === $.jstree.root) { + this._model.force_full_redraw = true; + } + if(!this._model.force_full_redraw) { + this._node_changed(new_par.id); + } + if(!skip_redraw) { + this.redraw(new_par.id === $.jstree.root); + } + if(callback) { callback.call(this, tmp, new_par, pos); } + /** + * triggered when a node is copied + * @event + * @name copy_node.jstree + * @param {Object} node the copied node + * @param {Object} original the original node + * @param {String} parent the parent's ID + * @param {Number} position the position of the node among the parent's children + * @param {String} old_parent the old parent of the node + * @param {Number} old_position the position of the original node + * @param {Boolean} is_multi do the node and new parent belong to different instances + * @param {jsTree} old_instance the instance the node came from + * @param {jsTree} new_instance the instance of the new parent + */ + this.trigger('copy_node', { "node" : tmp, "original" : obj, "parent" : new_par.id, "position" : pos, "old_parent" : old_par, "old_position" : old_ins && old_ins._id && old_par && old_ins._model.data[old_par] && old_ins._model.data[old_par].children ? $.inArray(obj.id, old_ins._model.data[old_par].children) : -1,'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id), 'old_instance' : old_ins, 'new_instance' : this }); + return tmp.id; + }, + /** + * cut a node (a later call to `paste(obj)` would move the node) + * @name cut(obj) + * @param {mixed} obj multiple objects can be passed using an array + * @trigger cut.jstree + */ + cut : function (obj) { + if(!obj) { obj = this._data.core.selected.concat(); } + if(!$.vakata.is_array(obj)) { obj = [obj]; } + if(!obj.length) { return false; } + var tmp = [], o, t1, t2; + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + o = this.get_node(obj[t1]); + if(o && (o.id || o.id === 0) && o.id !== $.jstree.root) { tmp.push(o); } + } + if(!tmp.length) { return false; } + ccp_node = tmp; + ccp_inst = this; + ccp_mode = 'move_node'; + /** + * triggered when nodes are added to the buffer for moving + * @event + * @name cut.jstree + * @param {Array} node + */ + this.trigger('cut', { "node" : obj }); + }, + /** + * copy a node (a later call to `paste(obj)` would copy the node) + * @name copy(obj) + * @param {mixed} obj multiple objects can be passed using an array + * @trigger copy.jstree + */ + copy : function (obj) { + if(!obj) { obj = this._data.core.selected.concat(); } + if(!$.vakata.is_array(obj)) { obj = [obj]; } + if(!obj.length) { return false; } + var tmp = [], o, t1, t2; + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + o = this.get_node(obj[t1]); + if(o && (o.id !== undefined) && o.id !== $.jstree.root) { tmp.push(o); } + } + if(!tmp.length) { return false; } + ccp_node = tmp; + ccp_inst = this; + ccp_mode = 'copy_node'; + /** + * triggered when nodes are added to the buffer for copying + * @event + * @name copy.jstree + * @param {Array} node + */ + this.trigger('copy', { "node" : obj }); + }, + /** + * get the current buffer (any nodes that are waiting for a paste operation) + * @name get_buffer() + * @return {Object} an object consisting of `mode` ("copy_node" or "move_node"), `node` (an array of objects) and `inst` (the instance) + */ + get_buffer : function () { + return { 'mode' : ccp_mode, 'node' : ccp_node, 'inst' : ccp_inst }; + }, + /** + * check if there is something in the buffer to paste + * @name can_paste() + * @return {Boolean} + */ + can_paste : function () { + return ccp_mode !== false && ccp_node !== false; // && ccp_inst._model.data[ccp_node]; + }, + /** + * copy or move the previously cut or copied nodes to a new parent + * @name paste(obj [, pos]) + * @param {mixed} obj the new parent + * @param {mixed} pos the position to insert at (besides integer, "first" and "last" are supported), defaults to integer `0` + * @trigger paste.jstree + */ + paste : function (obj, pos) { + obj = this.get_node(obj); + if(!obj || !ccp_mode || !ccp_mode.match(/^(copy_node|move_node)$/) || !ccp_node) { return false; } + if(this[ccp_mode](ccp_node, obj, pos, false, false, false, ccp_inst)) { + /** + * triggered when paste is invoked + * @event + * @name paste.jstree + * @param {String} parent the ID of the receiving node + * @param {Array} node the nodes in the buffer + * @param {String} mode the performed operation - "copy_node" or "move_node" + */ + this.trigger('paste', { "parent" : obj.id, "node" : ccp_node, "mode" : ccp_mode }); + } + ccp_node = false; + ccp_mode = false; + ccp_inst = false; + }, + /** + * clear the buffer of previously copied or cut nodes + * @name clear_buffer() + * @trigger clear_buffer.jstree + */ + clear_buffer : function () { + ccp_node = false; + ccp_mode = false; + ccp_inst = false; + /** + * triggered when the copy / cut buffer is cleared + * @event + * @name clear_buffer.jstree + */ + this.trigger('clear_buffer'); + }, + /** + * put a node in edit mode (input field to rename the node) + * @name edit(obj [, default_text, callback]) + * @param {mixed} obj + * @param {String} default_text the text to populate the input with (if omitted or set to a non-string value the node's text value is used) + * @param {Function} callback a function to be called once the text box is blurred, it is called in the instance's scope and receives the node, a status parameter (true if the rename is successful, false otherwise), a boolean indicating if the user cancelled the edit and the original unescaped value provided by the user. You can also access the node's title using .text + */ + edit : function (obj, default_text, callback) { + var rtl, w, a, s, t, h1, h2, fn, tmp, cancel = false; + obj = this.get_node(obj); + if(!obj) { return false; } + if(!this.check("edit", obj, this.get_parent(obj))) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + tmp = obj; + default_text = typeof default_text === 'string' ? default_text : obj.text; + this.set_text(obj, ""); + obj = this._open_to(obj); + tmp.text = default_text; + + rtl = this._data.core.rtl; + w = this.element.width(); + this._data.core.focused = tmp.id; + a = obj.children('.jstree-anchor').trigger('focus'); + s = $(''); + /*! + oi = obj.children("i:visible"), + ai = a.children("i:visible"), + w1 = oi.width() * oi.length, + w2 = ai.width() * ai.length, + */ + t = default_text; + h1 = $("<"+"div>
", { css : { "position" : "absolute", "top" : "-200px", "left" : (rtl ? "0px" : "-1000px"), "visibility" : "hidden" } }).appendTo(document.body); + h2 = $("<"+"input />", { + "value" : t, + "class" : "jstree-rename-input", + // "size" : t.length, + "css" : { + "padding" : "0", + "border" : "1px solid silver", + "box-sizing" : "border-box", + "display" : "inline-block", + "height" : (this._data.core.li_height) + "px", + "lineHeight" : (this._data.core.li_height) + "px", + "width" : "150px" // will be set a bit further down + }, + "on" : { + "blur" : function (e) { + e.stopImmediatePropagation(); + e.preventDefault(); + var i = s.children(".jstree-rename-input"), + v = i.val(), + f = this.settings.core.force_text, + nv; + if(v === "") { v = t; } + h1.remove(); + s.replaceWith(a); + s.remove(); + t = f ? t : $('
').append($.parseHTML(t)).html(); + obj = this.get_node(obj); + this.set_text(obj, t); + nv = !!this.rename_node(obj, f ? $('
').text(v).text() : $('
').append($.parseHTML(v)).html()); + if(!nv) { + this.set_text(obj, t); // move this up? and fix #483 + } + this._data.core.focused = tmp.id; + setTimeout(function () { + var node = this.get_node(tmp.id, true); + if(node.length) { + this._data.core.focused = tmp.id; + node.children('.jstree-anchor').trigger('focus'); + } + }.bind(this), 0); + if(callback) { + callback.call(this, tmp, nv, cancel, v); + } + h2 = null; + }.bind(this), + "keydown" : function (e) { + var key = e.which; + if(key === 27) { + cancel = true; + this.value = t; + } + if(key === 27 || key === 13 || key === 37 || key === 38 || key === 39 || key === 40 || key === 32) { + e.stopImmediatePropagation(); + } + if(key === 27 || key === 13) { + e.preventDefault(); + this.blur(); + } + }, + "click" : function (e) { e.stopImmediatePropagation(); }, + "mousedown" : function (e) { e.stopImmediatePropagation(); }, + "keyup" : function (e) { + h2.width(Math.min(h1.text("pW" + this.value).width(),w)); + }, + "keypress" : function(e) { + if(e.which === 13) { return false; } + } + } + }); + fn = { + fontFamily : a.css('fontFamily') || '', + fontSize : a.css('fontSize') || '', + fontWeight : a.css('fontWeight') || '', + fontStyle : a.css('fontStyle') || '', + fontStretch : a.css('fontStretch') || '', + fontVariant : a.css('fontVariant') || '', + letterSpacing : a.css('letterSpacing') || '', + wordSpacing : a.css('wordSpacing') || '' + }; + s.attr('class', a.attr('class')).append(a.contents().clone()).append(h2); + a.replaceWith(s); + h1.css(fn); + h2.css(fn).width(Math.min(h1.text("pW" + h2[0].value).width(),w))[0].select(); + $(document).one('mousedown.jstree touchstart.jstree dnd_start.vakata', function (e) { + if (h2 && e.target !== h2) { + $(h2).trigger('blur'); + } + }); + }, + + + /** + * changes the theme + * @name set_theme(theme_name [, theme_url]) + * @param {String} theme_name the name of the new theme to apply + * @param {mixed} theme_url the location of the CSS file for this theme. Omit or set to `false` if you manually included the file. Set to `true` to autoload from the `core.themes.dir` directory. + * @trigger set_theme.jstree + */ + set_theme : function (theme_name, theme_url) { + if(!theme_name) { return false; } + if(theme_url === true) { + var dir = this.settings.core.themes.dir; + if(!dir) { dir = $.jstree.path + '/themes'; } + theme_url = dir + '/' + theme_name + '/style.css'; + } + if(theme_url && $.inArray(theme_url, themes_loaded) === -1) { + $('head').append('<'+'link rel="stylesheet" href="' + theme_url + '" type="text/css" />'); + themes_loaded.push(theme_url); + } + if(this._data.core.themes.name) { + this.element.removeClass('jstree-' + this._data.core.themes.name); + } + this._data.core.themes.name = theme_name; + this.element.addClass('jstree-' + theme_name); + this.element[this.settings.core.themes.responsive ? 'addClass' : 'removeClass' ]('jstree-' + theme_name + '-responsive'); + /** + * triggered when a theme is set + * @event + * @name set_theme.jstree + * @param {String} theme the new theme + */ + this.trigger('set_theme', { 'theme' : theme_name }); + }, + /** + * gets the name of the currently applied theme name + * @name get_theme() + * @return {String} + */ + get_theme : function () { return this._data.core.themes.name; }, + /** + * changes the theme variant (if the theme has variants) + * @name set_theme_variant(variant_name) + * @param {String|Boolean} variant_name the variant to apply (if `false` is used the current variant is removed) + */ + set_theme_variant : function (variant_name) { + if(this._data.core.themes.variant) { + this.element.removeClass('jstree-' + this._data.core.themes.name + '-' + this._data.core.themes.variant); + } + this._data.core.themes.variant = variant_name; + if(variant_name) { + this.element.addClass('jstree-' + this._data.core.themes.name + '-' + this._data.core.themes.variant); + } + }, + /** + * gets the name of the currently applied theme variant + * @name get_theme() + * @return {String} + */ + get_theme_variant : function () { return this._data.core.themes.variant; }, + /** + * shows a striped background on the container (if the theme supports it) + * @name show_stripes() + */ + show_stripes : function () { + this._data.core.themes.stripes = true; + this.get_container_ul().addClass("jstree-striped"); + /** + * triggered when stripes are shown + * @event + * @name show_stripes.jstree + */ + this.trigger('show_stripes'); + }, + /** + * hides the striped background on the container + * @name hide_stripes() + */ + hide_stripes : function () { + this._data.core.themes.stripes = false; + this.get_container_ul().removeClass("jstree-striped"); + /** + * triggered when stripes are hidden + * @event + * @name hide_stripes.jstree + */ + this.trigger('hide_stripes'); + }, + /** + * toggles the striped background on the container + * @name toggle_stripes() + */ + toggle_stripes : function () { if(this._data.core.themes.stripes) { this.hide_stripes(); } else { this.show_stripes(); } }, + /** + * shows the connecting dots (if the theme supports it) + * @name show_dots() + */ + show_dots : function () { + this._data.core.themes.dots = true; + this.get_container_ul().removeClass("jstree-no-dots"); + /** + * triggered when dots are shown + * @event + * @name show_dots.jstree + */ + this.trigger('show_dots'); + }, + /** + * hides the connecting dots + * @name hide_dots() + */ + hide_dots : function () { + this._data.core.themes.dots = false; + this.get_container_ul().addClass("jstree-no-dots"); + /** + * triggered when dots are hidden + * @event + * @name hide_dots.jstree + */ + this.trigger('hide_dots'); + }, + /** + * toggles the connecting dots + * @name toggle_dots() + */ + toggle_dots : function () { if(this._data.core.themes.dots) { this.hide_dots(); } else { this.show_dots(); } }, + /** + * show the node icons + * @name show_icons() + */ + show_icons : function () { + this._data.core.themes.icons = true; + this.get_container_ul().removeClass("jstree-no-icons"); + /** + * triggered when icons are shown + * @event + * @name show_icons.jstree + */ + this.trigger('show_icons'); + }, + /** + * hide the node icons + * @name hide_icons() + */ + hide_icons : function () { + this._data.core.themes.icons = false; + this.get_container_ul().addClass("jstree-no-icons"); + /** + * triggered when icons are hidden + * @event + * @name hide_icons.jstree + */ + this.trigger('hide_icons'); + }, + /** + * toggle the node icons + * @name toggle_icons() + */ + toggle_icons : function () { if(this._data.core.themes.icons) { this.hide_icons(); } else { this.show_icons(); } }, + /** + * show the node ellipsis + * @name show_icons() + */ + show_ellipsis : function () { + this._data.core.themes.ellipsis = true; + this.get_container_ul().addClass("jstree-ellipsis"); + /** + * triggered when ellisis is shown + * @event + * @name show_ellipsis.jstree + */ + this.trigger('show_ellipsis'); + }, + /** + * hide the node ellipsis + * @name hide_ellipsis() + */ + hide_ellipsis : function () { + this._data.core.themes.ellipsis = false; + this.get_container_ul().removeClass("jstree-ellipsis"); + /** + * triggered when ellisis is hidden + * @event + * @name hide_ellipsis.jstree + */ + this.trigger('hide_ellipsis'); + }, + /** + * toggle the node ellipsis + * @name toggle_icons() + */ + toggle_ellipsis : function () { if(this._data.core.themes.ellipsis) { this.hide_ellipsis(); } else { this.show_ellipsis(); } }, + /** + * set the node icon for a node + * @name set_icon(obj, icon) + * @param {mixed} obj + * @param {String} icon the new icon - can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class + */ + set_icon : function (obj, icon) { + var t1, t2, dom, old; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.set_icon(obj[t1], icon); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + old = obj.icon; + obj.icon = icon === true || icon === null || icon === undefined || icon === '' ? true : icon; + dom = this.get_node(obj, true).children(".jstree-anchor").children(".jstree-themeicon"); + if(icon === false) { + dom.removeClass('jstree-themeicon-custom ' + old).css("background","").removeAttr("rel"); + this.hide_icon(obj); + } + else if(icon === true || icon === null || icon === undefined || icon === '') { + dom.removeClass('jstree-themeicon-custom ' + old).css("background","").removeAttr("rel"); + if(old === false) { this.show_icon(obj); } + } + else if(icon.indexOf("/") === -1 && icon.indexOf(".") === -1) { + dom.removeClass(old).css("background",""); + dom.addClass(icon + ' jstree-themeicon-custom').attr("rel",icon); + if(old === false) { this.show_icon(obj); } + } + else { + dom.removeClass(old).css("background",""); + dom.addClass('jstree-themeicon-custom').css("background", "url('" + icon + "') center center no-repeat").attr("rel",icon); + if(old === false) { this.show_icon(obj); } + } + return true; + }, + /** + * get the node icon for a node + * @name get_icon(obj) + * @param {mixed} obj + * @return {String} + */ + get_icon : function (obj) { + obj = this.get_node(obj); + return (!obj || obj.id === $.jstree.root) ? false : obj.icon; + }, + /** + * hide the icon on an individual node + * @name hide_icon(obj) + * @param {mixed} obj + */ + hide_icon : function (obj) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.hide_icon(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj === $.jstree.root) { return false; } + obj.icon = false; + this.get_node(obj, true).children(".jstree-anchor").children(".jstree-themeicon").addClass('jstree-themeicon-hidden'); + return true; + }, + /** + * show the icon on an individual node + * @name show_icon(obj) + * @param {mixed} obj + */ + show_icon : function (obj) { + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.show_icon(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj === $.jstree.root) { return false; } + dom = this.get_node(obj, true); + obj.icon = dom.length ? dom.children(".jstree-anchor").children(".jstree-themeicon").attr('rel') : true; + if(!obj.icon) { obj.icon = true; } + dom.children(".jstree-anchor").children(".jstree-themeicon").removeClass('jstree-themeicon-hidden'); + return true; + } + }; + + // helpers + $.vakata = {}; + // collect attributes + $.vakata.attributes = function(node, with_values) { + node = $(node)[0]; + var attr = with_values ? {} : []; + if(node && node.attributes) { + $.each(node.attributes, function (i, v) { + if($.inArray(v.name.toLowerCase(),['style','contenteditable','hasfocus','tabindex']) !== -1) { return; } + if(v.value !== null && $.vakata.trim(v.value) !== '') { + if(with_values) { attr[v.name] = v.value; } + else { attr.push(v.name); } + } + }); + } + return attr; + }; + $.vakata.array_unique = function(array) { + var a = [], i, j, l, o = {}; + for(i = 0, l = array.length; i < l; i++) { + if(o[array[i]] === undefined) { + a.push(array[i]); + o[array[i]] = true; + } + } + return a; + }; + // remove item from array + $.vakata.array_remove = function(array, from) { + array.splice(from, 1); + return array; + //var rest = array.slice((to || from) + 1 || array.length); + //array.length = from < 0 ? array.length + from : from; + //array.push.apply(array, rest); + //return array; + }; + // remove item from array + $.vakata.array_remove_item = function(array, item) { + var tmp = $.inArray(item, array); + return tmp !== -1 ? $.vakata.array_remove(array, tmp) : array; + }; + $.vakata.array_filter = function(c,a,b,d,e) { + if (c.filter) { + return c.filter(a, b); + } + d=[]; + for (e in c) { + if (~~e+''===e+'' && e>=0 && a.call(b,c[e],+e,c)) { + d.push(c[e]); + } + } + return d; + }; + $.vakata.trim = function (text) { + return String.prototype.trim ? + String.prototype.trim.call(text.toString()) : + text.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + }; + $.vakata.is_function = function(obj) { + return typeof obj === "function" && typeof obj.nodeType !== "number"; + }; + $.vakata.is_array = Array.isArray || function (obj) { + return Object.prototype.toString.call(obj) === "[object Array]"; + }; + + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind#polyfill + if (!Function.prototype.bind) { + Function.prototype.bind = function () { + var thatFunc = this, thatArg = arguments[0]; + var args = Array.prototype.slice.call(arguments, 1); + if (typeof thatFunc !== 'function') { + // closest thing possible to the ECMAScript 5 + // internal IsCallable function + throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); + } + return function(){ + var funcArgs = args.concat(Array.prototype.slice.call(arguments)); + return thatFunc.apply(thatArg, funcArgs); + }; + }; + } + + +/** + * ### Changed plugin + * + * This plugin adds more information to the `changed.jstree` event. The new data is contained in the `changed` event data property, and contains a lists of `selected` and `deselected` nodes. + */ + + $.jstree.plugins.changed = function (options, parent) { + var last = []; + this.trigger = function (ev, data) { + var i, j; + if(!data) { + data = {}; + } + if(ev.replace('.jstree','') === 'changed') { + data.changed = { selected : [], deselected : [] }; + var tmp = {}; + for(i = 0, j = last.length; i < j; i++) { + tmp[last[i]] = 1; + } + for(i = 0, j = data.selected.length; i < j; i++) { + if(!tmp[data.selected[i]]) { + data.changed.selected.push(data.selected[i]); + } + else { + tmp[data.selected[i]] = 2; + } + } + for(i = 0, j = last.length; i < j; i++) { + if(tmp[last[i]] === 1) { + data.changed.deselected.push(last[i]); + } + } + last = data.selected.slice(); + } + /** + * triggered when selection changes (the "changed" plugin enhances the original event with more data) + * @event + * @name changed.jstree + * @param {Object} node + * @param {Object} action the action that caused the selection to change + * @param {Array} selected the current selection + * @param {Object} changed an object containing two properties `selected` and `deselected` - both arrays of node IDs, which were selected or deselected since the last changed event + * @param {Object} event the event (if any) that triggered this changed event + * @plugin changed + */ + parent.trigger.call(this, ev, data); + }; + this.refresh = function (skip_loading, forget_state) { + last = []; + return parent.refresh.apply(this, arguments); + }; + }; + +/** + * ### Checkbox plugin + * + * This plugin renders checkbox icons in front of each node, making multiple selection much easier. + * It also supports tri-state behavior, meaning that if a node has a few of its children checked it will be rendered as undetermined, and state will be propagated up. + */ + + var _i = document.createElement('I'); + _i.className = 'jstree-icon jstree-checkbox'; + _i.setAttribute('role', 'presentation'); + /** + * stores all defaults for the checkbox plugin + * @name $.jstree.defaults.checkbox + * @plugin checkbox + */ + $.jstree.defaults.checkbox = { + /** + * a boolean indicating if checkboxes should be visible (can be changed at a later time using `show_checkboxes()` and `hide_checkboxes`). Defaults to `true`. + * @name $.jstree.defaults.checkbox.visible + * @plugin checkbox + */ + visible : true, + /** + * a boolean indicating if checkboxes should cascade down and have an undetermined state. Defaults to `true`. + * @name $.jstree.defaults.checkbox.three_state + * @plugin checkbox + */ + three_state : true, + /** + * a boolean indicating if clicking anywhere on the node should act as clicking on the checkbox. Defaults to `true`. + * @name $.jstree.defaults.checkbox.whole_node + * @plugin checkbox + */ + whole_node : true, + /** + * a boolean indicating if the selected style of a node should be kept, or removed. Defaults to `true`. + * @name $.jstree.defaults.checkbox.keep_selected_style + * @plugin checkbox + */ + keep_selected_style : true, + /** + * This setting controls how cascading and undetermined nodes are applied. + * If 'up' is in the string - cascading up is enabled, if 'down' is in the string - cascading down is enabled, if 'undetermined' is in the string - undetermined nodes will be used. + * If `three_state` is set to `true` this setting is automatically set to 'up+down+undetermined'. Defaults to ''. + * @name $.jstree.defaults.checkbox.cascade + * @plugin checkbox + */ + cascade : '', + /** + * This setting controls if checkbox are bound to the general tree selection or to an internal array maintained by the checkbox plugin. Defaults to `true`, only set to `false` if you know exactly what you are doing. + * @name $.jstree.defaults.checkbox.tie_selection + * @plugin checkbox + */ + tie_selection : true, + + /** + * This setting controls if cascading down affects disabled checkboxes + * @name $.jstree.defaults.checkbox.cascade_to_disabled + * @plugin checkbox + */ + cascade_to_disabled : true, + + /** + * This setting controls if cascading down affects hidden checkboxes + * @name $.jstree.defaults.checkbox.cascade_to_hidden + * @plugin checkbox + */ + cascade_to_hidden : true + }; + $.jstree.plugins.checkbox = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + this._data.checkbox.uto = false; + this._data.checkbox.selected = []; + if(this.settings.checkbox.three_state) { + this.settings.checkbox.cascade = 'up+down+undetermined'; + } + this.element + .on("init.jstree", function () { + this._data.checkbox.visible = this.settings.checkbox.visible; + if(!this.settings.checkbox.keep_selected_style) { + this.element.addClass('jstree-checkbox-no-clicked'); + } + if(this.settings.checkbox.tie_selection) { + this.element.addClass('jstree-checkbox-selection'); + } + }.bind(this)) + .on("loading.jstree", function () { + this[ this._data.checkbox.visible ? 'show_checkboxes' : 'hide_checkboxes' ](); + }.bind(this)); + if(this.settings.checkbox.cascade.indexOf('undetermined') !== -1) { + this.element + .on('changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree', function () { + // only if undetermined is in setting + if(this._data.checkbox.uto) { clearTimeout(this._data.checkbox.uto); } + this._data.checkbox.uto = setTimeout(this._undetermined.bind(this), 50); + }.bind(this)); + } + if(!this.settings.checkbox.tie_selection) { + this.element + .on('model.jstree', function (e, data) { + var m = this._model.data, + p = m[data.parent], + dpc = data.nodes, + i, j; + for(i = 0, j = dpc.length; i < j; i++) { + m[dpc[i]].state.checked = m[dpc[i]].state.checked || (m[dpc[i]].original && m[dpc[i]].original.state && m[dpc[i]].original.state.checked); + if(m[dpc[i]].state.checked) { + this._data.checkbox.selected.push(dpc[i]); + } + } + }.bind(this)); + } + if(this.settings.checkbox.cascade.indexOf('up') !== -1 || this.settings.checkbox.cascade.indexOf('down') !== -1) { + this.element + .on('model.jstree', function (e, data) { + var m = this._model.data, + p = m[data.parent], + dpc = data.nodes, + chd = [], + c, i, j, k, l, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection; + + if(s.indexOf('down') !== -1) { + // apply down + if(p.state[ t ? 'selected' : 'checked' ]) { + for(i = 0, j = dpc.length; i < j; i++) { + m[dpc[i]].state[ t ? 'selected' : 'checked' ] = true; + } + + this._data[ t ? 'core' : 'checkbox' ].selected = this._data[ t ? 'core' : 'checkbox' ].selected.concat(dpc); + } + else { + for(i = 0, j = dpc.length; i < j; i++) { + if(m[dpc[i]].state[ t ? 'selected' : 'checked' ]) { + for(k = 0, l = m[dpc[i]].children_d.length; k < l; k++) { + m[m[dpc[i]].children_d[k]].state[ t ? 'selected' : 'checked' ] = true; + } + this._data[ t ? 'core' : 'checkbox' ].selected = this._data[ t ? 'core' : 'checkbox' ].selected.concat(m[dpc[i]].children_d); + } + } + } + } + + if(s.indexOf('up') !== -1) { + // apply up + for(i = 0, j = p.children_d.length; i < j; i++) { + if(!m[p.children_d[i]].children.length) { + chd.push(m[p.children_d[i]].parent); + } + } + chd = $.vakata.array_unique(chd); + for(k = 0, l = chd.length; k < l; k++) { + p = m[chd[k]]; + while(p && p.id !== $.jstree.root) { + c = 0; + for(i = 0, j = p.children.length; i < j; i++) { + c += m[p.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(c === j) { + p.state[ t ? 'selected' : 'checked' ] = true; + this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.children('.jstree-anchor').attr('aria-selected', true).addClass( t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + p = this.get_node(p.parent); + } + } + } + + this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_unique(this._data[ t ? 'core' : 'checkbox' ].selected); + }.bind(this)) + .on(this.settings.checkbox.tie_selection ? 'select_node.jstree' : 'check_node.jstree', function (e, data) { + var self = this, + obj = data.node, + m = this._model.data, + par = this.get_node(obj.parent), + i, j, c, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection, + sel = {}, cur = this._data[ t ? 'core' : 'checkbox' ].selected; + + for (i = 0, j = cur.length; i < j; i++) { + sel[cur[i]] = true; + } + + // apply down + if(s.indexOf('down') !== -1) { + //this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_unique(this._data[ t ? 'core' : 'checkbox' ].selected.concat(obj.children_d)); + var selectedIds = this._cascade_new_checked_state(obj.id, true); + var temp = obj.children_d.concat(obj.id); + for (i = 0, j = temp.length; i < j; i++) { + if (selectedIds.indexOf(temp[i]) > -1) { + sel[temp[i]] = true; + } + else { + delete sel[temp[i]]; + } + } + } + + // apply up + if(s.indexOf('up') !== -1) { + while(par && par.id !== $.jstree.root) { + c = 0; + for(i = 0, j = par.children.length; i < j; i++) { + c += m[par.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(c === j) { + par.state[ t ? 'selected' : 'checked' ] = true; + sel[par.id] = true; + //this._data[ t ? 'core' : 'checkbox' ].selected.push(par.id); + tmp = this.get_node(par, true); + if(tmp && tmp.length) { + tmp.children('.jstree-anchor').attr('aria-selected', true).addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + par = this.get_node(par.parent); + } + } + + cur = []; + for (i in sel) { + if (sel.hasOwnProperty(i)) { + cur.push(i); + } + } + this._data[ t ? 'core' : 'checkbox' ].selected = cur; + }.bind(this)) + .on(this.settings.checkbox.tie_selection ? 'deselect_all.jstree' : 'uncheck_all.jstree', function (e, data) { + var obj = this.get_node($.jstree.root), + m = this._model.data, + i, j, tmp; + for(i = 0, j = obj.children_d.length; i < j; i++) { + tmp = m[obj.children_d[i]]; + if(tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) { + tmp.original.state.undetermined = false; + } + } + }.bind(this)) + .on(this.settings.checkbox.tie_selection ? 'deselect_node.jstree' : 'uncheck_node.jstree', function (e, data) { + var self = this, + obj = data.node, + dom = this.get_node(obj, true), + i, j, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection, + cur = this._data[ t ? 'core' : 'checkbox' ].selected, sel = {}, + stillSelectedIds = [], + allIds = obj.children_d.concat(obj.id); + + // apply down + if(s.indexOf('down') !== -1) { + var selectedIds = this._cascade_new_checked_state(obj.id, false); + + cur = $.vakata.array_filter(cur, function(id) { + return allIds.indexOf(id) === -1 || selectedIds.indexOf(id) > -1; + }); + } + + // only apply up if cascade up is enabled and if this node is not selected + // (if all child nodes are disabled and cascade_to_disabled === false then this node will till be selected). + if(s.indexOf('up') !== -1 && cur.indexOf(obj.id) === -1) { + for(i = 0, j = obj.parents.length; i < j; i++) { + tmp = this._model.data[obj.parents[i]]; + tmp.state[ t ? 'selected' : 'checked' ] = false; + if(tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) { + tmp.original.state.undetermined = false; + } + tmp = this.get_node(obj.parents[i], true); + if(tmp && tmp.length) { + tmp.children('.jstree-anchor').attr('aria-selected', false).removeClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + + cur = $.vakata.array_filter(cur, function(id) { + return obj.parents.indexOf(id) === -1; + }); + } + + this._data[ t ? 'core' : 'checkbox' ].selected = cur; + }.bind(this)); + } + if(this.settings.checkbox.cascade.indexOf('up') !== -1) { + this.element + .on('delete_node.jstree', function (e, data) { + // apply up (whole handler) + var p = this.get_node(data.parent), + m = this._model.data, + i, j, c, tmp, t = this.settings.checkbox.tie_selection; + while(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) { + c = 0; + for(i = 0, j = p.children.length; i < j; i++) { + c += m[p.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(j > 0 && c === j) { + p.state[ t ? 'selected' : 'checked' ] = true; + this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.children('.jstree-anchor').attr('aria-selected', true).addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + p = this.get_node(p.parent); + } + }.bind(this)) + .on('move_node.jstree', function (e, data) { + // apply up (whole handler) + var is_multi = data.is_multi, + old_par = data.old_parent, + new_par = this.get_node(data.parent), + m = this._model.data, + p, c, i, j, tmp, t = this.settings.checkbox.tie_selection; + if(!is_multi) { + p = this.get_node(old_par); + while(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) { + c = 0; + for(i = 0, j = p.children.length; i < j; i++) { + c += m[p.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(j > 0 && c === j) { + p.state[ t ? 'selected' : 'checked' ] = true; + this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.children('.jstree-anchor').attr('aria-selected', true).addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + p = this.get_node(p.parent); + } + } + p = new_par; + while(p && p.id !== $.jstree.root) { + c = 0; + for(i = 0, j = p.children.length; i < j; i++) { + c += m[p.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(c === j) { + if(!p.state[ t ? 'selected' : 'checked' ]) { + p.state[ t ? 'selected' : 'checked' ] = true; + this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.children('.jstree-anchor').attr('aria-selected', true).addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + } + else { + if(p.state[ t ? 'selected' : 'checked' ]) { + p.state[ t ? 'selected' : 'checked' ] = false; + this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_remove_item(this._data[ t ? 'core' : 'checkbox' ].selected, p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.children('.jstree-anchor').attr('aria-selected', false).removeClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + } + p = this.get_node(p.parent); + } + }.bind(this)); + } + }; + /** + * get an array of all nodes whose state is "undetermined" + * @name get_undetermined([full]) + * @param {boolean} full: if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + * @plugin checkbox + */ + this.get_undetermined = function (full) { + if (this.settings.checkbox.cascade.indexOf('undetermined') === -1) { + return []; + } + var i, j, k, l, o = {}, m = this._model.data, t = this.settings.checkbox.tie_selection, s = this._data[ t ? 'core' : 'checkbox' ].selected, p = [], tt = this, r = []; + for(i = 0, j = s.length; i < j; i++) { + if(m[s[i]] && m[s[i]].parents) { + for(k = 0, l = m[s[i]].parents.length; k < l; k++) { + if(o[m[s[i]].parents[k]] !== undefined) { + break; + } + if(m[s[i]].parents[k] !== $.jstree.root) { + o[m[s[i]].parents[k]] = true; + p.push(m[s[i]].parents[k]); + } + } + } + } + // attempt for server side undetermined state + this.element.find('.jstree-closed').not(':has(.jstree-children)') + .each(function () { + var tmp = tt.get_node(this), tmp2; + + if(!tmp) { return; } + + if(!tmp.state.loaded) { + if(tmp.original && tmp.original.state && tmp.original.state.undetermined && tmp.original.state.undetermined === true) { + if(o[tmp.id] === undefined && tmp.id !== $.jstree.root) { + o[tmp.id] = true; + p.push(tmp.id); + } + for(k = 0, l = tmp.parents.length; k < l; k++) { + if(o[tmp.parents[k]] === undefined && tmp.parents[k] !== $.jstree.root) { + o[tmp.parents[k]] = true; + p.push(tmp.parents[k]); + } + } + } + } + else { + for(i = 0, j = tmp.children_d.length; i < j; i++) { + tmp2 = m[tmp.children_d[i]]; + if(!tmp2.state.loaded && tmp2.original && tmp2.original.state && tmp2.original.state.undetermined && tmp2.original.state.undetermined === true) { + if(o[tmp2.id] === undefined && tmp2.id !== $.jstree.root) { + o[tmp2.id] = true; + p.push(tmp2.id); + } + for(k = 0, l = tmp2.parents.length; k < l; k++) { + if(o[tmp2.parents[k]] === undefined && tmp2.parents[k] !== $.jstree.root) { + o[tmp2.parents[k]] = true; + p.push(tmp2.parents[k]); + } + } + } + } + } + }); + for (i = 0, j = p.length; i < j; i++) { + if(!m[p[i]].state[ t ? 'selected' : 'checked' ]) { + r.push(full ? m[p[i]] : p[i]); + } + } + return r; + }; + /** + * set the undetermined state where and if necessary. Used internally. + * @private + * @name _undetermined() + * @plugin checkbox + */ + this._undetermined = function () { + if(this.element === null) { return; } + var p = this.get_undetermined(false), i, j, s; + + this.element.find('.jstree-undetermined').removeClass('jstree-undetermined'); + for (i = 0, j = p.length; i < j; i++) { + s = this.get_node(p[i], true); + if(s && s.length) { + s.children('.jstree-anchor').children('.jstree-checkbox').addClass('jstree-undetermined'); + } + } + }; + this.redraw_node = function(obj, deep, is_callback, force_render) { + obj = parent.redraw_node.apply(this, arguments); + if(obj) { + var i, j, tmp = null, icon = null; + for(i = 0, j = obj.childNodes.length; i < j; i++) { + if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf("jstree-anchor") !== -1) { + tmp = obj.childNodes[i]; + break; + } + } + if(tmp) { + if(!this.settings.checkbox.tie_selection && this._model.data[obj.id].state.checked) { tmp.className += ' jstree-checked'; } + icon = _i.cloneNode(false); + if(this._model.data[obj.id].state.checkbox_disabled) { icon.className += ' jstree-checkbox-disabled'; } + tmp.insertBefore(icon, tmp.childNodes[0]); + } + } + if(!is_callback && this.settings.checkbox.cascade.indexOf('undetermined') !== -1) { + if(this._data.checkbox.uto) { clearTimeout(this._data.checkbox.uto); } + this._data.checkbox.uto = setTimeout(this._undetermined.bind(this), 50); + } + return obj; + }; + /** + * show the node checkbox icons + * @name show_checkboxes() + * @plugin checkbox + */ + this.show_checkboxes = function () { this._data.core.themes.checkboxes = true; this.get_container_ul().removeClass("jstree-no-checkboxes"); }; + /** + * hide the node checkbox icons + * @name hide_checkboxes() + * @plugin checkbox + */ + this.hide_checkboxes = function () { this._data.core.themes.checkboxes = false; this.get_container_ul().addClass("jstree-no-checkboxes"); }; + /** + * toggle the node icons + * @name toggle_checkboxes() + * @plugin checkbox + */ + this.toggle_checkboxes = function () { if(this._data.core.themes.checkboxes) { this.hide_checkboxes(); } else { this.show_checkboxes(); } }; + /** + * checks if a node is in an undetermined state + * @name is_undetermined(obj) + * @param {mixed} obj + * @return {Boolean} + */ + this.is_undetermined = function (obj) { + obj = this.get_node(obj); + var s = this.settings.checkbox.cascade, i, j, t = this.settings.checkbox.tie_selection, d = this._data[ t ? 'core' : 'checkbox' ].selected, m = this._model.data; + if(!obj || obj.state[ t ? 'selected' : 'checked' ] === true || s.indexOf('undetermined') === -1 || (s.indexOf('down') === -1 && s.indexOf('up') === -1)) { + return false; + } + if(!obj.state.loaded && obj.original.state.undetermined === true) { + return true; + } + for(i = 0, j = obj.children_d.length; i < j; i++) { + if($.inArray(obj.children_d[i], d) !== -1 || (!m[obj.children_d[i]].state.loaded && m[obj.children_d[i]].original.state.undetermined)) { + return true; + } + } + return false; + }; + /** + * disable a node's checkbox + * @name disable_checkbox(obj) + * @param {mixed} obj an array can be used too + * @trigger disable_checkbox.jstree + * @plugin checkbox + */ + this.disable_checkbox = function (obj) { + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.disable_checkbox(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(!obj.state.checkbox_disabled) { + obj.state.checkbox_disabled = true; + if(dom && dom.length) { + dom.children('.jstree-anchor').children('.jstree-checkbox').addClass('jstree-checkbox-disabled'); + } + /** + * triggered when an node's checkbox is disabled + * @event + * @name disable_checkbox.jstree + * @param {Object} node + * @plugin checkbox + */ + this.trigger('disable_checkbox', { 'node' : obj }); + } + }; + /** + * enable a node's checkbox + * @name enable_checkbox(obj) + * @param {mixed} obj an array can be used too + * @trigger enable_checkbox.jstree + * @plugin checkbox + */ + this.enable_checkbox = function (obj) { + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.enable_checkbox(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(obj.state.checkbox_disabled) { + obj.state.checkbox_disabled = false; + if(dom && dom.length) { + dom.children('.jstree-anchor').children('.jstree-checkbox').removeClass('jstree-checkbox-disabled'); + } + /** + * triggered when an node's checkbox is enabled + * @event + * @name enable_checkbox.jstree + * @param {Object} node + * @plugin checkbox + */ + this.trigger('enable_checkbox', { 'node' : obj }); + } + }; + + this.activate_node = function (obj, e) { + if($(e.target).hasClass('jstree-checkbox-disabled')) { + return false; + } + if(this.settings.checkbox.tie_selection && (this.settings.checkbox.whole_node || $(e.target).hasClass('jstree-checkbox'))) { + e.ctrlKey = true; + } + if(this.settings.checkbox.tie_selection || (!this.settings.checkbox.whole_node && !$(e.target).hasClass('jstree-checkbox'))) { + return parent.activate_node.call(this, obj, e); + } + if(this.is_disabled(obj)) { + return false; + } + if(this.is_checked(obj)) { + this.uncheck_node(obj, e); + } + else { + this.check_node(obj, e); + } + this.trigger('activate_node', { 'node' : this.get_node(obj) }); + }; + this.delete_node = function (obj) { + if(this.settings.checkbox.tie_selection || $.vakata.is_array(obj)) { + return parent.delete_node.call(this, obj); + } + var tmp, k, l, c = false; + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + tmp = obj.children_d.concat([]); + tmp.push(obj.id); + for(k = 0, l = tmp.length; k < l; k++) { + if(this._model.data[tmp[k]].state.checked) { + c = true; + break; + } + } + if (c) { + this._data.checkbox.selected = $.vakata.array_filter(this._data.checkbox.selected, function (v) { + return $.inArray(v, tmp) === -1; + }); + } + return parent.delete_node.call(this, obj); + }; + + /** + * Cascades checked state to a node and all its descendants. This function does NOT affect hidden and disabled nodes (or their descendants). + * However if these unaffected nodes are already selected their ids will be included in the returned array. + * @private + * @name _cascade_new_checked_state(id, checkedState) + * @param {string} id the node ID + * @param {bool} checkedState should the nodes be checked or not + * @returns {Array} Array of all node id's (in this tree branch) that are checked. + */ + this._cascade_new_checked_state = function (id, checkedState) { + var self = this; + var t = this.settings.checkbox.tie_selection; + var node = this._model.data[id]; + var selectedNodeIds = []; + var selectedChildrenIds = [], i, j, selectedChildIds; + + if ( + (this.settings.checkbox.cascade_to_disabled || !node.state.disabled) && + (this.settings.checkbox.cascade_to_hidden || !node.state.hidden) + ) { + //First try and check/uncheck the children + if (node.children) { + for (i = 0, j = node.children.length; i < j; i++) { + var childId = node.children[i]; + selectedChildIds = self._cascade_new_checked_state(childId, checkedState); + selectedNodeIds = selectedNodeIds.concat(selectedChildIds); + if (selectedChildIds.indexOf(childId) > -1) { + selectedChildrenIds.push(childId); + } + } + } + + var dom = self.get_node(node, true); + + //A node's state is undetermined if some but not all of it's children are checked/selected . + var undetermined = selectedChildrenIds.length > 0 && selectedChildrenIds.length < node.children.length; + + if(node.original && node.original.state && node.original.state.undetermined) { + node.original.state.undetermined = undetermined; + } + + //If a node is undetermined then remove selected class + if (undetermined) { + node.state[ t ? 'selected' : 'checked' ] = false; + dom.children('.jstree-anchor').attr('aria-selected', false).removeClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + //Otherwise, if the checkedState === true (i.e. the node is being checked now) and all of the node's children are checked (if it has any children), + //check the node and style it correctly. + else if (checkedState && selectedChildrenIds.length === node.children.length) { + node.state[ t ? 'selected' : 'checked' ] = checkedState; + selectedNodeIds.push(node.id); + + dom.children('.jstree-anchor').attr('aria-selected', true).addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + else { + node.state[ t ? 'selected' : 'checked' ] = false; + dom.children('.jstree-anchor').attr('aria-selected', false).removeClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + selectedChildIds = this.get_checked_descendants(id); + + if (node.state[ t ? 'selected' : 'checked' ]) { + selectedChildIds.push(node.id); + } + + selectedNodeIds = selectedNodeIds.concat(selectedChildIds); + } + + return selectedNodeIds; + }; + + /** + * Gets ids of nodes selected in branch (of tree) specified by id (does not include the node specified by id) + * @name get_checked_descendants(obj) + * @param {string} id the node ID + * @return {Array} array of IDs + * @plugin checkbox + */ + this.get_checked_descendants = function (id) { + var self = this; + var t = self.settings.checkbox.tie_selection; + var node = self._model.data[id]; + + return $.vakata.array_filter(node.children_d, function(_id) { + return self._model.data[_id].state[ t ? 'selected' : 'checked' ]; + }); + }; + + /** + * check a node (only if tie_selection in checkbox settings is false, otherwise select_node will be called internally) + * @name check_node(obj) + * @param {mixed} obj an array can be used to check multiple nodes + * @trigger check_node.jstree + * @plugin checkbox + */ + this.check_node = function (obj, e) { + if(this.settings.checkbox.tie_selection) { return this.select_node(obj, false, true, e); } + var dom, t1, t2, th; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.check_node(obj[t1], e); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(!obj.state.checked) { + obj.state.checked = true; + this._data.checkbox.selected.push(obj.id); + if(dom && dom.length) { + dom.children('.jstree-anchor').addClass('jstree-checked'); + } + /** + * triggered when an node is checked (only if tie_selection in checkbox settings is false) + * @event + * @name check_node.jstree + * @param {Object} node + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this check_node + * @plugin checkbox + */ + this.trigger('check_node', { 'node' : obj, 'selected' : this._data.checkbox.selected, 'event' : e }); + } + }; + /** + * uncheck a node (only if tie_selection in checkbox settings is false, otherwise deselect_node will be called internally) + * @name uncheck_node(obj) + * @param {mixed} obj an array can be used to uncheck multiple nodes + * @trigger uncheck_node.jstree + * @plugin checkbox + */ + this.uncheck_node = function (obj, e) { + if(this.settings.checkbox.tie_selection) { return this.deselect_node(obj, false, e); } + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.uncheck_node(obj[t1], e); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(obj.state.checked) { + obj.state.checked = false; + this._data.checkbox.selected = $.vakata.array_remove_item(this._data.checkbox.selected, obj.id); + if(dom.length) { + dom.children('.jstree-anchor').removeClass('jstree-checked'); + } + /** + * triggered when an node is unchecked (only if tie_selection in checkbox settings is false) + * @event + * @name uncheck_node.jstree + * @param {Object} node + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this uncheck_node + * @plugin checkbox + */ + this.trigger('uncheck_node', { 'node' : obj, 'selected' : this._data.checkbox.selected, 'event' : e }); + } + }; + + /** + * checks all nodes in the tree (only if tie_selection in checkbox settings is false, otherwise select_all will be called internally) + * @name check_all() + * @trigger check_all.jstree, changed.jstree + * @plugin checkbox + */ + this.check_all = function () { + if(this.settings.checkbox.tie_selection) { return this.select_all(); } + var tmp = this._data.checkbox.selected.concat([]), i, j; + this._data.checkbox.selected = this._model.data[$.jstree.root].children_d.concat(); + for(i = 0, j = this._data.checkbox.selected.length; i < j; i++) { + if(this._model.data[this._data.checkbox.selected[i]]) { + this._model.data[this._data.checkbox.selected[i]].state.checked = true; + } + } + this.redraw(true); + /** + * triggered when all nodes are checked (only if tie_selection in checkbox settings is false) + * @event + * @name check_all.jstree + * @param {Array} selected the current selection + * @plugin checkbox + */ + this.trigger('check_all', { 'selected' : this._data.checkbox.selected }); + }; + /** + * uncheck all checked nodes (only if tie_selection in checkbox settings is false, otherwise deselect_all will be called internally) + * @name uncheck_all() + * @trigger uncheck_all.jstree + * @plugin checkbox + */ + this.uncheck_all = function () { + if(this.settings.checkbox.tie_selection) { return this.deselect_all(); } + var tmp = this._data.checkbox.selected.concat([]), i, j; + for(i = 0, j = this._data.checkbox.selected.length; i < j; i++) { + if(this._model.data[this._data.checkbox.selected[i]]) { + this._model.data[this._data.checkbox.selected[i]].state.checked = false; + } + } + this._data.checkbox.selected = []; + this.element.find('.jstree-checked').removeClass('jstree-checked'); + /** + * triggered when all nodes are unchecked (only if tie_selection in checkbox settings is false) + * @event + * @name uncheck_all.jstree + * @param {Object} node the previous selection + * @param {Array} selected the current selection + * @plugin checkbox + */ + this.trigger('uncheck_all', { 'selected' : this._data.checkbox.selected, 'node' : tmp }); + }; + /** + * checks if a node is checked (if tie_selection is on in the settings this function will return the same as is_selected) + * @name is_checked(obj) + * @param {mixed} obj + * @return {Boolean} + * @plugin checkbox + */ + this.is_checked = function (obj) { + if(this.settings.checkbox.tie_selection) { return this.is_selected(obj); } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + return obj.state.checked; + }; + /** + * get an array of all checked nodes (if tie_selection is on in the settings this function will return the same as get_selected) + * @name get_checked([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + * @plugin checkbox + */ + this.get_checked = function (full) { + if(this.settings.checkbox.tie_selection) { return this.get_selected(full); } + return full ? $.map(this._data.checkbox.selected, function (i) { return this.get_node(i); }.bind(this)) : this._data.checkbox.selected.slice(); + }; + /** + * get an array of all top level checked nodes (ignoring children of checked nodes) (if tie_selection is on in the settings this function will return the same as get_top_selected) + * @name get_top_checked([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + * @plugin checkbox + */ + this.get_top_checked = function (full) { + if(this.settings.checkbox.tie_selection) { return this.get_top_selected(full); } + var tmp = this.get_checked(true), + obj = {}, i, j, k, l; + for(i = 0, j = tmp.length; i < j; i++) { + obj[tmp[i].id] = tmp[i]; + } + for(i = 0, j = tmp.length; i < j; i++) { + for(k = 0, l = tmp[i].children_d.length; k < l; k++) { + if(obj[tmp[i].children_d[k]]) { + delete obj[tmp[i].children_d[k]]; + } + } + } + tmp = []; + for(i in obj) { + if(obj.hasOwnProperty(i)) { + tmp.push(i); + } + } + return full ? $.map(tmp, function (i) { return this.get_node(i); }.bind(this)) : tmp; + }; + /** + * get an array of all bottom level checked nodes (ignoring selected parents) (if tie_selection is on in the settings this function will return the same as get_bottom_selected) + * @name get_bottom_checked([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + * @plugin checkbox + */ + this.get_bottom_checked = function (full) { + if(this.settings.checkbox.tie_selection) { return this.get_bottom_selected(full); } + var tmp = this.get_checked(true), + obj = [], i, j; + for(i = 0, j = tmp.length; i < j; i++) { + if(!tmp[i].children.length) { + obj.push(tmp[i].id); + } + } + return full ? $.map(obj, function (i) { return this.get_node(i); }.bind(this)) : obj; + }; + this.load_node = function (obj, callback) { + var k, l, i, j, c, tmp; + if(!$.vakata.is_array(obj) && !this.settings.checkbox.tie_selection) { + tmp = this.get_node(obj); + if(tmp && tmp.state.loaded) { + for(k = 0, l = tmp.children_d.length; k < l; k++) { + if(this._model.data[tmp.children_d[k]].state.checked) { + c = true; + this._data.checkbox.selected = $.vakata.array_remove_item(this._data.checkbox.selected, tmp.children_d[k]); + } + } + } + } + return parent.load_node.apply(this, arguments); + }; + this.get_state = function () { + var state = parent.get_state.apply(this, arguments); + if(this.settings.checkbox.tie_selection) { return state; } + state.checkbox = this._data.checkbox.selected.slice(); + return state; + }; + this.set_state = function (state, callback) { + var res = parent.set_state.apply(this, arguments); + if(res && state.checkbox) { + if(!this.settings.checkbox.tie_selection) { + this.uncheck_all(); + var _this = this; + $.each(state.checkbox, function (i, v) { + _this.check_node(v); + }); + } + delete state.checkbox; + this.set_state(state, callback); + return false; + } + return res; + }; + this.refresh = function (skip_loading, forget_state) { + if(this.settings.checkbox.tie_selection) { + this._data.checkbox.selected = []; + } + return parent.refresh.apply(this, arguments); + }; + }; + + // include the checkbox plugin by default + // $.jstree.defaults.plugins.push("checkbox"); + + +/** + * ### Conditionalselect plugin + * + * This plugin allows defining a callback to allow or deny node selection by user input (activate node method). + */ + + /** + * a callback (function) which is invoked in the instance's scope and receives two arguments - the node and the event that triggered the `activate_node` call. Returning false prevents working with the node, returning true allows invoking activate_node. Defaults to returning `true`. + * @name $.jstree.defaults.checkbox.visible + * @plugin checkbox + */ + $.jstree.defaults.conditionalselect = function () { return true; }; + $.jstree.plugins.conditionalselect = function (options, parent) { + // own function + this.activate_node = function (obj, e) { + if(this.settings.conditionalselect.call(this, this.get_node(obj), e)) { + return parent.activate_node.call(this, obj, e); + } + }; + }; + + +/** + * ### Contextmenu plugin + * + * Shows a context menu when a node is right-clicked. + */ + + /** + * stores all defaults for the contextmenu plugin + * @name $.jstree.defaults.contextmenu + * @plugin contextmenu + */ + $.jstree.defaults.contextmenu = { + /** + * a boolean indicating if the node should be selected when the context menu is invoked on it. Defaults to `true`. + * @name $.jstree.defaults.contextmenu.select_node + * @plugin contextmenu + */ + select_node : true, + /** + * a boolean indicating if the menu should be shown aligned with the node. Defaults to `true`, otherwise the mouse coordinates are used. + * @name $.jstree.defaults.contextmenu.show_at_node + * @plugin contextmenu + */ + show_at_node : true, + /** + * an object of actions, or a function that accepts a node and a callback function and calls the callback function with an object of actions available for that node (you can also return the items too). + * + * Each action consists of a key (a unique name) and a value which is an object with the following properties (only label and action are required). Once a menu item is activated the `action` function will be invoked with an object containing the following keys: item - the contextmenu item definition as seen below, reference - the DOM node that was used (the tree node), element - the contextmenu DOM element, position - an object with x/y properties indicating the position of the menu. + * + * * `separator_before` - a boolean indicating if there should be a separator before this item + * * `separator_after` - a boolean indicating if there should be a separator after this item + * * `_disabled` - a boolean indicating if this action should be disabled + * * `label` - a string - the name of the action (could be a function returning a string) + * * `title` - a string - an optional tooltip for the item + * * `action` - a function to be executed if this item is chosen, the function will receive + * * `icon` - a string, can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class + * * `shortcut` - keyCode which will trigger the action if the menu is open (for example `113` for rename, which equals F2) + * * `shortcut_label` - shortcut label (like for example `F2` for rename) + * * `submenu` - an object with the same structure as $.jstree.defaults.contextmenu.items which can be used to create a submenu - each key will be rendered as a separate option in a submenu that will appear once the current item is hovered + * + * @name $.jstree.defaults.contextmenu.items + * @plugin contextmenu + */ + items : function (o, cb) { // Could be an object directly + return { + "create" : { + "separator_before" : false, + "separator_after" : true, + "_disabled" : false, //(this.check("create_node", data.reference, {}, "last")), + "label" : "Create", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + inst.create_node(obj, {}, "last", function (new_node) { + try { + inst.edit(new_node); + } catch (ex) { + setTimeout(function () { inst.edit(new_node); },0); + } + }); + } + }, + "rename" : { + "separator_before" : false, + "separator_after" : false, + "_disabled" : false, //(this.check("rename_node", data.reference, this.get_parent(data.reference), "")), + "label" : "Rename", + /*! + "shortcut" : 113, + "shortcut_label" : 'F2', + "icon" : "glyphicon glyphicon-leaf", + */ + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + inst.edit(obj); + } + }, + "remove" : { + "separator_before" : false, + "icon" : false, + "separator_after" : false, + "_disabled" : false, //(this.check("delete_node", data.reference, this.get_parent(data.reference), "")), + "label" : "Delete", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + if(inst.is_selected(obj)) { + inst.delete_node(inst.get_selected()); + } + else { + inst.delete_node(obj); + } + } + }, + "ccp" : { + "separator_before" : true, + "icon" : false, + "separator_after" : false, + "label" : "Edit", + "action" : false, + "submenu" : { + "cut" : { + "separator_before" : false, + "separator_after" : false, + "label" : "Cut", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + if(inst.is_selected(obj)) { + inst.cut(inst.get_top_selected()); + } + else { + inst.cut(obj); + } + } + }, + "copy" : { + "separator_before" : false, + "icon" : false, + "separator_after" : false, + "label" : "Copy", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + if(inst.is_selected(obj)) { + inst.copy(inst.get_top_selected()); + } + else { + inst.copy(obj); + } + } + }, + "paste" : { + "separator_before" : false, + "icon" : false, + "_disabled" : function (data) { + return !$.jstree.reference(data.reference).can_paste(); + }, + "separator_after" : false, + "label" : "Paste", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + inst.paste(obj); + } + } + } + } + }; + } + }; + + $.jstree.plugins.contextmenu = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + + var last_ts = 0, cto = null, ex, ey; + this.element + .on("init.jstree loading.jstree ready.jstree", function () { + this.get_container_ul().addClass('jstree-contextmenu'); + }.bind(this)) + .on("contextmenu.jstree", ".jstree-anchor", function (e, data) { + if (e.target.tagName.toLowerCase() === 'input') { + return; + } + e.preventDefault(); + last_ts = e.ctrlKey ? +new Date() : 0; + if(data || cto) { + last_ts = (+new Date()) + 10000; + } + if(cto) { + clearTimeout(cto); + } + if(!this.is_loading(e.currentTarget)) { + this.show_contextmenu(e.currentTarget, e.pageX, e.pageY, e); + } + }.bind(this)) + .on("click.jstree", ".jstree-anchor", function (e) { + if(this._data.contextmenu.visible && (!last_ts || (+new Date()) - last_ts > 250)) { // work around safari & macOS ctrl+click + $.vakata.context.hide(); + } + last_ts = 0; + }.bind(this)) + .on("touchstart.jstree", ".jstree-anchor", function (e) { + if(!e.originalEvent || !e.originalEvent.changedTouches || !e.originalEvent.changedTouches[0]) { + return; + } + ex = e.originalEvent.changedTouches[0].clientX; + ey = e.originalEvent.changedTouches[0].clientY; + cto = setTimeout(function () { + $(e.currentTarget).trigger('contextmenu', true); + }, 750); + }) + .on('touchmove.vakata.jstree', function (e) { + if(cto && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0] && (Math.abs(ex - e.originalEvent.changedTouches[0].clientX) > 10 || Math.abs(ey - e.originalEvent.changedTouches[0].clientY) > 10)) { + clearTimeout(cto); + $.vakata.context.hide(); + } + }) + .on('touchend.vakata.jstree', function (e) { + if(cto) { + clearTimeout(cto); + } + }); + + /*! + if(!('oncontextmenu' in document.body) && ('ontouchstart' in document.body)) { + var el = null, tm = null; + this.element + .on("touchstart", ".jstree-anchor", function (e) { + el = e.currentTarget; + tm = +new Date(); + $(document).one("touchend", function (e) { + e.target = document.elementFromPoint(e.originalEvent.targetTouches[0].pageX - window.pageXOffset, e.originalEvent.targetTouches[0].pageY - window.pageYOffset); + e.currentTarget = e.target; + tm = ((+(new Date())) - tm); + if(e.target === el && tm > 600 && tm < 1000) { + e.preventDefault(); + $(el).trigger('contextmenu', e); + } + el = null; + tm = null; + }); + }); + } + */ + $(document).on("context_hide.vakata.jstree", function (e, data) { + this._data.contextmenu.visible = false; + $(data.reference).removeClass('jstree-context'); + }.bind(this)); + }; + this.teardown = function () { + if(this._data.contextmenu.visible) { + $.vakata.context.hide(); + } + $(document).off("context_hide.vakata.jstree"); + parent.teardown.call(this); + }; + + /** + * prepare and show the context menu for a node + * @name show_contextmenu(obj [, x, y]) + * @param {mixed} obj the node + * @param {Number} x the x-coordinate relative to the document to show the menu at + * @param {Number} y the y-coordinate relative to the document to show the menu at + * @param {Object} e the event if available that triggered the contextmenu + * @plugin contextmenu + * @trigger show_contextmenu.jstree + */ + this.show_contextmenu = function (obj, x, y, e) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + var s = this.settings.contextmenu, + d = this.get_node(obj, true), + a = d.children(".jstree-anchor"), + o = false, + i = false; + if(s.show_at_node || x === undefined || y === undefined) { + o = a.offset(); + x = o.left; + y = o.top + this._data.core.li_height; + } + if(this.settings.contextmenu.select_node && !this.is_selected(obj)) { + this.activate_node(obj, e); + } + + i = s.items; + if($.vakata.is_function(i)) { + i = i.call(this, obj, function (i) { + this._show_contextmenu(obj, x, y, i); + }.bind(this)); + } + if($.isPlainObject(i)) { + this._show_contextmenu(obj, x, y, i); + } + }; + /** + * show the prepared context menu for a node + * @name _show_contextmenu(obj, x, y, i) + * @param {mixed} obj the node + * @param {Number} x the x-coordinate relative to the document to show the menu at + * @param {Number} y the y-coordinate relative to the document to show the menu at + * @param {Number} i the object of items to show + * @plugin contextmenu + * @trigger show_contextmenu.jstree + * @private + */ + this._show_contextmenu = function (obj, x, y, i) { + var d = this.get_node(obj, true), + a = d.children(".jstree-anchor"); + $(document).one("context_show.vakata.jstree", function (e, data) { + var cls = 'jstree-contextmenu jstree-' + this.get_theme() + '-contextmenu'; + $(data.element).addClass(cls); + a.addClass('jstree-context'); + }.bind(this)); + this._data.contextmenu.visible = true; + $.vakata.context.show(a, { 'x' : x, 'y' : y }, i); + /** + * triggered when the contextmenu is shown for a node + * @event + * @name show_contextmenu.jstree + * @param {Object} node the node + * @param {Number} x the x-coordinate of the menu relative to the document + * @param {Number} y the y-coordinate of the menu relative to the document + * @plugin contextmenu + */ + this.trigger('show_contextmenu', { "node" : obj, "x" : x, "y" : y }); + }; + }; + + // contextmenu helper + (function ($) { + var right_to_left = false, + vakata_context = { + element : false, + reference : false, + position_x : 0, + position_y : 0, + items : [], + html : "", + is_visible : false + }; + + $.vakata.context = { + settings : { + hide_onmouseleave : 0, + icons : true + }, + _trigger : function (event_name) { + $(document).triggerHandler("context_" + event_name + ".vakata", { + "reference" : vakata_context.reference, + "element" : vakata_context.element, + "position" : { + "x" : vakata_context.position_x, + "y" : vakata_context.position_y + } + }); + }, + _execute : function (i) { + i = vakata_context.items[i]; + return i && (!i._disabled || ($.vakata.is_function(i._disabled) && !i._disabled({ "item" : i, "reference" : vakata_context.reference, "element" : vakata_context.element }))) && i.action ? i.action.call(null, { + "item" : i, + "reference" : vakata_context.reference, + "element" : vakata_context.element, + "position" : { + "x" : vakata_context.position_x, + "y" : vakata_context.position_y + } + }) : false; + }, + _parse : function (o, is_callback) { + if(!o) { return false; } + if(!is_callback) { + vakata_context.html = ""; + vakata_context.items = []; + } + var str = "", + sep = false, + tmp; + + if(is_callback) { str += "<"+"ul>"; } + $.each(o, function (i, val) { + if(!val) { return true; } + vakata_context.items.push(val); + if(!sep && val.separator_before) { + str += "<"+"li class='vakata-context-separator'><"+"a href='#' " + ($.vakata.context.settings.icons ? '' : 'class="vakata-context-no-icons"') + "> <"+"/a><"+"/li>"; + } + sep = false; + str += "<"+"li class='" + (val._class || "") + (val._disabled === true || ($.vakata.is_function(val._disabled) && val._disabled({ "item" : val, "reference" : vakata_context.reference, "element" : vakata_context.element })) ? " vakata-contextmenu-disabled " : "") + "' "+(val.shortcut?" data-shortcut='"+val.shortcut+"' ":'')+">"; + str += "<"+"a href='#' rel='" + (vakata_context.items.length - 1) + "' " + (val.title ? "title='" + val.title + "'" : "") + ">"; + if($.vakata.context.settings.icons) { + str += "<"+"i "; + if(val.icon) { + if(val.icon.indexOf("/") !== -1 || val.icon.indexOf(".") !== -1) { str += " style='background:url(\"" + val.icon + "\") center center no-repeat' "; } + else { str += " class='" + val.icon + "' "; } + } + str += "><"+"/i><"+"span class='vakata-contextmenu-sep'> <"+"/span>"; + } + str += ($.vakata.is_function(val.label) ? val.label({ "item" : i, "reference" : vakata_context.reference, "element" : vakata_context.element }) : val.label) + (val.shortcut?' '+ (val.shortcut_label || '') +'':'') + "<"+"/a>"; + if(val.submenu) { + tmp = $.vakata.context._parse(val.submenu, true); + if(tmp) { str += tmp; } + } + str += "<"+"/li>"; + if(val.separator_after) { + str += "<"+"li class='vakata-context-separator'><"+"a href='#' " + ($.vakata.context.settings.icons ? '' : 'class="vakata-context-no-icons"') + "> <"+"/a><"+"/li>"; + sep = true; + } + }); + str = str.replace(/
  • <\/li\>$/,""); + if(is_callback) { str += ""; } + /** + * triggered on the document when the contextmenu is parsed (HTML is built) + * @event + * @plugin contextmenu + * @name context_parse.vakata + * @param {jQuery} reference the element that was right clicked + * @param {jQuery} element the DOM element of the menu itself + * @param {Object} position the x & y coordinates of the menu + */ + if(!is_callback) { vakata_context.html = str; $.vakata.context._trigger("parse"); } + return str.length > 10 ? str : false; + }, + _show_submenu : function (o) { + o = $(o); + if(!o.length || !o.children("ul").length) { return; } + var e = o.children("ul"), + xl = o.offset().left, + x = xl + o.outerWidth(), + y = o.offset().top, + w = e.width(), + h = e.height(), + dw = $(window).width() + $(window).scrollLeft(), + dh = $(window).height() + $(window).scrollTop(); + // може да се спести е една проверка - дали няма някой от класовете вече нагоре + if(right_to_left) { + o[x - (w + 10 + o.outerWidth()) < 0 ? "addClass" : "removeClass"]("vakata-context-left"); + } + else { + o[x + w > dw && xl > dw - x ? "addClass" : "removeClass"]("vakata-context-right"); + } + if(y + h + 10 > dh) { + e.css("bottom","-1px"); + } + + //if does not fit - stick it to the side + if (o.hasClass('vakata-context-right')) { + if (xl < w) { + e.css("margin-right", xl - w); + } + } else { + if (dw - x < w) { + e.css("margin-left", dw - x - w); + } + } + + e.show(); + }, + show : function (reference, position, data) { + var o, e, x, y, w, h, dw, dh, cond = true; + if(vakata_context.element && vakata_context.element.length) { + vakata_context.element.width(''); + } + switch(cond) { + case (!position && !reference): + return false; + case (!!position && !!reference): + vakata_context.reference = reference; + vakata_context.position_x = position.x; + vakata_context.position_y = position.y; + break; + case (!position && !!reference): + vakata_context.reference = reference; + o = reference.offset(); + vakata_context.position_x = o.left + reference.outerHeight(); + vakata_context.position_y = o.top; + break; + case (!!position && !reference): + vakata_context.position_x = position.x; + vakata_context.position_y = position.y; + break; + } + if(!!reference && !data && $(reference).data('vakata_contextmenu')) { + data = $(reference).data('vakata_contextmenu'); + } + if($.vakata.context._parse(data)) { + vakata_context.element.html(vakata_context.html); + } + if(vakata_context.items.length) { + vakata_context.element.appendTo(document.body); + e = vakata_context.element; + x = vakata_context.position_x; + y = vakata_context.position_y; + w = e.width(); + h = e.height(); + dw = $(window).width() + $(window).scrollLeft(); + dh = $(window).height() + $(window).scrollTop(); + if(right_to_left) { + x -= (e.outerWidth() - $(reference).outerWidth()); + if(x < $(window).scrollLeft() + 20) { + x = $(window).scrollLeft() + 20; + } + } + if(x + w + 20 > dw) { + x = dw - (w + 20); + } + if(y + h + 20 > dh) { + y = dh - (h + 20); + } + + vakata_context.element + .css({ "left" : x, "top" : y }) + .show() + .find('a').first().trigger('focus').parent().addClass("vakata-context-hover"); + vakata_context.is_visible = true; + /** + * triggered on the document when the contextmenu is shown + * @event + * @plugin contextmenu + * @name context_show.vakata + * @param {jQuery} reference the element that was right clicked + * @param {jQuery} element the DOM element of the menu itself + * @param {Object} position the x & y coordinates of the menu + */ + $.vakata.context._trigger("show"); + } + }, + hide : function () { + if(vakata_context.is_visible) { + vakata_context.element.hide().find("ul").hide().end().find(':focus').trigger('blur').end().detach(); + vakata_context.is_visible = false; + /** + * triggered on the document when the contextmenu is hidden + * @event + * @plugin contextmenu + * @name context_hide.vakata + * @param {jQuery} reference the element that was right clicked + * @param {jQuery} element the DOM element of the menu itself + * @param {Object} position the x & y coordinates of the menu + */ + $.vakata.context._trigger("hide"); + } + } + }; + $(function () { + right_to_left = $(document.body).css("direction") === "rtl"; + var to = false; + + vakata_context.element = $("
      "); + vakata_context.element + .on("mouseenter", "li", function (e) { + e.stopImmediatePropagation(); + + if($.contains(this, e.relatedTarget)) { + // премахнато заради delegate mouseleave по-долу + // $(this).find(".vakata-context-hover").removeClass("vakata-context-hover"); + return; + } + + if(to) { clearTimeout(to); } + vakata_context.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(); + + $(this) + .siblings().find("ul").hide().end().end() + .parentsUntil(".vakata-context", "li").addBack().addClass("vakata-context-hover"); + $.vakata.context._show_submenu(this); + }) + // тестово - дали не натоварва? + .on("mouseleave", "li", function (e) { + if($.contains(this, e.relatedTarget)) { return; } + $(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover"); + }) + .on("mouseleave", function (e) { + $(this).find(".vakata-context-hover").removeClass("vakata-context-hover"); + if($.vakata.context.settings.hide_onmouseleave) { + to = setTimeout( + (function (t) { + return function () { $.vakata.context.hide(); }; + }(this)), $.vakata.context.settings.hide_onmouseleave); + } + }) + .on("click", "a", function (e) { + e.preventDefault(); + //}) + //.on("mouseup", "a", function (e) { + if(!$(this).trigger('blur').parent().hasClass("vakata-context-disabled") && $.vakata.context._execute($(this).attr("rel")) !== false) { + $.vakata.context.hide(); + } + }) + .on('keydown', 'a', function (e) { + var o = null; + switch(e.which) { + case 13: + case 32: + e.type = "click"; + e.preventDefault(); + $(e.currentTarget).trigger(e); + break; + case 37: + if(vakata_context.is_visible) { + vakata_context.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children('a').trigger('focus'); + e.stopImmediatePropagation(); + e.preventDefault(); + } + break; + case 38: + if(vakata_context.is_visible) { + o = vakata_context.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(); + if(!o.length) { o = vakata_context.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last(); } + o.addClass("vakata-context-hover").children('a').trigger('focus'); + e.stopImmediatePropagation(); + e.preventDefault(); + } + break; + case 39: + if(vakata_context.is_visible) { + vakata_context.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children('a').trigger('focus'); + e.stopImmediatePropagation(); + e.preventDefault(); + } + break; + case 40: + if(vakata_context.is_visible) { + o = vakata_context.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(); + if(!o.length) { o = vakata_context.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first(); } + o.addClass("vakata-context-hover").children('a').trigger('focus'); + e.stopImmediatePropagation(); + e.preventDefault(); + } + break; + case 27: + $.vakata.context.hide(); + e.preventDefault(); + break; + default: + //console.log(e.which); + break; + } + }) + .on('keydown', function (e) { + e.preventDefault(); + var a = vakata_context.element.find('.vakata-contextmenu-shortcut-' + e.which).parent(); + if(a.parent().not('.vakata-context-disabled')) { + a.trigger('click'); + } + }); + + $(document) + .on("mousedown.vakata.jstree", function (e) { + if(vakata_context.is_visible && vakata_context.element[0] !== e.target && !$.contains(vakata_context.element[0], e.target)) { + $.vakata.context.hide(); + } + }) + .on("context_show.vakata.jstree", function (e, data) { + vakata_context.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"); + if(right_to_left) { + vakata_context.element.addClass("vakata-context-rtl").css("direction", "rtl"); + } + // also apply a RTL class? + vakata_context.element.find("ul").hide().end(); + }); + }); + }($)); + // $.jstree.defaults.plugins.push("contextmenu"); + + +/** + * ### Drag'n'drop plugin + * + * Enables dragging and dropping of nodes in the tree, resulting in a move or copy operations. + */ + + /** + * stores all defaults for the drag'n'drop plugin + * @name $.jstree.defaults.dnd + * @plugin dnd + */ + $.jstree.defaults.dnd = { + /** + * a boolean indicating if a copy should be possible while dragging (by pressint the meta key or Ctrl). Defaults to `true`. + * @name $.jstree.defaults.dnd.copy + * @plugin dnd + */ + copy : true, + /** + * a number indicating how long a node should remain hovered while dragging to be opened. Defaults to `500`. + * @name $.jstree.defaults.dnd.open_timeout + * @plugin dnd + */ + open_timeout : 500, + /** + * a function invoked each time a node is about to be dragged, invoked in the tree's scope and receives the nodes about to be dragged as an argument (array) and the event that started the drag - return `false` to prevent dragging + * @name $.jstree.defaults.dnd.is_draggable + * @plugin dnd + */ + is_draggable : true, + /** + * a boolean indicating if checks should constantly be made while the user is dragging the node (as opposed to checking only on drop), default is `true` + * @name $.jstree.defaults.dnd.check_while_dragging + * @plugin dnd + */ + check_while_dragging : true, + /** + * a boolean indicating if nodes from this tree should only be copied with dnd (as opposed to moved), default is `false` + * @name $.jstree.defaults.dnd.always_copy + * @plugin dnd + */ + always_copy : false, + /** + * when dropping a node "inside", this setting indicates the position the node should go to - it can be an integer or a string: "first" (same as 0) or "last", default is `0` + * @name $.jstree.defaults.dnd.inside_pos + * @plugin dnd + */ + inside_pos : 0, + /** + * when starting the drag on a node that is selected this setting controls if all selected nodes are dragged or only the single node, default is `true`, which means all selected nodes are dragged when the drag is started on a selected node + * @name $.jstree.defaults.dnd.drag_selection + * @plugin dnd + */ + drag_selection : true, + /** + * controls whether dnd works on touch devices. If left as boolean true dnd will work the same as in desktop browsers, which in some cases may impair scrolling. If set to boolean false dnd will not work on touch devices. There is a special third option - string "selected" which means only selected nodes can be dragged on touch devices. + * @name $.jstree.defaults.dnd.touch + * @plugin dnd + */ + touch : true, + /** + * controls whether items can be dropped anywhere on the node, not just on the anchor, by default only the node anchor is a valid drop target. Works best with the wholerow plugin. If enabled on mobile depending on the interface it might be hard for the user to cancel the drop, since the whole tree container will be a valid drop target. + * @name $.jstree.defaults.dnd.large_drop_target + * @plugin dnd + */ + large_drop_target : false, + /** + * controls whether a drag can be initiated from any part of the node and not just the text/icon part, works best with the wholerow plugin. Keep in mind it can cause problems with tree scrolling on mobile depending on the interface - in that case set the touch option to "selected". + * @name $.jstree.defaults.dnd.large_drag_target + * @plugin dnd + */ + large_drag_target : false, + /** + * controls whether use HTML5 dnd api instead of classical. That will allow better integration of dnd events with other HTML5 controls. + * @reference http://caniuse.com/#feat=dragndrop + * @name $.jstree.defaults.dnd.use_html5 + * @plugin dnd + */ + use_html5: false, + /** + * controls whether items can be dropped anywhere on the tree. + * @name $.jstree.defaults.dnd.blank_space_drop + * @plugin dnd + */ + blank_space_drop: false + }; + var drg, elm; + // TODO: now check works by checking for each node individually, how about max_children, unique, etc? + $.jstree.plugins.dnd = function (options, parent) { + this.init = function (el, options) { + parent.init.call(this, el, options); + this.settings.dnd.use_html5 = this.settings.dnd.use_html5 && ('draggable' in document.createElement('span')); + }; + this.bind = function () { + parent.bind.call(this); + + this.element + .on(this.settings.dnd.use_html5 ? 'dragstart.jstree' : 'mousedown.jstree touchstart.jstree', this.settings.dnd.large_drag_target ? '.jstree-node' : '.jstree-anchor', function (e) { + if(this.settings.dnd.large_drag_target && $(e.target).closest('.jstree-node')[0] !== e.currentTarget) { + return true; + } + if(e.type === "touchstart" && (!this.settings.dnd.touch || (this.settings.dnd.touch === 'selected' && !$(e.currentTarget).closest('.jstree-node').children('.jstree-anchor').hasClass('jstree-clicked')))) { + return true; + } + var obj = this.get_node(e.target), + mlt = this.is_selected(obj) && this.settings.dnd.drag_selection ? this.get_top_selected().length : 1, + txt = (mlt > 1 ? mlt + ' ' + this.get_string('nodes') : this.get_text(e.currentTarget)); + if(this.settings.core.force_text) { + txt = $.vakata.html.escape(txt); + } + if(obj && (obj.id || obj.id === 0) && obj.id !== $.jstree.root && (e.which === 1 || e.type === "touchstart" || e.type === "dragstart") && + (this.settings.dnd.is_draggable === true || ($.vakata.is_function(this.settings.dnd.is_draggable) && this.settings.dnd.is_draggable.call(this, (mlt > 1 ? this.get_top_selected(true) : [obj]), e))) + ) { + drg = { 'jstree' : true, 'origin' : this, 'obj' : this.get_node(obj,true), 'nodes' : mlt > 1 ? this.get_top_selected() : [obj.id] }; + elm = e.currentTarget; + if (this.settings.dnd.use_html5) { + $.vakata.dnd._trigger('start', e, { 'helper': $(), 'element': elm, 'data': drg }); + } else { + this.element.trigger('mousedown.jstree'); + return $.vakata.dnd.start(e, drg, '
      ' + txt + '+
      '); + } + } + }.bind(this)); + if (this.settings.dnd.use_html5) { + this.element + .on('dragover.jstree', function (e) { + e.preventDefault(); + $.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg }); + return false; + }) + //.on('dragenter.jstree', this.settings.dnd.large_drop_target ? '.jstree-node' : '.jstree-anchor', $.proxy(function (e) { + // e.preventDefault(); + // $.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg }); + // return false; + // }, this)) + .on('drop.jstree', function (e) { + e.preventDefault(); + $.vakata.dnd._trigger('stop', e, { 'helper': $(), 'element': elm, 'data': drg }); + return false; + }.bind(this)); + } + }; + this.redraw_node = function(obj, deep, callback, force_render) { + obj = parent.redraw_node.apply(this, arguments); + if (obj && this.settings.dnd.use_html5) { + if (this.settings.dnd.large_drag_target) { + obj.setAttribute('draggable', true); + } else { + var i, j, tmp = null; + for(i = 0, j = obj.childNodes.length; i < j; i++) { + if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf("jstree-anchor") !== -1) { + tmp = obj.childNodes[i]; + break; + } + } + if(tmp) { + tmp.setAttribute('draggable', true); + } + } + } + return obj; + }; + }; + + $(function() { + // bind only once for all instances + var lastmv = false, + laster = false, + lastev = false, + opento = false, + marker = $('
       
      ').hide(); //.appendTo('body'); + + $(document) + .on('dragover.vakata.jstree', function (e) { + if (elm) { + $.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg }); + } + }) + .on('drop.vakata.jstree', function (e) { + if (elm) { + $.vakata.dnd._trigger('stop', e, { 'helper': $(), 'element': elm, 'data': drg }); + elm = null; + drg = null; + } + }) + .on('dnd_start.vakata.jstree', function (e, data) { + lastmv = false; + lastev = false; + if(!data || !data.data || !data.data.jstree) { return; } + marker.appendTo(document.body); //.show(); + }) + .on('dnd_move.vakata.jstree', function (e, data) { + var isDifferentNode = data.event.target !== lastev.target; + if(opento) { + if (!data.event || data.event.type !== 'dragover' || isDifferentNode) { + clearTimeout(opento); + } + } + if(!data || !data.data || !data.data.jstree) { return; } + + // if we are hovering the marker image do nothing (can happen on "inside" drags) + if(data.event.target.id && data.event.target.id === 'jstree-marker') { + return; + } + lastev = data.event; + + var ins = $.jstree.reference(data.event.target), + ref = false, + off = false, + rel = false, + tmp, l, t, h, p, i, o, ok, t1, t2, op, ps, pr, ip, tm, is_copy, pn, c; + // if we are over an instance + if(ins && ins._data && ins._data.dnd) { + marker.attr('class', 'jstree-' + ins.get_theme() + ( ins.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' )); + is_copy = data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))); + data.helper + .children().attr('class', 'jstree-' + ins.get_theme() + ' jstree-' + ins.get_theme() + '-' + ins.get_theme_variant() + ' ' + ( ins.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' )) + .find('.jstree-copy').first()[ is_copy ? 'show' : 'hide' ](); + + // if are hovering the container itself add a new root node + //console.log(data.event); + if( (data.event.target === ins.element[0] || data.event.target === ins.get_container_ul()[0]) && (ins.get_container_ul().children().length === 0 || ins.settings.dnd.blank_space_drop)) { + ok = true; + for(t1 = 0, t2 = data.data.nodes.length; t1 < t2; t1++) { + ok = ok && ins.check( (data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey)) ) ? "copy_node" : "move_node"), (data.data.origin && data.data.origin !== ins ? data.data.origin.get_node(data.data.nodes[t1]) : data.data.nodes[t1]), $.jstree.root, 'last', { 'dnd' : true, 'ref' : ins.get_node($.jstree.root), 'pos' : 'i', 'origin' : data.data.origin, 'is_multi' : (data.data.origin && data.data.origin !== ins), 'is_foreign' : (!data.data.origin) }); + if(!ok) { break; } + } + if(ok) { + lastmv = { 'ins' : ins, 'par' : $.jstree.root, 'pos' : 'last' }; + marker.hide(); + data.helper.find('.jstree-icon').first().removeClass('jstree-er').addClass('jstree-ok'); + if (data.event.originalEvent && data.event.originalEvent.dataTransfer) { + data.event.originalEvent.dataTransfer.dropEffect = is_copy ? 'copy' : 'move'; + } + return; + } + } + else { + // if we are hovering a tree node + ref = ins.settings.dnd.large_drop_target ? $(data.event.target).closest('.jstree-node').children('.jstree-anchor') : $(data.event.target).closest('.jstree-anchor'); + + if(ref && ref.length && ref.parent().is('.jstree-closed, .jstree-open, .jstree-leaf')) { + off = ref.offset(); + rel = (data.event.pageY !== undefined ? data.event.pageY : data.event.originalEvent.pageY) - off.top; + h = ref.outerHeight(); + if(rel < h / 3) { + o = ['b', 'i', 'a']; + } + else if(rel > h - h / 3) { + o = ['a', 'i', 'b']; + } + else { + o = rel > h / 2 ? ['i', 'a', 'b'] : ['i', 'b', 'a']; + } + $.each(o, function (j, v) { + switch(v) { + case 'b': + l = off.left - 6; + t = off.top; + p = ins.get_parent(ref); + i = ref.parent().index(); + c = 'jstree-below'; + break; + case 'i': + ip = ins.settings.dnd.inside_pos; + tm = ins.get_node(ref.parent()); + l = off.left - 2; + t = off.top + h / 2 + 1; + p = tm.id; + i = ip === 'first' ? 0 : (ip === 'last' ? tm.children.length : Math.min(ip, tm.children.length)); + c = 'jstree-inside'; + break; + case 'a': + l = off.left - 6; + t = off.top + h; + p = ins.get_parent(ref); + i = ref.parent().index() + 1; + c = 'jstree-above'; + break; + } + ok = true; + for(t1 = 0, t2 = data.data.nodes.length; t1 < t2; t1++) { + op = data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))) ? "copy_node" : "move_node"; + ps = i; + if(op === "move_node" && v === 'a' && (data.data.origin && data.data.origin === ins) && p === ins.get_parent(data.data.nodes[t1])) { + pr = ins.get_node(p); + if(ps > $.inArray(data.data.nodes[t1], pr.children)) { + ps -= 1; + } + } + ok = ok && ( (ins && ins.settings && ins.settings.dnd && ins.settings.dnd.check_while_dragging === false) || ins.check(op, (data.data.origin && data.data.origin !== ins ? data.data.origin.get_node(data.data.nodes[t1]) : data.data.nodes[t1]), p, ps, { 'dnd' : true, 'ref' : ins.get_node(ref.parent()), 'pos' : v, 'origin' : data.data.origin, 'is_multi' : (data.data.origin && data.data.origin !== ins), 'is_foreign' : (!data.data.origin) }) ); + if(!ok) { + if(ins && ins.last_error) { laster = ins.last_error(); } + break; + } + } + if(v === 'i' && ref.parent().is('.jstree-closed') && ins.settings.dnd.open_timeout) { + if (!data.event || data.event.type !== 'dragover' || isDifferentNode) { + if (opento) { clearTimeout(opento); } + opento = setTimeout((function (x, z) { return function () { x.open_node(z); }; }(ins, ref)), ins.settings.dnd.open_timeout); + } + } + if(ok) { + pn = ins.get_node(p, true); + if (!pn.hasClass('.jstree-dnd-parent')) { + $('.jstree-dnd-parent').removeClass('jstree-dnd-parent'); + pn.addClass('jstree-dnd-parent'); + } + lastmv = { 'ins' : ins, 'par' : p, 'pos' : v === 'i' && ip === 'last' && i === 0 && !ins.is_loaded(tm) ? 'last' : i }; + marker.css({ 'left' : l + 'px', 'top' : t + 'px' }).show(); + marker.removeClass('jstree-above jstree-inside jstree-below').addClass(c); + data.helper.find('.jstree-icon').first().removeClass('jstree-er').addClass('jstree-ok'); + if (data.event.originalEvent && data.event.originalEvent.dataTransfer) { + data.event.originalEvent.dataTransfer.dropEffect = is_copy ? 'copy' : 'move'; + } + laster = {}; + o = true; + return false; + } + }); + if(o === true) { return; } + } + } + } + $('.jstree-dnd-parent').removeClass('jstree-dnd-parent'); + lastmv = false; + data.helper.find('.jstree-icon').removeClass('jstree-ok').addClass('jstree-er'); + if (data.event.originalEvent && data.event.originalEvent.dataTransfer) { + //data.event.originalEvent.dataTransfer.dropEffect = 'none'; + } + marker.hide(); + }) + .on('dnd_scroll.vakata.jstree', function (e, data) { + if(!data || !data.data || !data.data.jstree) { return; } + marker.hide(); + lastmv = false; + lastev = false; + data.helper.find('.jstree-icon').first().removeClass('jstree-ok').addClass('jstree-er'); + }) + .on('dnd_stop.vakata.jstree', function (e, data) { + $('.jstree-dnd-parent').removeClass('jstree-dnd-parent'); + if(opento) { clearTimeout(opento); } + if(!data || !data.data || !data.data.jstree) { return; } + marker.hide().detach(); + var i, j, nodes = []; + if(lastmv) { + for(i = 0, j = data.data.nodes.length; i < j; i++) { + nodes[i] = data.data.origin ? data.data.origin.get_node(data.data.nodes[i]) : data.data.nodes[i]; + } + lastmv.ins[ data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))) ? 'copy_node' : 'move_node' ](nodes, lastmv.par, lastmv.pos, false, false, false, data.data.origin); + } + else { + i = $(data.event.target).closest('.jstree'); + if(i.length && laster && laster.error && laster.error === 'check') { + i = i.jstree(true); + if(i) { + i.settings.core.error.call(this, laster); + } + } + } + lastev = false; + lastmv = false; + }) + .on('keyup.jstree keydown.jstree', function (e, data) { + data = $.vakata.dnd._get(); + if(data && data.data && data.data.jstree) { + if (e.type === "keyup" && e.which === 27) { + if (opento) { clearTimeout(opento); } + lastmv = false; + laster = false; + lastev = false; + opento = false; + marker.hide().detach(); + $.vakata.dnd._clean(); + } else { + data.helper.find('.jstree-copy').first()[ data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (e.metaKey || e.ctrlKey))) ? 'show' : 'hide' ](); + if(lastev) { + lastev.metaKey = e.metaKey; + lastev.ctrlKey = e.ctrlKey; + $.vakata.dnd._trigger('move', lastev); + } + } + } + }); + }); + + // helpers + (function ($) { + $.vakata.html = { + div : $('
      '), + escape : function (str) { + return $.vakata.html.div.text(str).html(); + }, + strip : function (str) { + return $.vakata.html.div.empty().append($.parseHTML(str)).text(); + } + }; + // private variable + var vakata_dnd = { + element : false, + target : false, + is_down : false, + is_drag : false, + helper : false, + helper_w: 0, + data : false, + init_x : 0, + init_y : 0, + scroll_l: 0, + scroll_t: 0, + scroll_e: false, + scroll_i: false, + is_touch: false + }; + $.vakata.dnd = { + settings : { + scroll_speed : 10, + scroll_proximity : 20, + helper_left : 5, + helper_top : 10, + threshold : 5, + threshold_touch : 10 + }, + _trigger : function (event_name, e, data) { + if (data === undefined) { + data = $.vakata.dnd._get(); + } + data.event = e; + $(document).triggerHandler("dnd_" + event_name + ".vakata", data); + }, + _get : function () { + return { + "data" : vakata_dnd.data, + "element" : vakata_dnd.element, + "helper" : vakata_dnd.helper + }; + }, + _clean : function () { + if(vakata_dnd.helper) { vakata_dnd.helper.remove(); } + if(vakata_dnd.scroll_i) { clearInterval(vakata_dnd.scroll_i); vakata_dnd.scroll_i = false; } + vakata_dnd = { + element : false, + target : false, + is_down : false, + is_drag : false, + helper : false, + helper_w: 0, + data : false, + init_x : 0, + init_y : 0, + scroll_l: 0, + scroll_t: 0, + scroll_e: false, + scroll_i: false, + is_touch: false + }; + elm = null; + $(document).off("mousemove.vakata.jstree touchmove.vakata.jstree", $.vakata.dnd.drag); + $(document).off("mouseup.vakata.jstree touchend.vakata.jstree", $.vakata.dnd.stop); + }, + _scroll : function (init_only) { + if(!vakata_dnd.scroll_e || (!vakata_dnd.scroll_l && !vakata_dnd.scroll_t)) { + if(vakata_dnd.scroll_i) { clearInterval(vakata_dnd.scroll_i); vakata_dnd.scroll_i = false; } + return false; + } + if(!vakata_dnd.scroll_i) { + vakata_dnd.scroll_i = setInterval($.vakata.dnd._scroll, 100); + return false; + } + if(init_only === true) { return false; } + + var i = vakata_dnd.scroll_e.scrollTop(), + j = vakata_dnd.scroll_e.scrollLeft(); + vakata_dnd.scroll_e.scrollTop(i + vakata_dnd.scroll_t * $.vakata.dnd.settings.scroll_speed); + vakata_dnd.scroll_e.scrollLeft(j + vakata_dnd.scroll_l * $.vakata.dnd.settings.scroll_speed); + if(i !== vakata_dnd.scroll_e.scrollTop() || j !== vakata_dnd.scroll_e.scrollLeft()) { + /** + * triggered on the document when a drag causes an element to scroll + * @event + * @plugin dnd + * @name dnd_scroll.vakata + * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start + * @param {DOM} element the DOM element being dragged + * @param {jQuery} helper the helper shown next to the mouse + * @param {jQuery} event the element that is scrolling + */ + $.vakata.dnd._trigger("scroll", vakata_dnd.scroll_e); + } + }, + start : function (e, data, html) { + if(e.type === "touchstart" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) { + e.pageX = e.originalEvent.changedTouches[0].pageX; + e.pageY = e.originalEvent.changedTouches[0].pageY; + e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset); + } + if(vakata_dnd.is_drag) { $.vakata.dnd.stop({}); } + try { + e.currentTarget.unselectable = "on"; + e.currentTarget.onselectstart = function() { return false; }; + if(e.currentTarget.style) { + e.currentTarget.style.touchAction = "none"; + e.currentTarget.style.msTouchAction = "none"; + e.currentTarget.style.MozUserSelect = "none"; + } + } catch(ignore) { } + vakata_dnd.init_x = e.pageX; + vakata_dnd.init_y = e.pageY; + vakata_dnd.data = data; + vakata_dnd.is_down = true; + vakata_dnd.element = e.currentTarget; + vakata_dnd.target = e.target; + vakata_dnd.is_touch = e.type === "touchstart"; + if(html !== false) { + vakata_dnd.helper = $("
      ").html(html).css({ + "display" : "block", + "margin" : "0", + "padding" : "0", + "position" : "absolute", + "top" : "-2000px", + "lineHeight" : "16px", + "zIndex" : "10000" + }); + } + $(document).on("mousemove.vakata.jstree touchmove.vakata.jstree", $.vakata.dnd.drag); + $(document).on("mouseup.vakata.jstree touchend.vakata.jstree", $.vakata.dnd.stop); + return false; + }, + drag : function (e) { + if(e.type === "touchmove" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) { + e.pageX = e.originalEvent.changedTouches[0].pageX; + e.pageY = e.originalEvent.changedTouches[0].pageY; + e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset); + } + if(!vakata_dnd.is_down) { return; } + if(!vakata_dnd.is_drag) { + if( + Math.abs(e.pageX - vakata_dnd.init_x) > (vakata_dnd.is_touch ? $.vakata.dnd.settings.threshold_touch : $.vakata.dnd.settings.threshold) || + Math.abs(e.pageY - vakata_dnd.init_y) > (vakata_dnd.is_touch ? $.vakata.dnd.settings.threshold_touch : $.vakata.dnd.settings.threshold) + ) { + if(vakata_dnd.helper) { + vakata_dnd.helper.appendTo(document.body); + vakata_dnd.helper_w = vakata_dnd.helper.outerWidth(); + } + vakata_dnd.is_drag = true; + $(vakata_dnd.target).one('click.vakata', false); + /** + * triggered on the document when a drag starts + * @event + * @plugin dnd + * @name dnd_start.vakata + * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start + * @param {DOM} element the DOM element being dragged + * @param {jQuery} helper the helper shown next to the mouse + * @param {Object} event the event that caused the start (probably mousemove) + */ + $.vakata.dnd._trigger("start", e); + } + else { return; } + } + + var d = false, w = false, + dh = false, wh = false, + dw = false, ww = false, + dt = false, dl = false, + ht = false, hl = false; + + vakata_dnd.scroll_t = 0; + vakata_dnd.scroll_l = 0; + vakata_dnd.scroll_e = false; + $($(e.target).parentsUntil("body").addBack().get().reverse()) + .filter(function () { + return this.ownerDocument && (/^auto|scroll$/).test($(this).css("overflow")) && + (this.scrollHeight > this.offsetHeight || this.scrollWidth > this.offsetWidth); + }) + .each(function () { + var t = $(this), o = t.offset(); + if(this.scrollHeight > this.offsetHeight) { + if(o.top + t.height() - e.pageY < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = 1; } + if(e.pageY - o.top < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = -1; } + } + if(this.scrollWidth > this.offsetWidth) { + if(o.left + t.width() - e.pageX < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = 1; } + if(e.pageX - o.left < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = -1; } + } + if(vakata_dnd.scroll_t || vakata_dnd.scroll_l) { + vakata_dnd.scroll_e = $(this); + return false; + } + }); + + if(!vakata_dnd.scroll_e) { + d = $(document); w = $(window); + dh = d.height(); wh = w.height(); + dw = d.width(); ww = w.width(); + dt = d.scrollTop(); dl = d.scrollLeft(); + if(dh > wh && e.pageY - dt < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = -1; } + if(dh > wh && wh - (e.pageY - dt) < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = 1; } + if(dw > ww && e.pageX - dl < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = -1; } + if(dw > ww && ww - (e.pageX - dl) < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = 1; } + if(vakata_dnd.scroll_t || vakata_dnd.scroll_l) { + vakata_dnd.scroll_e = d; + } + } + if(vakata_dnd.scroll_e) { $.vakata.dnd._scroll(true); } + + if(vakata_dnd.helper) { + ht = parseInt(e.pageY + $.vakata.dnd.settings.helper_top, 10); + hl = parseInt(e.pageX + $.vakata.dnd.settings.helper_left, 10); + if(dh && ht + 25 > dh) { ht = dh - 50; } + if(dw && hl + vakata_dnd.helper_w > dw) { hl = dw - (vakata_dnd.helper_w + 2); } + vakata_dnd.helper.css({ + left : hl + "px", + top : ht + "px" + }); + } + /** + * triggered on the document when a drag is in progress + * @event + * @plugin dnd + * @name dnd_move.vakata + * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start + * @param {DOM} element the DOM element being dragged + * @param {jQuery} helper the helper shown next to the mouse + * @param {Object} event the event that caused this to trigger (most likely mousemove) + */ + $.vakata.dnd._trigger("move", e); + return false; + }, + stop : function (e) { + if(e.type === "touchend" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) { + e.pageX = e.originalEvent.changedTouches[0].pageX; + e.pageY = e.originalEvent.changedTouches[0].pageY; + e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset); + } + if(vakata_dnd.is_drag) { + /** + * triggered on the document when a drag stops (the dragged element is dropped) + * @event + * @plugin dnd + * @name dnd_stop.vakata + * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start + * @param {DOM} element the DOM element being dragged + * @param {jQuery} helper the helper shown next to the mouse + * @param {Object} event the event that caused the stop + */ + if (e.target !== vakata_dnd.target) { + $(vakata_dnd.target).off('click.vakata'); + } + $.vakata.dnd._trigger("stop", e); + } + else { + if(e.type === "touchend" && e.target === vakata_dnd.target) { + var to = setTimeout(function () { $(e.target).trigger('click'); }, 100); + $(e.target).one('click', function() { if(to) { clearTimeout(to); } }); + } + } + $.vakata.dnd._clean(); + return false; + } + }; + }($)); + + // include the dnd plugin by default + // $.jstree.defaults.plugins.push("dnd"); + + +/** + * ### Massload plugin + * + * Adds massload functionality to jsTree, so that multiple nodes can be loaded in a single request (only useful with lazy loading). + */ + + /** + * massload configuration + * + * It is possible to set this to a standard jQuery-like AJAX config. + * In addition to the standard jQuery ajax options here you can supply functions for `data` and `url`, the functions will be run in the current instance's scope and a param will be passed indicating which node IDs need to be loaded, the return value of those functions will be used. + * + * You can also set this to a function, that function will receive the node IDs being loaded as argument and a second param which is a function (callback) which should be called with the result. + * + * Both the AJAX and the function approach rely on the same return value - an object where the keys are the node IDs, and the value is the children of that node as an array. + * + * { + * "id1" : [{ "text" : "Child of ID1", "id" : "c1" }, { "text" : "Another child of ID1", "id" : "c2" }], + * "id2" : [{ "text" : "Child of ID2", "id" : "c3" }] + * } + * + * @name $.jstree.defaults.massload + * @plugin massload + */ + $.jstree.defaults.massload = null; + $.jstree.plugins.massload = function (options, parent) { + this.init = function (el, options) { + this._data.massload = {}; + parent.init.call(this, el, options); + }; + this._load_nodes = function (nodes, callback, is_callback, force_reload) { + var s = this.settings.massload, + toLoad = [], + m = this._model.data, + i, j, dom; + if (!is_callback) { + for(i = 0, j = nodes.length; i < j; i++) { + if(!m[nodes[i]] || ( (!m[nodes[i]].state.loaded && !m[nodes[i]].state.failed) || force_reload) ) { + toLoad.push(nodes[i]); + dom = this.get_node(nodes[i], true); + if (dom && dom.length) { + dom.addClass("jstree-loading").attr('aria-busy',true); + } + } + } + this._data.massload = {}; + if (toLoad.length) { + if($.vakata.is_function(s)) { + return s.call(this, toLoad, function (data) { + var i, j; + if(data) { + for(i in data) { + if(data.hasOwnProperty(i)) { + this._data.massload[i] = data[i]; + } + } + } + for(i = 0, j = nodes.length; i < j; i++) { + dom = this.get_node(nodes[i], true); + if (dom && dom.length) { + dom.removeClass("jstree-loading").attr('aria-busy',false); + } + } + parent._load_nodes.call(this, nodes, callback, is_callback, force_reload); + }.bind(this)); + } + if(typeof s === 'object' && s && s.url) { + s = $.extend(true, {}, s); + if($.vakata.is_function(s.url)) { + s.url = s.url.call(this, toLoad); + } + if($.vakata.is_function(s.data)) { + s.data = s.data.call(this, toLoad); + } + return $.ajax(s) + .done(function (data,t,x) { + var i, j; + if(data) { + for(i in data) { + if(data.hasOwnProperty(i)) { + this._data.massload[i] = data[i]; + } + } + } + for(i = 0, j = nodes.length; i < j; i++) { + dom = this.get_node(nodes[i], true); + if (dom && dom.length) { + dom.removeClass("jstree-loading").attr('aria-busy',false); + } + } + parent._load_nodes.call(this, nodes, callback, is_callback, force_reload); + }.bind(this)) + .fail(function (f) { + parent._load_nodes.call(this, nodes, callback, is_callback, force_reload); + }.bind(this)); + } + } + } + return parent._load_nodes.call(this, nodes, callback, is_callback, force_reload); + }; + this._load_node = function (obj, callback) { + var data = this._data.massload[obj.id], + rslt = null, dom; + if(data) { + rslt = this[typeof data === 'string' ? '_append_html_data' : '_append_json_data']( + obj, + typeof data === 'string' ? $($.parseHTML(data)).filter(function () { return this.nodeType !== 3; }) : data, + function (status) { callback.call(this, status); } + ); + dom = this.get_node(obj.id, true); + if (dom && dom.length) { + dom.removeClass("jstree-loading").attr('aria-busy',false); + } + delete this._data.massload[obj.id]; + return rslt; + } + return parent._load_node.call(this, obj, callback); + }; + }; + + +/** + * ### Search plugin + * + * Adds search functionality to jsTree. + */ + + /** + * stores all defaults for the search plugin + * @name $.jstree.defaults.search + * @plugin search + */ + $.jstree.defaults.search = { + /** + * a jQuery-like AJAX config, which jstree uses if a server should be queried for results. + * + * A `str` (which is the search string) parameter will be added with the request, an optional `inside` parameter will be added if the search is limited to a node id. The expected result is a JSON array with nodes that need to be opened so that matching nodes will be revealed. + * Leave this setting as `false` to not query the server. You can also set this to a function, which will be invoked in the instance's scope and receive 3 parameters - the search string, the callback to call with the array of nodes to load, and the optional node ID to limit the search to + * @name $.jstree.defaults.search.ajax + * @plugin search + */ + ajax : false, + /** + * Indicates if the search should be fuzzy or not (should `chnd3` match `child node 3`). Default is `false`. + * @name $.jstree.defaults.search.fuzzy + * @plugin search + */ + fuzzy : false, + /** + * Indicates if the search should be case sensitive. Default is `false`. + * @name $.jstree.defaults.search.case_sensitive + * @plugin search + */ + case_sensitive : false, + /** + * Indicates if the tree should be filtered (by default) to show only matching nodes (keep in mind this can be a heavy on large trees in old browsers). + * This setting can be changed at runtime when calling the search method. Default is `false`. + * @name $.jstree.defaults.search.show_only_matches + * @plugin search + */ + show_only_matches : false, + /** + * Indicates if the children of matched element are shown (when show_only_matches is true) + * This setting can be changed at runtime when calling the search method. Default is `false`. + * @name $.jstree.defaults.search.show_only_matches_children + * @plugin search + */ + show_only_matches_children : false, + /** + * Indicates if all nodes opened to reveal the search result, should be closed when the search is cleared or a new search is performed. Default is `true`. + * @name $.jstree.defaults.search.close_opened_onclear + * @plugin search + */ + close_opened_onclear : true, + /** + * Indicates if only leaf nodes should be included in search results. Default is `false`. + * @name $.jstree.defaults.search.search_leaves_only + * @plugin search + */ + search_leaves_only : false, + /** + * If set to a function it wil be called in the instance's scope with two arguments - search string and node (where node will be every node in the structure, so use with caution). + * If the function returns a truthy value the node will be considered a match (it might not be displayed if search_only_leaves is set to true and the node is not a leaf). Default is `false`. + * @name $.jstree.defaults.search.search_callback + * @plugin search + */ + search_callback : false + }; + + $.jstree.plugins.search = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + + this._data.search.str = ""; + this._data.search.dom = $(); + this._data.search.res = []; + this._data.search.opn = []; + this._data.search.som = false; + this._data.search.smc = false; + this._data.search.hdn = []; + + this.element + .on("search.jstree", function (e, data) { + if(this._data.search.som && data.res.length) { + var m = this._model.data, i, j, p = [], k, l; + for(i = 0, j = data.res.length; i < j; i++) { + if(m[data.res[i]] && !m[data.res[i]].state.hidden) { + p.push(data.res[i]); + p = p.concat(m[data.res[i]].parents); + if(this._data.search.smc) { + for (k = 0, l = m[data.res[i]].children_d.length; k < l; k++) { + if (m[m[data.res[i]].children_d[k]] && !m[m[data.res[i]].children_d[k]].state.hidden) { + p.push(m[data.res[i]].children_d[k]); + } + } + } + } + } + p = $.vakata.array_remove_item($.vakata.array_unique(p), $.jstree.root); + this._data.search.hdn = this.hide_all(true); + this.show_node(p, true); + this.redraw(true); + } + }.bind(this)) + .on("clear_search.jstree", function (e, data) { + if(this._data.search.som && data.res.length) { + this.show_node(this._data.search.hdn, true); + this.redraw(true); + } + }.bind(this)); + }; + /** + * used to search the tree nodes for a given string + * @name search(str [, skip_async]) + * @param {String} str the search string + * @param {Boolean} skip_async if set to true server will not be queried even if configured + * @param {Boolean} show_only_matches if set to true only matching nodes will be shown (keep in mind this can be very slow on large trees or old browsers) + * @param {mixed} inside an optional node to whose children to limit the search + * @param {Boolean} append if set to true the results of this search are appended to the previous search + * @plugin search + * @trigger search.jstree + */ + this.search = function (str, skip_async, show_only_matches, inside, append, show_only_matches_children) { + if(str === false || $.vakata.trim(str.toString()) === "") { + return this.clear_search(); + } + inside = this.get_node(inside); + inside = inside && (inside.id || inside.id === 0) ? inside.id : null; + str = str.toString(); + var s = this.settings.search, + a = s.ajax ? s.ajax : false, + m = this._model.data, + f = null, + r = [], + p = [], i, j; + if(this._data.search.res.length && !append) { + this.clear_search(); + } + if(show_only_matches === undefined) { + show_only_matches = s.show_only_matches; + } + if(show_only_matches_children === undefined) { + show_only_matches_children = s.show_only_matches_children; + } + if(!skip_async && a !== false) { + if($.vakata.is_function(a)) { + return a.call(this, str, function (d) { + if(d && d.d) { d = d.d; } + this._load_nodes(!$.vakata.is_array(d) ? [] : $.vakata.array_unique(d), function () { + this.search(str, true, show_only_matches, inside, append, show_only_matches_children); + }); + }.bind(this), inside); + } + else { + a = $.extend({}, a); + if(!a.data) { a.data = {}; } + a.data.str = str; + if(inside) { + a.data.inside = inside; + } + if (this._data.search.lastRequest) { + this._data.search.lastRequest.abort(); + } + this._data.search.lastRequest = $.ajax(a) + .fail(function () { + this._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'search', 'id' : 'search_01', 'reason' : 'Could not load search parents', 'data' : JSON.stringify(a) }; + this.settings.core.error.call(this, this._data.core.last_error); + }.bind(this)) + .done(function (d) { + if(d && d.d) { d = d.d; } + this._load_nodes(!$.vakata.is_array(d) ? [] : $.vakata.array_unique(d), function () { + this.search(str, true, show_only_matches, inside, append, show_only_matches_children); + }); + }.bind(this)); + return this._data.search.lastRequest; + } + } + if(!append) { + this._data.search.str = str; + this._data.search.dom = $(); + this._data.search.res = []; + this._data.search.opn = []; + this._data.search.som = show_only_matches; + this._data.search.smc = show_only_matches_children; + } + + f = new $.vakata.search(str, true, { caseSensitive : s.case_sensitive, fuzzy : s.fuzzy }); + $.each(m[inside ? inside : $.jstree.root].children_d, function (ii, i) { + var v = m[i]; + if(v.text && !v.state.hidden && (!s.search_leaves_only || (v.state.loaded && v.children.length === 0)) && ( (s.search_callback && s.search_callback.call(this, str, v)) || (!s.search_callback && f.search(v.text).isMatch) ) ) { + r.push(i); + p = p.concat(v.parents); + } + }); + if(r.length) { + p = $.vakata.array_unique(p); + for(i = 0, j = p.length; i < j; i++) { + if(p[i] !== $.jstree.root && m[p[i]] && this.open_node(p[i], null, 0) === true) { + this._data.search.opn.push(p[i]); + } + } + if(!append) { + this._data.search.dom = $(this.element[0].querySelectorAll('#' + $.map(r, function (v) { return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&'); }).join(', #'))); + this._data.search.res = r; + } + else { + this._data.search.dom = this._data.search.dom.add($(this.element[0].querySelectorAll('#' + $.map(r, function (v) { return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&'); }).join(', #')))); + this._data.search.res = $.vakata.array_unique(this._data.search.res.concat(r)); + } + this._data.search.dom.children(".jstree-anchor").addClass('jstree-search'); + } + /** + * triggered after search is complete + * @event + * @name search.jstree + * @param {jQuery} nodes a jQuery collection of matching nodes + * @param {String} str the search string + * @param {Array} res a collection of objects represeing the matching nodes + * @plugin search + */ + this.trigger('search', { nodes : this._data.search.dom, str : str, res : this._data.search.res, show_only_matches : show_only_matches }); + }; + /** + * used to clear the last search (removes classes and shows all nodes if filtering is on) + * @name clear_search() + * @plugin search + * @trigger clear_search.jstree + */ + this.clear_search = function () { + if(this.settings.search.close_opened_onclear) { + this.close_node(this._data.search.opn, 0); + } + /** + * triggered after search is complete + * @event + * @name clear_search.jstree + * @param {jQuery} nodes a jQuery collection of matching nodes (the result from the last search) + * @param {String} str the search string (the last search string) + * @param {Array} res a collection of objects represeing the matching nodes (the result from the last search) + * @plugin search + */ + this.trigger('clear_search', { 'nodes' : this._data.search.dom, str : this._data.search.str, res : this._data.search.res }); + if(this._data.search.res.length) { + this._data.search.dom = $(this.element[0].querySelectorAll('#' + $.map(this._data.search.res, function (v) { + return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&'); + }).join(', #'))); + this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search"); + } + this._data.search.str = ""; + this._data.search.res = []; + this._data.search.opn = []; + this._data.search.dom = $(); + }; + + this.redraw_node = function(obj, deep, callback, force_render) { + obj = parent.redraw_node.apply(this, arguments); + if(obj) { + if($.inArray(obj.id, this._data.search.res) !== -1) { + var i, j, tmp = null; + for(i = 0, j = obj.childNodes.length; i < j; i++) { + if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf("jstree-anchor") !== -1) { + tmp = obj.childNodes[i]; + break; + } + } + if(tmp) { + tmp.className += ' jstree-search'; + } + } + } + return obj; + }; + }; + + // helpers + (function ($) { + // from http://kiro.me/projects/fuse.html + $.vakata.search = function(pattern, txt, options) { + options = options || {}; + options = $.extend({}, $.vakata.search.defaults, options); + if(options.fuzzy !== false) { + options.fuzzy = true; + } + pattern = options.caseSensitive ? pattern : pattern.toLowerCase(); + var MATCH_LOCATION = options.location, + MATCH_DISTANCE = options.distance, + MATCH_THRESHOLD = options.threshold, + patternLen = pattern.length, + matchmask, pattern_alphabet, match_bitapScore, search; + if(patternLen > 32) { + options.fuzzy = false; + } + if(options.fuzzy) { + matchmask = 1 << (patternLen - 1); + pattern_alphabet = (function () { + var mask = {}, + i = 0; + for (i = 0; i < patternLen; i++) { + mask[pattern.charAt(i)] = 0; + } + for (i = 0; i < patternLen; i++) { + mask[pattern.charAt(i)] |= 1 << (patternLen - i - 1); + } + return mask; + }()); + match_bitapScore = function (e, x) { + var accuracy = e / patternLen, + proximity = Math.abs(MATCH_LOCATION - x); + if(!MATCH_DISTANCE) { + return proximity ? 1.0 : accuracy; + } + return accuracy + (proximity / MATCH_DISTANCE); + }; + } + search = function (text) { + text = options.caseSensitive ? text.toString() : text.toString().toLowerCase(); + if(pattern === text || text.indexOf(pattern) !== -1) { + return { + isMatch: true, + score: 0 + }; + } + if(!options.fuzzy) { + return { + isMatch: false, + score: 1 + }; + } + var i, j, + textLen = text.length, + scoreThreshold = MATCH_THRESHOLD, + bestLoc = text.indexOf(pattern, MATCH_LOCATION), + binMin, binMid, + binMax = patternLen + textLen, + lastRd, start, finish, rd, charMatch, + score = 1, + locations = []; + if (bestLoc !== -1) { + scoreThreshold = Math.min(match_bitapScore(0, bestLoc), scoreThreshold); + bestLoc = text.lastIndexOf(pattern, MATCH_LOCATION + patternLen); + if (bestLoc !== -1) { + scoreThreshold = Math.min(match_bitapScore(0, bestLoc), scoreThreshold); + } + } + bestLoc = -1; + for (i = 0; i < patternLen; i++) { + binMin = 0; + binMid = binMax; + while (binMin < binMid) { + if (match_bitapScore(i, MATCH_LOCATION + binMid) <= scoreThreshold) { + binMin = binMid; + } else { + binMax = binMid; + } + binMid = Math.floor((binMax - binMin) / 2 + binMin); + } + binMax = binMid; + start = Math.max(1, MATCH_LOCATION - binMid + 1); + finish = Math.min(MATCH_LOCATION + binMid, textLen) + patternLen; + rd = new Array(finish + 2); + rd[finish + 1] = (1 << i) - 1; + for (j = finish; j >= start; j--) { + charMatch = pattern_alphabet[text.charAt(j - 1)]; + if (i === 0) { + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch; + } else { + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch | (((lastRd[j + 1] | lastRd[j]) << 1) | 1) | lastRd[j + 1]; + } + if (rd[j] & matchmask) { + score = match_bitapScore(i, j - 1); + if (score <= scoreThreshold) { + scoreThreshold = score; + bestLoc = j - 1; + locations.push(bestLoc); + if (bestLoc > MATCH_LOCATION) { + start = Math.max(1, 2 * MATCH_LOCATION - bestLoc); + } else { + break; + } + } + } + } + if (match_bitapScore(i + 1, MATCH_LOCATION) > scoreThreshold) { + break; + } + lastRd = rd; + } + return { + isMatch: bestLoc >= 0, + score: score + }; + }; + return txt === true ? { 'search' : search } : search(txt); + }; + $.vakata.search.defaults = { + location : 0, + distance : 100, + threshold : 0.6, + fuzzy : false, + caseSensitive : false + }; + }($)); + + // include the search plugin by default + // $.jstree.defaults.plugins.push("search"); + + +/** + * ### Sort plugin + * + * Automatically sorts all siblings in the tree according to a sorting function. + */ + + /** + * the settings function used to sort the nodes. + * It is executed in the tree's context, accepts two nodes as arguments and should return `1` or `-1`. + * @name $.jstree.defaults.sort + * @plugin sort + */ + $.jstree.defaults.sort = function (a, b) { + //return this.get_type(a) === this.get_type(b) ? (this.get_text(a) > this.get_text(b) ? 1 : -1) : this.get_type(a) >= this.get_type(b); + return this.get_text(a) > this.get_text(b) ? 1 : -1; + }; + $.jstree.plugins.sort = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + this.element + .on("model.jstree", function (e, data) { + this.sort(data.parent, true); + }.bind(this)) + .on("rename_node.jstree create_node.jstree", function (e, data) { + this.sort(data.parent || data.node.parent, false); + this.redraw_node(data.parent || data.node.parent, true); + }.bind(this)) + .on("move_node.jstree copy_node.jstree", function (e, data) { + this.sort(data.parent, false); + this.redraw_node(data.parent, true); + }.bind(this)); + }; + /** + * used to sort a node's children + * @private + * @name sort(obj [, deep]) + * @param {mixed} obj the node + * @param {Boolean} deep if set to `true` nodes are sorted recursively. + * @plugin sort + * @trigger search.jstree + */ + this.sort = function (obj, deep) { + var i, j; + obj = this.get_node(obj); + if(obj && obj.children && obj.children.length) { + obj.children.sort(this.settings.sort.bind(this)); + if(deep) { + for(i = 0, j = obj.children_d.length; i < j; i++) { + this.sort(obj.children_d[i], false); + } + } + } + }; + }; + + // include the sort plugin by default + // $.jstree.defaults.plugins.push("sort"); + +/** + * ### State plugin + * + * Saves the state of the tree (selected nodes, opened nodes) on the user's computer using available options (localStorage, cookies, etc) + */ + + var to = false; + /** + * stores all defaults for the state plugin + * @name $.jstree.defaults.state + * @plugin state + */ + $.jstree.defaults.state = { + /** + * A string for the key to use when saving the current tree (change if using multiple trees in your project). Defaults to `jstree`. + * @name $.jstree.defaults.state.key + * @plugin state + */ + key : 'jstree', + /** + * A space separated list of events that trigger a state save. Defaults to `changed.jstree open_node.jstree close_node.jstree`. + * @name $.jstree.defaults.state.events + * @plugin state + */ + events : 'changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree', + /** + * Time in milliseconds after which the state will expire. Defaults to 'false' meaning - no expire. + * @name $.jstree.defaults.state.ttl + * @plugin state + */ + ttl : false, + /** + * A function that will be executed prior to restoring state with one argument - the state object. Can be used to clear unwanted parts of the state. + * @name $.jstree.defaults.state.filter + * @plugin state + */ + filter : false, + /** + * Should loaded nodes be restored (setting this to true means that it is possible that the whole tree will be loaded for some users - use with caution). Defaults to `false` + * @name $.jstree.defaults.state.preserve_loaded + * @plugin state + */ + preserve_loaded : false + }; + $.jstree.plugins.state = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + var bind = function () { + this.element.on(this.settings.state.events, function () { + if(to) { clearTimeout(to); } + to = setTimeout(function () { this.save_state(); }.bind(this), 100); + }.bind(this)); + /** + * triggered when the state plugin is finished restoring the state (and immediately after ready if there is no state to restore). + * @event + * @name state_ready.jstree + * @plugin state + */ + this.trigger('state_ready'); + }.bind(this); + this.element + .on("ready.jstree", function (e, data) { + this.element.one("restore_state.jstree", bind); + if(!this.restore_state()) { bind(); } + }.bind(this)); + }; + /** + * save the state + * @name save_state() + * @plugin state + */ + this.save_state = function () { + var tm = this.get_state(); + if (!this.settings.state.preserve_loaded) { + delete tm.core.loaded; + } + var st = { 'state' : tm, 'ttl' : this.settings.state.ttl, 'sec' : +(new Date()) }; + $.vakata.storage.set(this.settings.state.key, JSON.stringify(st)); + }; + /** + * restore the state from the user's computer + * @name restore_state() + * @plugin state + */ + this.restore_state = function () { + var k = $.vakata.storage.get(this.settings.state.key); + if(!!k) { try { k = JSON.parse(k); } catch(ex) { return false; } } + if(!!k && k.ttl && k.sec && +(new Date()) - k.sec > k.ttl) { return false; } + if(!!k && k.state) { k = k.state; } + if(!!k && $.vakata.is_function(this.settings.state.filter)) { k = this.settings.state.filter.call(this, k); } + if(!!k) { + if (!this.settings.state.preserve_loaded) { + delete k.core.loaded; + } + this.element.one("set_state.jstree", function (e, data) { data.instance.trigger('restore_state', { 'state' : $.extend(true, {}, k) }); }); + this.set_state(k); + return true; + } + return false; + }; + /** + * clear the state on the user's computer + * @name clear_state() + * @plugin state + */ + this.clear_state = function () { + return $.vakata.storage.del(this.settings.state.key); + }; + }; + + (function ($, undefined) { + $.vakata.storage = { + // simply specifying the functions in FF throws an error + set : function (key, val) { return window.localStorage.setItem(key, val); }, + get : function (key) { return window.localStorage.getItem(key); }, + del : function (key) { return window.localStorage.removeItem(key); } + }; + }($)); + + // include the state plugin by default + // $.jstree.defaults.plugins.push("state"); + +/** + * ### Types plugin + * + * Makes it possible to add predefined types for groups of nodes, which make it possible to easily control nesting rules and icon for each group. + */ + + /** + * An object storing all types as key value pairs, where the key is the type name and the value is an object that could contain following keys (all optional). + * + * * `max_children` the maximum number of immediate children this node type can have. Do not specify or set to `-1` for unlimited. + * * `max_depth` the maximum number of nesting this node type can have. A value of `1` would mean that the node can have children, but no grandchildren. Do not specify or set to `-1` for unlimited. + * * `valid_children` an array of node type strings, that nodes of this type can have as children. Do not specify or set to `-1` for no limits. + * * `icon` a string - can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class. Omit to use the default icon from your theme. + * * `li_attr` an object of values which will be used to add HTML attributes on the resulting LI DOM node (merged with the node's own data) + * * `a_attr` an object of values which will be used to add HTML attributes on the resulting A DOM node (merged with the node's own data) + * + * There are two predefined types: + * + * * `#` represents the root of the tree, for example `max_children` would control the maximum number of root nodes. + * * `default` represents the default node - any settings here will be applied to all nodes that do not have a type specified. + * + * @name $.jstree.defaults.types + * @plugin types + */ + $.jstree.defaults.types = { + 'default' : {} + }; + $.jstree.defaults.types[$.jstree.root] = {}; + + $.jstree.plugins.types = function (options, parent) { + this.init = function (el, options) { + var i, j; + if(options && options.types && options.types['default']) { + for(i in options.types) { + if(i !== "default" && i !== $.jstree.root && options.types.hasOwnProperty(i)) { + for(j in options.types['default']) { + if(options.types['default'].hasOwnProperty(j) && options.types[i][j] === undefined) { + options.types[i][j] = options.types['default'][j]; + } + } + } + } + } + parent.init.call(this, el, options); + this._model.data[$.jstree.root].type = $.jstree.root; + }; + this.refresh = function (skip_loading, forget_state) { + parent.refresh.call(this, skip_loading, forget_state); + this._model.data[$.jstree.root].type = $.jstree.root; + }; + this.bind = function () { + this.element + .on('model.jstree', function (e, data) { + var m = this._model.data, + dpc = data.nodes, + t = this.settings.types, + i, j, c = 'default', k; + for(i = 0, j = dpc.length; i < j; i++) { + c = 'default'; + if(m[dpc[i]].original && m[dpc[i]].original.type && t[m[dpc[i]].original.type]) { + c = m[dpc[i]].original.type; + } + if(m[dpc[i]].data && m[dpc[i]].data.jstree && m[dpc[i]].data.jstree.type && t[m[dpc[i]].data.jstree.type]) { + c = m[dpc[i]].data.jstree.type; + } + m[dpc[i]].type = c; + if(m[dpc[i]].icon === true && t[c].icon !== undefined) { + m[dpc[i]].icon = t[c].icon; + } + if(t[c].li_attr !== undefined && typeof t[c].li_attr === 'object') { + for (k in t[c].li_attr) { + if (t[c].li_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (m[dpc[i]].li_attr[k] === undefined) { + m[dpc[i]].li_attr[k] = t[c].li_attr[k]; + } + else if (k === 'class') { + m[dpc[i]].li_attr['class'] = t[c].li_attr['class'] + ' ' + m[dpc[i]].li_attr['class']; + } + } + } + } + if(t[c].a_attr !== undefined && typeof t[c].a_attr === 'object') { + for (k in t[c].a_attr) { + if (t[c].a_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (m[dpc[i]].a_attr[k] === undefined) { + m[dpc[i]].a_attr[k] = t[c].a_attr[k]; + } + else if (k === 'href' && m[dpc[i]].a_attr[k] === '#') { + m[dpc[i]].a_attr['href'] = t[c].a_attr['href']; + } + else if (k === 'class') { + m[dpc[i]].a_attr['class'] = t[c].a_attr['class'] + ' ' + m[dpc[i]].a_attr['class']; + } + } + } + } + } + m[$.jstree.root].type = $.jstree.root; + }.bind(this)); + parent.bind.call(this); + }; + this.get_json = function (obj, options, flat) { + var i, j, + m = this._model.data, + opt = options ? $.extend(true, {}, options, {no_id:false}) : {}, + tmp = parent.get_json.call(this, obj, opt, flat); + if(tmp === false) { return false; } + if($.vakata.is_array(tmp)) { + for(i = 0, j = tmp.length; i < j; i++) { + tmp[i].type = (tmp[i].id || tmp[i].id === 0) && m[tmp[i].id] && m[tmp[i].id].type ? m[tmp[i].id].type : "default"; + if(options && options.no_id) { + delete tmp[i].id; + if(tmp[i].li_attr && tmp[i].li_attr.id) { + delete tmp[i].li_attr.id; + } + if(tmp[i].a_attr && tmp[i].a_attr.id) { + delete tmp[i].a_attr.id; + } + } + } + } + else { + tmp.type = (tmp.id || tmp.id === 0) && m[tmp.id] && m[tmp.id].type ? m[tmp.id].type : "default"; + if(options && options.no_id) { + tmp = this._delete_ids(tmp); + } + } + return tmp; + }; + this._delete_ids = function (tmp) { + if($.vakata.is_array(tmp)) { + for(var i = 0, j = tmp.length; i < j; i++) { + tmp[i] = this._delete_ids(tmp[i]); + } + return tmp; + } + delete tmp.id; + if(tmp.li_attr && tmp.li_attr.id) { + delete tmp.li_attr.id; + } + if(tmp.a_attr && tmp.a_attr.id) { + delete tmp.a_attr.id; + } + if(tmp.children && $.vakata.is_array(tmp.children)) { + tmp.children = this._delete_ids(tmp.children); + } + return tmp; + }; + this.check = function (chk, obj, par, pos, more) { + if(parent.check.call(this, chk, obj, par, pos, more) === false) { return false; } + obj = obj && (obj.id || obj.id === 0) ? obj : this.get_node(obj); + par = par && (par.id || par.id === 0) ? par : this.get_node(par); + var m = obj && (obj.id || obj.id === 0) ? (more && more.origin ? more.origin : $.jstree.reference(obj.id)) : null, tmp, d, i, j; + m = m && m._model && m._model.data ? m._model.data : null; + switch(chk) { + case "create_node": + case "move_node": + case "copy_node": + if(chk !== 'move_node' || $.inArray(obj.id, par.children) === -1) { + tmp = this.get_rules(par); + if(tmp.max_children !== undefined && tmp.max_children !== -1 && tmp.max_children === par.children.length) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_01', 'reason' : 'max_children prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && (obj.id || obj.id === 0) ? obj.id : false, 'par' : par && (par.id || par.id === 0) ? par.id : false }) }; + return false; + } + if(tmp.valid_children !== undefined && tmp.valid_children !== -1 && $.inArray((obj.type || 'default'), tmp.valid_children) === -1) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_02', 'reason' : 'valid_children prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && (obj.id || obj.id === 0) ? obj.id : false, 'par' : par && (par.id || par.id === 0) ? par.id : false }) }; + return false; + } + if(m && obj.children_d && obj.parents) { + d = 0; + for(i = 0, j = obj.children_d.length; i < j; i++) { + d = Math.max(d, m[obj.children_d[i]].parents.length); + } + d = d - obj.parents.length + 1; + } + if(d <= 0 || d === undefined) { d = 1; } + do { + if(tmp.max_depth !== undefined && tmp.max_depth !== -1 && tmp.max_depth < d) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_03', 'reason' : 'max_depth prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && (obj.id || obj.id === 0) ? obj.id : false, 'par' : par && (par.id || par.id === 0) ? par.id : false }) }; + return false; + } + par = this.get_node(par.parent); + tmp = this.get_rules(par); + d++; + } while(par); + } + break; + } + return true; + }; + /** + * used to retrieve the type settings object for a node + * @name get_rules(obj) + * @param {mixed} obj the node to find the rules for + * @return {Object} + * @plugin types + */ + this.get_rules = function (obj) { + obj = this.get_node(obj); + if(!obj) { return false; } + var tmp = this.get_type(obj, true); + if(tmp.max_depth === undefined) { tmp.max_depth = -1; } + if(tmp.max_children === undefined) { tmp.max_children = -1; } + if(tmp.valid_children === undefined) { tmp.valid_children = -1; } + return tmp; + }; + /** + * used to retrieve the type string or settings object for a node + * @name get_type(obj [, rules]) + * @param {mixed} obj the node to find the rules for + * @param {Boolean} rules if set to `true` instead of a string the settings object will be returned + * @return {String|Object} + * @plugin types + */ + this.get_type = function (obj, rules) { + obj = this.get_node(obj); + return (!obj) ? false : ( rules ? $.extend({ 'type' : obj.type }, this.settings.types[obj.type]) : obj.type); + }; + /** + * used to change a node's type + * @name set_type(obj, type) + * @param {mixed} obj the node to change + * @param {String} type the new type + * @plugin types + */ + this.set_type = function (obj, type) { + var m = this._model.data, t, t1, t2, old_type, old_icon, k, d, a; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.set_type(obj[t1], type); + } + return true; + } + t = this.settings.types; + obj = this.get_node(obj); + if(!t[type] || !obj) { return false; } + d = this.get_node(obj, true); + if (d && d.length) { + a = d.children('.jstree-anchor'); + } + old_type = obj.type; + old_icon = this.get_icon(obj); + obj.type = type; + if(old_icon === true || !t[old_type] || (t[old_type].icon !== undefined && old_icon === t[old_type].icon)) { + this.set_icon(obj, t[type].icon !== undefined ? t[type].icon : true); + } + + // remove old type props + if(t[old_type] && t[old_type].li_attr !== undefined && typeof t[old_type].li_attr === 'object') { + for (k in t[old_type].li_attr) { + if (t[old_type].li_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (k === 'class') { + m[obj.id].li_attr['class'] = (m[obj.id].li_attr['class'] || '').replace(t[old_type].li_attr[k], ''); + if (d) { d.removeClass(t[old_type].li_attr[k]); } + } + else if (m[obj.id].li_attr[k] === t[old_type].li_attr[k]) { + m[obj.id].li_attr[k] = null; + if (d) { d.removeAttr(k); } + } + } + } + } + if(t[old_type] && t[old_type].a_attr !== undefined && typeof t[old_type].a_attr === 'object') { + for (k in t[old_type].a_attr) { + if (t[old_type].a_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (k === 'class') { + m[obj.id].a_attr['class'] = (m[obj.id].a_attr['class'] || '').replace(t[old_type].a_attr[k], ''); + if (a) { a.removeClass(t[old_type].a_attr[k]); } + } + else if (m[obj.id].a_attr[k] === t[old_type].a_attr[k]) { + if (k === 'href') { + m[obj.id].a_attr[k] = '#'; + if (a) { a.attr('href', '#'); } + } + else { + delete m[obj.id].a_attr[k]; + if (a) { a.removeAttr(k); } + } + } + } + } + } + + // add new props + if(t[type].li_attr !== undefined && typeof t[type].li_attr === 'object') { + for (k in t[type].li_attr) { + if (t[type].li_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (m[obj.id].li_attr[k] === undefined) { + m[obj.id].li_attr[k] = t[type].li_attr[k]; + if (d) { + if (k === 'class') { + d.addClass(t[type].li_attr[k]); + } + else { + d.attr(k, t[type].li_attr[k]); + } + } + } + else if (k === 'class') { + m[obj.id].li_attr['class'] = t[type].li_attr[k] + ' ' + m[obj.id].li_attr['class']; + if (d) { d.addClass(t[type].li_attr[k]); } + } + } + } + } + if(t[type].a_attr !== undefined && typeof t[type].a_attr === 'object') { + for (k in t[type].a_attr) { + if (t[type].a_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (m[obj.id].a_attr[k] === undefined) { + m[obj.id].a_attr[k] = t[type].a_attr[k]; + if (a) { + if (k === 'class') { + a.addClass(t[type].a_attr[k]); + } + else { + a.attr(k, t[type].a_attr[k]); + } + } + } + else if (k === 'href' && m[obj.id].a_attr[k] === '#') { + m[obj.id].a_attr['href'] = t[type].a_attr['href']; + if (a) { a.attr('href', t[type].a_attr['href']); } + } + else if (k === 'class') { + m[obj.id].a_attr['class'] = t[type].a_attr['class'] + ' ' + m[obj.id].a_attr['class']; + if (a) { a.addClass(t[type].a_attr[k]); } + } + } + } + } + + return true; + }; + }; + // include the types plugin by default + // $.jstree.defaults.plugins.push("types"); + + +/** + * ### Unique plugin + * + * Enforces that no nodes with the same name can coexist as siblings. + */ + + /** + * stores all defaults for the unique plugin + * @name $.jstree.defaults.unique + * @plugin unique + */ + $.jstree.defaults.unique = { + /** + * Indicates if the comparison should be case sensitive. Default is `false`. + * @name $.jstree.defaults.unique.case_sensitive + * @plugin unique + */ + case_sensitive : false, + /** + * Indicates if white space should be trimmed before the comparison. Default is `false`. + * @name $.jstree.defaults.unique.trim_whitespace + * @plugin unique + */ + trim_whitespace : false, + /** + * A callback executed in the instance's scope when a new node is created with no name and a node with the default name already exists, the two arguments are the conflicting name and the counter. The default will produce results like `New node (2)`. + * @name $.jstree.defaults.unique.duplicate + * @plugin unique + */ + duplicate : function (name, counter) { + return name + ' (' + counter + ')'; + } + }; + + $.jstree.plugins.unique = function (options, parent) { + this.check = function (chk, obj, par, pos, more) { + if(parent.check.call(this, chk, obj, par, pos, more) === false) { return false; } + obj = obj && (obj.id || obj.id === 0) ? obj : this.get_node(obj); + par = par && (par.id || par.id === 0) ? par : this.get_node(par); + if(!par || !par.children) { return true; } + var n = chk === "rename_node" ? pos : obj.text, + c = [], + s = this.settings.unique.case_sensitive, + w = this.settings.unique.trim_whitespace, + m = this._model.data, i, j, t; + for(i = 0, j = par.children.length; i < j; i++) { + t = m[par.children[i]].text; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + c.push(t); + } + if(!s) { n = n.toLowerCase(); } + if (w) { n = n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); } + switch(chk) { + case "delete_node": + return true; + case "rename_node": + t = obj.text || ''; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + i = ($.inArray(n, c) === -1 || (obj.text && t === n)); + if(!i) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_01', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && (obj.id || obj.id === 0) ? obj.id : false, 'par' : par && (par.id || par.id === 0) ? par.id : false }) }; + } + return i; + case "create_node": + i = ($.inArray(n, c) === -1); + if(!i) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_04', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && (obj.id || obj.id === 0) ? obj.id : false, 'par' : par && (par.id || par.id === 0) ? par.id : false }) }; + } + return i; + case "copy_node": + i = ($.inArray(n, c) === -1); + if(!i) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_02', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && (obj.id || obj.id === 0) ? obj.id : false, 'par' : par && (par.id || par.id === 0) ? par.id : false }) }; + } + return i; + case "move_node": + i = ( (obj.parent === par.id && (!more || !more.is_multi)) || $.inArray(n, c) === -1); + if(!i) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_03', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && (obj.id || obj.id === 0) ? obj.id : false, 'par' : par && (par.id || par.id === 0) ? par.id : false }) }; + } + return i; + } + return true; + }; + this.create_node = function (par, node, pos, callback, is_loaded) { + if(!node || (typeof node === 'object' && node.text === undefined)) { + if(par === null) { + par = $.jstree.root; + } + par = this.get_node(par); + if(!par) { + return parent.create_node.call(this, par, node, pos, callback, is_loaded); + } + pos = pos === undefined ? "last" : pos; + if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) { + return parent.create_node.call(this, par, node, pos, callback, is_loaded); + } + if(!node) { node = {}; } + var tmp, n, dpc, i, j, m = this._model.data, s = this.settings.unique.case_sensitive, w = this.settings.unique.trim_whitespace, cb = this.settings.unique.duplicate, t; + n = tmp = this.get_string('New node'); + dpc = []; + for(i = 0, j = par.children.length; i < j; i++) { + t = m[par.children[i]].text; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + dpc.push(t); + } + i = 1; + t = n; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + while($.inArray(t, dpc) !== -1) { + n = cb.call(this, tmp, (++i)).toString(); + t = n; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + } + node.text = n; + } + return parent.create_node.call(this, par, node, pos, callback, is_loaded); + }; + }; + + // include the unique plugin by default + // $.jstree.defaults.plugins.push("unique"); + + +/** + * ### Wholerow plugin + * + * Makes each node appear block level. Making selection easier. May cause slow down for large trees in old browsers. + */ + + var div = document.createElement('DIV'); + div.setAttribute('unselectable','on'); + div.setAttribute('role','presentation'); + div.className = 'jstree-wholerow'; + div.innerHTML = ' '; + $.jstree.plugins.wholerow = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + + this.element + .on('ready.jstree set_state.jstree', function () { + this.hide_dots(); + }.bind(this)) + .on("init.jstree loading.jstree ready.jstree", function () { + //div.style.height = this._data.core.li_height + 'px'; + this.get_container_ul().addClass('jstree-wholerow-ul'); + }.bind(this)) + .on("deselect_all.jstree", function (e, data) { + this.element.find('.jstree-wholerow-clicked').removeClass('jstree-wholerow-clicked'); + }.bind(this)) + .on("changed.jstree", function (e, data) { + this.element.find('.jstree-wholerow-clicked').removeClass('jstree-wholerow-clicked'); + var tmp = false, i, j; + for(i = 0, j = data.selected.length; i < j; i++) { + tmp = this.get_node(data.selected[i], true); + if(tmp && tmp.length) { + tmp.children('.jstree-wholerow').addClass('jstree-wholerow-clicked'); + } + } + }.bind(this)) + .on("open_node.jstree", function (e, data) { + this.get_node(data.node, true).find('.jstree-clicked').parent().children('.jstree-wholerow').addClass('jstree-wholerow-clicked'); + }.bind(this)) + .on("hover_node.jstree dehover_node.jstree", function (e, data) { + if(e.type === "hover_node" && this.is_disabled(data.node)) { return; } + this.get_node(data.node, true).children('.jstree-wholerow')[e.type === "hover_node"?"addClass":"removeClass"]('jstree-wholerow-hovered'); + }.bind(this)) + .on("contextmenu.jstree", ".jstree-wholerow", function (e) { + if (this._data.contextmenu) { + e.preventDefault(); + var tmp = $.Event('contextmenu', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey, pageX : e.pageX, pageY : e.pageY }); + $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp); + } + }.bind(this)) + /*! + .on("mousedown.jstree touchstart.jstree", ".jstree-wholerow", function (e) { + if(e.target === e.currentTarget) { + var a = $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor"); + e.target = a[0]; + a.trigger(e); + } + }) + */ + .on("click.jstree", ".jstree-wholerow", function (e) { + e.stopImmediatePropagation(); + var tmp = $.Event('click', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey }); + $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp).trigger('focus'); + }) + .on("dblclick.jstree", ".jstree-wholerow", function (e) { + e.stopImmediatePropagation(); + var tmp = $.Event('dblclick', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey }); + $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp).trigger('focus'); + }) + .on("click.jstree", ".jstree-leaf > .jstree-ocl", function (e) { + e.stopImmediatePropagation(); + var tmp = $.Event('click', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey }); + $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp).trigger('focus'); + }.bind(this)) + .on("mouseover.jstree", ".jstree-wholerow, .jstree-icon", function (e) { + e.stopImmediatePropagation(); + if(!this.is_disabled(e.currentTarget)) { + this.hover_node(e.currentTarget); + } + return false; + }.bind(this)) + .on("mouseleave.jstree", ".jstree-node", function (e) { + this.dehover_node(e.currentTarget); + }.bind(this)); + }; + this.teardown = function () { + if(this.settings.wholerow) { + this.element.find(".jstree-wholerow").remove(); + } + parent.teardown.call(this); + }; + this.redraw_node = function(obj, deep, callback, force_render) { + obj = parent.redraw_node.apply(this, arguments); + if(obj) { + var tmp = div.cloneNode(true); + //tmp.style.height = this._data.core.li_height + 'px'; + if($.inArray(obj.id, this._data.core.selected) !== -1) { tmp.className += ' jstree-wholerow-clicked'; } + if(this._data.core.focused && this._data.core.focused === obj.id) { tmp.className += ' jstree-wholerow-hovered'; } + obj.insertBefore(tmp, obj.childNodes[0]); + } + return obj; + }; + }; + // include the wholerow plugin by default + // $.jstree.defaults.plugins.push("wholerow"); + if(window.customElements && Object && Object.create) { + var proto = Object.create(HTMLElement.prototype); + proto.createdCallback = function () { + var c = { core : {}, plugins : [] }, i; + for(i in $.jstree.plugins) { + if($.jstree.plugins.hasOwnProperty(i) && this.attributes[i]) { + c.plugins.push(i); + if(this.getAttribute(i) && JSON.parse(this.getAttribute(i))) { + c[i] = JSON.parse(this.getAttribute(i)); + } + } + } + for(i in $.jstree.defaults.core) { + if($.jstree.defaults.core.hasOwnProperty(i) && this.attributes[i]) { + c.core[i] = JSON.parse(this.getAttribute(i)) || this.getAttribute(i); + } + } + $(this).jstree(c); + }; + // proto.attributeChangedCallback = function (name, previous, value) { }; + try { + window.customElements.define("vakata-jstree", function() {}, { prototype: proto }); + } catch (ignore) { } + } + +})); \ No newline at end of file diff --git a/COMCMS.Web/wwwroot/js/jstree/jstree.min.js b/COMCMS.Web/wwwroot/js/jstree/jstree.min.js new file mode 100644 index 0000000..ac45ddc --- /dev/null +++ b/COMCMS.Web/wwwroot/js/jstree/jstree.min.js @@ -0,0 +1,3 @@ +/*! jsTree - v3.3.17 - 2024-09-03 - (MIT) */ + +!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(E,P){"use strict";if(!E.jstree){var s=0,a=!1,n=!1,o=!1,r=[],e=E("script:last").attr("src"),b=window.document,c=window.setImmediate,i=window.Promise;!c&&i&&(c=function(e,t){i.resolve(t).then(e)}),E.jstree={version:"3.3.17",defaults:{plugins:[]},plugins:{},path:e&&-1!==e.indexOf("/")?e.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},E.jstree.create=function(e,i){var r=new E.jstree.core(++s),t=i;return i=E.extend(!0,{},E.jstree.defaults,i),t&&t.plugins&&(i.plugins=t.plugins),E.each(i.plugins,function(e,t){"core"!==e&&(r=r.plugin(t,i[t]))}),E(e).data("jstree",r),r.init(e,i),r},E.jstree.destroy=function(){E(".jstree:jstree").jstree("destroy"),E(b).off(".jstree")},E.jstree.core=function(e){this._id=e,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},E.jstree.reference=function(t){var i=null,e=null;if(!t||!t.id||t.tagName&&t.nodeType||(t=t.id),!e||!e.length)try{e=E(t)}catch(e){}if(!e||!e.length)try{e=E("#"+t.replace(E.jstree.idregex,"\\$&"))}catch(e){}return e&&e.length&&(e=e.closest(".jstree")).length&&(e=e.data("jstree"))?i=e:E(".jstree").each(function(){var e=E(this).data("jstree");if(e&&e._model.data[t])return i=e,!1}),i},E.fn.jstree=function(i){var r="string"==typeof i,s=Array.prototype.slice.call(arguments,1),a=null;return!(!0===i&&!this.length)&&(this.each(function(){var e=E.jstree.reference(this),t=r&&e?e[i]:null;if(a=r&&t?t.apply(e,s):null,e||r||i!==P&&!E.isPlainObject(i)||E.jstree.create(this,i),null!==(a=e&&!r||!0===i?e||!1:a)&&a!==P)return!1}),null!==a&&a!==P?a:this)},E.expr.pseudos.jstree=E.expr.createPseudo(function(e){return function(e){return E(e).hasClass("jstree")&&E(e).data("jstree")!==P}}),E.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:E.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,compute_elements_positions:!1,keyboard:{"ctrl-space":function(e){e.type="click",E(e.currentTarget).trigger(e)},enter:function(e){e.type="click",E(e.currentTarget).trigger(e)},left:function(e){var e;e.preventDefault(),this.is_open(e.currentTarget)?this.close_node(e.currentTarget):(e=this.get_parent(e.currentTarget))&&e.id!==E.jstree.root&&this.get_node(e,!0).children(".jstree-anchor").trigger("focus")},up:function(e){e.preventDefault();var e=this.get_prev_dom(e.currentTarget);e&&e.length&&e.children(".jstree-anchor").trigger("focus")},right:function(e){var e;e.preventDefault(),this.is_closed(e.currentTarget)?this.open_node(e.currentTarget,function(e){this.get_node(e,!0).children(".jstree-anchor").trigger("focus")}):!this.is_open(e.currentTarget)||(e=this.get_node(e.currentTarget,!0).children(".jstree-children")[0])&&E(this._firstChild(e)).children(".jstree-anchor").trigger("focus")},down:function(e){e.preventDefault();var e=this.get_next_dom(e.currentTarget);e&&e.length&&e.children(".jstree-anchor").trigger("focus")},"*":function(e){this.open_all()},home:function(e){e.preventDefault();var e=this._firstChild(this.get_container_ul()[0]);e&&E(e).children(".jstree-anchor").filter(":visible").trigger("focus")},end:function(e){e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().trigger("focus")},f2:function(e){e.preventDefault(),this.edit(e.currentTarget)}},allow_reselect:!1},E.jstree.core.prototype={plugin:function(e,t){var i=E.jstree.plugins[e];return i?(this._data[e]={},i.prototype=this,new i(t,this)):this},init:function(e,t){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[E.jstree.root]={id:E.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=E(e).addClass("jstree jstree-"+this._id),this.settings=t,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html(""),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(E.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var e=b.createElement("LI"),t,i;return e.setAttribute("role","none"),(t=b.createElement("I")).className="jstree-icon jstree-ocl",t.setAttribute("role","presentation"),e.appendChild(t),(t=b.createElement("A")).className="jstree-anchor",t.setAttribute("href","#"),t.setAttribute("tabindex","-1"),t.setAttribute("role","treeitem"),(i=b.createElement("I")).className="jstree-icon jstree-themeicon",i.setAttribute("role","presentation"),t.appendChild(i),e.appendChild(t),t=i=null,e},_kbevent_to_func:function(e){var t={8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},i=[];if(e.ctrlKey&&i.push("ctrl"),e.altKey&&i.push("alt"),e.shiftKey&&i.push("shift"),i.push(t[e.which]?t[e.which].toLowerCase():e.which),"shift-shift"===(i=i.sort().join("-").toLowerCase())||"ctrl-ctrl"===i||"alt-alt"===i)return null;var r=this.settings.core.keyboard,s,a;for(s in r)if(r.hasOwnProperty(s)&&(a="-"!==(a=s)&&"+"!==a?(a=a.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase():a)===i)return r[s];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var s="",a=null,t=0;this.element.on("dblclick.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;if(b.selection&&b.selection.empty)b.selection.empty();else if(window.getSelection){var e=window.getSelection();try{e.removeAllRanges(),e.collapse()}catch(e){}}}).on("mousedown.jstree",function(e){e.target===this.element[0]&&(e.preventDefault(),t=+new Date)}.bind(this)).on("mousedown.jstree",".jstree-ocl",function(e){e.preventDefault()}).on("click.jstree",".jstree-ocl",function(e){this.toggle_node(e.target)}.bind(this)).on("dblclick.jstree",".jstree-anchor",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this.settings.core.dblclick_toggle&&this.toggle_node(e.target)}.bind(this)).on("click.jstree",".jstree-anchor",function(e){e.preventDefault(),e.currentTarget!==b.activeElement&&E(e.currentTarget).trigger("focus"),this.activate_node(e.currentTarget,e)}.bind(this)).on("keydown.jstree",".jstree-anchor",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===e.which?e.which=39:39===e.which&&(e.which=37));var t=this._kbevent_to_func(e);if(t){var e=t.call(this,e);if(!1===e||!0===e)return e}}.bind(this)).on("load_node.jstree",function(e,t){t.status&&(t.node.id!==E.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){for(var e=[],t,i,t=0,i=this._data.core.selected.length;t .jstree-anchor").trigger("focus"))}.bind(this)).on("mouseenter.jstree",".jstree-anchor",function(e){this.hover_node(e.currentTarget)}.bind(this)).on("mouseleave.jstree",".jstree-anchor",function(e){this.dehover_node(e.currentTarget)}.bind(this))},unbind:function(){this.element.off(".jstree"),E(b).off(".jstree-"+this._id)},trigger:function(e,t){((t=t||{}).instance=this).element.triggerHandler(e.replace(".jstree","")+".jstree",t)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(e){var t=this.settings.core.strings;return E.vakata.is_function(t)?t.call(this,e):t&&t[e]?t[e]:e},_firstChild:function(e){e=e?e.firstChild:null;while(null!==e&&1!==e.nodeType)e=e.nextSibling;return e},_nextSibling:function(e){e=e?e.nextSibling:null;while(null!==e&&1!==e.nodeType)e=e.nextSibling;return e},_previousSibling:function(e){e=e?e.previousSibling:null;while(null!==e&&1!==e.nodeType)e=e.previousSibling;return e},get_node:function(e,t){var i;(e=e&&(e.id||0===e.id)?e.id:e)instanceof E&&e.length&&e[0].id&&(e=e[0].id);try{if(this._model.data[e])e=this._model.data[e];else if("string"==typeof e&&this._model.data[e.replace(/^#/,"")])e=this._model.data[e.replace(/^#/,"")];else if("string"==typeof e&&(i=E("#"+e.replace(E.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[i.closest(".jstree-node").attr("id")])e=this._model.data[i.closest(".jstree-node").attr("id")];else if((i=this.element.find(e)).length&&this._model.data[i.closest(".jstree-node").attr("id")])e=this._model.data[i.closest(".jstree-node").attr("id")];else{if(!(i=this.element.find(e)).length||!i.hasClass("jstree"))return!1;e=this._model.data[E.jstree.root]}return e=t?e.id===E.jstree.root?this.element:E("#"+e.id.replace(E.jstree.idregex,"\\$&"),this.element):e}catch(e){return!1}},get_path:function(e,t,i){if(!(e=e.parents?e:this.get_node(e))||e.id===E.jstree.root||!e.parents)return!1;var r,s,a=[];for(a.push(i?e.id:e.text),r=0,s=e.parents.length;r
    • ").html(t),n.text=this.settings.core.force_text?t.text():t.html(),t=e.data(),n.data=t?E.extend(!0,{},t):null,n.state.opened=e.hasClass("jstree-open"),n.state.selected=e.children("a").hasClass("jstree-clicked"),n.state.disabled=e.children("a").hasClass("jstree-disabled"),n.data&&n.data.jstree)for(o in n.data.jstree)n.data.jstree.hasOwnProperty(o)&&(n.state[o]=n.data.jstree[o]);(t=e.children("a").children(".jstree-themeicon")).length&&(n.icon=!t.hasClass("jstree-themeicon-hidden")&&t.attr("rel")),n.state.icon!==P&&(n.icon=n.state.icon),n.icon!==P&&null!==n.icon&&""!==n.icon||(n.icon=!0),t=e.children("ul").children("li");do{d="j"+this._id+"_"+ ++this._cnt}while(a[d]);return n.id=n.li_attr.id?n.li_attr.id.toString():d,t.length?(t.each(function(e,t){r=this._parse_model_from_html(E(t),n.id,i),s=this._model.data[r],n.children.push(r),s.children_d.length&&(n.children_d=n.children_d.concat(s.children_d))}.bind(this)),n.children_d=n.children_d.concat(n.children)):e.hasClass("jstree-closed")&&(n.state.loaded=!1),n.li_attr.class&&(n.li_attr.class=n.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),n.a_attr.class&&(n.a_attr.class=n.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),(a[n.id]=n).state.selected&&this._data.core.selected.push(n.id),n.id},_parse_model_from_flat_json:function(e,t,i){i=i?i.concat():[],t&&i.unshift(t);var r=e.id.toString(),s=this._model.data,a=this._model.default_state,n,o,d,c,l={id:r,text:e.text||"",icon:e.icon===P||e.icon,parent:t,parents:i,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(n in a)a.hasOwnProperty(n)&&(l.state[n]=a[n]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(l.icon=e.data.jstree.icon),l.icon!==P&&null!==l.icon&&""!==l.icon||(l.icon=!0),e&&e.data&&(l.data=e.data,e.data.jstree))for(n in e.data.jstree)e.data.jstree.hasOwnProperty(n)&&(l.state[n]=e.data.jstree[n]);if(e&&"object"==typeof e.state)for(n in e.state)e.state.hasOwnProperty(n)&&(l.state[n]=e.state[n]);if(e&&"object"==typeof e.li_attr)for(n in e.li_attr)e.li_attr.hasOwnProperty(n)&&(l.li_attr[n]=e.li_attr[n]);if(l.li_attr.id||(l.li_attr.id=r),e&&"object"==typeof e.a_attr)for(n in e.a_attr)e.a_attr.hasOwnProperty(n)&&(l.a_attr[n]=e.a_attr[n]);for(e&&e.children&&!0===e.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),n=0,o=(s[l.id]=l).children.length;n
    • "+this.get_string("Loading ...")+"
    • "),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(E.jstree.root,function(e,t){t&&(this.get_container_ul()[0].className=i,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(E.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(t){if(!(t=this.get_node(t))||t.id===E.jstree.root)return!1;var i=[],e=[],r=this._data.core.selected.concat([]);e.push(t.id),!0===t.state.opened&&i.push(t.id),this.get_node(t,!0).find(".jstree-open").each(function(){e.push(this.id),i.push(this.id)}),this._load_nodes(e,function(e){this.open_node(i,!1,0),this.select_node(r),this.trigger("refresh_node",{node:t,nodes:e})}.bind(this),!1,!0)},set_id:function(e,t){if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;var i,r,s=this._model.data,a=e.id;for(t=t.toString(),s[e.parent].children[E.inArray(e.id,s[e.parent].children)]=t,i=0,r=e.parents.length;ie.children.length&&(i=e.children.length),t.id===P&&(t.id=!0),!this.check("create_node",t,e,i))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===t.id&&delete t.id,!(t=this._parse_model_from_json(t,e.id,e.parents.concat())))return!1;for(a=this.get_node(t),(n=[]).push(t),n=n.concat(a.children_d),this.trigger("model",{nodes:n,parent:e.id}),e.children_d=e.children_d.concat(n),o=0,d=e.parents.length;oh.children.length&&(i=h.children.length),!this.check("move_node",e,h,i,{core:!0,origin:n,is_multi:_&&_._id&&_._id!==this._id,is_foreign:!_||!_._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(e.parent===h.id){for(u=h.children.concat(),-1!==(f=E.inArray(e.id,u))&&(u=E.vakata.array_remove(u,f),ff.children.length&&(i=f.children.length),!this.check("copy_node",e,f,i,{core:!0,origin:n,is_multi:p&&p._id&&p._id!==this._id,is_foreign:!p||!p._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(g=p?p.get_json(e,{no_id:!0,no_data:!0,no_state:!0}):e))return!1;if(!0===g.id&&delete g.id,!(g=this._parse_model_from_json(g,f.id,f.parents.concat())))return!1;for(l=this.get_node(g),e&&e.state&&!1===e.state.loaded&&(l.state.loaded=!1),(c=[]).push(g),c=c.concat(l.children_d),this.trigger("model",{nodes:c,parent:f.id}),h=0,_=f.parents.length;h<_;h++)this._model.data[f.parents[h]].children_d=this._model.data[f.parents[h]].children_d.concat(c);for(c=[],h=0,_=f.children.length;h<_;h++)c[i<=h?h+1:h]=f.children[h];return c[i]=l.id,f.children=c,f.children_d.push(l.id),f.children_d=f.children_d.concat(l.children_d),f.id===E.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(f.id),a||this.redraw(f.id===E.jstree.root),r&&r.call(this,l,f,i),this.trigger("copy_node",{node:l,original:e,parent:f.id,position:i,old_parent:u,old_position:p&&p._id&&u&&p._model.data[u]&&p._model.data[u].children?E.inArray(e.id,p._model.data[u].children):-1,is_multi:p&&p._id&&p._id!==this._id,is_foreign:!p||!p._id,old_instance:p,new_instance:this}),l.id},cut:function(e){if(e=e||this._data.core.selected.concat(),!(e=!E.vakata.is_array(e)?[e]:e).length)return!1;for(var t=[],i,r,s,r=0,s=e.length;r"),o=e,d=E("
      ",{css:{position:"absolute",top:"-200px",left:t?"0px":"-1000px",visibility:"hidden"}}).appendTo(b.body),c=E("",{value:o,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},on:{blur:function(e){e.stopImmediatePropagation(),e.preventDefault();var t,i=n.children(".jstree-rename-input").val(),e=this.settings.core.force_text,e;""===i&&(i=o),d.remove(),n.replaceWith(a),n.remove(),o=e?o:E("
      ").append(E.parseHTML(o)).html(),r=this.get_node(r),this.set_text(r,o),(e=!!this.rename_node(r,e?E("
      ").text(i).text():E("
      ").append(E.parseHTML(i)).html()))||this.set_text(r,o),this._data.core.focused=l.id,setTimeout(function(){var e=this.get_node(l.id,!0);e.length&&(this._data.core.focused=l.id,e.children(".jstree-anchor").trigger("focus"))}.bind(this),0),s&&s.call(this,l,e,h,i),c=null}.bind(this),keydown:function(e){var t=e.which;27===t&&(h=!0,this.value=o),27!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&32!==t||e.stopImmediatePropagation(),27!==t&&13!==t||(e.preventDefault(),this.blur())},click:function(e){e.stopImmediatePropagation()},mousedown:function(e){e.stopImmediatePropagation()},keyup:function(e){c.width(Math.min(d.text("pW"+this.value).width(),i))},keypress:function(e){if(13===e.which)return!1}}}),t={fontFamily:a.css("fontFamily")||"",fontSize:a.css("fontSize")||"",fontWeight:a.css("fontWeight")||"",fontStyle:a.css("fontStyle")||"",fontStretch:a.css("fontStretch")||"",fontVariant:a.css("fontVariant")||"",letterSpacing:a.css("letterSpacing")||"",wordSpacing:a.css("wordSpacing")||""},n.attr("class",a.attr("class")).append(a.contents().clone()).append(c),a.replaceWith(n),d.css(t),c.css(t).width(Math.min(d.text("pW"+c[0].value).width(),i))[0].select(),void E(b).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(e){c&&e.target!==c&&E(c).trigger("blur")})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(e,t){if(!e)return!1;var i,i;(t=!0===t?(i=(i=this.settings.core.themes.dir)||E.jstree.path+"/themes")+"/"+e+"/style.css":t)&&-1===E.inArray(t,r)&&(E("head").append(''),r.push(t)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass("jstree-"+e),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+e+"-responsive"),this.trigger("set_theme",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(e){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),(this._data.core.themes.variant=e)&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(e,t){var i,r,s,a;if(E.vakata.is_array(e)){for(i=0,r=(e=e.slice()).length;i "),r=!1,i+="
    • ",i+="",h.vakata.context.settings.icons&&(i+="'+(t.shortcut_label||"")+"":"")+"",t.submenu&&(s=h.vakata.context._parse(t.submenu,!0))&&(i+=s),i+="
    • ",void(t.separator_after&&(i+="
    •  
    • ",r=!0)))}),i=i.replace(/
    • <\/li\>$/,""),t&&(i+=""),t||(g.html=i,h.vakata.context._trigger("parse")),10"),g.element.on("mouseenter","li",function(e){e.stopImmediatePropagation(),h.contains(this,e.relatedTarget)||(i&&clearTimeout(i),g.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),h(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),h.vakata.context._show_submenu(this))}).on("mouseleave","li",function(e){h.contains(this,e.relatedTarget)||h(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(e){var t;h(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),h.vakata.context.settings.hide_onmouseleave&&(i=setTimeout((t=this,function(){h.vakata.context.hide()}),h.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(e){e.preventDefault(),h(this).trigger("blur").parent().hasClass("vakata-context-disabled")||!1===h.vakata.context._execute(h(this).attr("rel"))||h.vakata.context.hide()}).on("keydown","a",function(e){var t=null;switch(e.which){case 13:case 32:e.type="click",e.preventDefault(),h(e.currentTarget).trigger(e);break;case 37:g.is_visible&&(g.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 38:g.is_visible&&((t=!(t=g.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length?g.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last():t).addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 39:g.is_visible&&(g.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 40:g.is_visible&&((t=!(t=g.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length?g.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first():t).addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 27:h.vakata.context.hide(),e.preventDefault()}}).on("keydown",function(e){e.preventDefault();var e=g.element.find(".vakata-contextmenu-shortcut-"+e.which).parent();e.parent().not(".vakata-context-disabled")&&e.trigger("click")}),h(b).on("mousedown.vakata.jstree",function(e){g.is_visible&&g.element[0]!==e.target&&!h.contains(g.element[0],e.target)&&h.vakata.context.hide()}).on("context_show.vakata.jstree",function(e,t){g.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),_&&g.element.addClass("vakata-context-rtl").css("direction","rtl"),g.element.find("ul").hide().end()})}),E.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1,blank_space_drop:!1},E.jstree.plugins.dnd=function(e,o){this.init=function(e,t){o.init.call(this,e,t),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in b.createElement("span")},this.bind=function(){o.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",function(e){if(this.settings.dnd.large_drag_target&&E(e.target).closest(".jstree-node")[0]!==e.currentTarget)return!0;if("touchstart"===e.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!E(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var t=this.get_node(e.target),i=this.is_selected(t)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,r=1'+r+'+
    • ');E.vakata.dnd._trigger("start",e,{helper:E(),element:u,data:d})}}.bind(this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(e){return e.preventDefault(),E.vakata.dnd._trigger("move",e,{helper:E(),element:u,data:d}),!1}).on("drop.jstree",function(e){return e.preventDefault(),E.vakata.dnd._trigger("stop",e,{helper:E(),element:u,data:d}),!1}.bind(this))},this.redraw_node=function(e,t,i,r){if((e=o.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)e.setAttribute("draggable",!0);else{for(var s,a,n=null,s=0,a=e.childNodes.length;s 
      ').hide();E(b).on("dragover.vakata.jstree",function(e){u&&E.vakata.dnd._trigger("move",e,{helper:E(),element:u,data:d})}).on("drop.vakata.jstree",function(e){u&&(E.vakata.dnd._trigger("stop",e,{helper:E(),element:u,data:d}),d=u=null)}).on("dnd_start.vakata.jstree",function(e,t){O=N=!1,t&&t.data&&t.data.jstree&&S.appendTo(b.body)}).on("dnd_move.vakata.jstree",function(e,s){var a=s.event.target!==O.target;if(A&&(s.event&&"dragover"===s.event.type&&!a||clearTimeout(A)),s&&s.data&&s.data.jstree&&(!s.event.target.id||"jstree-marker"!==s.event.target.id)){O=s.event;var n=E.jstree.reference(s.event.target),o=!1,d=!1,t=!1,i,c,l,h,_,g,u,f,p,m,v,j,k,b,y,x,w,C;if(n&&n._data&&n._data.dnd)if(S.attr("class","jstree-"+n.get_theme()+(n.settings.core.themes.responsive?" jstree-dnd-responsive":"")),x=s.data.origin&&(s.data.origin.settings.dnd.always_copy||s.data.origin.settings.dnd.copy&&(s.event.metaKey||s.event.ctrlKey)),s.helper.children().attr("class","jstree-"+n.get_theme()+" jstree-"+n.get_theme()+"-"+n.get_theme_variant()+" "+(n.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[x?"show":"hide"](),s.event.target!==n.element[0]&&s.event.target!==n.get_container_ul()[0]||0!==n.get_container_ul().children().length&&!n.settings.dnd.blank_space_drop){if((o=n.settings.dnd.large_drop_target?E(s.event.target).closest(".jstree-node").children(".jstree-anchor"):E(s.event.target).closest(".jstree-anchor"))&&o.length&&o.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(d=o.offset(),t=(s.event.pageY!==P?s.event:s.event.originalEvent).pageY-d.top,h=o.outerHeight(),u=tE.inArray(s.data.nodes[p],k.children)&&--j),!(f=f&&(n&&n.settings&&n.settings.dnd&&!1===n.settings.dnd.check_while_dragging||n.check(v,s.data.origin&&s.data.origin!==n?s.data.origin.get_node(s.data.nodes[p]):s.data.nodes[p],_,j,{dnd:!0,ref:n.get_node(o.parent()),pos:t,origin:s.data.origin,is_multi:s.data.origin&&s.data.origin!==n,is_foreign:!s.data.origin})))){n&&n.last_error&&(T=n.last_error());break}var i,r;if("i"===t&&o.parent().is(".jstree-closed")&&n.settings.dnd.open_timeout&&(s.event&&"dragover"===s.event.type&&!a||(A&&clearTimeout(A),A=setTimeout((r=o,function(){i.open_node(r)}),(i=n).settings.dnd.open_timeout))),f)return(w=n.get_node(_,!0)).hasClass(".jstree-dnd-parent")||(E(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),w.addClass("jstree-dnd-parent")),N={ins:n,par:_,pos:"i"!==t||"last"!==b||0!==g||n.is_loaded(y)?g:"last"},S.css({left:c+"px",top:l+"px"}).show(),S.removeClass("jstree-above jstree-inside jstree-below").addClass(C),s.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),s.event.originalEvent&&s.event.originalEvent.dataTransfer&&(s.event.originalEvent.dataTransfer.dropEffect=x?"copy":"move"),T={},!(u=!0)}),!0===u))return}else{for(f=!0,p=0,m=s.data.nodes.length;p"),escape:function(e){return f.vakata.html.div.text(e).html()},strip:function(e){return f.vakata.html.div.empty().append(f.parseHTML(e)).text()}}),target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},f.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(e,t,i){(i=i===P?f.vakata.dnd._get():i).event=t,f(b).triggerHandler("dnd_"+e+".vakata",i)},_get:function(){return{data:p.data,element:p.element,helper:p.helper}},_clean:function(){p.helper&&p.helper.remove(),p.scroll_i&&(clearInterval(p.scroll_i),p.scroll_i=!1),p={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},u=null,f(b).off("mousemove.vakata.jstree touchmove.vakata.jstree",f.vakata.dnd.drag),f(b).off("mouseup.vakata.jstree touchend.vakata.jstree",f.vakata.dnd.stop)},_scroll:function(e){if(!p.scroll_e||!p.scroll_l&&!p.scroll_t)return p.scroll_i&&(clearInterval(p.scroll_i),p.scroll_i=!1),!1;if(!p.scroll_i)return p.scroll_i=setInterval(f.vakata.dnd._scroll,100),!1;if(!0===e)return!1;var t=p.scroll_e.scrollTop(),e=p.scroll_e.scrollLeft();p.scroll_e.scrollTop(t+p.scroll_t*f.vakata.dnd.settings.scroll_speed),p.scroll_e.scrollLeft(e+p.scroll_l*f.vakata.dnd.settings.scroll_speed),t===p.scroll_e.scrollTop()&&e===p.scroll_e.scrollLeft()||f.vakata.dnd._trigger("scroll",p.scroll_e)},start:function(e,t,i){"touchstart"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=b.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),p.is_drag&&f.vakata.dnd.stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.touchAction="none",e.currentTarget.style.msTouchAction="none",e.currentTarget.style.MozUserSelect="none")}catch(e){}return p.init_x=e.pageX,p.init_y=e.pageY,p.data=t,p.is_down=!0,p.element=e.currentTarget,p.target=e.target,p.is_touch="touchstart"===e.type,!1!==i&&(p.helper=f("
      ").html(i).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),f(b).on("mousemove.vakata.jstree touchmove.vakata.jstree",f.vakata.dnd.drag),f(b).on("mouseup.vakata.jstree touchend.vakata.jstree",f.vakata.dnd.stop),!1},drag:function(i){if("touchmove"===i.type&&i.originalEvent&&i.originalEvent.changedTouches&&i.originalEvent.changedTouches[0]&&(i.pageX=i.originalEvent.changedTouches[0].pageX,i.pageY=i.originalEvent.changedTouches[0].pageY,i.target=b.elementFromPoint(i.originalEvent.changedTouches[0].pageX-window.pageXOffset,i.originalEvent.changedTouches[0].pageY-window.pageYOffset)),p.is_down){if(!p.is_drag){if(!(Math.abs(i.pageX-p.init_x)>(p.is_touch?f.vakata.dnd.settings.threshold_touch:f.vakata.dnd.settings.threshold)||Math.abs(i.pageY-p.init_y)>(p.is_touch?f.vakata.dnd.settings.threshold_touch:f.vakata.dnd.settings.threshold)))return;p.helper&&(p.helper.appendTo(b.body),p.helper_w=p.helper.outerWidth()),p.is_drag=!0,f(p.target).one("click.vakata",!1),f.vakata.dnd._trigger("start",i)}var e=!1,t=!1,r=!1,s=!1,a=!1,n=!1,o=!1,d=!1,c=!1,l=!1;return p.scroll_t=0,p.scroll_l=0,p.scroll_e=!1,f(f(i.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return this.ownerDocument&&/^auto|scroll$/.test(f(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var e=f(this),t=e.offset();if(this.scrollHeight>this.offsetHeight&&(t.top+e.height()-i.pageYthis.offsetWidth&&(t.left+e.width()-i.pageXa&&(l=a-(p.helper_w+2)),p.helper.css({left:l+"px",top:(c=r&&rs)break;c=_}return{isMatch:0<=a,score:u}},!0===e?{search:t}:t(e)},w.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1},E.jstree.defaults.sort=function(e,t){return this.get_text(e)>this.get_text(t)?1:-1};var m=!(E.jstree.plugins.sort=function(e,t){this.bind=function(){t.bind.call(this),this.element.on("model.jstree",function(e,t){this.sort(t.parent,!0)}.bind(this)).on("rename_node.jstree create_node.jstree",function(e,t){this.sort(t.parent||t.node.parent,!1),this.redraw_node(t.parent||t.node.parent,!0)}.bind(this)).on("move_node.jstree copy_node.jstree",function(e,t){this.sort(t.parent,!1),this.redraw_node(t.parent,!0)}.bind(this))},this.sort=function(e,t){var i,r;if((e=this.get_node(e))&&e.children&&e.children.length&&(e.children.sort(this.settings.sort.bind(this)),t))for(i=0,r=e.children_d.length;ii.ttl)&&(!!(i=(i=i&&i.state?i.state:i)&&E.vakata.is_function(this.settings.state.filter)?this.settings.state.filter.call(this,i):i)&&(this.settings.state.preserve_loaded||delete i.core.loaded,this.element.one("set_state.jstree",function(e,t){t.instance.trigger("restore_state",{state:E.extend(!0,{},i)})}),this.set_state(i),!0))},this.clear_state=function(){return E.vakata.storage.del(this.settings.state.key)}},E.vakata.storage={set:function(e,t){return window.localStorage.setItem(e,t)},get:function(e){return window.localStorage.getItem(e)},del:function(e){return window.localStorage.removeItem(e)}},E.jstree.defaults.types={default:{}},E.jstree.defaults.types[E.jstree.root]={},E.jstree.plugins.types=function(e,l){this.init=function(e,t){var i,r;if(t&&t.types&&t.types.default)for(i in t.types)if("default"!==i&&i!==E.jstree.root&&t.types.hasOwnProperty(i))for(r in t.types.default)t.types.default.hasOwnProperty(r)&&t.types[i][r]===P&&(t.types[i][r]=t.types.default[r]);l.init.call(this,e,t),this._model.data[E.jstree.root].type=E.jstree.root},this.refresh=function(e,t){l.refresh.call(this,e,t),this._model.data[E.jstree.root].type=E.jstree.root},this.bind=function(){this.element.on("model.jstree",function(e,t){for(var i=this._model.data,r=t.nodes,s=this.settings.types,a,n,o="default",d,a=0,n=r.length;a .jstree-ocl",function(e){e.stopImmediatePropagation();var t=E.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});E(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}.bind(this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",function(e){return e.stopImmediatePropagation(),this.is_disabled(e.currentTarget)||this.hover_node(e.currentTarget),!1}.bind(this)).on("mouseleave.jstree",".jstree-node",function(e){this.dehover_node(e.currentTarget)}.bind(this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),a.teardown.call(this)},this.redraw_node=function(e,t,i,r){var s;return(e=a.redraw_node.apply(this,arguments))&&(s=j.cloneNode(!0),-1!==E.inArray(e.id,this._data.core.selected)&&(s.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===e.id&&(s.className+=" jstree-wholerow-hovered"),e.insertBefore(s,e.childNodes[0])),e}},window.customElements&&Object&&Object.create){var e=Object.create(HTMLElement.prototype);e.createdCallback=function(){var e={core:{},plugins:[]},t;for(t in E.jstree.plugins)E.jstree.plugins.hasOwnProperty(t)&&this.attributes[t]&&(e.plugins.push(t),this.getAttribute(t)&&JSON.parse(this.getAttribute(t))&&(e[t]=JSON.parse(this.getAttribute(t))));for(t in E.jstree.defaults.core)E.jstree.defaults.core.hasOwnProperty(t)&&this.attributes[t]&&(e.core[t]=JSON.parse(this.getAttribute(t))||this.getAttribute(t));E(this).jstree(e)};try{window.customElements.define("vakata-jstree",function(){},{prototype:e})}catch(e){}}}}); \ No newline at end of file diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/32px.png b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/32px.png new file mode 100644 index 0000000..6039572 Binary files /dev/null and b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/32px.png differ diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/40px.png b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/40px.png new file mode 100644 index 0000000..aae89ad Binary files /dev/null and b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/40px.png differ diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/style.css b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/style.css new file mode 100644 index 0000000..68ec9e3 --- /dev/null +++ b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/style.css @@ -0,0 +1,1150 @@ +/* jsTree default dark theme */ +.jstree-node, +.jstree-children, +.jstree-container-ul { + display: block; + margin: 0; + padding: 0; + list-style-type: none; + list-style-image: none; +} +.jstree-node { + white-space: nowrap; +} +.jstree-anchor { + display: inline-block; + color: black; + white-space: nowrap; + padding: 0 4px 0 1px; + margin: 0; + vertical-align: top; +} +.jstree-anchor:focus { + outline: 0; +} +.jstree-anchor, +.jstree-anchor:link, +.jstree-anchor:visited, +.jstree-anchor:hover, +.jstree-anchor:active { + text-decoration: none; + color: inherit; +} +.jstree-icon { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0; + vertical-align: top; + text-align: center; +} +.jstree-icon:empty { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0; + vertical-align: top; + text-align: center; +} +.jstree-ocl { + cursor: pointer; +} +.jstree-leaf > .jstree-ocl { + cursor: default; +} +.jstree .jstree-open > .jstree-children { + display: block; +} +.jstree .jstree-closed > .jstree-children, +.jstree .jstree-leaf > .jstree-children { + display: none; +} +.jstree-anchor > .jstree-themeicon { + margin-right: 2px; +} +.jstree-no-icons .jstree-themeicon, +.jstree-anchor > .jstree-themeicon-hidden { + display: none; +} +.jstree-hidden, +.jstree-node.jstree-hidden { + display: none; +} +.jstree-rtl .jstree-anchor { + padding: 0 1px 0 4px; +} +.jstree-rtl .jstree-anchor > .jstree-themeicon { + margin-left: 2px; + margin-right: 0; +} +.jstree-rtl .jstree-node { + margin-left: 0; +} +.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; +} +.jstree-wholerow-ul { + position: relative; + display: inline-block; + min-width: 100%; +} +.jstree-wholerow-ul .jstree-leaf > .jstree-ocl { + cursor: pointer; +} +.jstree-wholerow-ul .jstree-anchor, +.jstree-wholerow-ul .jstree-icon { + position: relative; +} +.jstree-wholerow-ul .jstree-wholerow { + width: 100%; + cursor: pointer; + position: absolute; + left: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.jstree-contextmenu .jstree-anchor { + -webkit-user-select: none; + /* disable selection/Copy of UIWebView */ + -webkit-touch-callout: none; + /* disable the IOS popup when long-press on a link */ + user-select: none; +} +.vakata-context { + display: none; +} +.vakata-context, +.vakata-context ul { + margin: 0; + padding: 2px; + position: absolute; + background: #f5f5f5; + border: 1px solid #979797; + box-shadow: 2px 2px 2px #999999; +} +.vakata-context ul { + list-style: none; + left: 100%; + margin-top: -2.7em; + margin-left: -4px; +} +.vakata-context .vakata-context-right ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context li { + list-style: none; +} +.vakata-context li > a { + display: block; + padding: 0 2em 0 2em; + text-decoration: none; + width: auto; + color: black; + white-space: nowrap; + line-height: 2.4em; + text-shadow: 1px 1px 0 white; + border-radius: 1px; +} +.vakata-context li > a:hover { + position: relative; + background-color: #e8eff7; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw=="); + background-position: right center; + background-repeat: no-repeat; +} +.vakata-context li > a:focus { + outline: 0; +} +.vakata-context .vakata-context-no-icons { + margin-left: 0; +} +.vakata-context .vakata-context-hover > a { + position: relative; + background-color: #e8eff7; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context .vakata-context-separator > a, +.vakata-context .vakata-context-separator > a:hover { + background: white; + border: 0; + border-top: 1px solid #e2e3e3; + height: 1px; + min-height: 1px; + max-height: 1px; + padding: 0; + margin: 0 0 0 2.4em; + border-left: 1px solid #e0e0e0; + text-shadow: 0 0 0 transparent; + box-shadow: 0 0 0 transparent; + border-radius: 0; +} +.vakata-context .vakata-contextmenu-disabled a, +.vakata-context .vakata-contextmenu-disabled a:hover { + color: silver; + background-color: transparent; + border: 0; + box-shadow: 0 0 0; +} +.vakata-context .vakata-contextmenu-disabled > a > i { + filter: grayscale(100%); +} +.vakata-context li > a > i { + text-decoration: none; + display: inline-block; + width: 2.4em; + height: 2.4em; + background: transparent; + margin: 0 0 0 -2em; + vertical-align: top; + text-align: center; + line-height: 2.4em; +} +.vakata-context li > a > i:empty { + width: 2.4em; + line-height: 2.4em; +} +.vakata-context li > a .vakata-contextmenu-sep { + display: inline-block; + width: 1px; + height: 2.4em; + background: white; + margin: 0 0.5em 0 0; + border-left: 1px solid #e2e3e3; +} +.vakata-context .vakata-contextmenu-shortcut { + font-size: 0.8em; + color: silver; + opacity: 0.5; + display: none; +} +.vakata-context-rtl ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context-rtl li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7"); + background-position: left center; + background-repeat: no-repeat; +} +.vakata-context-rtl .vakata-context-separator > a { + margin: 0 2.4em 0 0; + border-left: 0; + border-right: 1px solid #e2e3e3; +} +.vakata-context-rtl .vakata-context-left ul { + right: auto; + left: 100%; + margin-left: -4px; + margin-right: auto; +} +.vakata-context-rtl li > a > i { + margin: 0 -2em 0 0; +} +.vakata-context-rtl li > a .vakata-contextmenu-sep { + margin: 0 0 0 0.5em; + border-left-color: white; + background: #e2e3e3; +} +#jstree-marker { + position: absolute; + top: 0; + left: 0; + margin: -5px 0 0 0; + padding: 0; + border-right: 0; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid; + width: 0; + height: 0; + font-size: 0; + line-height: 0; +} +#jstree-dnd { + line-height: 16px; + margin: 0; + padding: 4px; +} +#jstree-dnd .jstree-icon, +#jstree-dnd .jstree-copy { + display: inline-block; + text-decoration: none; + margin: 0 2px 0 0; + padding: 0; + width: 16px; + height: 16px; +} +#jstree-dnd .jstree-ok { + background: green; +} +#jstree-dnd .jstree-er { + background: red; +} +#jstree-dnd .jstree-copy { + margin: 0 2px 0 2px; +} +.jstree-default-dark .jstree-node, +.jstree-default-dark .jstree-icon { + background-repeat: no-repeat; + background-color: transparent; +} +.jstree-default-dark .jstree-anchor, +.jstree-default-dark .jstree-animated, +.jstree-default-dark .jstree-wholerow { + transition: background-color 0.15s, box-shadow 0.15s; +} +.jstree-default-dark .jstree-hovered { + background: #555; + border-radius: 2px; + box-shadow: inset 0 0 1px #555; +} +.jstree-default-dark .jstree-context { + background: #555; + border-radius: 2px; + box-shadow: inset 0 0 1px #555; +} +.jstree-default-dark .jstree-clicked { + background: #5fa2db; + border-radius: 2px; + box-shadow: inset 0 0 1px #666666; +} +.jstree-default-dark .jstree-no-icons .jstree-anchor > .jstree-themeicon { + display: none; +} +.jstree-default-dark .jstree-disabled { + background: transparent; + color: #666666; +} +.jstree-default-dark .jstree-disabled.jstree-hovered { + background: transparent; + box-shadow: none; +} +.jstree-default-dark .jstree-disabled.jstree-clicked { + background: #333333; +} +.jstree-default-dark .jstree-disabled > .jstree-icon { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-dark .jstree-search { + font-style: italic; + color: #ffffff; + font-weight: bold; +} +.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox { + display: none !important; +} +.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked { + background: transparent; + box-shadow: none; +} +.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered { + background: #555; +} +.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked { + background: transparent; +} +.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered { + background: #555; +} +.jstree-default-dark > .jstree-striped { + min-width: 100%; + display: inline-block; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat; +} +.jstree-default-dark > .jstree-wholerow-ul .jstree-hovered, +.jstree-default-dark > .jstree-wholerow-ul .jstree-clicked { + background: transparent; + box-shadow: none; + border-radius: 0; +} +.jstree-default-dark .jstree-wholerow { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +.jstree-default-dark .jstree-wholerow-hovered { + background: #555; +} +.jstree-default-dark .jstree-wholerow-clicked { + background: #5fa2db; + background: -webkit-linear-gradient(top, #5fa2db 0%, #5fa2db 100%); + background: linear-gradient(to bottom, #5fa2db 0%, #5fa2db 100%); +} +.jstree-default-dark .jstree-node { + min-height: 24px; + line-height: 24px; + margin-left: 24px; + min-width: 24px; +} +.jstree-default-dark .jstree-anchor { + line-height: 24px; + height: 24px; +} +.jstree-default-dark .jstree-icon { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default-dark .jstree-icon:empty { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default-dark.jstree-rtl .jstree-node { + margin-right: 24px; +} +.jstree-default-dark .jstree-wholerow { + height: 24px; +} +.jstree-default-dark .jstree-node, +.jstree-default-dark .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-dark .jstree-node { + background-position: -292px -4px; + background-repeat: repeat-y; +} +.jstree-default-dark .jstree-last { + background-image: none; +} +.jstree-default-dark .jstree-open > .jstree-ocl { + background-position: -132px -4px; +} +.jstree-default-dark .jstree-closed > .jstree-ocl { + background-position: -100px -4px; +} +.jstree-default-dark .jstree-leaf > .jstree-ocl { + background-position: -68px -4px; +} +.jstree-default-dark .jstree-themeicon { + background-position: -260px -4px; +} +.jstree-default-dark > .jstree-no-dots .jstree-node, +.jstree-default-dark > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -4px; +} +.jstree-default-dark > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -4px; +} +.jstree-default-dark .jstree-disabled { + background: transparent; +} +.jstree-default-dark .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-dark .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-dark .jstree-checkbox { + background-position: -164px -4px; +} +.jstree-default-dark .jstree-checkbox:hover { + background-position: -164px -36px; +} +.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-dark .jstree-checked > .jstree-checkbox { + background-position: -228px -4px; +} +.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-dark .jstree-checked > .jstree-checkbox:hover { + background-position: -228px -36px; +} +.jstree-default-dark .jstree-anchor > .jstree-undetermined { + background-position: -196px -4px; +} +.jstree-default-dark .jstree-anchor > .jstree-undetermined:hover { + background-position: -196px -36px; +} +.jstree-default-dark .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-dark > .jstree-striped { + background-size: auto 48px; +} +.jstree-default-dark.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-dark.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-dark.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -132px -36px; +} +.jstree-default-dark.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -100px -36px; +} +.jstree-default-dark.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -68px -36px; +} +.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -36px; +} +.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -36px; +} +.jstree-default-dark .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-dark > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-dark .jstree-file { + background: url("32px.png") -100px -68px no-repeat; +} +.jstree-default-dark .jstree-folder { + background: url("32px.png") -260px -4px no-repeat; +} +.jstree-default-dark > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-dark { + line-height: 24px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-dark .jstree-ok, +#jstree-dnd.jstree-default-dark .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-dark i { + background: transparent; + width: 24px; + height: 24px; + line-height: 24px; +} +#jstree-dnd.jstree-default-dark .jstree-ok { + background-position: -4px -68px; +} +#jstree-dnd.jstree-default-dark .jstree-er { + background-position: -36px -68px; +} +.jstree-default-dark .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-dark .jstree-ellipsis .jstree-anchor { + width: calc(100% - 24px + 5px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-dark.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); +} +.jstree-default-dark.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-dark-small .jstree-node { + min-height: 18px; + line-height: 18px; + margin-left: 18px; + min-width: 18px; +} +.jstree-default-dark-small .jstree-anchor { + line-height: 18px; + height: 18px; +} +.jstree-default-dark-small .jstree-icon { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-dark-small .jstree-icon:empty { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-dark-small.jstree-rtl .jstree-node { + margin-right: 18px; +} +.jstree-default-dark-small .jstree-wholerow { + height: 18px; +} +.jstree-default-dark-small .jstree-node, +.jstree-default-dark-small .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-dark-small .jstree-node { + background-position: -295px -7px; + background-repeat: repeat-y; +} +.jstree-default-dark-small .jstree-last { + background-image: none; +} +.jstree-default-dark-small .jstree-open > .jstree-ocl { + background-position: -135px -7px; +} +.jstree-default-dark-small .jstree-closed > .jstree-ocl { + background-position: -103px -7px; +} +.jstree-default-dark-small .jstree-leaf > .jstree-ocl { + background-position: -71px -7px; +} +.jstree-default-dark-small .jstree-themeicon { + background-position: -263px -7px; +} +.jstree-default-dark-small > .jstree-no-dots .jstree-node, +.jstree-default-dark-small > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark-small > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -7px; +} +.jstree-default-dark-small > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -7px; +} +.jstree-default-dark-small .jstree-disabled { + background: transparent; +} +.jstree-default-dark-small .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-dark-small .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-dark-small .jstree-checkbox { + background-position: -167px -7px; +} +.jstree-default-dark-small .jstree-checkbox:hover { + background-position: -167px -39px; +} +.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-dark-small .jstree-checked > .jstree-checkbox { + background-position: -231px -7px; +} +.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-dark-small .jstree-checked > .jstree-checkbox:hover { + background-position: -231px -39px; +} +.jstree-default-dark-small .jstree-anchor > .jstree-undetermined { + background-position: -199px -7px; +} +.jstree-default-dark-small .jstree-anchor > .jstree-undetermined:hover { + background-position: -199px -39px; +} +.jstree-default-dark-small .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-dark-small > .jstree-striped { + background-size: auto 36px; +} +.jstree-default-dark-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-dark-small.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-dark-small.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -135px -39px; +} +.jstree-default-dark-small.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -103px -39px; +} +.jstree-default-dark-small.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -71px -39px; +} +.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -39px; +} +.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -39px; +} +.jstree-default-dark-small .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-dark-small > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-dark-small .jstree-file { + background: url("32px.png") -103px -71px no-repeat; +} +.jstree-default-dark-small .jstree-folder { + background: url("32px.png") -263px -7px no-repeat; +} +.jstree-default-dark-small > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-dark-small { + line-height: 18px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-dark-small .jstree-ok, +#jstree-dnd.jstree-default-dark-small .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-dark-small i { + background: transparent; + width: 18px; + height: 18px; + line-height: 18px; +} +#jstree-dnd.jstree-default-dark-small .jstree-ok { + background-position: -7px -71px; +} +#jstree-dnd.jstree-default-dark-small .jstree-er { + background-position: -39px -71px; +} +.jstree-default-dark-small .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-dark-small .jstree-ellipsis .jstree-anchor { + width: calc(100% - 18px + 5px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-dark-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); +} +.jstree-default-dark-small.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-dark-large .jstree-node { + min-height: 32px; + line-height: 32px; + margin-left: 32px; + min-width: 32px; +} +.jstree-default-dark-large .jstree-anchor { + line-height: 32px; + height: 32px; +} +.jstree-default-dark-large .jstree-icon { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-dark-large .jstree-icon:empty { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-dark-large.jstree-rtl .jstree-node { + margin-right: 32px; +} +.jstree-default-dark-large .jstree-wholerow { + height: 32px; +} +.jstree-default-dark-large .jstree-node, +.jstree-default-dark-large .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-dark-large .jstree-node { + background-position: -288px 0px; + background-repeat: repeat-y; +} +.jstree-default-dark-large .jstree-last { + background-image: none; +} +.jstree-default-dark-large .jstree-open > .jstree-ocl { + background-position: -128px 0px; +} +.jstree-default-dark-large .jstree-closed > .jstree-ocl { + background-position: -96px 0px; +} +.jstree-default-dark-large .jstree-leaf > .jstree-ocl { + background-position: -64px 0px; +} +.jstree-default-dark-large .jstree-themeicon { + background-position: -256px 0px; +} +.jstree-default-dark-large > .jstree-no-dots .jstree-node, +.jstree-default-dark-large > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark-large > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px 0px; +} +.jstree-default-dark-large > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px 0px; +} +.jstree-default-dark-large .jstree-disabled { + background: transparent; +} +.jstree-default-dark-large .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-dark-large .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-dark-large .jstree-checkbox { + background-position: -160px 0px; +} +.jstree-default-dark-large .jstree-checkbox:hover { + background-position: -160px -32px; +} +.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-dark-large .jstree-checked > .jstree-checkbox { + background-position: -224px 0px; +} +.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-dark-large .jstree-checked > .jstree-checkbox:hover { + background-position: -224px -32px; +} +.jstree-default-dark-large .jstree-anchor > .jstree-undetermined { + background-position: -192px 0px; +} +.jstree-default-dark-large .jstree-anchor > .jstree-undetermined:hover { + background-position: -192px -32px; +} +.jstree-default-dark-large .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-dark-large > .jstree-striped { + background-size: auto 64px; +} +.jstree-default-dark-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-dark-large.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-dark-large.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -128px -32px; +} +.jstree-default-dark-large.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -96px -32px; +} +.jstree-default-dark-large.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -64px -32px; +} +.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px -32px; +} +.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px -32px; +} +.jstree-default-dark-large .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-dark-large > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-dark-large .jstree-file { + background: url("32px.png") -96px -64px no-repeat; +} +.jstree-default-dark-large .jstree-folder { + background: url("32px.png") -256px 0px no-repeat; +} +.jstree-default-dark-large > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-dark-large { + line-height: 32px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-dark-large .jstree-ok, +#jstree-dnd.jstree-default-dark-large .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-dark-large i { + background: transparent; + width: 32px; + height: 32px; + line-height: 32px; +} +#jstree-dnd.jstree-default-dark-large .jstree-ok { + background-position: 0px -64px; +} +#jstree-dnd.jstree-default-dark-large .jstree-er { + background-position: -32px -64px; +} +.jstree-default-dark-large .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-dark-large .jstree-ellipsis .jstree-anchor { + width: calc(100% - 32px + 5px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-dark-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); +} +.jstree-default-dark-large.jstree-rtl .jstree-last { + background-image: none; +} +@media (max-width: 768px) { + #jstree-dnd.jstree-dnd-responsive { + line-height: 40px; + font-weight: bold; + font-size: 1.1em; + text-shadow: 1px 1px white; + } + #jstree-dnd.jstree-dnd-responsive > i { + background: transparent; + width: 40px; + height: 40px; + } + #jstree-dnd.jstree-dnd-responsive > .jstree-ok { + background-image: url("40px.png"); + background-position: 0 -200px; + background-size: 120px 240px; + } + #jstree-dnd.jstree-dnd-responsive > .jstree-er { + background-image: url("40px.png"); + background-position: -40px -200px; + background-size: 120px 240px; + } + #jstree-marker.jstree-dnd-responsive { + border-left-width: 10px; + border-top-width: 10px; + border-bottom-width: 10px; + margin-top: -10px; + } +} +@media (max-width: 768px) { + .jstree-default-dark-responsive { + /* + .jstree-open > .jstree-ocl, + .jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; } + */ + } + .jstree-default-dark-responsive .jstree-icon { + background-image: url("40px.png"); + } + .jstree-default-dark-responsive .jstree-node, + .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-dark-responsive .jstree-node { + min-height: 40px; + line-height: 40px; + margin-left: 40px; + min-width: 40px; + white-space: nowrap; + } + .jstree-default-dark-responsive .jstree-anchor { + line-height: 40px; + height: 40px; + } + .jstree-default-dark-responsive .jstree-icon, + .jstree-default-dark-responsive .jstree-icon:empty { + width: 40px; + height: 40px; + line-height: 40px; + } + .jstree-default-dark-responsive > .jstree-container-ul > .jstree-node { + margin-left: 0; + } + .jstree-default-dark-responsive.jstree-rtl .jstree-node { + margin-left: 0; + margin-right: 40px; + background: transparent; + } + .jstree-default-dark-responsive.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; + } + .jstree-default-dark-responsive .jstree-ocl, + .jstree-default-dark-responsive .jstree-themeicon, + .jstree-default-dark-responsive .jstree-checkbox { + background-size: 120px 240px; + } + .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl, + .jstree-default-dark-responsive.jstree-rtl .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-dark-responsive .jstree-open > .jstree-ocl { + background-position: 0 0 !important; + } + .jstree-default-dark-responsive .jstree-closed > .jstree-ocl { + background-position: 0 -40px !important; + } + .jstree-default-dark-responsive.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -40px 0 !important; + } + .jstree-default-dark-responsive .jstree-themeicon { + background-position: -40px -40px; + } + .jstree-default-dark-responsive .jstree-checkbox, + .jstree-default-dark-responsive .jstree-checkbox:hover { + background-position: -40px -80px; + } + .jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, + .jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, + .jstree-default-dark-responsive .jstree-checked > .jstree-checkbox, + .jstree-default-dark-responsive .jstree-checked > .jstree-checkbox:hover { + background-position: 0 -80px; + } + .jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined, + .jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined:hover { + background-position: 0 -120px; + } + .jstree-default-dark-responsive .jstree-anchor { + font-weight: bold; + font-size: 1.1em; + text-shadow: 1px 1px white; + } + .jstree-default-dark-responsive > .jstree-striped { + background: transparent; + } + .jstree-default-dark-responsive .jstree-wholerow { + border-top: 1px solid #666; + border-bottom: 1px solid #000; + background: #333333; + height: 40px; + } + .jstree-default-dark-responsive .jstree-wholerow-hovered { + background: #555; + } + .jstree-default-dark-responsive .jstree-wholerow-clicked { + background: #5fa2db; + } + .jstree-default-dark-responsive .jstree-children .jstree-last > .jstree-wholerow { + box-shadow: inset 0 -6px 3px -5px #111111; + } + .jstree-default-dark-responsive .jstree-children .jstree-open > .jstree-wholerow { + box-shadow: inset 0 6px 3px -5px #111111; + border-top: 0; + } + .jstree-default-dark-responsive .jstree-children .jstree-open + .jstree-open { + box-shadow: none; + } + .jstree-default-dark-responsive .jstree-node, + .jstree-default-dark-responsive .jstree-icon, + .jstree-default-dark-responsive .jstree-node > .jstree-ocl, + .jstree-default-dark-responsive .jstree-themeicon, + .jstree-default-dark-responsive .jstree-checkbox { + background-image: url("40px.png"); + background-size: 120px 240px; + } + .jstree-default-dark-responsive .jstree-node { + background-position: -80px 0; + background-repeat: repeat-y; + } + .jstree-default-dark-responsive .jstree-last { + background-image: none; + } + .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl { + background-position: -40px -120px; + } + .jstree-default-dark-responsive .jstree-last > .jstree-ocl { + background-position: -40px -160px; + } + .jstree-default-dark-responsive .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; + } + .jstree-default-dark-responsive .jstree-file { + background: url("40px.png") 0 -160px no-repeat; + background-size: 120px 240px; + } + .jstree-default-dark-responsive .jstree-folder { + background: url("40px.png") -40px -40px no-repeat; + background-size: 120px 240px; + } + .jstree-default-dark-responsive > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; + } +} +.jstree-default-dark { + background: #333; +} +.jstree-default-dark .jstree-anchor { + color: #999; + text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); +} +.jstree-default-dark .jstree-clicked, +.jstree-default-dark .jstree-checked { + color: white; +} +.jstree-default-dark .jstree-hovered { + color: white; +} +#jstree-marker.jstree-default-dark { + border-left-color: #999; + background: transparent; +} +.jstree-default-dark .jstree-anchor > .jstree-icon { + opacity: 0.75; +} +.jstree-default-dark .jstree-clicked > .jstree-icon, +.jstree-default-dark .jstree-hovered > .jstree-icon, +.jstree-default-dark .jstree-checked > .jstree-icon { + opacity: 1; +} +.jstree-default-dark.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); +} +.jstree-default-dark.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-dark-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); +} +.jstree-default-dark-small.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-dark-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); +} +.jstree-default-dark-large.jstree-rtl .jstree-last { + background-image: none; +} diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/style.min.css b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/style.min.css new file mode 100644 index 0000000..ddcf628 --- /dev/null +++ b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/style.min.css @@ -0,0 +1 @@ +.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:black;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jstree-contextmenu .jstree-anchor{-webkit-user-select:none;-webkit-touch-callout:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em 0 2em;text-decoration:none;width:auto;color:black;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 white;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-no-icons{margin-left:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:white;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context .vakata-contextmenu-disabled>a>i{filter:grayscale(100%)}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:transparent;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:white;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:white;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px 0 2px}.jstree-default-dark .jstree-node,.jstree-default-dark .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default-dark .jstree-anchor,.jstree-default-dark .jstree-animated,.jstree-default-dark .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default-dark .jstree-hovered{background:#555;border-radius:2px;box-shadow:inset 0 0 1px #555}.jstree-default-dark .jstree-context{background:#555;border-radius:2px;box-shadow:inset 0 0 1px #555}.jstree-default-dark .jstree-clicked{background:#5fa2db;border-radius:2px;box-shadow:inset 0 0 1px #666666}.jstree-default-dark .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default-dark .jstree-disabled{background:transparent;color:#666666}.jstree-default-dark .jstree-disabled.jstree-hovered{background:transparent;box-shadow:none}.jstree-default-dark .jstree-disabled.jstree-clicked{background:#333333}.jstree-default-dark .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark .jstree-search{font-style:italic;color:#ffffff;font-weight:bold}.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox{display:none !important}.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked{background:transparent;box-shadow:none}.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#555}.jstree-default-dark.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:transparent}.jstree-default-dark.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#555}.jstree-default-dark>.jstree-striped{min-width:100%;display:inline-block;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat}.jstree-default-dark>.jstree-wholerow-ul .jstree-hovered,.jstree-default-dark>.jstree-wholerow-ul .jstree-clicked{background:transparent;box-shadow:none;border-radius:0}.jstree-default-dark .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default-dark .jstree-wholerow-hovered{background:#555}.jstree-default-dark .jstree-wholerow-clicked{background:#5fa2db;background:-webkit-linear-gradient(top, #5fa2db 0%, #5fa2db 100%);background:linear-gradient(to bottom, #5fa2db 0%, #5fa2db 100%)}.jstree-default-dark .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default-dark .jstree-anchor{line-height:24px;height:24px}.jstree-default-dark .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default-dark .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default-dark.jstree-rtl .jstree-node{margin-right:24px}.jstree-default-dark .jstree-wholerow{height:24px}.jstree-default-dark .jstree-node,.jstree-default-dark .jstree-icon{background-image:url("32px.png")}.jstree-default-dark .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default-dark .jstree-last{background-image:none}.jstree-default-dark .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default-dark .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default-dark .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default-dark .jstree-themeicon{background-position:-260px -4px}.jstree-default-dark>.jstree-no-dots .jstree-node,.jstree-default-dark>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default-dark>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default-dark .jstree-disabled{background:transparent}.jstree-default-dark .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-dark .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark .jstree-checkbox{background-position:-164px -4px}.jstree-default-dark .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default-dark.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default-dark.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default-dark .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default-dark .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default-dark .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark>.jstree-striped{background-size:auto 48px}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark.jstree-rtl .jstree-last{background-image:none}.jstree-default-dark.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default-dark.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default-dark.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default-dark .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-dark .jstree-file{background:url("32px.png") -100px -68px no-repeat}.jstree-default-dark .jstree-folder{background:url("32px.png") -260px -4px no-repeat}.jstree-default-dark>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default-dark .jstree-ok,#jstree-dnd.jstree-default-dark .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark i{background:transparent;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default-dark .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default-dark .jstree-er{background-position:-36px -68px}.jstree-default-dark .jstree-ellipsis{overflow:hidden}.jstree-default-dark .jstree-ellipsis .jstree-anchor{width:calc(100% - 24px + 5px);text-overflow:ellipsis;overflow:hidden}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==")}.jstree-default-dark.jstree-rtl .jstree-last{background-image:none}.jstree-default-dark-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-dark-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-dark-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-dark-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-dark-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-dark-small .jstree-wholerow{height:18px}.jstree-default-dark-small .jstree-node,.jstree-default-dark-small .jstree-icon{background-image:url("32px.png")}.jstree-default-dark-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-dark-small .jstree-last{background-image:none}.jstree-default-dark-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-dark-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-dark-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-dark-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-dark-small>.jstree-no-dots .jstree-node,.jstree-default-dark-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-dark-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-dark-small .jstree-disabled{background:transparent}.jstree-default-dark-small .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-dark-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-dark-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-dark-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-dark-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-dark-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark-small>.jstree-striped{background-size:auto 36px}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark-small.jstree-rtl .jstree-last{background-image:none}.jstree-default-dark-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-dark-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-dark-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-dark-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-dark-small .jstree-file{background:url("32px.png") -103px -71px no-repeat}.jstree-default-dark-small .jstree-folder{background:url("32px.png") -263px -7px no-repeat}.jstree-default-dark-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-dark-small .jstree-ok,#jstree-dnd.jstree-default-dark-small .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark-small i{background:transparent;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-dark-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-dark-small .jstree-er{background-position:-39px -71px}.jstree-default-dark-small .jstree-ellipsis{overflow:hidden}.jstree-default-dark-small .jstree-ellipsis .jstree-anchor{width:calc(100% - 18px + 5px);text-overflow:ellipsis;overflow:hidden}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==")}.jstree-default-dark-small.jstree-rtl .jstree-last{background-image:none}.jstree-default-dark-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-dark-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-dark-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-dark-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-dark-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-dark-large .jstree-wholerow{height:32px}.jstree-default-dark-large .jstree-node,.jstree-default-dark-large .jstree-icon{background-image:url("32px.png")}.jstree-default-dark-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-dark-large .jstree-last{background-image:none}.jstree-default-dark-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-dark-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-dark-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-dark-large .jstree-themeicon{background-position:-256px 0}.jstree-default-dark-large>.jstree-no-dots .jstree-node,.jstree-default-dark-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-dark-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-dark-large .jstree-disabled{background:transparent}.jstree-default-dark-large .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-dark-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark-large .jstree-checkbox{background-position:-160px 0}.jstree-default-dark-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-dark-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-dark-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-dark-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark-large>.jstree-striped{background-size:auto 64px}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark-large.jstree-rtl .jstree-last{background-image:none}.jstree-default-dark-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-dark-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-dark-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-dark-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-dark-large .jstree-file{background:url("32px.png") -96px -64px no-repeat}.jstree-default-dark-large .jstree-folder{background:url("32px.png") -256px 0 no-repeat}.jstree-default-dark-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-dark-large .jstree-ok,#jstree-dnd.jstree-default-dark-large .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark-large i{background:transparent;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-dark-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-dark-large .jstree-er{background-position:-32px -64px}.jstree-default-dark-large .jstree-ellipsis{overflow:hidden}.jstree-default-dark-large .jstree-ellipsis .jstree-anchor{width:calc(100% - 32px + 5px);text-overflow:ellipsis;overflow:hidden}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==")}.jstree-default-dark-large.jstree-rtl .jstree-last{background-image:none}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:bold;font-size:1.1em;text-shadow:1px 1px white}#jstree-dnd.jstree-dnd-responsive>i{background:transparent;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url("40px.png");background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url("40px.png");background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-dark-responsive .jstree-icon{background-image:url("40px.png")}.jstree-default-dark-responsive .jstree-node,.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-dark-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-dark-responsive .jstree-icon,.jstree-default-dark-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-dark-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-dark-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:transparent}.jstree-default-dark-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-dark-responsive .jstree-ocl,.jstree-default-dark-responsive .jstree-themeicon,.jstree-default-dark-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl,.jstree-default-dark-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-responsive .jstree-open>.jstree-ocl{background-position:0 0 !important}.jstree-default-dark-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px !important}.jstree-default-dark-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0 !important}.jstree-default-dark-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-dark-responsive .jstree-checkbox,.jstree-default-dark-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-responsive .jstree-checked>.jstree-checkbox,.jstree-default-dark-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-dark-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-dark-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-dark-responsive .jstree-anchor{font-weight:bold;font-size:1.1em;text-shadow:1px 1px white}.jstree-default-dark-responsive>.jstree-striped{background:transparent}.jstree-default-dark-responsive .jstree-wholerow{border-top:1px solid #666;border-bottom:1px solid #000;background:#333333;height:40px}.jstree-default-dark-responsive .jstree-wholerow-hovered{background:#555}.jstree-default-dark-responsive .jstree-wholerow-clicked{background:#5fa2db}.jstree-default-dark-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #111111}.jstree-default-dark-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #111111;border-top:0}.jstree-default-dark-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-dark-responsive .jstree-node,.jstree-default-dark-responsive .jstree-icon,.jstree-default-dark-responsive .jstree-node>.jstree-ocl,.jstree-default-dark-responsive .jstree-themeicon,.jstree-default-dark-responsive .jstree-checkbox{background-image:url("40px.png");background-size:120px 240px}.jstree-default-dark-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-dark-responsive .jstree-last{background-image:none}.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-dark-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-dark-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-responsive .jstree-file{background:url("40px.png") 0 -160px no-repeat;background-size:120px 240px}.jstree-default-dark-responsive .jstree-folder{background:url("40px.png") -40px -40px no-repeat;background-size:120px 240px}.jstree-default-dark-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}.jstree-default-dark{background:#333}.jstree-default-dark .jstree-anchor{color:#999;text-shadow:1px 1px 0 rgba(0,0,0,0.5)}.jstree-default-dark .jstree-clicked,.jstree-default-dark .jstree-checked{color:white}.jstree-default-dark .jstree-hovered{color:white}#jstree-marker.jstree-default-dark{border-left-color:#999;background:transparent}.jstree-default-dark .jstree-anchor>.jstree-icon{opacity:.75}.jstree-default-dark .jstree-clicked>.jstree-icon,.jstree-default-dark .jstree-hovered>.jstree-icon,.jstree-default-dark .jstree-checked>.jstree-icon{opacity:1}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==")}.jstree-default-dark.jstree-rtl .jstree-last{background-image:none}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==")}.jstree-default-dark-small.jstree-rtl .jstree-last{background-image:none}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==")}.jstree-default-dark-large.jstree-rtl .jstree-last{background-image:none} \ No newline at end of file diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/throbber.gif b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/throbber.gif new file mode 100644 index 0000000..169062c Binary files /dev/null and b/COMCMS.Web/wwwroot/js/jstree/themes/default-dark/throbber.gif differ diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default/32px.png b/COMCMS.Web/wwwroot/js/jstree/themes/default/32px.png new file mode 100644 index 0000000..ca6af20 Binary files /dev/null and b/COMCMS.Web/wwwroot/js/jstree/themes/default/32px.png differ diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default/40px.png b/COMCMS.Web/wwwroot/js/jstree/themes/default/40px.png new file mode 100644 index 0000000..2a3fcb9 Binary files /dev/null and b/COMCMS.Web/wwwroot/js/jstree/themes/default/40px.png differ diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default/style.css b/COMCMS.Web/wwwroot/js/jstree/themes/default/style.css new file mode 100644 index 0000000..d851cd5 --- /dev/null +++ b/COMCMS.Web/wwwroot/js/jstree/themes/default/style.css @@ -0,0 +1,1106 @@ +/* jsTree default theme */ +.jstree-node, +.jstree-children, +.jstree-container-ul { + display: block; + margin: 0; + padding: 0; + list-style-type: none; + list-style-image: none; +} +.jstree-node { + white-space: nowrap; +} +.jstree-anchor { + display: inline-block; + color: black; + white-space: nowrap; + padding: 0 4px 0 1px; + margin: 0; + vertical-align: top; +} +.jstree-anchor:focus { + outline: 0; +} +.jstree-anchor, +.jstree-anchor:link, +.jstree-anchor:visited, +.jstree-anchor:hover, +.jstree-anchor:active { + text-decoration: none; + color: inherit; +} +.jstree-icon { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0; + vertical-align: top; + text-align: center; +} +.jstree-icon:empty { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0; + vertical-align: top; + text-align: center; +} +.jstree-ocl { + cursor: pointer; +} +.jstree-leaf > .jstree-ocl { + cursor: default; +} +.jstree .jstree-open > .jstree-children { + display: block; +} +.jstree .jstree-closed > .jstree-children, +.jstree .jstree-leaf > .jstree-children { + display: none; +} +.jstree-anchor > .jstree-themeicon { + margin-right: 2px; +} +.jstree-no-icons .jstree-themeicon, +.jstree-anchor > .jstree-themeicon-hidden { + display: none; +} +.jstree-hidden, +.jstree-node.jstree-hidden { + display: none; +} +.jstree-rtl .jstree-anchor { + padding: 0 1px 0 4px; +} +.jstree-rtl .jstree-anchor > .jstree-themeicon { + margin-left: 2px; + margin-right: 0; +} +.jstree-rtl .jstree-node { + margin-left: 0; +} +.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; +} +.jstree-wholerow-ul { + position: relative; + display: inline-block; + min-width: 100%; +} +.jstree-wholerow-ul .jstree-leaf > .jstree-ocl { + cursor: pointer; +} +.jstree-wholerow-ul .jstree-anchor, +.jstree-wholerow-ul .jstree-icon { + position: relative; +} +.jstree-wholerow-ul .jstree-wholerow { + width: 100%; + cursor: pointer; + position: absolute; + left: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.jstree-contextmenu .jstree-anchor { + -webkit-user-select: none; + /* disable selection/Copy of UIWebView */ + -webkit-touch-callout: none; + /* disable the IOS popup when long-press on a link */ + user-select: none; +} +.vakata-context { + display: none; +} +.vakata-context, +.vakata-context ul { + margin: 0; + padding: 2px; + position: absolute; + background: #f5f5f5; + border: 1px solid #979797; + box-shadow: 2px 2px 2px #999999; +} +.vakata-context ul { + list-style: none; + left: 100%; + margin-top: -2.7em; + margin-left: -4px; +} +.vakata-context .vakata-context-right ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context li { + list-style: none; +} +.vakata-context li > a { + display: block; + padding: 0 2em 0 2em; + text-decoration: none; + width: auto; + color: black; + white-space: nowrap; + line-height: 2.4em; + text-shadow: 1px 1px 0 white; + border-radius: 1px; +} +.vakata-context li > a:hover { + position: relative; + background-color: #e8eff7; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw=="); + background-position: right center; + background-repeat: no-repeat; +} +.vakata-context li > a:focus { + outline: 0; +} +.vakata-context .vakata-context-no-icons { + margin-left: 0; +} +.vakata-context .vakata-context-hover > a { + position: relative; + background-color: #e8eff7; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context .vakata-context-separator > a, +.vakata-context .vakata-context-separator > a:hover { + background: white; + border: 0; + border-top: 1px solid #e2e3e3; + height: 1px; + min-height: 1px; + max-height: 1px; + padding: 0; + margin: 0 0 0 2.4em; + border-left: 1px solid #e0e0e0; + text-shadow: 0 0 0 transparent; + box-shadow: 0 0 0 transparent; + border-radius: 0; +} +.vakata-context .vakata-contextmenu-disabled a, +.vakata-context .vakata-contextmenu-disabled a:hover { + color: silver; + background-color: transparent; + border: 0; + box-shadow: 0 0 0; +} +.vakata-context .vakata-contextmenu-disabled > a > i { + filter: grayscale(100%); +} +.vakata-context li > a > i { + text-decoration: none; + display: inline-block; + width: 2.4em; + height: 2.4em; + background: transparent; + margin: 0 0 0 -2em; + vertical-align: top; + text-align: center; + line-height: 2.4em; +} +.vakata-context li > a > i:empty { + width: 2.4em; + line-height: 2.4em; +} +.vakata-context li > a .vakata-contextmenu-sep { + display: inline-block; + width: 1px; + height: 2.4em; + background: white; + margin: 0 0.5em 0 0; + border-left: 1px solid #e2e3e3; +} +.vakata-context .vakata-contextmenu-shortcut { + font-size: 0.8em; + color: silver; + opacity: 0.5; + display: none; +} +.vakata-context-rtl ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context-rtl li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7"); + background-position: left center; + background-repeat: no-repeat; +} +.vakata-context-rtl .vakata-context-separator > a { + margin: 0 2.4em 0 0; + border-left: 0; + border-right: 1px solid #e2e3e3; +} +.vakata-context-rtl .vakata-context-left ul { + right: auto; + left: 100%; + margin-left: -4px; + margin-right: auto; +} +.vakata-context-rtl li > a > i { + margin: 0 -2em 0 0; +} +.vakata-context-rtl li > a .vakata-contextmenu-sep { + margin: 0 0 0 0.5em; + border-left-color: white; + background: #e2e3e3; +} +#jstree-marker { + position: absolute; + top: 0; + left: 0; + margin: -5px 0 0 0; + padding: 0; + border-right: 0; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid; + width: 0; + height: 0; + font-size: 0; + line-height: 0; +} +#jstree-dnd { + line-height: 16px; + margin: 0; + padding: 4px; +} +#jstree-dnd .jstree-icon, +#jstree-dnd .jstree-copy { + display: inline-block; + text-decoration: none; + margin: 0 2px 0 0; + padding: 0; + width: 16px; + height: 16px; +} +#jstree-dnd .jstree-ok { + background: green; +} +#jstree-dnd .jstree-er { + background: red; +} +#jstree-dnd .jstree-copy { + margin: 0 2px 0 2px; +} +.jstree-default .jstree-node, +.jstree-default .jstree-icon { + background-repeat: no-repeat; + background-color: transparent; +} +.jstree-default .jstree-anchor, +.jstree-default .jstree-animated, +.jstree-default .jstree-wholerow { + transition: background-color 0.15s, box-shadow 0.15s; +} +.jstree-default .jstree-hovered { + background: #e7f4f9; + border-radius: 2px; + box-shadow: inset 0 0 1px #cccccc; +} +.jstree-default .jstree-context { + background: #e7f4f9; + border-radius: 2px; + box-shadow: inset 0 0 1px #cccccc; +} +.jstree-default .jstree-clicked { + background: #beebff; + border-radius: 2px; + box-shadow: inset 0 0 1px #999999; +} +.jstree-default .jstree-no-icons .jstree-anchor > .jstree-themeicon { + display: none; +} +.jstree-default .jstree-disabled { + background: transparent; + color: #666666; +} +.jstree-default .jstree-disabled.jstree-hovered { + background: transparent; + box-shadow: none; +} +.jstree-default .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default .jstree-disabled > .jstree-icon { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default .jstree-search { + font-style: italic; + color: #8b0000; + font-weight: bold; +} +.jstree-default .jstree-no-checkboxes .jstree-checkbox { + display: none !important; +} +.jstree-default.jstree-checkbox-no-clicked .jstree-clicked { + background: transparent; + box-shadow: none; +} +.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered { + background: #e7f4f9; +} +.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked { + background: transparent; +} +.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered { + background: #e7f4f9; +} +.jstree-default > .jstree-striped { + min-width: 100%; + display: inline-block; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat; +} +.jstree-default > .jstree-wholerow-ul .jstree-hovered, +.jstree-default > .jstree-wholerow-ul .jstree-clicked { + background: transparent; + box-shadow: none; + border-radius: 0; +} +.jstree-default .jstree-wholerow { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +.jstree-default .jstree-wholerow-hovered { + background: #e7f4f9; +} +.jstree-default .jstree-wholerow-clicked { + background: #beebff; + background: -webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%); + background: linear-gradient(to bottom, #beebff 0%, #a8e4ff 100%); +} +.jstree-default .jstree-node { + min-height: 24px; + line-height: 24px; + margin-left: 24px; + min-width: 24px; +} +.jstree-default .jstree-anchor { + line-height: 24px; + height: 24px; +} +.jstree-default .jstree-icon { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default .jstree-icon:empty { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default.jstree-rtl .jstree-node { + margin-right: 24px; +} +.jstree-default .jstree-wholerow { + height: 24px; +} +.jstree-default .jstree-node, +.jstree-default .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default .jstree-node { + background-position: -292px -4px; + background-repeat: repeat-y; +} +.jstree-default .jstree-last { + background-image: none; +} +.jstree-default .jstree-open > .jstree-ocl { + background-position: -132px -4px; +} +.jstree-default .jstree-closed > .jstree-ocl { + background-position: -100px -4px; +} +.jstree-default .jstree-leaf > .jstree-ocl { + background-position: -68px -4px; +} +.jstree-default .jstree-themeicon { + background-position: -260px -4px; +} +.jstree-default > .jstree-no-dots .jstree-node, +.jstree-default > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -4px; +} +.jstree-default > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -4px; +} +.jstree-default .jstree-disabled { + background: transparent; +} +.jstree-default .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default .jstree-checkbox { + background-position: -164px -4px; +} +.jstree-default .jstree-checkbox:hover { + background-position: -164px -36px; +} +.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default .jstree-checked > .jstree-checkbox { + background-position: -228px -4px; +} +.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default .jstree-checked > .jstree-checkbox:hover { + background-position: -228px -36px; +} +.jstree-default .jstree-anchor > .jstree-undetermined { + background-position: -196px -4px; +} +.jstree-default .jstree-anchor > .jstree-undetermined:hover { + background-position: -196px -36px; +} +.jstree-default .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default > .jstree-striped { + background-size: auto 48px; +} +.jstree-default.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -132px -36px; +} +.jstree-default.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -100px -36px; +} +.jstree-default.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -68px -36px; +} +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -36px; +} +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -36px; +} +.jstree-default .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default .jstree-file { + background: url("32px.png") -100px -68px no-repeat; +} +.jstree-default .jstree-folder { + background: url("32px.png") -260px -4px no-repeat; +} +.jstree-default > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default { + line-height: 24px; + padding: 0 4px; +} +#jstree-dnd.jstree-default .jstree-ok, +#jstree-dnd.jstree-default .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default i { + background: transparent; + width: 24px; + height: 24px; + line-height: 24px; +} +#jstree-dnd.jstree-default .jstree-ok { + background-position: -4px -68px; +} +#jstree-dnd.jstree-default .jstree-er { + background-position: -36px -68px; +} +.jstree-default .jstree-ellipsis { + overflow: hidden; +} +.jstree-default .jstree-ellipsis .jstree-anchor { + width: calc(100% - 24px + 5px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); +} +.jstree-default.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-small .jstree-node { + min-height: 18px; + line-height: 18px; + margin-left: 18px; + min-width: 18px; +} +.jstree-default-small .jstree-anchor { + line-height: 18px; + height: 18px; +} +.jstree-default-small .jstree-icon { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-small .jstree-icon:empty { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-small.jstree-rtl .jstree-node { + margin-right: 18px; +} +.jstree-default-small .jstree-wholerow { + height: 18px; +} +.jstree-default-small .jstree-node, +.jstree-default-small .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-small .jstree-node { + background-position: -295px -7px; + background-repeat: repeat-y; +} +.jstree-default-small .jstree-last { + background-image: none; +} +.jstree-default-small .jstree-open > .jstree-ocl { + background-position: -135px -7px; +} +.jstree-default-small .jstree-closed > .jstree-ocl { + background-position: -103px -7px; +} +.jstree-default-small .jstree-leaf > .jstree-ocl { + background-position: -71px -7px; +} +.jstree-default-small .jstree-themeicon { + background-position: -263px -7px; +} +.jstree-default-small > .jstree-no-dots .jstree-node, +.jstree-default-small > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-small > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -7px; +} +.jstree-default-small > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -7px; +} +.jstree-default-small .jstree-disabled { + background: transparent; +} +.jstree-default-small .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-small .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-small .jstree-checkbox { + background-position: -167px -7px; +} +.jstree-default-small .jstree-checkbox:hover { + background-position: -167px -39px; +} +.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-small .jstree-checked > .jstree-checkbox { + background-position: -231px -7px; +} +.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-small .jstree-checked > .jstree-checkbox:hover { + background-position: -231px -39px; +} +.jstree-default-small .jstree-anchor > .jstree-undetermined { + background-position: -199px -7px; +} +.jstree-default-small .jstree-anchor > .jstree-undetermined:hover { + background-position: -199px -39px; +} +.jstree-default-small .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-small > .jstree-striped { + background-size: auto 36px; +} +.jstree-default-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-small.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-small.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -135px -39px; +} +.jstree-default-small.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -103px -39px; +} +.jstree-default-small.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -71px -39px; +} +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -39px; +} +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -39px; +} +.jstree-default-small .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-small .jstree-file { + background: url("32px.png") -103px -71px no-repeat; +} +.jstree-default-small .jstree-folder { + background: url("32px.png") -263px -7px no-repeat; +} +.jstree-default-small > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-small { + line-height: 18px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-small .jstree-ok, +#jstree-dnd.jstree-default-small .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-small i { + background: transparent; + width: 18px; + height: 18px; + line-height: 18px; +} +#jstree-dnd.jstree-default-small .jstree-ok { + background-position: -7px -71px; +} +#jstree-dnd.jstree-default-small .jstree-er { + background-position: -39px -71px; +} +.jstree-default-small .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-small .jstree-ellipsis .jstree-anchor { + width: calc(100% - 18px + 5px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); +} +.jstree-default-small.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-large .jstree-node { + min-height: 32px; + line-height: 32px; + margin-left: 32px; + min-width: 32px; +} +.jstree-default-large .jstree-anchor { + line-height: 32px; + height: 32px; +} +.jstree-default-large .jstree-icon { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-large .jstree-icon:empty { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-large.jstree-rtl .jstree-node { + margin-right: 32px; +} +.jstree-default-large .jstree-wholerow { + height: 32px; +} +.jstree-default-large .jstree-node, +.jstree-default-large .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-large .jstree-node { + background-position: -288px 0px; + background-repeat: repeat-y; +} +.jstree-default-large .jstree-last { + background-image: none; +} +.jstree-default-large .jstree-open > .jstree-ocl { + background-position: -128px 0px; +} +.jstree-default-large .jstree-closed > .jstree-ocl { + background-position: -96px 0px; +} +.jstree-default-large .jstree-leaf > .jstree-ocl { + background-position: -64px 0px; +} +.jstree-default-large .jstree-themeicon { + background-position: -256px 0px; +} +.jstree-default-large > .jstree-no-dots .jstree-node, +.jstree-default-large > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-large > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px 0px; +} +.jstree-default-large > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px 0px; +} +.jstree-default-large .jstree-disabled { + background: transparent; +} +.jstree-default-large .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-large .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-large .jstree-checkbox { + background-position: -160px 0px; +} +.jstree-default-large .jstree-checkbox:hover { + background-position: -160px -32px; +} +.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-large .jstree-checked > .jstree-checkbox { + background-position: -224px 0px; +} +.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-large .jstree-checked > .jstree-checkbox:hover { + background-position: -224px -32px; +} +.jstree-default-large .jstree-anchor > .jstree-undetermined { + background-position: -192px 0px; +} +.jstree-default-large .jstree-anchor > .jstree-undetermined:hover { + background-position: -192px -32px; +} +.jstree-default-large .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-large > .jstree-striped { + background-size: auto 64px; +} +.jstree-default-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-large.jstree-rtl .jstree-last { + background-image: none; +} +.jstree-default-large.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -128px -32px; +} +.jstree-default-large.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -96px -32px; +} +.jstree-default-large.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -64px -32px; +} +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px -32px; +} +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px -32px; +} +.jstree-default-large .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-large .jstree-file { + background: url("32px.png") -96px -64px no-repeat; +} +.jstree-default-large .jstree-folder { + background: url("32px.png") -256px 0px no-repeat; +} +.jstree-default-large > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-large { + line-height: 32px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-large .jstree-ok, +#jstree-dnd.jstree-default-large .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-large i { + background: transparent; + width: 32px; + height: 32px; + line-height: 32px; +} +#jstree-dnd.jstree-default-large .jstree-ok { + background-position: 0px -64px; +} +#jstree-dnd.jstree-default-large .jstree-er { + background-position: -32px -64px; +} +.jstree-default-large .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-large .jstree-ellipsis .jstree-anchor { + width: calc(100% - 32px + 5px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); +} +.jstree-default-large.jstree-rtl .jstree-last { + background-image: none; +} +@media (max-width: 768px) { + #jstree-dnd.jstree-dnd-responsive { + line-height: 40px; + font-weight: bold; + font-size: 1.1em; + text-shadow: 1px 1px white; + } + #jstree-dnd.jstree-dnd-responsive > i { + background: transparent; + width: 40px; + height: 40px; + } + #jstree-dnd.jstree-dnd-responsive > .jstree-ok { + background-image: url("40px.png"); + background-position: 0 -200px; + background-size: 120px 240px; + } + #jstree-dnd.jstree-dnd-responsive > .jstree-er { + background-image: url("40px.png"); + background-position: -40px -200px; + background-size: 120px 240px; + } + #jstree-marker.jstree-dnd-responsive { + border-left-width: 10px; + border-top-width: 10px; + border-bottom-width: 10px; + margin-top: -10px; + } +} +@media (max-width: 768px) { + .jstree-default-responsive { + /* + .jstree-open > .jstree-ocl, + .jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; } + */ + } + .jstree-default-responsive .jstree-icon { + background-image: url("40px.png"); + } + .jstree-default-responsive .jstree-node, + .jstree-default-responsive .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-responsive .jstree-node { + min-height: 40px; + line-height: 40px; + margin-left: 40px; + min-width: 40px; + white-space: nowrap; + } + .jstree-default-responsive .jstree-anchor { + line-height: 40px; + height: 40px; + } + .jstree-default-responsive .jstree-icon, + .jstree-default-responsive .jstree-icon:empty { + width: 40px; + height: 40px; + line-height: 40px; + } + .jstree-default-responsive > .jstree-container-ul > .jstree-node { + margin-left: 0; + } + .jstree-default-responsive.jstree-rtl .jstree-node { + margin-left: 0; + margin-right: 40px; + background: transparent; + } + .jstree-default-responsive.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; + } + .jstree-default-responsive .jstree-ocl, + .jstree-default-responsive .jstree-themeicon, + .jstree-default-responsive .jstree-checkbox { + background-size: 120px 240px; + } + .jstree-default-responsive .jstree-leaf > .jstree-ocl, + .jstree-default-responsive.jstree-rtl .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-responsive .jstree-open > .jstree-ocl { + background-position: 0 0 !important; + } + .jstree-default-responsive .jstree-closed > .jstree-ocl { + background-position: 0 -40px !important; + } + .jstree-default-responsive.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -40px 0 !important; + } + .jstree-default-responsive .jstree-themeicon { + background-position: -40px -40px; + } + .jstree-default-responsive .jstree-checkbox, + .jstree-default-responsive .jstree-checkbox:hover { + background-position: -40px -80px; + } + .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, + .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, + .jstree-default-responsive .jstree-checked > .jstree-checkbox, + .jstree-default-responsive .jstree-checked > .jstree-checkbox:hover { + background-position: 0 -80px; + } + .jstree-default-responsive .jstree-anchor > .jstree-undetermined, + .jstree-default-responsive .jstree-anchor > .jstree-undetermined:hover { + background-position: 0 -120px; + } + .jstree-default-responsive .jstree-anchor { + font-weight: bold; + font-size: 1.1em; + text-shadow: 1px 1px white; + } + .jstree-default-responsive > .jstree-striped { + background: transparent; + } + .jstree-default-responsive .jstree-wholerow { + border-top: 1px solid rgba(255, 255, 255, 0.7); + border-bottom: 1px solid rgba(64, 64, 64, 0.2); + background: #ebebeb; + height: 40px; + } + .jstree-default-responsive .jstree-wholerow-hovered { + background: #e7f4f9; + } + .jstree-default-responsive .jstree-wholerow-clicked { + background: #beebff; + } + .jstree-default-responsive .jstree-children .jstree-last > .jstree-wholerow { + box-shadow: inset 0 -6px 3px -5px #666666; + } + .jstree-default-responsive .jstree-children .jstree-open > .jstree-wholerow { + box-shadow: inset 0 6px 3px -5px #666666; + border-top: 0; + } + .jstree-default-responsive .jstree-children .jstree-open + .jstree-open { + box-shadow: none; + } + .jstree-default-responsive .jstree-node, + .jstree-default-responsive .jstree-icon, + .jstree-default-responsive .jstree-node > .jstree-ocl, + .jstree-default-responsive .jstree-themeicon, + .jstree-default-responsive .jstree-checkbox { + background-image: url("40px.png"); + background-size: 120px 240px; + } + .jstree-default-responsive .jstree-node { + background-position: -80px 0; + background-repeat: repeat-y; + } + .jstree-default-responsive .jstree-last { + background-image: none; + } + .jstree-default-responsive .jstree-leaf > .jstree-ocl { + background-position: -40px -120px; + } + .jstree-default-responsive .jstree-last > .jstree-ocl { + background-position: -40px -160px; + } + .jstree-default-responsive .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; + } + .jstree-default-responsive .jstree-file { + background: url("40px.png") 0 -160px no-repeat; + background-size: 120px 240px; + } + .jstree-default-responsive .jstree-folder { + background: url("40px.png") -40px -40px no-repeat; + background-size: 120px 240px; + } + .jstree-default-responsive > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; + } +} diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default/style.min.css b/COMCMS.Web/wwwroot/js/jstree/themes/default/style.min.css new file mode 100644 index 0000000..0f9a933 --- /dev/null +++ b/COMCMS.Web/wwwroot/js/jstree/themes/default/style.min.css @@ -0,0 +1 @@ +.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:black;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jstree-contextmenu .jstree-anchor{-webkit-user-select:none;-webkit-touch-callout:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em 0 2em;text-decoration:none;width:auto;color:black;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 white;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-no-icons{margin-left:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:white;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context .vakata-contextmenu-disabled>a>i{filter:grayscale(100%)}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:transparent;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:white;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:white;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px 0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-animated,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #cccccc}.jstree-default .jstree-context{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #cccccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:transparent;color:#666666}.jstree-default .jstree-disabled.jstree-hovered{background:transparent;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:bold}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none !important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:transparent;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:transparent}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-default>.jstree-striped{min-width:100%;display:inline-block;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:transparent;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%);background:linear-gradient(to bottom, #beebff 0%, #a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url("32px.png")}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background-image:none}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:transparent}.jstree-default .jstree-disabled.jstree-hovered{background:transparent}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background-image:none}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default .jstree-file{background:url("32px.png") -100px -68px no-repeat}.jstree-default .jstree-folder{background:url("32px.png") -260px -4px no-repeat}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:transparent;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default .jstree-er{background-position:-36px -68px}.jstree-default .jstree-ellipsis{overflow:hidden}.jstree-default .jstree-ellipsis .jstree-anchor{width:calc(100% - 24px + 5px);text-overflow:ellipsis;overflow:hidden}.jstree-default.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==")}.jstree-default.jstree-rtl .jstree-last{background-image:none}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url("32px.png")}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background-image:none}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:transparent}.jstree-default-small .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background-image:none}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-small .jstree-file{background:url("32px.png") -103px -71px no-repeat}.jstree-default-small .jstree-folder{background:url("32px.png") -263px -7px no-repeat}.jstree-default-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-small .jstree-ok,#jstree-dnd.jstree-default-small .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-small i{background:transparent;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-small .jstree-er{background-position:-39px -71px}.jstree-default-small .jstree-ellipsis{overflow:hidden}.jstree-default-small .jstree-ellipsis .jstree-anchor{width:calc(100% - 18px + 5px);text-overflow:ellipsis;overflow:hidden}.jstree-default-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==")}.jstree-default-small.jstree-rtl .jstree-last{background-image:none}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url("32px.png")}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background-image:none}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:transparent}.jstree-default-large .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background-image:none}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-large .jstree-file{background:url("32px.png") -96px -64px no-repeat}.jstree-default-large .jstree-folder{background:url("32px.png") -256px 0 no-repeat}.jstree-default-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-large .jstree-ok,#jstree-dnd.jstree-default-large .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-large i{background:transparent;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-large .jstree-er{background-position:-32px -64px}.jstree-default-large .jstree-ellipsis{overflow:hidden}.jstree-default-large .jstree-ellipsis .jstree-anchor{width:calc(100% - 32px + 5px);text-overflow:ellipsis;overflow:hidden}.jstree-default-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==")}.jstree-default-large.jstree-rtl .jstree-last{background-image:none}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:bold;font-size:1.1em;text-shadow:1px 1px white}#jstree-dnd.jstree-dnd-responsive>i{background:transparent;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url("40px.png");background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url("40px.png");background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url("40px.png")}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:transparent}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-responsive .jstree-leaf>.jstree-ocl,.jstree-default-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0 !important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px !important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0 !important}.jstree-default-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-responsive .jstree-checked>.jstree-checkbox,.jstree-default-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:bold;font-size:1.1em;text-shadow:1px 1px white}.jstree-default-responsive>.jstree-striped{background:transparent}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,0.7);border-bottom:1px solid rgba(64,64,64,0.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url("40px.png");background-size:120px 240px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background-image:none}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-responsive .jstree-file{background:url("40px.png") 0 -160px no-repeat;background-size:120px 240px}.jstree-default-responsive .jstree-folder{background:url("40px.png") -40px -40px no-repeat;background-size:120px 240px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}} \ No newline at end of file diff --git a/COMCMS.Web/wwwroot/js/jstree/themes/default/throbber.gif b/COMCMS.Web/wwwroot/js/jstree/themes/default/throbber.gif new file mode 100644 index 0000000..cf06c1a Binary files /dev/null and b/COMCMS.Web/wwwroot/js/jstree/themes/default/throbber.gif differ diff --git a/data/comcms.sql b/data/comcms.sql new file mode 100644 index 0000000..d665763 --- /dev/null +++ b/data/comcms.sql @@ -0,0 +1,1247 @@ +/* + Navicat Premium Data Transfer + + Source Server : MySQL + Source Server Type : MySQL + Source Server Version : 50736 + Source Host : 127.0.0.1:3306 + Source Schema : comcms + + Target Server Type : MySQL + Target Server Version : 50736 + File Encoding : 65001 + + Date: 06/01/2026 15:38:46 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for admin +-- ---------------------------- +DROP TABLE IF EXISTS `admin`; +CREATE TABLE `admin` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `UserName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', + `PassWord` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码', + `Salt` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '盐值', + `RealName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '姓名', + `Tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话', + `Email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮件', + `UserLevel` int(11) NOT NULL COMMENT '级别', + `RoleId` int(11) NOT NULL COMMENT '管理组', + `GroupId` int(11) NOT NULL COMMENT '用户组', + `LastLoginTime` datetime NULL DEFAULT NULL COMMENT '最后登录时间', + `LastLoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上次登录IP', + `ThisLoginTime` datetime NULL DEFAULT NULL COMMENT '本次登录时间', + `ThisLoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '本次登录IP', + `IsLock` int(11) NOT NULL COMMENT '是否是锁定', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of admin +-- ---------------------------- +INSERT INTO `admin` VALUES (1, 'admin', 'A8D385D64F7578E5985E3FEDF0DC82C1', 'w0gOGhJB2a', 'admin', '', '', 100, 1, 0, '2026-01-06 10:10:23', '127.0.0.1', '2018-04-16 00:17:43', '127.0.0.1', 0); + +-- ---------------------------- +-- Table structure for adminmenu +-- ---------------------------- +DROP TABLE IF EXISTS `adminmenu`; +CREATE TABLE `adminmenu` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `MenuKey` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标识key', + `MenuName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '页面名称', + `PermissionKey` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '页面名称', + `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', + `Link` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '页面连接地址', + `PId` int(11) NOT NULL COMMENT '上级ID', + `Level` int(11) NOT NULL COMMENT '级别', + `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', + `IsHide` int(11) NOT NULL COMMENT '是否隐藏', + `Rank` int(11) NOT NULL COMMENT '排序', + `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', + `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 40 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '后台菜单' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of adminmenu +-- ---------------------------- +INSERT INTO `adminmenu` VALUES (1, 'home', '主页', NULL, NULL, 'Index/Main', 0, 0, '0,', 0, 0, NULL, 'fa-home'); +INSERT INTO `adminmenu` VALUES (2, 'system', '系统设置', NULL, NULL, '#', 0, 0, '0,', 0, 1, NULL, 'fa-gears'); +INSERT INTO `adminmenu` VALUES (3, 'baseconfig', '基本配置', NULL, NULL, 'System/BaseConfig', 2, 1, '0,2,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (4, 'smptconfig', 'SMTP设置', NULL, NULL, 'System/SmtpConfig', 2, 1, '0,2,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (5, 'attachconfig', '附件设置', NULL, NULL, 'System/AttachConfig', 2, 1, '0,2,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (6, 'articlesys', '文章系统', NULL, NULL, '#', 0, 0, '0,', 0, 2, NULL, 'fa-book'); +INSERT INTO `adminmenu` VALUES (7, 'articlecategory', '文章栏目管理', NULL, NULL, 'Article/ArticleCategoryList', 6, 1, '0,6,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (8, 'article', '文章管理', NULL, NULL, 'Article/ArticleList', 6, 1, '0,6,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (9, 'productsys', '商品系统', NULL, NULL, '#', 0, 0, '0,', 0, 3, NULL, 'fa-balance-scale'); +INSERT INTO `adminmenu` VALUES (10, 'productcategory', '商品分类管理', NULL, NULL, 'Product/CategoryList', 9, 1, '0,9,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (11, 'product', '商品管理', NULL, NULL, 'Product/ProductList', 9, 1, '0,9,', 0, 1, NULL, NULL); +INSERT INTO `adminmenu` VALUES (12, 'ordersys', '订单系统', NULL, NULL, '#', 0, 0, '0,', 0, 4, NULL, 'fa-shopping-bag'); +INSERT INTO `adminmenu` VALUES (13, 'order', '商品订单管理', NULL, NULL, 'Order/OrderList', 12, 1, '0,12,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (14, 'payonline', '支付记录', NULL, NULL, 'Order/PayOnlineList', 12, 1, '0,12,', 0, 1, NULL, NULL); +INSERT INTO `adminmenu` VALUES (15, 'user', '用户系统', NULL, NULL, '#', 0, 0, '0,', 0, 5, NULL, 'fa-user'); +INSERT INTO `adminmenu` VALUES (16, 'memberrole', '用户组管理', NULL, NULL, 'Member/MemberRole', 15, 1, '0,15,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (17, 'members', '用户管理', NULL, NULL, 'Member/Members', 15, 1, '0,15,', 0, 1, NULL, NULL); +INSERT INTO `adminmenu` VALUES (18, 'permissionsys', '后台权限', NULL, NULL, '#', 0, 0, '0,', 0, 6, NULL, 'fa-users'); +INSERT INTO `adminmenu` VALUES (19, 'adminrole', '管理组管理', NULL, NULL, 'Member/AdminRole', 18, 1, '0,18,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (20, 'admins', '管理员管理', NULL, NULL, 'Member/Admins', 18, 1, '0,18,', 0, 1, NULL, NULL); +INSERT INTO `adminmenu` VALUES (21, 'eventkey', '事件权限管理', NULL, NULL, 'Permission/EventKey', 18, 1, '0,18,', 0, 3, NULL, NULL); +INSERT INTO `adminmenu` VALUES (22, 'adminmenu', '后台栏目管理', NULL, NULL, 'Permission/AdminMenuList', 18, 1, '0,18,', 0, 4, NULL, NULL); +INSERT INTO `adminmenu` VALUES (23, 'editme', ' 修改密码', NULL, NULL, 'Member/EditMe', 18, 1, '0,18,', 0, 5, NULL, NULL); +INSERT INTO `adminmenu` VALUES (24, 'guestbooksys', '留言系统', NULL, NULL, '#', 0, 0, '0,', 0, 7, NULL, 'fa-rss-square'); +INSERT INTO `adminmenu` VALUES (25, 'guestbookkinds', '留言分类管理', NULL, NULL, 'Guestbook/GuestbookCategorys', 24, 1, '0,24,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (26, 'guestbook', '留言管理', NULL, NULL, 'Guestbook/GuestbookList', 24, 1, '0,24,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (27, 'other', '其他', NULL, NULL, '#', 0, 0, '0,', 0, 99, NULL, 'fa-square-o'); +INSERT INTO `adminmenu` VALUES (28, 'adskinds', '广告分类管理', NULL, NULL, 'Other/AdsCategoryList', 27, 1, '0,27,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (29, 'ads', '广告管理', NULL, NULL, 'Other/AdsList', 27, 1, '0,27,', 0, 1, NULL, NULL); +INSERT INTO `adminmenu` VALUES (30, 'linkkinds', '友情连接分类管理', NULL, NULL, 'Other/LinkCategoryList', 27, 1, '0,27,', 0, 2, NULL, NULL); +INSERT INTO `adminmenu` VALUES (31, 'link', '友情连接管理', NULL, NULL, 'Other/LinkList', 27, 1, '0,27,', 0, 3, NULL, NULL); +INSERT INTO `adminmenu` VALUES (32, 'weixinsys', '微信公众号管理', NULL, NULL, '#', 0, 0, '0,', 0, 8, NULL, 'fa-file-word-o'); +INSERT INTO `adminmenu` VALUES (33, 'wxautoreply', '关注自动回复', NULL, NULL, 'Weixin/SubscribeReply', 32, 1, '0,32,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (34, 'wxmenu', '自定义菜单管理', NULL, NULL, 'Weixin/Menu', 32, 1, '0,32,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (35, 'wxkeywordreply', '关键字回复', NULL, NULL, 'Weixin/ReplyRule', 32, 1, '0,32,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (36, 'clickreplyrule', '点击事件自动回复', NULL, NULL, 'Weixin/ClickReplyRule', 32, 1, '0,32,', 0, 0, NULL, NULL); +INSERT INTO `adminmenu` VALUES (37, 'robots', 'Robots文档设置', NULL, NULL, 'System/Robots', 2, 1, '0,2,', 0, 3, NULL, NULL); +INSERT INTO `adminmenu` VALUES (38, 'admincplog', '后台管理日志', NULL, NULL, 'Member/AdminCPLogList', 18, 1, '0,18,', 0, 10, NULL, NULL); +INSERT INTO `adminmenu` VALUES (39, 'attach', '附件管理', NULL, NULL, 'Attach/AttachList', 2, 1, '0,2,', 0, 99, NULL, NULL); + +-- ---------------------------- +-- Table structure for adminmenuevent +-- ---------------------------- +DROP TABLE IF EXISTS `adminmenuevent`; +CREATE TABLE `adminmenuevent` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `MenuId` int(11) NOT NULL COMMENT '菜单ID', + `MenuKey` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单key', + `EventId` int(11) NOT NULL COMMENT '事件ID', + `EventKey` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件key', + `EventName` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件名称', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 203 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '后台菜单对应的事件权限' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of adminmenuevent +-- ---------------------------- +INSERT INTO `adminmenuevent` VALUES (1, 1, 'home', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (2, 3, 'baseconfig', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (3, 3, 'baseconfig', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (4, 4, 'smptconfig', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (5, 4, 'smptconfig', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (6, 5, 'attachconfig', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (7, 5, 'attachconfig', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (8, 7, 'articlecategory', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (9, 7, 'articlecategory', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (10, 7, 'articlecategory', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (11, 7, 'articlecategory', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (12, 7, 'articlecategory', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (13, 7, 'articlecategory', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (14, 8, 'article', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (15, 8, 'article', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (16, 8, 'article', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (17, 8, 'article', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (18, 8, 'article', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (19, 8, 'article', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (20, 8, 'article', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (21, 8, 'article', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (22, 8, 'article', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (23, 8, 'article', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (24, 8, 'article', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (25, 10, 'productcategory', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (26, 10, 'productcategory', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (27, 10, 'productcategory', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (28, 10, 'productcategory', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (29, 10, 'productcategory', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (30, 10, 'productcategory', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (31, 11, 'product', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (32, 11, 'product', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (33, 11, 'product', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (34, 11, 'product', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (35, 11, 'product', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (36, 11, 'product', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (37, 11, 'product', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (38, 11, 'product', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (39, 11, 'product', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (40, 11, 'product', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (41, 11, 'product', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (42, 13, 'order', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (43, 13, 'order', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (44, 13, 'order', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (45, 13, 'order', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (46, 13, 'order', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (47, 13, 'order', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (48, 13, 'order', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (49, 13, 'order', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (50, 13, 'order', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (51, 13, 'order', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (52, 13, 'order', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (53, 14, 'payonline', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (54, 14, 'payonline', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (55, 14, 'payonline', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (56, 14, 'payonline', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (57, 14, 'payonline', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (58, 14, 'payonline', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (59, 14, 'payonline', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (60, 14, 'payonline', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (61, 14, 'payonline', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (62, 14, 'payonline', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (63, 16, 'memberrole', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (64, 16, 'memberrole', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (65, 16, 'memberrole', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (66, 16, 'memberrole', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (67, 16, 'memberrole', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (68, 16, 'memberrole', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (69, 17, 'members', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (70, 17, 'members', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (71, 17, 'members', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (72, 17, 'members', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (73, 17, 'members', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (74, 17, 'members', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (75, 17, 'members', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (76, 17, 'members', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (77, 17, 'members', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (78, 17, 'members', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (79, 17, 'members', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (80, 19, 'adminrole', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (81, 19, 'adminrole', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (82, 19, 'adminrole', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (83, 19, 'adminrole', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (84, 19, 'adminrole', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (85, 19, 'adminrole', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (86, 19, 'adminrole', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (87, 20, 'admins', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (88, 20, 'admins', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (89, 20, 'admins', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (90, 20, 'admins', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (91, 20, 'admins', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (92, 20, 'admins', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (93, 20, 'admins', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (94, 20, 'admins', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (95, 20, 'admins', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (96, 20, 'admins', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (97, 20, 'admins', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (98, 21, 'eventkey', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (99, 21, 'eventkey', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (100, 21, 'eventkey', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (101, 21, 'eventkey', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (102, 21, 'eventkey', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (103, 21, 'eventkey', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (104, 21, 'eventkey', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (105, 22, 'adminmenu', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (106, 22, 'adminmenu', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (107, 22, 'adminmenu', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (108, 22, 'adminmenu', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (109, 22, 'adminmenu', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (110, 22, 'adminmenu', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (111, 22, 'adminmenu', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (112, 22, 'adminmenu', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (113, 22, 'adminmenu', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (114, 22, 'adminmenu', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (115, 22, 'adminmenu', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (116, 23, 'editme', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (117, 23, 'editme', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (118, 25, 'guestbookkinds', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (119, 25, 'guestbookkinds', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (120, 25, 'guestbookkinds', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (121, 25, 'guestbookkinds', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (122, 25, 'guestbookkinds', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (123, 25, 'guestbookkinds', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (124, 25, 'guestbookkinds', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (125, 25, 'guestbookkinds', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (126, 26, 'guestbook', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (127, 26, 'guestbook', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (128, 26, 'guestbook', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (129, 26, 'guestbook', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (130, 26, 'guestbook', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (131, 26, 'guestbook', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (132, 26, 'guestbook', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (133, 26, 'guestbook', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (134, 26, 'guestbook', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (135, 26, 'guestbook', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (136, 28, 'adskinds', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (137, 28, 'adskinds', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (138, 28, 'adskinds', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (139, 28, 'adskinds', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (140, 28, 'adskinds', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (141, 29, 'ads', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (142, 29, 'ads', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (143, 29, 'ads', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (144, 29, 'ads', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (145, 29, 'ads', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (146, 30, 'linkkinds', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (147, 30, 'linkkinds', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (148, 30, 'linkkinds', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (149, 30, 'linkkinds', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (150, 30, 'linkkinds', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (151, 31, 'link', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (152, 31, 'link', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (153, 31, 'link', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (154, 31, 'link', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (155, 31, 'link', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (156, 31, 'link', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (157, 31, 'link', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (158, 31, 'link', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (159, 31, 'link', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (160, 31, 'link', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (161, 31, 'link', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (162, 33, 'wxautoreply', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (163, 33, 'wxautoreply', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (164, 34, 'wxmenu', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (165, 34, 'wxmenu', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (166, 35, 'wxkeywordreply', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (167, 35, 'wxkeywordreply', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (168, 35, 'wxkeywordreply', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (169, 35, 'wxkeywordreply', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (170, 35, 'wxkeywordreply', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (171, 35, 'wxkeywordreply', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (172, 35, 'wxkeywordreply', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (173, 35, 'wxkeywordreply', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (174, 35, 'wxkeywordreply', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (175, 35, 'wxkeywordreply', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (176, 35, 'wxkeywordreply', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (177, 36, 'clickreplyrule', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (178, 36, 'clickreplyrule', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (179, 36, 'clickreplyrule', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (180, 36, 'clickreplyrule', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (181, 36, 'clickreplyrule', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (182, 36, 'clickreplyrule', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (183, 36, 'clickreplyrule', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (184, 36, 'clickreplyrule', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (185, 36, 'clickreplyrule', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (186, 36, 'clickreplyrule', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (187, 36, 'clickreplyrule', 11, 'confirm', '确认'); +INSERT INTO `adminmenuevent` VALUES (188, 37, 'robots', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (189, 37, 'robots', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (190, 38, 'admincplog', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (191, 38, 'admincplog', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (192, 39, 'attach', 1, 'add', '添加'); +INSERT INTO `adminmenuevent` VALUES (193, 39, 'attach', 2, 'edit', '修改'); +INSERT INTO `adminmenuevent` VALUES (194, 39, 'attach', 3, 'del', '删除'); +INSERT INTO `adminmenuevent` VALUES (195, 39, 'attach', 4, 'view', '查看'); +INSERT INTO `adminmenuevent` VALUES (196, 39, 'attach', 5, 'viewlist', '查看列表'); +INSERT INTO `adminmenuevent` VALUES (197, 39, 'attach', 6, 'import', '导入'); +INSERT INTO `adminmenuevent` VALUES (198, 39, 'attach', 7, 'export', '导出'); +INSERT INTO `adminmenuevent` VALUES (199, 39, 'attach', 8, 'filter', '搜索'); +INSERT INTO `adminmenuevent` VALUES (200, 39, 'attach', 9, 'batch', '批量操作'); +INSERT INTO `adminmenuevent` VALUES (201, 39, 'attach', 10, 'recycle', '回收站'); +INSERT INTO `adminmenuevent` VALUES (202, 39, 'attach', 11, 'confirm', '确认'); + +-- ---------------------------- +-- Table structure for adminroles +-- ---------------------------- +DROP TABLE IF EXISTS `adminroles`; +CREATE TABLE `adminroles` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `RoleType` int(11) NOT NULL COMMENT '角色类型', + `RoleName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色名称', + `RoleDescription` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色简单介绍', + `IsSuperAdmin` int(11) NOT NULL COMMENT '是否是超级管理员', + `Stars` int(11) NOT NULL COMMENT '星级', + `NotAllowDel` int(11) NOT NULL COMMENT '是否不允许删除', + `Rank` int(11) NOT NULL COMMENT '排序', + `Color` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '颜色', + `Menus` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '管理菜单', + `Powers` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '权限', + `AuthorizedArticleCagegory` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '已授权文章栏目', + `AuthorizedCagegory` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '已授权商品栏目', + `OnlyEditMyselfArticle` int(11) NULL DEFAULT NULL COMMENT '是否只允许编辑自己的文章', + `OnlyEditMyselfProduct` int(11) NULL DEFAULT NULL COMMENT '是否只允许编辑自己的产品', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理角色' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of adminroles +-- ---------------------------- +INSERT INTO `adminroles` VALUES (1, 0, '超级管理员', '系统超级管理员', 1, 5, 1, 0, '', '', '', NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for ads +-- ---------------------------- +DROP TABLE IF EXISTS `ads`; +CREATE TABLE `ads` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `Title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '广告标题', + `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '广告详情JSON', + `KId` int(11) NOT NULL COMMENT '分类ID', + `TId` int(11) NOT NULL COMMENT '广告代码类型:0代码、1文字广告、2图片广告、3Flash广告、4幻灯片广告、5漂浮广告、6对联浮动图片广告', + `StartTime` datetime NULL DEFAULT NULL COMMENT '起始时间', + `EndTime` datetime NULL DEFAULT NULL COMMENT '结束时间', + `IsDisabled` enum('N','Y') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否禁用广告', + `Sequence` int(11) NOT NULL COMMENT '排序,默认999', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '广告详情' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of ads +-- ---------------------------- +INSERT INTO `ads` VALUES (1, '首页banner广告', '[{\"img\":\"/images/default/slide-1.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"},{\"img\":\"/images/default/slide-2.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"},{\"img\":\"/images/default/slide-3.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"},{\"img\":\"/images/default/slide-4.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"},{\"img\":\"/images/default/slide-5.jpg\",\"link\":\"/\",\"width\":1920,\"height\":686,\"alt\":\"\"}]', 1, 4, '2000-01-01 00:00:00', '2999-01-01 00:00:00', 'N', 999); +INSERT INTO `ads` VALUES (2, '移动端首页Banner', '[{\"img\":\"/images/default/slide-1.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"},{\"img\":\"/images/default/slide-2.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"},{\"img\":\"/images/default/slide-3.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"},{\"img\":\"/images/default/slide-4.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"},{\"img\":\"/images/default/slide-5.jpg\",\"link\":\"/\",\"width\":375,\"height\":185,\"alt\":\"\"}]', 1, 4, '2000-01-01 00:00:00', '2999-01-01 00:00:00', 'N', 999); + +-- ---------------------------- +-- Table structure for adskind +-- ---------------------------- +DROP TABLE IF EXISTS `adskind`; +CREATE TABLE `adskind` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `KindName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '广告类别名称', + `KindInfo` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '简单说明', + `Rank` int(11) NOT NULL COMMENT '排序', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '广告类别' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of adskind +-- ---------------------------- +INSERT INTO `adskind` VALUES (1, '默认广告', NULL, 0); + +-- ---------------------------- +-- Table structure for article +-- ---------------------------- +DROP TABLE IF EXISTS `article`; +CREATE TABLE `article` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `KId` int(11) NOT NULL COMMENT '栏目ID', + `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题', + `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副标题', + `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', + `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', + `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', + `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', + `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', + `TemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板', + `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', + `IsNew` int(11) NOT NULL COMMENT '是否最新', + `IsBest` int(11) NOT NULL COMMENT '是否推荐', + `IsHide` int(11) NOT NULL COMMENT '是否隐藏', + `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', + `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', + `IsTop` int(11) NOT NULL COMMENT '是否置顶', + `IsComment` int(11) NOT NULL COMMENT '是否允许评论', + `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', + `Hits` int(11) NOT NULL COMMENT '点击数量', + `Sequence` int(11) NOT NULL COMMENT '排序', + `CommentCount` int(11) NOT NULL COMMENT '评论数量', + `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', + `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', + `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', + `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', + `AdsId` int(11) NOT NULL COMMENT '广告ID', + `Tags` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'TAG', + `Origin` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '来源', + `OriginURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '来源地址', + `ItemImg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '更多图片', + `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '时间', + `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', + `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '存放目录', + `FileName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of article +-- ---------------------------- +INSERT INTO `article` VALUES (1, 1, '关于我们', 'About Us', '

      内容管理系统(英语:content management system,缩写为 CMS)是指在一个合作模式下,用于管理工作流程的一套制度。该系统可应用于手工操作中,也可以应用到计算机或网络里。作为一种中央储存器(central repository),内容管理系统可将相关内容集中储存并具有群组管理、版本控制等功能。版本控制是内容管理系统的一个主要优势。

      \n\n

      内容是任何类型的数字信息的结合体,可以是文本、图形图像、Web页面、业务文档、数据库表单、视频、声音、XML文件等。应该说,内容是一个比数据、文档和信息更广的概念,是对各种结构化数据、非结构化文档、信息的聚合。管理就是施加在“内容”对象上的一系列处理过程,包括收集、存储、审批、整理、定位、转换、分发、搜索、分析等,目的是为了使“内容”能够在正确的时间、以正确的形式传递到正确的地点和人。

      \n\n

      内容管理可以定义为:协助组织和个人,借助信息技术,实现内容的创建、储存、分享、应用、检索,并在企业个人、组织、业务、战略等诸方面产生价值的过程。而内容管理系统就是能够支撑内容管理的一种工具或一套工具的软件系统。

      \n\n

      内容管理系统的定义可以很狭窄,通常是指门户或商业网站的发布和管理系统;定义也可以很宽泛,个人网站系统也可归入其中。Wiki也是一种内容管理系统,Blog也算是一种内容管理系统。

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 999, 0, NULL, NULL, NULL, '/images/default/slide-3.jpg', 0, NULL, NULL, NULL, '/userfiles/images/2018/20180413145904(1).png|||', 1, '2018-04-18 20:35:54', '2018-12-02 17:14:13', NULL, NULL, NULL); +INSERT INTO `article` VALUES (2, 10, '联系我们', NULL, '

      联系我们

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-15 23:58:24', '2018-12-01 22:44:45', NULL, NULL, NULL); +INSERT INTO `article` VALUES (3, 1, '企业文化', NULL, '

      企业文化

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:19', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (4, 1, '发展历程', NULL, '

      发展历程

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:28', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (5, 1, '组织架构', NULL, '

      组织架构

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:38', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (6, 1, '荣誉证书', NULL, '

      荣誉证书

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-11-19 00:08:49', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (7, 6, 'COMCMS v0.9 正式发布,PC版前端演示', 'COMCMS v0.9 正式发布,PC版前端演示', '

      COMCMS v0.9 正式发布,PC版前端演示

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:52:15', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (8, 7, '行业资讯行业资讯行业资讯行业资讯', NULL, '

      行业资讯行业资讯行业资讯行业资讯

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:54:48', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (9, 6, 'COMCMS v0.9 正式发布,PC版前端演示2', NULL, '

      COMCMS v0.9 正式发布,PC版前端演示2

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:55:39', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (10, 6, 'COMCMS v0.9 正式发布,PC版前端演示3', NULL, '

      COMCMS v0.9 正式发布,PC版前端演示3

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:56:18', NULL, NULL, NULL, NULL); +INSERT INTO `article` VALUES (11, 6, 'COMCMS v0.9 正式发布,PC版前端演示4', NULL, '

      COMCMS v0.9 正式发布,PC版前端演示4

      \n\n

       

      \n', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 999, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '', 1, '2018-12-02 16:56:27', '2026-01-06 10:12:46', NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for articlecategory +-- ---------------------------- +DROP TABLE IF EXISTS `articlecategory`; +CREATE TABLE `articlecategory` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `KindName` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目名称', + `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目副标题', + `KindTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目标题,填写则在浏览器替换此标题', + `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', + `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', + `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', + `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', + `TemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板', + `DetailTemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详情模板', + `KindDomain` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别域名(保留)', + `IsList` int(11) NOT NULL COMMENT '是否为列表页面', + `PageSize` int(11) NOT NULL COMMENT '每页显示数量', + `PId` int(11) NOT NULL COMMENT '上级ID', + `Level` int(11) NOT NULL COMMENT '级别', + `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', + `IsHide` int(11) NOT NULL COMMENT '是否隐藏', + `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', + `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', + `IsComment` int(11) NOT NULL COMMENT '是否允许评论', + `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', + `IsShowSubDetail` int(11) NOT NULL COMMENT '是否显示下级栏目内容', + `CatalogId` int(11) NOT NULL COMMENT '模型ID', + `Counts` int(11) NOT NULL COMMENT '详情数量,缓存', + `Rank` int(11) NOT NULL COMMENT '排序', + `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', + `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', + `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', + `KindInfo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '栏目详细介绍', + `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', + `AdsId` int(11) NOT NULL COMMENT '广告ID', + `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目录路径', + `AllowIp` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'IP地址限制。每一行一条记录,可以用“-”分割', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章栏目' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of articlecategory +-- ---------------------------- +INSERT INTO `articlecategory` VALUES (1, '关于我们', NULL, NULL, NULL, NULL, '1', NULL, 'Index.cshtml', 'Detail_About.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 5, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (2, '新闻资讯', NULL, NULL, NULL, NULL, '/Article/Index/6', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (3, '项目案例', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (4, '用户服务', NULL, NULL, NULL, NULL, '/Article/Index/8', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (5, '联系我们', NULL, NULL, NULL, NULL, '/Article/Index/10', NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 1, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (6, '公司新闻', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 2, 2, 1, '0,2,', 0, 0, 0, 0, 0, 1, 0, 4, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (7, '行业资讯', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 2, 1, '0,2,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (8, '产品使用', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (9, '产品下载', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (10, '联系方式', NULL, NULL, NULL, NULL, '2', NULL, 'Index.cshtml', 'Detail_Contact.cshtml', NULL, 1, 15, 5, 1, '0,5,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (11, '在线留言', NULL, NULL, NULL, NULL, NULL, NULL, 'Index_Guestbook.cshtml', 'Detail.cshtml', NULL, 0, 15, 5, 1, '0,5,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); +INSERT INTO `articlecategory` VALUES (12, '常见问题', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail_News.cshtml', NULL, 1, 15, 4, 1, '0,4,', 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); + +-- ---------------------------- +-- Table structure for category +-- ---------------------------- +DROP TABLE IF EXISTS `category`; +CREATE TABLE `category` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `KindName` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目名称', + `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目副标题', + `KindTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '栏目标题,填写则在浏览器替换此标题', + `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', + `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', + `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', + `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', + `TemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板', + `DetailTemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详情模板', + `KindDomain` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别域名(保留)', + `IsList` int(11) NOT NULL COMMENT '是否为列表页面', + `PageSize` int(11) NOT NULL COMMENT '每页显示数量', + `PId` int(11) NOT NULL COMMENT '上级ID', + `Level` int(11) NOT NULL COMMENT '级别', + `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', + `IsHide` int(11) NOT NULL COMMENT '是否隐藏', + `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', + `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', + `IsComment` int(11) NOT NULL COMMENT '是否允许评论', + `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', + `IsShowSubDetail` int(11) NOT NULL COMMENT '是否显示下级栏目内容', + `CatalogId` int(11) NOT NULL COMMENT '模型ID', + `Counts` int(11) NOT NULL COMMENT '详情数量,缓存', + `Rank` int(11) NOT NULL COMMENT '排序', + `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', + `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', + `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', + `KindInfo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '栏目详细介绍', + `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', + `AdsId` int(11) NOT NULL COMMENT '广告ID', + `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目录路径', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品栏目' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of category +-- ---------------------------- +INSERT INTO `category` VALUES (1, '网站系统', NULL, NULL, NULL, NULL, NULL, NULL, 'Index.cshtml', 'Detail.cshtml', NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 2, 0, NULL, NULL, NULL, NULL, NULL, 0, '/wangzhanjitong'); +INSERT INTO `category` VALUES (2, '微商城系统', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 2, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); +INSERT INTO `category` VALUES (3, '小程序系统', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 15, 0, 0, '0,', 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL); + +-- ---------------------------- +-- Table structure for config +-- ---------------------------- +DROP TABLE IF EXISTS `config`; +CREATE TABLE `config` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `SiteName` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点名称', + `SiteUrl` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点URL', + `SiteLogo` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点LOGO', + `ICP` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ICP备案', + `SiteEmail` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系我们Email', + `SiteTel` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '网站电话', + `Copyright` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '版权所有', + `IsCloseSite` enum('N','Y') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否关闭网站', + `CloseReason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '关闭原因', + `CountScript` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '统计代码', + `WeiboQRCode` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微博二维码', + `WinxinQRCode` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信二维码', + `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关键字', + `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', + `IndexTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '首页标题', + `IsRewrite` int(11) NOT NULL COMMENT '是否URL地址重写', + `SearchMinTime` int(11) NOT NULL COMMENT '搜索最小时间间距 秒', + `OnlineQQ` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '在线QQ', + `OnlineSkype` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '在线Skype', + `OnlineWangWang` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '在线阿里旺旺', + `SkinName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点URL', + `OfficialName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公众号名称', + `OfficialDecsription` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公众号介绍', + `OfficialOriginalId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公众号原始ID', + `WexinAccount` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信名称', + `Token` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Token', + `AppId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'AppId', + `AppSecret` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'AppSecret', + `FllowTipPageURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '引导关注素材地址', + `OfficialType` int(11) NOT NULL COMMENT '公众号类型:0普通订阅号 1普通服务号 2认证订阅号 3认证服务号 4企业号 5认证企业号', + `EncodingAESKey` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'EncodingAESKey', + `DEType` int(11) NOT NULL COMMENT '解密方式0,明文', + `OfficialQRCode` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公众号二维码地址', + `OfficialImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公众号头像', + `LastUpdateTime` datetime NULL DEFAULT NULL COMMENT '最后更新时间', + `LastCacheTime` datetime NULL DEFAULT NULL COMMENT '最后缓存时间', + `MCHId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信商家MCHId', + `MCHKey` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信商家key', + `DefaultFare` decimal(10, 0) NOT NULL COMMENT '默认运费', + `MaxFreeFare` decimal(10, 0) NOT NULL COMMENT '最大免运费金额', + `WXAppId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信小程序AppId', + `WXAppSecret` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信小程序AppSecret', + `IsResetData` int(11) NOT NULL COMMENT '小程序首页是否显示清除数据按钮', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统配置' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of config +-- ---------------------------- +INSERT INTO `config` VALUES (1, 'comcms', 'https://localhost:44307', '/images/logo.png', '', NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, '2018-12-05 11:49:59', '2018-12-05 11:49:59', NULL, NULL, 0, 0, NULL, NULL, 0); + +-- ---------------------------- +-- Table structure for guestbook +-- ---------------------------- +DROP TABLE IF EXISTS `guestbook`; +CREATE TABLE `guestbook` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `KId` int(11) NOT NULL COMMENT '分类ID', + `UId` int(11) NOT NULL COMMENT '用户ID', + `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '留言标题', + `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '详细介绍', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `IsVerify` int(11) NOT NULL COMMENT '是否审核通过', + `IsRead` int(11) NOT NULL COMMENT '是否阅读', + `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', + `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户IP', + `Nickname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称', + `Email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱', + `Tel` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话', + `QQ` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'QQ', + `Skype` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Skype', + `HomePage` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主页', + `Address` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址', + `Company` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司', + `ReplyTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '回复标题', + `ReplyContent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '回复的详情', + `ReplyAddTime` datetime NULL DEFAULT NULL COMMENT '回复时间', + `ReplyIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户回复IP', + `ReplyAdminId` int(11) NOT NULL COMMENT '用户的管理员ID', + `ReplyNickName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '回复者昵称', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言详情' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of guestbook +-- ---------------------------- + +-- ---------------------------- +-- Table structure for guestbookcategory +-- ---------------------------- +DROP TABLE IF EXISTS `guestbookcategory`; +CREATE TABLE `guestbookcategory` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `KindName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称', + `KindInfo` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '简单说明', + `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类图片', + `Rank` int(11) NOT NULL COMMENT '排序', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '留言分类' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of guestbookcategory +-- ---------------------------- +INSERT INTO `guestbookcategory` VALUES (1, '默认类别', NULL, NULL, 0); + +-- ---------------------------- +-- Table structure for link +-- ---------------------------- +DROP TABLE IF EXISTS `link`; +CREATE TABLE `link` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `KId` int(11) NOT NULL COMMENT '分类ID', + `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点标题', + `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点连接', + `Info` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', + `Logo` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点LOGO', + `IsHide` enum('N','Y') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否隐藏友情链接', + `Sequence` int(11) NOT NULL COMMENT '排序,默认999', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '友情连接详情' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of link +-- ---------------------------- +INSERT INTO `link` VALUES (1, 1, 'Google', 'https://www.google.com', NULL, '/userfiles/images/2018/46704eae13e45ead.png', 'N', 999); +INSERT INTO `link` VALUES (2, 1, '谷歌', 'https://www.google.com', NULL, '/userfiles/images/2018/46704eae13e45ead.png', 'N', 999); + +-- ---------------------------- +-- Table structure for linkkind +-- ---------------------------- +DROP TABLE IF EXISTS `linkkind`; +CREATE TABLE `linkkind` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `KindName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称', + `KindInfo` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '简单说明', + `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类图片', + `Rank` int(11) NOT NULL COMMENT '排序', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '友情链接分类' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of linkkind +-- ---------------------------- +INSERT INTO `linkkind` VALUES (1, '友情链接', NULL, NULL, 0); + +-- ---------------------------- +-- Table structure for member +-- ---------------------------- +DROP TABLE IF EXISTS `member`; +CREATE TABLE `member` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `UserName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', + `PassWord` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码', + `Salt` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '盐值', + `RealName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '姓名', + `Tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机', + `Email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮件', + `RoleId` int(11) NOT NULL COMMENT '会员组,代理级别', + `LastLoginTime` datetime NULL DEFAULT NULL COMMENT '最后登录时间', + `LastLoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上次登录IP', + `ThisLoginTime` datetime NULL DEFAULT NULL COMMENT '本次登录时间', + `ThisLoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '本次登录IP', + `IsLock` int(11) NOT NULL COMMENT '是否是锁定', + `Nickname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称', + `UserImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像', + `Sex` int(11) NOT NULL COMMENT '性别 0 保密 1 男 2女', + `Birthday` datetime NULL DEFAULT NULL COMMENT '生日', + `Phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话', + `Fax` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '传真', + `QQ` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'QQ', + `Weixin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信', + `Alipay` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付宝', + `Skype` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'skype', + `Homepage` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主页', + `Company` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司', + `IDNO` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '身份证', + `Country` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '国家', + `Province` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '省', + `City` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '市', + `District` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区', + `Address` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详细地址', + `Postcode` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮政编码', + `RegIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '注册IP', + `RegTime` datetime NULL DEFAULT NULL COMMENT '注册时间', + `LoginCount` int(11) NOT NULL COMMENT '登录次数', + `RndNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '随机字符', + `RePassWordTime` datetime NULL DEFAULT NULL COMMENT '找回密码时间', + `Question` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保密问题', + `Answer` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保密答案', + `Balance` decimal(10, 0) NOT NULL COMMENT '可用余额', + `GiftBalance` decimal(10, 0) NOT NULL COMMENT '赠送余额', + `Rebate` decimal(10, 0) NOT NULL COMMENT '返利,分销提成', + `Bank` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '银行', + `BankCardNO` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '银行卡号', + `BankBranch` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支行名称', + `BankRealname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '银行卡姓名', + `YearsPerformance` decimal(10, 0) NOT NULL COMMENT '年业务量', + `ExtCredits1` decimal(10, 0) NOT NULL COMMENT '备用积分1', + `ExtCredits2` decimal(10, 0) NOT NULL COMMENT '备用积分2', + `ExtCredits3` decimal(10, 0) NOT NULL COMMENT '备用积分3', + `ExtCredits4` decimal(10, 0) NOT NULL COMMENT '备用积分4', + `ExtCredits5` decimal(10, 0) NOT NULL COMMENT '备用积分5', + `TotalCredits` decimal(10, 0) NOT NULL COMMENT '总积分', + `Parent` int(11) NOT NULL COMMENT '父级用户ID', + `Grandfather` int(11) NOT NULL COMMENT '爷级用户ID', + `IsSellers` int(11) NOT NULL COMMENT '是否是分销商', + `IsVerifySellers` int(11) NOT NULL COMMENT '是否已经认证的分销商,缴纳费用', + `WeixinOpenId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信公众号OpenId', + `WeixinAppOpenId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信OpenId', + `QQOpenId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'QQ OpenId', + `WeiboOpenId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微博OpenId', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of member +-- ---------------------------- + +-- ---------------------------- +-- Table structure for memberlog +-- ---------------------------- +DROP TABLE IF EXISTS `memberlog`; +CREATE TABLE `memberlog` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `UId` int(11) NOT NULL COMMENT '管理员ID', + `GUID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '唯一ID', + `UserName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', + `PassWord` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码', + `LoginTime` datetime NULL DEFAULT NULL COMMENT '登录时间', + `LoginIP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP', + `IsLoginOK` int(11) NOT NULL COMMENT '是否登录成功', + `Actions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '记录', + `LastUpdateTime` datetime NULL DEFAULT NULL COMMENT '登录时间', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户日志表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of memberlog +-- ---------------------------- + +-- ---------------------------- +-- Table structure for memberroles +-- ---------------------------- +DROP TABLE IF EXISTS `memberroles`; +CREATE TABLE `memberroles` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `RoleName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色名称', + `RoleDescription` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色简单介绍', + `Stars` int(11) NOT NULL COMMENT '星级', + `NotAllowDel` int(11) NOT NULL COMMENT '是否不允许删除', + `Rank` int(11) NOT NULL COMMENT '排序', + `Color` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '颜色', + `CashBack` decimal(10, 0) NOT NULL COMMENT '返现百分比', + `ParentCashBack` decimal(10, 0) NOT NULL COMMENT '父级返现百分比', + `GrandfatherCashBack` decimal(10, 0) NOT NULL COMMENT '爷级返现百分比', + `IsDefault` int(11) NOT NULL COMMENT '是否是默认角色', + `IsHalved` int(11) NOT NULL COMMENT '超过级别是否减半', + `HalvedParentCashBack` decimal(10, 0) NOT NULL COMMENT '超过级别父级返现百分比', + `HalvedGrandfatherCashBack` decimal(10, 0) NOT NULL COMMENT '超过级别爷级返现百分比', + `YearsPerformance` decimal(10, 0) NOT NULL COMMENT '年业务量', + `IsSellers` int(11) NOT NULL COMMENT '是否是分销商', + `JoinPrice` decimal(10, 0) NOT NULL COMMENT '加入分销商价格', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of memberroles +-- ---------------------------- +INSERT INTO `memberroles` VALUES (1, '钻石代理', '钻石代理(一级代理)', 5, 1, 0, '', 50, 10, 5, 0, 0, 10, 5, 100000, 1, 5000); +INSERT INTO `memberroles` VALUES (2, '白金代理', '白金代理(二级代理)', 4, 1, 0, '', 30, 10, 0, 0, 1, 5, 0, 50000, 0, 0); +INSERT INTO `memberroles` VALUES (3, '普通会员', '普通会员', 1, 1, 0, '', 0, 0, 0, 1, 1, 0, 0, 0, 0, 0); + +-- ---------------------------- +-- Table structure for onlinepayorder +-- ---------------------------- +DROP TABLE IF EXISTS `onlinepayorder`; +CREATE TABLE `onlinepayorder` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `PayOrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '在线支付订单号,唯一', + `OrderId` int(11) NOT NULL COMMENT '订单ID', + `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', + `PayId` int(11) NOT NULL COMMENT '支付方式ID', + `PayType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '付款方式', + `PayTypeNotes` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付备注', + `Actions` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '日志记录', + `UId` int(11) NOT NULL COMMENT '用户ID', + `UserName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', + `TotalQty` int(11) NOT NULL COMMENT '总数量', + `TotalPrice` decimal(10, 0) NOT NULL COMMENT '总价格', + `PaymentStatus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付状态:未支付、已支付、已退款', + `PaymentNotes` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付备注', + `IsOK` int(11) NOT NULL COMMENT '是否完成', + `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下单IP', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `ReceiveTime` datetime NULL DEFAULT NULL COMMENT '回传时间', + `TypeId` int(11) NOT NULL COMMENT '支付的类型', + `MyType` int(11) NOT NULL COMMENT '系统类型', + `Title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单标题', + `OutTradeNo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付成功流水号', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '在线支付订单' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of onlinepayorder +-- ---------------------------- + +-- ---------------------------- +-- Table structure for order +-- ---------------------------- +DROP TABLE IF EXISTS `order`; +CREATE TABLE `order` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', + `UId` int(11) NOT NULL COMMENT '用户ID', + `UserName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下单用户名', + `ShopId` int(11) NOT NULL COMMENT '商户ID', + `Credit` int(11) NOT NULL COMMENT '积分', + `TotalQty` int(11) NOT NULL COMMENT '总数量', + `TotalPrice` decimal(10, 0) NOT NULL COMMENT '总价格', + `Discount` decimal(10, 0) NOT NULL COMMENT '折扣', + `Fare` decimal(10, 0) NOT NULL COMMENT '运费', + `TotalTax` decimal(10, 0) NOT NULL COMMENT '税', + `TotalPay` decimal(10, 0) NOT NULL COMMENT '总支付价格', + `BackCredits` int(11) NOT NULL COMMENT '返现积分', + `RealName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '姓名', + `Country` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '国家', + `Province` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '省份', + `City` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市', + `District` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区', + `Address` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详细地址', + `PostCode` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮编', + `Tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机', + `Mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机', + `Email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱', + `Notes` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', + `AdminNotes` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '管理员备注', + `Pic` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '图片', + `DeliverId` int(11) NOT NULL COMMENT '配送方式ID', + `DeliverType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配送方式名称', + `DeliverNO` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '运单号', + `DeliverNotes` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配送备注', + `PayId` int(11) NOT NULL COMMENT '支付方式ID', + `PayType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '付款方式', + `PayTypeNotes` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付备注', + `OrderStatus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单状态:未确认、已确认、已完成、已取消', + `PaymentStatus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付状态:未支付、已支付、已退款', + `DeliverStatus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配送状态:未配送、配货中、已配送、已收到、退货中、已退货', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下单IP', + `IsInvoice` int(11) NOT NULL COMMENT '是否需要发票', + `InvoiceCompanyName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '抬头', + `InvoiceCompanyID` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纳税人识别号', + `InvoiceType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发票内容', + `InvoiceNote` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发票备注', + `IsRead` int(11) NOT NULL COMMENT '是否未读', + `IsEnd` int(11) NOT NULL COMMENT '是否结束', + `EndTime` datetime NULL DEFAULT NULL COMMENT '结束时间', + `IsOk` int(11) NOT NULL COMMENT '订单是否顺利完成', + `IsComment` int(11) NOT NULL COMMENT '订单已经评论', + `Flag1` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预留字段1', + `Flag2` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预留字段2', + `Flag3` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预留字段3', + `Title` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单名称', + `LastModTime` datetime NULL DEFAULT NULL COMMENT '最后操作时间', + `OrderType` int(11) NOT NULL COMMENT '订单类型,0为商品订单', + `MyType` int(11) NOT NULL COMMENT '系统类型', + `OutTradeNo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付成功流水号', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of order +-- ---------------------------- + +-- ---------------------------- +-- Table structure for orderdetail +-- ---------------------------- +DROP TABLE IF EXISTS `orderdetail`; +CREATE TABLE `orderdetail` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `OrderId` int(11) NOT NULL COMMENT '订单ID', + `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', + `ShopId` int(11) NOT NULL COMMENT '商户ID', + `UId` int(11) NOT NULL COMMENT '用户ID', + `PId` int(11) NOT NULL COMMENT '商品ID', + `TypeId` int(11) NOT NULL COMMENT '类型ID', + `PriceId` int(11) NOT NULL COMMENT '价格ID', + `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品名称', + `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品名称', + `Attr` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品属性', + `Color` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品颜色', + `Spec` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '规格', + `ItemNO` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号', + `Qty` int(11) NOT NULL COMMENT '数量', + `Price` decimal(10, 0) NOT NULL COMMENT '商品价格', + `MarketPrice` decimal(10, 0) NOT NULL COMMENT '商品市场价格', + `SpecialPrice` decimal(10, 0) NOT NULL COMMENT '商品特价', + `Discount` decimal(10, 0) NOT NULL COMMENT '商品优惠', + `Tax` decimal(10, 0) NOT NULL COMMENT '商品税', + `Credit` int(11) NOT NULL COMMENT '积分', + `BackCredits` int(11) NOT NULL COMMENT '返现积分', + `IsOK` int(11) NOT NULL COMMENT '是否完成', + `IsComment` int(11) NOT NULL COMMENT '是否已经评论', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `CheckInDate` datetime NULL DEFAULT NULL COMMENT '入住日期', + `LeaveDate` datetime NULL DEFAULT NULL COMMENT '离开日期', + `MyType` int(11) NOT NULL COMMENT '系统类型', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单详情' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of orderdetail +-- ---------------------------- + +-- ---------------------------- +-- Table structure for orderlog +-- ---------------------------- +DROP TABLE IF EXISTS `orderlog`; +CREATE TABLE `orderlog` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `OrderId` int(11) NOT NULL COMMENT '订单ID', + `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', + `Actions` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '日志记录', + `UId` int(11) NOT NULL COMMENT '用户ID', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单日志' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of orderlog +-- ---------------------------- + +-- ---------------------------- +-- Table structure for otherconfig +-- ---------------------------- +DROP TABLE IF EXISTS `otherconfig`; +CREATE TABLE `otherconfig` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `ConfigName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配置名称', + `ConfigValue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置值 JSON', + `LastUpdateTime` datetime NULL DEFAULT NULL COMMENT '最后更新时间', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '其他配置' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of otherconfig +-- ---------------------------- +INSERT INTO `otherconfig` VALUES (1, 'attach', '{\"SiteId\":0,\"AttachPatch\":\"userfiles\",\"SaveType\":0,\"IsCreateThum\":0,\"ThumQty\":80,\"ThumMaxWidth\":200,\"ThumMaxHeight\":200,\"IsWaterMark\":0,\"WaterMarkType\":0,\"WaterMarkMinWidth\":400,\"WaterMarkMinHeight\":400,\"WaterMarkImg\":null,\"WaterMarkText\":\"\",\"WaterMarkTextColor\":\"#0FF\",\"WaterMarkPlace\":9,\"WaterMarkQty\":80,\"WaterMarkDiaphaneity\":80,\"IsRandomFileName\":1,\"ImgMaxWidth\":1920,\"ImgMaxHeight\":2000}', '2018-04-18 20:36:55'); +INSERT INTO `otherconfig` VALUES (2, 'smtp', '{\"SiteId\":0,\"SmtpEmail\":\"poster@comcms.com\",\"SmtpHost\":\"redbull.mxrouting.net\",\"SmtpProt\":\"25\",\"SmtpEmailPwd\":\"1qaz@WSX\",\"PostUserName\":\"poster@comcms.com\",\"IsSSL\":0}', '2024-03-27 10:53:32'); + +-- ---------------------------- +-- Table structure for product +-- ---------------------------- +DROP TABLE IF EXISTS `product`; +CREATE TABLE `product` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `KId` int(11) NOT NULL COMMENT '栏目ID', + `BId` int(11) NOT NULL COMMENT '品牌ID', + `ShopId` int(11) NOT NULL COMMENT '店铺ID', + `CId` int(11) NOT NULL COMMENT '颜色ID', + `SupportId` int(11) NOT NULL COMMENT '供货商ID', + `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题', + `ItemNO` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号', + `SubTitle` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副标题', + `Unit` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品单位', + `Spec` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品规格尺寸', + `Color` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '颜色', + `Weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '重量', + `Price` decimal(10, 0) NOT NULL COMMENT '价格', + `MarketPrice` decimal(10, 0) NOT NULL COMMENT '市场价格', + `SpecialPrice` decimal(10, 0) NOT NULL COMMENT '特价,如有特价,以特价为准', + `Fare` decimal(10, 0) NOT NULL COMMENT '运费', + `Discount` decimal(10, 0) NOT NULL COMMENT '折扣', + `Material` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '材料', + `Front` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '封面', + `Credits` int(11) NOT NULL COMMENT '积分', + `Stock` int(11) NOT NULL COMMENT '库存', + `WarnStock` int(11) NOT NULL COMMENT '警告库存', + `IsSubProduct` int(11) NOT NULL COMMENT '是否为子商品', + `PPId` int(11) NOT NULL COMMENT '父商品ID。如果为子商品,则需要填写父商品ID。实现多颜色功能', + `Content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', + `Parameters` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品参数', + `Keyword` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述', + `Description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '介绍', + `LinkURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转链接', + `TitleColor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类别名称颜色', + `TemplateFile` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板', + `IsRecommend` int(11) NOT NULL COMMENT '是否推荐', + `IsHide` int(11) NOT NULL COMMENT '是否隐藏', + `IsLock` int(11) NOT NULL COMMENT '是否锁定,不允许删除', + `IsDel` int(11) NOT NULL COMMENT '是否删除,已经删除到回收站', + `IsTop` int(11) NOT NULL COMMENT '是否置顶', + `IsBest` int(11) NOT NULL COMMENT '是否精华', + `IsComment` int(11) NOT NULL COMMENT '是否允许评论', + `IsMember` int(11) NOT NULL COMMENT '是否会员栏目', + `IsNew` int(11) NOT NULL COMMENT '是否新品', + `IsSpecial` int(11) NOT NULL COMMENT '是否特价', + `IsPromote` int(11) NOT NULL COMMENT '是否促销', + `IsHotSales` int(11) NOT NULL COMMENT '是否热销', + `IsBreakup` int(11) NOT NULL COMMENT '是否缺货', + `IsShelves` int(11) NOT NULL COMMENT '是否下架', + `IsVerify` int(11) NOT NULL COMMENT '是否审核,1为已经审核前台显示', + `Hits` int(11) NOT NULL COMMENT '点击数量', + `IsGift` int(11) NOT NULL COMMENT '是否为礼品商品', + `IsPart` int(11) NOT NULL COMMENT '是否为配件', + `Sequence` int(11) NOT NULL COMMENT '排序', + `CommentCount` int(11) NOT NULL COMMENT '评论数量', + `Icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', + `ClassName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式名称', + `BannerImg` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图片', + `Pic` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片', + `AdsId` int(11) NOT NULL COMMENT '广告ID', + `Tags` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'TAG', + `ItemImg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '更多图片', + `Service` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '售后服务', + `AuthorId` int(11) NOT NULL COMMENT '添加管理员ID', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '时间', + `Location` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径', + `FilePath` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '存放目录', + `FileName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of product +-- ---------------------------- +INSERT INTO `product` VALUES (1, 1, 0, 0, 0, 0, 'CMS系统', NULL, NULL, NULL, NULL, NULL, NULL, 5000, 6000, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

      CMS系统

      \n\n

      CMS系统

      \n\n

      CMS系统

      \n\n

      CMS系统

      \n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-4.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:17:53', NULL, NULL, NULL, NULL); +INSERT INTO `product` VALUES (2, 2, 0, 0, 0, 0, 'PC+手机商城系统', NULL, NULL, NULL, NULL, NULL, NULL, 18000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

      PC+手机商城系统

      \n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-5.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:21:43', NULL, NULL, NULL, NULL); +INSERT INTO `product` VALUES (3, 2, 0, 0, 0, 0, '微商城Shop系统', NULL, NULL, NULL, NULL, NULL, NULL, 25000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

      微商城Shop系统

      \n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-3.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:22:19', NULL, NULL, NULL, NULL); +INSERT INTO `product` VALUES (4, 3, 0, 0, 0, 0, '小程序商城系统', NULL, NULL, NULL, NULL, NULL, NULL, 18000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

      小程序商城系统

      \n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-2.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:23:02', NULL, NULL, NULL, NULL); +INSERT INTO `product` VALUES (5, 1, 0, 0, 0, 0, '博客系统', NULL, NULL, NULL, NULL, NULL, NULL, 10000, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, '

      博客系统

      \n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 999, 0, NULL, NULL, NULL, '/images/default/slide-1.jpg', 0, NULL, '', NULL, 1, '2018-12-02 17:49:43', NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for tagsdetail +-- ---------------------------- +DROP TABLE IF EXISTS `tagsdetail`; +CREATE TABLE `tagsdetail` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `TagsId` int(11) NOT NULL DEFAULT 0 COMMENT '所属标签ID', + `TagName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Tag标签名称', + `TypeId` int(11) NOT NULL DEFAULT 0 COMMENT '类型', + `Title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题', + `Hits` int(11) NOT NULL DEFAULT 0 COMMENT '点击量', + `RId` int(11) NOT NULL DEFAULT 0 COMMENT '目标Id', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + PRIMARY KEY (`Id`) USING BTREE, + INDEX `IX_TagsDetail_TypeId`(`TypeId`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'Tag标签详情' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of tagsdetail +-- ---------------------------- + +-- ---------------------------- +-- Table structure for targetevent +-- ---------------------------- +DROP TABLE IF EXISTS `targetevent`; +CREATE TABLE `targetevent` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `EventKey` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件key', + `EventName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事件名称', + `IsDisable` int(11) NOT NULL COMMENT '是否禁用', + `Rank` int(11) NOT NULL COMMENT '排序', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '目标事件' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of targetevent +-- ---------------------------- +INSERT INTO `targetevent` VALUES (1, 'add', '添加', 0, 0); +INSERT INTO `targetevent` VALUES (2, 'edit', '修改', 0, 0); +INSERT INTO `targetevent` VALUES (3, 'del', '删除', 0, 0); +INSERT INTO `targetevent` VALUES (4, 'view', '查看', 0, 0); +INSERT INTO `targetevent` VALUES (5, 'viewlist', '查看列表', 0, 0); +INSERT INTO `targetevent` VALUES (6, 'import', '导入', 0, 0); +INSERT INTO `targetevent` VALUES (7, 'export', '导出', 0, 0); +INSERT INTO `targetevent` VALUES (8, 'filter', '搜索', 0, 0); +INSERT INTO `targetevent` VALUES (9, 'batch', '批量操作', 0, 0); +INSERT INTO `targetevent` VALUES (10, 'recycle', '回收站', 0, 0); +INSERT INTO `targetevent` VALUES (11, 'confirm', '确认', 0, 0); + +-- ---------------------------- +-- Table structure for weixinrequestcontent +-- ---------------------------- +DROP TABLE IF EXISTS `weixinrequestcontent`; +CREATE TABLE `weixinrequestcontent` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `RuleId` int(11) NOT NULL COMMENT '规则名称', + `Title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '回复标题', + `Content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '回复内容', + `LinkUrl` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详情链接地址', + `ImgURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片地址', + `MediaURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '语音或视频地址', + `MeidaHdURL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '高清语音或者视频地址', + `MediaID` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '返回的素材ID', + `WXAppAppId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '小程序APPId', + `WXAppPage` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '小程序页面', + `Rank` int(11) NOT NULL COMMENT '排序', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '请求回复的内容' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of weixinrequestcontent +-- ---------------------------- +INSERT INTO `weixinrequestcontent` VALUES (1, 1, NULL, '关注公众号自动回复文本', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2020-02-19 14:41:24'); + +-- ---------------------------- +-- Table structure for weixinrequestrule +-- ---------------------------- +DROP TABLE IF EXISTS `weixinrequestrule`; +CREATE TABLE `weixinrequestrule` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `RuleName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '规则名称', + `Keywords` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '请求关键词,逗号分隔', + `RequestType` int(11) NOT NULL COMMENT '请求类型(0默认回复1文字2图片3语音4链接5地理位置6关注7取消关注8扫描带参数二维码事件9上报地理位置事件10自定义菜单事件)', + `ResponseType` int(11) NOT NULL COMMENT '回复类型(1文本2图文3语音4视频5第三方接口)', + `IsLikeQuery` int(11) NOT NULL COMMENT '是否模糊查询 0 是完全匹配;1是模糊匹配', + `IsDefault` int(11) NOT NULL COMMENT '是否是默认回复', + `Rank` int(11) NOT NULL COMMENT '排序', + `AddTime` datetime NULL DEFAULT NULL COMMENT '添加时间', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信公众号回复规则' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of weixinrequestrule +-- ---------------------------- +INSERT INTO `weixinrequestrule` VALUES (1, '关注自动回复', NULL, 6, 0, 0, 1, 0, NULL, '2020-02-19 14:41:24'); + +-- ---------------------------- +-- Table structure for weixinresponsecontent +-- ---------------------------- +DROP TABLE IF EXISTS `weixinresponsecontent`; +CREATE TABLE `weixinresponsecontent` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `OpenId` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户OpenId', + `RequestType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '请求类型', + `RequestContent` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', + `ResponseType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '回复的类型 文本消息:text 图片消息:image 地理位置消息:location 链接消息:link', + `ReponseContent` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '系统回复的内容', + `XmlContent` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'xml原始内容', + `UpdateTime` datetime NULL DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公众平台回复信息' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of weixinresponsecontent +-- ---------------------------- + +-- ---------------------------- +-- Table structure for withdraworder +-- ---------------------------- +DROP TABLE IF EXISTS `withdraworder`; +CREATE TABLE `withdraworder` ( + `Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `UId` int(11) NOT NULL COMMENT '用户ID', + `OrderNum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', + `UserName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', + `Title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单名称', + `AddTime` datetime NULL DEFAULT NULL COMMENT '时间', + `IP` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP', + `Actions` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录详情', + `Price` decimal(10, 0) NOT NULL COMMENT '提现金额', + `VerifyAdminId` int(11) NOT NULL COMMENT '审核管理员ID', + `IsVerify` int(11) NOT NULL COMMENT '是否通过审核', + `VerifyTime` datetime NULL DEFAULT NULL COMMENT '审核时间', + `FormId` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '小程序FormId', + PRIMARY KEY (`Id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户提现订单' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of withdraworder +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1;