Changeset 9002


Ignore:
Timestamp:
Jan 31, 2011, 10:37:30 AM (10 years ago)
Author:
grum
Message:

release 3.0.0
fix bug on random picture display

Location:
extensions/AMenuManager
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMenuManager/amm_aip.class.inc.php

    r8962 r9002  
    228228          'selectMode' => $this->config['amm_randompicture_selectMode'],
    229229          'selectCat' => json_encode($this->config['amm_randompicture_selectCat']),
    230           'blockHeight' => $this->config['amm_randompicture_height'],
     230          'blockHeight' => ($this->config['amm_randompicture_height']==0)?99:$this->config['amm_randompicture_height'],
    231231          'blockTitles' => array()
    232232        ),
  • extensions/AMenuManager/amm_ajax.php

    r8962 r9002  
    472472      $this->config['amm_randompicture_showcomment']=$config['infosComment'];
    473473      $this->config['amm_randompicture_periodicchange']=$config['freqDelay'];
    474       $this->config['amm_randompicture_height']=$config['blockHeight'];
     474      $this->config['amm_randompicture_height']=($config['blockHeight']==99)?0:$config['blockHeight'];
    475475      $this->config['amm_randompicture_title']=array();
    476476      foreach($config['blockTitles'] as $title)
  • extensions/AMenuManager/amm_root.class.inc.php

    r8989 r9002  
    647647  static public function checkPluginRelease()
    648648  {
    649     global $template;
    650 
    651     $config=Array();
    652     GPCCore::loadConfig('amm', $config);
    653 
    654     if($config['installed']!=AMM_VERSION2)
     649    global $template, $prefixeTable, $conf;
     650
     651
     652    if($conf['amm_config']['installed']!=AMM_VERSION2)
    655653    {
    656654      /* the plugin was updated without being deactivated
     
    661659      $amm->deactivate();
    662660      $amm->activate();
    663       $template->delete_compiled_templates();
     661      if(is_object($template)) $template->delete_compiled_templates();
    664662    }
    665663  }
  • extensions/AMenuManager/js/amm_randomPictPublic.js

    r8962 r9002  
    7676  computePositionTop = function()
    7777  {
    78     $("#iamm_ill0").css({top:(options.fixedHeight-$("#iamm_ill0").innerHeight())/2});
     78    $("#iamm_ill0").css({top:($('#irandompicinner').innerHeight()-$("#iamm_ill0").innerHeight())/2});
    7979  },
    8080
  • extensions/AMenuManager/js/amm_randomPictPublic.min.js

    r8962 r9002  
    1 /* file: amm_randomPictPublic.js - v1.0.0 | minified on 2011/01/28 with http://jscompress.com/ */
     1/* file: amm_randomPictPublic.js - v1.0.0 | minified on 2011/01/31 with http://jscompress.com/ */
    22function randomPict(opt)
    33{var options={fixedHeight:0,pictures:[],showName:'n',showComment:'n',delay:0},properties={vIntervalID:0,vCurrentPict:0,nameDOM:'',commentDOM:'',img:new Image()},init=function(opt)
     
    1212else
    1313{properties.img.src=options.pictures[properties.vCurrentPict].thumb;}});properties.img.src=options.pictures[properties.vCurrentPict].thumb;},computePositionTop=function()
    14 {$("#iamm_ill0").css({top:(options.fixedHeight-$("#iamm_ill0").innerHeight())/2});},getNextPicture=function()
     14{$("#iamm_ill0").css({top:($('#irandompicinner').innerHeight()-$("#iamm_ill0").innerHeight())/2});},getNextPicture=function()
    1515{properties.vCurrentPict++;if(properties.vCurrentPict>=options.pictures.length)properties.vCurrentPict=0;$('#iamm_ill0').fadeTo(200,0,function()
    1616{if(properties.nameDOM!='')$('#'+properties.nameDOM).html(options.pictures[properties.vCurrentPict].name);if(properties.commentDOM!='')$('#'+properties.commentDOM).html(options.pictures[properties.vCurrentPict].comment);$('#iammRPicLink').attr('href',options.pictures[properties.vCurrentPict].link);$('#iammRPicImg').attr('src',options.pictures[properties.vCurrentPict].thumb);computePositionTop();$('#iamm_ill0').fadeTo(200,1);});};init(opt);}
Note: See TracChangeset for help on using the changeset viewer.