diff --git a/CHANGELOG.md b/CHANGELOG.md index 19c0b9ff..bea59a83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ # KityMinder 更新日志 +## v1.3.5 + +### 功能更新 + +1. 支持 Markdown 格式导入和导出 + +### 问题修复 + +1. 修复备注在分享页面不能查看的问题 +2. 修复字体颜色修改不能撤销的问题 + ## v1.3.4 ### 功能更新 @@ -142,7 +153,7 @@ 7. 可指定放大缩小的百分比 -## 问题修复 +### 问题修复 1. 修复当滚动鼠标滚轮时,光标不跟着移动的问题 2. 优化了拖拽节点操作体验 diff --git a/Gruntfile.js b/Gruntfile.js index 1a7be5f9..a991db0f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -66,7 +66,7 @@ module.exports = function(grunt) { // Metadata. pkg: grunt.file.readJSON('package.json'), - clean: ['dist', 'native-support/upload', 'native-support/src/tmp'], + clean: ['dist', 'native-support/upload/', 'native-support/src/tmp/'], concat: concatConfigs, diff --git a/import.js b/import.js index f16517a5..0d3c0ed9 100755 --- a/import.js +++ b/import.js @@ -129,6 +129,7 @@ { path: 'src/protocol/freemind.js', pack: 'edit' }, { path: 'src/protocol/mindmanager.js', pack: 'edit' }, { path: 'src/protocol/plain.js', pack: 'edit|share|m-share' }, + { path: 'src/protocol/markdown.js', pack: 'edit|share|m-share' }, { path: 'src/protocol/json.js', pack: 'edit|share|m-share' }, { path: 'src/protocol/png.js', pack: 'edit|share|m-share' }, { path: 'src/protocol/svg.js', pack: 'edit|share|m-share' }, @@ -138,6 +139,7 @@ { path: 'ui/eve.js', pack: 'edit|share|m-share' }, { path: 'ui/memory.js', pack: 'edit|share|m-share' }, { path: 'ui/fuix.js', pack: 'edit|share|m-share' }, + { path: 'ui/axss.js', pack: 'edit|share|m-share' }, { path: 'ui/fiox.js', pack: 'edit' }, /* UI 组件 */ @@ -211,6 +213,7 @@ { path: 'ui/ribbon/idea/link.js', pack: 'edit' }, { path: 'ui/ribbon/idea/image.js', pack: 'edit' }, { path: 'ui/ribbon/idea/note.js', pack: 'edit' }, + { path: 'ui/ribbon/idea/notepreview.js', pack: 'edit|share' }, { path: 'ui/ribbon/idea/priority.js', pack: 'edit' }, { path: 'ui/ribbon/idea/progress.js', pack: 'edit' }, { path: 'ui/ribbon/idea/resource.js', pack: 'edit' }, diff --git a/lang/zh-cn/zh-cn.js b/lang/zh-cn/zh-cn.js index d1e41d40..6b242fdf 100755 --- a/lang/zh-cn/zh-cn.js +++ b/lang/zh-cn/zh-cn.js @@ -8,7 +8,9 @@ KityMinder.LANG['zh-cn'] = { }, 'theme': { 'classic': '脑图经典', + 'classic-compact': '紧凑经典', 'snow': '温柔冷光', + 'snow-compact': '紧凑冷光', 'fish': '鱼骨图', 'wire': '线框', 'fresh-red': '清新红', diff --git a/lib/kity b/lib/kity index 36b51b09..1275889d 160000 --- a/lib/kity +++ b/lib/kity @@ -1 +1 @@ -Subproject commit 36b51b090c28d9d362f00e1023fcb3dc6317585d +Subproject commit 1275889df5d47e4e6c23112d65859ca39c45ca98 diff --git a/package.json b/package.json index 3416bde2..84168e0b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "kityminder", "title": "kityminder", "description": "Kity Minder", - "version": "1.3.4", + "version": "1.3.5", "homepage": "https://github.com/fex-team/kityminder", "author": { "name": "f-cube @ FEX", diff --git a/src/core/kityminder.js b/src/core/kityminder.js index 53373f8c..94801197 100644 --- a/src/core/kityminder.js +++ b/src/core/kityminder.js @@ -3,7 +3,7 @@ var KityMinder = window.KM = window.KityMinder = function() { instanceId = 0, uuidMap = {}; return { - version: '1.3.4', + version: '1.3.5', uuid: function(name) { name = name || 'unknown'; uuidMap[name] = uuidMap[name] || 0; diff --git a/src/module/expand.js b/src/module/expand.js index c48faa4e..fbed8f19 100644 --- a/src/module/expand.js +++ b/src/module/expand.js @@ -72,7 +72,8 @@ KityMinder.registerModule('Expand', function() { if (node.getLevel() == level) node.collapse(); }); km.refresh(100); - } + }, + enableReadOnly: true }); var Expander = kity.createClass('Expander', { diff --git a/src/module/font.js b/src/module/font.js index 726b460f..cb8639fc 100644 --- a/src/module/font.js +++ b/src/module/font.js @@ -12,11 +12,9 @@ KityMinder.registerModule("fontmodule", function() { var fontFamily = getNodeDataOrStyle(node, 'font-family'); var fontSize = getNodeDataOrStyle(node, 'font-size'); var fontHash = [fontFamily, fontSize].join('/'); - - if (foreColor.toString() != node.getTmpData('fore-color')) { - textGroup.fill(foreColor); - node.setTmpData('fore-color', foreColor.toString()); - } + + textGroup.fill(foreColor); + node.setTmpData('fore-color', foreColor.toString()); textGroup.eachItem(function(index,item){ item.setFont({ diff --git a/src/protocol/markdown.js b/src/protocol/markdown.js new file mode 100644 index 00000000..d8fe5c5c --- /dev/null +++ b/src/protocol/markdown.js @@ -0,0 +1,168 @@ +/** + * @fileOverview + * + * Markdown 格式导入导出支持 + * + * @author: techird + * @copyright: Baidu FEX, 2014 + */ + +KityMinder.registerProtocol('markdown', function() { + var LINE_ENDING_SPLITER = /\r\n|\r|\n/; + var EMPTY_LINE = ''; + var NOTE_MARK_START = ''; + var NOTE_MARK_CLOSE = ''; + + function encode(json) { + + return _build(json, 1).join('\n'); + } + + function _build(node, level) { + var lines = []; + + level = level || 1; + + var sharps = _generateHeaderSharp(level); + lines.push(sharps + ' ' + node.data.text); + lines.push(EMPTY_LINE); + + var note = node.data.note; + if (note) { + var hasSharp = /^#/.test(note); + if (hasSharp) { + lines.push(NOTE_MARK_START); + note = note.replace(/^#+/gm, function($0) { + return sharps + $0; + }); + } + lines.push(note); + if (hasSharp) { + lines.push(NOTE_MARK_CLOSE); + } + lines.push(EMPTY_LINE); + } + + if (node.children) node.children.forEach(function(child) { + lines = lines.concat(_build(child, level + 1)); + }); + + return lines; + } + + function _generateHeaderSharp(level) { + var sharps = ''; + while(level--) sharps += '#'; + return sharps; + } + + function decode(markdown) { + + var json, + parentMap = {}, + lines, line, lineInfo, level, node, parent, noteProgress, codeBlock; + + // 一级标题转换 `{title}\n===` => `# {title}` + markdown = markdown.replace(/^(.+)\n={3,}/, function($0, $1) { + return '# ' + $1; + }); + + lines = markdown.split(LINE_ENDING_SPLITER); + + // 按行分析 + for (var i = 0; i < lines.length; i++) { + line = lines[i]; + + lineInfo = _resolveLine(line); + + // 备注标记处理 + if (lineInfo.noteClose) { + noteProgress = false; + continue; + } else if (lineInfo.noteStart) { + noteProgress = true; + continue; + } + + // 代码块处理 + codeBlock = lineInfo.codeBlock ? !codeBlock : codeBlock; + + // 备注条件:备注标签中,非标题定义,或标题越位 + if (noteProgress || codeBlock || !lineInfo.level || lineInfo.level > level + 1) { + if (node) _pushNote(node, line); + continue; + } + + // 标题处理 + level = lineInfo.level; + node = _initNode(lineInfo.content, parentMap[level - 1]); + parentMap[level] = node; + } + + _cleanUp(parentMap[1]); + return parentMap[1]; + } + + function _initNode(text, parent) { + var node = { + data: { + text: text, + note: '' + } + }; + if (parent) { + if (parent.children) parent.children.push(node); + else parent.children = [node]; + } + return node; + } + + function _pushNote(node, line) { + node.data.note += line + '\n'; + } + + function _isEmpty(line) { + return !/\S/.test(line); + } + + function _resolveLine(line) { + var match = /^(#+)?\s*(.*)$/.exec(line); + return { + level: match[1] && match[1].length || null, + content: match[2], + noteStart: line == NOTE_MARK_START, + noteClose: line == NOTE_MARK_CLOSE, + codeBlock: /^\s*```/.test(line) + }; + } + + function _cleanUp(node) { + if (!/\S/.test(node.data.note)) { + node.data.note = null; + delete node.data.note; + } else { + var notes = node.data.note.split('\n'); + while(notes.length && !/\S/.test(notes[0])) notes.shift(); + while(notes.length && !/\S/.test(notes[notes.length - 1])) notes.pop(); + node.data.note = notes.join('\n'); + } + if (node.children) node.children.forEach(_cleanUp); + } + + return { + fileDescription: 'Markdown/GFM 格式', + fileExtension: '.md', + mineType: 'text/markdown', + dataType: 'text', + + encode: function(json) { + return encode(json); + }, + + decode: function(markdown) { + return decode(markdown); + }, + + recognizePriority: -1 + }; +}); \ No newline at end of file diff --git a/src/theme/default.js b/src/theme/default.js index 967c3ce0..1f24044c 100644 --- a/src/theme/default.js +++ b/src/theme/default.js @@ -1,57 +1,61 @@ -KityMinder.registerTheme('classic', { - 'background': '#3A4144 url(ui/theme/default/images/grid.png) repeat', - - 'root-color': '#430', - 'root-background': '#e9df98', - 'root-stroke': '#e9df98', - 'root-font-size': 24, - 'root-padding': [15, 25], - 'root-margin': [30, 100], - 'root-radius': 30, - 'root-space': 10, - 'root-shadow': 'rgba(0, 0, 0, .25)', - - 'main-color': '#333', - 'main-background': '#a4c5c0', - 'main-stroke': '#a4c5c0', - 'main-font-size': 16, - 'main-padding': [6, 20], - 'main-margin': 20, - 'main-radius': 10, - 'main-space': 5, - 'main-shadow': 'rgba(0, 0, 0, .25)', - - 'sub-color': 'white', - 'sub-background': 'transparent', - 'sub-stroke': 'none', - 'sub-font-size': 12, - 'sub-padding': [5, 10], - 'sub-margin': [15, 20], - 'sub-tree-margin': 30, - 'sub-radius': 5, - 'sub-space': 5, - - 'connect-color': 'white', - 'connect-width': 2, - 'main-connect-width': 3, - 'connect-radius': 5, - - 'selected-background': 'rgb(254, 219, 0)', - 'selected-stroke': 'rgb(254, 219, 0)', - 'selected-color': 'black', - - 'marquee-background': 'rgba(255,255,255,.3)', - 'marquee-stroke': 'white', - - 'drop-hint-color': 'yellow', - 'sub-drop-hint-width': 2, - 'main-drop-hint-width': 4, - 'root-drop-hint-width': 4, - - 'order-hint-area-color': 'rgba(0, 255, 0, .5)', - 'order-hint-path-color': '#0f0', - 'order-hint-path-width': 1, - - 'text-selection-color': 'rgb(27,171,255)', - 'line-height':1.5 +['classic', 'classic-compact'].forEach(function(name) { + var compact = name == 'classic-compact'; + + KityMinder.registerTheme(name, { + 'background': '#3A4144 url(ui/theme/default/images/grid.png) repeat', + + 'root-color': '#430', + 'root-background': '#e9df98', + 'root-stroke': '#e9df98', + 'root-font-size': 24, + 'root-padding': compact ? [10, 25] : [15, 25], + 'root-margin': compact ? [15, 25] : [30, 100], + 'root-radius': 30, + 'root-space': 10, + 'root-shadow': 'rgba(0, 0, 0, .25)', + + 'main-color': '#333', + 'main-background': '#a4c5c0', + 'main-stroke': '#a4c5c0', + 'main-font-size': 16, + 'main-padding': compact ? [5, 15] : [6, 20], + 'main-margin': compact ? [5, 10] : 20, + 'main-radius': 10, + 'main-space': 5, + 'main-shadow': 'rgba(0, 0, 0, .25)', + + 'sub-color': 'white', + 'sub-background': 'transparent', + 'sub-stroke': 'none', + 'sub-font-size': 12, + 'sub-padding': [5, 10], + 'sub-margin': compact ? [5, 10] : [15, 20], + 'sub-tree-margin': 30, + 'sub-radius': 5, + 'sub-space': 5, + + 'connect-color': 'white', + 'connect-width': 2, + 'main-connect-width': 3, + 'connect-radius': 5, + + 'selected-background': 'rgb(254, 219, 0)', + 'selected-stroke': 'rgb(254, 219, 0)', + 'selected-color': 'black', + + 'marquee-background': 'rgba(255,255,255,.3)', + 'marquee-stroke': 'white', + + 'drop-hint-color': 'yellow', + 'sub-drop-hint-width': 2, + 'main-drop-hint-width': 4, + 'root-drop-hint-width': 4, + + 'order-hint-area-color': 'rgba(0, 255, 0, .5)', + 'order-hint-path-color': '#0f0', + 'order-hint-path-width': 1, + + 'text-selection-color': 'rgb(27,171,255)', + 'line-height':1.5 + }); }); \ No newline at end of file diff --git a/src/theme/snow.js b/src/theme/snow.js index 31226463..f871aa15 100644 --- a/src/theme/snow.js +++ b/src/theme/snow.js @@ -1,53 +1,59 @@ -KityMinder.registerTheme('snow', { - 'background': '#3A4144 url(ui/theme/default/images/grid.png) repeat', - - 'root-color': '#430', - 'root-background': '#e9df98', - 'root-stroke': '#e9df98', - 'root-font-size': 24, - 'root-padding': [15, 25], - 'root-margin': 30, - 'root-radius': 5, - 'root-space': 10, - 'root-shadow': 'rgba(0, 0, 0, .25)', - - 'main-color': '#333', - 'main-background': '#a4c5c0', - 'main-stroke': '#a4c5c0', - 'main-font-size': 16, - 'main-padding': [6, 20], - 'main-margin': [20, 40], - 'main-radius': 5, - 'main-space': 5, - 'main-shadow': 'rgba(0, 0, 0, .25)', - - 'sub-color': 'black', - 'sub-background': 'white', - 'sub-stroke': 'white', - 'sub-font-size': 12, - 'sub-padding': [5, 10], - 'sub-margin': [10, 20], - 'sub-radius': 5, - 'sub-space': 5, - - 'connect-color': 'white', - 'connect-width': 2, - 'main-connect-width': 3, - 'connect-radius': 5, - - 'selected-background': 'rgb(254, 219, 0)', - 'selected-stroke': 'rgb(254, 219, 0)', - - 'marquee-background': 'rgba(255,255,255,.3)', - 'marquee-stroke': 'white', - - 'drop-hint-color': 'yellow', - 'drop-hint-width': 4, - - 'order-hint-area-color': 'rgba(0, 255, 0, .5)', - 'order-hint-path-color': '#0f0', - 'order-hint-path-width': 1, - - 'text-selection-color': 'rgb(27,171,255)', - 'line-height':1.5 + + +['snow', 'snow-compact'].forEach(function(name) { + var compact = name == 'snow-compact'; + + KityMinder.registerTheme(name, { + 'background': '#3A4144 url(ui/theme/default/images/grid.png) repeat', + + 'root-color': '#430', + 'root-background': '#e9df98', + 'root-stroke': '#e9df98', + 'root-font-size': 24, + 'root-padding': compact ? [5, 10] : [15, 25], + 'root-margin': compact ? 15 : 30, + 'root-radius': 5, + 'root-space': 10, + 'root-shadow': 'rgba(0, 0, 0, .25)', + + 'main-color': '#333', + 'main-background': '#a4c5c0', + 'main-stroke': '#a4c5c0', + 'main-font-size': 16, + 'main-padding': compact ? [4, 10] : [6, 20], + 'main-margin': compact ? [5, 10] : [20, 40], + 'main-radius': 5, + 'main-space': 5, + 'main-shadow': 'rgba(0, 0, 0, .25)', + + 'sub-color': 'black', + 'sub-background': 'white', + 'sub-stroke': 'white', + 'sub-font-size': 12, + 'sub-padding': [5, 10], + 'sub-margin': compact ? [5, 10] : [10, 20], + 'sub-radius': 5, + 'sub-space': 5, + + 'connect-color': 'white', + 'connect-width': 2, + 'main-connect-width': 3, + 'connect-radius': 5, + + 'selected-background': 'rgb(254, 219, 0)', + 'selected-stroke': 'rgb(254, 219, 0)', + + 'marquee-background': 'rgba(255,255,255,.3)', + 'marquee-stroke': 'white', + + 'drop-hint-color': 'yellow', + 'drop-hint-width': 4, + + 'order-hint-area-color': 'rgba(0, 255, 0, .5)', + 'order-hint-path-color': '#0f0', + 'order-hint-path-width': 1, + + 'text-selection-color': 'rgb(27,171,255)', + 'line-height':1.5 + }); }); \ No newline at end of file diff --git a/ui/axss.js b/ui/axss.js new file mode 100644 index 00000000..d30d19d9 --- /dev/null +++ b/ui/axss.js @@ -0,0 +1,22 @@ +/** + * @fileOverview + * + * XSS Protection + * + * @author: techird + * @copyright: Baidu FEX, 2014 + */ +KityMinder.registerUI('axss', function() { + function axss(value) { + var div = document.createElement('div'); + div.innerHTML = value; + $(div).find('script, iframe, link').remove(); + for (var name in div) { + if (name.indexOf('on') === 0) { + div.removeAttribute(name); + } + } + return div.innerHTML; + } + return axss; +}); \ No newline at end of file diff --git a/ui/contextmenu.js b/ui/contextmenu.js index 775f7671..8b4bc981 100644 --- a/ui/contextmenu.js +++ b/ui/contextmenu.js @@ -66,8 +66,10 @@ KityMinder.registerUI('contextmenu', function(minder) { var lastDivider = true; ctxmenu.forEach(function(item) { - if (item.query && !item.query()) return; - if (item.command && minder.queryCommandState(item.command) === 0) { + var query = item.query || function() { + return item.command && minder.queryCommandState(item.command) === 0; + }; + if (query()) { var label = minder.getLang('ui.command.' + item.command); diff --git a/ui/ribbon/idea/note.js b/ui/ribbon/idea/note.js index 2dfcfbca..50c52b79 100644 --- a/ui/ribbon/idea/note.js +++ b/ui/ribbon/idea/note.js @@ -8,8 +8,10 @@ */ /* global marked: true */ KityMinder.registerUI('ribbon/idea/note', function(minder) { + var axss = minder.getUI('axss'); marked.setOptions({ + gfm: true, breaks: true }); @@ -47,8 +49,6 @@ KityMinder.registerUI('ribbon/idea/note', function(minder) { var $editor = $('
').appendTo($notePanel); var $preview = $('
').appendTo($notePanel); - var $previewer = $('
').appendTo('#content-wrapper'); - var noteVisible = false; $editor.on('keydown keyup keypress mouedown mouseup click contextmenu', function(e) { @@ -68,18 +68,6 @@ KityMinder.registerUI('ribbon/idea/note', function(minder) { var visible = false; var selectedNode = null; - function axss(value) { - var div = document.createElement('div'); - div.innerHTML = value; - $(div).find('script').remove(); - for (var name in div) { - if (name.indexOf('on') === 0) { - div.removeAttribute(name); - } - } - return div.innerHTML; - } - function updateEditorView() { if (noteVisible && selectedNode != minder.getSelectedNode()) { selectedNode = minder.getSelectedNode(); @@ -95,7 +83,7 @@ KityMinder.registerUI('ribbon/idea/note', function(minder) { } if ($previewTab.hasClass(activeTabClass)) { - $preview.html(marked(note)); + $preview.html(axss(marked(note))); } } } @@ -111,48 +99,10 @@ KityMinder.registerUI('ribbon/idea/note', function(minder) { $noteButtonMenu.bindCommandState(minder, 'note'); $noteButtonMenu.on('buttonclick', show); minder.on('editnoterequest', show); - minder.on('shownoterequest', preview); - $('#kityminder').after($notePanel); hide(); - var previewLive = false; - $('#kityminder').on('mousedown mousewheel DOMMouseScroll', function() { - if (!previewLive) return; - $previewer.fadeOut(); - previewLive = false; - }); - - $previewer.hide(); - function preview(e) { - var icon = e.icon; - var node = e.node; - var b = icon.getRenderBox('screen'); - var note = node.getData('note'); - - $previewer.html(marked(axss(note))); - - var cw = $('#content-wrapper').width(); - var ch = $('#content-wrapper').height(); - var pw = $previewer.outerWidth(); - var ph = $previewer.outerHeight(); - - var x = b.cx - pw / 2; - var y = b.bottom + 10; - - if (x < 0) x = 10; - if (x + pw > cw) x = cw - pw - 10; - if (y + ph > ch) y = b.top - ph - 10; - - $previewer.css({ - left: Math.round(x), - top: Math.round(y) - }); - $previewer.show(); - previewLive = true; - } - var activeTabClass = 'active-tab'; function editMode() { @@ -169,7 +119,7 @@ KityMinder.registerUI('ribbon/idea/note', function(minder) { $editor.hide(); $editTab.removeClass(activeTabClass); - $preview.html(marked(axss(editor.getValue()))).show(); + $preview.html(axss(marked(editor.getValue()))).show(); $previewTab.addClass(activeTabClass); } diff --git a/ui/ribbon/idea/notepreview.js b/ui/ribbon/idea/notepreview.js new file mode 100644 index 00000000..63b0cc5a --- /dev/null +++ b/ui/ribbon/idea/notepreview.js @@ -0,0 +1,63 @@ +/** + * @fileOverview + * + * 节点笔记支持 + * + * @author: techird + * @copyright: Baidu FEX, 2014 + */ +/* global marked: true */ +KityMinder.registerUI('ribbon/idea/note', function(minder) { + var axss = minder.getUI('axss'); + + marked.setOptions({ + gfm: true, + breaks: true + }); + + var $previewer = $('
').appendTo('#content-wrapper'); + + var visible = false; + var selectedNode = null; + + minder.on('shownoterequest', preview); + + var previewLive = false; + $('#kityminder').on('mousedown mousewheel DOMMouseScroll', function() { + if (!previewLive) return; + $previewer.fadeOut(); + previewLive = false; + }); + + $previewer.hide(); + function preview(e) { + var icon = e.icon; + var node = e.node; + var b = icon.getRenderBox('screen'); + var note = node.getData('note'); + + $previewer[0].scrollTop = 0; + $previewer.html(axss(marked(note))); + + var cw = $('#content-wrapper').width(); + var ch = $('#content-wrapper').height(); + var pw = $previewer.outerWidth(); + var ph = $previewer.outerHeight(); + + var x = b.cx - pw / 2; + var y = b.bottom + 10; + + if (x < 0) x = 10; + if (x + pw > cw) x = cw - pw - 10; + if (y + ph > ch) y = b.top - ph - 10; + + $previewer.css({ + left: Math.round(x), + top: Math.round(y) + }); + + $previewer.show(); + previewLive = true; + } + +}); \ No newline at end of file diff --git a/ui/theme/default/css/_note.less b/ui/theme/default/css/_note.less index 8ce2695a..8bbca8e6 100644 --- a/ui/theme/default/css/_note.less +++ b/ui/theme/default/css/_note.less @@ -1,10 +1,28 @@ .gfm-render { + + font-size: 12px; + -webkit-user-select: text; + color: #333; + line-height: 1.8em; + blockquote, ul, table, p, pre, hr { margin: 1em 0; + cursor: text; &:first-child:last-child { margin: 0; } } + + img { + max-width: 100%; + } + + a { + color: blue; + &:hover { + color: red; + } + } blockquote { display: block; @@ -51,6 +69,17 @@ word-wrap: break-word; } + code { + background: rgba(45, 141, 234, 0.1); +/* display: inline-block; */ + padding: 0 5px; + border-radius: 3px; + } + + pre code { + background: none; + } + hr { border: none; border-top: 1px solid #CCC; @@ -152,9 +181,6 @@ max-width: 400px; max-height: 200px; overflow: auto; - font-size: 12px; - color: #333; - line-height: 1.5em; z-index: 10; box-shadow: 0 0 15px rgba(0, 0, 0, .5); .gfm-render; diff --git a/ui/theme/default/css/_notice.less b/ui/theme/default/css/_notice.less index 3c6b1339..b8ed0da7 100644 --- a/ui/theme/default/css/_notice.less +++ b/ui/theme/default/css/_notice.less @@ -78,6 +78,7 @@ &.expanded { .error-detail-wrapper { display: block; + overflow: hidden; } a.expander:before { .triangle-top(#333, 10px, 5px);