site.js 490 B

1234567891011121314151617181920212223
  1. Ext.onReady(function(){
  2. // expanders
  3. Ext.getBody().on('click', function(e, t){
  4. t = Ext.get(t);
  5. e.stopEvent();
  6. var bd = t.next('div.expandable-body');
  7. bd.enableDisplayMode();
  8. var bdi = bd.first();
  9. var expanded = bd.isVisible();
  10. if(expanded){
  11. bd.hide();
  12. }else{
  13. bdi.hide();
  14. bd.show();
  15. bdi.slideIn('l', {duration:0.2, stopAnimation: true, easing:'easeOut'});
  16. }
  17. t.update(!expanded ? 'Hide details' : 'Show details');
  18. }, null, {delegate:'a.expander'});
  19. });