diff --git a/src/admin/catalog_edit.php b/src/admin/catalog_edit.php index a2ac17c8..55a382f2 100644 --- a/src/admin/catalog_edit.php +++ b/src/admin/catalog_edit.php @@ -232,7 +232,7 @@ if ($dopost == 'time') { - + diff --git a/src/admin/css/albumupload.css b/src/admin/css/albumupload.css index 737da2fb..5ccb2701 100644 --- a/src/admin/css/albumupload.css +++ b/src/admin/css/albumupload.css @@ -1 +1,99 @@ -div.flash{margin:10px 5px;width:375px;border-color:#D9E4FF;border-radius:.2rem}#btnSubmit{margin:0 0 0 155px}.progressWrapper{width:357px;overflow:hidden}.progressContainer{padding:4px;margin:5px;background:#f8f8f8;border:solid 1px #E8E8E8;overflow:hidden}.message{margin:10px 0;padding:10px 20px;background:#FFC;border:solid 1px #FD9;overflow:hidden}.red{background:#FFEBEB;border:solid 1px #B50000}.green{background:#EBFFEB;border:solid 1px #DDF0DD}.blue{background:#F0F5FF;border:solid 1px #CEE2F2}.progressName{width:320px;height:14px;text-align:left;white-space:nowrap;overflow:hidden}.progressBarInProgress,.progressBarComplete,.progressBarError{margin-top:2px;width:0;height:2px;font-size:0;background:blue}.progressBarComplete{width:100%;background:green;visibility:hidden}.progressBarError{width:100%;background:#dc3545;visibility:hidden}.progressBarStatus{margin-top:2px;width:340px;text-align:left;white-space:nowrap}a.progressCancel{font-size:0;display:block;height:14px;width:14px;background-image:url(../../images/cancelbutton.gif);background-repeat:no-repeat;background-position:-14px 0;float:right}a.progressCancel:hover{background-position:0 0}.swfupload{vertical-align:top}.albCt{float:left;width:240px;height:180px;margin-right:10px;margin-bottom:10px;border:1px dashed #eee;background:#f8f8f8;text-align:center;padding:10px}.albEdit{height:180px}.picinfo{height:30px;line-height:30px;margin:10px 0}.thumbnails img,.thumbnailsEdit img{margin:5px}.albCt img{max-width:100%;height:100px} \ No newline at end of file +div.flash { + margin:10px 5px; + width:375px; + border-color:#D9E4FF; + border-radius:.2rem +} +#btnSubmit { + margin:0 0 0 150px +} +.progressWrapper { + width:360px; + overflow:hidden +} +.progressContainer { + padding:5px; + margin:5px; + background:#f8f8f8; + border:solid 1px #E8E8E8; + overflow:hidden +} +.message { + margin:10px 0; + padding:10px 20px; + background:#FFC; + border:solid 1px #FD9; + overflow:hidden +} +.red { + background:#FFEBEB; + border:solid 1px #B50000 +} +.green { + background:#EBFFEB; + border:solid 1px #DDF0DD +} +.blue { + background:#F0F5FF; + border:solid 1px #CEE2F2 +} +.progressName { + width:320px; + height:16px; + text-align:left; + white-space:nowrap; + overflow:hidden +} +.progressBarInProgress,.progressBarComplete,.progressBarError { + margin-top:2px; + width:0; + height:2px; + font-size:0; + background:blue +} +.progressBarComplete { + width:100%; + background:green; + visibility:hidden +} +.progressBarError { + width:100%; + background:#dc3545; + visibility:hidden +} +.progressBarStatus { + margin-top:2px; + width:340px; + text-align:left; + white-space:nowrap +} +.swfupload { + vertical-align:top +} +.albCt { + float:left; + width:220px; + height:auto; + margin-right:10px; + margin-bottom:10px; + border:1px dashed #eee; + background:#f8f8f8; + text-align:center; + padding:10px +} +.albEdit { + height:auto +} +.picinfo { + height:30px; + line-height:30px; + margin:10px 0 +} +.thumbnails img,.thumbnailsEdit img { + margin:5px +} +.albCt img { + max-width:200px; + max-height:150px; + cursor:pointer +} \ No newline at end of file diff --git a/src/admin/css/login.css b/src/admin/css/login.css index e7deb89b..fd81264d 100644 --- a/src/admin/css/login.css +++ b/src/admin/css/login.css @@ -1 +1,91 @@ -body{font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#545b62;background:#f8f8f8}img{max-width:100%}input{font-size:14px !important}header{background:#fff}header .logo{padding:1rem 0;width:300px}.goindex{line-height:68px}.login-from{max-width:560px;width:100%}.login-area{padding:1.25rem;background:#fff;border-radius:.2rem}.login-area .btnLogin{width:100%}.login-power{padding-top:1rem}.login-power a,.goindex a{color:#28a745}.btnLogin,.form-control{height:36px} \ No newline at end of file +* { + margin:0; + padding:0; + letter-spacing:.6px; + box-sizing:border-box +} +body { + line-height:1.5; + font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif; + color:#545b62; + background:#f8f8f8 +} +a { + color:#545b62 +} +h2 { + font-size:24px +} +input,select,.btn { + font-size:14px!important +} +.biz-head { + padding:1rem 0; + background:#fff +} +.logo { + height:36px +} +.biz-nav { + height:36px; + line-height:36px +} +.biz-nav-a { + padding-right:30px +} +.biz-btn { + color:#545b62 +} +.dropdown-menu { + min-width:8rem; + font-size:14px +} +.dropdown-item { + padding:0 1rem; + height:30px; + line-height:30px; + font-size:14px; + color:#545b62!important +} +.login-from { + margin:0 auto; + width:500px +} +.login-area { + padding:1.25rem; + background:#fff; + border-radius:.2rem +} +.login-power { + padding-top:1rem +} +.login-power a,.goindex a { + color:#1eb867 +} +.form-control { + height:36px +} +#browsehappy { + padding:20px 30px; + font-size:14px; + line-height:16px; + color:#856404; + background:#fff3cd; + border-radius:.25rem; + border:0 +} +.browsehappy-close { + float:right; + cursor:pointer +} +@media (max-width:760px) { + .biz-head { + padding:1rem 15px +} +.biz-nav-a { + display:none!important +} +.login-from { + width:100% +} +} \ No newline at end of file diff --git a/src/admin/css/menu.css b/src/admin/css/menu.css index 3d36c126..c2fea3d5 100644 --- a/src/admin/css/menu.css +++ b/src/admin/css/menu.css @@ -1 +1,276 @@ -*{margin:0;padding:0;letter-spacing:.4px;box-sizing:border-box}body{line-height:1.5;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#545b62;background:#fff;overflow:hidden}body.hidemenu{background:none}body.showmenu .body-left{display:block}body.hidemenu .body-left{display:none}body.showmenu .body-right{left:240px;transition:all .2s}body.hidemenu .body-right{left:0;transition:all .2s}a,a:hover{text-decoration:none}ul,li{list-style:none}input[type=text]{padding:.2rem;width:160px;height:26px;line-height:26px;font-size:12px;background:#fff;border:0;border-radius:.2rem;vertical-align:middle}input[type=text]:focus{box-shadow:none;outline:none}.body-left{position:absolute;top:60px;width:240px;left:0;bottom:0;z-index:7}.body-right{position:absolute;right:0;top:60px;bottom:0;z-index:7}.main{height:100%}.main iframe{width:100%;height:100%;z-index:20}.menu{height:100%}.menu iframe{width:100%;height:100%;z-index:20}.head{position:relative;width:100%;height:60px;overflow:hidden;z-index:8}.top{width:100%;height:60px;background:linear-gradient(45deg,#008e38,#57960f 50%);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075)}.top .top-logo{float:left;margin-left:30px;width:210px}.top .top-dedebiz a{float:left;height:60px;line-height:60px;font-size:18px;font-weight:600;color:#fff}.top .top-dedebiz a img{width:90px}.top .top-version a{float:left;height:60px;line-height:60px;font-size:18px;font-weight:600;color:#fff}.top .top-version{float:left;margin-top:20px;margin-left:5px;color:#fff}.top .btn-primary{float:left;margin-top:18px;margin-left:5px;padding:2px;line-height:12px;font-size:12px;color:#fff}.top .btn-warning{float:left;margin-top:18px;margin-left:5px;padding:2px;line-height:12px;font-size:12px;color:#fff}.top .top-item ul li{float:left;padding-left:30px;height:60px;line-height:60px}.top .top-item ul li a,.top .top-admin ul li a{color:#fff}.top .top-item ul li a:hover,.top .top-admin ul li a:hover{color:#dee2e6}.search{margin-left:-20px;height:20px;line-height:20px;font-size:12px;color:#545b62;background:0;border-radius:.2rem;border:0;cursor:pointer}.top .top-admin{float:right;margin-right:30px;height:60px;line-height:60px}.top .top-admin img{margin-right:10px;width:30px;height:30px;border-radius:50%}.top .top-admin ul li{float:left;padding-left:30px;height:60px;line-height:60px}.menu-box{margin:0;padding:0 6px;background:#f8f8f8;overflow:scroll;overflow-x:hidden}.menu-left{padding-top:1rem}.menu-right{width:100%;background:#fff;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075);border-radius:0 0 .2rem .2rem}a.menu-item div{margin-bottom:6px;padding:6px 0;width:46px;color:#545b62;background:#fff;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075);border-radius:.2rem 0 0 .2rem;text-align:center;transition:all .2s;cursor:pointer}a.menu-item:hover div{color:#fff;background:#545b62}a.menu-active div{margin-bottom:6px;padding:6px 0;width:46px;color:#fff;background:#545b62;box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075);border-radius:.2rem 0 0 .2rem;text-align:center}dl.bitem{margin:1rem 0 10px 0;padding:0 10px}dl.bitem dt{margin-bottom:10px;padding-left:10px;height:28px;line-height:28px;background:#f8f8f8;border-radius:.2rem;cursor:pointer}dl.bitem dt b{color:#545b62}dl.bitem dt b i{margin-right:10px;width:10px}.sitemu li{display:block;padding-left:30px;height:26px;line-height:26px}.fllct{float:left}.flrct{float:right}.fa{font-size:14px!important}.fa-minus-circle{color:#dc3545}.fa-plus-circle{color:#28a745} \ No newline at end of file +* { + margin:0; + padding:0; + letter-spacing:.6px; + box-sizing:border-box +} +body { + line-height:1.5; + font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif; + color:#545b62; + background:#fff +} +body.hidemenu { + background:none +} +body.showmenu .body-left { + display:block +} +body.hidemenu .body-left { + display:none +} +body.showmenu .body-right { + left:230px; + transition:all .2s +} +body.hidemenu .body-right { + left:0; + transition:all .2s +} +a,a:hover { + text-decoration:none +} +ul,li { + list-style:none +} +input[type=text] { + padding:.2rem; + width:160px; + height:26px; + line-height:26px; + font-size:12px; + background:#fff; + border:0; + border-radius:.2rem; + vertical-align:middle +} +input[type=text]:focus { + box-shadow:none; + outline:none +} +.body-left { + position:absolute; + top:60px; + width:230px; + left:0; + bottom:0; + z-index:7 +} +.body-right { + position:absolute; + right:0; + top:60px; + bottom:0; + z-index:7 +} +.main { + height:100% +} +.main iframe { + width:100%; + height:100%; + z-index:20 +} +.menu { + height:100% +} +.menu iframe { + width:100%; + height:100%; + z-index:20 +} +.head { + position:relative; + width:100%; + height:60px; + overflow:hidden; + z-index:8 +} +.top { + width:100%; + height:60px; + background:linear-gradient(45deg,#008e38,#57960f 50%); + box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075) +} +.top-logo { + margin-left:30px; + float:left; + width:200px +} +.top-dedebiz a { + float:left; + height:60px; + line-height:60px; + font-size:18px; + font-weight:600; + color:#fff +} +.top-dedebiz a img { + width:90px +} +.top-version a { + float:left; + height:60px; + line-height:60px; + font-size:18px; + font-weight:600; + color:#fff +} +.top-version { + float:left; + margin-top:20px; + margin-left:5px; + color:#fff +} +.btn-primary { + float:left; + margin-top:18px; + margin-left:5px; + padding:2px; + line-height:12px; + font-size:12px; + color:#fff +} +.btn-warning { + float:left; + margin-top:18px; + margin-left:5px; + padding:2px; + line-height:12px; + font-size:12px; + color:#fff +} +.top-item ul li { + float:left; + padding-left:30px; + height:60px; + line-height:60px +} +.top-item ul li a,.top-admin ul li a { + color:#fff +} +.top-item ul li a:hover,.top-admin ul li a:hover { + color:#dee2e6 +} +.search { + margin-left:-20px; + height:20px; + line-height:20px; + font-size:12px; + color:#545b62; + background:0; + border-radius:.2rem; + border:0; + cursor:pointer +} +.top-admin { + float:right; + margin-right:30px; + height:60px; + line-height:60px +} +.top-admin img { + margin-right:10px; + width:30px; + height:30px; + border-radius:50% +} +.top-admin ul li { + float:left; + padding-left:30px; + height:60px; + line-height:60px +} +.menu-body { + margin:0; + padding:0 10px +} +.menu-left { + padding-top:1rem +} +.menu-right { + width:100%; + background:#fff; + box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075); + border-radius:0 0 .2rem .2rem +} +a.menu-item div { + margin-bottom:5px; + padding:5px 0; + width:40px; + color:#545b62; + background:#fff; + box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075); + border-radius:.2rem 0 0 .2rem; + text-align:center; + transition:all .2s; + cursor:pointer +} +a.menu-item:hover div { + color:#fff; + background:#545b62 +} +a.menu-active div { + margin-bottom:5px; + padding:5px 0; + width:40px; + color:#fff; + background:#545b62; + box-shadow:0 0.125rem 0.25rem rgba(0,0,0,.075); + border-radius:.2rem 0 0 .2rem; + text-align:center +} +dl.bitem { + margin:1rem 0 10px 0; + padding:0 10px +} +dl.bitem dt { + margin-bottom:10px; + padding-left:10px; + height:28px; + line-height:28px; + background:#f6f6f6; + border-radius:.2rem; + cursor:pointer +} +dl.bitem dt b { + color:#545b62 +} +dl.bitem dt b i { + margin-right:10px; + width:10px +} +.sitemu li { + display:block; + padding-left:30px; + height:26px; + line-height:26px +} +.fllct { + float:left +} +.flrct { + float:right +} +.fa { + font-size:14px!important +} +.fa-minus-circle { + color:#dc3545 +} +.fa-plus-circle { + color:#28a745 +} +#browsehappy { + padding:20px 30px; + font-size:14px; + line-height:16px; + color:#856404; + background:#fff3cd; + border-radius:.25rem; + border:0 +} +.browsehappy-close { + float:right; + cursor:pointer +} \ No newline at end of file diff --git a/src/admin/freelist_main.php b/src/admin/freelist_main.php index 326aa824..fc2f8cfb 100644 --- a/src/admin/freelist_main.php +++ b/src/admin/freelist_main.php @@ -61,7 +61,7 @@ function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') global $cfg_phpurl,$addsql; $start = ($pageno-1) * $pagesize; $printhead =" - + @@ -75,7 +75,7 @@ function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') while($row = $dsql->GetArray()) { $listurl = GetFreeListUrl($row['aid'],$row['namerule'],$row['listdir'],$row['defaultpage'],$row['nodefault']); - $line = " + $line = " diff --git a/src/admin/index_body.php b/src/admin/index_body.php index e2d80f15..83eda808 100644 --- a/src/admin/index_body.php +++ b/src/admin/index_body.php @@ -68,7 +68,7 @@ else if ($dopost == 'setskin') { if (!extension_loaded("openssl")) { echo json_encode(array( "code" => -1001, - "msg" => "PHP不支持OpenSSL,无法完成商业版授权", + "msg" => "PHP不支持OpenSSL,无法完成商业版授权。", "result" => null, )); exit; @@ -76,7 +76,7 @@ else if ($dopost == 'setskin') { if (empty($cfg_auth_code)) { echo json_encode(array( "code" => -1002, - "msg" => "当前站点尚未升级商业版授权", + "msg" => "无法启动商业版组件《商业版授权》", "result" => null, )); exit; diff --git a/src/admin/js/album.js b/src/admin/js/album.js index 2ac87ca9..765ec6e9 100644 --- a/src/admin/js/album.js +++ b/src/admin/js/album.js @@ -95,7 +95,7 @@ function seePicNewAlb(f, imgdid, frname, hpos, acname) { newobj.style.top = hpos; newobj.style.left = 100; document.body.appendChild(newobj); - newobj.innerHTML = ' 正在上传'; + newobj.innerHTML = ''; } newobj.style.display = 'block'; //提交后还原form的action等参数 diff --git a/src/admin/js/handlers.js b/src/admin/js/handlers.js index aab624f8..4078bf79 100644 --- a/src/admin/js/handlers.js +++ b/src/admin/js/handlers.js @@ -28,5 +28,5 @@ function addImage(src, pid) { newImgDiv.innerHTML = '' + delstr; } } - newImgDiv.innerHTML += '
名称:
'; + newImgDiv.innerHTML += '
名称:
'; } \ No newline at end of file diff --git a/src/admin/js/indexbody.js b/src/admin/js/indexbody.js index b24d90bd..7b258240 100644 --- a/src/admin/js/indexbody.js +++ b/src/admin/js/indexbody.js @@ -57,19 +57,19 @@ function ViewDedeBIZ() {
id 列表名称 模板文件
{$row['aid']} {$row['title']} {$row['templet']}
- + - + - + - + @@ -84,32 +84,24 @@ function LoadServer() { if (typeof rsp.result.domain !== "undefined") { infoStr += ` - - + + `; } if (typeof rsp.result.title !== "undefined") { infoStr += ` - - - - `; - } - if (typeof rsp.result.stype !== "undefined") { - infoStr += ` - - - + + `; } if (typeof rsp.result.auth_version !== "undefined" && typeof rsp.result.auth_at !== "undefined") { infoStr += ` - - + + `; } @@ -117,15 +109,15 @@ function LoadServer() { //下面是DedeBIZ Core组件信息 infoStr += ` - - + + `; } else { dedebizInfo = JSON.parse(rsp.result.core.data); infoStr += ` - + `; @@ -137,11 +129,10 @@ function LoadServer() {
版本号:版本号: V${dedebizInfo.result.server_version}
运行时间:运行时间: ${dedebizInfo.result.server_run_time}
服务器系统:服务器系统: ${dedebizInfo.result.server_goos}(${dedebizInfo.result.server_goarch})
内存占用:内存占用: ${dedebizInfo.result.server_memory_usage}%
授权域名:${rsp.result.domain} 证书授权域名:${rsp.result.domain}
站点名称:${rsp.result.title}
站点类型:${rsp.result.stype}站点名称:${rsp.result.title}(${rsp.result.stype})
授权版本:V${rsp.result.auth_version}.x.x(时间:${rsp.result.auth_at})授权版本:${rsp.result.auth_version}.x.x(时间:${rsp.result.auth_at})
版本组件:启动组件版本组件:启动组件
版本组件:版本组件: 组件信息
- - + - +
尚未启动商业版组件,原因:${rsp.msg}当前版本:社区版升级商业版当前站点为社区版,${rsp.msg}
如果您已购买商业版授权,可以在我们的授权中心查询到相信关授权信息,如果查询结果与实际授权不符,则说明您可能购买了非法商业授权,请及时与我们取得联系,谢谢。如果您已购买商业版授权,可以在我们的授权中心查询到相信关授权信息,如果查询结果与实际授权不符,则说明您可能购买了非法商业授权,请及时与我们取得联系。
@@ -233,7 +224,7 @@ async function LoadStatChart() { responsive: true, plugins: { legend: { - position: 'top', + position: 'right', } } }, @@ -260,7 +251,7 @@ async function LoadStatChart() { borderWidth: 1 } , { - label: '访问次数', + label: 'VV', data: vvs, borderColor: 'rgba(75, 192, 192, 1)', backgroundColor: 'rgba(75, 192, 192, 0.2)', diff --git a/src/admin/js/mode/clike/clike.js b/src/admin/js/mode/clike/clike.js new file mode 100644 index 00000000..afb7b3be --- /dev/null +++ b/src/admin/js/mode/clike/clike.js @@ -0,0 +1,940 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +function Context(indented, column, type, info, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.info = info; + this.align = align; + this.prev = prev; +} +function pushContext(state, col, type, info) { + var indent = state.indented; + if (state.context && state.context.type == "statement" && type != "statement") + indent = state.context.indented; + return state.context = new Context(indent, col, type, info, null, state.context); +} +function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; +} + +function typeBefore(stream, state, pos) { + if (state.prevToken == "variable" || state.prevToken == "type") return true; + if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, pos))) return true; + if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true; +} + +function isTopScope(context) { + for (;;) { + if (!context || context.type == "top") return true; + if (context.type == "}" && context.prev.info != "namespace") return false; + context = context.prev; + } +} + +CodeMirror.defineMode("clike", function(config, parserConfig) { + var indentUnit = config.indentUnit, + statementIndentUnit = parserConfig.statementIndentUnit || indentUnit, + dontAlignCalls = parserConfig.dontAlignCalls, + keywords = parserConfig.keywords || {}, + types = parserConfig.types || {}, + builtin = parserConfig.builtin || {}, + blockKeywords = parserConfig.blockKeywords || {}, + defKeywords = parserConfig.defKeywords || {}, + atoms = parserConfig.atoms || {}, + hooks = parserConfig.hooks || {}, + multiLineStrings = parserConfig.multiLineStrings, + indentStatements = parserConfig.indentStatements !== false, + indentSwitch = parserConfig.indentSwitch !== false, + namespaceSeparator = parserConfig.namespaceSeparator, + isPunctuationChar = parserConfig.isPunctuationChar || /[\[\]{}\(\),;\:\.]/, + numberStart = parserConfig.numberStart || /[\d\.]/, + number = parserConfig.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i, + isOperatorChar = parserConfig.isOperatorChar || /[+\-*&%=<>!?|\/]/, + isIdentifierChar = parserConfig.isIdentifierChar || /[\w\$_\xa1-\uffff]/, + // An optional function that takes a {string} token and returns true if it + // should be treated as a builtin. + isReservedIdentifier = parserConfig.isReservedIdentifier || false; + + var curPunc, isDefKeyword; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (numberStart.test(ch)) { + stream.backUp(1) + if (stream.match(number)) return "number" + stream.next() + } + if (isPunctuationChar.test(ch)) { + curPunc = ch; + return null; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + while (!stream.match(/^\/[\/*]/, false) && stream.eat(isOperatorChar)) {} + return "operator"; + } + stream.eatWhile(isIdentifierChar); + if (namespaceSeparator) while (stream.match(namespaceSeparator)) + stream.eatWhile(isIdentifierChar); + + var cur = stream.current(); + if (contains(keywords, cur)) { + if (contains(blockKeywords, cur)) curPunc = "newstatement"; + if (contains(defKeywords, cur)) isDefKeyword = true; + return "keyword"; + } + if (contains(types, cur)) return "type"; + if (contains(builtin, cur) + || (isReservedIdentifier && isReservedIdentifier(cur))) { + if (contains(blockKeywords, cur)) curPunc = "newstatement"; + return "builtin"; + } + if (contains(atoms, cur)) return "atom"; + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = null; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function maybeEOL(stream, state) { + if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context)) + state.typeAtEndOfLine = typeBefore(stream, state, stream.pos) + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", null, false), + indented: 0, + startOfLine: true, + prevToken: null + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) { maybeEOL(stream, state); return null; } + curPunc = isDefKeyword = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + if (ctx.align == null) ctx.align = true; + + if (curPunc == ";" || curPunc == ":" || (curPunc == "," && stream.match(/^\s*(?:\/\/.*)?$/, false))) + while (state.context.type == "statement") popContext(state); + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (indentStatements && + (((ctx.type == "}" || ctx.type == "top") && curPunc != ";") || + (ctx.type == "statement" && curPunc == "newstatement"))) { + pushContext(state, stream.column(), "statement", stream.current()); + } + + if (style == "variable" && + ((state.prevToken == "def" || + (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) && + isTopScope(state.context) && stream.match(/^\s*\(/, false))))) + style = "def"; + + if (hooks.token) { + var result = hooks.token(stream, state, style); + if (result !== undefined) style = result; + } + + if (style == "def" && parserConfig.styleDefs === false) style = "variable"; + + state.startOfLine = false; + state.prevToken = isDefKeyword ? "def" : style || curPunc; + maybeEOL(stream, state); + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass; + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + var closing = firstChar == ctx.type; + if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; + if (parserConfig.dontIndentStatements) + while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info)) + ctx = ctx.prev + if (hooks.indent) { + var hook = hooks.indent(state, ctx, textAfter, indentUnit); + if (typeof hook == "number") return hook + } + var switchBlock = ctx.prev && ctx.prev.info == "switch"; + if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) { + while (ctx.type != "top" && ctx.type != "}") ctx = ctx.prev + return ctx.indented + } + if (ctx.type == "statement") + return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit); + if (ctx.align && (!dontAlignCalls || ctx.type != ")")) + return ctx.column + (closing ? 0 : 1); + if (ctx.type == ")" && !closing) + return ctx.indented + statementIndentUnit; + + return ctx.indented + (closing ? 0 : indentUnit) + + (!closing && switchBlock && !/^(?:case|default)\b/.test(textAfter) ? indentUnit : 0); + }, + + electricInput: indentSwitch ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/, + blockCommentStart: "/*", + blockCommentEnd: "*/", + blockCommentContinue: " * ", + lineComment: "//", + fold: "brace" + }; +}); + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + function contains(words, word) { + if (typeof words === "function") { + return words(word); + } else { + return words.propertyIsEnumerable(word); + } + } + var cKeywords = "auto if break case register continue return default do sizeof " + + "static else struct switch extern typedef union for goto while enum const " + + "volatile inline restrict asm fortran"; + + // Keywords from https://en.cppreference.com/w/cpp/keyword includes C++20. + var cppKeywords = "alignas alignof and and_eq audit axiom bitand bitor catch " + + "class compl concept constexpr const_cast decltype delete dynamic_cast " + + "explicit export final friend import module mutable namespace new noexcept " + + "not not_eq operator or or_eq override private protected public " + + "reinterpret_cast requires static_assert static_cast template this " + + "thread_local throw try typeid typename using virtual xor xor_eq"; + + var objCKeywords = "bycopy byref in inout oneway out self super atomic nonatomic retain copy " + + "readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd " + + "@interface @implementation @end @protocol @encode @property @synthesize @dynamic @class " + + "@public @package @private @protected @required @optional @try @catch @finally @import " + + "@selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available"; + + var objCBuiltins = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION " + + " NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER " + + "NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION " + + "NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT" + + // Do not use this. Use the cTypes function below. This is global just to avoid + // excessive calls when cTypes is being called multiple times during a parse. + var basicCTypes = words("int long char short double float unsigned signed " + + "void bool"); + + // Do not use this. Use the objCTypes function below. This is global just to avoid + // excessive calls when objCTypes is being called multiple times during a parse. + var basicObjCTypes = words("SEL instancetype id Class Protocol BOOL"); + + // Returns true if identifier is a "C" type. + // C type is defined as those that are reserved by the compiler (basicTypes), + // and those that end in _t (Reserved by POSIX for types) + // http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html + function cTypes(identifier) { + return contains(basicCTypes, identifier) || /.+_t$/.test(identifier); + } + + // Returns true if identifier is a "Objective C" type. + function objCTypes(identifier) { + return cTypes(identifier) || contains(basicObjCTypes, identifier); + } + + var cBlockKeywords = "case do else for if switch while struct enum union"; + var cDefKeywords = "struct enum union"; + + function cppHook(stream, state) { + if (!state.startOfLine) return false + for (var ch, next = null; ch = stream.peek();) { + if (ch == "\\" && stream.match(/^.$/)) { + next = cppHook + break + } else if (ch == "/" && stream.match(/^\/[\/\*]/, false)) { + break + } + stream.next() + } + state.tokenize = next + return "meta" + } + + function pointerHook(_stream, state) { + if (state.prevToken == "type") return "type"; + return false; + } + + // For C and C++ (and ObjC): identifiers starting with __ + // or _ followed by a capital letter are reserved for the compiler. + function cIsReservedIdentifier(token) { + if (!token || token.length < 2) return false; + if (token[0] != '_') return false; + return (token[1] == '_') || (token[1] !== token[1].toLowerCase()); + } + + function cpp14Literal(stream) { + stream.eatWhile(/[\w\.']/); + return "number"; + } + + function cpp11StringHook(stream, state) { + stream.backUp(1); + // Raw strings. + if (stream.match(/^(?:R|u8R|uR|UR|LR)/)) { + var match = stream.match(/^"([^\s\\()]{0,16})\(/); + if (!match) { + return false; + } + state.cpp11RawStringDelim = match[1]; + state.tokenize = tokenRawString; + return tokenRawString(stream, state); + } + // Unicode strings/chars. + if (stream.match(/^(?:u8|u|U|L)/)) { + if (stream.match(/^["']/, /* eat */ false)) { + return "string"; + } + return false; + } + // Ignore this hook. + stream.next(); + return false; + } + + function cppLooksLikeConstructor(word) { + var lastTwo = /(\w+)::~?(\w+)$/.exec(word); + return lastTwo && lastTwo[1] == lastTwo[2]; + } + + // C#-style strings where "" escapes a quote. + function tokenAtString(stream, state) { + var next; + while ((next = stream.next()) != null) { + if (next == '"' && !stream.eat('"')) { + state.tokenize = null; + break; + } + } + return "string"; + } + + // C++11 raw string literal is "( anything )", where + // can be a string up to 16 characters long. + function tokenRawString(stream, state) { + // Escape characters that have special regex meanings. + var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&'); + var match = stream.match(new RegExp(".*?\\)" + delim + '"')); + if (match) + state.tokenize = null; + else + stream.skipToEnd(); + return "string"; + } + + function def(mimes, mode) { + if (typeof mimes == "string") mimes = [mimes]; + var words = []; + function add(obj) { + if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop)) + words.push(prop); + } + add(mode.keywords); + add(mode.types); + add(mode.builtin); + add(mode.atoms); + if (words.length) { + mode.helperType = mimes[0]; + CodeMirror.registerHelper("hintWords", mimes[0], words); + } + + for (var i = 0; i < mimes.length; ++i) + CodeMirror.defineMIME(mimes[i], mode); + } + + def(["text/x-csrc", "text/x-c", "text/x-chdr"], { + name: "clike", + keywords: words(cKeywords), + types: cTypes, + blockKeywords: words(cBlockKeywords), + defKeywords: words(cDefKeywords), + typeFirstDefinitions: true, + atoms: words("NULL true false"), + isReservedIdentifier: cIsReservedIdentifier, + hooks: { + "#": cppHook, + "*": pointerHook, + }, + modeProps: {fold: ["brace", "include"]} + }); + + def(["text/x-c++src", "text/x-c++hdr"], { + name: "clike", + keywords: words(cKeywords + " " + cppKeywords), + types: cTypes, + blockKeywords: words(cBlockKeywords + " class try catch"), + defKeywords: words(cDefKeywords + " class namespace"), + typeFirstDefinitions: true, + atoms: words("true false NULL nullptr"), + dontIndentStatements: /^template$/, + isIdentifierChar: /[\w\$_~\xa1-\uffff]/, + isReservedIdentifier: cIsReservedIdentifier, + hooks: { + "#": cppHook, + "*": pointerHook, + "u": cpp11StringHook, + "U": cpp11StringHook, + "L": cpp11StringHook, + "R": cpp11StringHook, + "0": cpp14Literal, + "1": cpp14Literal, + "2": cpp14Literal, + "3": cpp14Literal, + "4": cpp14Literal, + "5": cpp14Literal, + "6": cpp14Literal, + "7": cpp14Literal, + "8": cpp14Literal, + "9": cpp14Literal, + token: function(stream, state, style) { + if (style == "variable" && stream.peek() == "(" && + (state.prevToken == ";" || state.prevToken == null || + state.prevToken == "}") && + cppLooksLikeConstructor(stream.current())) + return "def"; + } + }, + namespaceSeparator: "::", + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-java", { + name: "clike", + keywords: words("abstract assert break case catch class const continue default " + + "do else enum extends final finally for goto if implements import " + + "instanceof interface native new package private protected public " + + "return static strictfp super switch synchronized this throw throws transient " + + "try volatile while @interface"), + types: words("var byte short int long float double boolean char void Boolean Byte Character Double Float " + + "Integer Long Number Object Short String StringBuffer StringBuilder Void"), + blockKeywords: words("catch class do else finally for if switch try while"), + defKeywords: words("class interface enum @interface"), + typeFirstDefinitions: true, + atoms: words("true false null"), + number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i, + hooks: { + "@": function(stream) { + // Don't match the @interface keyword. + if (stream.match('interface', false)) return false; + + stream.eatWhile(/[\w\$_]/); + return "meta"; + }, + '"': function(stream, state) { + if (!stream.match(/""$/)) return false; + state.tokenize = tokenTripleString; + return state.tokenize(stream, state); + } + }, + modeProps: {fold: ["brace", "import"]} + }); + + def("text/x-csharp", { + name: "clike", + keywords: words("abstract as async await base break case catch checked class const continue" + + " default delegate do else enum event explicit extern finally fixed for" + + " foreach goto if implicit in interface internal is lock namespace new" + + " operator out override params private protected public readonly ref return sealed" + + " sizeof stackalloc static struct switch this throw try typeof unchecked" + + " unsafe using virtual void volatile while add alias ascending descending dynamic from get" + + " global group into join let orderby partial remove select set value var yield"), + types: words("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func" + + " Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32" + + " UInt64 bool byte char decimal double short int long object" + + " sbyte float string ushort uint ulong"), + blockKeywords: words("catch class do else finally for foreach if struct switch try while"), + defKeywords: words("class interface namespace struct var"), + typeFirstDefinitions: true, + atoms: words("true false null"), + hooks: { + "@": function(stream, state) { + if (stream.eat('"')) { + state.tokenize = tokenAtString; + return tokenAtString(stream, state); + } + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); + + function tokenTripleString(stream, state) { + var escaped = false; + while (!stream.eol()) { + if (!escaped && stream.match('"""')) { + state.tokenize = null; + break; + } + escaped = stream.next() == "\\" && !escaped; + } + return "string"; + } + + function tokenNestedComment(depth) { + return function (stream, state) { + var ch + while (ch = stream.next()) { + if (ch == "*" && stream.eat("/")) { + if (depth == 1) { + state.tokenize = null + break + } else { + state.tokenize = tokenNestedComment(depth - 1) + return state.tokenize(stream, state) + } + } else if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenNestedComment(depth + 1) + return state.tokenize(stream, state) + } + } + return "comment" + } + } + + def("text/x-scala", { + name: "clike", + keywords: words( + /* scala */ + "abstract case catch class def do else extends final finally for forSome if " + + "implicit import lazy match new null object override package private protected return " + + "sealed super this throw trait try type val var while with yield _ " + + + /* package scala */ + "assert assume require print println printf readLine readBoolean readByte readShort " + + "readChar readInt readLong readFloat readDouble" + ), + types: words( + "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " + + "Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable " + + "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " + + "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " + + "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector " + + + /* package java.lang */ + "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " + + "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " + + "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " + + "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void" + ), + multiLineStrings: true, + blockKeywords: words("catch class enum do else finally for forSome if match switch try while"), + defKeywords: words("class enum def object package trait type val var"), + atoms: words("true false null"), + indentStatements: false, + indentSwitch: false, + isOperatorChar: /[+\-*&%=<>!?|\/#:@]/, + hooks: { + "@": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + }, + '"': function(stream, state) { + if (!stream.match('""')) return false; + state.tokenize = tokenTripleString; + return state.tokenize(stream, state); + }, + "'": function(stream) { + stream.eatWhile(/[\w\$_\xa1-\uffff]/); + return "atom"; + }, + "=": function(stream, state) { + var cx = state.context + if (cx.type == "}" && cx.align && stream.eat(">")) { + state.context = new Context(cx.indented, cx.column, cx.type, cx.info, null, cx.prev) + return "operator" + } else { + return false + } + }, + + "/": function(stream, state) { + if (!stream.eat("*")) return false + state.tokenize = tokenNestedComment(1) + return state.tokenize(stream, state) + } + }, + modeProps: {closeBrackets: {pairs: '()[]{}""', triples: '"'}} + }); + + function tokenKotlinString(tripleString){ + return function (stream, state) { + var escaped = false, next, end = false; + while (!stream.eol()) { + if (!tripleString && !escaped && stream.match('"') ) {end = true; break;} + if (tripleString && stream.match('"""')) {end = true; break;} + next = stream.next(); + if(!escaped && next == "$" && stream.match('{')) + stream.skipTo("}"); + escaped = !escaped && next == "\\" && !tripleString; + } + if (end || !tripleString) + state.tokenize = null; + return "string"; + } + } + + def("text/x-kotlin", { + name: "clike", + keywords: words( + /*keywords*/ + "package as typealias class interface this super val operator " + + "var fun for is in This throw return annotation " + + "break continue object if else while do try when !in !is as? " + + + /*soft keywords*/ + "file import where by get set abstract enum open inner override private public internal " + + "protected catch finally out final vararg reified dynamic companion constructor init " + + "sealed field property receiver param sparam lateinit data inline noinline tailrec " + + "external annotation crossinline const operator infix suspend actual expect setparam value" + ), + types: words( + /* package java.lang */ + "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " + + "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " + + "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " + + "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray " + + "ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy " + + "LazyThreadSafetyMode LongArray Nothing ShortArray Unit" + ), + intendSwitch: false, + indentStatements: false, + multiLineStrings: true, + number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i, + blockKeywords: words("catch class do else finally for if where try while enum"), + defKeywords: words("class val var object interface fun"), + atoms: words("true false null this"), + hooks: { + "@": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + }, + '*': function(_stream, state) { + return state.prevToken == '.' ? 'variable' : 'operator'; + }, + '"': function(stream, state) { + state.tokenize = tokenKotlinString(stream.match('""')); + return state.tokenize(stream, state); + }, + "/": function(stream, state) { + if (!stream.eat("*")) return false; + state.tokenize = tokenNestedComment(1); + return state.tokenize(stream, state) + }, + indent: function(state, ctx, textAfter, indentUnit) { + var firstChar = textAfter && textAfter.charAt(0); + if ((state.prevToken == "}" || state.prevToken == ")") && textAfter == "") + return state.indented; + if ((state.prevToken == "operator" && textAfter != "}" && state.context.type != "}") || + state.prevToken == "variable" && firstChar == "." || + (state.prevToken == "}" || state.prevToken == ")") && firstChar == ".") + return indentUnit * 2 + ctx.indented; + if (ctx.align && ctx.type == "}") + return ctx.indented + (state.context.type == (textAfter || "").charAt(0) ? 0 : indentUnit); + } + }, + modeProps: {closeBrackets: {triples: '"'}} + }); + + def(["x-shader/x-vertex", "x-shader/x-fragment"], { + name: "clike", + keywords: words("sampler1D sampler2D sampler3D samplerCube " + + "sampler1DShadow sampler2DShadow " + + "const attribute uniform varying " + + "break continue discard return " + + "for while do if else struct " + + "in out inout"), + types: words("float int bool void " + + "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " + + "mat2 mat3 mat4"), + blockKeywords: words("for while do if else struct"), + builtin: words("radians degrees sin cos tan asin acos atan " + + "pow exp log exp2 sqrt inversesqrt " + + "abs sign floor ceil fract mod min max clamp mix step smoothstep " + + "length distance dot cross normalize ftransform faceforward " + + "reflect refract matrixCompMult " + + "lessThan lessThanEqual greaterThan greaterThanEqual " + + "equal notEqual any all not " + + "texture1D texture1DProj texture1DLod texture1DProjLod " + + "texture2D texture2DProj texture2DLod texture2DProjLod " + + "texture3D texture3DProj texture3DLod texture3DProjLod " + + "textureCube textureCubeLod " + + "shadow1D shadow2D shadow1DProj shadow2DProj " + + "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " + + "dFdx dFdy fwidth " + + "noise1 noise2 noise3 noise4"), + atoms: words("true false " + + "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " + + "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " + + "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " + + "gl_FogCoord gl_PointCoord " + + "gl_Position gl_PointSize gl_ClipVertex " + + "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " + + "gl_TexCoord gl_FogFragCoord " + + "gl_FragCoord gl_FrontFacing " + + "gl_FragData gl_FragDepth " + + "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " + + "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " + + "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " + + "gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose " + + "gl_ProjectionMatrixInverseTranspose " + + "gl_ModelViewProjectionMatrixInverseTranspose " + + "gl_TextureMatrixInverseTranspose " + + "gl_NormalScale gl_DepthRange gl_ClipPlane " + + "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " + + "gl_FrontLightModelProduct gl_BackLightModelProduct " + + "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " + + "gl_FogParameters " + + "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " + + "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " + + "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " + + "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " + + "gl_MaxDrawBuffers"), + indentSwitch: false, + hooks: {"#": cppHook}, + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-nesc", { + name: "clike", + keywords: words(cKeywords + " as atomic async call command component components configuration event generic " + + "implementation includes interface module new norace nx_struct nx_union post provides " + + "signal task uses abstract extends"), + types: cTypes, + blockKeywords: words(cBlockKeywords), + atoms: words("null true false"), + hooks: {"#": cppHook}, + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-objectivec", { + name: "clike", + keywords: words(cKeywords + " " + objCKeywords), + types: objCTypes, + builtin: words(objCBuiltins), + blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized"), + defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class"), + dontIndentStatements: /^@.*$/, + typeFirstDefinitions: true, + atoms: words("YES NO NULL Nil nil true false nullptr"), + isReservedIdentifier: cIsReservedIdentifier, + hooks: { + "#": cppHook, + "*": pointerHook, + }, + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-objectivec++", { + name: "clike", + keywords: words(cKeywords + " " + objCKeywords + " " + cppKeywords), + types: objCTypes, + builtin: words(objCBuiltins), + blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"), + defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class class namespace"), + dontIndentStatements: /^@.*$|^template$/, + typeFirstDefinitions: true, + atoms: words("YES NO NULL Nil nil true false nullptr"), + isReservedIdentifier: cIsReservedIdentifier, + hooks: { + "#": cppHook, + "*": pointerHook, + "u": cpp11StringHook, + "U": cpp11StringHook, + "L": cpp11StringHook, + "R": cpp11StringHook, + "0": cpp14Literal, + "1": cpp14Literal, + "2": cpp14Literal, + "3": cpp14Literal, + "4": cpp14Literal, + "5": cpp14Literal, + "6": cpp14Literal, + "7": cpp14Literal, + "8": cpp14Literal, + "9": cpp14Literal, + token: function(stream, state, style) { + if (style == "variable" && stream.peek() == "(" && + (state.prevToken == ";" || state.prevToken == null || + state.prevToken == "}") && + cppLooksLikeConstructor(stream.current())) + return "def"; + } + }, + namespaceSeparator: "::", + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-squirrel", { + name: "clike", + keywords: words("base break clone continue const default delete enum extends function in class" + + " foreach local resume return this throw typeof yield constructor instanceof static"), + types: cTypes, + blockKeywords: words("case catch class else for foreach if switch try while"), + defKeywords: words("function local class"), + typeFirstDefinitions: true, + atoms: words("true false null"), + hooks: {"#": cppHook}, + modeProps: {fold: ["brace", "include"]} + }); + + // Ceylon Strings need to deal with interpolation + var stringTokenizer = null; + function tokenCeylonString(type) { + return function(stream, state) { + var escaped = false, next, end = false; + while (!stream.eol()) { + if (!escaped && stream.match('"') && + (type == "single" || stream.match('""'))) { + end = true; + break; + } + if (!escaped && stream.match('``')) { + stringTokenizer = tokenCeylonString(type); + end = true; + break; + } + next = stream.next(); + escaped = type == "single" && !escaped && next == "\\"; + } + if (end) + state.tokenize = null; + return "string"; + } + } + + def("text/x-ceylon", { + name: "clike", + keywords: words("abstracts alias assembly assert assign break case catch class continue dynamic else" + + " exists extends finally for function given if import in interface is let module new" + + " nonempty object of out outer package return satisfies super switch then this throw" + + " try value void while"), + types: function(word) { + // In Ceylon all identifiers that start with an uppercase are types + var first = word.charAt(0); + return (first === first.toUpperCase() && first !== first.toLowerCase()); + }, + blockKeywords: words("case catch class dynamic else finally for function if interface module new object switch try while"), + defKeywords: words("class dynamic function interface module object package value"), + builtin: words("abstract actual aliased annotation by default deprecated doc final formal late license" + + " native optional sealed see serializable shared suppressWarnings tagged throws variable"), + isPunctuationChar: /[\[\]{}\(\),;\:\.`]/, + isOperatorChar: /[+\-*&%=<>!?|^~:\/]/, + numberStart: /[\d#$]/, + number: /^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i, + multiLineStrings: true, + typeFirstDefinitions: true, + atoms: words("true false null larger smaller equal empty finished"), + indentSwitch: false, + styleDefs: false, + hooks: { + "@": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + }, + '"': function(stream, state) { + state.tokenize = tokenCeylonString(stream.match('""') ? "triple" : "single"); + return state.tokenize(stream, state); + }, + '`': function(stream, state) { + if (!stringTokenizer || !stream.match('`')) return false; + state.tokenize = stringTokenizer; + stringTokenizer = null; + return state.tokenize(stream, state); + }, + "'": function(stream) { + stream.eatWhile(/[\w\$_\xa1-\uffff]/); + return "atom"; + }, + token: function(_stream, state, style) { + if ((style == "variable" || style == "type") && + state.prevToken == ".") { + return "variable-2"; + } + } + }, + modeProps: { + fold: ["brace", "import"], + closeBrackets: {triples: '"'} + } + }); + +}); diff --git a/src/admin/module_main.php b/src/admin/module_main.php index 96a79270..500be3b7 100644 --- a/src/admin/module_main.php +++ b/src/admin/module_main.php @@ -141,7 +141,7 @@ else if ($action == 'setup') { } } $prvdir = "\r\n"; - $prvdir .= "\r\n"; + $prvdir .= "\r\n"; foreach ($prvdirs as $k => $v) { if ($v) $cw = '√'; else $cw = "×"; diff --git a/src/admin/search_keywords_main.php b/src/admin/search_keywords_main.php index 568d1c2d..8261fec7 100644 --- a/src/admin/search_keywords_main.php +++ b/src/admin/search_keywords_main.php @@ -61,7 +61,7 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') $printhead = "
目录可写
目录可写
- + @@ -79,7 +79,7 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') $dsql->Execute(); while ($row = $dsql->GetArray()) { $line = " - + diff --git a/src/admin/sys_admin_user_tj.php b/src/admin/sys_admin_user_tj.php index 0793f713..0368f43c 100644 --- a/src/admin/sys_admin_user_tj.php +++ b/src/admin/sys_admin_user_tj.php @@ -94,7 +94,7 @@ if (isset($dopost) && $dopost == 'getone') { $ddd = $row['dd'] + $ddd; $ccd = $row['cc'] + $ccd; $msg = "
选择 id 关键词
{$row['aid']}
- + diff --git a/src/admin/sys_data_done.php b/src/admin/sys_data_done.php index b4eba03e..bade024b 100644 --- a/src/admin/sys_data_done.php +++ b/src/admin/sys_data_done.php @@ -257,7 +257,7 @@ else if ($dopost == 'redat') { function PutInfo($msg1, $msg2) { global $cfg_soft_lang; - $msginfo = "提示信息

提示信息

{$msg1}{$msg2}
"; + $msginfo = "提示信息

提示信息

{$msg1}{$msg2}
"; echo $msginfo."
"; } function RpLine($str) diff --git a/src/admin/sys_info.php b/src/admin/sys_info.php index 8f2e04ba..b54827c3 100644 --- a/src/admin/sys_info.php +++ b/src/admin/sys_info.php @@ -97,7 +97,7 @@ else if ($dopost == 'search') { $configstr = <<
- + diff --git a/src/admin/templets/action_search.htm b/src/admin/templets/action_search.htm index 73e59856..d570eddd 100644 --- a/src/admin/templets/action_search.htm +++ b/src/admin/templets/action_search.htm @@ -13,7 +13,7 @@ - + diff --git a/src/admin/templets/ad_add.htm b/src/admin/templets/ad_add.htm index 99fe48ce..1d54f72a 100644 --- a/src/admin/templets/ad_add.htm +++ b/src/admin/templets/ad_add.htm @@ -66,7 +66,7 @@ cursor: pointer; } .typetab ul .act { - background:#FBFCE2; + background:#fbfce2; } .i_table { border: 1px solid #eee; diff --git a/src/admin/templets/ad_main.htm b/src/admin/templets/ad_main.htm index fb98ea7d..5db428e6 100644 --- a/src/admin/templets/ad_main.htm +++ b/src/admin/templets/ad_main.htm @@ -33,7 +33,7 @@ - + @@ -43,7 +43,7 @@ {dede:datalist empty=''} - + diff --git a/src/admin/templets/adtype_main.htm b/src/admin/templets/adtype_main.htm index 1216b702..c335987e 100644 --- a/src/admin/templets/adtype_main.htm +++ b/src/admin/templets/adtype_main.htm @@ -14,7 +14,7 @@ - + @@ -36,7 +36,7 @@ } ?> - + diff --git a/src/admin/templets/album_add.htm b/src/admin/templets/album_add.htm index 4b7432b0..042bc96b 100644 --- a/src/admin/templets/album_add.htm +++ b/src/admin/templets/album_add.htm @@ -21,12 +21,6 @@ - - - -
管理员 文档与点击 季度
参数说明 参数值 变量名
当前位置 > 搜索结果
""的搜索结果
id 分类 广告名称管理
暂无内容
{dede:field.aid/} {dede:field.clsname function='TestType(@me,1)'/} {dede:field.adname/}
广告分类管理广告管理
id 广告分类 状态
新增一个广告类型:
+
- +
文档列表 > 发布商品 文档列表 > 发布商品 栏目管理
@@ -47,21 +43,7 @@ - - - - -
常规信息高级参数
- - - - - - @@ -71,7 +53,7 @@ - +
@@ -185,7 +167,7 @@ echo ""; ?> - + - +
@@ -140,7 +122,7 @@ - +
@@ -258,11 +240,8 @@ - + - - -