Ignore:
Timestamp:
Jan 28, 2011, 4:54:02 PM (13 years ago)
Author:
grum
Message:

release 3.4.0
fix bug:1984, bug:2109
js file are minified, remove packed files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GrumPluginClasses/js/simpleTip.js

    r7175 r8961  
    22 * -----------------------------------------------------------------------------
    33 * file: simpleTip.js
    4  * file version: 1.0.0
    5  * date: 2010-07-10
     4 * file version: 1.0.1
     5 * date: 2010-12-23
    66 *
    77 * JS file provided by the piwigo's plugin "GrumPluginClasses"
     
    3030 *
    3131 * | release | date       |
    32  * | 1.0.0   | 2010/07/10 | start to coding
     32 * | 1.0.0   | 2010-07-10 | start to coding
    3333 * |         |            |
    34  * |         |            |
     34 * | 1.0.1   | 2010-12-23 | fix minor bugs
    3535 * |         |            |
    3636 * |         |            |
     
    7070      offsetY:0,
    7171      classes:'',
    72       arrowImgDir: './plugins/GrumPluginClasses/icons/',
     72      arrowImgDir: '',
    7373      arrowWidth: 12,
    74       arrowHeight: 12,
     74      arrowHeight: 12
    7575    },
    7676    options
     
    8484      itemIndexInc = 0,
    8585      options={
    86           name:'',
     86          name:''
    8787        };
    8888
     
    150150          {
    151151           title: '',
    152            simpleTip: tip.index,
     152           simpleTip: tip.index
    153153          }
    154154        )
     
    253253          left: '-1500px',
    254254          top:  '-1500px',
    255           display: 'block',
     255          display: 'block'
    256256        }
    257257      );
     
    306306
    307307
    308     stWidth=$('#iSimpleTip').outerWidth();
    309     stHeight=$('#iSimpleTip').outerHeight();
    310     stWidthI=$('#iSimpleTip').innerWidth();
    311     stHeightI=$('#iSimpleTip').innerHeight();
     308    stWidth=$('#iSimpleTipContent'+options.name).outerWidth();
     309    stHeight=$('#iSimpleTipContent'+options.name).outerHeight();
     310    stWidthI=$('#iSimpleTipContent'+options.name).innerWidth();
     311    stHeightI=$('#iSimpleTipContent'+options.name).innerHeight();
    312312    bwX=(stWidth-stWidthI)/2;
    313313    bwY=(stHeight-stHeightI)/2;
     
    321321        y+=items[itemIndex].options.offsetY;
    322322        arrowX=-bwX;
    323         arrowY=-10-bwY;
     323        arrowY=-items[itemIndex].options.arrowHeight+bwY;
    324324        arrowModel='up';
    325325        break;
     
    328328        x-=stWidth/2;
    329329        y+=items[itemIndex].options.offsetY;
    330         arrowX=(stWidthI-10)/2;
    331         arrowY=-10-bwY;
     330        arrowX=(stWidthI-items[itemIndex].options.arrowWidth)/2;
     331        arrowY=-items[itemIndex].options.arrowHeight+bwY;
    332332        arrowModel='up';
    333333        break;
     
    336336        x-=stWidth+items[itemIndex].options.offsetX;
    337337        y+=items[itemIndex].options.offsetY;
    338         arrowX=stWidthI-10+bwX;
    339         arrowY=-10-bwY;
     338        arrowX=stWidthI-items[itemIndex].options.arrowWidth+bwX;
     339        arrowY=-items[itemIndex].options.arrowHeight+bwY;
    340340        arrowModel='up';
    341341        break;
    342342
    343343      case 'middle-left':
     344        x+=items[itemIndex].options.offsetX;
    344345        y-=stHeight/2;
    345         arrowX=-10-bwX;
    346         arrowY=(stHeightI-10)/2;
     346        arrowX=-items[itemIndex].options.arrowWidth+bwX;
     347        arrowY=(stHeightI-items[itemIndex].options.arrowHeight)/2+bwY;
    347348        arrowModel='left';
    348349        break;
     
    357358        y-=stHeight/2;
    358359        arrowX=stWidthI+bwX;
    359         arrowY=(stHeightI-10)/2;
     360        arrowY=(stHeightI-items[itemIndex].options.arrowHeight)/2+bwY;
    360361        arrowModel='right';
    361362        break;
    362363
    363364      case 'bottom-left':
     365        x+=items[itemIndex].options.offsetX;
    364366        y-=stHeight+items[itemIndex].options.offsetY;
    365367        arrowX=-bwX;
     
    371373        x-=stWidth/2;
    372374        y-=stHeight+items[itemIndex].options.offsetY;
    373         arrowX=(stWidthI-10)/2;
     375        arrowX=(stWidthI-items[itemIndex].options.arrowWidth)/2+bwX;
    374376        arrowY=stHeightI+bwY;
    375377        arrowModel='down';
     
    379381        x-=stWidth+items[itemIndex].options.offsetX;
    380382        y-=stHeight+items[itemIndex].options.offsetY;
    381         arrowX=stWidthI-10+bwX;
     383        arrowX=stWidthI-items[itemIndex].options.arrowWidth+bwX;
    382384        arrowY=stHeightI+bwY;
    383385        arrowModel='down';
     
    394396          marginTop: arrowY+'px',
    395397          width: items[itemIndex].options.arrowWidth+'px',
    396           height: items[itemIndex].options.arrowHeight+'px',
     398          height: items[itemIndex].options.arrowHeight+'px'
    397399        }
    398400      );
     
    409411          left: x+'px',
    410412          top:  y+'px',
    411           display: 'none',
     413          display: 'none'
    412414        }
    413415      )
Note: See TracChangeset for help on using the changeset viewer.