修改弹出窗口样式

修改按钮样式
This commit is contained in:
fen 2013-10-19 12:04:39 +08:00
parent 738c056cd7
commit 2332ac8b64
20 changed files with 69 additions and 37 deletions

View File

@ -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; }

View File

@ -29,7 +29,7 @@ Typecho_Cookie::delete('__typecho_remember_name');
<p><input type="password" id="password" name="password" class="text-l w-100" placeholder="<?php _e('密码'); ?>" /></p>
<p class="submit">
<!-- <label for="remember"><input type="checkbox" name="remember" class="checkbox" value="1" id="remember" /> <?php _e('记住我'); ?></label> -->
<button type="submit" class="btn-l w-100"><?php _e('登录'); ?></button>
<button type="submit" class="btn-l w-100 primary"><?php _e('登录'); ?></button>
<input type="hidden" name="referer" value="<?php echo htmlspecialchars($request->get('referer')); ?>" />
</p>
</form>

View File

@ -45,7 +45,7 @@ Typecho_Cookie::delete('__typecho_remember_mail');
<p><input type="email" id="mail" name="mail" placeholder="<?php _e('电子邮件'); ?>" value="<?php echo $rememberMail; ?>" class="text-l w-100" /></p>
<p class="submit">
<!-- <label for="remember"><input type="checkbox" name="remember" class="checkbox" value="1" id="remember" /> <?php _e('记住我'); ?></label> -->
<button type="submit" class="btn-l w-100"><?php _e('注册'); ?></button>
<button type="submit" class="btn-l w-100 primary"><?php _e('注册'); ?></button>
</p>
</form>

View File

@ -51,6 +51,11 @@ button {
display: inline-block;
}
.btn-warn {
@include button(#B94A48);
color: #FFF;
}
/* 下拉菜单 */
.btn-drop {
position: relative;

View File

@ -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; }

View File

@ -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; }

View File

@ -36,7 +36,7 @@ Typecho_Widget::widget('Widget_Themes_Files')->to($files);
<?php if($files->currentIsWriteable()): ?>
<input type="hidden" name="theme" value="<?php echo $files->currentTheme(); ?>" />
<input type="hidden" name="edit" value="<?php echo $files->currentFile(); ?>" />
<button type="submit"><?php _e('保存文件'); ?></button>
<button type="submit" class="primary"><?php _e('保存文件'); ?></button>
<?php else: ?>
<em><?php _e('此文件无法写入'); ?></em>
<?php endif; ?>

View File

@ -21,7 +21,7 @@ include 'menu.php';
<li><a href="<?php $options->siteUrl(); ?>"><?php _e('查看我的站点'); ?></a></li>
<?php endif; ?>
</ol>
<p><button type="submit"><?php _e('让我直接开始使用吧 &raquo;'); ?></button></p>
<p><button type="submit" class="primary"><?php _e('让我直接开始使用吧 &raquo;'); ?></button></p>
</form>
</div>
</div>

View File

@ -189,16 +189,14 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
<?php if(isset($_GET['use_old']) ) : ?>
<?php _e('您选择了使用原有的数据, 您的用户名和密码和原来的一致'); ?>
<?php else : ?>
<ul>
<?php if (isset($_REQUEST['user']) && isset($_REQUEST['password'])): ?>
<li><?php _e('您的用户名是'); ?>: <strong class="mono"><?php echo htmlspecialchars(_r('user')); ?></strong></li>
<li><?php _e('您的密码是'); ?>: <strong class="mono"><?php echo htmlspecialchars(_r('password')); ?></strong></li>
<?php _e('您的用户名是'); ?>: <strong class="mono"><?php echo htmlspecialchars(_r('user')); ?></strong><br>
<?php _e('您的密码是'); ?>: <strong class="mono"><?php echo htmlspecialchars(_r('password')); ?></strong>
<?php endif;?>
</ul>
<?php endif;?>
</div>
<div class="message notice">
<div class="p message notice">
<a target="_blank" href="http://spreadsheets.google.com/viewform?key=pd1Gl4Ur_pbniqgebs5JRIg&hl=en">参与用户调查, 帮助我们完善产品</a>
</div>
@ -363,7 +361,7 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
$installDb->query("DROP TABLE {$table}");
}
}
echo '<p class="message success">' . _t('已经删除完原有数据') . '<br /><br /><button type="submit">'
echo '<p class="message success">' . _t('已经删除完原有数据') . '<br /><br /><button type="submit" class="primary">'
. _t('继续安装 &raquo;') . '</button></p>';
} elseif (_r('goahead')) {
//使用原有数据
@ -375,8 +373,8 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
exit;
} else {
echo '<p class="message error">' . _t('安装程序检查到原有数据表已经存在.')
. '<br /><br />' . '<button type="submit" name="delete" value="1">' . _t('删除原有数据') . '</button> '
. _t('或者') . ' <button type="submit" name="goahead" value="1">' . _t('使用原有数据') . '</button></p>';
. '<br /><br />' . '<button type="submit" name="delete" value="1" class="btn-warn">' . _t('删除原有数据') . '</button> '
. _t('或者') . ' <button type="submit" name="goahead" value="1" class="primary">' . _t('使用原有数据') . '</button></p>';
}
} else {
echo '<p class="message error">' . _t('安装程序捕捉到以下错误: "%s". 程序被终止, 请检查您的配置信息.',$e->getMessage()) . '</p>';
@ -555,7 +553,7 @@ Typecho_Db::set(\$db);
</ul>
</div>
<input type="hidden" name="action" value="config" />
<p class="submit"><button type="submit"><?php _e('确认, 开始安装 &raquo;'); ?></button></p>
<p class="submit"><button type="submit" class="primary"><?php _e('确认, 开始安装 &raquo;'); ?></button></p>
</form>
<?php else: ?>
<form method="post" action="?config">
@ -574,7 +572,7 @@ Typecho_Db::set(\$db);
</ol>
<p><a href="http://typecho.org"><?php _e('查看所有贡献者'); ?></a></p>
</div>
<p class="submit"><button type="submit"><?php _e('我准备好了, 开始下一步 &raquo;'); ?></button></p>
<p class="submit"><button type="submit" class="primary"><?php _e('我准备好了, 开始下一步 &raquo;'); ?></button></p>
</form>
<?php endif; ?>

View File

@ -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',

View File

@ -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) {

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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) {

View File

@ -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('必须填写密码'));