From 2332ac8b647d7db27a607c5f3224f39e250f5e3a Mon Sep 17 00:00:00 2001 From: fen Date: Sat, 19 Oct 2013 12:04:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E5=87=BA=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=A0=B7=E5=BC=8F=20=E4=BF=AE=E6=94=B9=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/css/style.css | 36 ++++++++++++++++++------- admin/login.php | 2 +- admin/register.php | 2 +- admin/scss/_buttons.scss | 5 ++++ admin/scss/_messages.scss | 15 +++++------ admin/scss/components/_editor.scss | 5 ++-- admin/theme-editor.php | 2 +- admin/welcome.php | 2 +- install.php | 18 ++++++------- var/Widget/Contents/Attachment/Edit.php | 1 + var/Widget/Metas/Category/Edit.php | 1 + var/Widget/Metas/Tag/Edit.php | 1 + var/Widget/Options/Discussion.php | 1 + var/Widget/Options/General.php | 1 + var/Widget/Options/Permalink.php | 1 + var/Widget/Options/Reading.php | 1 + var/Widget/Plugins/Config.php | 4 ++- var/Widget/Themes/Config.php | 4 ++- var/Widget/Users/Edit.php | 1 + var/Widget/Users/Profile.php | 3 +++ 20 files changed, 69 insertions(+), 37 deletions(-) diff --git a/admin/css/style.css b/admin/css/style.css index d57888ef..070fb131 100644 --- a/admin/css/style.css +++ b/admin/css/style.css @@ -172,6 +172,24 @@ button { .btn-group { display: inline-block; } +.btn-warn { + border: none; + background-color: #b94a48; + cursor: pointer; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + color: #FFF; } + .btn-warn:hover { + background-color: #af4543; } + .btn-warn:active, .btn-warn.active { + background-color: #af4543; } + .btn-warn:disabled { + background-color: #bd5553; + cursor: default; } + /* 下拉菜单 */ .btn-drop { position: relative; } @@ -207,17 +225,18 @@ button { * 提示信息框 */ .message { - padding: 10px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; } + padding: 8px 10px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; } .message a { font-weight: bold; text-decoration: underline; } .error { - border: 1px solid #FBC2C4; background: #FBE3E4; color: #8A1F11; } @@ -226,7 +245,6 @@ button { .notice { background: #FFF6BF; - border: 1px solid #FFD324; color: #514721; } .notice a { @@ -234,7 +252,6 @@ button { .success { background: #E6EFC2; - border: 1px solid #C6D880; color: #264409; } .success a { @@ -1079,10 +1096,9 @@ a.operate-reply { top: 50%; left: 50%; margin-top: -95px; - margin-left: -220px; + margin-left: -200px; padding: 20px; - width: 400px; - height: 150px; + width: 360px; background: #F6F6F3; } .wmd-prompt-dialog p { margin: 0 0 5px; } diff --git a/admin/login.php b/admin/login.php index 0b4601c3..7d6c520a 100644 --- a/admin/login.php +++ b/admin/login.php @@ -29,7 +29,7 @@ Typecho_Cookie::delete('__typecho_remember_name');

- +

diff --git a/admin/register.php b/admin/register.php index cf36c402..5658b348 100644 --- a/admin/register.php +++ b/admin/register.php @@ -45,7 +45,7 @@ Typecho_Cookie::delete('__typecho_remember_mail');

- +

diff --git a/admin/scss/_buttons.scss b/admin/scss/_buttons.scss index 96a2f576..62d97a78 100644 --- a/admin/scss/_buttons.scss +++ b/admin/scss/_buttons.scss @@ -51,6 +51,11 @@ button { display: inline-block; } +.btn-warn { + @include button(#B94A48); + color: #FFF; +} + /* 下拉菜单 */ .btn-drop { position: relative; diff --git a/admin/scss/_messages.scss b/admin/scss/_messages.scss index f28169b8..5273ea52 100644 --- a/admin/scss/_messages.scss +++ b/admin/scss/_messages.scss @@ -1,12 +1,11 @@ +@import "compass"; + /** * 提示信息框 */ .message { - padding: 10px; - - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; + padding: 8px 10px; + @include border-radius(2px); } .message a { @@ -15,7 +14,7 @@ } .error { - border: 1px solid #FBC2C4; + // border: 1px solid #FBC2C4; background: #FBE3E4; color: #8A1F11; } @@ -23,14 +22,14 @@ .notice { background: #FFF6BF; - border: 1px solid #FFD324; + // border: 1px solid #FFD324; color: #514721; } .notice a { color: #514721; } .success { background: #E6EFC2; - border: 1px solid #C6D880; + // border: 1px solid #C6D880; color: #264409; } .success a { color: #264409; } diff --git a/admin/scss/components/_editor.scss b/admin/scss/components/_editor.scss index eb2fe4b8..f56e13ab 100644 --- a/admin/scss/components/_editor.scss +++ b/admin/scss/components/_editor.scss @@ -46,10 +46,9 @@ top: 50%; left: 50%; margin-top: -95px; - margin-left: -220px; + margin-left: -200px; padding: 20px; - width: 400px; - height: 150px; + width: 360px; background: #F6F6F3; p { margin: 0 0 5px; } diff --git a/admin/theme-editor.php b/admin/theme-editor.php index 684a9804..cd7576b5 100644 --- a/admin/theme-editor.php +++ b/admin/theme-editor.php @@ -36,7 +36,7 @@ Typecho_Widget::widget('Widget_Themes_Files')->to($files); currentIsWriteable()): ?> - + diff --git a/admin/welcome.php b/admin/welcome.php index 72309c23..bebe12a4 100644 --- a/admin/welcome.php +++ b/admin/welcome.php @@ -21,7 +21,7 @@ include 'menu.php';
  • -

    +

    diff --git a/install.php b/install.php index e1e8ad92..ea1864bc 100644 --- a/install.php +++ b/install.php @@ -189,16 +189,14 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion); - -
    + @@ -363,7 +361,7 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion); $installDb->query("DROP TABLE {$table}"); } } - echo '

    ' . _t('已经删除完原有数据') . '

    '; } elseif (_r('goahead')) { //使用原有数据 @@ -375,8 +373,8 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion); exit; } else { echo '

    ' . _t('安装程序检查到原有数据表已经存在.') - . '

    ' . ' ' - . _t('或者') . '

    '; + . '

    ' . ' ' + . _t('或者') . '

    '; } } else { echo '

    ' . _t('安装程序捕捉到以下错误: "%s". 程序被终止, 请检查您的配置信息.',$e->getMessage()) . '

    '; @@ -555,7 +553,7 @@ Typecho_Db::set(\$db);
    -

    +

    @@ -574,7 +572,7 @@ Typecho_Db::set(\$db);

    -

    +

    diff --git a/var/Widget/Contents/Attachment/Edit.php b/var/Widget/Contents/Attachment/Edit.php index e7f21d8a..f79a4437 100644 --- a/var/Widget/Contents/Attachment/Edit.php +++ b/var/Widget/Contents/Attachment/Edit.php @@ -140,6 +140,7 @@ class Widget_Contents_Attachment_Edit extends Widget_Contents_Post_Edit implemen /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('提交修改')); + $submit->input->setAttribute('class', 'primary'); $delete = new Typecho_Widget_Helper_Layout('a', array('href' => Typecho_Common::url('/action/contents-attachment-edit?do=delete&cid=' . $this->cid, $this->options->index), 'class' => 'operate-delete', diff --git a/var/Widget/Metas/Category/Edit.php b/var/Widget/Metas/Category/Edit.php index b92ae337..ee781518 100644 --- a/var/Widget/Metas/Category/Edit.php +++ b/var/Widget/Metas/Category/Edit.php @@ -150,6 +150,7 @@ class Widget_Metas_Category_Edit extends Widget_Abstract_Metas implements Widget /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit(); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); if (isset($this->request->mid) && 'insert' != $action) { diff --git a/var/Widget/Metas/Tag/Edit.php b/var/Widget/Metas/Tag/Edit.php index a2bc260c..bb0925cc 100644 --- a/var/Widget/Metas/Tag/Edit.php +++ b/var/Widget/Metas/Tag/Edit.php @@ -147,6 +147,7 @@ class Widget_Metas_Tag_Edit extends Widget_Abstract_Metas implements Widget_Inte /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit(); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); if (isset($this->request->mid) && 'insert' != $action) { diff --git a/var/Widget/Options/Discussion.php b/var/Widget/Options/Discussion.php index 5847cf4b..e62d0f9b 100644 --- a/var/Widget/Options/Discussion.php +++ b/var/Widget/Options/Discussion.php @@ -158,6 +158,7 @@ class Widget_Options_Discussion extends Widget_Abstract_Options implements Widge /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('保存设置')); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); return $form; diff --git a/var/Widget/Options/General.php b/var/Widget/Options/General.php index 80f17084..d24413cd 100644 --- a/var/Widget/Options/General.php +++ b/var/Widget/Options/General.php @@ -118,6 +118,7 @@ class Widget_Options_General extends Widget_Abstract_Options implements Widget_I /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('保存设置')); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); return $form; diff --git a/var/Widget/Options/Permalink.php b/var/Widget/Options/Permalink.php index 65c3460a..31d1190d 100644 --- a/var/Widget/Options/Permalink.php +++ b/var/Widget/Options/Permalink.php @@ -243,6 +243,7 @@ RewriteRule . {$basePath}index.php [L] /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('保存设置')); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); return $form; diff --git a/var/Widget/Options/Reading.php b/var/Widget/Options/Reading.php index ab35dde2..3c76c2d8 100644 --- a/var/Widget/Options/Reading.php +++ b/var/Widget/Options/Reading.php @@ -118,6 +118,7 @@ class Widget_Options_Reading extends Widget_Abstract_Options implements Widget_I /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('保存设置')); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); return $form; diff --git a/var/Widget/Plugins/Config.php b/var/Widget/Plugins/Config.php index 9e49a705..23eb75b1 100644 --- a/var/Widget/Plugins/Config.php +++ b/var/Widget/Plugins/Config.php @@ -106,7 +106,9 @@ class Widget_Plugins_Config extends Widget_Abstract_Options } } - $form->addItem(new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('保存设置'))); + $submit = new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('保存设置')); + $submit->input->setAttribute('class', 'primary'); + $form->addItem($submit); return $form; } } diff --git a/var/Widget/Themes/Config.php b/var/Widget/Themes/Config.php index 567b8231..a2ae9c75 100644 --- a/var/Widget/Themes/Config.php +++ b/var/Widget/Themes/Config.php @@ -84,7 +84,9 @@ class Widget_Themes_Config extends Widget_Abstract_Options } } - $form->addItem(new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('保存设置'))); + $submit = new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('保存设置')); + $submit->input->setAttribute('class', 'primary'); + $form->addItem($submit); return $form; } } diff --git a/var/Widget/Users/Edit.php b/var/Widget/Users/Edit.php index f5a9a597..6287cec1 100644 --- a/var/Widget/Users/Edit.php +++ b/var/Widget/Users/Edit.php @@ -140,6 +140,7 @@ class Widget_Users_Edit extends Widget_Abstract_Users implements Widget_Interfac /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit(); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); if (NULL != $this->request->uid) { diff --git a/var/Widget/Users/Profile.php b/var/Widget/Users/Profile.php index 0ec9f9c6..a9cf2c30 100644 --- a/var/Widget/Users/Profile.php +++ b/var/Widget/Users/Profile.php @@ -64,6 +64,7 @@ class Widget_Users_Profile extends Widget_Users_Edit implements Widget_Interface /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('更新我的档案')); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); $screenName->value($this->user->screenName); @@ -131,6 +132,7 @@ class Widget_Users_Profile extends Widget_Users_Edit implements Widget_Interface /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('保存设置')); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); return $form; @@ -224,6 +226,7 @@ class Widget_Users_Profile extends Widget_Users_Edit implements Widget_Interface /** 提交按钮 */ $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('更新密码')); + $submit->input->setAttribute('class', 'primary'); $form->addItem($submit); $password->addRule('required', _t('必须填写密码'));