Changeset 162


Ignore:
Timestamp:
05/13/05 05:18:38 (14 years ago)
Author:
gogo
Message:

Add proper version information (the version of htmlarea.js, not of
about.html) to about dialog.

Related to #48

Yermo took a different approach in the unified_backend branch by doinga
special replacement prior/post commit, however I felt that introduced
a) too much reliance on pre/post-commit stuff, b) too many spurious
changes, c) too much cruft. Seeing as this is all Javascript anyway I
think my solution is fine.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r161 r162  
    3232    --  $LastChangedBy$ 
    3333    --------------------------------------------------------------------------*/ 
     34 
     35HTMLArea.version = 
     36{ 
     37  'Release'   : 'Trunk', 
     38  'Head'      : '$HeadURL$'.replace(/^[^:]*: (.*) \$$/, '$1'), 
     39  'Date'      : '$LastChangedDate$'.replace(/^[^:]*: ([0-9-]*) ([0-9:]*) ([+0-9]*) \((.*)\) \$/, '$4 $2 $3'), 
     40  'Revision'  : '$LastChangedRevision$'.replace(/^[^:]*: (.*) \$$/, '$1'), 
     41  'RevisionBy': '$LastChangedBy$'.replace(/^[^:]*: (.*) \$$/, '$1') 
     42} 
    3443 
    3544if (typeof _editor_url == "string") { 
  • trunk/popups/about.html

    r106 r162  
    254254 
    255255<div id="tab-area-4"> 
    256 <pre>$HeadURL$ 
    257 $LastChangedDate$ 
    258 $LastChangedRevision$ 
    259 $LastChangedBy$</pre> 
     256  <script type="text/javascript"> 
     257    if(window.opener && window.opener.HTMLArea) 
     258    { 
     259      var ver = window.opener.HTMLArea.version; 
     260      document.write('<pre>' 
     261                      + '\nRelease: ' + ver.Release + ' (' + ver.Date + ')' 
     262                      + '\nHead: ' + ver.Head 
     263                      + '\nRevision: ' + ver.Revision 
     264                      + '\nLast Changed By: ' + ver.RevisionBy 
     265                      + '\n' + 
     266                      '</pre>'); 
     267    } 
     268    else 
     269    { 
     270      document.write('<pre>Version information unavailable.</pre>'); 
     271    } 
     272  </script> 
    260273</div> 
    261274 
Note: See TracChangeset for help on using the changeset viewer.