Changeset 8706


Ignore:
Timestamp:
08/23/10 16:44:38 (21 months ago)
Author:
CrawfordCurrie
Message:

Item951: embed the foswikiWindow code in the skin to service foswikiPopup. There's no point to importing another file to do this; it's trivial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PatternSkin/pub/System/PatternSkin/pattern_src.js

    r8564 r8706  
    5959        $('a.foswikiPopUp').click( 
    6060            function(e) { 
    61 //                foswiki.Window.openPopup(this.href, {template:"viewplain"}); 
     61                // SMELL: would be a lot better looking with a jQuery 
     62                // popup 
     63                if (!this.href) 
     64                    return false; 
     65                 
     66                if (this.href.indexOf("?") > 0) 
     67                    url = this.href + ';template=viewplain'; 
     68                else 
     69                    url = this.href + '?template=viewplain'; 
     70                     
     71                var window = open( 
     72                    url, '', 
     73                    "width=600,height=480,titlebar=0,resizable,scrollbars"); 
     74 
     75                if (window) 
     76                    window.focus(); 
     77 
    6278                return false; 
    6379            }); 
    64  
     80         
    6581        $('input.foswikiFocus').each( 
    6682            function(index, el) { 
    6783                el.focus(); 
    6884            }); 
    69  
     85         
    7086        $('input.foswikiChangeFormButton').click( 
    7187            function(e) { 
Note: See TracChangeset for help on using the changeset viewer.