Skip to content

Instantly share code, notes, and snippets.

@MondoGao
Last active February 5, 2016 15:33
Show Gist options
  • Save MondoGao/462cda858d9eb097335d to your computer and use it in GitHub Desktop.
Save MondoGao/462cda858d9eb097335d to your computer and use it in GitHub Desktop.
hudbt - 全局控件替换
/*hudbt-button-white.css*/
a:hover {
color: rgb(0, 0, 0);
}
form[name="funboxcomment"] {
text-align: center;
}
/*按钮样式*/
input[type="submit"],
input[type="file"],
input[type="button"],
button,
.ui-buttonset .ui-button:not(.ui-dialog-titlebar-close),
.ui-state-default:not(.ui-dialog-titlebar-close),
.ui-widget-content .ui-state-default:not(.ui-dialog-titlebar-close),
.ui-widget-header .ui-state-default:not(.ui-dialog-titlebar-close),
.newButtons,
.donate {
display: inline-block;
height: auto;
line-height: 28px;
padding: 0 12px;
border: 1px solid rgb(192, 192, 192);
color: rgb(0, 0, 0);
font-weight: normal;
background-color: rgb(241, 241, 241);
background-image: none;
box-shadow: 0 0 7px -5px rgb(0, 0, 0);
outline: none;
-webkit-transition: background-color .25s ease,box-shadow .25s ease,border .25s ease;
-moz-transition: background-color .25s ease,box-shadow .25s ease,border .25s ease;
-ms-transition: background-color .25s ease,box-shadow .25s ease,border .25s ease;
-o-transition: background-color .25s ease,box-shadow .25s ease,border .25s ease;
transition: background-color .25s ease,box-shadow .25s ease,border .25s ease;
}
input[type="submit"],
input[type="file"],
.newButtons,
.donate {
border-radius: 3px;
}
#commit-btn #qr {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="file"]:hover,
button:hover,
.ui-buttonset .ui-button:not(.ui-dialog-titlebar-close):hover,
.ui-state-default:not(.ui-dialog-titlebar-close):hover,
.ui-widget-content .ui-state-default:not(.ui-dialog-titlebar-close):hover,
.ui-widget-header .ui-state-default:not(.ui-dialog-titlebar-close):hover,
.ui-menu-item a:hover,
.newButtons:hover,
.donate:hover {
border: 1px solid rgb(149, 149, 149);
background-color: rgb(247, 247, 247);
color: rgb(0, 0, 0);
background-image: none;
box-shadow: 0 0 7px -4px rgb(0, 0, 0);
}
input[type="submit"]:active,
input[type="button"]:active,
input[type="file"]:active,
button:active,
.ui-buttonset .ui-button:not(.ui-dialog-titlebar-close):active,
.ui-state-default:not(.ui-dialog-titlebar-close):active,
.ui-widget-content .ui-state-default:not(.ui-dialog-titlebar-close):active,
.ui-widget-header .ui-state-default:not(.ui-dialog-titlebar-close):active,
.newButtons:active,
.donate:active {
background-color: rgb(238, 238, 238);
background-image: none;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 3px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 3px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 3px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 3px;
}
input[type="file"],
.ui-buttonset .ui-button {
margin: 0;
}
input[type="file"] {
text-indent: -77px;
}
img.f_online {
background-position: -138px -54px;
vertical-align: middle;
}
img.f_offline {
background-position: -161px -28px;
vertical-align: middle;
}
.donate-0 {
border: 1px solid rgb(254, 255, 101) !important;
background-color: #FFFF99;
}
.donate-1 {
border: 1px solid rgb(181, 255, 101) !important;
background-color: #CCFF99;
}
.donate-2 {
border: 1px solid rgb(101, 254, 255) !important;
background-color: #99FFFF;
}
.donate-3 {
border: 1px solid rgb(101, 178, 255) !important;
background-color: #99CCFF;
}
.donate-4 {
border: 1px solid rgb(255, 96, 96) !important;
background-color: #FF9999;
}
#bbcode-toolbar + iframe {
height: 36px;
}
/*文本输入框样式*/
input[type="text"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="password"],
input[name="amount"],
textarea,
select {
line-height: 30px;
padding: 0 12px;
border: 1px solid rgb(192, 192, 192);
border-radius: 3px;
margin-right: 3px;
background-color: rgb(249, 249, 249);
box-shadow: 0 0 7px -5px rgb(0, 0, 0);
outline: none;
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
input[type="text"]:hover,
input[type="search"]:hover,
input[type="number"]:hover,
input[type="url"]:hover,
input[type="password"]:hover,
input[name="amount"]:hover,
textarea:hover,
select:focus {
border: 1px solid rgb(149, 149, 149);
}
input[type="text"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[name="amount"]:focus,
textarea:focus,
select:hover {
border: 1px solid rgb(149, 149, 149);
background-color: rgb(254, 254, 254);
box-shadow: 0 0 7px -4px rgb(0, 0, 0);
outline: none;
}
textarea {
line-height: 16px;
padding: 12px;
resize: none;
}
select {
padding: 0;
height: 30px;
}
.ui-dialog .ui-dialog-content {
overflow: hidden;
}
/*复选框样式*/
input[type="checkbox"] {
position: absolute;
visibility: hidden;
}
input[type="checkbox"]:checked + label {
background-position: -499px -783px;
}
#ksearchbox-simple input[type="checkbox"] + label +a {
vertical-align: top
}
.newCheckboxs {
display: inline-block;
height: 16px;
width: 16px;
border: 0;
border-radius: 3px;
margin-right: 2px;
background: url(http://l.bst.126.net/rsc/img/loginopen/201406/btn.png?009) no-repeat -473px -783px;
box-shadow: 0px 0px 5px -4px;
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
.newCheckboxs:hover {
box-shadow: 0px 0px 5px -3px;
}
/*hudbt-button-white.css end*/
//hudbt-button-white.js
$(function() {
var $oldnd = $("#mainmenu li li");
var $netdisk = $("<li></li>").html($oldnd.html());
$oldnd.parent().after($netdisk);
$oldnd.remove();
if (document.URL.indexOf("forumid\=27") > 0) {
$netdisk.addClass('selected');
$("#mainmenu li:eq(1)").removeClass('selected');
}
$(".f_new").parent().html("新主题").addClass("newButtons");
$(".f_reply").parent().html("回复").addClass("newButtons");
$(".f_report").parent().html("举报").addClass("newButtons");
$(".f_quote").parent().html("引用").addClass("newButtons");
$(".f_pm").parent().html("PM").addClass("newButtons");
$(".f_edit").parent().html("编辑").addClass("newButtons");
if ($(".f_delete").parents("#funcomment").size() <= 0) {
$(".f_delete").parent().html("删除").addClass("newButtons");
}
$("[type=checkbox]").each(replaceButton);
$("[src='attachment.php']").attr("id", "frame");
$("#frame").contents().ready(function() {
setTimeout(function() {
$("#frame").contents().find("[type=checkbox]").each(replaceButton);
}, 500);
});
});
function replaceButton() {
if (!$(this).attr('id')) {
$(this).attr('id', $(this).attr('name'));
}
var $lbl = $("<label></label>").addClass('newCheckboxs');
var $thischk = $(this);
if (!$thischk.parent().find("label").hasClass('newCheckboxs') || $thischk.attr('id') == "storing") {
$lbl.attr('for', $thischk.attr('id'));
$thischk.after($lbl);
}
}
//hudbt-button-white.js end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment