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

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/browser/media/specialhome.js

  • Committer: Matt Giuca
  • Date: 2010-02-18 03:55:32 UTC
  • Revision ID: matt.giuca@gmail.com-20100218035532-k3vj6kdqwfsx0du0
specialhome.js: Previously assumed 'missing' if a directory listing couldn't be retrieved. Now checks for 404 status. Any other status, prints 'error -- contact system administrator', because clicking Checkout won't help you.

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
                span.appendChild(button);
182
182
            }
183
183
        }
184
 
        else
 
184
        else if (response.status == 404)
185
185
        {
186
186
            // Missing: Try to check out or create the repository
187
187
            li.appendChild(dom_make_text_elem("span", name, description));
211
211
            button.setAttribute("value", "Checkout");
212
212
            span.appendChild(button);
213
213
        }
 
214
        else
 
215
        {
 
216
            // Error: The directory listing could not be retrieved
 
217
            // Make a link in case the user wants to investigate
 
218
            li.appendChild(dom_make_link_elem("span", name, description,
 
219
                app_path(this_app, username, path, name)));
 
220
            span = dom_make_text_elem("span",
 
221
                  " (error \u2013 contact system administrator)",
 
222
                  "There was an error retrieving information about this "
 
223
                  + "directory.");
 
224
            span.setAttribute("class", "status");
 
225
            li.appendChild(span);
 
226
        }
214
227
    }
215
228
 
216
229
    /* Are we working in a subdirectory or parent? */