UNPKG

wejsv2old-plugin-cdp-profile

Version:
20 lines 756 B
(function($, we, Ember, App){ App.ProfileEditView = Ember.View.extend({ templateName: 'profile/edit', didInsertElement: function (){ var self = this; $('.tabs-controller').find('h4.tab-controller').click(function(){ var tabController = $('h4.tab-controller'); var index = tabController.index(this); var tab = $('.tab'); if ( tab.eq(index).hasClass('tab-blocked') ) return self.get('controller').send('handleClick'); if ( !tab.eq(index).hasClass('active')) { tabController.removeClass('active'); tab.removeClass('active'); tab.eq(index).addClass('active'); tabController.eq(index).addClass('active'); } }) }, }); })(jQuery, we, Ember, App);