first commit
865
wp-content/themes/nuzi/admin/assets/css/admin-style.css
Normal file
@ -0,0 +1,865 @@
|
||||
/*-----------------------------------------------------------------------------------
|
||||
/* Admin styles
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
.updated, .error {
|
||||
display:none!important
|
||||
} /* disable the admin notices */
|
||||
#of_container {
|
||||
margin: 15px;
|
||||
width: 785px;
|
||||
position:relative;
|
||||
z-index: 0
|
||||
}
|
||||
#of_container #header {
|
||||
height: 70px;
|
||||
background:#f1f1f1;
|
||||
border: 1px solid #ccc;
|
||||
-webkit-border-radius: 6px 6px 0 0;
|
||||
-moz-border-radius: 6px 6px 0 0;
|
||||
border-radius: 6px 6px 0 0;
|
||||
background-image: -ms-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: -moz-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: -o-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));
|
||||
background-image: -webkit-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: linear-gradient(top,#f9f9f9,#ececec);
|
||||
-moz-box-shadow: inset 0 1px 0 #fff;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fff;
|
||||
box-shadow: inset 0 1px 0 #fff;
|
||||
}
|
||||
#of_container #header .logo {
|
||||
float: left;
|
||||
margin:10px 20px;
|
||||
}
|
||||
#of_container #js-warning {
|
||||
color: red;
|
||||
float: left;
|
||||
margin: 20px 10px;
|
||||
width: 330px;
|
||||
}
|
||||
#of_container ul,#of_container ol {margin: 0;}
|
||||
.js #of_container #js-warning {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#of_container #header .logo h2 {
|
||||
display:inline-block;
|
||||
font-style:normal;
|
||||
padding-right:5px;
|
||||
}
|
||||
#of_container #header .logo span {
|
||||
color:#888888;
|
||||
}
|
||||
#of_container #header .icon-option {
|
||||
float: right;
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
background: url(../images/icon_option.png) no-repeat;
|
||||
margin:20px 30px 0;
|
||||
}
|
||||
|
||||
#of_container #info_bar {
|
||||
background: #f3f3f3;
|
||||
border:solid #d8d8d8;
|
||||
border-bottom:1px solid #D8D8D8;
|
||||
border-width:0px 1px 1px 1px;
|
||||
padding: 6px 20px 0px 6px;
|
||||
height: 31px;
|
||||
text-align: right;
|
||||
-moz-box-shadow: inset 0 1px 0 #fcfcfc;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fcfcfc;
|
||||
box-shadow: inset 0 1px 0 #fcfcfc;
|
||||
}
|
||||
|
||||
#of_container #expand_options{
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 22px;
|
||||
width: 21px;
|
||||
float: left;
|
||||
font-size:0px;
|
||||
text-indent: -9999px;
|
||||
margin: 0 0 0 10px;
|
||||
border: 1px solid #bbb;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
#of_container #info_bar .expand { background: url(../images/toggle_tabs.png) no-repeat -2px -1px; }
|
||||
#of_container #info_bar .close { background: url(../images/toggle_tabs.png) no-repeat -2px -26px; }
|
||||
#of_container #expand_options:hover {
|
||||
cursor: pointer;
|
||||
border-color: #888;
|
||||
}
|
||||
#of_container #main {
|
||||
background-color: #f1f1f1;
|
||||
border-left: 1px solid #d8d8d8;
|
||||
border-right: 1px solid #d8d8d8;
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
}
|
||||
#of_container #of-nav {
|
||||
float: left;
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
width: 160px;
|
||||
}
|
||||
#of_container #of-nav ul {
|
||||
margin:0;
|
||||
}
|
||||
#of_container #of-nav li {
|
||||
margin-bottom:0;
|
||||
-moz-box-shadow: inset 0 1px 0 #f9f9f9;
|
||||
-webkit-box-shadow: inset 0 1px 0 #f9f9f9;
|
||||
box-shadow: inset 0 1px 0 #f9f9f9;
|
||||
margin-right: 1px;
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
}
|
||||
|
||||
#of_container #of-nav li:last-child {
|
||||
-moz-box-shadow: inset 0 1px 0 #f9f9f9, 0 1px 0 #f9f9f9;
|
||||
-webkit-box-shadow: inset 0 1px 0 #f9f9f9, 0 1px 0 #f9f9f9;
|
||||
box-shadow: inset 0 1px 0 #f9f9f9, 0 1px 0 #f9f9f9;
|
||||
}
|
||||
|
||||
#of_container #of-nav li.current {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#of_container #of-nav li a, #of_container #of-nav ul li a:link, #of-nav ul li a:visited {
|
||||
display: block;
|
||||
padding: 10px 10px 10px 40px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 13px 10px;
|
||||
font-weight:bold;
|
||||
font-size: 12px;
|
||||
text-decoration: none;
|
||||
color: #555;
|
||||
opacity: 0.5;
|
||||
}
|
||||
#of_container #of-nav ul li.current a {
|
||||
background-color: #fcfcfc;
|
||||
color: #797979;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#of_container #of-nav ul li a:hover {
|
||||
color: #d54e21;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/*menu icons - customize to your liking*/
|
||||
#of_container #of-nav li.general a{ background-image:url(../images/general.png);}
|
||||
#of_container #of-nav li.additional a{ background-image:url(../images/icon-settings.png);}
|
||||
#of_container #of-nav li.headerandfooter a{ background-image:url(../images/header-and-footer.png);}
|
||||
#of_container #of-nav li.colorsandstyling a{ background-image:url(../images/color.png);}
|
||||
#of_container #of-nav li.typography a{ background-image:url(../images/typography.png);}
|
||||
#of_container #of-nav li.socialicons a{ background-image:url(../images/social.png);}
|
||||
#of_container #of-nav li.fbtwitterapi a{ background-image:url(../images/comments-facebook-icon.png);}
|
||||
#of_container #of-nav li.customcss a {background: url(../images/custom-css.png) no-repeat;}
|
||||
#of_container #of-nav li.backupoptions a {background: url(../images/backup.png) no-repeat;}
|
||||
|
||||
#of_container #content {
|
||||
float: left;
|
||||
min-height: 500px;
|
||||
width: 595px;
|
||||
margin-left: -1px;
|
||||
padding: 0 14px;
|
||||
font-family: "Lucida Grande", Sans-serif;
|
||||
background-color: #FCFCFC;
|
||||
border-left: 1px solid #d8d8d8;
|
||||
-moz-box-shadow: inset 0 1px 0 #fff;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fff;
|
||||
box-shadow: inset 0 1px 0 #fff;
|
||||
}
|
||||
#of_container #content .section {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#of_container #content .section h3.heading {
|
||||
font-family:;
|
||||
margin: 10px 0 10px 0;
|
||||
padding: 7px 0px;
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
}
|
||||
#of_container #content .section .controls {
|
||||
float: left;
|
||||
width: 345px;
|
||||
margin: 0 15px 0 0;
|
||||
}
|
||||
#of_container #content .section .explain {
|
||||
float: left;
|
||||
width: 225px;
|
||||
padding: 0 10px 0 0;
|
||||
font-size: 11px;
|
||||
color: #999999;
|
||||
}
|
||||
#of_container #content .section-checkbox .controls {
|
||||
width:25px
|
||||
}
|
||||
|
||||
#of_container #content .section-multicheck .controls input.checkbox {
|
||||
}
|
||||
|
||||
#of_container #content .section-checkbox .explain {
|
||||
max-width:93%;
|
||||
}
|
||||
#of_container #content .section-color .controls {
|
||||
width:105px
|
||||
}
|
||||
#of_container #content .section-color .explain {
|
||||
width:440px
|
||||
}
|
||||
#of_container #content .section-info h3.heading {
|
||||
display:none;
|
||||
}
|
||||
#of_container #content .section-info .controls {
|
||||
margin: 20px 0 0;
|
||||
float:none;
|
||||
width: auto;
|
||||
}
|
||||
#of_container #content .section-info .controls .of-info{
|
||||
padding: 6px 10px;
|
||||
font-size: 10px;
|
||||
background-color: #757575;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#of_container #content .section-info .controls .of-info ._icon {
|
||||
height:16px; width:16px;
|
||||
margin: 0 10px 0 0;
|
||||
float: left;
|
||||
}
|
||||
#of_container #content .section-info .controls small {
|
||||
font-size: 12px
|
||||
}
|
||||
#of_container #content .section-info h3.heading {
|
||||
-webkit-border-radius: 3px 3px 0 0;
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
border-radius: 3px 3px 0 0;
|
||||
}
|
||||
#of_container #content .section-info .controls {
|
||||
-webkit-border-radius: 0 0 3px 3px;
|
||||
-moz-border-radius: 0 0 3px 3px;
|
||||
border-radius: 0 0 3px 3px;
|
||||
}
|
||||
#of_container .sorter {margin-right: -20px;}
|
||||
#of_container .sorter ul {
|
||||
background: #F9F9F9;
|
||||
border: 1px dashed #E3E3E3;
|
||||
min-height: 40px;
|
||||
padding: 10px 10px 0;
|
||||
width: 145px;
|
||||
float: left;
|
||||
margin: 0 15px 0 0;
|
||||
}
|
||||
#of_container .sorter ul h3 {
|
||||
margin: 0 0 10px;
|
||||
text-align: center;
|
||||
color: #777;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
#of_container .sorter ul li {
|
||||
border: 1px solid #DFDFDF;
|
||||
cursor: move;
|
||||
font-weight: bold;
|
||||
margin-bottom:10px;
|
||||
padding:0 10px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background-color: #F1F1F1;
|
||||
background-image: -ms-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: -moz-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: -o-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));
|
||||
background-image: -webkit-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: linear-gradient(top,#f9f9f9,#ececec);
|
||||
overflow: hidden;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-moz-box-shadow: inset 0 1px 0 #fff;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fff;
|
||||
box-shadow: inset 0 1px 0 #fff;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
|
||||
#of_container #content .section-sorter li.placeholder {
|
||||
background:#f9f9f9;
|
||||
border-width:1px;
|
||||
border-style:dashed;
|
||||
height:40px;}
|
||||
|
||||
#of_container #content .section-slider li.placeholder {
|
||||
background:#f9f9f9;
|
||||
border-width:1px;
|
||||
border-style:dashed;
|
||||
height:33px;}
|
||||
|
||||
|
||||
#of_container textarea, #of_container input, #of_container select, #of_container button{
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
}
|
||||
#of_container .controls input, #of_container .controls select, #of_container .controls textarea {
|
||||
margin-bottom: 9px !important;
|
||||
background-color: #f1f1f1;
|
||||
border: 1px solid;
|
||||
border-color: #ccc #e6e6e6 #e6e6e6 #ccc;
|
||||
width: 340px;
|
||||
padding: 4px;
|
||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
#of_container .controls input:hover, #of_container .controls textarea:hover {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
#of_container .controls input:focus, #of_container .controls textarea:focus {
|
||||
background-color: #fff;
|
||||
border-color: #ccc #e6e6e6 #e6e6e6 #ccc;
|
||||
outline:0;
|
||||
}
|
||||
|
||||
#of_container .controls .upload {
|
||||
width: 340px;
|
||||
}
|
||||
|
||||
|
||||
#of_container .controls select {
|
||||
height: 28px;
|
||||
padding: 4px 5px;
|
||||
width: 340px
|
||||
}
|
||||
#of_container .controls textarea {
|
||||
width: 345px;
|
||||
}
|
||||
#of_container input[type=text] {
|
||||
width: 340px;
|
||||
}
|
||||
#of_container input.checkbox {
|
||||
width: 30px;
|
||||
}
|
||||
#of_container input.of-radio {
|
||||
width: 30px;
|
||||
}
|
||||
label.radio, label.multicheck {
|
||||
position: relative;
|
||||
}
|
||||
#of_container .controls .input-text-small {
|
||||
width: 60px;
|
||||
margin-right:10px
|
||||
}
|
||||
#of_container .meta-two {
|
||||
margin-right:10px
|
||||
}
|
||||
#of_container .controls .of-color {
|
||||
float:left;
|
||||
width: 70px;
|
||||
margin-left:5px; /* font-size:20px; height:34px;*/
|
||||
}
|
||||
#of_container #content .section-typography .controls {
|
||||
width:440px
|
||||
}
|
||||
#of_container #content .section-typography .explain {
|
||||
width:130px
|
||||
}
|
||||
#of_container .controls .of-typography-size {
|
||||
width:70px;
|
||||
float:left
|
||||
}
|
||||
#of_container .controls .of-typography-unit {
|
||||
width:60px;
|
||||
float:left
|
||||
}
|
||||
#of_container .controls .of-typography-face {
|
||||
width:145px;
|
||||
float:left
|
||||
}
|
||||
#of_container .controls .of-typography-style {
|
||||
width:95px;
|
||||
float:left
|
||||
}
|
||||
#of_container .controls .of-radio-img-img {
|
||||
border:3px solid #fff;
|
||||
margin:0 5px 10px 0;
|
||||
display:none;
|
||||
cursor:pointer;
|
||||
float:left;
|
||||
}
|
||||
#of_container .controls .of-radio-img-selected {
|
||||
border:3px solid #ccc
|
||||
}
|
||||
#of_container .controls .of-radio-img-img:hover {
|
||||
opacity:.8;
|
||||
}
|
||||
|
||||
#of_container .controls .of-radio-tile-img {
|
||||
width:50px;
|
||||
height:50px;
|
||||
border:3px solid #f9f9f9;
|
||||
margin:0 5px 10px 0;
|
||||
display:none;
|
||||
cursor:pointer;
|
||||
float:left;
|
||||
}
|
||||
#of_container .controls .of-radio-tile-selected {
|
||||
border:3px solid #ccc
|
||||
}
|
||||
#of_container .controls .of-radio-tile-img:hover {
|
||||
opacity:.8;
|
||||
}
|
||||
|
||||
#of_container .controls .of-border-width {
|
||||
width:70px;
|
||||
float:left
|
||||
}
|
||||
#of_container .controls .of-border-style {
|
||||
width:95px;
|
||||
float:left
|
||||
}
|
||||
#of_container .group {
|
||||
display:none;
|
||||
padding-bottom:20px;
|
||||
}
|
||||
#of_container .group h2 {
|
||||
display:none;
|
||||
border-bottom:3px solid #e7e7e7
|
||||
}
|
||||
#of_container .controls input:focus, #of_container select:focus, #of_container textarea:focus {
|
||||
background:#fff;
|
||||
}
|
||||
|
||||
#of_container .accept {
|
||||
background: #DBF6BE no-repeat 10px center;
|
||||
border: solid #9BBF65;
|
||||
border-width: 0px 1px 1px 1px;
|
||||
color: #060;
|
||||
font-weight: bold;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
#of_container .warning {
|
||||
background: #ffeeee no-repeat 10px center;
|
||||
;
|
||||
border: solid #dfbfbf;
|
||||
border-width: 0px 1px 1px 1px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
#of_container .update_available {
|
||||
background: #FFFEEB no-repeat 10px center;
|
||||
border: solid #CCCCCC;
|
||||
border-width: 0px 1px 1px 1px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
#of_container .of-save-popup {
|
||||
position:absolute;
|
||||
background:rgba(0, 0, 0, 0.5);
|
||||
color:#fff;
|
||||
font-size:24px;
|
||||
text-align:center;
|
||||
display:none;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
#of_container .of-save-popup div{
|
||||
background-repeat: no-repeat;
|
||||
background-position: 20px 50%;
|
||||
padding:30px 30px 30px 60px;
|
||||
}
|
||||
#of_container .of-save-save {
|
||||
background-image: url(../images/button_check.png);
|
||||
}
|
||||
#of_container .of-save-reset {
|
||||
background-image: url(../images/sign_warning.png);
|
||||
}
|
||||
#of_container .of-save-fail {
|
||||
background-image:url(../images/stop.png);
|
||||
}
|
||||
|
||||
#of_container .accept,
|
||||
#of_container .warning,
|
||||
#of_container .update_available,
|
||||
#of_container .of-save-popup {
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
#of_container .upload_button_div {
|
||||
margin-top:7px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
#of_container .button {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
border-color: #dfdfdf;
|
||||
background-color: #fff;
|
||||
margin:4px 0 4px;
|
||||
}
|
||||
|
||||
|
||||
#of_container .button:hover,#of_container .button_hover {
|
||||
border-color: #bbb;
|
||||
color: #464646;
|
||||
}
|
||||
|
||||
#of_container .button_active {
|
||||
background:#eee url(../../images/white-grad-active.png) repeat-x scroll left top;
|
||||
}
|
||||
|
||||
#of_container .image_reset_button, #of_container .mlu_remove_button {
|
||||
margin-left:10px;
|
||||
color:#ef521d;
|
||||
}
|
||||
|
||||
#of_container .image_reset_button:hover, #of_container .mlu_remove_button:hover {
|
||||
color:red;
|
||||
}
|
||||
|
||||
#of_container .upload-error {
|
||||
float:left;
|
||||
color:#666;
|
||||
font-size:10px;
|
||||
font-weight:bold;
|
||||
text-decoration:none;
|
||||
text-shadow:1px 1px 0 #FFFFFF;
|
||||
margin: 0 10px 0 0;
|
||||
padding:3px 10px;
|
||||
background:#FFDFEC;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#of_container .reset-button {
|
||||
font-family:Arial,Verdana,sans-serif;
|
||||
float:left;
|
||||
margin:0 ;
|
||||
color: #ef521d;
|
||||
border-color: #bbb;
|
||||
}
|
||||
|
||||
#of_container .reset-button:hover { color: #ef521d; border-color: #888}
|
||||
|
||||
#of_container .slide_add_button { float:right; margin-top:10px; }
|
||||
|
||||
|
||||
#of_container .save_bar {
|
||||
background: #f3f3f3;
|
||||
border:solid #ccc;
|
||||
border-width:0px 1px 1px 1px;
|
||||
padding: 10px 20px 0px 20px;
|
||||
height: 35px;
|
||||
text-align: right;
|
||||
-webkit-border-radius: 0 0 3px 3px;
|
||||
-moz-border-radius: 0 0 3px 3px;
|
||||
border-radius: 0 0 3px 3px;
|
||||
-moz-box-shadow: inset 0 1px 0 #fff;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fff;
|
||||
box-shadow: inset 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
#of_save {
|
||||
font-family: Arial,Verdana,sans-serif;
|
||||
float:right;
|
||||
}
|
||||
|
||||
#of_save:hover {
|
||||
border:1px solid #111 !important;
|
||||
}
|
||||
|
||||
#of_container .hide {
|
||||
display:none
|
||||
}
|
||||
#of_container .ajax-loading-img-top {
|
||||
margin: 5px 4px 0;
|
||||
float:left
|
||||
}
|
||||
#of_container .ajax-loading-img-bottom {
|
||||
margin: 5px 4px 0;
|
||||
}
|
||||
#of_container .ajax-reset-loading-img {
|
||||
display: block;
|
||||
margin-left: 100px;
|
||||
}
|
||||
|
||||
#of_container .screenshot {
|
||||
max-width:340px;
|
||||
margin-bottom:9px;
|
||||
}
|
||||
|
||||
#of_container .of-uploaded-image {
|
||||
|
||||
}
|
||||
|
||||
#of_container .of-option-image {
|
||||
max-width:340px;
|
||||
padding: 5px;
|
||||
border:1px solid #e3e3e3;
|
||||
background:#f7f7f7;
|
||||
-moz-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
#of_container .select_wrapper {
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;
|
||||
font-size: 12px;
|
||||
background: #F1F1F1 url(../images/select.png) no-repeat right center;
|
||||
border-color: #CCC #E6E6E6 #E6E6E6 #CCC;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
float: left;
|
||||
height: 26px;
|
||||
width: 344px;
|
||||
margin: 0;
|
||||
margin-bottom: 9px !important;
|
||||
width: 340px;
|
||||
display: block;
|
||||
color: #888;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#of_container .select_wrapper:hover {background-color:#f9f9f9;}
|
||||
|
||||
#of_container .mini .controls select, #of_container #content .section .mini .controls, #of_container .controls .typography-size, #of_container .controls .border-width,#of_container .controls .mini,#of_container .mini .controls input, #of_container #content .mini .controls {width: 70px;}
|
||||
#of_container .controls .typography-face {width: 145px;}
|
||||
#of_container .controls .typography-style, #of_container .controls .border-style {width: 95px;}
|
||||
#of_container .controls .typography-size,#of_container .controls .typography-face,#of_container .controls .typography-style, #of_container .controls .border-width, #of_container .controls .border-style {margin-right:5px;}
|
||||
|
||||
#of_container #content .mini .explain {
|
||||
width:500px;
|
||||
}
|
||||
#of_container .of-notice {
|
||||
background: #ffd1d1;
|
||||
border:1px solid #DFDFDF;
|
||||
-moz-border-radius:8px;
|
||||
text-align: center;
|
||||
margin-bottom: 15px
|
||||
}
|
||||
|
||||
#of_container .slider li {
|
||||
width: 345px;
|
||||
border: 1px solid #dfdfdf;
|
||||
background:#f9f9f9;
|
||||
overflow:hidden;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-moz-box-shadow: inset 0 1px 0 #fff;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fff;
|
||||
box-shadow: inset 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
#of_container .slide_header {
|
||||
cursor:move;
|
||||
height:32px;
|
||||
padding-left:10px;
|
||||
padding-right:20px;
|
||||
line-height:32px;
|
||||
background-color: #F1F1F1;
|
||||
margin: 1px 0 -1px 0;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
background-image: -ms-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: -moz-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: -o-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));
|
||||
background-image: -webkit-linear-gradient(top,#f9f9f9,#ececec);
|
||||
background-image: linear-gradient(top,#f9f9f9,#ececec);
|
||||
overflow:hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#of_container .slide_body {
|
||||
display:none;
|
||||
padding:10px 10px 10px 11px;
|
||||
}
|
||||
|
||||
|
||||
#of_container .slider li input,#of_container .slider li textarea,#of_container .slider li .screenshot,#of_container .slider li .of-option-image {
|
||||
width:311px;
|
||||
}
|
||||
|
||||
#of_container a.slide_edit_button, #of_container a.slide_delete_button {
|
||||
text-indent:-9999px;
|
||||
font-size:0;
|
||||
}
|
||||
#of_container a.slide_edit_button {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width:32px;
|
||||
height:32px;
|
||||
background: url(../images/dropdown-arrow.png) no-repeat 9px -28px;
|
||||
}
|
||||
#of_container a:hover.slide_edit_button {
|
||||
background: url(../images/dropdown-arrow.png) no-repeat 9px 11px;}
|
||||
|
||||
#of_container a.slide_delete_button {
|
||||
float: right;
|
||||
margin: 0 0 0 7px;
|
||||
width:16px;
|
||||
height:16px;
|
||||
background: url(../images/icon-delete.png) no-repeat
|
||||
}
|
||||
|
||||
#of_container .select_wrapper span {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
z-index: 2;
|
||||
padding-left: 6px;
|
||||
position:absolute;
|
||||
left:0;
|
||||
}
|
||||
|
||||
#of_container .select_wrapper .select {
|
||||
cursor: pointer;
|
||||
height: 28px;
|
||||
margin: 0;
|
||||
-moz-opacity: 0;
|
||||
filter: alpha(opacity: 0);
|
||||
opacity: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
width: inherit;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
#of_backup {
|
||||
margin: 40px 20px;
|
||||
width: 600px;
|
||||
}
|
||||
#of_backup textarea {
|
||||
margin-bottom: 9px !important;
|
||||
background-color: #F1F1F1;
|
||||
border: 1px solid;
|
||||
width: 100%;
|
||||
padding: 4px;
|
||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
border-color: #CCC #E6E6E6 #E6E6E6 #CCC;
|
||||
}
|
||||
|
||||
#of_container #content .section-backup .controls { width: 80%}
|
||||
#of_container #content .section-backup .explain {
|
||||
display:none
|
||||
}
|
||||
#of_container #content .section-backup .backup-box {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
#of_container #content .section-backup .instructions {
|
||||
margin: 0 0 10px;
|
||||
color: #777;
|
||||
}
|
||||
#of_container #content .section-backup .button, #of_container #content .section-transfer .button {
|
||||
margin: 0 25px 0 0;
|
||||
}
|
||||
|
||||
/* google fonts previewer field style */
|
||||
#of_container p.google_font_preview{
|
||||
display: block;
|
||||
border: 1px dotted lightgray;
|
||||
float: left;
|
||||
padding: 10px;
|
||||
font-size: 10pt;
|
||||
width: 318px;
|
||||
height: auto;
|
||||
margin: 0 0 10px 0;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.temphide {display:none;}
|
||||
/*-------------------------------------------------------------------------------------------*/
|
||||
/* GENERAL STYLES */
|
||||
/*-------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* http://sonspring.com/journal/clearing-floats */
|
||||
|
||||
html body * span.clear, html body * div.clear, html body * li.clear, html body * dd.clear {
|
||||
background: none;
|
||||
border: 0;
|
||||
clear: both;
|
||||
display: block;
|
||||
float: none;
|
||||
font-size: 0;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------------------*/
|
||||
/* Tipsy
|
||||
/*-------------------------------------------------------------------------------------------*/
|
||||
.tipsy { font-size: 10px; position: absolute; padding: 5px; z-index: 100000; }
|
||||
.tipsy-inner { background-color: #000; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; }
|
||||
|
||||
/* Rounded corners */
|
||||
.tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
|
||||
|
||||
/* Uncomment for shadow */
|
||||
/*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/
|
||||
|
||||
.tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; }
|
||||
|
||||
/* Rules to colour arrows */
|
||||
.tipsy-arrow-n { border-bottom-color: #000; }
|
||||
.tipsy-arrow-s { border-top-color: #000; }
|
||||
.tipsy-arrow-e { border-left-color: #000; }
|
||||
.tipsy-arrow-w { border-right-color: #000; }
|
||||
|
||||
.tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
|
||||
.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
|
||||
.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
|
||||
.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
|
||||
.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
|
||||
.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
|
||||
.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }
|
||||
.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------------------*/
|
||||
/* Switch
|
||||
/*-------------------------------------------------------------------------------------------*/
|
||||
/*p.switch-options{ margin: 0; }*/
|
||||
.cb-enable, .cb-disable, .cb-enable span, .cb-disable span { background: url(../images/switch.gif) repeat-x; display: block; float: left; }
|
||||
.cb-enable span, .cb-disable span { line-height: 30px; display: block; background-repeat: no-repeat; font-weight: bold; }
|
||||
.cb-enable span { background-position: left -90px; padding: 0 10px; }
|
||||
.cb-disable span { background-position: right -180px;padding: 0 10px; }
|
||||
.cb-disable.selected { background-position: 0 -30px; }
|
||||
.cb-disable.selected span { background-position: right -210px; color: #fff; }
|
||||
.cb-enable.selected { background-position: 0 -60px; }
|
||||
.cb-enable.selected span { background-position: left -150px; color: #fff; }
|
||||
.switch-options label { cursor: pointer; }
|
||||
.switch-options input { display: none; }
|
||||
.cb-enable span, .cb-disable span{
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}/*disable text selection*/
|
177
wp-content/themes/nuzi/admin/assets/css/colorpicker.css
Normal file
@ -0,0 +1,177 @@
|
||||
.colorpicker {
|
||||
width: 356px;
|
||||
height: 176px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
background: url(../images/colorpicker/colorpicker_background.png);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
display: none;
|
||||
}
|
||||
.colorpicker_color {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
left: 14px;
|
||||
top: 13px;
|
||||
position: absolute;
|
||||
background: #f00;
|
||||
overflow: hidden;
|
||||
cursor: crosshair;
|
||||
}
|
||||
.colorpicker_color div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background: url(../images/colorpicker/colorpicker_overlay.png);
|
||||
}
|
||||
.colorpicker_color div div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
overflow: hidden;
|
||||
background: url(../images/colorpicker/colorpicker_select.gif);
|
||||
margin: -5px 0 0 -5px;
|
||||
}
|
||||
.colorpicker_hue {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
left: 171px;
|
||||
width: 35px;
|
||||
height: 150px;
|
||||
cursor: n-resize;
|
||||
}
|
||||
.colorpicker_hue div {
|
||||
position: absolute;
|
||||
width: 35px;
|
||||
height: 9px;
|
||||
overflow: hidden;
|
||||
background: url(../images/colorpicker/colorpicker_indic.gif) left top;
|
||||
margin: -4px 0 0 0;
|
||||
left: 0px;
|
||||
}
|
||||
.colorpicker_new_color {
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
left: 213px;
|
||||
top: 13px;
|
||||
background: #f00;
|
||||
}
|
||||
.colorpicker_current_color {
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
left: 283px;
|
||||
top: 13px;
|
||||
background: #f00;
|
||||
}
|
||||
.colorpicker input {
|
||||
background-color: transparent;
|
||||
border: 1px solid transparent;
|
||||
position: absolute;
|
||||
font-size: 10px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #898989;
|
||||
top: 4px;
|
||||
right: 11px;
|
||||
text-align: right;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 12px;
|
||||
}
|
||||
.colorpicker_hex {
|
||||
position: absolute;
|
||||
width: 72px;
|
||||
height: 22px;
|
||||
background: url(../images/colorpicker/colorpicker_hex.png) top;
|
||||
left: 212px;
|
||||
top: 142px;
|
||||
}
|
||||
.colorpicker_hex input {
|
||||
right: 6px;
|
||||
}
|
||||
.colorpicker_field {
|
||||
height: 22px;
|
||||
width: 62px;
|
||||
background-position: top;
|
||||
position: absolute;
|
||||
}
|
||||
.colorpicker_field span {
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 22px;
|
||||
overflow: hidden;
|
||||
top: 0;
|
||||
right: 0;
|
||||
cursor: n-resize;
|
||||
}
|
||||
.colorpicker_rgb_r {
|
||||
background-image: url(../images/colorpicker/colorpicker_rgb_r.png);
|
||||
top: 52px;
|
||||
left: 212px;
|
||||
}
|
||||
.colorpicker_rgb_g {
|
||||
background-image: url(../images/colorpicker/colorpicker_rgb_g.png);
|
||||
top: 82px;
|
||||
left: 212px;
|
||||
}
|
||||
.colorpicker_rgb_b {
|
||||
background-image: url(../images/colorpicker/colorpicker_rgb_b.png);
|
||||
top: 112px;
|
||||
left: 212px;
|
||||
}
|
||||
.colorpicker_hsb_h {
|
||||
background-image: url(../images/colorpicker/colorpicker_hsb_h.png);
|
||||
top: 52px;
|
||||
left: 282px;
|
||||
}
|
||||
.colorpicker_hsb_s {
|
||||
background-image: url(../images/colorpicker/colorpicker_hsb_s.png);
|
||||
top: 82px;
|
||||
left: 282px;
|
||||
}
|
||||
.colorpicker_hsb_b {
|
||||
background-image: url(../images/colorpicker/colorpicker_hsb_b.png);
|
||||
top: 112px;
|
||||
left: 282px;
|
||||
}
|
||||
.colorpicker_submit {
|
||||
position: absolute;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: url(../images/colorpicker/colorpicker_submit.png) top;
|
||||
left: 322px;
|
||||
top: 142px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.colorpicker_focus {
|
||||
background-position: center;
|
||||
}
|
||||
.colorpicker_hex.colorpicker_focus {
|
||||
background-position: bottom;
|
||||
}
|
||||
.colorpicker_submit.colorpicker_focus {
|
||||
background-position: bottom;
|
||||
}
|
||||
.colorpicker_slider {
|
||||
background-position: bottom;
|
||||
}
|
||||
|
||||
.colorSelector {
|
||||
position: relative;
|
||||
width: 27px;
|
||||
height: 27px;
|
||||
background: url(../images/colorpicker/select.png);
|
||||
float:left;
|
||||
}
|
||||
.colorSelector div {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 3px;
|
||||
width: 21px;
|
||||
height: 19px;
|
||||
background: url(../images/colorpicker/select.png) center;
|
||||
}
|
85
wp-content/themes/nuzi/admin/assets/css/jquery-ui-custom.css
Normal file
@ -0,0 +1,85 @@
|
||||
/*
|
||||
* jQuery UI CSS Framework 1.8.14
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||
.ui-helper-clearfix { display: inline-block; }
|
||||
/* required comment for clearfix to work in Opera \*/
|
||||
* html .ui-helper-clearfix { height:1%; }
|
||||
.ui-helper-clearfix { display:block; }
|
||||
/* end clearfix */
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI Slider 1.8.14
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider#theming
|
||||
*/
|
||||
.ui-slider { position: relative; text-align: left; background:#ccc; border-radius:2px; width:200px; display:inline-block; margin-right:10px; border: 1px solid #999; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 28px; height: 28px; cursor: pointer; background:url(../images/handle.png) no-repeat center center; border:0; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal {
|
||||
height: .8em;
|
||||
background: #8fc4ef; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #8fc4ef 0%, #629bd2 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#8fc4ef), color-stop(100%,#629bd2)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #8fc4ef 0%,#629bd2 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #8fc4ef 0%,#629bd2 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #8fc4ef 0%,#629bd2 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #8fc4ef 0%,#629bd2 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8fc4ef', endColorstr='#629bd2',GradientType=0 ); /* IE6-9 */
|
||||
|
||||
border:1px solid #0088F7;
|
||||
border-color:#0088F7 #0088F7 #2B5893;
|
||||
|
||||
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.2);
|
||||
-moz-box-shadow: 0 1px 0 rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.2);
|
||||
box-shadow: 0 1px 0 rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.2);
|
||||
}
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -9px; margin-left: -12px; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }
|
BIN
wp-content/themes/nuzi/admin/assets/images/1col.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/2-col-portfolio.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/2cl.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/2cr.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/3-col-portfolio.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/3cm.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/3cr.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/4-col-portfolio.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/accept.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/backup.png
Normal file
After Width: | Height: | Size: 745 B |
BIN
wp-content/themes/nuzi/admin/assets/images/button_check.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/color.png
Normal file
After Width: | Height: | Size: 902 B |
BIN
wp-content/themes/nuzi/admin/assets/images/colorpicker/blank.gif
Normal file
After Width: | Height: | Size: 45 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 532 B |
After Width: | Height: | Size: 970 B |
After Width: | Height: | Size: 1012 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 86 B |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 970 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 984 B |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.6 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/custom-css.png
Normal file
After Width: | Height: | Size: 521 B |
BIN
wp-content/themes/nuzi/admin/assets/images/dropdown-arrow.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/favicon.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/footer/1.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/footer/2.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/footer/3.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/footer/4.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/general.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/handle.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/header-and-footer.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-add.png
Normal file
After Width: | Height: | Size: 733 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-backup.png
Normal file
After Width: | Height: | Size: 613 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-delete.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-docs.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-edit.png
Normal file
After Width: | Height: | Size: 618 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-home.png
Normal file
After Width: | Height: | Size: 727 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-info.png
Normal file
After Width: | Height: | Size: 734 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-notice.png
Normal file
After Width: | Height: | Size: 664 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-paint.png
Normal file
After Width: | Height: | Size: 805 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-settings.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-slider.png
Normal file
After Width: | Height: | Size: 450 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon-warn.png
Normal file
After Width: | Height: | Size: 687 B |
BIN
wp-content/themes/nuzi/admin/assets/images/icon_option.png
Normal file
After Width: | Height: | Size: 989 B |
BIN
wp-content/themes/nuzi/admin/assets/images/loading-bottom.gif
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/select.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/sign_warning.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/social.png
Normal file
After Width: | Height: | Size: 788 B |
BIN
wp-content/themes/nuzi/admin/assets/images/stop.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/switch.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
wp-content/themes/nuzi/admin/assets/images/toggle_tabs.png
Normal file
After Width: | Height: | Size: 358 B |
BIN
wp-content/themes/nuzi/admin/assets/images/typography.png
Normal file
After Width: | Height: | Size: 689 B |
After Width: | Height: | Size: 180 B |
BIN
wp-content/themes/nuzi/admin/assets/images/warning.png
Normal file
After Width: | Height: | Size: 308 B |
BIN
wp-content/themes/nuzi/admin/assets/images/wrench.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
wp-content/themes/nuzi/admin/assets/images/wrench16.png
Normal file
After Width: | Height: | Size: 533 B |
606
wp-content/themes/nuzi/admin/assets/js/ajaxupload.js
Normal file
@ -0,0 +1,606 @@
|
||||
/**
|
||||
* AJAX Upload
|
||||
* Project page - http://valums.com/ajax-upload/
|
||||
* Copyright (c) 2008 Andris Valums, http://valums.com
|
||||
* Licensed under the MIT license (http://valums.com/mit-license/)
|
||||
*/
|
||||
(function(){
|
||||
|
||||
var d = document, w = window;
|
||||
|
||||
/**
|
||||
* Get element by id
|
||||
*/
|
||||
function get(element){
|
||||
if (typeof element == "string")
|
||||
element = d.getElementById(element);
|
||||
return element;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attaches event to a dom element
|
||||
*/
|
||||
function addEvent(el, type, fn){
|
||||
if (w.addEventListener){
|
||||
el.addEventListener(type, fn, false);
|
||||
} else if (w.attachEvent){
|
||||
var f = function(){
|
||||
fn.call(el, w.event);
|
||||
};
|
||||
el.attachEvent('on' + type, f)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates and returns element from html chunk
|
||||
*/
|
||||
var toElement = function(){
|
||||
var div = d.createElement('div');
|
||||
return function(html){
|
||||
div.innerHTML = html;
|
||||
var el = div.childNodes[0];
|
||||
div.removeChild(el);
|
||||
return el;
|
||||
}
|
||||
}();
|
||||
|
||||
function hasClass(ele,cls){
|
||||
return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
|
||||
}
|
||||
function addClass(ele,cls) {
|
||||
if (!hasClass(ele,cls)) ele.className += " "+cls;
|
||||
}
|
||||
function removeClass(ele,cls) {
|
||||
var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
|
||||
ele.className=ele.className.replace(reg,' ');
|
||||
}
|
||||
|
||||
// getOffset function copied from jQuery lib (http://jquery.com/)
|
||||
if (document.documentElement["getBoundingClientRect"]){
|
||||
// Get Offset using getBoundingClientRect
|
||||
// http://ejohn.org/blog/getboundingclientrect-is-awesome/
|
||||
var getOffset = function(el){
|
||||
var box = el.getBoundingClientRect(),
|
||||
doc = el.ownerDocument,
|
||||
body = doc.body,
|
||||
docElem = doc.documentElement,
|
||||
|
||||
// for ie
|
||||
clientTop = docElem.clientTop || body.clientTop || 0,
|
||||
clientLeft = docElem.clientLeft || body.clientLeft || 0,
|
||||
|
||||
// In Internet Explorer 7 getBoundingClientRect property is treated as physical,
|
||||
// while others are logical. Make all logical, like in IE8.
|
||||
|
||||
zoom = 1;
|
||||
|
||||
if (body.getBoundingClientRect) {
|
||||
var bound = body.getBoundingClientRect();
|
||||
zoom = (bound.right - bound.left)/body.clientWidth;
|
||||
}
|
||||
|
||||
if (zoom > 1){
|
||||
clientTop = 0;
|
||||
clientLeft = 0;
|
||||
}
|
||||
|
||||
var top = box.top/zoom + (window.pageYOffset || docElem && docElem.scrollTop/zoom || body.scrollTop/zoom) - clientTop,
|
||||
left = box.left/zoom + (window.pageXOffset|| docElem && docElem.scrollLeft/zoom || body.scrollLeft/zoom) - clientLeft;
|
||||
|
||||
return {
|
||||
top: top,
|
||||
left: left
|
||||
};
|
||||
}
|
||||
|
||||
} else {
|
||||
// Get offset adding all offsets
|
||||
var getOffset = function(el){
|
||||
if (w.jQuery){
|
||||
return jQuery(el).offset();
|
||||
}
|
||||
|
||||
var top = 0, left = 0;
|
||||
do {
|
||||
top += el.offsetTop || 0;
|
||||
left += el.offsetLeft || 0;
|
||||
}
|
||||
while (el = el.offsetParent);
|
||||
|
||||
return {
|
||||
left: left,
|
||||
top: top
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function getBox(el){
|
||||
var left, right, top, bottom;
|
||||
var offset = getOffset(el);
|
||||
left = offset.left;
|
||||
top = offset.top;
|
||||
|
||||
right = left + el.offsetWidth;
|
||||
bottom = top + el.offsetHeight;
|
||||
|
||||
return {
|
||||
left: left,
|
||||
right: right,
|
||||
top: top,
|
||||
bottom: bottom
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Crossbrowser mouse coordinates
|
||||
*/
|
||||
function getMouseCoords(e){
|
||||
// pageX/Y is not supported in IE
|
||||
// http://www.quirksmode.org/dom/w3c_cssom.html
|
||||
if (!e.pageX && e.clientX){
|
||||
// In Internet Explorer 7 some properties (mouse coordinates) are treated as physical,
|
||||
// while others are logical (offset).
|
||||
var zoom = 1;
|
||||
var body = document.body;
|
||||
|
||||
if (body.getBoundingClientRect) {
|
||||
var bound = body.getBoundingClientRect();
|
||||
zoom = (bound.right - bound.left)/body.clientWidth;
|
||||
}
|
||||
|
||||
return {
|
||||
x: e.clientX / zoom + d.body.scrollLeft + d.documentElement.scrollLeft,
|
||||
y: e.clientY / zoom + d.body.scrollTop + d.documentElement.scrollTop
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
x: e.pageX,
|
||||
y: e.pageY
|
||||
};
|
||||
|
||||
}
|
||||
/**
|
||||
* Function generates unique id
|
||||
*/
|
||||
var getUID = function(){
|
||||
var id = 0;
|
||||
return function(){
|
||||
return 'ValumsAjaxUpload' + id++;
|
||||
}
|
||||
}();
|
||||
|
||||
function fileFromPath(file){
|
||||
return file.replace(/.*(\/|\\)/, "");
|
||||
}
|
||||
|
||||
function getExt(file){
|
||||
return (/[.]/.exec(file)) ? /[^.]+$/.exec(file.toLowerCase()) : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Cross-browser way to get xhr object
|
||||
*/
|
||||
var getXhr = function(){
|
||||
var xhr;
|
||||
|
||||
return function(){
|
||||
if (xhr) return xhr;
|
||||
|
||||
if (typeof XMLHttpRequest !== 'undefined') {
|
||||
xhr = new XMLHttpRequest();
|
||||
} else {
|
||||
var v = [
|
||||
"Microsoft.XmlHttp",
|
||||
"MSXML2.XmlHttp.5.0",
|
||||
"MSXML2.XmlHttp.4.0",
|
||||
"MSXML2.XmlHttp.3.0",
|
||||
"MSXML2.XmlHttp.2.0"
|
||||
];
|
||||
|
||||
for (var i=0; i < v.length; i++){
|
||||
try {
|
||||
xhr = new ActiveXObject(v[i]);
|
||||
break;
|
||||
} catch (e){}
|
||||
}
|
||||
}
|
||||
|
||||
return xhr;
|
||||
}
|
||||
}();
|
||||
|
||||
// Please use AjaxUpload , Ajax_upload will be removed in the next version
|
||||
Ajax_upload = AjaxUpload = function(button, options){
|
||||
if (button.jquery){
|
||||
// jquery object was passed
|
||||
button = button[0];
|
||||
} else if (typeof button == "string" && /^#.*/.test(button)){
|
||||
button = button.slice(1);
|
||||
}
|
||||
button = get(button);
|
||||
|
||||
this._input = null;
|
||||
this._button = button;
|
||||
this._disabled = false;
|
||||
this._submitting = false;
|
||||
// Variable changes to true if the button was clicked
|
||||
// 3 seconds ago (requred to fix Safari on Mac error)
|
||||
this._justClicked = false;
|
||||
this._parentDialog = d.body;
|
||||
|
||||
if (window.jQuery && jQuery.ui && jQuery.ui.dialog){
|
||||
var parentDialog = jQuery(this._button).parents('.ui-dialog');
|
||||
if (parentDialog.length){
|
||||
this._parentDialog = parentDialog[0];
|
||||
}
|
||||
}
|
||||
|
||||
this._settings = {
|
||||
// Location of the server-side upload script
|
||||
action: 'upload.php',
|
||||
// File upload name
|
||||
name: 'userfile',
|
||||
// Additional data to send
|
||||
data: {},
|
||||
// Submit file as soon as it's selected
|
||||
autoSubmit: true,
|
||||
// The type of data that you're expecting back from the server.
|
||||
// Html and xml are detected automatically.
|
||||
// Only useful when you are using json data as a response.
|
||||
// Set to "json" in that case.
|
||||
responseType: false,
|
||||
// Location of the server-side script that fixes Safari
|
||||
// hanging problem returning "Connection: close" header
|
||||
closeConnection: '',
|
||||
// Class applied to button when mouse is hovered
|
||||
hoverClass: 'button_hover',
|
||||
// When user selects a file, useful with autoSubmit disabled
|
||||
onChange: function(file, extension){},
|
||||
// Callback to fire before file is uploaded
|
||||
// You can return false to cancel upload
|
||||
onSubmit: function(file, extension){},
|
||||
// Fired when file upload is completed
|
||||
// WARNING! DO NOT USE "FALSE" STRING AS A RESPONSE!
|
||||
onComplete: function(file, response) {}
|
||||
};
|
||||
|
||||
// Merge the users options with our defaults
|
||||
for (var i in options) {
|
||||
this._settings[i] = options[i];
|
||||
}
|
||||
|
||||
this._createInput();
|
||||
this._rerouteClicks();
|
||||
}
|
||||
|
||||
// assigning methods to our class
|
||||
AjaxUpload.prototype = {
|
||||
setData : function(data){
|
||||
this._settings.data = data;
|
||||
},
|
||||
disable : function(){
|
||||
this._disabled = true;
|
||||
},
|
||||
enable : function(){
|
||||
this._disabled = false;
|
||||
},
|
||||
// removes instance
|
||||
destroy : function(){
|
||||
if(this._input){
|
||||
if(this._input.parentNode){
|
||||
this._input.parentNode.removeChild(this._input);
|
||||
}
|
||||
this._input = null;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Creates invisible file input above the button
|
||||
*/
|
||||
_createInput : function(){
|
||||
var self = this;
|
||||
var input = d.createElement("input");
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('name', this._settings.name);
|
||||
var styles = {
|
||||
'position' : 'absolute'
|
||||
,'margin': '-5px 0 0 -175px'
|
||||
,'padding': 0
|
||||
,'width': '220px'
|
||||
,'height': '30px'
|
||||
,'fontSize': '14px'
|
||||
,'opacity': 0
|
||||
,'cursor': 'pointer'
|
||||
,'display' : 'none'
|
||||
,'zIndex' : 2147483583 //Max zIndex supported by Opera 9.0-9.2x
|
||||
// Strange, I expected 2147483647
|
||||
// Doesn't work in IE :(
|
||||
//,'direction' : 'ltr'
|
||||
};
|
||||
for (var i in styles){
|
||||
input.style[i] = styles[i];
|
||||
}
|
||||
|
||||
// Make sure that element opacity exists
|
||||
// (IE uses filter instead)
|
||||
if ( ! (input.style.opacity === "0")){
|
||||
input.style.filter = "alpha(opacity=0)";
|
||||
}
|
||||
|
||||
this._parentDialog.appendChild(input);
|
||||
|
||||
addEvent(input, 'change', function(){
|
||||
// get filename from input
|
||||
var file = fileFromPath(this.value);
|
||||
if(self._settings.onChange.call(self, file, getExt(file)) == false ){
|
||||
return;
|
||||
}
|
||||
// Submit form when value is changed
|
||||
if (self._settings.autoSubmit){
|
||||
self.submit();
|
||||
}
|
||||
});
|
||||
|
||||
// Fixing problem with Safari
|
||||
// The problem is that if you leave input before the file select dialog opens
|
||||
// it does not upload the file.
|
||||
// As dialog opens slowly (it is a sheet dialog which takes some time to open)
|
||||
// there is some time while you can leave the button.
|
||||
// So we should not change display to none immediately
|
||||
addEvent(input, 'click', function(){
|
||||
self.justClicked = true;
|
||||
setTimeout(function(){
|
||||
// we will wait 3 seconds for dialog to open
|
||||
self.justClicked = false;
|
||||
}, 2500);
|
||||
});
|
||||
|
||||
this._input = input;
|
||||
},
|
||||
_rerouteClicks : function (){
|
||||
var self = this;
|
||||
|
||||
// IE displays 'access denied' error when using this method
|
||||
// other browsers just ignore click()
|
||||
// addEvent(this._button, 'click', function(e){
|
||||
// self._input.click();
|
||||
// });
|
||||
|
||||
var box, dialogOffset = {top:0, left:0}, over = false;
|
||||
|
||||
addEvent(self._button, 'mouseover', function(e){
|
||||
if (!self._input || over) return;
|
||||
|
||||
over = true;
|
||||
box = getBox(self._button);
|
||||
|
||||
if (self._parentDialog != d.body){
|
||||
dialogOffset = getOffset(self._parentDialog);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// We can't use mouseout on the button,
|
||||
// because invisible input is over it
|
||||
addEvent(document, 'mousemove', function(e){
|
||||
var input = self._input;
|
||||
if (!input || !over) return;
|
||||
|
||||
if (self._disabled){
|
||||
removeClass(self._button, self._settings.hoverClass);
|
||||
input.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
var c = getMouseCoords(e);
|
||||
|
||||
if ((c.x >= box.left) && (c.x <= box.right) &&
|
||||
(c.y >= box.top) && (c.y <= box.bottom)){
|
||||
|
||||
input.style.top = c.y - dialogOffset.top + 'px';
|
||||
input.style.left = c.x - dialogOffset.left + 'px';
|
||||
input.style.display = 'block';
|
||||
addClass(self._button, self._settings.hoverClass);
|
||||
|
||||
} else {
|
||||
// mouse left the button
|
||||
over = false;
|
||||
|
||||
var check = setInterval(function(){
|
||||
// if input was just clicked do not hide it
|
||||
// to prevent safari bug
|
||||
|
||||
if (self.justClicked){
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !over ){
|
||||
input.style.display = 'none';
|
||||
}
|
||||
|
||||
clearInterval(check);
|
||||
|
||||
}, 25);
|
||||
|
||||
|
||||
removeClass(self._button, self._settings.hoverClass);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
/**
|
||||
* Creates iframe with unique name
|
||||
*/
|
||||
_createIframe : function(){
|
||||
// unique name
|
||||
// We cannot use getTime, because it sometimes return
|
||||
// same value in safari :(
|
||||
var id = getUID();
|
||||
|
||||
// Remove ie6 "This page contains both secure and nonsecure items" prompt
|
||||
// http://tinyurl.com/77w9wh
|
||||
var iframe = toElement('<iframe src="javascript:false;" name="' + id + '" />');
|
||||
iframe.id = id;
|
||||
iframe.style.display = 'none';
|
||||
d.body.appendChild(iframe);
|
||||
return iframe;
|
||||
},
|
||||
/**
|
||||
* Upload file without refreshing the page
|
||||
*/
|
||||
submit : function(){
|
||||
var self = this, settings = this._settings;
|
||||
|
||||
if (this._input.value === ''){
|
||||
// there is no file
|
||||
return;
|
||||
}
|
||||
|
||||
// get filename from input
|
||||
var file = fileFromPath(this._input.value);
|
||||
|
||||
// execute user event
|
||||
if (! (settings.onSubmit.call(this, file, getExt(file)) == false)) {
|
||||
// Create new iframe for this submission
|
||||
var iframe = this._createIframe();
|
||||
|
||||
// Do not submit if user function returns false
|
||||
var form = this._createForm(iframe);
|
||||
form.appendChild(this._input);
|
||||
|
||||
// A pretty little hack to make uploads not hang in Safari. Just call this
|
||||
// immediately before the upload is submitted. This does an Ajax call to
|
||||
// the server, which returns an empty document with the "Connection: close"
|
||||
// header, telling Safari to close the active connection.
|
||||
// http://blog.airbladesoftware.com/2007/8/17/note-to-self-prevent-uploads-hanging-in-safari
|
||||
if (settings.closeConnection && /AppleWebKit|MSIE/.test(navigator.userAgent)){
|
||||
var xhr = getXhr();
|
||||
// Open synhronous connection
|
||||
xhr.open('GET', settings.closeConnection, false);
|
||||
xhr.send('');
|
||||
}
|
||||
|
||||
form.submit();
|
||||
|
||||
d.body.removeChild(form);
|
||||
form = null;
|
||||
this._input = null;
|
||||
|
||||
// create new input
|
||||
this._createInput();
|
||||
|
||||
var toDeleteFlag = false;
|
||||
|
||||
addEvent(iframe, 'load', function(e){
|
||||
|
||||
if (// For Safari
|
||||
iframe.src == "javascript:'%3Chtml%3E%3C/html%3E';" ||
|
||||
// For FF, IE
|
||||
iframe.src == "javascript:'<html></html>';"){
|
||||
|
||||
// First time around, do not delete.
|
||||
if( toDeleteFlag ){
|
||||
// Fix busy state in FF3
|
||||
setTimeout( function() {
|
||||
d.body.removeChild(iframe);
|
||||
}, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var doc = iframe.contentDocument ? iframe.contentDocument : frames[iframe.id].document;
|
||||
|
||||
// fixing Opera 9.26
|
||||
if (doc.readyState && doc.readyState != 'complete'){
|
||||
// Opera fires load event multiple times
|
||||
// Even when the DOM is not ready yet
|
||||
// this fix should not affect other browsers
|
||||
return;
|
||||
}
|
||||
|
||||
// fixing Opera 9.64
|
||||
if (doc.body && doc.body.innerHTML == "false"){
|
||||
// In Opera 9.64 event was fired second time
|
||||
// when body.innerHTML changed from false
|
||||
// to server response approx. after 1 sec
|
||||
return;
|
||||
}
|
||||
|
||||
var response;
|
||||
|
||||
if (doc.XMLDocument){
|
||||
// response is a xml document IE property
|
||||
response = doc.XMLDocument;
|
||||
} else if (doc.body){
|
||||
// response is html document or plain text
|
||||
response = doc.body.innerHTML;
|
||||
if (settings.responseType && settings.responseType.toLowerCase() == 'json'){
|
||||
// If the document was sent as 'application/javascript' or
|
||||
// 'text/javascript', then the browser wraps the text in a <pre>
|
||||
// tag and performs html encoding on the contents. In this case,
|
||||
// we need to pull the original text content from the text node's
|
||||
// nodeValue property to retrieve the unmangled content.
|
||||
// Note that IE6 only understands text/html
|
||||
if (doc.body.firstChild && doc.body.firstChild.nodeName.toUpperCase() == 'PRE'){
|
||||
response = doc.body.firstChild.firstChild.nodeValue;
|
||||
}
|
||||
if (response) {
|
||||
response = window["eval"]("(" + response + ")");
|
||||
} else {
|
||||
response = {};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// response is a xml document
|
||||
var response = doc;
|
||||
}
|
||||
|
||||
settings.onComplete.call(self, file, response);
|
||||
|
||||
// Reload blank page, so that reloading main page
|
||||
// does not re-submit the post. Also, remember to
|
||||
// delete the frame
|
||||
toDeleteFlag = true;
|
||||
|
||||
// Fix IE mixed content issue
|
||||
iframe.src = "javascript:'<html></html>';";
|
||||
});
|
||||
|
||||
} else {
|
||||
// clear input to allow user to select same file
|
||||
// Doesn't work in IE6
|
||||
// this._input.value = '';
|
||||
d.body.removeChild(this._input);
|
||||
this._input = null;
|
||||
|
||||
// create new input
|
||||
this._createInput();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Creates form, that will be submitted to iframe
|
||||
*/
|
||||
_createForm : function(iframe){
|
||||
var settings = this._settings;
|
||||
|
||||
// method, enctype must be specified here
|
||||
// because changing this attr on the fly is not allowed in IE 6/7
|
||||
var form = toElement('<form method="post" enctype="multipart/form-data"></form>');
|
||||
form.style.display = 'none';
|
||||
form.action = settings.action;
|
||||
form.target = iframe.name;
|
||||
d.body.appendChild(form);
|
||||
|
||||
// Create hidden input element for each data key
|
||||
for (var prop in settings.data){
|
||||
var el = d.createElement("input");
|
||||
el.type = 'hidden';
|
||||
el.name = prop;
|
||||
el.value = settings.data[prop];
|
||||
form.appendChild(el);
|
||||
}
|
||||
return form;
|
||||
}
|
||||
};
|
||||
})();
|
455
wp-content/themes/nuzi/admin/assets/js/colorpicker.js
Normal file
@ -0,0 +1,455 @@
|
||||
/**
|
||||
*
|
||||
* Color picker
|
||||
* Author: Stefan Petre www.eyecon.ro
|
||||
*
|
||||
* Dependencies: jQuery
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
var ColorPicker = function () {
|
||||
var
|
||||
ids = {},
|
||||
inAction,
|
||||
charMin = 65,
|
||||
visible,
|
||||
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
|
||||
defaults = {
|
||||
eventName: 'click',
|
||||
onShow: function () {},
|
||||
onBeforeShow: function(){},
|
||||
onHide: function () {},
|
||||
onChange: function () {},
|
||||
onSubmit: function () {},
|
||||
color: 'ff0000',
|
||||
livePreview: true,
|
||||
flat: false
|
||||
},
|
||||
fillRGBFields = function (hsb, cal) {
|
||||
var rgb = HSBToRGB(hsb);
|
||||
$(cal).data('colorpicker').fields
|
||||
.eq(1).val(rgb.r).end()
|
||||
.eq(2).val(rgb.g).end()
|
||||
.eq(3).val(rgb.b).end();
|
||||
},
|
||||
fillHSBFields = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').fields
|
||||
.eq(4).val(hsb.h).end()
|
||||
.eq(5).val(hsb.s).end()
|
||||
.eq(6).val(hsb.b).end();
|
||||
},
|
||||
fillHexFields = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').fields
|
||||
.eq(0).val(HSBToHex(hsb)).end();
|
||||
},
|
||||
setSelector = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
|
||||
$(cal).data('colorpicker').selectorIndic.css({
|
||||
left: parseInt(150 * hsb.s/100, 10),
|
||||
top: parseInt(150 * (100-hsb.b)/100, 10)
|
||||
});
|
||||
},
|
||||
setHue = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
|
||||
},
|
||||
setCurrentColor = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
||||
},
|
||||
setNewColor = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
||||
},
|
||||
keyDown = function (ev) {
|
||||
var pressedKey = ev.charCode || ev.keyCode || -1;
|
||||
if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
|
||||
return false;
|
||||
}
|
||||
var cal = $(this).parent().parent();
|
||||
if (cal.data('colorpicker').livePreview === true) {
|
||||
change.apply(this);
|
||||
}
|
||||
},
|
||||
change = function (ev) {
|
||||
var cal = $(this).parent().parent(), col;
|
||||
if (this.parentNode.className.indexOf('_hex') > 0) {
|
||||
cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
|
||||
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
||||
cal.data('colorpicker').color = col = fixHSB({
|
||||
h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
|
||||
s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
|
||||
b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
|
||||
});
|
||||
} else {
|
||||
cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
|
||||
r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
|
||||
g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
|
||||
b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
|
||||
}));
|
||||
}
|
||||
if (ev) {
|
||||
fillRGBFields(col, cal.get(0));
|
||||
fillHexFields(col, cal.get(0));
|
||||
fillHSBFields(col, cal.get(0));
|
||||
}
|
||||
setSelector(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
|
||||
},
|
||||
blur = function (ev) {
|
||||
var cal = $(this).parent().parent();
|
||||
cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus')
|
||||
},
|
||||
focus = function () {
|
||||
charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
|
||||
$(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
||||
$(this).parent().addClass('colorpicker_focus');
|
||||
},
|
||||
downIncrement = function (ev) {
|
||||
var field = $(this).parent().find('input').focus();
|
||||
var current = {
|
||||
el: $(this).parent().addClass('colorpicker_slider'),
|
||||
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
||||
y: ev.pageY,
|
||||
field: field,
|
||||
val: parseInt(field.val(), 10),
|
||||
preview: $(this).parent().parent().data('colorpicker').livePreview
|
||||
};
|
||||
$(document).bind('mouseup', current, upIncrement);
|
||||
$(document).bind('mousemove', current, moveIncrement);
|
||||
},
|
||||
moveIncrement = function (ev) {
|
||||
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
|
||||
if (ev.data.preview) {
|
||||
change.apply(ev.data.field.get(0), [true]);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
upIncrement = function (ev) {
|
||||
change.apply(ev.data.field.get(0), [true]);
|
||||
ev.data.el.removeClass('colorpicker_slider').find('input').focus();
|
||||
$(document).unbind('mouseup', upIncrement);
|
||||
$(document).unbind('mousemove', moveIncrement);
|
||||
return false;
|
||||
},
|
||||
downHue = function (ev) {
|
||||
var current = {
|
||||
cal: $(this).parent(),
|
||||
y: $(this).offset().top
|
||||
};
|
||||
current.preview = current.cal.data('colorpicker').livePreview;
|
||||
$(document).bind('mouseup', current, upHue);
|
||||
$(document).bind('mousemove', current, moveHue);
|
||||
},
|
||||
moveHue = function (ev) {
|
||||
change.apply(
|
||||
ev.data.cal.data('colorpicker')
|
||||
.fields
|
||||
.eq(4)
|
||||
.val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
|
||||
.get(0),
|
||||
[ev.data.preview]
|
||||
);
|
||||
return false;
|
||||
},
|
||||
upHue = function (ev) {
|
||||
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
$(document).unbind('mouseup', upHue);
|
||||
$(document).unbind('mousemove', moveHue);
|
||||
return false;
|
||||
},
|
||||
downSelector = function (ev) {
|
||||
var current = {
|
||||
cal: $(this).parent(),
|
||||
pos: $(this).offset()
|
||||
};
|
||||
current.preview = current.cal.data('colorpicker').livePreview;
|
||||
$(document).bind('mouseup', current, upSelector);
|
||||
$(document).bind('mousemove', current, moveSelector);
|
||||
},
|
||||
moveSelector = function (ev) {
|
||||
change.apply(
|
||||
ev.data.cal.data('colorpicker')
|
||||
.fields
|
||||
.eq(6)
|
||||
.val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
|
||||
.end()
|
||||
.eq(5)
|
||||
.val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
|
||||
.get(0),
|
||||
[ev.data.preview]
|
||||
);
|
||||
return false;
|
||||
},
|
||||
upSelector = function (ev) {
|
||||
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
$(document).unbind('mouseup', upSelector);
|
||||
$(document).unbind('mousemove', moveSelector);
|
||||
return false;
|
||||
},
|
||||
enterSubmit = function (ev) {
|
||||
$(this).addClass('colorpicker_focus');
|
||||
},
|
||||
leaveSubmit = function (ev) {
|
||||
$(this).removeClass('colorpicker_focus');
|
||||
},
|
||||
clickSubmit = function (ev) {
|
||||
var cal = $(this).parent();
|
||||
var col = cal.data('colorpicker').color;
|
||||
cal.data('colorpicker').origColor = col;
|
||||
setCurrentColor(col, cal.get(0));
|
||||
cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col));
|
||||
cal.hide();
|
||||
},
|
||||
show = function (ev) {
|
||||
var cal = $('#' + $(this).data('colorpickerId'));
|
||||
cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
|
||||
var pos = $(this).offset();
|
||||
var viewPort = getViewport();
|
||||
var top = pos.top + this.offsetHeight;
|
||||
var left = pos.left;
|
||||
if (top + 176 > viewPort.t + viewPort.h) {
|
||||
top -= this.offsetHeight + 176;
|
||||
} else {
|
||||
top += 5;
|
||||
}
|
||||
if (left + 356 > viewPort.l + viewPort.w) {
|
||||
left -= 356;
|
||||
}
|
||||
cal.css({left: left + 'px', top: top + 'px'});
|
||||
if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
|
||||
cal.show();
|
||||
}
|
||||
$(document).bind('mousedown', {cal: cal}, hide);
|
||||
return false;
|
||||
},
|
||||
hide = function (ev) {
|
||||
if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
|
||||
if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
|
||||
ev.data.cal.hide();
|
||||
}
|
||||
$(document).unbind('mousedown', hide);
|
||||
}
|
||||
},
|
||||
isChildOf = function(parentEl, el, container) {
|
||||
if (parentEl == el) {
|
||||
return true;
|
||||
}
|
||||
if (parentEl.contains) {
|
||||
return parentEl.contains(el);
|
||||
}
|
||||
if ( parentEl.compareDocumentPosition ) {
|
||||
return !!(parentEl.compareDocumentPosition(el) & 16);
|
||||
}
|
||||
var prEl = el.parentNode;
|
||||
while(prEl && prEl != container) {
|
||||
if (prEl == parentEl)
|
||||
return true;
|
||||
prEl = prEl.parentNode;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getViewport = function () {
|
||||
var m = document.compatMode == 'CSS1Compat';
|
||||
return {
|
||||
l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
||||
t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
|
||||
w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
|
||||
h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
|
||||
};
|
||||
},
|
||||
fixHSB = function (hsb) {
|
||||
return {
|
||||
h: Math.min(360, Math.max(0, hsb.h)),
|
||||
s: Math.min(100, Math.max(0, hsb.s)),
|
||||
b: Math.min(100, Math.max(0, hsb.b))
|
||||
};
|
||||
},
|
||||
fixRGB = function (rgb) {
|
||||
return {
|
||||
r: Math.min(255, Math.max(0, rgb.r)),
|
||||
g: Math.min(255, Math.max(0, rgb.g)),
|
||||
b: Math.min(255, Math.max(0, rgb.b))
|
||||
};
|
||||
},
|
||||
fixHex = function (hex) {
|
||||
var len = 6 - hex.length;
|
||||
if (len > 0) {
|
||||
var o = [];
|
||||
for (var i=0; i<len; i++) {
|
||||
o.push('0');
|
||||
}
|
||||
o.push(hex);
|
||||
hex = o.join('');
|
||||
}
|
||||
return hex;
|
||||
},
|
||||
HexToRGB = function (hex) {
|
||||
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
||||
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
||||
},
|
||||
HexToHSB = function (hex) {
|
||||
return RGBToHSB(HexToRGB(hex));
|
||||
},
|
||||
RGBToHSB = function (rgb) {
|
||||
var hsb = {};
|
||||
hsb.b = Math.max(Math.max(rgb.r,rgb.g),rgb.b);
|
||||
hsb.s = (hsb.b <= 0) ? 0 : Math.round(100*(hsb.b - Math.min(Math.min(rgb.r,rgb.g),rgb.b))/hsb.b);
|
||||
hsb.b = Math.round((hsb.b /255)*100);
|
||||
if((rgb.r==rgb.g) && (rgb.g==rgb.b)) hsb.h = 0;
|
||||
else if(rgb.r>=rgb.g && rgb.g>=rgb.b) hsb.h = 60*(rgb.g-rgb.b)/(rgb.r-rgb.b);
|
||||
else if(rgb.g>=rgb.r && rgb.r>=rgb.b) hsb.h = 60 + 60*(rgb.g-rgb.r)/(rgb.g-rgb.b);
|
||||
else if(rgb.g>=rgb.b && rgb.b>=rgb.r) hsb.h = 120 + 60*(rgb.b-rgb.r)/(rgb.g-rgb.r);
|
||||
else if(rgb.b>=rgb.g && rgb.g>=rgb.r) hsb.h = 180 + 60*(rgb.b-rgb.g)/(rgb.b-rgb.r);
|
||||
else if(rgb.b>=rgb.r && rgb.r>=rgb.g) hsb.h = 240 + 60*(rgb.r-rgb.g)/(rgb.b-rgb.g);
|
||||
else if(rgb.r>=rgb.b && rgb.b>=rgb.g) hsb.h = 300 + 60*(rgb.r-rgb.b)/(rgb.r-rgb.g);
|
||||
else hsb.h = 0;
|
||||
hsb.h = Math.round(hsb.h);
|
||||
return hsb;
|
||||
},
|
||||
HSBToRGB = function (hsb) {
|
||||
var rgb = {};
|
||||
var h = Math.round(hsb.h);
|
||||
var s = Math.round(hsb.s*255/100);
|
||||
var v = Math.round(hsb.b*255/100);
|
||||
if(s == 0) {
|
||||
rgb.r = rgb.g = rgb.b = v;
|
||||
} else {
|
||||
var t1 = v;
|
||||
var t2 = (255-s)*v/255;
|
||||
var t3 = (t1-t2)*(h%60)/60;
|
||||
if(h==360) h = 0;
|
||||
if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
|
||||
else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
|
||||
else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
|
||||
else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
|
||||
else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
|
||||
else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
|
||||
else {rgb.r=0; rgb.g=0; rgb.b=0}
|
||||
}
|
||||
return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
|
||||
},
|
||||
RGBToHex = function (rgb) {
|
||||
var hex = [
|
||||
rgb.r.toString(16),
|
||||
rgb.g.toString(16),
|
||||
rgb.b.toString(16)
|
||||
];
|
||||
$.each(hex, function (nr, val) {
|
||||
if (val.length == 1) {
|
||||
hex[nr] = '0' + val;
|
||||
}
|
||||
});
|
||||
return hex.join('');
|
||||
},
|
||||
HSBToHex = function (hsb) {
|
||||
return RGBToHex(HSBToRGB(hsb));
|
||||
};
|
||||
return {
|
||||
init: function (options) {
|
||||
options = $.extend({}, defaults, options||{});
|
||||
if (typeof options.color == 'string') {
|
||||
options.color = HexToHSB(options.color);
|
||||
} else if (options.color.r != undefined && options.color.g != undefined && options.color.b != undefined) {
|
||||
options.color = RGBToHSB(options.color);
|
||||
} else if (options.color.h != undefined && options.color.s != undefined && options.color.b != undefined) {
|
||||
options.color = fixHSB(options.color);
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
options.origColor = options.color;
|
||||
return this.each(function () {
|
||||
if (!$(this).data('colorpickerId')) {
|
||||
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
||||
$(this).data('colorpickerId', id);
|
||||
var cal = $(tpl).attr('id', id);
|
||||
if (options.flat) {
|
||||
cal.appendTo(this).show();
|
||||
} else {
|
||||
cal.appendTo(document.body);
|
||||
}
|
||||
options.fields = cal
|
||||
.find('input')
|
||||
.bind('keydown', keyDown)
|
||||
.bind('change', change)
|
||||
.bind('blur', blur)
|
||||
.bind('focus', focus);
|
||||
cal.find('span').bind('mousedown', downIncrement);
|
||||
options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
|
||||
options.selectorIndic = options.selector.find('div div');
|
||||
options.hue = cal.find('div.colorpicker_hue div');
|
||||
cal.find('div.colorpicker_hue').bind('mousedown', downHue);
|
||||
options.newColor = cal.find('div.colorpicker_new_color');
|
||||
options.currentColor = cal.find('div.colorpicker_current_color');
|
||||
cal.data('colorpicker', options);
|
||||
cal.find('div.colorpicker_submit')
|
||||
.bind('mouseenter', enterSubmit)
|
||||
.bind('mouseleave', leaveSubmit)
|
||||
.bind('click', clickSubmit);
|
||||
fillRGBFields(options.color, cal.get(0));
|
||||
fillHSBFields(options.color, cal.get(0));
|
||||
fillHexFields(options.color, cal.get(0));
|
||||
setHue(options.color, cal.get(0));
|
||||
setSelector(options.color, cal.get(0));
|
||||
setCurrentColor(options.color, cal.get(0));
|
||||
setNewColor(options.color, cal.get(0));
|
||||
if (options.flat) {
|
||||
cal.css({
|
||||
position: 'relative',
|
||||
display: 'block'
|
||||
});
|
||||
} else {
|
||||
$(this).bind(options.eventName, show);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
showPicker: function() {
|
||||
return this.each( function () {
|
||||
if ($(this).data('colorpickerId')) {
|
||||
show.apply(this);
|
||||
}
|
||||
});
|
||||
},
|
||||
hidePicker: function() {
|
||||
return this.each( function () {
|
||||
if ($(this).data('colorpickerId')) {
|
||||
$('#' + $(this).data('colorpickerId')).hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
setColor: function(col) {
|
||||
if (typeof col == 'string') {
|
||||
col = HexToHSB(col);
|
||||
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
||||
col = RGBToHSB(col);
|
||||
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
||||
col = fixHSB(col);
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
return this.each(function(){
|
||||
if ($(this).data('colorpickerId')) {
|
||||
var cal = $('#' + $(this).data('colorpickerId'));
|
||||
cal.data('colorpicker').color = col;
|
||||
cal.data('colorpicker').origColor = col;
|
||||
fillRGBFields(col, cal.get(0));
|
||||
fillHSBFields(col, cal.get(0));
|
||||
fillHexFields(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setSelector(col, cal.get(0));
|
||||
setCurrentColor(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}();
|
||||
$.fn.extend({
|
||||
ColorPicker: ColorPicker.init,
|
||||
ColorPickerHide: ColorPicker.hide,
|
||||
ColorPickerShow: ColorPicker.show,
|
||||
ColorPickerSetColor: ColorPicker.setColor
|
||||
});
|
||||
})(jQuery)
|
1
wp-content/themes/nuzi/admin/assets/js/cookie.js
Normal file
@ -0,0 +1 @@
|
||||
jQuery.cookie=function(key,value,options){if(arguments.length>1&&String(value)!=="[object Object]"){options=jQuery.extend({},options);if(value===null||value===undefined){options.expires=-1}if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days)}value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''))}options=value||{};var result,decode=options.raw?function(s){return s}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null};
|
@ -0,0 +1,252 @@
|
||||
/// <reference path="../../../lib/jquery-1.2.6.js" />
|
||||
/*
|
||||
Masked Input plugin for jQuery
|
||||
Copyright (c) 2007-2009 Josh Bush (digitalbush.com)
|
||||
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
|
||||
Version: 1.2.2 (03/09/2009 22:39:06)
|
||||
*/
|
||||
(function($) {
|
||||
var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask";
|
||||
var iPhone = (window.orientation != undefined);
|
||||
|
||||
$.mask = {
|
||||
//Predefined character definitions
|
||||
definitions: {
|
||||
'9': "[0-9]",
|
||||
'a': "[A-Za-z]",
|
||||
'*': "[A-Za-z0-9]"
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.extend({
|
||||
//Helper Function for Caret positioning
|
||||
caret: function(begin, end) {
|
||||
if (this.length == 0) return;
|
||||
if (typeof begin == 'number') {
|
||||
end = (typeof end == 'number') ? end : begin;
|
||||
return this.each(function() {
|
||||
if (this.setSelectionRange) {
|
||||
this.focus();
|
||||
this.setSelectionRange(begin, end);
|
||||
} else if (this.createTextRange) {
|
||||
var range = this.createTextRange();
|
||||
range.collapse(true);
|
||||
range.moveEnd('character', end);
|
||||
range.moveStart('character', begin);
|
||||
range.select();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this[0].setSelectionRange) {
|
||||
begin = this[0].selectionStart;
|
||||
end = this[0].selectionEnd;
|
||||
} else if (document.selection && document.selection.createRange) {
|
||||
var range = document.selection.createRange();
|
||||
begin = 0 - range.duplicate().moveStart('character', -100000);
|
||||
end = begin + range.text.length;
|
||||
}
|
||||
return { begin: begin, end: end };
|
||||
}
|
||||
},
|
||||
unmask: function() { return this.trigger("unmask"); },
|
||||
mask: function(mask, settings) {
|
||||
if (!mask && this.length > 0) {
|
||||
var input = $(this[0]);
|
||||
var tests = input.data("tests");
|
||||
return $.map(input.data("buffer"), function(c, i) {
|
||||
return tests[i] ? c : null;
|
||||
}).join('');
|
||||
}
|
||||
settings = $.extend({
|
||||
placeholder: "_",
|
||||
completed: null
|
||||
}, settings);
|
||||
|
||||
var defs = $.mask.definitions;
|
||||
var tests = [];
|
||||
var partialPosition = mask.length;
|
||||
var firstNonMaskPos = null;
|
||||
var len = mask.length;
|
||||
|
||||
$.each(mask.split(""), function(i, c) {
|
||||
if (c == '?') {
|
||||
len--;
|
||||
partialPosition = i;
|
||||
} else if (defs[c]) {
|
||||
tests.push(new RegExp(defs[c]));
|
||||
if(firstNonMaskPos==null)
|
||||
firstNonMaskPos = tests.length - 1;
|
||||
} else {
|
||||
tests.push(null);
|
||||
}
|
||||
});
|
||||
|
||||
return this.each(function() {
|
||||
var input = $(this);
|
||||
var buffer = $.map(mask.split(""), function(c, i) { if (c != '?') return defs[c] ? settings.placeholder : c });
|
||||
var ignore = false; //Variable for ignoring control keys
|
||||
var focusText = input.val();
|
||||
|
||||
input.data("buffer", buffer).data("tests", tests);
|
||||
|
||||
function seekNext(pos) {
|
||||
while (++pos <= len && !tests[pos]);
|
||||
return pos;
|
||||
};
|
||||
|
||||
function shiftL(pos) {
|
||||
while (!tests[pos] && --pos >= 0);
|
||||
for (var i = pos; i < len; i++) {
|
||||
if (tests[i]) {
|
||||
buffer[i] = settings.placeholder;
|
||||
var j = seekNext(i);
|
||||
if (j < len && tests[i].test(buffer[j])) {
|
||||
buffer[i] = buffer[j];
|
||||
} else
|
||||
break;
|
||||
}
|
||||
}
|
||||
writeBuffer();
|
||||
input.caret(Math.max(firstNonMaskPos, pos));
|
||||
};
|
||||
|
||||
function shiftR(pos) {
|
||||
for (var i = pos, c = settings.placeholder; i < len; i++) {
|
||||
if (tests[i]) {
|
||||
var j = seekNext(i);
|
||||
var t = buffer[i];
|
||||
buffer[i] = c;
|
||||
if (j < len && tests[j].test(t))
|
||||
c = t;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function keydownEvent(e) {
|
||||
var pos = $(this).caret();
|
||||
var k = e.keyCode;
|
||||
ignore = (k < 16 || (k > 16 && k < 32) || (k > 32 && k < 41));
|
||||
|
||||
//delete selection before proceeding
|
||||
if ((pos.begin - pos.end) != 0 && (!ignore || k == 8 || k == 46))
|
||||
clearBuffer(pos.begin, pos.end);
|
||||
|
||||
//backspace, delete, and escape get special treatment
|
||||
if (k == 8 || k == 46 || (iPhone && k == 127)) {//backspace/delete
|
||||
shiftL(pos.begin + (k == 46 ? 0 : -1));
|
||||
return false;
|
||||
} else if (k == 27) {//escape
|
||||
input.val(focusText);
|
||||
input.caret(0, checkVal());
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
function keypressEvent(e) {
|
||||
if (ignore) {
|
||||
ignore = false;
|
||||
//Fixes Mac FF bug on backspace
|
||||
return (e.keyCode == 8) ? false : null;
|
||||
}
|
||||
e = e || window.event;
|
||||
var k = e.charCode || e.keyCode || e.which;
|
||||
var pos = $(this).caret();
|
||||
|
||||
if (e.ctrlKey || e.altKey || e.metaKey) {//Ignore
|
||||
return true;
|
||||
} else if ((k >= 32 && k <= 125) || k > 186) {//typeable characters
|
||||
var p = seekNext(pos.begin - 1);
|
||||
if (p < len) {
|
||||
var c = String.fromCharCode(k);
|
||||
if (tests[p].test(c)) {
|
||||
shiftR(p);
|
||||
buffer[p] = c;
|
||||
writeBuffer();
|
||||
var next = seekNext(p);
|
||||
$(this).caret(next);
|
||||
if (settings.completed && next == len)
|
||||
settings.completed.call(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
function clearBuffer(start, end) {
|
||||
for (var i = start; i < end && i < len; i++) {
|
||||
if (tests[i])
|
||||
buffer[i] = settings.placeholder;
|
||||
}
|
||||
};
|
||||
|
||||
function writeBuffer() { return input.val(buffer.join('')).val(); };
|
||||
|
||||
function checkVal(allow) {
|
||||
//try to place characters where they belong
|
||||
var test = input.val();
|
||||
var lastMatch = -1;
|
||||
for (var i = 0, pos = 0; i < len; i++) {
|
||||
if (tests[i]) {
|
||||
buffer[i] = settings.placeholder;
|
||||
while (pos++ < test.length) {
|
||||
var c = test.charAt(pos - 1);
|
||||
if (tests[i].test(c)) {
|
||||
buffer[i] = c;
|
||||
lastMatch = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pos > test.length)
|
||||
break;
|
||||
} else if (buffer[i] == test[pos] && i!=partialPosition) {
|
||||
pos++;
|
||||
lastMatch = i;
|
||||
}
|
||||
}
|
||||
if (!allow && lastMatch + 1 < partialPosition) {
|
||||
input.val("");
|
||||
clearBuffer(0, len);
|
||||
} else if (allow || lastMatch + 1 >= partialPosition) {
|
||||
writeBuffer();
|
||||
if (!allow) input.val(input.val().substring(0, lastMatch + 1));
|
||||
}
|
||||
return (partialPosition ? i : firstNonMaskPos);
|
||||
};
|
||||
|
||||
if (!input.attr("readonly"))
|
||||
input
|
||||
.one("unmask", function() {
|
||||
input
|
||||
.unbind(".mask")
|
||||
.removeData("buffer")
|
||||
.removeData("tests");
|
||||
})
|
||||
.bind("focus.mask", function() {
|
||||
focusText = input.val();
|
||||
var pos = checkVal();
|
||||
writeBuffer();
|
||||
setTimeout(function() {
|
||||
if (pos == mask.length)
|
||||
input.caret(0, pos);
|
||||
else
|
||||
input.caret(pos);
|
||||
}, 0);
|
||||
})
|
||||
.bind("blur.mask", function() {
|
||||
checkVal();
|
||||
if (input.val() != focusText)
|
||||
input.change();
|
||||
})
|
||||
.bind("keydown.mask", keydownEvent)
|
||||
.bind("keypress.mask", keypressEvent)
|
||||
.bind(pasteEventName, function() {
|
||||
setTimeout(function() { input.caret(checkVal(true)); }, 0);
|
||||
});
|
||||
|
||||
checkVal(); //Perform initial check for existing values
|
||||
});
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
241
wp-content/themes/nuzi/admin/assets/js/jquery.tipsy.js
Normal file
@ -0,0 +1,241 @@
|
||||
// tipsy, facebook style tooltips for jquery
|
||||
// version 1.0.0a
|
||||
// (c) 2008-2010 jason frame [jason@onehackoranother.com]
|
||||
// released under the MIT license
|
||||
|
||||
(function($) {
|
||||
|
||||
function maybeCall(thing, ctx) {
|
||||
return (typeof thing == 'function') ? (thing.call(ctx)) : thing;
|
||||
};
|
||||
|
||||
function Tipsy(element, options) {
|
||||
this.$element = $(element);
|
||||
this.options = options;
|
||||
this.enabled = true;
|
||||
this.fixTitle();
|
||||
};
|
||||
|
||||
Tipsy.prototype = {
|
||||
show: function() {
|
||||
var title = this.getTitle();
|
||||
if (title && this.enabled) {
|
||||
var $tip = this.tip();
|
||||
|
||||
$tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
|
||||
$tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
|
||||
$tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);
|
||||
|
||||
var pos = $.extend({}, this.$element.offset(), {
|
||||
width: this.$element[0].offsetWidth,
|
||||
height: this.$element[0].offsetHeight
|
||||
});
|
||||
|
||||
var actualWidth = $tip[0].offsetWidth,
|
||||
actualHeight = $tip[0].offsetHeight,
|
||||
gravity = maybeCall(this.options.gravity, this.$element[0]);
|
||||
|
||||
var tp;
|
||||
switch (gravity.charAt(0)) {
|
||||
case 'n':
|
||||
tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
|
||||
break;
|
||||
case 's':
|
||||
tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
|
||||
break;
|
||||
case 'e':
|
||||
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
|
||||
break;
|
||||
case 'w':
|
||||
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
|
||||
break;
|
||||
}
|
||||
|
||||
if (gravity.length == 2) {
|
||||
if (gravity.charAt(1) == 'w') {
|
||||
tp.left = pos.left + pos.width / 2 - 15;
|
||||
} else {
|
||||
tp.left = pos.left + pos.width / 2 - actualWidth + 15;
|
||||
}
|
||||
}
|
||||
|
||||
$tip.css(tp).addClass('tipsy-' + gravity);
|
||||
$tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0);
|
||||
if (this.options.className) {
|
||||
$tip.addClass(maybeCall(this.options.className, this.$element[0]));
|
||||
}
|
||||
|
||||
if (this.options.fade) {
|
||||
$tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
|
||||
} else {
|
||||
$tip.css({visibility: 'visible', opacity: this.options.opacity});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
if (this.options.fade) {
|
||||
this.tip().stop().fadeOut(function() { $(this).remove(); });
|
||||
} else {
|
||||
this.tip().remove();
|
||||
}
|
||||
},
|
||||
|
||||
fixTitle: function() {
|
||||
var $e = this.$element;
|
||||
if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') {
|
||||
$e.attr('original-title', $e.attr('title') || '').removeAttr('title');
|
||||
}
|
||||
},
|
||||
|
||||
getTitle: function() {
|
||||
var title, $e = this.$element, o = this.options;
|
||||
this.fixTitle();
|
||||
var title, o = this.options;
|
||||
if (typeof o.title == 'string') {
|
||||
title = $e.attr(o.title == 'title' ? 'original-title' : o.title);
|
||||
} else if (typeof o.title == 'function') {
|
||||
title = o.title.call($e[0]);
|
||||
}
|
||||
title = ('' + title).replace(/(^\s*|\s*$)/, "");
|
||||
return title || o.fallback;
|
||||
},
|
||||
|
||||
tip: function() {
|
||||
if (!this.$tip) {
|
||||
this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>');
|
||||
}
|
||||
return this.$tip;
|
||||
},
|
||||
|
||||
validate: function() {
|
||||
if (!this.$element[0].parentNode) {
|
||||
this.hide();
|
||||
this.$element = null;
|
||||
this.options = null;
|
||||
}
|
||||
},
|
||||
|
||||
enable: function() { this.enabled = true; },
|
||||
disable: function() { this.enabled = false; },
|
||||
toggleEnabled: function() { this.enabled = !this.enabled; }
|
||||
};
|
||||
|
||||
$.fn.tipsy = function(options) {
|
||||
|
||||
if (options === true) {
|
||||
return this.data('tipsy');
|
||||
} else if (typeof options == 'string') {
|
||||
var tipsy = this.data('tipsy');
|
||||
if (tipsy) tipsy[options]();
|
||||
return this;
|
||||
}
|
||||
|
||||
options = $.extend({}, $.fn.tipsy.defaults, options);
|
||||
|
||||
function get(ele) {
|
||||
var tipsy = $.data(ele, 'tipsy');
|
||||
if (!tipsy) {
|
||||
tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
|
||||
$.data(ele, 'tipsy', tipsy);
|
||||
}
|
||||
return tipsy;
|
||||
}
|
||||
|
||||
function enter() {
|
||||
var tipsy = get(this);
|
||||
tipsy.hoverState = 'in';
|
||||
if (options.delayIn == 0) {
|
||||
tipsy.show();
|
||||
} else {
|
||||
tipsy.fixTitle();
|
||||
setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);
|
||||
}
|
||||
};
|
||||
|
||||
function leave() {
|
||||
var tipsy = get(this);
|
||||
tipsy.hoverState = 'out';
|
||||
if (options.delayOut == 0) {
|
||||
tipsy.hide();
|
||||
} else {
|
||||
setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);
|
||||
}
|
||||
};
|
||||
|
||||
if (!options.live) this.each(function() { get(this); });
|
||||
|
||||
if (options.trigger != 'manual') {
|
||||
var binder = options.live ? 'live' : 'bind',
|
||||
eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
|
||||
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
|
||||
this[binder](eventIn, enter)[binder](eventOut, leave);
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
};
|
||||
|
||||
$.fn.tipsy.defaults = {
|
||||
className: null,
|
||||
delayIn: 0,
|
||||
delayOut: 0,
|
||||
fade: false,
|
||||
fallback: '',
|
||||
gravity: 'n',
|
||||
html: false,
|
||||
live: false,
|
||||
offset: 0,
|
||||
opacity: 0.8,
|
||||
title: 'title',
|
||||
trigger: 'hover'
|
||||
};
|
||||
|
||||
// Overwrite this method to provide options on a per-element basis.
|
||||
// For example, you could store the gravity in a 'tipsy-gravity' attribute:
|
||||
// return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
|
||||
// (remember - do not modify 'options' in place!)
|
||||
$.fn.tipsy.elementOptions = function(ele, options) {
|
||||
return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
|
||||
};
|
||||
|
||||
$.fn.tipsy.autoNS = function() {
|
||||
return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
|
||||
};
|
||||
|
||||
$.fn.tipsy.autoWE = function() {
|
||||
return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
|
||||
};
|
||||
|
||||
/**
|
||||
* yields a closure of the supplied parameters, producing a function that takes
|
||||
* no arguments and is suitable for use as an autogravity function like so:
|
||||
*
|
||||
* @param margin (int) - distance from the viewable region edge that an
|
||||
* element should be before setting its tooltip's gravity to be away
|
||||
* from that edge.
|
||||
* @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer
|
||||
* if there are no viewable region edges effecting the tooltip's
|
||||
* gravity. It will try to vary from this minimally, for example,
|
||||
* if 'sw' is preferred and an element is near the right viewable
|
||||
* region edge, but not the top edge, it will set the gravity for
|
||||
* that element's tooltip to be 'se', preserving the southern
|
||||
* component.
|
||||
*/
|
||||
$.fn.tipsy.autoBounds = function(margin, prefer) {
|
||||
return function() {
|
||||
var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)},
|
||||
boundTop = $(document).scrollTop() + margin,
|
||||
boundLeft = $(document).scrollLeft() + margin,
|
||||
$this = $(this);
|
||||
|
||||
if ($this.offset().top < boundTop) dir.ns = 'n';
|
||||
if ($this.offset().left < boundLeft) dir.ew = 'w';
|
||||
if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e';
|
||||
if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's';
|
||||
|
||||
return dir.ns + (dir.ew ? dir.ew : '');
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
@ -0,0 +1,168 @@
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* WooFramework Media Library-driven AJAX File Uploader Module
|
||||
/* JavaScript Functions (2010-11-05)
|
||||
/*
|
||||
/* The code below is designed to work as a part of the WooFramework Media Library-driven
|
||||
/* AJAX File Uploader Module. It is included only on screens where this module is used.
|
||||
/*
|
||||
/* Used with (very) slight modifications for Options Framework.
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
(function ($) {
|
||||
|
||||
optionsframeworkMLU = {
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Remove file when the "remove" button is clicked.
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
removeFile: function () {
|
||||
|
||||
$('.mlu_remove_button').live('click', function(event) {
|
||||
var clickedObject = $(this);
|
||||
var theID = $(this).attr('title');
|
||||
var image_to_remove = $('#image_' + theID);
|
||||
var button_to_hide = $('#reset_' + theID);
|
||||
image_to_remove.fadeOut(500,function(){ $(this).remove(); });
|
||||
button_to_hide.fadeOut();
|
||||
clickedObject.parent().prev('input').val('');
|
||||
return false;
|
||||
});
|
||||
|
||||
// Hide the delete button on the first row
|
||||
$('a.delete-inline', "#option-1").hide();
|
||||
|
||||
}, // End removeFile
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Replace the default file upload field with a customised version.
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
recreateFileField: function () {
|
||||
|
||||
$('input.file').each(function(){
|
||||
var uploadbutton = '<input class="upload_file_button" type="button" value="Upload" />';
|
||||
$(this).wrap('<div class="file_wrap" />');
|
||||
$(this).addClass('file').css('opacity', 0); //set to invisible
|
||||
$(this).parent().append($('<div class="fake_file" />').append($('<input type="text" class="upload" />').attr('id',$(this).attr('id')+'_file')).val( $(this).val() ).append(uploadbutton));
|
||||
|
||||
$(this).bind('change', function() {
|
||||
$('#'+$(this).attr('id')+'_file').val($(this).val());
|
||||
});
|
||||
$(this).bind('mouseout', function() {
|
||||
$('#'+$(this).attr('id')+'_file').val($(this).val());
|
||||
});
|
||||
});
|
||||
|
||||
}, // End recreateFileField
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Use a custom function when working with the Media Uploads popup.
|
||||
/* Requires jQuery, Media Upload and Thickbox JavaScripts.
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
mediaUpload: function () {
|
||||
|
||||
jQuery.noConflict();
|
||||
|
||||
$( '.media_upload_button' ).removeAttr('style');
|
||||
|
||||
var formfield,
|
||||
formID,
|
||||
btnContent = true,
|
||||
tbframe_interval;
|
||||
// On Click
|
||||
$('.media_upload_button').live("click", function () {
|
||||
clickedObject = $(this);
|
||||
formfield = $(this).parent().prev('input').attr('id');
|
||||
formID = $(this).attr('rel');
|
||||
imgID = $(this).attr('id');
|
||||
|
||||
//Change "insert into post" to "Use this Button"
|
||||
tbframe_interval = setInterval(function() {jQuery('#TB_iframeContent').contents().find('.savesend .button').val('Use This Image');}, 2000);
|
||||
|
||||
// Display a custom title for each Thickbox popup.
|
||||
var woo_title = '';
|
||||
|
||||
if ( $(this).parents('.section').find('.heading') ) { woo_title = $(this).parents('.section').find('.heading').text(); } // End IF Statement
|
||||
|
||||
tb_show( woo_title, 'media-upload.php?post_id='+formID+'&TB_iframe=1' );
|
||||
return false;
|
||||
});
|
||||
|
||||
window.original_send_to_editor = window.send_to_editor;
|
||||
window.send_to_editor = function(html) {
|
||||
|
||||
if (formfield) {
|
||||
|
||||
//clear interval for "Use this Button" so button text resets
|
||||
clearInterval(tbframe_interval);
|
||||
|
||||
// itemurl = $(html).attr('href'); // Use the URL to the main image.
|
||||
|
||||
if ( $(html).html(html).find('img').length > 0 ) {
|
||||
|
||||
itemurl = $(html).html(html).find('img').attr('src'); // Use the URL to the size selected.
|
||||
|
||||
} else {
|
||||
|
||||
// It's not an image. Get the URL to the file instead.
|
||||
|
||||
var htmlBits = html.split("'"); // jQuery seems to strip out XHTML when assigning the string to an object. Use alternate method.
|
||||
itemurl = htmlBits[1]; // Use the URL to the file.
|
||||
|
||||
var itemtitle = htmlBits[2];
|
||||
|
||||
itemtitle = itemtitle.replace( '>', '' );
|
||||
itemtitle = itemtitle.replace( '</a>', '' );
|
||||
|
||||
} // End IF Statement
|
||||
|
||||
var image = /(^.*\.jpg|jpeg|png|gif|ico*)/gi;
|
||||
var document = /(^.*\.pdf|doc|docx|ppt|pptx|odt*)/gi;
|
||||
var audio = /(^.*\.mp3|m4a|ogg|wav*)/gi;
|
||||
var video = /(^.*\.mp4|m4v|mov|wmv|avi|mpg|ogv|3gp|3g2*)/gi;
|
||||
|
||||
if (itemurl.match(image)) {
|
||||
btnContent = '<a class="of-uploaded-image" href="'+itemurl+'"><img id="image_'+imgID+'" class="of-option-image" src="'+itemurl+'" alt="" /></a>';
|
||||
} else {
|
||||
|
||||
// No output preview if it's not an image.
|
||||
// btnContent = '';
|
||||
// Standard generic output if it's not an image.
|
||||
|
||||
html = '<a href="'+itemurl+'" target="_blank" rel="external">View File</a>';
|
||||
btnContent = 'Sorry, but that is not a valid image URL';
|
||||
}
|
||||
|
||||
$('#' + formfield).val(itemurl);
|
||||
// $('#' + formfield).next().next('div').slideDown().html(btnContent);
|
||||
$('#' + formfield).siblings('.screenshot').fadeIn().html(btnContent);
|
||||
clickedObject.next('span').fadeIn();
|
||||
tb_remove();
|
||||
|
||||
} else {
|
||||
window.original_send_to_editor(html);
|
||||
}
|
||||
|
||||
// Clear the formfield value so the other media library popups can work as they are meant to. - 2010-11-11.
|
||||
formfield = '';
|
||||
}
|
||||
|
||||
} // End mediaUpload
|
||||
|
||||
}; // End optionsframeworkMLU Object // Don't remove this, or the sky will fall on your head.
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Execute the above methods in the optionsframeworkMLU object.
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
optionsframeworkMLU.removeFile();
|
||||
optionsframeworkMLU.recreateFileField();
|
||||
optionsframeworkMLU.mediaUpload();
|
||||
|
||||
});
|
||||
|
||||
})(jQuery);
|
741
wp-content/themes/nuzi/admin/assets/js/smof.js
Normal file
@ -0,0 +1,741 @@
|
||||
/**
|
||||
* SMOF js
|
||||
*
|
||||
* contains the core functionalities to be used
|
||||
* inside SMOF
|
||||
*/
|
||||
|
||||
jQuery.noConflict();
|
||||
|
||||
/** Fire up jQuery - let's dance!
|
||||
*/
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
//(un)fold options in a checkbox-group
|
||||
jQuery('.fld').click(function() {
|
||||
var $fold='.f_'+this.id;
|
||||
$($fold).slideToggle('normal', "swing");
|
||||
});
|
||||
|
||||
//delays until AjaxUpload is finished loading
|
||||
//fixes bug in Safari and Mac Chrome
|
||||
if (typeof AjaxUpload != 'function') {
|
||||
return ++counter < 6 && window.setTimeout(init, counter * 500);
|
||||
}
|
||||
|
||||
//hides warning if js is enabled
|
||||
$('#js-warning').hide();
|
||||
|
||||
//Tabify Options
|
||||
$('.group').hide();
|
||||
|
||||
// Display last current tab
|
||||
if ($.cookie("of_current_opt") === null) {
|
||||
$('.group:first').fadeIn('fast');
|
||||
$('#of-nav li:first').addClass('current');
|
||||
} else {
|
||||
|
||||
var hooks = $('#hooks').html();
|
||||
hooks = jQuery.parseJSON(hooks);
|
||||
|
||||
$.each(hooks, function(key, value) {
|
||||
|
||||
if ($.cookie("of_current_opt") == '#of-option-'+ value) {
|
||||
$('.group#of-option-' + value).fadeIn();
|
||||
$('#of-nav li.' + value).addClass('current');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//Current Menu Class
|
||||
$('#of-nav li a').click(function(evt){
|
||||
// event.preventDefault();
|
||||
|
||||
$('#of-nav li').removeClass('current');
|
||||
$(this).parent().addClass('current');
|
||||
|
||||
var clicked_group = $(this).attr('href');
|
||||
|
||||
$.cookie('of_current_opt', clicked_group, { expires: 7, path: '/' });
|
||||
|
||||
$('.group').hide();
|
||||
|
||||
$(clicked_group).fadeIn('fast');
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
//Expand Options
|
||||
var flip = 0;
|
||||
|
||||
$('#expand_options').click(function(){
|
||||
if(flip == 0){
|
||||
flip = 1;
|
||||
$('#of_container #of-nav').hide();
|
||||
$('#of_container #content').width(755);
|
||||
$('#of_container .group').add('#of_container .group h2').show();
|
||||
|
||||
$(this).removeClass('expand');
|
||||
$(this).addClass('close');
|
||||
$(this).text('Close');
|
||||
|
||||
} else {
|
||||
flip = 0;
|
||||
$('#of_container #of-nav').show();
|
||||
$('#of_container #content').width(595);
|
||||
$('#of_container .group').add('#of_container .group h2').hide();
|
||||
$('#of_container .group:first').show();
|
||||
$('#of_container #of-nav li').removeClass('current');
|
||||
$('#of_container #of-nav li:first').addClass('current');
|
||||
|
||||
$(this).removeClass('close');
|
||||
$(this).addClass('expand');
|
||||
$(this).text('Expand');
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//Update Message popup
|
||||
$.fn.center = function () {
|
||||
this.animate({"top":( $(window).height() - this.height() - 200 ) / 2+$(window).scrollTop() + "px"},100);
|
||||
this.css("left", 250 );
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
$('#of-popup-save').center();
|
||||
$('#of-popup-reset').center();
|
||||
$('#of-popup-fail').center();
|
||||
|
||||
$(window).scroll(function() {
|
||||
$('#of-popup-save').center();
|
||||
$('#of-popup-reset').center();
|
||||
$('#of-popup-fail').center();
|
||||
});
|
||||
|
||||
|
||||
//Masked Inputs (images as radio buttons)
|
||||
$('.of-radio-img-img').click(function(){
|
||||
$(this).parent().parent().find('.of-radio-img-img').removeClass('of-radio-img-selected');
|
||||
$(this).addClass('of-radio-img-selected');
|
||||
});
|
||||
$('.of-radio-img-label').hide();
|
||||
$('.of-radio-img-img').show();
|
||||
$('.of-radio-img-radio').hide();
|
||||
|
||||
//Masked Inputs (background images as radio buttons)
|
||||
$('.of-radio-tile-img').click(function(){
|
||||
$(this).parent().parent().find('.of-radio-tile-img').removeClass('of-radio-tile-selected');
|
||||
$(this).addClass('of-radio-tile-selected');
|
||||
});
|
||||
$('.of-radio-tile-label').hide();
|
||||
$('.of-radio-tile-img').show();
|
||||
$('.of-radio-tile-radio').hide();
|
||||
|
||||
//AJAX Upload
|
||||
function of_image_upload() {
|
||||
$('.image_upload_button').each(function(){
|
||||
|
||||
var clickedObject = $(this);
|
||||
var clickedID = $(this).attr('id');
|
||||
|
||||
var nonce = $('#security').val();
|
||||
|
||||
new AjaxUpload(clickedID, {
|
||||
action: ajaxurl,
|
||||
name: clickedID, // File upload name
|
||||
data: { // Additional data to send
|
||||
action: 'of_ajax_post_action',
|
||||
type: 'upload',
|
||||
security: nonce,
|
||||
data: clickedID },
|
||||
autoSubmit: true, // Submit file after selection
|
||||
responseType: false,
|
||||
onChange: function(file, extension){},
|
||||
onSubmit: function(file, extension){
|
||||
clickedObject.text('Uploading'); // change button text, when user selects file
|
||||
this.disable(); // If you want to allow uploading only 1 file at time, you can disable upload button
|
||||
interval = window.setInterval(function(){
|
||||
var text = clickedObject.text();
|
||||
if (text.length < 13){ clickedObject.text(text + '.'); }
|
||||
else { clickedObject.text('Uploading'); }
|
||||
}, 200);
|
||||
},
|
||||
onComplete: function(file, response) {
|
||||
window.clearInterval(interval);
|
||||
clickedObject.text('Upload Image');
|
||||
this.enable(); // enable upload button
|
||||
|
||||
|
||||
// If nonce fails
|
||||
if(response==-1){
|
||||
var fail_popup = $('#of-popup-fail');
|
||||
fail_popup.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
fail_popup.fadeOut();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
// If there was an error
|
||||
else if(response.search('Upload Error') > -1){
|
||||
var buildReturn = '<span class="upload-error">' + response + '</span>';
|
||||
$(".upload-error").remove();
|
||||
clickedObject.parent().after(buildReturn);
|
||||
|
||||
}
|
||||
else{
|
||||
var buildReturn = '<img class="hide of-option-image" id="image_'+clickedID+'" src="'+response+'" alt="" />';
|
||||
|
||||
$(".upload-error").remove();
|
||||
$("#image_" + clickedID).remove();
|
||||
clickedObject.parent().after(buildReturn);
|
||||
$('img#image_'+clickedID).fadeIn();
|
||||
clickedObject.next('span').fadeIn();
|
||||
clickedObject.parent().prev('input').val(response);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
of_image_upload();
|
||||
|
||||
//AJAX Remove Image (clear option value)
|
||||
$('.image_reset_button').live('click', function(){
|
||||
|
||||
var clickedObject = $(this);
|
||||
var clickedID = $(this).attr('id');
|
||||
var theID = $(this).attr('title');
|
||||
|
||||
var nonce = $('#security').val();
|
||||
|
||||
var data = {
|
||||
action: 'of_ajax_post_action',
|
||||
type: 'image_reset',
|
||||
security: nonce,
|
||||
data: theID
|
||||
};
|
||||
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
|
||||
//check nonce
|
||||
if(response==-1){ //failed
|
||||
|
||||
var fail_popup = $('#of-popup-fail');
|
||||
fail_popup.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
fail_popup.fadeOut();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
var image_to_remove = $('#image_' + theID);
|
||||
var button_to_hide = $('#reset_' + theID);
|
||||
image_to_remove.fadeOut(500,function(){ $(this).remove(); });
|
||||
button_to_hide.fadeOut();
|
||||
clickedObject.parent().prev('input').val('');
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Style Select
|
||||
(function ($) {
|
||||
styleSelect = {
|
||||
init: function () {
|
||||
$('.select_wrapper').each(function () {
|
||||
$(this).prepend('<span>' + $(this).find('.select option:selected').text() + '</span>');
|
||||
});
|
||||
$('.select').live('change', function () {
|
||||
$(this).prev('span').replaceWith('<span>' + $(this).find('option:selected').text() + '</span>');
|
||||
});
|
||||
$('.select').bind($.browser.msie ? 'click' : 'change', function(event) {
|
||||
$(this).prev('span').replaceWith('<span>' + $(this).find('option:selected').text() + '</span>');
|
||||
});
|
||||
}
|
||||
};
|
||||
$(document).ready(function () {
|
||||
styleSelect.init()
|
||||
})
|
||||
})(jQuery);
|
||||
|
||||
|
||||
/** Aquagraphite Slider MOD */
|
||||
|
||||
//Hide (Collapse) the toggle containers on load
|
||||
$(".slide_body").hide();
|
||||
|
||||
//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
|
||||
$(".slide_edit_button").live( 'click', function(){
|
||||
$(this).parent().toggleClass("active").next().slideToggle("fast");
|
||||
return false; //Prevent the browser jump to the link anchor
|
||||
});
|
||||
|
||||
// Update slide title upon typing
|
||||
function update_slider_title(e) {
|
||||
var element = e;
|
||||
if ( this.timer ) {
|
||||
clearTimeout( element.timer );
|
||||
}
|
||||
this.timer = setTimeout( function() {
|
||||
$(element).parent().prev().find('strong').text( element.value );
|
||||
}, 100);
|
||||
return true;
|
||||
}
|
||||
|
||||
$('.of-slider-title').live('keyup', function(){
|
||||
update_slider_title(this);
|
||||
});
|
||||
|
||||
|
||||
//Remove individual slide
|
||||
$('.slide_delete_button').live('click', function(){
|
||||
// event.preventDefault();
|
||||
var agree = confirm("Are you sure you wish to delete this slide?");
|
||||
if (agree) {
|
||||
var $trash = $(this).parents('li');
|
||||
//$trash.slideUp('slow', function(){ $trash.remove(); }); //chrome + confirm bug made slideUp not working...
|
||||
$trash.animate({
|
||||
opacity: 0.25,
|
||||
height: 0,
|
||||
}, 500, function() {
|
||||
$(this).remove();
|
||||
});
|
||||
return false; //Prevent the browser jump to the link anchor
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
//Add new slide
|
||||
$(".slide_add_button").live('click', function(){
|
||||
var slidesContainer = $(this).prev();
|
||||
var sliderId = slidesContainer.attr('id');
|
||||
var sliderInt = $('#'+sliderId).attr('rel');
|
||||
|
||||
var numArr = $('#'+sliderId +' li').find('.order').map(function() {
|
||||
var str = this.id;
|
||||
str = str.replace(/\D/g,'');
|
||||
str = parseFloat(str);
|
||||
return str;
|
||||
}).get();
|
||||
|
||||
var maxNum = Math.max.apply(Math, numArr);
|
||||
if (maxNum < 1 ) { maxNum = 0};
|
||||
var newNum = maxNum + 1;
|
||||
|
||||
var newSlide = '<li class="temphide"><div class="slide_header"><strong>Slide ' + newNum + '</strong><input type="hidden" class="slide of-input order" name="' + sliderId + '[' + newNum + '][order]" id="' + sliderId + '_slide_order-' + newNum + '" value="' + newNum + '"><a class="slide_edit_button" href="#">Edit</a></div><div class="slide_body" style="display: none; "><label>Title</label><input class="slide of-input of-slider-title" name="' + sliderId + '[' + newNum + '][title]" id="' + sliderId + '_' + newNum + '_slide_title" value=""><label>Image URL</label><input class="slide of-input" name="' + sliderId + '[' + newNum + '][url]" id="' + sliderId + '_' + newNum + '_slide_url" value=""><div class="upload_button_div"><span class="button media_upload_button" id="' + sliderId + '_' + newNum + '" rel="'+sliderInt+'">Upload</span><span class="button mlu_remove_button hide" id="reset_' + sliderId + '_' + newNum + '" title="' + sliderId + '_' + newNum + '">Remove</span></div><div class="screenshot"></div><label>Link URL (optional)</label><input class="slide of-input" name="' + sliderId + '[' + newNum + '][link]" id="' + sliderId + '_' + newNum + '_slide_link" value=""><label>Description (optional)</label><textarea class="slide of-input" name="' + sliderId + '[' + newNum + '][description]" id="' + sliderId + '_' + newNum + '_slide_description" cols="8" rows="8"></textarea><a class="slide_delete_button" href="#">Delete</a><div class="clear"></div></div></li>';
|
||||
|
||||
slidesContainer.append(newSlide);
|
||||
$('.temphide').fadeIn('fast', function() {
|
||||
$(this).removeClass('temphide');
|
||||
});
|
||||
|
||||
of_image_upload(); // re-initialise upload image..
|
||||
|
||||
return false; //prevent jumps, as always..
|
||||
});
|
||||
|
||||
//Sort slides
|
||||
jQuery('.slider').find('ul').each( function() {
|
||||
var id = jQuery(this).attr('id');
|
||||
$('#'+ id).sortable({
|
||||
placeholder: "placeholder",
|
||||
opacity: 0.6
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/** Sorter (Layout Manager) */
|
||||
jQuery('.sorter').each( function() {
|
||||
var id = jQuery(this).attr('id');
|
||||
$('#'+ id).find('ul').sortable({
|
||||
items: 'li',
|
||||
placeholder: "placeholder",
|
||||
connectWith: '.sortlist_' + id,
|
||||
opacity: 0.6,
|
||||
update: function() {
|
||||
$(this).find('.position').each( function() {
|
||||
|
||||
var listID = $(this).parent().attr('id');
|
||||
var parentID = $(this).parent().parent().attr('id');
|
||||
parentID = parentID.replace(id + '_', '')
|
||||
var optionID = $(this).parent().parent().parent().attr('id');
|
||||
$(this).prop("name", optionID + '[' + parentID + '][' + listID + ']');
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/** Ajax Backup & Restore MOD */
|
||||
//backup button
|
||||
$('#of_backup_button').live('click', function(){
|
||||
|
||||
var answer = confirm("Click OK to backup your current saved options.")
|
||||
|
||||
if (answer){
|
||||
|
||||
var clickedObject = $(this);
|
||||
var clickedID = $(this).attr('id');
|
||||
|
||||
var nonce = $('#security').val();
|
||||
|
||||
var data = {
|
||||
action: 'of_ajax_post_action',
|
||||
type: 'backup_options',
|
||||
security: nonce
|
||||
};
|
||||
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
|
||||
//check nonce
|
||||
if(response==-1){ //failed
|
||||
|
||||
var fail_popup = $('#of-popup-fail');
|
||||
fail_popup.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
fail_popup.fadeOut();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
var success_popup = $('#of-popup-save');
|
||||
success_popup.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
//restore button
|
||||
$('#of_restore_button').live('click', function(){
|
||||
|
||||
var answer = confirm("'Warning: All of your current options will be replaced with the data from your last backup! Proceed?")
|
||||
|
||||
if (answer){
|
||||
|
||||
var clickedObject = $(this);
|
||||
var clickedID = $(this).attr('id');
|
||||
|
||||
var nonce = $('#security').val();
|
||||
|
||||
var data = {
|
||||
action: 'of_ajax_post_action',
|
||||
type: 'restore_options',
|
||||
security: nonce
|
||||
};
|
||||
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
|
||||
//check nonce
|
||||
if(response==-1){ //failed
|
||||
|
||||
var fail_popup = $('#of-popup-fail');
|
||||
fail_popup.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
fail_popup.fadeOut();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
var success_popup = $('#of-popup-save');
|
||||
success_popup.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
/** Ajax Transfer (Import/Export) Option */
|
||||
$('#of_import_button').live('click', function(){
|
||||
|
||||
var answer = confirm("Click OK to import options.")
|
||||
|
||||
if (answer){
|
||||
|
||||
var clickedObject = $(this);
|
||||
var clickedID = $(this).attr('id');
|
||||
|
||||
var nonce = $('#security').val();
|
||||
|
||||
var import_data = $('#export_data').val();
|
||||
|
||||
var data = {
|
||||
action: 'of_ajax_post_action',
|
||||
type: 'import_options',
|
||||
security: nonce,
|
||||
data: import_data
|
||||
};
|
||||
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
var fail_popup = $('#of-popup-fail');
|
||||
var success_popup = $('#of-popup-save');
|
||||
|
||||
//check nonce
|
||||
if(response==-1){ //failed
|
||||
fail_popup.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
fail_popup.fadeOut();
|
||||
}, 2000);
|
||||
}
|
||||
else
|
||||
{
|
||||
success_popup.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
/** AJAX Save Options */
|
||||
$('#of_save').live('click',function() {
|
||||
|
||||
var nonce = $('#security').val();
|
||||
|
||||
$('.ajax-loading-img').fadeIn();
|
||||
|
||||
//get serialized data from all our option fields
|
||||
var serializedReturn = $('#of_form :input[name][name!="security"][name!="of_reset"]').serialize();
|
||||
|
||||
var data = {
|
||||
type: 'save',
|
||||
action: 'of_ajax_post_action',
|
||||
security: nonce,
|
||||
data: serializedReturn
|
||||
};
|
||||
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
var success = $('#of-popup-save');
|
||||
var fail = $('#of-popup-fail');
|
||||
var loading = $('.ajax-loading-img');
|
||||
loading.fadeOut();
|
||||
|
||||
if (response==1) {
|
||||
success.fadeIn();
|
||||
} else {
|
||||
fail.fadeIn();
|
||||
}
|
||||
|
||||
window.setTimeout(function(){
|
||||
success.fadeOut();
|
||||
fail.fadeOut();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
|
||||
/* AJAX Options Reset */
|
||||
$('#of_reset').click(function() {
|
||||
|
||||
//confirm reset
|
||||
var answer = confirm("Click OK to reset. All settings will be lost and replaced with default settings!");
|
||||
|
||||
//ajax reset
|
||||
if (answer){
|
||||
|
||||
var nonce = $('#security').val();
|
||||
|
||||
$('.ajax-reset-loading-img').fadeIn();
|
||||
|
||||
var data = {
|
||||
|
||||
type: 'reset',
|
||||
action: 'of_ajax_post_action',
|
||||
security: nonce,
|
||||
};
|
||||
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
var success = $('#of-popup-reset');
|
||||
var fail = $('#of-popup-fail');
|
||||
var loading = $('.ajax-reset-loading-img');
|
||||
loading.fadeOut();
|
||||
|
||||
if (response==1)
|
||||
{
|
||||
success.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
fail.fadeIn();
|
||||
window.setTimeout(function(){
|
||||
fail.fadeOut();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
|
||||
/** Tipsy @since v1.3 */
|
||||
if (jQuery().tipsy) {
|
||||
$('.typography-size, .typography-height, .typography-face, .typography-style, .of-typography-color').tipsy({
|
||||
fade: true,
|
||||
gravity: 's',
|
||||
opacity: 0.7,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* JQuery UI Slider function
|
||||
* Dependencies : jquery, jquery-ui-slider
|
||||
* Feature added by : Smartik - http://smartik.ws/
|
||||
* Date : 03.17.2013
|
||||
*/
|
||||
jQuery('.smof_sliderui').each(function() {
|
||||
|
||||
var obj = jQuery(this);
|
||||
var sId = "#" + obj.data('id');
|
||||
var val = parseInt(obj.data('val'));
|
||||
var min = parseInt(obj.data('min'));
|
||||
var max = parseInt(obj.data('max'));
|
||||
var step = parseInt(obj.data('step'));
|
||||
|
||||
//slider init
|
||||
obj.slider({
|
||||
value: val,
|
||||
min: min,
|
||||
max: max,
|
||||
step: step,
|
||||
slide: function( event, ui ) {
|
||||
jQuery(sId).val( ui.value );
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Switch
|
||||
* Dependencies : jquery
|
||||
* Feature added by : Smartik - http://smartik.ws/
|
||||
* Date : 03.17.2013
|
||||
*/
|
||||
jQuery(".cb-enable").click(function(){
|
||||
var parent = $(this).parents('.switch-options');
|
||||
jQuery('.cb-disable',parent).removeClass('selected');
|
||||
jQuery(this).addClass('selected');
|
||||
jQuery('.main_checkbox',parent).attr('checked', true);
|
||||
|
||||
//fold/unfold related options
|
||||
var obj = jQuery(this);
|
||||
var $fold='.f_'+obj.data('id');
|
||||
jQuery($fold).slideDown('normal', "swing");
|
||||
});
|
||||
jQuery(".cb-disable").click(function(){
|
||||
var parent = $(this).parents('.switch-options');
|
||||
jQuery('.cb-enable',parent).removeClass('selected');
|
||||
jQuery(this).addClass('selected');
|
||||
jQuery('.main_checkbox',parent).attr('checked', false);
|
||||
|
||||
//fold/unfold related options
|
||||
var obj = jQuery(this);
|
||||
var $fold='.f_'+obj.data('id');
|
||||
jQuery($fold).slideUp('normal', "swing");
|
||||
});
|
||||
//disable text select(for modern chrome, safari and firefox is done via CSS)
|
||||
if (($.browser.msie && $.browser.version < 10) || $.browser.opera) {
|
||||
$('.cb-enable span, .cb-disable span').find().attr('unselectable', 'on');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Google Fonts
|
||||
* Dependencies : google.com, jquery
|
||||
* Feature added by : Smartik - http://smartik.ws/
|
||||
* Date : 03.17.2013
|
||||
*/
|
||||
function GoogleFontSelect( slctr, mainID ){
|
||||
|
||||
var _selected = $(slctr).val(); //get current value - selected and saved
|
||||
var _linkclass = 'style_link_'+ mainID;
|
||||
var _previewer = mainID +'_ggf_previewer';
|
||||
|
||||
if( _selected ){ //if var exists and isset
|
||||
|
||||
//Check if selected is not equal with "Select a font" and execute the script.
|
||||
if ( _selected !== 'none' && _selected !== 'Select a font' ) {
|
||||
|
||||
//remove other elements crested in <head>
|
||||
$( '.'+ _linkclass ).remove();
|
||||
|
||||
//replace spaces with "+" sign
|
||||
var the_font = _selected.replace(/\s+/g, '+');
|
||||
|
||||
//add reference to google font family
|
||||
$('head').append('<link href="http://fonts.googleapis.com/css?family='+ the_font +'" rel="stylesheet" type="text/css" class="'+ _linkclass +'">');
|
||||
|
||||
//show in the preview box the font
|
||||
$('.'+ _previewer ).css('font-family', _selected +', sans-serif' );
|
||||
|
||||
}else{
|
||||
|
||||
//if selected is not a font remove style "font-family" at preview box
|
||||
$('.'+ _previewer ).css('font-family', '' );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//init for each element
|
||||
jQuery( '.google_font_select' ).each(function(){
|
||||
var mainID = jQuery(this).attr('id');
|
||||
GoogleFontSelect( this, mainID );
|
||||
});
|
||||
|
||||
//init when value is changed
|
||||
jQuery( '.google_font_select' ).change(function(){
|
||||
var mainID = jQuery(this).attr('id');
|
||||
GoogleFontSelect( this, mainID );
|
||||
});
|
||||
|
||||
|
||||
|
||||
}); //end doc ready
|