Changeset 3274

Show
Ignore:
Timestamp:
02/26/08 13:11:22 (9 months ago)
Author:
eblot
Message:

Fix up RevtreePlugin to support jQuery changes introduced in [6572].
Do not use this version of the plugin with Trac milestone:0.11 version 6571 and below: it won't work

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • revtreeplugin/0.11/revtree/htdocs/js/svgtip.js

    r2815 r3274  
    1010 
    1111var jttimer = null; 
    12 function JT_init(){ 
     12 
     13(function($){ 
     14 
     15window.JT_init = function(){ 
    1316  $('a[@id^=rev]').hover(function(){JT_show(this)}, 
    1417                         function(){jttimer=setTimeout("JT_remove();", 250);}); 
    1518} 
    1619 
    17 function JT_cancel() { 
     20window.JT_cancel = function() { 
    1821   if (jttimer) { 
    1922      clearTimeout(jttimer); 
     
    2225} 
    2326 
    24 function JT_remove() { 
     27window.JT_remove = function() { 
    2528   var jt = $('#JT'); 
    26    if ( jt ) { jt.remove(); } 
     29   if ( jt ) { jt.remove(); } 
    2730   var jt_connect = $('#JT_connect'); 
    2831   if ( jt_connect ) { jt_connect.remove(); } 
    2932} 
    3033 
    31 function JT_hide() { 
     34window.JT_hide = function() { 
    3235   JT_cancel(); 
    3336   JT_remove(); 
    3437} 
    3538 
    36 function JT_show(object) { 
     39window.JT_show = function(object) { 
    3740  if ( $('#JT') ) { 
    3841     JT_hide(); 
     
    117120} 
    118121 
    119 function updateJT(data) { 
     122window.updateJT = function(data) { 
    120123  // cannot use innerHTML with jQuery ($('#JT_copy').innerHTML) 
    121124  var copy = document.getElementById('JT_copy'); 
     
    124127} 
    125128 
    126 function getSvgPosition(objectId) { 
     129window.getSvgPosition = function(objectId) { 
    127130   // The following loop could be simplified to use JQuery 
    128131   // JQuery has some trouble with XML documents for now 
     
    176179} 
    177180 
    178 function findPos(obj) { 
     181window.findPos = function(obj) { 
    179182        var curleft = curtop = 0; 
    180183        if (obj.offsetParent) { 
     
    189192} 
    190193 
    191 function posLeft() { 
     194window.posLeft = function() { 
    192195   return typeof window.pageXOffset != 'undefined' ?  
    193196      window.pageXOffset : 
     
    198201} 
    199202  
    200 function posTop() { 
     203window.posTop = function() { 
    201204   return typeof window.pageYOffset != 'undefined' ?   
    202205      window.pageYOffset :  
     
    206209            document.body.scrollTop ? document.body.scrollTop : 0; 
    207210}  
     211 
     212})(jQuery); 
     213 
  • revtreeplugin/0.11/revtree/templates/revtree.html

    r2158 r3274  
    1515    <title>${rt.title}</title> 
    1616    <script type="text/javascript"> 
    17     function updateLimits() { 
    18       $('#period').enable($('#limperiod').checked()); 
    19       $('#revmin').enable($('#limrev').checked()); 
    20       $('#revmax').enable($('#limrev').checked()); 
    21     } 
    22     $(document).ready(function() { 
     17     
     18    (function($){ 
     19      window.updateLimits = function() { 
     20        $('#period').enable($('#limperiod').checked()); 
     21        $('#revmin').enable($('#limrev').checked()); 
     22        $('#revmax').enable($('#limrev').checked()); 
     23      } 
     24    })(jQuery); 
     25    jQuery(document).ready(function($) { 
    2326      $("#limits input[@name='limits']").click(function() {  
    2427          updateLimits();  
    25           }); 
    26       JT_init(); 
    27       updateLimits(); 
    28      // the following function is required for Safari to operate properly 
    29      $(window).unload(function(){JT_hide()}); 
     28      }); 
     29      JT_init(); 
     30      updateLimits(); 
     31      // the following function is required for Safari to operate properly 
     32      $(window).unload(function(){JT_hide()}); 
    3033    }); 
    3134    </script>     
  • revtreeplugin/0.11/setup.py

    r2920 r3274  
    1616 
    1717PACKAGE = 'TracRevtreePlugin' 
    18 VERSION = '0.5.13
     18VERSION = '0.5.14
    1919 
    2020setup ( 
     
    2727    url='http://trac-hacks.org/wiki/RevtreePlugin', 
    2828    keywords = "trac revision svg graphical tree browser visual", 
    29     install_requires = [ 'Trac>=0.11dev-r6363', 'Trac<0.12'], 
     29    install_requires = [ 'Trac>=0.11dev-r6572', 'Trac<0.12'], 
    3030    packages = find_packages(exclude=['ez_setup', '*.tests*', '*.enhancers.*']), 
    3131    package_data={