From f4f7355bf23d786937bc6b454dc7bdc1a4dba911 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Mon, 14 Nov 2016 08:46:32 +1100 Subject: [PATCH] A nested tab plugin's tabs are leaking in to the parent tab plugin. Fixes #2481 --- modules/system/assets/ui/js/tab.js | 4 ++-- modules/system/assets/ui/storm-min.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/system/assets/ui/js/tab.js b/modules/system/assets/ui/js/tab.js index d2e1f6107..95da90610 100644 --- a/modules/system/assets/ui/js/tab.js +++ b/modules/system/assets/ui/js/tab.js @@ -14,8 +14,8 @@ var $el = this.$el = $(element); this.options = options || {} - this.$tabsContainer = $('.nav-tabs', $el) - this.$pagesContainer = $('.tab-content', $el) + this.$tabsContainer = $('.nav-tabs:first', $el) + this.$pagesContainer = $('.tab-content:first', $el) this.tabId = 'tabs' + $el.parents().length + Math.round(Math.random()*1000); if (this.options.closable !== undefined && this.options.closable !== false) diff --git a/modules/system/assets/ui/storm-min.js b/modules/system/assets/ui/storm-min.js index 49145a84c..b298b746a 100644 --- a/modules/system/assets/ui/storm-min.js +++ b/modules/system/assets/ui/storm-min.js @@ -4201,8 +4201,8 @@ data[option].apply(data,methodArgs)}})} $.fn.dragScroll.Constructor=DragScroll $.fn.dragScroll.noConflict=function(){$.fn.dragScroll=old return this}}(window.jQuery);+function($){"use strict";var Tab=function(element,options){var $el=this.$el=$(element);this.options=options||{} -this.$tabsContainer=$('.nav-tabs',$el) -this.$pagesContainer=$('.tab-content',$el) +this.$tabsContainer=$('.nav-tabs:first',$el) +this.$pagesContainer=$('.tab-content:first',$el) this.tabId='tabs'+$el.parents().length+Math.round(Math.random()*1000);if(this.options.closable!==undefined&&this.options.closable!==false) $el.attr('data-closable','') this.init()}