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

« back to all changes in this revision

Viewing changes to www/media/browser/browser.js

  • 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:
799
799
     * when the current file is not a directory. Hence, just remove
800
800
     * it entirely.
801
801
     * (This makes some of the above decisions somewhat redundant).
 
802
     * We also take this opportunity to show the appropriate actions2
 
803
     * bar for this path. It should either be a save or upload widget.
802
804
     */
803
 
    if (!(current_file.isdir))
804
 
    {
 
805
    if (current_file.isdir)
 
806
    {
 
807
        var actions2_directory = document.getElementById("actions2_directory");
 
808
        actions2_directory.setAttribute("style", "display: inline;");
 
809
    }
 
810
    else
 
811
    {
 
812
        var actions2_file = document.getElementById("actions2_file");
 
813
        actions2_file.setAttribute("style", "display: inline;");
805
814
        var moreactions = document.getElementById("moreactions_area");
806
815
        moreactions.setAttribute("style", "display: none;");
807
816
    }