Skip to content

Commit

Permalink
Syncing up with version 0.8 of Options Framework plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinsays committed Jun 21, 2011
1 parent cb68442 commit c7fdf26
Show file tree
Hide file tree
Showing 9 changed files with 398 additions and 189 deletions.
26 changes: 13 additions & 13 deletions admin/css/admin-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
margin: 10px 0;
width: 785px;
position:relative;
z-index: 0
z-index: 0;
}
#of_container #header {
height: 60px;
background:#dfdfdf url("../../../../wp-admin/images/gray-grad.png") repeat-x left top;
border: 1px solid #ccc;
border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
border-top-left-radius: 3px;
-moz-border-radius-topleft: 3px;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
-moz-border-radius-topright: 3px;
}
#of_container #header .logo {
float: left;
Expand Down Expand Up @@ -307,10 +307,10 @@
padding: 10px 20px 0px 20px;
height: 35px;
text-align: right;
-moz-border-radius-bottomright: 6px;
-moz-border-radius-bottomleft: 6px;
-webkit-border-bottom-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
border-bottom-left-radius: 6px;
-moz-border-radius-bottomright: 3px;
-moz-border-radius-bottomleft: 3px;
-webkit-border-bottom-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
}
39 changes: 28 additions & 11 deletions admin/js/options-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ jQuery(document).ready(function($) {

// Switches option sections
$('.group').hide();
$('.group:first').fadeIn();
var activetab = '';
if (typeof(localStorage) != 'undefined' ) {
activetab = localStorage.getItem("activetab");
}
if (activetab != '' && $(activetab).length ) {
$(activetab).fadeIn();
} else {
$('.group:first').fadeIn();
}
$('.group .collapsed').each(function(){
$(this).find('input:checked').parent().parent().parent().nextAll().each(
function(){
Expand All @@ -42,6 +50,24 @@ jQuery(document).ready(function($) {
$(this).filter('.hidden').removeClass('hidden');
});
});

if (activetab != '' && $(activetab + '-tab').length ) {
$(activetab + '-tab').parent('li').addClass('current');
}
else {
$('#of-nav li:first').addClass('current');
}
$('#of-nav li a').click(function(evt) {
$('#of-nav li').removeClass('current');
$(this).parent().addClass('current');
var clicked_group = $(this).attr('href');
if (typeof(localStorage) != 'undefined' ) {
localStorage.setItem("activetab", $(this).attr('href'));
}
$('.group').hide();
$(clicked_group).fadeIn();
evt.preventDefault();
});

$('.group .collapsed input:checkbox').click(unhideHidden);

Expand Down Expand Up @@ -71,14 +97,5 @@ jQuery(document).ready(function($) {
$('.of-radio-img-label').hide();
$('.of-radio-img-img').show();
$('.of-radio-img-radio').hide();

$('#of-nav li:first').addClass('current');
$('#of-nav li a').click(function(evt) {
$('#of-nav li').removeClass('current');
$(this).parent().addClass('current');
var clicked_group = $(this).attr('href');
$('.group').hide();
$(clicked_group).fadeIn();
evt.preventDefault();
});

});
Loading

0 comments on commit c7fdf26

Please sign in to comment.