Ignore:
Timestamp:
Oct 25, 2012, 5:33:32 PM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4 (prechargement)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/js/autosize_ajax.js

    r18737 r18744  
    1818  function progress(success,data) {
    1919    if (success) {
    20       jQuery("#theMainImage").height(params.height[derivatives.done]);
    21       jQuery("#theMainImage").width(params.width[derivatives.done]);
    22 
    23       jQuery("#theMainImage").show();
    24       jQuery("#theMainImage").trigger("ON", [{ nb: derivatives.total - derivatives.done, total: derivatives.total, done: derivatives.done,status:"ok",src:data.url}]);
     20       jQuery("#theMainImage").trigger("ON", [{ nb: derivatives.total - derivatives.done, total: derivatives.total, done: derivatives.done,status:"ok",src:data.url,Width:data.Width,Height:data.Height}]);
    2521    } else {
    2622
     
    4440  function getDerivativeUrls(nofile) {
    4541    params.max_urls = nofile.length;
     42    Width = jQuery("#theMainImage").width();
     43    Height = jQuery("#theMainImage").height();
     44
    4645    jQuery(nofile).each(function (i, t) {
    4746      if (typeof t.file != "undefined") {
     
    5251          params.types.push(t.type);
    5352          params.src.push(t.file);
    54           params.width.push(t.width);
    55           params.height.push(t.height);
     53         
    5654
    5755        } else if (~jQuery.inArray(t.file, params.src)) {
     
    6159          params.types.push(t.type);
    6260          params.src.push(t.file);
    63           params.width.push(t.width);
    64           params.height.push(t.height);
     61 
    6562        }
    6663      }
     
    8986                  }
    9087                }
     88                data.Width = Width;
     89                data.Height = Height;
    9190                progress(true, data);
    9291              }),
Note: See TracChangeset for help on using the changeset viewer.