~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/browser/__init__.py

  • Committer: wagrant
  • Date: 2008-07-09 01:45:57 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:834
Let the client decide whether to show file or directory actions2, as
the type can only be reliably determined from within the jail.

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
    """
214
214
    Presents a set of links/buttons for the "actions2" row of the top bar.
215
215
    This depends on whether it is a directory (listing) or normal file
216
 
    (editor).
 
216
    (editor), but we'll let the JavaScript decide which.
217
217
    """
218
 
    if isdir:
219
 
        req.write("""    <form target="upload_iframe"
 
218
    req.write("""    <form id="actions2_directory"
 
219
          target="upload_iframe"
220
220
          action="%s"
221
221
          enctype="multipart/form-data" method="post">
222
222
      Select:
240
240
          name="upload_iframe" id="upload_iframe"></iframe>
241
241
    </form>
242
242
""" % cgi.escape(util.make_path(os.path.join("fileservice", req.path))))
243
 
    else:
244
 
        req.write("""    <p>Save as: 
 
243
 
 
244
    req.write("""    <p id="actions2_file">Save as: 
245
245
      <input type="text" size="30" id="save_filename" value="%s" />
246
246
      <input type="button" id="save_button" value="Save" onclick="save_file()" />
247
247
    </p>