From e83eecde638943d61f19dbaaf3783248b7cda3c9 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Tue, 9 Jun 2020 10:58:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=A6=BBeditor=5Fcolor.css=E4=BB=8E?= =?UTF-8?q?=E8=80=8C=E6=9B=B4=E6=96=B9=E4=BE=BF=E8=BF=9B=E8=A1=8C=E9=85=8D?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/CodeMirror/codeMirror.plugin.js | 4 +- _server/CodeMirror/codeMirror.plugin.min.js | 2 +- _server/CodeMirror/codemirror.css | 288 ---------- _server/css/editor.css | 93 +--- _server/css/editor_color.css | 555 ++++++++++++++++++++ _server/css/editor_mobile.css | 94 +--- _server/css/editor_mode.css | 38 +- _server/css/editor_mode_mobile.css | 35 -- _server/editor_blockly.js | 68 +-- _server/editor_mappanel.js | 4 +- _server/editor_table.js | 6 +- _server/editor_ui.js | 2 +- _server/thirdparty/awesomplete.css | 29 - editor-mobile.html | 2 + editor.html | 2 + 15 files changed, 585 insertions(+), 637 deletions(-) create mode 100644 _server/css/editor_color.css diff --git a/_server/CodeMirror/codeMirror.plugin.js b/_server/CodeMirror/codeMirror.plugin.js index 5b6c65d8..d74b3189 100644 --- a/_server/CodeMirror/codeMirror.plugin.js +++ b/_server/CodeMirror/codeMirror.plugin.js @@ -1134,10 +1134,10 @@ function getQueryDialog(cm) { - return '搜索: 0/0 使用/re/语法正则搜索'; + return '搜索: 0/0 使用/re/语法正则搜索'; } function getReplaceQueryDialog(cm) { - return ' 使用/re/语法正则搜索'; + return ' 使用/re/语法正则搜索'; } function getReplacementQueryDialog(cm) { return '替换为: '; diff --git a/_server/CodeMirror/codeMirror.plugin.min.js b/_server/CodeMirror/codeMirror.plugin.min.js index b1815e9e..968b3657 100644 --- a/_server/CodeMirror/codeMirror.plugin.min.js +++ b/_server/CodeMirror/codeMirror.plugin.min.js @@ -1 +1 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(F){"use strict";var q="CodeMirror-hint-active";function i(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}F.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var o={hint:t};if(n)for(var i in n)o[i]=n[i];return e.showHint(o)},F.defineExtension("showHint",function(e){e=function(e,t,n){var o=e.options.hintOptions,i={};for(var r in l)i[r]=l[r];if(o)for(var r in o)void 0!==o[r]&&(i[r]=o[r]);if(n)for(var r in n)void 0!==n[r]&&(i[r]=n[r]);i.hint.resolve&&(i.hint=i.hint.resolve(e,t));return i}(this,this.getCursor("start"),e);var t=this.listSelections();if(!(1l.clientHeight+1,H=r.getScrollInfo();0w&&(l.style.width=w-5+"px",E-=O.right-O.left-w),l.style.left=(y=v.left-E-x)+"px"),S)for(var P=l.firstChild;P;P=P.nextSibling)P.style.paddingRight=r.display.nativeBarWidth+"px";return r.addKeyMap(this.keyMap=function(e,o){var i={Up:function(){o.moveFocus(-1)},Down:function(){o.moveFocus(1)},PageUp:function(){o.moveFocus(1-o.menuSize(),!0)},PageDown:function(){o.moveFocus(o.menuSize()-1,!0)},Home:function(){o.setFocus(0)},End:function(){o.setFocus(o.length-1)},Enter:o.pick,Tab:o.pick,Esc:o.close};/Mac/.test(navigator.platform)&&(i["Ctrl-P"]=function(){o.moveFocus(-1)},i["Ctrl-N"]=function(){o.moveFocus(1)});var t=e.options.customKeys,r=t?{}:i;function n(e,t){var n="string"!=typeof t?function(e){return t(e,o)}:i.hasOwnProperty(t)?i[t]:t;r[e]=n}if(t)for(var s in t)t.hasOwnProperty(s)&&n(s,t[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&n(s,a[s]);return r}(i,{moveFocus:function(e,t){n.changeActive(n.selectedHint+e,t)},setFocus:function(e){n.changeActive(e)},menuSize:function(){return n.screenAmount()},length:o.length,close:function(){i.close()},pick:function(){n.pick()},data:e})),i.options.closeOnUnfocus&&(r.on("blur",this.onBlur=function(){N=setTimeout(function(){i.close()},100)}),r.on("focus",this.onFocus=function(){clearTimeout(N)})),r.on("scroll",this.onScroll=function(){var e=r.getScrollInfo(),t=r.getWrapperElement().getBoundingClientRect(),n=C+H.top-e.top,o=n-(a.pageYOffset||(s.documentElement||s.body).scrollTop);if(b||(o+=l.offsetHeight),o<=t.top||o>=t.bottom)return i.close();l.style.top=n+"px",l.style.left=y+H.left-e.left+"px"}),F.on(l,"dblclick",function(e){var t=D(l,e.target||e.srcElement);t&&null!=t.hintId&&(n.changeActive(t.hintId),n.pick())}),F.on(l,"click",function(e){var t=D(l,e.target||e.srcElement);t&&null!=t.hintId&&(n.changeActive(t.hintId),i.options.completeOnSingleClick&&n.pick())}),F.on(l,"mousedown",function(){setTimeout(function(){r.focus()},20)}),F.signal(e,"select",o[this.selectedHint],l.childNodes[this.selectedHint]),!0}function a(e,t,n,o){var i;e.async?e(t,o,n):(i=e(t,n))&&i.then?i.then(o):o(i)}i.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&F.signal(this.data,"close"),this.widget&&this.widget.close(),F.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(e,t){var n=e.list[t];n.hint?n.hint(this.cm,e,n):this.cm.replaceRange(R(n),n.from||e.from,n.to||e.to,"complete"),F.signal(e,"pick",n),this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e,t=this.cm.getCursor(),n=this.cm.getLine(t.line);t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?e=t?this.data.list.length-1:0:e<0&&(e=t?0:this.data.list.length-1),this.selectedHint!=e&&((n=this.hints.childNodes[this.selectedHint])&&(n.className=n.className.replace(" "+q,"")),(n=this.hints.childNodes[this.selectedHint=e]).className+=" "+q,n.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+3),F.signal(this.data,"select",this.data.list[this.selectedHint],n))},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},F.registerHelper("hint","auto",{resolve:function(e,t){var n,s=e.getHelpers(t,"hint");if(s.length){var o=function(e,o,i){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],o=0;o,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};F.defineOption("hintOptions",null)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(u){function h(e,t,n){var o=e.getWrapperElement(),i=o.appendChild(document.createElement("div"));return i.className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?i.innerHTML=t:i.appendChild(t),u.addClass(o,"dialog-opened"),i}function d(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}u.defineExtension("openDialog",function(e,t,n){n=n||{},d(this,null);var o=h(this,e,n.bottom),i=!1,r=this;function s(e){if("string"==typeof e)l.value=e;else{if(i)return;i=!0,u.rmClass(o.parentNode,"dialog-opened"),o.parentNode.removeChild(o),r.focus(),n.onClose&&n.onClose(o)}}var a,l=o.getElementsByTagName("input")[0];return l?(l.focus(),n.value&&(l.value=n.value,!1!==n.selectValueOnOpen&&l.select()),n.onInput&&u.on(l,"input",function(e){n.onInput(e,l.value,s)}),n.onKeyUp&&u.on(l,"keyup",function(e){n.onKeyUp(e,l.value,s)}),u.on(l,"keydown",function(e){n&&n.onKeyDown&&n.onKeyDown(e,l.value,s)||((27==e.keyCode||!1!==n.closeOnEnter&&13==e.keyCode)&&(l.blur(),u.e_stop(e),s()),13==e.keyCode&&t(l.value,e))}),!1!==n.closeOnBlur&&u.on(l,"blur",s)):(a=o.getElementsByTagName("button")[0])&&(u.on(a,"click",function(){s(),r.focus()}),!1!==n.closeOnBlur&&u.on(a,"blur",s),a.focus()),s}),u.defineExtension("openConfirm",function(e,t,n){d(this,null);var o=h(this,e,n&&n.bottom),i=o.getElementsByTagName("button"),r=!1,s=this,a=1;function l(){r||(r=!0,u.rmClass(o.parentNode,"dialog-opened"),o.parentNode.removeChild(o),s.focus())}i[0].focus();for(var c=0;c>1,a=o(e.slice(0,s)).length;if(a==n)return s;nr.cursorCoords(t,"window").top&&((a=o).style.opacity=.4)}))},i=b(o=r),c=h,f=l,u=function(e,t){var n=d.keyName(e),o=r.getOption("extraKeys"),i=o&&o[n]||d.keyMap[r.getOption("keyMap")][n];"findNext"==i||"findPrev"==i||"findPersistentNext"==i||"findPersistentPrev"==i?(d.e_stop(e),v(r,p(r),t),r.execCommand(i)):"find"!=i&&"findPersistent"!=i||(d.e_stop(e),l(t,e))},o.openDialog(i,f,{value:c,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){C(o)},onKeyDown:u}),n&&h&&(v(r,s,h),y(r,t))):m(r,b(),"搜索: ",h,function(e){e&&!s.query&&r.operation(function(){v(r,s,e),s.posFrom=s.posTo=r.getCursor(),y(r,t)})})}function y(n,o,i){n.operation(function(){var e=p(n),t=h(n,e.query,o?e.posFrom:e.posTo);if(!t.find(o)&&!(t=h(n,e.query,o?d.Pos(n.lastLine()):d.Pos(n.firstLine(),0))).find(o))return i&&i(null,null);n.setSelection(t.from(),t.to()),n.scrollIntoView({from:t.from(),to:t.to()},20),e.posFrom=t.from(),e.posTo=t.to(),i&&i(t.from(),t.to())})}function C(n){n.operation(function(){var e=document.getElementById("CodeMirror-search-count");e&&(e.innerText="");var t=p(n);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,n.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function b(){return'搜索: 0/0 使用/re/语法正则搜索'}function x(t,o,i){t.operation(function(){for(var n,e=h(t,o);e.findNext();){"string"!=typeof o?(n=t.getRange(e.from(),e.to()).match(o),e.replace(i.replace(/\$(\d)/g,function(e,t){return n[t]}))):e.replace(i)}})}function i(u,e){var t,n;u.getOption("readOnly")||(t=u.getSelection()||p(u).lastQuery,m(u,(n=''+(e?"全部替换":"替换")+"")+' 使用/re/语法正则搜索',n,t,function(f){f&&(f=r(f),m(u,'替换为: ',"替换为: ","",function(s){var a,l,c;s=o(s),e?x(u,f,s):(C(u),a=h(u,f,u.getCursor("from")),l=function(){var e,t,n,o,i,r=a.from();!(e=a.findNext())&&(a=h(u,f),!(e=a.findNext())||r&&a.from().line==r.line&&a.from().ch==r.ch)||(u.setSelection(a.from(),a.to()),u.scrollIntoView({from:a.from(),to:a.to()}),n='确认替换? ',o="确定替换?",i=[function(){c(e)},l,function(){x(u,f,s)}],(t=u).openConfirm?t.openConfirm(n,i):confirm(o)&&i[0]())},c=function(n){a.replace("string"==typeof f?s:s.replace(/\$(\d)/g,function(e,t){return n[t]})),l()},l())}))}))}d.commands.find=function(e){C(e),n(e)},d.commands.findPersistent=function(e){C(e),n(e,!1,!0)},d.commands.findPersistentNext=function(e){n(e,!1,!0,!0)},d.commands.findPersistentPrev=function(e){n(e,!0,!0,!0)},d.commands.findNext=n,d.commands.findPrev=function(e){n(e,!0)},d.commands.clearSearch=C,d.commands.replace=i,d.commands.replaceAll=function(e){i(e,!0)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(o){var f=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),m=o.Pos,v={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function y(e){return e&&e.bracketRegex||/[(){}[\]]/}function u(e,t,n){var o=e.getLineHandle(t.line),i=t.ch-1,r=n&&n.afterCursor;null==r&&(r=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var s=y(n),a=!r&&0<=i&&s.test(o.text.charAt(i))&&v[o.text.charAt(i)]||s.test(o.text.charAt(i+1))&&v[o.text.charAt(++i)];if(!a)return null;var l=">"==a.charAt(1)?1:-1;if(n&&n.strict&&0r))for(f==t.line&&(h=t.ch-(n<0?1:0));h!=d;h+=n){var p=u.charAt(h);if(l.test(p)&&(void 0===o||e.getTokenTypeAt(m(f,h+1))==o)){var g=v[p];if(g&&">"==g.charAt(1)==0",triples:"",explode:"[]{}"},w=k.Pos;function T(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:n[t]}k.defineOption("autoCloseBrackets",!1,function(e,t,n){n&&n!=k.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),t&&(o(T(t,"pairs")),e.state.closeBrackets=t,e.addKeyMap(i))});var i={Backspace:function(e){var t=L(e);if(!t||e.getOption("disableInput"))return k.Pass;for(var n=T(t,"pairs"),o=e.listSelections(),i=0;i=r.to&&(r.to=s+1);r.from>n.from.line&&(r.from=n.from.line);t.lineCount()>f&&100 (.*)$/);return{args:e,rettype:o&&o[1]}}(t.type),name:t.exprName||t.name||"fn",guess:t.guess,doc:o.getDoc()},C(n,o,s))})}(this,e)},jumpToDef:function(e){function t(e){var t={type:"definition",variable:e||null},i=u(r,s.getDoc());r.server.request(h(r,i,t),function(e,t){if(e)return T(r,s,e);if(t.file||!t.url){if(t.file){var n,o=r.docs[t.file];if(o&&(n=function(e,t){for(var n=t.context.slice(0,t.contextOffset).split("\n"),o=t.start.line-(n.length-1),i=y(o,(1==n.length?t.start.ch:e.getLine(o).length)-n[0].length),r=e.getLine(o).slice(i.ch),s=1+o;s/g,"\n"))),e.url&&(n.appendChild(document.createTextNode("\n")),(t=n.appendChild(d("a",null,"[文档]"))).href=e.url,t.target="_blank"),n}}function C(e,t,n){L(e);for(var o=e.cachedArgHints,i=o.type,r=d("span",o.guess?p+"fhint-guess":null,d("span",p+"fname",o.name),"("),s=0;s ":")")),i.rettype&&r.appendChild(d("span",p+"type",i.rettype));var l=t.cursorCoords(null,"page"),c=e.activeArgHints=k(l.right+1,l.bottom,r);setTimeout(function(){c.clear=x(t,function(){e.activeArgHints==c&&L(e)})},20)}function l(e,t,n,o,i){n.doc.setSelection(o,i),t!=n&&e.options.switchToDoc&&(L(e),e.options.switchToDoc(n.name,n.doc))}var c=0;function h(e,t,n,o){var i=[],r=0,s=!n.fullDocs;s||delete n.fullDocs,"string"==typeof n&&(n={type:n}),n.lineCharPositions=!0,null==n.end&&(n.end=o||t.doc.getCursor("end"),t.doc.somethingSelected()&&(n.start=t.doc.getCursor("start")));var a=n.start||n.end;for(var l in t.changed?t.doc.lineCount()>f&&!1!=s&&t.changed.to-t.changed.from<100&&t.changed.from<=a.line&&t.changed.to>n.end.line?(i.push(function(e,t,n){for(var o,i=e.doc,r=null,s=null,a=t.line-1,l=Math.max(0,a-50);l<=a;--a){var c=i.getLine(a);c.search(/\bfunction\b/)<0||(u=v.countColumn(c,null,4),null!=r&&r<=u||(r=u,s=a))}null==s&&(s=l);var f=Math.min(i.lastLine(),n.line+20);if(null==r||r==v.countColumn(i.getLine(t.line),null,4))o=f;else for(o=n.line+1;o",n):n(prompt(t,""))}function r(t,e){t.state.ternTooltip&&w(t.state.ternTooltip);var n=t.cursorCoords(),o=t.state.ternTooltip=k(n.right+1,n.bottom,e);var i=!1;v.on(o,"mousemove",function(){i=!0}),v.on(o,"mouseout",function(e){i=!1});var r=x(t,function e(){if(i)return i=!1,void setTimeout(e,100);t.state.ternTooltip=null,o.parentNode&&w(o),r()})}function x(e,t){return e.on("cursorActivity",t),e.on("blur",t),e.on("scroll",t),e.on("setDoc",t),function(){e.off("cursorActivity",t),e.off("blur",t),e.off("scroll",t),e.off("setDoc",t)}}function k(e,t,n){"string"==typeof n&&(n=n.replace(//g,"\n"));var o=d("div",p+"tooltip",n);return o.style.left=e+"px",o.style.top=t+"px",document.body.appendChild(o),o}function w(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function T(e,t,n){e.options.showError?e.options.showError(t,n):r(t,String(n))}function L(e){e.activeArgHints&&(e.activeArgHints.clear&&e.activeArgHints.clear(),w(e.activeArgHints),e.activeArgHints=null)}function M(e,t){var n=t.doc.getValue();return e.options.fileFilter&&(n=e.options.fileFilter(n,t.name,t.doc)),n}function O(t){var n=t.worker=new Worker(t.options.workerScript);n.postMessage({type:"init",defs:t.options.defs,plugins:t.options.plugins,scripts:t.options.workerDeps});var o=0,i={};function r(e,t){t&&(e.id=++o,i[o]=t),n.postMessage(e)}n.onmessage=function(e){var n=e.data;"getFile"==n.type?s(t,n.name,function(e,t){r({type:"getFile",err:String(e),text:t,id:n.id})}):"debug"==n.type?window.console.log(n.message):n.id&&i[n.id]&&(i[n.id](n.err,n.body),delete i[n.id])},n.onerror=function(e){for(var t in i)i[t](e);i={}},this.addFile=function(e,t){r({type:"add",name:e,text:t})},this.delFile=function(e){r({type:"del",name:e})},this.request=function(e,t){r({type:"req",body:e},t)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(h){"use strict";var p="CodeMirror-lint-markers";function d(e){e.parentNode&&e.parentNode.removeChild(e)}function f(e,t,n,o){var i,r,s,a,l=(i=e,r=t,s=n,(a=document.createElement("div")).className="CodeMirror-lint-tooltip cm-s-"+i.options.theme,a.appendChild(s.cloneNode(!0)),i.state.lint.options.selfContain?i.getWrapperElement().appendChild(a):document.body.appendChild(a),h.on(document,"mousemove",c),c(r),null!=a.style.opacity&&(a.style.opacity=1),a);function c(e){if(!a.parentNode)return h.off(document,"mousemove",c);a.style.top=Math.max(0,e.clientY-a.offsetHeight-5)+"px",a.style.left=e.clientX+5+"px"}function f(){var e;h.off(o,"mouseout",f),l&&((e=l).parentNode&&(null==e.style.opacity&&d(e),e.style.opacity=0,setTimeout(function(){d(e)},600)),l=null)}var u=setInterval(function(){if(l)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){f();break}}if(!l)return clearInterval(u)},400);h.on(o,"mouseout",f)}function l(t,e,n){this.marked=[],this.options=e,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){!function(e,t){var n=t.target||t.srcElement;if(!/\bCodeMirror-lint-mark-/.test(n.className))return;for(var o=n.getBoundingClientRect(),i=(o.left+o.right)/2,r=(o.top+o.bottom)/2,s=e.findMarksAt(e.coordsChar({left:i,top:r},"client")),a=[],l=0;l=t||(s.line>=t&&(s=A(t,0)),t=r.line,null==o?o=this.uncomment(r,s,e)?"un":(this.lineComment(r,s,e),"line"):"un"==o?this.uncomment(r,s,e):this.lineComment(r,s,e))}}),e.defineExtension("lineComment",function(r,e,s){s=s||M;var t,n,a,l,c,f,u=this,o=S(u,r),i=u.getLine(r.line);null!=i&&(t=r,n=i,!/\bstring\b/.test(u.getTokenTypeAt(A(t.line,0)))||/^[\'\"\`]/.test(n))&&((a=s.lineComment||o.lineComment)?(l=Math.min(0!=e.ch||e.line==r.line?e.line+1:e.line,u.lastLine()+1),c=null==s.padding?" ":s.padding,f=s.commentBlankLines||r.line==e.line,u.operation(function(){if(s.indent){for(var e=null,t=r.line;tn.length)&&(e=n)}for(t=r.line;ts||l.operation(function(){if(0!=r.fullLines){var e=O.test(l.getLine(s));l.replaceRange(a+u,A(s)),l.replaceRange(f+a,A(o.line,0));var t=r.blockCommentLead||c.blockCommentLead;if(null!=t)for(var n=o.line+1;n<=s;++n)n==s&&!e||l.replaceRange(t+a,A(n,0))}else l.replaceRange(u,i),l.replaceRange(f,o)})):(r.lineComment||c.lineComment)&&0!=r.fullLines&&l.lineComment(o,i,r)}),e.defineExtension("uncomment",function(e,t,n){n=n||M;var i,r=this,o=S(r,e),s=Math.min(0!=t.ch||t.line==e.line?t.line:t.line-1,r.lastLine()),a=Math.min(e.line,s),l=n.lineComment||o.lineComment,c=[],f=null==n.padding?" ":n.padding;e:if(l){for(var u=a;u<=s;++u){var h=r.getLine(u),d=h.indexOf(l);if(-1i.firstLine();)r=f.Pos(r.line-1,0),c=t(!1);c&&!c.cleared&&"unfold"!==s&&(n=function(e,t,n){var o=u(e,t,"widget");"function"==typeof o&&(o=o(n.from,n.to));{var i;"string"==typeof o?(i=document.createTextNode(o),(o=document.createElement("span")).appendChild(i),o.className="CodeMirror-foldmarker"):o=o&&o.cloneNode(!0)}return o}(i,e,c),f.on(n,"mousedown",function(e){o.clear(),f.e_preventDefault(e)}),(o=i.markText(c.from,c.to,{replacedWith:n,clearOnEnter:u(i,e,"clearOnEnter"),__isFold:!0})).on("clear",function(e,t){f.signal(i,"unfold",i,e,t)}),f.signal(i,"fold",i,c.from,c.to))}f.newFoldFunction=function(n,o){return function(e,t){i(e,t,{rangeFinder:n,widget:o})}},f.defineExtension("foldCode",function(e,t,n){i(this,e,t,n)}),f.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n=l){if(u&&n&&u.test(n.className))return;t=p(s.indicatorOpen)}}(t||n)&&r.setGutterMarker(e,s.gutter,t)})}function n(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){r(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function a(e,t,n){var o,i,r=e.state.foldGutter;!r||n==(o=r.options).gutter&&((i=d(e,t))?i.clear():e.foldCode(h(t,0),o))}function l(e){var t,n=e.state.foldGutter;n&&(t=n.options,n.from=n.to=0,clearTimeout(n.changeUpdate),n.changeUpdate=setTimeout(function(){s(e)},t.foldOnChangeTimeSpan||600))}function c(t){var e,n=t.state.foldGutter;n&&(e=n.options,clearTimeout(n.changeUpdate),n.changeUpdate=setTimeout(function(){var e=t.getViewport();n.from==n.to||20n.to&&(r(t,n.to,e.to),n.to=e.to)})},e.updateViewportTimeSpan||400))}function f(e,t){var n,o=e.state.foldGutter;!o||(n=t.line)>=o.from&&nr.lastLine())return null;var t=r.getTokenAt(y.Pos(e,1));if(/\S/.test(t.string)||(t=r.getTokenAt(y.Pos(e,t.end+1))),"keyword"!=t.type||"import"!=t.string)return null;for(var n=e,o=Math.min(r.lastLine(),e+10);n<=o;++n){var i=r.getLine(n).indexOf(";");if(-1!=i)return{startCh:t.end,end:y.Pos(n,i)}}}var n,o=e.line,i=t(o);if(!i||t(o-1)||(n=t(o-2))&&n.end.line==o-1)return null;for(var s=i.end;;){var a=t(s.line+1);if(null==a)break;s=a.end}return{from:r.clipPos(y.Pos(o,i.startCh+1)),to:s}}),y.registerHelper("fold","include",function(n,e){function t(e){if(en.lastLine())return null;var t=n.getTokenAt(y.Pos(e,1));return/\S/.test(t.string)||(t=n.getTokenAt(y.Pos(e,t.end+1))),"meta"==t.type&&"#include"==t.string.slice(0,8)?t.start+8:void 0}var o=e.line,i=t(o);if(null==i||null!=t(o-1))return null;for(var r=o;;){if(null==t(r+1))break;++r}return{from:y.Pos(o,i+1),to:n.clipPos(y.Pos(r))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],e):e(CodeMirror)}(function(i){"use strict";var n={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function r(e){for(var t in this.options={},n)this.options[t]=(e&&e.hasOwnProperty(t)?e:n)[t];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function s(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&o(e,t)}function a(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,o(e,t))}function o(e,t){clearTimeout(t.timeout),t.timeout=setTimeout(function(){l(e)},t.options.delay)}function f(e,t,n,o){var i,r,s,a,l=e.state.matchHighlighter;e.addOverlay(l.overlay=(i=t,r=n,s=o,{token:function(e){if(e.match(i)&&(!r||(n=r,!((t=e).start&&n.test(t.string.charAt(t.start-1))||t.pos!=t.string.length&&n.test(t.string.charAt(t.pos))))))return s;var t,n;e.next(),e.skipTo(i.charAt(0))||e.skipToEnd()}})),l.options.annotateScrollbar&&e.showMatchesOnScrollbar&&(a=n?new RegExp((/\w/.test(t.charAt(0))?"\\b":"")+t.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(t.charAt(t.length-1))?"\\b":"")):t,l.matchesonscroll=e.showMatchesOnScrollbar(a,!1,{className:"CodeMirror-selection-highlight-scrollbar"}))}function u(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(c){c.operation(function(){var e=c.state.matchHighlighter;if(u(c),c.somethingSelected()||!e.options.showToken){var t,n=c.getCursor("from"),o=c.getCursor("to");n.line==o.line&&(e.options.wordsOnly&&!function(e,t,n){{if(null===e.getRange(t,n).match(/^\w+$/))return;if(0=e.options.minChars&&f(c,t,!1,e.options.style)))}else{for(var i=!0===e.options.showToken?/[\w$]/:e.options.showToken,r=c.getCursor(),s=c.getLine(r.line),a=r.ch,l=a;a&&i.test(s.charAt(a-1));)--a;for(;ll.clientHeight+1,H=r.getScrollInfo();0w&&(l.style.width=w-5+"px",E-=O.right-O.left-w),l.style.left=(y=v.left-E-x)+"px"),S)for(var P=l.firstChild;P;P=P.nextSibling)P.style.paddingRight=r.display.nativeBarWidth+"px";return r.addKeyMap(this.keyMap=function(e,o){var i={Up:function(){o.moveFocus(-1)},Down:function(){o.moveFocus(1)},PageUp:function(){o.moveFocus(1-o.menuSize(),!0)},PageDown:function(){o.moveFocus(o.menuSize()-1,!0)},Home:function(){o.setFocus(0)},End:function(){o.setFocus(o.length-1)},Enter:o.pick,Tab:o.pick,Esc:o.close};/Mac/.test(navigator.platform)&&(i["Ctrl-P"]=function(){o.moveFocus(-1)},i["Ctrl-N"]=function(){o.moveFocus(1)});var t=e.options.customKeys,r=t?{}:i;function n(e,t){var n="string"!=typeof t?function(e){return t(e,o)}:i.hasOwnProperty(t)?i[t]:t;r[e]=n}if(t)for(var s in t)t.hasOwnProperty(s)&&n(s,t[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&n(s,a[s]);return r}(i,{moveFocus:function(e,t){n.changeActive(n.selectedHint+e,t)},setFocus:function(e){n.changeActive(e)},menuSize:function(){return n.screenAmount()},length:o.length,close:function(){i.close()},pick:function(){n.pick()},data:e})),i.options.closeOnUnfocus&&(r.on("blur",this.onBlur=function(){N=setTimeout(function(){i.close()},100)}),r.on("focus",this.onFocus=function(){clearTimeout(N)})),r.on("scroll",this.onScroll=function(){var e=r.getScrollInfo(),t=r.getWrapperElement().getBoundingClientRect(),n=C+H.top-e.top,o=n-(a.pageYOffset||(s.documentElement||s.body).scrollTop);if(b||(o+=l.offsetHeight),o<=t.top||o>=t.bottom)return i.close();l.style.top=n+"px",l.style.left=y+H.left-e.left+"px"}),F.on(l,"dblclick",function(e){var t=D(l,e.target||e.srcElement);t&&null!=t.hintId&&(n.changeActive(t.hintId),n.pick())}),F.on(l,"click",function(e){var t=D(l,e.target||e.srcElement);t&&null!=t.hintId&&(n.changeActive(t.hintId),i.options.completeOnSingleClick&&n.pick())}),F.on(l,"mousedown",function(){setTimeout(function(){r.focus()},20)}),F.signal(e,"select",o[this.selectedHint],l.childNodes[this.selectedHint]),!0}function a(e,t,n,o){var i;e.async?e(t,o,n):(i=e(t,n))&&i.then?i.then(o):o(i)}i.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&F.signal(this.data,"close"),this.widget&&this.widget.close(),F.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(e,t){var n=e.list[t];n.hint?n.hint(this.cm,e,n):this.cm.replaceRange(R(n),n.from||e.from,n.to||e.to,"complete"),F.signal(e,"pick",n),this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e,t=this.cm.getCursor(),n=this.cm.getLine(t.line);t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?e=t?this.data.list.length-1:0:e<0&&(e=t?0:this.data.list.length-1),this.selectedHint!=e&&((n=this.hints.childNodes[this.selectedHint])&&(n.className=n.className.replace(" "+q,"")),(n=this.hints.childNodes[this.selectedHint=e]).className+=" "+q,n.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+3),F.signal(this.data,"select",this.data.list[this.selectedHint],n))},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},F.registerHelper("hint","auto",{resolve:function(e,t){var n,s=e.getHelpers(t,"hint");if(s.length){var o=function(e,o,i){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],o=0;o,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};F.defineOption("hintOptions",null)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(u){function h(e,t,n){var o=e.getWrapperElement(),i=o.appendChild(document.createElement("div"));return i.className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?i.innerHTML=t:i.appendChild(t),u.addClass(o,"dialog-opened"),i}function d(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}u.defineExtension("openDialog",function(e,t,n){n=n||{},d(this,null);var o=h(this,e,n.bottom),i=!1,r=this;function s(e){if("string"==typeof e)l.value=e;else{if(i)return;i=!0,u.rmClass(o.parentNode,"dialog-opened"),o.parentNode.removeChild(o),r.focus(),n.onClose&&n.onClose(o)}}var a,l=o.getElementsByTagName("input")[0];return l?(l.focus(),n.value&&(l.value=n.value,!1!==n.selectValueOnOpen&&l.select()),n.onInput&&u.on(l,"input",function(e){n.onInput(e,l.value,s)}),n.onKeyUp&&u.on(l,"keyup",function(e){n.onKeyUp(e,l.value,s)}),u.on(l,"keydown",function(e){n&&n.onKeyDown&&n.onKeyDown(e,l.value,s)||((27==e.keyCode||!1!==n.closeOnEnter&&13==e.keyCode)&&(l.blur(),u.e_stop(e),s()),13==e.keyCode&&t(l.value,e))}),!1!==n.closeOnBlur&&u.on(l,"blur",s)):(a=o.getElementsByTagName("button")[0])&&(u.on(a,"click",function(){s(),r.focus()}),!1!==n.closeOnBlur&&u.on(a,"blur",s),a.focus()),s}),u.defineExtension("openConfirm",function(e,t,n){d(this,null);var o=h(this,e,n&&n.bottom),i=o.getElementsByTagName("button"),r=!1,s=this,a=1;function l(){r||(r=!0,u.rmClass(o.parentNode,"dialog-opened"),o.parentNode.removeChild(o),s.focus())}i[0].focus();for(var c=0;c>1,a=o(e.slice(0,s)).length;if(a==n)return s;nr.cursorCoords(t,"window").top&&((a=o).style.opacity=.4)}))},i=b(o=r),c=h,f=l,u=function(e,t){var n=d.keyName(e),o=r.getOption("extraKeys"),i=o&&o[n]||d.keyMap[r.getOption("keyMap")][n];"findNext"==i||"findPrev"==i||"findPersistentNext"==i||"findPersistentPrev"==i?(d.e_stop(e),v(r,p(r),t),r.execCommand(i)):"find"!=i&&"findPersistent"!=i||(d.e_stop(e),l(t,e))},o.openDialog(i,f,{value:c,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){C(o)},onKeyDown:u}),n&&h&&(v(r,s,h),y(r,t))):m(r,b(),"搜索: ",h,function(e){e&&!s.query&&r.operation(function(){v(r,s,e),s.posFrom=s.posTo=r.getCursor(),y(r,t)})})}function y(n,o,i){n.operation(function(){var e=p(n),t=h(n,e.query,o?e.posFrom:e.posTo);if(!t.find(o)&&!(t=h(n,e.query,o?d.Pos(n.lastLine()):d.Pos(n.firstLine(),0))).find(o))return i&&i(null,null);n.setSelection(t.from(),t.to()),n.scrollIntoView({from:t.from(),to:t.to()},20),e.posFrom=t.from(),e.posTo=t.to(),i&&i(t.from(),t.to())})}function C(n){n.operation(function(){var e=document.getElementById("CodeMirror-search-count");e&&(e.innerText="");var t=p(n);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,n.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function b(){return'搜索: 0/0 使用/re/语法正则搜索'}function x(t,o,i){t.operation(function(){for(var n,e=h(t,o);e.findNext();){"string"!=typeof o?(n=t.getRange(e.from(),e.to()).match(o),e.replace(i.replace(/\$(\d)/g,function(e,t){return n[t]}))):e.replace(i)}})}function i(u,e){var t,n;u.getOption("readOnly")||(t=u.getSelection()||p(u).lastQuery,m(u,(n=''+(e?"全部替换":"替换")+"")+' 使用/re/语法正则搜索',n,t,function(f){f&&(f=r(f),m(u,'替换为: ',"替换为: ","",function(s){var a,l,c;s=o(s),e?x(u,f,s):(C(u),a=h(u,f,u.getCursor("from")),l=function(){var e,t,n,o,i,r=a.from();!(e=a.findNext())&&(a=h(u,f),!(e=a.findNext())||r&&a.from().line==r.line&&a.from().ch==r.ch)||(u.setSelection(a.from(),a.to()),u.scrollIntoView({from:a.from(),to:a.to()}),n='确认替换? ',o="确定替换?",i=[function(){c(e)},l,function(){x(u,f,s)}],(t=u).openConfirm?t.openConfirm(n,i):confirm(o)&&i[0]())},c=function(n){a.replace("string"==typeof f?s:s.replace(/\$(\d)/g,function(e,t){return n[t]})),l()},l())}))}))}d.commands.find=function(e){C(e),n(e)},d.commands.findPersistent=function(e){C(e),n(e,!1,!0)},d.commands.findPersistentNext=function(e){n(e,!1,!0,!0)},d.commands.findPersistentPrev=function(e){n(e,!0,!0,!0)},d.commands.findNext=n,d.commands.findPrev=function(e){n(e,!0)},d.commands.clearSearch=C,d.commands.replace=i,d.commands.replaceAll=function(e){i(e,!0)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(o){var f=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),m=o.Pos,v={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function y(e){return e&&e.bracketRegex||/[(){}[\]]/}function u(e,t,n){var o=e.getLineHandle(t.line),i=t.ch-1,r=n&&n.afterCursor;null==r&&(r=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var s=y(n),a=!r&&0<=i&&s.test(o.text.charAt(i))&&v[o.text.charAt(i)]||s.test(o.text.charAt(i+1))&&v[o.text.charAt(++i)];if(!a)return null;var l=">"==a.charAt(1)?1:-1;if(n&&n.strict&&0r))for(f==t.line&&(h=t.ch-(n<0?1:0));h!=d;h+=n){var p=u.charAt(h);if(l.test(p)&&(void 0===o||e.getTokenTypeAt(m(f,h+1))==o)){var g=v[p];if(g&&">"==g.charAt(1)==0",triples:"",explode:"[]{}"},w=k.Pos;function T(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:n[t]}k.defineOption("autoCloseBrackets",!1,function(e,t,n){n&&n!=k.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),t&&(o(T(t,"pairs")),e.state.closeBrackets=t,e.addKeyMap(i))});var i={Backspace:function(e){var t=L(e);if(!t||e.getOption("disableInput"))return k.Pass;for(var n=T(t,"pairs"),o=e.listSelections(),i=0;i=r.to&&(r.to=s+1);r.from>n.from.line&&(r.from=n.from.line);t.lineCount()>f&&100 (.*)$/);return{args:e,rettype:o&&o[1]}}(t.type),name:t.exprName||t.name||"fn",guess:t.guess,doc:o.getDoc()},C(n,o,s))})}(this,e)},jumpToDef:function(e){function t(e){var t={type:"definition",variable:e||null},i=u(r,s.getDoc());r.server.request(h(r,i,t),function(e,t){if(e)return T(r,s,e);if(t.file||!t.url){if(t.file){var n,o=r.docs[t.file];if(o&&(n=function(e,t){for(var n=t.context.slice(0,t.contextOffset).split("\n"),o=t.start.line-(n.length-1),i=y(o,(1==n.length?t.start.ch:e.getLine(o).length)-n[0].length),r=e.getLine(o).slice(i.ch),s=1+o;s/g,"\n"))),e.url&&(n.appendChild(document.createTextNode("\n")),(t=n.appendChild(d("a",null,"[文档]"))).href=e.url,t.target="_blank"),n}}function C(e,t,n){L(e);for(var o=e.cachedArgHints,i=o.type,r=d("span",o.guess?p+"fhint-guess":null,d("span",p+"fname",o.name),"("),s=0;s ":")")),i.rettype&&r.appendChild(d("span",p+"type",i.rettype));var l=t.cursorCoords(null,"page"),c=e.activeArgHints=k(l.right+1,l.bottom,r);setTimeout(function(){c.clear=x(t,function(){e.activeArgHints==c&&L(e)})},20)}function l(e,t,n,o,i){n.doc.setSelection(o,i),t!=n&&e.options.switchToDoc&&(L(e),e.options.switchToDoc(n.name,n.doc))}var c=0;function h(e,t,n,o){var i=[],r=0,s=!n.fullDocs;s||delete n.fullDocs,"string"==typeof n&&(n={type:n}),n.lineCharPositions=!0,null==n.end&&(n.end=o||t.doc.getCursor("end"),t.doc.somethingSelected()&&(n.start=t.doc.getCursor("start")));var a=n.start||n.end;for(var l in t.changed?t.doc.lineCount()>f&&!1!=s&&t.changed.to-t.changed.from<100&&t.changed.from<=a.line&&t.changed.to>n.end.line?(i.push(function(e,t,n){for(var o,i=e.doc,r=null,s=null,a=t.line-1,l=Math.max(0,a-50);l<=a;--a){var c=i.getLine(a);c.search(/\bfunction\b/)<0||(u=v.countColumn(c,null,4),null!=r&&r<=u||(r=u,s=a))}null==s&&(s=l);var f=Math.min(i.lastLine(),n.line+20);if(null==r||r==v.countColumn(i.getLine(t.line),null,4))o=f;else for(o=n.line+1;o",n):n(prompt(t,""))}function r(t,e){t.state.ternTooltip&&w(t.state.ternTooltip);var n=t.cursorCoords(),o=t.state.ternTooltip=k(n.right+1,n.bottom,e);var i=!1;v.on(o,"mousemove",function(){i=!0}),v.on(o,"mouseout",function(e){i=!1});var r=x(t,function e(){if(i)return i=!1,void setTimeout(e,100);t.state.ternTooltip=null,o.parentNode&&w(o),r()})}function x(e,t){return e.on("cursorActivity",t),e.on("blur",t),e.on("scroll",t),e.on("setDoc",t),function(){e.off("cursorActivity",t),e.off("blur",t),e.off("scroll",t),e.off("setDoc",t)}}function k(e,t,n){"string"==typeof n&&(n=n.replace(//g,"\n"));var o=d("div",p+"tooltip",n);return o.style.left=e+"px",o.style.top=t+"px",document.body.appendChild(o),o}function w(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function T(e,t,n){e.options.showError?e.options.showError(t,n):r(t,String(n))}function L(e){e.activeArgHints&&(e.activeArgHints.clear&&e.activeArgHints.clear(),w(e.activeArgHints),e.activeArgHints=null)}function M(e,t){var n=t.doc.getValue();return e.options.fileFilter&&(n=e.options.fileFilter(n,t.name,t.doc)),n}function O(t){var n=t.worker=new Worker(t.options.workerScript);n.postMessage({type:"init",defs:t.options.defs,plugins:t.options.plugins,scripts:t.options.workerDeps});var o=0,i={};function r(e,t){t&&(e.id=++o,i[o]=t),n.postMessage(e)}n.onmessage=function(e){var n=e.data;"getFile"==n.type?s(t,n.name,function(e,t){r({type:"getFile",err:String(e),text:t,id:n.id})}):"debug"==n.type?window.console.log(n.message):n.id&&i[n.id]&&(i[n.id](n.err,n.body),delete i[n.id])},n.onerror=function(e){for(var t in i)i[t](e);i={}},this.addFile=function(e,t){r({type:"add",name:e,text:t})},this.delFile=function(e){r({type:"del",name:e})},this.request=function(e,t){r({type:"req",body:e},t)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(h){"use strict";var p="CodeMirror-lint-markers";function d(e){e.parentNode&&e.parentNode.removeChild(e)}function f(e,t,n,o){var i,r,s,a,l=(i=e,r=t,s=n,(a=document.createElement("div")).className="CodeMirror-lint-tooltip cm-s-"+i.options.theme,a.appendChild(s.cloneNode(!0)),i.state.lint.options.selfContain?i.getWrapperElement().appendChild(a):document.body.appendChild(a),h.on(document,"mousemove",c),c(r),null!=a.style.opacity&&(a.style.opacity=1),a);function c(e){if(!a.parentNode)return h.off(document,"mousemove",c);a.style.top=Math.max(0,e.clientY-a.offsetHeight-5)+"px",a.style.left=e.clientX+5+"px"}function f(){var e;h.off(o,"mouseout",f),l&&((e=l).parentNode&&(null==e.style.opacity&&d(e),e.style.opacity=0,setTimeout(function(){d(e)},600)),l=null)}var u=setInterval(function(){if(l)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){f();break}}if(!l)return clearInterval(u)},400);h.on(o,"mouseout",f)}function l(t,e,n){this.marked=[],this.options=e,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){!function(e,t){var n=t.target||t.srcElement;if(!/\bCodeMirror-lint-mark-/.test(n.className))return;for(var o=n.getBoundingClientRect(),i=(o.left+o.right)/2,r=(o.top+o.bottom)/2,s=e.findMarksAt(e.coordsChar({left:i,top:r},"client")),a=[],l=0;l=t||(s.line>=t&&(s=A(t,0)),t=r.line,null==o?o=this.uncomment(r,s,e)?"un":(this.lineComment(r,s,e),"line"):"un"==o?this.uncomment(r,s,e):this.lineComment(r,s,e))}}),e.defineExtension("lineComment",function(r,e,s){s=s||M;var t,n,a,l,c,f,u=this,o=S(u,r),i=u.getLine(r.line);null!=i&&(t=r,n=i,!/\bstring\b/.test(u.getTokenTypeAt(A(t.line,0)))||/^[\'\"\`]/.test(n))&&((a=s.lineComment||o.lineComment)?(l=Math.min(0!=e.ch||e.line==r.line?e.line+1:e.line,u.lastLine()+1),c=null==s.padding?" ":s.padding,f=s.commentBlankLines||r.line==e.line,u.operation(function(){if(s.indent){for(var e=null,t=r.line;tn.length)&&(e=n)}for(t=r.line;ts||l.operation(function(){if(0!=r.fullLines){var e=O.test(l.getLine(s));l.replaceRange(a+u,A(s)),l.replaceRange(f+a,A(o.line,0));var t=r.blockCommentLead||c.blockCommentLead;if(null!=t)for(var n=o.line+1;n<=s;++n)n==s&&!e||l.replaceRange(t+a,A(n,0))}else l.replaceRange(u,i),l.replaceRange(f,o)})):(r.lineComment||c.lineComment)&&0!=r.fullLines&&l.lineComment(o,i,r)}),e.defineExtension("uncomment",function(e,t,n){n=n||M;var i,r=this,o=S(r,e),s=Math.min(0!=t.ch||t.line==e.line?t.line:t.line-1,r.lastLine()),a=Math.min(e.line,s),l=n.lineComment||o.lineComment,c=[],f=null==n.padding?" ":n.padding;e:if(l){for(var u=a;u<=s;++u){var h=r.getLine(u),d=h.indexOf(l);if(-1i.firstLine();)r=f.Pos(r.line-1,0),c=t(!1);c&&!c.cleared&&"unfold"!==s&&(n=function(e,t,n){var o=u(e,t,"widget");"function"==typeof o&&(o=o(n.from,n.to));{var i;"string"==typeof o?(i=document.createTextNode(o),(o=document.createElement("span")).appendChild(i),o.className="CodeMirror-foldmarker"):o=o&&o.cloneNode(!0)}return o}(i,e,c),f.on(n,"mousedown",function(e){o.clear(),f.e_preventDefault(e)}),(o=i.markText(c.from,c.to,{replacedWith:n,clearOnEnter:u(i,e,"clearOnEnter"),__isFold:!0})).on("clear",function(e,t){f.signal(i,"unfold",i,e,t)}),f.signal(i,"fold",i,c.from,c.to))}f.newFoldFunction=function(n,o){return function(e,t){i(e,t,{rangeFinder:n,widget:o})}},f.defineExtension("foldCode",function(e,t,n){i(this,e,t,n)}),f.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n=l){if(u&&n&&u.test(n.className))return;t=p(s.indicatorOpen)}}(t||n)&&r.setGutterMarker(e,s.gutter,t)})}function n(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){r(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function a(e,t,n){var o,i,r=e.state.foldGutter;!r||n==(o=r.options).gutter&&((i=d(e,t))?i.clear():e.foldCode(h(t,0),o))}function l(e){var t,n=e.state.foldGutter;n&&(t=n.options,n.from=n.to=0,clearTimeout(n.changeUpdate),n.changeUpdate=setTimeout(function(){s(e)},t.foldOnChangeTimeSpan||600))}function c(t){var e,n=t.state.foldGutter;n&&(e=n.options,clearTimeout(n.changeUpdate),n.changeUpdate=setTimeout(function(){var e=t.getViewport();n.from==n.to||20n.to&&(r(t,n.to,e.to),n.to=e.to)})},e.updateViewportTimeSpan||400))}function f(e,t){var n,o=e.state.foldGutter;!o||(n=t.line)>=o.from&&nr.lastLine())return null;var t=r.getTokenAt(y.Pos(e,1));if(/\S/.test(t.string)||(t=r.getTokenAt(y.Pos(e,t.end+1))),"keyword"!=t.type||"import"!=t.string)return null;for(var n=e,o=Math.min(r.lastLine(),e+10);n<=o;++n){var i=r.getLine(n).indexOf(";");if(-1!=i)return{startCh:t.end,end:y.Pos(n,i)}}}var n,o=e.line,i=t(o);if(!i||t(o-1)||(n=t(o-2))&&n.end.line==o-1)return null;for(var s=i.end;;){var a=t(s.line+1);if(null==a)break;s=a.end}return{from:r.clipPos(y.Pos(o,i.startCh+1)),to:s}}),y.registerHelper("fold","include",function(n,e){function t(e){if(en.lastLine())return null;var t=n.getTokenAt(y.Pos(e,1));return/\S/.test(t.string)||(t=n.getTokenAt(y.Pos(e,t.end+1))),"meta"==t.type&&"#include"==t.string.slice(0,8)?t.start+8:void 0}var o=e.line,i=t(o);if(null==i||null!=t(o-1))return null;for(var r=o;;){if(null==t(r+1))break;++r}return{from:y.Pos(o,i+1),to:n.clipPos(y.Pos(r))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],e):e(CodeMirror)}(function(i){"use strict";var n={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function r(e){for(var t in this.options={},n)this.options[t]=(e&&e.hasOwnProperty(t)?e:n)[t];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function s(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&o(e,t)}function a(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,o(e,t))}function o(e,t){clearTimeout(t.timeout),t.timeout=setTimeout(function(){l(e)},t.options.delay)}function f(e,t,n,o){var i,r,s,a,l=e.state.matchHighlighter;e.addOverlay(l.overlay=(i=t,r=n,s=o,{token:function(e){if(e.match(i)&&(!r||(n=r,!((t=e).start&&n.test(t.string.charAt(t.start-1))||t.pos!=t.string.length&&n.test(t.string.charAt(t.pos))))))return s;var t,n;e.next(),e.skipTo(i.charAt(0))||e.skipToEnd()}})),l.options.annotateScrollbar&&e.showMatchesOnScrollbar&&(a=n?new RegExp((/\w/.test(t.charAt(0))?"\\b":"")+t.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(t.charAt(t.length-1))?"\\b":"")):t,l.matchesonscroll=e.showMatchesOnScrollbar(a,!1,{className:"CodeMirror-selection-highlight-scrollbar"}))}function u(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(c){c.operation(function(){var e=c.state.matchHighlighter;if(u(c),c.somethingSelected()||!e.options.showToken){var t,n=c.getCursor("from"),o=c.getCursor("to");n.line==o.line&&(e.options.wordsOnly&&!function(e,t,n){{if(null===e.getRange(t,n).match(/^\w+$/))return;if(0=e.options.minChars&&f(c,t,!1,e.options.style)))}else{for(var i=!0===e.options.showToken?/[\w$]/:e.options.showToken,r=c.getCursor(),s=c.getLine(r.line),a=r.ch,l=a;a&&i.test(s.charAt(a-1));)--a;for(;l span::selection, .CodeMirror-line > span > span::selection { - background: #d7d4f0; -} - -.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { - background: #d7d4f0; -} - -.cm-searching { - background-color: #ffa; - background-color: rgba(255, 255, 0, .4); -} - /* Used to force a border model for a node */ .cm-force-border { padding-right: .1px; @@ -535,8 +372,6 @@ span.CodeMirror-selectedtext { /* ========= show-hint.css ========= */ -.cm-matchhighlight {background-color: #dedede} - .CodeMirror-hints { position: absolute; z-index: 340; @@ -546,13 +381,7 @@ span.CodeMirror-selectedtext { margin: 0; padding: 2px; - -webkit-box-shadow: 2px 3px 5px rgba(0, 0, 0, .2); - -moz-box-shadow: 2px 3px 5px rgba(0, 0, 0, .2); - box-shadow: 2px 3px 5px rgba(0, 0, 0, .2); border-radius: 3px; - border: 1px solid silver; - - background: white; font-size: 90%; font-family: monospace; @@ -565,15 +394,9 @@ span.CodeMirror-selectedtext { padding: 0 4px; border-radius: 2px; white-space: pre; - color: black; cursor: pointer; } -li.CodeMirror-hint-active { - background: #08f; - color: white; -} - /* ========= lint.css ========= */ /* The lint marker gutter */ @@ -582,10 +405,7 @@ li.CodeMirror-hint-active { } .CodeMirror-lint-tooltip { - background-color: #ffd; - border: 1px solid black; border-radius: 4px 4px 4px 4px; - color: black; font-family: monospace; font-size: 10pt; overflow: hidden; @@ -607,15 +427,6 @@ li.CodeMirror-hint-active { background-position: left bottom; background-repeat: repeat-x; } - -.CodeMirror-lint-mark-error { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg=="); -} - -.CodeMirror-lint-mark-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="); -} - .CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning { background-position: center center; background-repeat: no-repeat; @@ -633,16 +444,7 @@ li.CodeMirror-hint-active { background-repeat: no-repeat; } -.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="); -} - -.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="); -} - .CodeMirror-lint-marker-multiple { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"); background-repeat: no-repeat; background-position: right bottom; width: 100%; @@ -662,47 +464,10 @@ li.CodeMirror-hint-active { } .CodeMirror-dialog-top { - border-bottom: 1px solid #eee; top: 0; } .CodeMirror-dialog-bottom { - border-top: 1px solid #eee; - bottom: 0; -} - -.CodeMirror-dialog input { - border: none; - outline: none; - background: transparent; - width: 20em; - color: inherit; - font-family: monospace; -} - -.CodeMirror-dialog button { - font-size: 70%; -} - -/* ========= dialog.css ========= */ - -.CodeMirror-dialog { - position: absolute; - left: 0; right: 0; - background: inherit; - z-index: 15; - padding: .1em .8em; - overflow: hidden; - color: inherit; -} - -.CodeMirror-dialog-top { - border-bottom: 1px solid #eee; - top: 0; -} - -.CodeMirror-dialog-bottom { - border-top: 1px solid #eee; bottom: 0; } @@ -719,7 +484,6 @@ li.CodeMirror-hint-active { font-size: 70%; } - /* ========= tern.css ========= */ .CodeMirror-Tern-completion { @@ -738,59 +502,20 @@ li.CodeMirror-hint-active { width: 15px; line-height: 16px; text-align: center; - color: white; -moz-box-sizing: border-box; box-sizing: border-box; } -.CodeMirror-Tern-completion-unknown:before { - content: "?"; - background: #4bb; -} -.CodeMirror-Tern-completion-object:before { - content: "O"; - background: #77c; -} -.CodeMirror-Tern-completion-fn:before { - content: "F"; - background: #7c7; -} -.CodeMirror-Tern-completion-array:before { - content: "A"; - background: #c66; -} -.CodeMirror-Tern-completion-number:before { - content: "1"; - background: #999; -} -.CodeMirror-Tern-completion-string:before { - content: "S"; - background: #999; -} -.CodeMirror-Tern-completion-bool:before { - content: "B"; - background: #999; -} - -.CodeMirror-Tern-completion-guess { - color: #999; -} .CodeMirror-Tern-tooltip { - border: 1px solid silver; border-radius: 3px; - color: #444; padding: 2px 5px; font-size: 90%; font-family: monospace; - background-color: white; white-space: pre-wrap; max-width: 40em; position: absolute; z-index: 320; - -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - box-shadow: 2px 3px 5px rgba(0,0,0,.2); transition: opacity 1s; -moz-transition: opacity 1s; @@ -804,15 +529,10 @@ li.CodeMirror-hint-active { margin-top: -3px; } -.CodeMirror-Tern-fname { color: black; } -.CodeMirror-Tern-farg { color: #70a; } .CodeMirror-Tern-farg-current { text-decoration: underline; } -.CodeMirror-Tern-type { color: #07c; } .CodeMirror-Tern-fhint-guess { opacity: .7; } .CodeMirror-foldmarker { - color: blue; - text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; font-family: arial; line-height: .3; cursor: pointer; @@ -830,11 +550,3 @@ li.CodeMirror-hint-active { .CodeMirror-foldgutter-folded:after { content: "\25B8"; } - -.CodeMirror-focused .cm-matchhighlight { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==); - background-position: bottom; - background-repeat: repeat-x; -} -.cm-matchhighlight {background-color: lightgreen} -.CodeMirror-selection-highlight-scrollbar {background-color: yellowgreen} diff --git a/_server/css/editor.css b/_server/css/editor.css index fcd06baf..71598dbd 100644 --- a/_server/css/editor.css +++ b/_server/css/editor.css @@ -6,7 +6,6 @@ html, body, div, img { body { font-family: Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;; - background-color: #F5F5F5; } /* ::-webkit-scrollbar { @@ -29,9 +28,7 @@ body { z-index: 240; padding: 4px 6px; margin-top: 6px; - background-color: #F5F5F5; box-sizing: border-box; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); } #colorPicker { @@ -43,7 +40,6 @@ body { #left, #mid, #mid2, #right { border-radius: 2px; box-sizing: border-box; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); } #left { @@ -75,7 +71,6 @@ body { font-size: 12.3px; font-family: 'Lucida Console', Monaco, monospace; white-space: pre; - border: 1px solid #ddd; border-radius: 2px; overflow: auto; } @@ -176,7 +171,6 @@ body { padding: 5px 10px 10px 10px; margin-right: 0; box-sizing: border-box; - border: 1px solid #ccc; border-radius: 2px; font-size: 15px; line-height: 18px; @@ -194,20 +188,6 @@ body { margin-top: 15px; } -.input { - display: block; - max-width: 150px; - height: 20px; - padding: 6px 12px; - font-size: 14px; - margin-top: 10px; - color: #555; - background-color: #fff; - border: 1px solid #ccc; - border-radius: 3px; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} - #bgSelect { width: 50%; height: 100px; @@ -223,37 +203,6 @@ body { #printOut { margin-top: 10px; height: 20px; - -} - -.btn { - width: 80px; - border-radius: 2px; - line-height: 30px; - margin: 0; - min-width: 50px; - padding: 0 5px; - display: inline-block; - margin-top: 5px; - font-size: 14px; - font-weight: 400; - /* text-transform: uppercase; */ - letter-spacing: 0; - overflow: hidden; - cursor: pointer; - text-decoration: none; - text-align: center; - vertical-align: middle; - border: 0; - background: rgba(158, 158, 158, .2); - box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .14), 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 3px 0 rgba(0, 0, 0, .12); - color: #fff; - background-color: #26A69A; -} - -.btn:hover { - background-color: #009688; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); } #right { @@ -298,10 +247,6 @@ body { padding: 0; /* display: none; */ box-sizing: border-box; - background-color: rgba(255, 255, 255, 0.0); - border: 1px solid #000; - box-shadow: 0 0 0 2px #fff, - 0 0 0 3px #000; } #iconExpandBtn { @@ -314,38 +259,25 @@ body { } .warnText { - color: #D50000; font-weight: 700; font-size: 14px; line-height: 1.2em; } -.infoText { - color: #2196F3; -} - .successText { - color: #00897B; line-height: 1.2em; } -table, td { - border: 1px solid #fff; - color: #fff; +#mapColMark, #mapRowMark { cursor: crosshair; } table.col { position: relative; - text-align: center; border-collapse: collapse; } -table.col td { - background-color: #4DB6AC; -} - #arrColMark td { width: 16px; } @@ -376,7 +308,6 @@ table.col td { height: 416px; width: 32px; z-index: 100; - background-color: rgba(38, 166, 154, .5); } table.row { @@ -386,10 +317,6 @@ table.row { border-collapse: collapse; } -table.row td { - background-color: #4C221B; -} - #arrRowMark { top: 5px; left: 2px; @@ -416,13 +343,10 @@ table.row td { height: 32px; width: 416px; z-index: 100; - background-color: rgba(76, 34, 27, .5); } #menuDiv * { margin: 0; padding: 0; } #midMenu{ - background: #fff; - border-color: #ccc #666 #666 #ccc; border-style: solid; border-width: 1px; cursor: default; @@ -439,7 +363,6 @@ table.row td { border-radius: 4px; } #midMenu .menuitem{ - color: #000; font: normal 13px Arial, sans-serif; list-style: none; margin: 0; @@ -451,25 +374,17 @@ table.row td { /* padding-right: 20px; */ } #midMenu .menuitem:hover{ - background-color: #d6e9f8; - border-color: #d6e9f8; border-style: dotted; border-width: 1px 0; padding-bottom: 3px; padding-top: 3px; } #midMenu .menuitem-content{ - color: #000; font: normal 13px Arial, sans-serif; } -textarea[disabled] { - color: #999999; -} - #searchBlock { width: 100px; - background-color: #E9EBF2; border-radius: 10px; outline: none; padding-left: 20px; @@ -492,7 +407,6 @@ textarea[disabled] { position: fixed; top: 0; left: 0; - background: rgba(127,127,127,0.6); z-index: 2000 } @@ -501,7 +415,6 @@ textarea[disabled] { top: 50%; left: 50%; transform: translate(-50%, -60%); - background: white; width: 436px; } @@ -563,8 +476,4 @@ textarea[disabled] { padding: 0; /* display: none; */ box-sizing: border-box; - background-color: rgba(255, 255, 255, 0.0); - border: 1px solid #000; - box-shadow: 0 0 0 2px #fff, - 0 0 0 3px #000; } \ No newline at end of file diff --git a/_server/css/editor_color.css b/_server/css/editor_color.css new file mode 100644 index 00000000..a26ce989 --- /dev/null +++ b/_server/css/editor_color.css @@ -0,0 +1,555 @@ +/** 配色文件:此文件包含了整个编辑器的全部配色 **/ + +/** ======== 编辑器主界面相关 ======== **/ + +/** 全局属性 **/ +body { + background-color: #F5F5F5; +} + +input { + color: inherit; +} + +button { + color: inherit; +} + +/** 可自行仿照添加更多的全局属性...... */ + +/** 颜色选择器 */ +#colorPanel { + background-color: #F5F5F5; +} + +/** 所有的阴影效果(颜色选择器、数据区、地图区、素材区等) */ +#colorPanel, #left, #mid, #mid2, #right, .leftTab { + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); +} + +/** 地图编辑的输入框 */ +#pout { + border: 1px solid #ddd; +} + +/** 中间的消息提示框 */ +#tip { + border: 1px solid #ccc; +} + +/** 选中素材区时的方框 */ +#dataSelection, .appendSelection, #selectPointBox { + background-color: rgba(255, 255, 255, 0.0); + border: 1px solid #000; + box-shadow: 0 0 0 2px #fff, 0 0 0 3px #000; +} + +/** 错误消息(如保存失败) */ +.warnText { + color: #D50000; +} + +/** 提示消息(如告知当前图块信息) */ +.infoText { + color: #2196F3; +} + +/** 成功消息(如保存成功) */ +.successText { + color: #00897B; +} + +/** 数据库的表格相关 */ +table, td { + border: 1px solid #fff; + color: #fff; +} + +.coltd, .rowtd { + border: 0.230vw solid #fff; + color: #fff; +} + +/** 横向标尺背景色 */ +table.col td, div.col .coltd { + background-color: #4DB6AC; +} + +/** 横向标尺选中时的背景色 */ +#mapColMark td:hover .colBlock, #mapColMark .coltd:hover .colBlock { + background-color: rgba(38, 166, 154, .5); +} + +/** 纵向标尺背景色 */ +table.row td, div.row .rowtd .rowtext { + background-color: #4C221B; +} + +/** 纵向标尺选中时的背景色 */ +#mapRowMark td:hover .rowBlock, #mapRowMark .rowtd:hover .rowBlock { + background-color: rgba(76, 34, 27, .5); +} + +/** 右键菜单栏 */ +#midMenu{ + color: #000; + background-color: #fff; + border-color: #ccc #666 #666 #ccc; +} + +#mid .tools { + border-top: 1px solid #ccc; +} + +/** 右键菜单栏的当前选中项 */ +#midMenu .menuitem:hover{ + background-color: #d6e9f8; + border-color: #d6e9f8; +} + +/** 禁用的输入方框(如ID)的背景色 */ +textarea[disabled] { + color: #999999; +} + +/** 搜索事件块的输入框 */ +#searchBlock { + background-color: #E9EBF2; +} + +/** 打开浮层(变量搜索等)时页面背景 */ +#uieventDiv { + background: rgba(127,127,127,0.6); +} + +/** 浮层的对话框 */ +#uieventDialog { + background: white; +} + +/** 追加素材时的编号标记 */ +#appendPicSelection span { + -webkit-text-stroke: 1px red; + text-shadow: black 1px 0, black 0 1px, black -1px 0, black 0 -1px; +} + +.leftTab { + background-color: #F5F5F5; +} + +/** 整个事件编辑器 */ +#left6 { + background-color: rgb(245, 245, 245); +} + +/** 事件编辑器右边的文本框 */ +#left6 .CodeMirror { + border: 1px solid #eee; +} + +/** 脚本编辑器 */ +#left7 { + background-color: rgb(245, 245, 245); +} + +#left7 .CodeMirror { + border: 1px solid #eee; +} + +/** 数据区的表格 */ +.etable table, .etable table td { + color: #000; +} + +/** 数据区每行效果;2n代表偶数行,以此类推 */ +.etable table tr { + background-color: #fff; + border-top: 1px solid #c6cbd1; +} +.etable table tr:nth-child(2n) { + background-color: #f6f8fa; +} + +/** 数据区表格每列效果 */ +.etable table th, .etable table td { + border: 1px solid #dfe2e5; +} + +/** 鼠标悬停在数据区表格上的边框效果 */ +.etable tr:not(:first-child) > :nth-child(3):hover { + border: 1px solid rgb(87, 198, 232); + box-shadow: 0px 0px 3px rgb(87, 198, 232); +} +.etable tr:not(:first-child) > :nth-child(2):hover, +.etable tr:not(:first-child) > :nth-child(1):hover { + border: 1px solid rgb(87, 232, 198); + box-shadow: 0px 0px 3px rgb(87, 232, 198); +} + +/** 表格编辑的按钮颜色 */ +.editorTableEditBtn { + background-color: #ddf8ff; +} +.editorTableFoldBtn { + background-color: #fff4bb; +} + +/** 保存地图的按钮颜色 */ +#saveFloor { + background-color: inherit; +} +#saveFloor.highlight { + background-color: #ffd700; +} + +/** 解析按钮颜色 */ +#blocklyParse { + background-color: inherit; +} +#blocklyParse.highlight { + background-color: #ffd700; +} + +.popCheckboxItem { + color: black; +} + +/** ======== blockly 相关 ======== */ + +/** +blockly图块的的黑暗程度,用opacity表示,0到1之间; +0表示表示纯亮色,1表示纯黑色 +*/ +#blocklyDarkScale { + opacity: 0; +} + +/** 如果需要blockly深色模式,请有选择性视情况取消注释下面几条;具体功能自行研究 */ +/* +.blocklyToolboxDiv { + background-color: #ddd !important; + color: black; +} + +.blocklySvg { + background-color: #000; +} + +.blocklyNonEditableText>rect, .blocklyEditableText>rect { + fill: #000; + fill-opacity: .4; +} + +.blocklyNonEditableText>text, .blocklyEditableText>text { + fill: #fff; +} + +input.blocklyHtmlInput { + color: white; + background-color: black; +} +*/ + +/** ======== Blockly中自动补全相关 ======== */ +.awesomplete > ul { + background: #fff; + background: hsla(0,0%,100%,.9); + background: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8)); + border: 1px solid rgba(0,0,0,.3); + box-shadow: .05em .2em .6em rgba(0,0,0,.2); +} +.awesomplete > ul:before { + background: white; +} +.awesomplete > ul > li:hover { + background: hsl(200, 40%, 80%); + color: black; +} +.awesomplete > ul > li[aria-selected="true"] { + background: hsl(205, 40%, 40%); + color: white; +} +.awesomplete mark { + background: hsl(65, 100%, 50%); +} +.awesomplete li:hover mark { + background: hsl(68, 100%, 41%); +} +.awesomplete li[aria-selected="true"] mark { + background: hsl(86, 100%, 21%); + color: inherit; +} + +/** ======== 脚本编辑相关 ======== **/ +/* 很多我也不知道是干嘛的,自行根据名字猜每一项作用吧 */ + +.CodeMirror { + color: black; + background: white; +} +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; +} +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; +} +.CodeMirror-linenumber { + color: #999; +} +.CodeMirror-guttermarker { + color: black; +} +.CodeMirror-guttermarker-subtle { + color: #999; +} +.CodeMirror-cursor { + border-left: 1px solid black; +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.cm-fat-cursor .CodeMirror-cursor { + background: #7e7; +} +.cm-fat-cursor-mark { + background-color: rgba(20, 255, 20, 0.5); +} +.cm-animate-fat-cursor { + background-color: #7e7; +} +.CodeMirror-ruler { + border-left: 1px solid #ccc; +} +/* DEFAULT THEME */ +.cm-s-default .cm-header { + color: blue; +} +.cm-s-default .cm-quote { + color: #090; +} +.cm-negative { + color: #d44; +} +.cm-positive { + color: #292; +} +.cm-s-default .cm-keyword { + color: #708; +} +.cm-s-default .cm-atom { + color: #219; +} +.cm-s-default .cm-number { + color: #164; +} +.cm-s-default .cm-def { + color: #00f; +} +.cm-s-default .cm-variable-2 { + color: #05a; +} +.cm-s-default .cm-variable-3, .cm-s-default .cm-type { + color: #085; +} +.cm-s-default .cm-comment { + color: #a50; +} +.cm-s-default .cm-string { + color: #a11; +} +.cm-s-default .cm-string-2 { + color: #f50; +} +.cm-s-default .cm-meta { + color: #555; +} +.cm-s-default .cm-qualifier { + color: #555; +} +.cm-s-default .cm-builtin { + color: #30a; +} +.cm-s-default .cm-bracket { + color: #997; +} +.cm-s-default .cm-tag { + color: #170; +} +.cm-s-default .cm-attribute { + color: #00c; +} +.cm-s-default .cm-hr { + color: #999; +} +.cm-s-default .cm-link { + color: #00c; +} +.cm-s-default .cm-error { + color: #f00; +} +.cm-invalidchar { + color: #f00; +} + +/* Default styles for common addons */ + +div.CodeMirror span.CodeMirror-matchingbracket { + color: #0b0; +} +div.CodeMirror span.CodeMirror-nonmatchingbracket { + color: #a22; +} +.CodeMirror-matchingtag { + background: rgba(255, 150, 0, .3); +} +.CodeMirror-activeline-background { + background: #e8f2ff; +} + +.CodeMirror-selected { + background: #d9d9d9; +} +.CodeMirror-focused .CodeMirror-selected { + background: #d7d4f0; +} +.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { + background: #d7d4f0; +} +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { + background: #d7d4f0; +} +.cm-searching { + background-color: #ffa; + background-color: rgba(255, 255, 0, .4); +} + +/* 代码补全提示相关 */ + +.cm-matchhighlight { + background-color: #dedede +} +.CodeMirror-hints { + border: 1px solid silver; + background: white; + -webkit-box-shadow: 2px 3px 5px rgba(0, 0, 0, .2); + -moz-box-shadow: 2px 3px 5px rgba(0, 0, 0, .2); + box-shadow: 2px 3px 5px rgba(0, 0, 0, .2); +} +.CodeMirror-hint { + color: black; +} +li.CodeMirror-hint-active { + background: #08f; + color: white; +} + +/* 代码语法检查相关相关 */ + +.CodeMirror-lint-tooltip { + background-color: #ffd; + border: 1px solid black; + color: black; +} + +.CodeMirror-lint-mark-error { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg=="); +} + +.CodeMirror-lint-mark-warning { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="); +} + +.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="); +} + +.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="); +} + +.CodeMirror-lint-marker-multiple { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"); +} + +/* 代码补全的对话框(提供搜索功能)相关 */ + +.CodeMirror-dialog-top { + border-bottom: 1px solid #eee; +} + +.CodeMirror-dialog-bottom { + border-top: 1px solid #eee; +} + +/* 搜索项的背景色 */ +.CodeMirror-focused .cm-matchhighlight { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==); + background-position: bottom; + background-repeat: repeat-x; +} +.cm-matchhighlight {background-color: lightgreen} +.CodeMirror-selection-highlight-scrollbar {background-color: yellowgreen} + +.CodeMirror-search-hint { + color: #888; +} + + +/* 增强的代码补全系统相关 */ + +/* 变量类型 */ +.CodeMirror-Tern-completion:before { + color: white; +} +.CodeMirror-Tern-completion-unknown:before { + content: "?"; + background: #4bb; +} +.CodeMirror-Tern-completion-object:before { + content: "O"; + background: #77c; +} +.CodeMirror-Tern-completion-fn:before { + content: "F"; + background: #7c7; +} +.CodeMirror-Tern-completion-array:before { + content: "A"; + background: #c66; +} +.CodeMirror-Tern-completion-number:before { + content: "1"; + background: #999; +} +.CodeMirror-Tern-completion-string:before { + content: "S"; + background: #999; +} +.CodeMirror-Tern-completion-bool:before { + content: "B"; + background: #999; +} + +.CodeMirror-Tern-completion-guess { + color: #999; +} +/* 额外提示框(如文档) */ +.CodeMirror-Tern-tooltip { + border: 1px solid silver; + color: #444; + background-color: white; + -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); + -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); + box-shadow: 2px 3px 5px rgba(0,0,0,.2); +} + +.CodeMirror-Tern-fname { color: black; } +.CodeMirror-Tern-farg { color: #70a; } +.CodeMirror-Tern-type { color: #07c; } +.CodeMirror-foldmarker { + color: blue; + text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; +} + diff --git a/_server/css/editor_mobile.css b/_server/css/editor_mobile.css index 99e9df3a..62488286 100644 --- a/_server/css/editor_mobile.css +++ b/_server/css/editor_mobile.css @@ -12,7 +12,6 @@ html, body, div, img { body { font-family: Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;; - background-color: #F5F5F5; } /* ::-webkit-scrollbar { @@ -28,7 +27,6 @@ body { /* border-radius: 2px; box-sizing: border-box; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); */ - background-color: #F5F5F5; width: 100vw; height: 100vw; } @@ -59,7 +57,6 @@ body { font-size: 12px; font-family: 'Lucida Console', Monaco, monospace; white-space: pre; - border: 1px solid #ddd; border-radius: 2px; overflow: auto; } @@ -136,7 +133,6 @@ body { height: 180px; left: 0; bottom: 0; - border-top: 1px solid #ccc; padding: 10px 5px; margin-left: 8px;; box-sizing: border-box; @@ -150,7 +146,6 @@ body { padding: 5px 10px 10px 10px; margin-right: 0; box-sizing: border-box; - border: 1px solid #ccc; border-radius: 2px; font-size: 1rem; line-height: 1.2rem; @@ -167,20 +162,6 @@ body { margin-top: 15px; } -.input { - display: block; - max-width: 150px; - height: 20px; - padding: 6px 12px; - font-size: 14px; - margin-top: 10px; - color: #555; - background-color: #fff; - border: 1px solid #ccc; - border-radius: 3px; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} - #bgSelect { width: 50%; height: 100px; @@ -196,37 +177,6 @@ body { #printOut { margin-top: 10px; height: 20px; - -} - -.btn { - width: 80px; - border-radius: 2px; - line-height: 30px; - margin: 0; - min-width: 50px; - padding: 0 5px; - display: inline-block; - margin-top: 5px; - font-size: 14px; - font-weight: 400; - /* text-transform: uppercase; */ - letter-spacing: 0; - overflow: hidden; - cursor: pointer; - text-decoration: none; - text-align: center; - vertical-align: middle; - border: 0; - background: rgba(158, 158, 158, .2); - box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .14), 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 3px 0 rgba(0, 0, 0, .12); - color: #fff; - background-color: #26A69A; -} - -.btn:hover { - background-color: #009688; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); } #right { @@ -266,10 +216,6 @@ body { padding: 0; /* display: none; */ box-sizing: border-box; - background-color: rgba(255, 255, 255, 0.0); - border: 1px solid #000; - box-shadow: 0 0 0 2px #fff, - 0 0 0 3px #000; } #iconExpandBtn { @@ -282,24 +228,16 @@ body { } .warnText { - color: #D50000; font-weight: 700; font-size: 14px; line-height: 1.2em; } -.infoText { - color: #2196F3; -} - .successText { - color: #00897B; line-height: 1.2em; } td, .coltd, .rowtd { - border: 0.230vw solid #fff; - color: #fff; cursor: crosshair; } @@ -310,11 +248,6 @@ table.col, div.col { border-collapse: collapse; } -table.col td, -div.col .coltd { - background-color: #4DB6AC; -} - #arrColMark td { width: 16px; } @@ -358,7 +291,6 @@ div.col .coltd { height: 96vw; width: 7.384615vw; z-index: 100; - background-color: rgba(38, 166, 154, .5); } table.row,div.row, @@ -370,11 +302,6 @@ table.row,div.row .rowtext { border-collapse: collapse; } -table.row td, -div.row .rowtd .rowtext{ - background-color: #4C221B; -} - #arrRowMark { top: 5px; left: 0; @@ -415,13 +342,10 @@ div.row .rowtd .rowtext{ height: 7.384615vw; width: 96vw; z-index: 100; - background-color: rgba(76, 34, 27, .5); } #menuDiv * { margin: 0; padding: 0; } #midMenu{ - background: #fff; - border-color: #ccc #666 #666 #ccc; border-style: solid; border-width: 1px; cursor: default; @@ -438,7 +362,6 @@ div.row .rowtd .rowtext{ border-radius: 4px; } #midMenu .menuitem{ - color: #000; font: normal 2.5vw Arial, sans-serif; list-style: none; margin: 0; @@ -450,22 +373,15 @@ div.row .rowtd .rowtext{ /* padding-right: 20px; */ } #midMenu .menuitem:hover{ - background-color: #d6e9f8; - border-color: #d6e9f8; border-style: dotted; border-width: 1px 0; padding-bottom: 3px; padding-top: 3px; } #midMenu .menuitem-content{ - color: #000; font: normal 2.5vw Arial, sans-serif; } -textarea[disabled] { - color: #999999; -} - #down{ position: absolute; left:0; @@ -481,9 +397,7 @@ textarea[disabled] { z-index: 240; padding: 4px 6px; margin-top: 6px; - background-color: #F5F5F5; box-sizing: border-box; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); } #colorPicker { @@ -499,7 +413,6 @@ textarea[disabled] { position: fixed; top: 0; left: 0; - background: rgba(127,127,127,0.6); z-index: 2000 } @@ -508,7 +421,6 @@ textarea[disabled] { top: 50%; left: 0; transform: translateY(-50%); - background: white; width: 100vw; } @@ -570,8 +482,4 @@ textarea[disabled] { padding: 0; /* display: none; */ box-sizing: border-box; - background-color: rgba(255, 255, 255, 0.0); - border: 1px solid #000; - box-shadow: 0 0 0 2px #fff, - 0 0 0 3px #000; -} \ No newline at end of file +} diff --git a/_server/css/editor_mode.css b/_server/css/editor_mode.css index 0db6dc94..2e1a3425 100644 --- a/_server/css/editor_mode.css +++ b/_server/css/editor_mode.css @@ -1,10 +1,6 @@ .leftTab { border-radius: 2px; box-sizing: border-box; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); -} - -.leftTab { overflow: auto; position: absolute; bottom: 0; @@ -42,16 +38,13 @@ #appendPicSelection span { position: absolute; font-size: 11px; - -webkit-text-stroke: 1px red; - text-shadow: black 1px 0, black 0 1px, black -1px 0, black 0 -1px; -} + } #left6 { left: 5px; top: 5px; z-index: 200; position: fixed; - background-color: rgb(245, 245, 245); width: 100%; height: 100%; overflow: hidden; @@ -68,7 +61,6 @@ } #left6 .CodeMirror { - border: 1px solid #eee; float: left; height: 95%; width: 35%; @@ -86,7 +78,6 @@ top: 5px; z-index: 200; position: fixed; - background-color: rgb(245, 245, 245); width: 100%; height: 100%; } @@ -94,15 +85,12 @@ #left7 .CodeMirror { /* border-top: 1px solid black; border-bottom: 1px solid black; */ - border: 1px solid #eee; font-size: 14px; height: 95%; width: 95%; } -.etable table, -.etable table td { - color: #000; +.etable table, .etable table td { cursor: auto; } @@ -131,16 +119,6 @@ .etable table th, .etable table td { padding: 5px; - border: 1px solid #dfe2e5; -} - -.etable table tr { - background-color: #fff; - border-top: 1px solid #c6cbd1; -} - -.etable table tr:nth-child(2n) { - background-color: #f6f8fa; } /* copy end --------------------------------------------- */ @@ -170,17 +148,6 @@ overflow: visible; } -.etable tr:not(:first-child) > :nth-child(3):hover { - border: 1px solid rgb(87, 198, 232); - box-shadow: 0px 0px 3px rgb(87, 198, 232); -} - -.etable tr:not(:first-child) > :nth-child(2):hover, -.etable tr:not(:first-child) > :nth-child(1):hover { - border: 1px solid rgb(87, 232, 198); - box-shadow: 0px 0px 3px rgb(87, 232, 198); -} - .etable tr:not(:first-child) > :nth-child(3) { margin: 0; padding: 0; @@ -212,7 +179,6 @@ div.checkboxSet { padding: 0; height: 100%; width: 100%; - background-color: rgba(255, 255, 255, 0); border: none; } diff --git a/_server/css/editor_mode_mobile.css b/_server/css/editor_mode_mobile.css index 423a85ba..060da8d3 100644 --- a/_server/css/editor_mode_mobile.css +++ b/_server/css/editor_mode_mobile.css @@ -1,8 +1,4 @@ .leftTab { - /* border-radius: 2px; - box-sizing: border-box; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); */ - background-color: #F5F5F5; width: 100vw; height: 100vw; } @@ -44,8 +40,6 @@ #appendPicSelection span { position: absolute; font-size: 11px; - -webkit-text-stroke: 1px red; - text-shadow: black 1px 0, black 0 1px, black -1px 0, black 0 -1px; } #left6 { @@ -53,7 +47,6 @@ top: 0; z-index: 200; position: fixed; - background-color: rgb(245, 245, 245); width: 100%; height: 100%; overflow: hidden; @@ -75,8 +68,6 @@ } #left6 .CodeMirror { - border: 1px solid #eee; - height: 38vw; width: 100%; } @@ -100,15 +91,11 @@ top: 0; z-index: 200; position: fixed; - background-color: rgb(245, 245, 245); width: 100%; height: 100%; } #left7 .CodeMirror { - /* border-top: 1px solid black; - border-bottom: 1px solid black; */ - border: 1px solid #eee; font-size: 14px; height: 95%; width: 95%; @@ -116,7 +103,6 @@ .etable table, .etable table td { - color: #000; cursor: auto; } @@ -145,16 +131,6 @@ .etable table th, .etable table td { padding: 5px; - border: 1px solid #dfe2e5; -} - -.etable table tr { - background-color: #fff; - border-top: 1px solid #c6cbd1; -} - -.etable table tr:nth-child(2n) { - background-color: #f6f8fa; } /* copy end --------------------------------------------- */ @@ -184,17 +160,6 @@ overflow: visible; } -.etable tr:not(:first-child) > :nth-child(3):hover { - border: 1px solid rgb(87, 198, 232); - box-shadow: 0px 0px 3px rgb(87, 198, 232); -} - -.etable tr:not(:first-child) > :nth-child(2):hover, -.etable tr:not(:first-child) > :nth-child(1):hover { - border: 1px solid rgb(87, 232, 198); - box-shadow: 0px 0px 3px rgb(87, 232, 198); -} - .etable tr:not(:first-child) > :nth-child(3) { margin: 0; padding: 0; diff --git a/_server/editor_blockly.js b/_server/editor_blockly.js index 8b9e4cea..162b3fcb 100644 --- a/_server/editor_blockly.js +++ b/_server/editor_blockly.js @@ -147,7 +147,8 @@ editor_blockly = function () { editor_blockly.highlightParse = function (shouldHighLight) { if (shouldNotifyParse == shouldHighLight) return; shouldNotifyParse = shouldHighLight; - blocklyParseBtn.style.background = shouldNotifyParse ? '#ffd700' : 'unset'; + if (shouldHighLight) blocklyParseBtn.classList.add('highlight'); + else blocklyParseBtn.classList.remove('highlight'); } editor_blockly.cancel = function () { @@ -689,51 +690,8 @@ editor_blockly = function () { editor_blockly.completeItems = []; - editor_blockly.setTheme=function (theme) { - var blocklyAddtionStyleNode; - blocklyAddtionStyleNode=document.getElementById('blocklyAddtionStyleNode_jxzdiv2v376fvcw7v') - if (blocklyAddtionStyleNode==null) { - blocklyAddtionStyleNode=document.createElement('style') - blocklyAddtionStyleNode.setAttribute('id','blocklyAddtionStyleNode_jxzdiv2v376fvcw7v') - document.head.appendChild(blocklyAddtionStyleNode) - var updateColour = Blockly.BlockSvg.prototype.updateColour - var setShadowColour_ = Blockly.BlockSvg.prototype.setShadowColour_ - var setBorderColour_ = Blockly.BlockSvg.prototype.setBorderColour_ - } - - if (theme==='light') { - blocklyAddtionStyleNode.innerHTML=`` - Blockly.BlockSvg.prototype.updateColour=updateColour - Blockly.BlockSvg.prototype.setShadowColour_=setShadowColour_ - Blockly.BlockSvg.prototype.setBorderColour_=setBorderColour_ - } - if (theme=='dark') { - - // 改这个调整方块黑的程度 0~1, 越大越黑 - var globalScale=0.1 - - blocklyAddtionStyleNode.innerHTML=` - - .blocklySvg { - background-color: #000; - } - - .blocklyNonEditableText>rect, .blocklyEditableText>rect { - fill: #000; - fill-opacity: .4; - } - - .blocklyNonEditableText>text, .blocklyEditableText>text { - fill: #fff; - } - - input.blocklyHtmlInput { - color: white; - background-color: black; - } - ` - - + editor_blockly.setDarkScale=function (globalScale) { + if (globalScale > 0) { Blockly.BlockSvg.prototype.updateColour = function() { if (this.disabled) { // Disabled blocks don't have colour. @@ -744,19 +702,19 @@ editor_blockly = function () { var colourTertiary = this.getColourTertiary(); var rgb = goog.color.darken(goog.color.hexToRgb(hexColour),globalScale); hexColour = goog.color.rgbArrayToHex(rgb); - + if (this.isShadow()) { hexColour = this.setShadowColour_(rgb, colourSecondary); } else { this.setBorderColour_(rgb, colourTertiary); } this.svgPath_.setAttribute('fill', hexColour); - + var icons = this.getIcons(); for (var i = 0; i < icons.length; i++) { icons[i].updateColour(); } - + // Bump every dropdown to change its colour. // TODO (#1456) for (var x = 0, input; input = this.inputList[x]; x++) { @@ -765,8 +723,7 @@ editor_blockly = function () { } } } - ; - + Blockly.BlockSvg.prototype.setShadowColour_ = function(a, b) { if (b) { this.svgPathLight_.style.display = "none"; @@ -780,8 +737,7 @@ editor_blockly = function () { this.svgPathDark_.setAttribute("fill", c); return c } - ; - + Blockly.BlockSvg.prototype.setBorderColour_ = function(a, b) { if (b) this.svgPathLight_.setAttribute("stroke", "none"), @@ -795,12 +751,14 @@ editor_blockly = function () { this.svgPathDark_.setAttribute("fill", d); this.svgPath_.setAttribute("stroke", "none") } + } - ; - } } + var computedStyle = window.getComputedStyle(document.getElementById('blocklyDarkScale')) || {}; + editor_blockly.setDarkScale(parseFloat(computedStyle.opacity) || 0); + return editor_blockly; } diff --git a/_server/editor_mappanel.js b/_server/editor_mappanel.js index 4fcafd0a..5f4b483b 100644 --- a/_server/editor_mappanel.js +++ b/_server/editor_mappanel.js @@ -816,12 +816,12 @@ editor_mappanel_wrapper = function (editor) { editor.uifunctions.highlightSaveFloorButton=function(){ var saveFloor = document.getElementById('saveFloor'); - saveFloor.style.background='#ffd700'; + saveFloor.classList.add('highlight'); } editor.uifunctions.unhighlightSaveFloorButton=function(){ var saveFloor = document.getElementById('saveFloor'); - saveFloor.style.background=''; + saveFloor.classList.remove('highlight'); } editor.uifunctions.saveFloor_func = function () { diff --git a/_server/editor_table.js b/_server/editor_table.js index f448f1cb..636d9667 100644 --- a/_server/editor_table.js +++ b/_server/editor_table.js @@ -53,9 +53,9 @@ editor_table_wrapper = function (editor) { var list = []; if (showComment) list.push(""); if (type != 'select' && type != 'checkbox' && type != 'checkboxSet' && type != 'popCheckboxSet' && type != 'disable') - list.push(""); + list.push(""); if (type == 'popCheckboxSet') - list.push(""); + list.push(""); if (type == 'disable') list.push(""); return list.join(' '); } @@ -74,7 +74,7 @@ editor_table_wrapper = function (editor) { ---- ---- ${field} - + \n` } diff --git a/_server/editor_ui.js b/_server/editor_ui.js index d42c9b42..8c053067 100644 --- a/_server/editor_ui.js +++ b/_server/editor_ui.js @@ -930,7 +930,7 @@ editor_ui_wrapper = function (editor) { if (index % 3 == 0) { table += ''; } - table += `${prefixStrings[index]}= 0? 'checked' : ''}/>`; + table += `${prefixStrings[index]}= 0? 'checked' : ''}/>`; if (index % 3 == 2) { table += ''; } diff --git a/_server/thirdparty/awesomplete.css b/_server/thirdparty/awesomplete.css index ed09e453..38d94beb 100644 --- a/_server/thirdparty/awesomplete.css +++ b/_server/thirdparty/awesomplete.css @@ -24,7 +24,6 @@ list-style: none; padding: 0; margin: 0; - background: #fff; } .awesomplete > ul:empty { @@ -34,10 +33,6 @@ .awesomplete > ul { border-radius: .3em; margin: .8em 0 0; - background: hsla(0,0%,100%,.9); - background: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8)); - border: 1px solid rgba(0,0,0,.3); - box-shadow: .05em .2em .6em rgba(0,0,0,.2); text-shadow: none; } @@ -64,7 +59,6 @@ left: 1em; width: 0; height: 0; padding: .4em; - background: white; border: inherit; border-right: 0; border-bottom: 0; @@ -78,26 +72,3 @@ cursor: pointer; word-break: keep-all; } - -.awesomplete > ul > li:hover { - background: hsl(200, 40%, 80%); - color: black; -} - -.awesomplete > ul > li[aria-selected="true"] { - background: hsl(205, 40%, 40%); - color: white; -} - -.awesomplete mark { - background: hsl(65, 100%, 50%); -} - -.awesomplete li:hover mark { - background: hsl(68, 100%, 41%); -} - -.awesomplete li[aria-selected="true"] mark { - background: hsl(86, 100%, 21%); - color: inherit; -} diff --git a/editor-mobile.html b/editor-mobile.html index 4f0fd2ad..cf336fdb 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -7,6 +7,7 @@ + @@ -225,6 +226,7 @@
+
diff --git a/editor.html b/editor.html index 77b345f7..0278c18a 100644 --- a/editor.html +++ b/editor.html @@ -6,6 +6,7 @@ + @@ -220,6 +221,7 @@
+