Skip to content

Commit

Permalink
Better activation and tab linking
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Powers committed Jul 4, 2013
1 parent 5daf453 commit 76b2383
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion admin/actions.admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Move users to front end after activation
*/
if( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" )
wp_redirect( home_url() );
wp_redirect( apply_filters('pl_activate_url', home_url().'?tablink=account&tabsublink=welcome') );

/**
* Add Javascript for Layout Controls from the Layout UI class
Expand Down
2 changes: 1 addition & 1 deletion editor/editor.account.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function __construct(){

function toolbar( $toolbar ){
$toolbar['account'] = array(
'name' => 'PageLines',
'name' => 'Account',
'icon' => 'icon-pagelines',
'pos' => 110,
// 'type' => 'btn',
Expand Down
11 changes: 6 additions & 5 deletions editor/js/pl.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@

e.preventDefault()

var that = this
, tabLink = $(this).data('tab-link') || ''
var tabLink = $(this).data('tab-link') || ''
, tabSubLink = $(this).data('stab-link')|| ''

that.tabLink( tabLink, tabSubLink)
Expand Down Expand Up @@ -151,8 +150,9 @@
$( '[data-action="'+tabLink+'"]' )
.trigger('click')

$('[data-tab-action="account"] a')
$('[data-tab-action="'+tabSubLink+'"] a')
.trigger('click')


return
}
Expand Down Expand Up @@ -221,10 +221,11 @@
$('.pl-toolbox .ui-tabs').tabs('destroy')

var activeTabSlug = selectedPanel.attr('data-tab-load')
, theATab = selectedPanel.find('[data-tab-action="'+activeTabSlug+'"]')
, theSlug = activeTabSlug || getURLParameter('tabsublink')
, theATab = selectedPanel.find('[data-tab-action="'+theSlug+'"]')
, activeIndex = theATab.parent().children('li').index( theATab )
, activeTab = (activeIndex > 1) ? activeIndex : 0


if(activeTab == 0){

Expand Down

0 comments on commit 76b2383

Please sign in to comment.