includes/clientside/static/ajax.js
changeset 903 b8db9a7946fc
parent 889 7e933a5c860b
child 906 c949e82b8f49
equal deleted inserted replaced
902:e7c6f1aa7b6a 903:b8db9a7946fc
   758     .css('z-index', String( getHighestZ() + 20 ));
   758     .css('z-index', String( getHighestZ() + 20 ));
   759   
   759   
   760   $.get(stdAjaxPrefix + '&_mode=theme_list', {}, function(data, status)
   760   $.get(stdAjaxPrefix + '&_mode=theme_list', {}, function(data, status)
   761     {
   761     {
   762       $('#theme-selector-inner .theme-selector-spinner').fadeOut(650);
   762       $('#theme-selector-inner .theme-selector-spinner').fadeOut(650);
   763       $('#theme-selector-body').animate({ width: 708 }, 600, function()
   763       $('#theme-selector-body').animate({ width: 728 }, 600, function()
   764         {
   764         {
   765           // avoiding jQuery's fade functions because they insist on toggling display as well
   765           // avoiding jQuery's fade functions because they insist on toggling display as well
   766           if ( !aclDisableTransitionFX )
   766           if ( !aclDisableTransitionFX )
   767             changeOpac(0, 'theme-selector-inner');
   767             changeOpac(0, 'theme-selector-inner');
   768           $('#theme-selector-inner').html('<h3></h3>');
   768           $('#theme-selector-inner').html('<h3></h3>');
   769           $('#theme-selector-inner > h3').text($lang.get('ajax_thmsel_lbl_choosetheme'));
   769           $('#theme-selector-inner > h3').text($lang.get('ajax_thmsel_lbl_choosetheme'));
   770           $('#theme-selector-inner').append('<ul></ul>');
   770           $('#theme-selector-inner').append('<ul></ul>');
   771           for ( var i = 0; i < data.length; i++ )
   771           for ( var i = 0; i < data.length; i++ )
   772           {
   772           {
   773             var bgi = data[i].have_thumb ? cdnPath + '/themes/' + data[i].theme_id + '/preview.png' : cdnPath + '/images/themepreview.png';
   773             var bgi = data[i].have_thumb ? cdnPath + '/themes/' + data[i].theme_id + '/preview.png' : cdnPath + '/images/themepreview.png';
   774             $('#theme-selector-inner > ul').append('<li id="theme_' + i + '"><a href="#"><span></span></a></li>');
   774             var maxheight = getHeight() - 325;
       
   775             $('#theme-selector-inner > ul')
       
   776               .css('clip', 'rect(0px, auto, auto, 0px)')
       
   777               .css('overflow', 'auto')
       
   778               .css('max-height', maxheight)
       
   779               .append('<li id="theme_' + i + '"><a href="#"><span></span></a></li>');
   775             $('#theme-selector-inner li#theme_' + i + ' > a')
   780             $('#theme-selector-inner li#theme_' + i + ' > a')
   776               .css('background-image', 'url(' + bgi + ')')
   781               .css('background-image', 'url(' + bgi + ')')
   777               .attr('enano:theme_id', data[i].theme_id);
   782               .attr('enano:theme_id', data[i].theme_id);
   778             $('#theme-selector-inner li#theme_' + i + ' > a > span')
   783             $('#theme-selector-inner li#theme_' + i + ' > a > span')
   779               .text(data[i].theme_name);
   784               .text(data[i].theme_name);