x_tabbable now triggers a 'tab_change' event when a tab is clicked

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11768 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
nagoon97 2012-10-18 05:12:43 +00:00
parent bdaeccd4fe
commit bc8f09a9bb
2 changed files with 9 additions and 0 deletions

View file

@ -52,6 +52,9 @@ jQuery(function($){
var $this = $(this);
$this.parent('li').addClass('x_active').siblings().removeClass('x_active');
$this.closest('.x_nav-tabs').next('.x_tab-content').find('>.x_tab-pane').eq($this.attr('data-index')-1).addClass('x_active').show().siblings().removeClass('x_active').hide();
$(this).parents('.x_tabbable').trigger('tab_change', [parseInt($(this).attr('data-index'))-1, $(this)]);
return false;
});
// GNB

View file

@ -1862,6 +1862,10 @@ jQuery(function($){
$previewForm.find('input[name=act]').remove();
$previewForm.find('input[name=mid]').remove();
$previewForm.find('input[name=vid]').remove();
/*
$('#design .x_tabbable').on('tab_change', function(ev, nIdx, $el){
console.log(44, ev, nIdx, $el);
});*/
$('#design').bind('show', function(){
var sMenuId = $._xeAdminVar.sSelectedMenuSrl;
var htInfo = htNodeInfo[sMenuId];
@ -2088,6 +2092,8 @@ jQuery(function($){
$(this).closest('li').find('input[name=layout_item]').click();
});
$('#layout').on('click', 'input[name=layout_item]', function(){
$('#layout').nextAll().hide();
$('#layout').find('li.selected').removeClass('selected');
$(this).closest('li').addClass('selected');