Skip to content

Commit

Permalink
Make it easier to have a custom setting tab area. See #57
Browse files Browse the repository at this point in the history
  • Loading branch information
markoheijnen committed Feb 28, 2016
1 parent 6991fc1 commit e3cfa4f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
20 changes: 11 additions & 9 deletions css/tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,21 @@
}

.tabify_tab h2 {
cursor: pointer;
float: left;
font-size: 20px;
font-weight: 600;
line-height: 24px;
margin: 10px 0 0;
padding: 0;
}
.tabify_tab h2 span {
.tabify_control h2 {
cursor: pointer;
}
.tabify_control h2 span {
display: inline-block;
margin-top: 5px;
}
.tabify_tab h2 input {
.tabify_control h2 input {
font-size: 20px;
margin: 0;
width: 100%;
Expand All @@ -87,16 +89,16 @@
height: 28px;
}

.tabify_control .tabify_tab {
.tabify_control_tabs .tabify_tab {
background: #f9f9f9;
}

.tabify_control .menu-item-handle {
.tabify_control_tabs .menu-item-handle {
overflow: visible;
width: auto;
}

.tabify_control ul {
.tabify_control_tabs ul {
margin: 0px;
padding: 6px 0px 0px;
}
Expand Down Expand Up @@ -153,17 +155,17 @@
/* =Javascript disabled
-------------------------------------------------------------- */

.no-js .tabify_control .menu-item-bar .menu-item-handle:hover {
.no-js .tabify_control_tabs .menu-item-bar .menu-item-handle:hover {
border-color: #dfdfdf;
}

.tabify_control .item-order {
.tabify_control_tabs .item-order {
float: right;
margin-top:-26px;
margin-right: 10px;
}

.tabify_control .item-order a {
.tabify_control_tabs .item-order a {
text-decoration: none;
}

Expand Down
2 changes: 1 addition & 1 deletion inc/settings-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function get_section() {
do_action( 'tabify_settings', $this->type, $section, $options[ $section ] );
echo '</div>';

echo '<div class="tabify_control">';
echo '<div class="tabify_control tabify_control_tabs">';

$tab_id = 0;
$remove = false;
Expand Down
4 changes: 2 additions & 2 deletions inc/settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function edit_screen() {

$tabs = array(
'posttypes' => array(
'title' => __('Post types', 'tabify-edit-screen' ),
'class' => 'Tabify_Edit_Screen_Settings_Posttypes'
'title' => __('Post types', 'tabify-edit-screen' ),
'class' => 'Tabify_Edit_Screen_Settings_Posttypes'
)
);
$tabs = apply_filters( 'tabify_settings_tabs', $tabs );
Expand Down
6 changes: 3 additions & 3 deletions js/admin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
jQuery(function($) {
// Remove nojs support
$( ".tabify_control .item-order" ).remove();
$( ".tabify_control_tabs .item-order" ).remove();
$( "#tabify_edit_screen_nojs" ).remove();

$( ".tabify_control" ).sortable({
Expand All @@ -13,9 +13,9 @@ jQuery(function($) {
// Initialize sortables
initialize_sortable_ul();
function initialize_sortable_ul() {
$( ".tabify_control ul" ).sortable({
$( ".tabify_control_tabs ul" ).sortable({
//items : ".steps",
connectWith: ".tabify_control ul",
connectWith: ".tabify_control_tabs ul",
scroll : false,
disableSelection: true,
receive: function(event, ui) {
Expand Down

0 comments on commit e3cfa4f

Please sign in to comment.