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

« back to all changes in this revision

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

  • Committer: mattgiuca
  • Date: 2008-02-29 00:40:57 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:617
Added upload panel to the topbar instead of being on the side.
browser/listing.js: Removed all upload panel generation code.
browser/__init__.py: Statically generates upload panel as part of the top bar.
browser/browser.css, js: minor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
    (editor).
201
201
    """
202
202
    if isdir:
203
 
        req.write("""Select:
204
 
    <a onclick="action_selectall(true)"
205
 
        title="Select all files in this directory">All</a> :
206
 
    <a onclick="action_selectall(false)"
207
 
        title="Deselect all files in this directory">None</a>
208
 
""")
 
203
        req.write("""    <form target="upload_iframe"
 
204
          action="%s"
 
205
          enctype="multipart/form-data" method="post">
 
206
      Select:
 
207
      <a onclick="action_selectall(true)"
 
208
          title="Select all files in this directory">All</a> :
 
209
      <a onclick="action_selectall(false)"
 
210
          title="Deselect all files in this directory">None</a>
 
211
 
 
212
      <span style="display:none" id="uploadpanel">| Upload file:
 
213
        <input type="hidden" value="putfiles" name="action" />
 
214
        <input type="hidden" value="" name="path" />
 
215
        <input type="file" name="data" />
 
216
        <input type="checkbox" checked="on" value="true" name="unpack"
 
217
          />Unpack zip file
 
218
        <input type="button" onclick="show_uploadpanel(false)" value="Hide" />
 
219
        <input type="submit" value="Send" />
 
220
      </span>
 
221
      <!-- This iframe is for making a call to upload the file without
 
222
           refreshing the page. (It will refresh the listing). -->
 
223
      <iframe onload="refresh()" style="display: none;"
 
224
          name="upload_iframe" id="upload_iframe"></iframe>
 
225
    </form>
 
226
""" % cgi.escape(util.make_path(os.path.join("fileservice", req.path))))
209
227
    else:
210
228
        # TODO
211
229
        pass