Blame view

framework/javascript/ToggleCompositeField.js 565 Bytes
0084d336   Administrator   Importers CRUD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  (function($){
  	$.entwine('ss', function($){
  		$('.ss-toggle').entwine({
  			onadd: function() {
  				this._super();
  
  				this.accordion({
  					heightStyle: "content",
  					collapsible: true,
  					active: (this.hasClass("ss-toggle-start-closed")) ? false : 0
  				});
  			},
  			onremove: function() {
  				if (this.data('accordion')) this.accordion('destroy');
  				this._super();
  			},
  
  			getTabSet: function() {
  				return this.closest(".ss-tabset");
  			},
  
  			fromTabSet: {
  				ontabsshow: function() {
  					this.accordion("resize");
  				}
  			}
  		});
  	});
  })(jQuery);