diff --git a/admin/common-js.php b/admin/common-js.php index c9e69828..287e9ae1 100644 --- a/admin/common-js.php +++ b/admin/common-js.php @@ -5,7 +5,6 @@ (function () { window.addEvent('domready', function() { var _d = $(document); - var handle = new Typecho.guid('typecho:guid', {offset: 1, type: 'mouse'}); //增加高亮效果 (function () { diff --git a/admin/css/grid.source.css b/admin/css/grid.source.css index 29f6d1a5..e97847ba 100644 --- a/admin/css/grid.source.css +++ b/admin/css/grid.source.css @@ -60,7 +60,6 @@ width: 100%; display: inline; position: relative; - overflow: hidden; } /** diff --git a/admin/css/typecho.source.css b/admin/css/typecho.source.css index 4eca343c..de6da344 100644 --- a/admin/css/typecho.source.css +++ b/admin/css/typecho.source.css @@ -218,22 +218,15 @@ input, select, textarea { input[type=text], input[type=password], input.text, input.title, textarea { - background: #fff; padding: 3px; - border: 1px solid #a0a0a0; - border-bottom-color: #c4c4c4; - border-right-color: #c4c4c4; - box-shadow: inset 1px 1px #dedede, inset 2px 2px #f4f4f4; - -o-box-shadow: inset 1px 1px #dedede, inset 2px 2px #f4f4f4; - -moz-box-shadow: inset 1px 1px #dedede, inset 2px 2px #f4f4f4; - -webkit-box-shadow: inset 1px 1px #dedede, inset 2px 2px #f4f4f4; + background: #FFF; + border: 1px solid #C6C6C6; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5); } /** hack webkit border by 70 */ -input:focus, textarea:focus, select:focus { - outline: 0 !important; -} - select { font-size: 13px; padding: 1px; @@ -246,27 +239,26 @@ select { button { line-height: 22px; height: 26px; vertical-align: middle; - background-color: #f4f4f4; - font-size: 13px; - padding: 0 10px; - *padding: 0 5px; - -moz-border-radius: 13px; - -webkit-border-radius: 13px; - -khtml-border-radius: 13px; - border-radius: 13px; - cursor: pointer; - margin: 0; - border: 1px solid #AAA; - color: #333; - text-shadow: 0 1px #fff; - background: -webkit-gradient(linear, 0 0, 0 100%, from(#FFFFFF), to(#DDDDDD)); - background: -moz-linear-gradient(top, #FFFFFF, #DDDDDD); - background: -o-linear-gradient(top, #FFFFFF, #DDDDDD); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dddddd'); /* IE6,IE7 */ - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dddddd')"; + display: inline-block; + color: #666; + cursor: pointer; + text-decoration: none !important; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fcfcfc), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(#fcfcfc, #eeeeee); + background-image: -moz-linear-gradient(#fcfcfc, #eeeeee); + background-image: -o-linear-gradient(#fcfcfc, #eeeeee); + background-image: linear-gradient(#fcfcfc, #eeeeee); + border: 1px solid #bbbbbb; + border-bottom-color: #AAA; + -webkit-box-shadow: rgba(0, 0, 0, 0.12) 0 1px 2px, inset white 0 1px 0; + -moz-box-shadow: rgba(0, 0, 0, 0.12) 0 1px 2px, inset white 0 1px 0; + box-shadow: rgba(0, 0, 0, 0.12) 0 1px 2px, inset white 0 1px 0; } -button:hover { border-color: #666 } +button:hover { + background: #F6F6F6; + color: #777; +} img.avatar { padding: 2px; @@ -788,7 +780,7 @@ margin-top: 25px; border-top: none; } -#typecho-nav-list .child li:last-child { +#typecho-nav-list .child li.last { border-bottom: none; } @@ -1662,6 +1654,10 @@ ul.typecho-list-notable li #typecho-respond { border-top: 1px solid #fff; } +.typecho-page-main .typecho-option:first-child { + border-top: none; +} + .typecho-page-main .typecho-option-clear { border-bottom: 1px solid #F7FBE9; border-top: 1px solid #F7FBE9; diff --git a/admin/javascript/typecho.js b/admin/javascript/typecho.js index a43caa62..0923328f 100644 --- a/admin/javascript/typecho.js +++ b/admin/javascript/typecho.js @@ -1,97 +1,6 @@ /** 初始化全局对象 */ var Typecho = {}; -Typecho.guid = function (el, config) { - var _dl = $(el); - - if (null == _dl) { - return; - } - - var _dt = _dl.getElements('dt'); - var _dd = _dl.getElements('dd'); - var _cur = null, _timer = null, _iframe = null; - - var handle = { - reSet: function() { - /* - if (_cur) { - console.info(_cur); - //_cur.removeClass('current'); - //_cur.getNext('dd').setStyle('display', 'none'); - delete _cur; - } else { - */ - _dt.removeClass('current'); - _dd.setStyle('display', 'none'); - //} - }, - - popUp: function(el) { - el = _cur = $(el) || el; - el.addClass('current'); - var _d = el.getNext('dd'); - if (_d) { - _d.setStyle('left', el.getPosition().x - el.getParent('dl').getPosition().x - config.offset); - if (_d.getStyle('display') != 'none') { - _d.setStyle('display', 'none'); - } else { - _d.setStyle('display', 'block'); - _d.getElement('ul li:first-child').setStyle('border-top', 'none'); - _d.getElement('ul li:last-child').setStyle('border-bottom', 'none'); - if (Browser.Engine.trident) { // IE的安慰 - _d.getElements('ul li').setStyle('width', _d.getCoordinates().width - 22); - } - } - } - } - }; - - if (config.type == 'mouse') { - _dt.addEvent('mouseenter', function(event){ - _timer = $clear(_timer); handle.reSet(); - if (event.target.nodeName.toLowerCase() == 'a') { - event.target = $(event.target).getParent('dt'); - } - - handle.popUp(event.target); - }); - - _dt.addEvent('mouseout', function(event){ - if (!_timer) { - _timer = handle.reSet.delay(500); - } - }); - - _dd.addEvent('mouseenter', function(event){ - if (_timer) { - _timer = $clear(_timer); - } - }); - - _dd.addEvent('mouseleave', function(event){ - if (!_timer) { - _timer = handle.reSet.delay(50); - } - }); - } - - if (config.type == 'click') { - _dt.addEvent('click', function(event){ - handle.reSet(); - if (event.target.nodeName.toLowerCase() == 'a') { - event.target = $(event.target).getParent('dt'); - } - - handle.popUp(event.target); - event.stop(); // 停止事件传播 - }); - $(document).addEvent('click', handle.reSet); - } - - return handle; -}; - Typecho.Table = { table: null, //当前表格 diff --git a/var/Widget/Menu.php b/var/Widget/Menu.php index dabe70fb..d3d89344 100644 --- a/var/Widget/Menu.php +++ b/var/Widget/Menu.php @@ -281,13 +281,29 @@ class Widget_Menu extends Typecho_Widget echo "