Merge branch 'master' of github.com:serghey-rodin/vesta

This commit is contained in:
Serghey Rodin 2012-01-16 22:55:11 +02:00
commit 24328383e8
4 changed files with 203 additions and 194 deletions

View file

@ -3,7 +3,7 @@ Title : Vesta
Author : Eugen Lobicov, eugen.lobicov@gmail.com Author : Eugen Lobicov, eugen.lobicov@gmail.com
created : November 27, 2009 created : November 27, 2009
last updated : January 12, 2012 last updated : January 15, 2012
- - - - - - - - - - - - - - - - - - */ - - - - - - - - - - - - - - - - - - */
html{ html{
@ -266,6 +266,7 @@ input::-moz-focus-inner{
float:left; float:left;
margin-right:4px; margin-right:4px;
} }
/*
.section .section-title .add-entry{ .section .section-title .add-entry{
position:relative; position:relative;
top:2px; top:2px;
@ -282,17 +283,20 @@ input::-moz-focus-inner{
background-position:-14px 0; background-position:-14px 0;
cursor:pointer; cursor:pointer;
} }
*/
.section .section-devider{ .section .section-devider{
position:absolute; position:absolute;
left:0; left:0;
bottom:0; bottom:0;
z-index:10; z-index:10;
/*background:url(../images/section-status-sprite-5.gif) no-repeat -420px 115px; */
display:block; display:block;
width:100%; width:100%;
height:3px; height:3px;
background:url(../images/section-status-sprite-6.png) no-repeat -420px 100%;
/*background:url(../images/section-status-sprite-5.gif) no-repeat -420px 115px; */
/*background:url(../images/section-status-sprite-6.png) no-repeat -420px 100%;*/
background:url(../images/section-status-sprite-7.png) no-repeat -136px 100%;
} }
.dnstpl-nav-item .section-title{ .dnstpl-nav-item .section-title{
@ -319,7 +323,9 @@ input::-moz-focus-inner{
cursor:pointer; cursor:pointer;
} }
.primary-nav .active .section-devider{ .primary-nav .active .section-devider{
background-position:-283px 100%; /*background-position:-283px 100%;*/
background-position:-276px 100%;
height:6px; height:6px;
bottom:-3px; bottom:-3px;
} }
@ -597,6 +603,9 @@ input::-moz-focus-inner{
cursor:pointer; cursor:pointer;
white-space:nowrap; white-space:nowrap;
} }
.checkbox-selector:hover .checkbox{
background-position:0 -90px;
}
.checkbox-selector .selector-title:hover{ .checkbox-selector .selector-title:hover{
color:#2ea8bd; color:#2ea8bd;
} }
@ -1575,10 +1584,14 @@ input::-moz-focus-inner{
background-color:#FFFFCB; background-color:#FFFFCB;
} }
.b-new-entry select.styled{ .b-new-entry select.styled{
top:10px; top:0;
} }
.b-new-entry option{ .b-new-entry option{
font:14px arial,sans-serif; padding:5px 5px 5px 8px;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
font-weight:bold;
color:#555;
} }
.b-new-entry .form-options-group{} .b-new-entry .form-options-group{}

Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B

View file

@ -82,7 +82,6 @@
<dl class="users-nav-item"> <dl class="users-nav-item">
<dt class="section-title cc"> <dt class="section-title cc">
<span class="to-section">User</span> <span class="to-section">User</span>
<i class="add-entry do_action_new_entry">&nbsp;</i>
</dt> </dt>
<dd class="section-contains"> <dd class="section-contains">
<span class="def"><span class="num-total">0</span> users</span> <span class="def"><span class="num-total">0</span> users</span>
@ -98,7 +97,6 @@
<dl class="users-nav-item"> <dl class="users-nav-item">
<dt class="section-title cc"> <dt class="section-title cc">
<span class="to-section">Web</span> <span class="to-section">Web</span>
<i class="add-entry do_action_new_entry">&nbsp;</i>
</dt> </dt>
<dd class="section-contains"> <dd class="section-contains">
<span class="def"><span class="num-total">0</span> web domains</span> <span class="def"><span class="num-total">0</span> web domains</span>
@ -108,12 +106,24 @@
</div> </div>
<i class="section-devider"></i> <i class="section-devider"></i>
</li> </li>
<li class="section active" id="DNS">
<div class="section-inner">
<dl class="users-nav-item">
<dt class="section-title cc">
<span class="to-section">DNS</span>
</dt>
<dd class="section-contains">
<span class="def"><span class="num-total">0</span> dns domain(s)</span>
</dd>
</dl>
</div>
<i class="section-devider"></i>
</li>
<li class="section" id="MAIL"> <li class="section" id="MAIL">
<div class="section-inner"> <div class="section-inner">
<dl class="users-nav-item"> <dl class="users-nav-item">
<dt class="section-title cc"> <dt class="section-title cc">
<span class="to-section">Mail</span> <span class="to-section">Mail</span>
<i class="add-entry do_action_new_entry">&nbsp;</i>
</dt> </dt>
<dd class="section-contains"> <dd class="section-contains">
<span class="def"><span class="num-total">0</span> mail domain(s)</span> <span class="def"><span class="num-total">0</span> mail domain(s)</span>
@ -127,7 +137,6 @@
<dl class="users-nav-item"> <dl class="users-nav-item">
<dt class="section-title cc"> <dt class="section-title cc">
<span class="to-section">DB</span> <span class="to-section">DB</span>
<i class="add-entry do_action_new_entry">&nbsp;</i>
</dt> </dt>
<dd class="section-contains"> <dd class="section-contains">
<span class="def"><span class="num-total">0</span> databases</span> <span class="def"><span class="num-total">0</span> databases</span>
@ -137,44 +146,28 @@
</div> </div>
<i class="section-devider"></i> <i class="section-devider"></i>
</li> </li>
<li class="section active" id="DNS"> <li class="section" id="CRON">
<div class="section-inner"> <div class="section-inner">
<dl class="users-nav-item"> <dl class="users-nav-item">
<dt class="section-title cc"> <dt class="section-title cc">
<span class="to-section">DNS</span> <span class="to-section">Cron</span>
<i class="add-entry do_action_new_entry">&nbsp;</i>
</dt> </dt>
<dd class="section-contains"> <dd class="section-contains">
<span class="def"><span class="num-total">0</span> dns domain(s)</span> <span class="def"><span class="num-total">0</span> cron job(s)</span>
</dd>
</dl>
</div>
<i class="section-devider"></i>
</li>
<li class="section" id="IP">
<div class="section-inner">
<dl class="users-nav-item">
<dt class="section-title cc">
<span class="to-section">IP</span>
<i class="add-entry do_action_new_entry">&nbsp;</i>
</dt>
<dd class="section-contains">
<span class="def"><span class="num-total">0</span> ip address(es)</span>
<span class="def"><span class="num-blocked">0</span> suspended</span> <span class="def"><span class="num-blocked">0</span> suspended</span>
</dd> </dd>
</dl> </dl>
</div> </div>
<i class="section-devider"></i> <i class="section-devider"></i>
</li> </li>
<li class="section last-section" id="CRON"> <li class="section last-section" id="IP">
<div class="section-inner"> <div class="section-inner">
<dl class="users-nav-item"> <dl class="users-nav-item">
<dt class="section-title cc"> <dt class="section-title cc">
<span class="to-section">Cron</span> <span class="to-section">IP</span>
<i class="add-entry do_action_new_entry">&nbsp;</i>
</dt> </dt>
<dd class="section-contains"> <dd class="section-contains">
<span class="def"><span class="num-total">0</span> cron job(s)</span> <span class="def"><span class="num-total">0</span> ip address(es)</span>
<span class="def"><span class="num-blocked">0</span> suspended</span> <span class="def"><span class="num-blocked">0</span> suspended</span>
</dd> </dd>
</dl> </dl>

View file

@ -1,161 +1,164 @@
/* /*
CUSTOM FORM ELEMENTS CUSTOM FORM ELEMENTS
Created by Ryan Fait Created by Ryan Fait
www.ryanfait.com www.ryanfait.com
The only things you may need to change in this file are the following The only things you may need to change in this file are the following
variables: checkboxHeight, radioHeight and selectWidth (lines 24, 25, 26) variables: checkboxHeight, radioHeight and selectWidth (lines 24, 25, 26)
The numbers you set for checkboxHeight and radioHeight should be one quarter The numbers you set for checkboxHeight and radioHeight should be one quarter
of the total height of the image want to use for checkboxes and radio of the total height of the image want to use for checkboxes and radio
buttons. Both images should contain the four stages of both inputs stacked buttons. Both images should contain the four stages of both inputs stacked
on top of each other in this order: unchecked, unchecked-clicked, checked, on top of each other in this order: unchecked, unchecked-clicked, checked,
checked-clicked. checked-clicked.
You may need to adjust your images a bit if there is a slight vertical You may need to adjust your images a bit if there is a slight vertical
movement during the different stages of the button activation. movement during the different stages of the button activation.
The value of selectWidth should be the width of your select list image. The value of selectWidth should be the width of your select list image.
Visit http://ryanfait.com/ for more information. Visit http://ryanfait.com/ for more information.
*/ */
var checkboxHeight = "25"; var checkboxHeight = "25";
var radioHeight = "25"; var radioHeight = "25";
var selectWidth = "210"; var selectWidth = "230";
/* No need to change anything after this */ /* No need to change anything after this */
document.write('<style type="text/css">input.styled { display: none; } select.styled { position: relative; width: ' + selectWidth + 'px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>'); document.write('<style type="text/css">input.styled { display: none; } select.styled { position: relative; width: ' + selectWidth + 'px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>');
var Custom = { var Custom = {
init: function() { init: function() {
var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active; var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active;
for(a = 0; a < inputs.length; a++) { for(a = 0; a < inputs.length; a++) {
if((inputs[a].type == "checkbox" || inputs[a].type == "radio") && $(inputs[a]).hasClass("styled") && !$(inputs[a]).hasClass("style-applied")) { if((inputs[a].type == "checkbox" || inputs[a].type == "radio") && $(inputs[a]).hasClass("styled") && !$(inputs[a]).hasClass("style-applied")) {
$(inputs[a]).addClass('style-applied'); $(inputs[a]).addClass('style-applied');
span[a] = document.createElement("span"); span[a] = document.createElement("span");
span[a].className = inputs[a].type; span[a].className = inputs[a].type;
if ($(inputs[a]).attr('class').indexOf('do_action_toggle_suspend') != -1) { if ($(inputs[a]).attr('class').indexOf('do_action_toggle_suspend') != -1) {
span[a].className += ' do_action_toggle_suspend'; // save toggle functionality span[a].className += ' do_action_toggle_suspend'; // save toggle functionality
} }
if ($(inputs[a]).attr('class').indexOf('do_action_toggle_batch_selector') != -1) { if ($(inputs[a]).attr('class').indexOf('do_action_toggle_batch_selector') != -1) {
span[a].className += ' do_action_toggle_batch_selector'; // save toggle functionality span[a].className += ' do_action_toggle_batch_selector'; // save toggle functionality
} }
if ($(inputs[a]).attr('class').indexOf('do_action_toggle_ssl_support') != -1) {
span[a].className += ' do_action_toggle_ssl_support'; // save toggle functionality
if(inputs[a].checked == true) { }
if(inputs[a].type == "checkbox") {
position = "0 -" + (checkboxHeight*2) + "px";
span[a].style.backgroundPosition = position; if(inputs[a].checked == true) {
} else { if(inputs[a].type == "checkbox") {
position = "0 -" + (radioHeight*2) + "px"; position = "0 -" + (checkboxHeight*2) + "px";
span[a].style.backgroundPosition = position; span[a].style.backgroundPosition = position;
} } else {
} position = "0 -" + (radioHeight*2) + "px";
inputs[a].parentNode.insertBefore(span[a], inputs[a]); span[a].style.backgroundPosition = position;
inputs[a].onchange = Custom.clear; }
if(!inputs[a].getAttribute("disabled")) { }
span[a].onmousedown = Custom.pushed; inputs[a].parentNode.insertBefore(span[a], inputs[a]);
span[a].onmouseup = Custom.check; inputs[a].onchange = Custom.clear;
} else { if(!inputs[a].getAttribute("disabled")) {
span[a].className = span[a].className += " disabled"; span[a].onmousedown = Custom.pushed;
} span[a].onmouseup = Custom.check;
} } else {
} span[a].className = span[a].className += " disabled";
inputs = document.getElementsByTagName("select"); }
try { }
for(a = 0; a < inputs.length; a++) { }
if($(inputs[a]).hasClass("styled")) { inputs = document.getElementsByTagName("select");
option = inputs[a].getElementsByTagName("option"); try {
active = option[0].childNodes[0].nodeValue; for(a = 0; a < inputs.length; a++) {
textnode = document.createTextNode(active); if($(inputs[a]).hasClass("styled")) {
for(b = 0; b < option.length; b++) { option = inputs[a].getElementsByTagName("option");
if(option[b].selected == true) { active = option[0].childNodes[0].nodeValue;
textnode = document.createTextNode(option[b].childNodes[0].nodeValue); textnode = document.createTextNode(active);
} for(b = 0; b < option.length; b++) {
} if(option[b].selected == true) {
span[a] = document.createElement("span"); textnode = document.createTextNode(option[b].childNodes[0].nodeValue);
span[a].className = "select"; }
span[a].id = "select-" + inputs[a].name + a; }
span[a].appendChild(textnode); span[a] = document.createElement("span");
inputs[a].parentNode.insertBefore(span[a], inputs[a]); span[a].className = "select";
inputs[a].id = inputs[a].name + a; span[a].id = "select-" + inputs[a].name + a;
if(!inputs[a].getAttribute("disabled")) { span[a].appendChild(textnode);
inputs[a].onchange = Custom.choose; inputs[a].parentNode.insertBefore(span[a], inputs[a]);
} else { inputs[a].id = inputs[a].name + a;
inputs[a].previousSibling.className = inputs[a].previousSibling.className += " disabled"; if(!inputs[a].getAttribute("disabled")) {
} inputs[a].onchange = Custom.choose;
} } else {
} inputs[a].previousSibling.className = inputs[a].previousSibling.className += " disabled";
document.onmouseup = Custom.clear; }
} }
catch(e){ /* */ } }
}, document.onmouseup = Custom.clear;
pushed: function() { }
element = this.nextSibling; catch(e){ /* */ }
if(element.checked == true && element.type == "checkbox") { },
this.style.backgroundPosition = "0 -" + checkboxHeight*3 + "px"; pushed: function() {
} else if(element.checked == true && element.type == "radio") { element = this.nextSibling;
this.style.backgroundPosition = "0 -" + radioHeight*3 + "px"; if(element.checked == true && element.type == "checkbox") {
} else if(element.checked != true && element.type == "checkbox") { this.style.backgroundPosition = "0 -" + checkboxHeight*3 + "px";
this.style.backgroundPosition = "0 -" + checkboxHeight + "px"; } else if(element.checked == true && element.type == "radio") {
} else { this.style.backgroundPosition = "0 -" + radioHeight*3 + "px";
this.style.backgroundPosition = "0 -" + radioHeight + "px"; } else if(element.checked != true && element.type == "checkbox") {
} this.style.backgroundPosition = "0 -" + checkboxHeight + "px";
}, } else {
check: function() { this.style.backgroundPosition = "0 -" + radioHeight + "px";
element = this.nextSibling; }
if(element.checked == true && element.type == "checkbox") { },
this.style.backgroundPosition = "0 0"; check: function() {
element.checked = false; element = this.nextSibling;
} else { if(element.checked == true && element.type == "checkbox") {
if(element.type == "checkbox") { this.style.backgroundPosition = "0 0";
this.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px"; element.checked = false;
} else { } else {
this.style.backgroundPosition = "0 -" + radioHeight*2 + "px"; if(element.type == "checkbox") {
group = this.nextSibling.name; this.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
inputs = document.getElementsByTagName("input"); } else {
for(a = 0; a < inputs.length; a++) { this.style.backgroundPosition = "0 -" + radioHeight*2 + "px";
if(inputs[a].name == group && inputs[a] != this.nextSibling) { group = this.nextSibling.name;
inputs[a].previousSibling.style.backgroundPosition = "0 0"; inputs = document.getElementsByTagName("input");
} for(a = 0; a < inputs.length; a++) {
} if(inputs[a].name == group && inputs[a] != this.nextSibling) {
} inputs[a].previousSibling.style.backgroundPosition = "0 0";
element.checked = true; }
} }
}, }
clear: function() { element.checked = true;
inputs = document.getElementsByTagName("input"); }
for(var b = 0; b < inputs.length; b++) { },
if(inputs[b].type == "checkbox" && inputs[b].checked == true && inputs[b].className == "styled") { clear: function() {
inputs[b].previousSibling.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px"; inputs = document.getElementsByTagName("input");
} else if(inputs[b].type == "checkbox" && inputs[b].className == "styled") { for(var b = 0; b < inputs.length; b++) {
inputs[b].previousSibling.style.backgroundPosition = "0 0"; if(inputs[b].type == "checkbox" && inputs[b].checked == true && inputs[b].className == "styled") {
} else if(inputs[b].type == "radio" && inputs[b].checked == true && inputs[b].className == "styled") { inputs[b].previousSibling.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
inputs[b].previousSibling.style.backgroundPosition = "0 -" + radioHeight*2 + "px"; } else if(inputs[b].type == "checkbox" && inputs[b].className == "styled") {
} else if(inputs[b].type == "radio" && inputs[b].className == "styled") { inputs[b].previousSibling.style.backgroundPosition = "0 0";
inputs[b].previousSibling.style.backgroundPosition = "0 0"; } else if(inputs[b].type == "radio" && inputs[b].checked == true && inputs[b].className == "styled") {
} inputs[b].previousSibling.style.backgroundPosition = "0 -" + radioHeight*2 + "px";
} } else if(inputs[b].type == "radio" && inputs[b].className == "styled") {
}, inputs[b].previousSibling.style.backgroundPosition = "0 0";
choose: function() { }
option = this.getElementsByTagName("option"); }
for(d = 0; d < option.length; d++) { },
if(option[d].selected == true) { choose: function() {
// option = this.getElementsByTagName("option");
var expr = '#select-' + this.id; for(d = 0; d < option.length; d++) {
fb.log(expr); if(option[d].selected == true) {
$(expr).text(option[d].childNodes[0].nodeValue); //
// bad! var expr = '#select-' + this.id;
//document.getElementById("select" + this.name).childNodes[0].nodeValue = option[d].childNodes[0].nodeValue; fb.log(expr);
} $(expr).text(option[d].childNodes[0].nodeValue);
} // bad!
} //document.getElementById("select" + this.name).childNodes[0].nodeValue = option[d].childNodes[0].nodeValue;
} }
window.onload = Custom.init; }
}
}
window.onload = Custom.init;