Changeset 244:ae4ea992c181

Show
Ignore:
Timestamp:
2007-08-12 12:56:26 (1 year ago)
Author:
Stefan Schwarzer <sschwarzer@sschwarzer.net>
branch:
default
Message:
Use source code placeholder frame instead of blank frame.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • browser.py

    r233 r244  
    8383        elif builtin == "help": 
    8484            self.emit_data(template.HELP, title=u"Websourcebrowser help", 
     85                           h1_class="Other") 
     86        elif builtin == "source_placeholder": 
     87            self.emit_data(template.SOURCE_PLACEHOLDER, 
     88                           title=u"Source code placeholder", 
    8589                           h1_class="Other") 
    8690        elif builtin == "raw_data": 
     
    189193                dir_url = session.default_session.add_to_url(url, params) 
    190194                html = template.FRAMESET % { 
     195                  'special_dir': config.SPECIAL_DIR, 
    191196                  'dir_url': dir_url, 
    192197                  'dir_target': config.DIR_WINDOW_TARGET, 
    193                   'source_target': config.SOURCE_WINDOW_TARGET, 
    194                   'host': config.http_host, 'port': config.http_port} 
     198                  'source_target': config.SOURCE_WINDOW_TARGET} 
    195199                use_header_and_footer = False 
    196200            else: 
  • template.py

    r231 r244  
    6060</head> 
    6161<frameset cols="30%%,70%%"> 
    62   <frame name="%(dir_target)s" src="http://%(host)s:%(port)s%(dir_url)s" /> 
    63   <frame name="%(source_target)s" /
     62  <frame name="%(dir_target)s" src="%(dir_url)s" /> 
     63  <frame name="%(source_target)s" src="/%(special_dir)s/source_placeholder"
    6464  <noframes> 
    6565    <body> 
    6666      <h1>Websourcebrowser - source code at a glance</h1> 
    6767      <p>Your browser doesn't seem to work with frames. You may go to 
    68          the <a href="http://%(host)s:%(port)s/">frameless version</a>, 
     68         the <a href="/">frameless version</a>, 
    6969         which will open another browser window to show source code.</p> 
    7070    </body> 
     
    7474""" 
    7575 
     76SOURCE_PLACEHOLDER = u"""\ 
     77If you click on a link for a file, its contents will appear here. 
     78"""