diff --git a/css/base.css b/css/base.css index d702134..5799214 100644 --- a/css/base.css +++ b/css/base.css @@ -33,7 +33,7 @@ q:before, q:after {content: '';content: none;} table {border-collapse: collapse;border-spacing: 0;} .do-fn-cl { *zoom: 1; } -.do-fn-cl:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; overflow:hidden;} +.do-fn-cl:after {visibility: hidden;overflow:hidden; display: block;height: 0;content: "."; clear: both;} .do-fn-clear {clear:both;display:inline;} .do-fn-show{display:block;} diff --git a/js/lib/codemirror/htmlmixed.js b/js/lib/codemirror/htmlmixed.js index 85238d9..5452d58 100644 --- a/js/lib/codemirror/htmlmixed.js +++ b/js/lib/codemirror/htmlmixed.js @@ -1,4 +1,4 @@ -define(["./codemirror", 'css!./codemirror'], function(CodeMirror) { +define(["./codemirror", 'css!./theme-dark'], function(CodeMirror) { CodeMirror.defineMode("htmlmixed", function(config) { var htmlMode = CodeMirror.getMode(config, { name: "xml", diff --git a/js/lib/codemirror/codemirror.css b/js/lib/codemirror/theme-dark.css similarity index 100% rename from js/lib/codemirror/codemirror.css rename to js/lib/codemirror/theme-dark.css diff --git a/js/lib/codemirror/theme-light.css b/js/lib/codemirror/theme-light.css new file mode 100644 index 0000000..e8f4393 --- /dev/null +++ b/js/lib/codemirror/theme-light.css @@ -0,0 +1 @@ +.CodeMirror{height:100%;line-height:1.5;font-family:monospace;position:relative;overflow:hidden;background:#272822;color:#f8f8f2}.CodeMirror-scroll{overflow:auto;height:100%;width:100%;position:relative;outline:0}.CodeMirror-scrollbar{position:absolute;right:0;top:0;overflow-x:hidden;overflow-y:scroll;z-index:5}.CodeMirror-scrollbar-inner{width:1px}.CodeMirror-scrollbar.cm-sb-overlap{position:absolute;z-index:1;float:none;right:0;min-width:12px}.CodeMirror-scrollbar.cm-sb-nonoverlap{min-width:12px}.CodeMirror-scrollbar.cm-sb-ie7{min-width:18px}.CodeMirror-gutter{position:absolute;left:0;top:0;z-index:10;background-color:transparent;border-right:1px solid #454545;min-width:2em;height:100%}.CodeMirror-gutter-text{color:#aaa;text-align:right;padding:.4em .2em .4em .4em;white-space:pre!important;cursor:default}.CodeMirror-lines{padding:.4em;white-space:pre;cursor:text}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror textarea{outline:0!important}.CodeMirror pre.CodeMirror-cursor{z-index:10;position:absolute;visibility:hidden;border-left:1px solid #9effff;border-right:none;width:0}.cm-keymap-fat-cursor pre.CodeMirror-cursor{width:auto;border:0;background:0 0;background:rgba(0,200,0,.4);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800)}.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id){filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.CodeMirror-focused pre.CodeMirror-cursor{visibility:visible}.CodeMirror-focused div.CodeMirror-selected,div.CodeMirror-selected{background:#49483E}.CodeMirror-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-s-default span.cm-keyword{color:#f92672}.cm-s-default span.cm-atom{color:#ae81ff}.cm-s-default span.cm-number{color:#f30}.cm-s-default span.cm-def{color:#fd971f}.cm-s-default span.cm-variable{color:#f8f8f2}.cm-s-default span.cm-variable-2{color:#9effff}.cm-s-default span.cm-property,.cm-s-default span.cm-variable-3{color:#66d9ef}.cm-s-default span.cm-operator{color:#9effff}.cm-s-default span.cm-comment{color:#75715e}.cm-s-default span.cm-string{color:#e6db74}.cm-s-default span.cm-string-2{color:#f50}.cm-s-default span.cm-meta{color:#555}.cm-s-default span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-default span.cm-qualifier{color:#75d908}.cm-s-default span.cm-builtin{color:#66d9ef}.cm-s-default span.cm-bracket{color:#f8f8f2}.cm-s-default span.cm-tag{color:#f92672}.cm-s-default span.cm-attribute{color:#a6e22e}.cm-s-default span.cm-header{color:#ae81ff}.cm-s-default span.cm-quote{color:#090}.cm-s-default span.cm-hr{color:#999}.cm-s-default span.cm-link{color:#ae81ff}span.cm-header,span.cm-strong{font-weight:700}span.cm-em{font-style:italic}span.cm-emstrong{font-style:italic;font-weight:700}span.cm-link{text-decoration:underline}span.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}@media print{.CodeMirror pre.CodeMirror-cursor{visibility:hidden}} \ No newline at end of file diff --git a/js/lib/drag/drag.js b/js/lib/drag/drag.js index bb82598..0f0a871 100644 --- a/js/lib/drag/drag.js +++ b/js/lib/drag/drag.js @@ -19,7 +19,7 @@ define(['yua'], function(){ } } } - + yua.ui.drag = '0.0.1' // 元素拖动 yua.directive('drag', { priority: 1500, diff --git a/js/lib/layer.tar.gz b/js/lib/layer.tar.gz deleted file mode 100644 index d945850..0000000 Binary files a/js/lib/layer.tar.gz and /dev/null differ diff --git a/js/lib/layer/Release.md b/js/lib/layer/Release.md index 702fcc4..3d3c6d5 100644 --- a/js/lib/layer/Release.md +++ b/js/lib/layer/Release.md @@ -1,3 +1,14 @@ +v0.0.4-base / 2017-04-20 +================== + + 优化offset的处理 + + 优化样式 + + +v0.0.3-base / 2017-04-15 +================== + + 重构wrap方式创建弹窗实例的实现 + + v0.0.2-base / 2017-04-13 ================== + 修复:layer方式创建实例时,漏掉自身的bug; diff --git a/js/lib/layer/layer-base.js b/js/lib/layer/base.js similarity index 92% rename from js/lib/layer/layer-base.js rename to js/lib/layer/base.js index 729209b..7639ca3 100644 --- a/js/lib/layer/layer-base.js +++ b/js/lib/layer/base.js @@ -13,6 +13,8 @@ define(['yua', 'lib/drag', 'css!./skin/def'], function(yua){ if(window.layer){ return window.layer } + + yua.ui.layer = '0.0.4-base' var layerDom = {}, layerObj = {}, unique = null, //储存当前打开的1/2/3类型的弹窗 @@ -55,6 +57,7 @@ define(['yua', 'lib/drag', 'css!./skin/def'], function(yua){ return } layerObj[id].parentElem.replaceChild(layerObj[id].wrap, layerDom[id][1]) + layerObj[id].wrap.style.display = 'none' layerObj[id].show = false }catch(err){} @@ -220,20 +223,21 @@ define(['yua', 'lib/drag', 'css!./skin/def'], function(yua){ if(!yua.vmodels[conf]){ yua(layerObj[conf].obj.init) } - - yua.scan(layerDom[conf][1]) - layerObj[conf].obj.show() layerObj[conf].parentElem.appendChild(layerDom[conf][1]) - layerObj[conf].parentElem.replaceChild(layerDom[conf][1], layerObj[conf].wrap) + layerDom[conf][1].querySelector('.detail').appendChild(layerObj[conf].wrap) + layerObj[conf].wrap.style.display = '' + yua.scan(layerDom[conf][1]) + layerObj[conf].obj.show() return conf } }else{ return new __constructor(conf).init.$id } }, - version: '0.0.2-base' + version: yua.ui.layer }; + /*type: { // 弹窗类型对应的id值 1: 'alert', @@ -295,7 +299,7 @@ define(['yua', 'lib/drag', 'css!./skin/def'], function(yua){ } layBox.innerHTML = this.getMenubar() - + '
' + + ' __ __ _____ _ _ _\n' + + '| \\/ | ____|__| (_) |_ ___ _ __\n' + + '| |\\/| | _| / _` | | __/ _ \\| \'__|\n' + + '| | | | |__| (_| | | || (_) | |\n' + + '|_| |_|_____\\__,_|_|\\__\\___/|_| ' + + 'v' + ME.version + '' + + '
开源在线Markdown编辑器
' + + 'https://doui.cc/product/meditor
' + + 'Copyright © 2017 Yutent, The MIT License.
' + + '