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

« back to all changes in this revision

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

  • Committer: wagrant
  • Date: 2008-07-24 05:09:17 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:946
specialhome: Work with per-subject 'mywork' directories, although it
             still seems a little racy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
 
150
150
            var button = document.createElement("input");
151
151
            button.addEventListener("click", function(event)
152
 
            {   
153
 
                if (create_if_needed(path_join(username, name)))
 
152
            {
 
153
                var localpath = path_join(path, name);
 
154
 
 
155
                // The repository doesn't know about PERSONALDIR.
 
156
                if (name == PERSONALDIR) name = '';
 
157
                var repopath = path_join(username, path, name);
 
158
                if (create_if_needed(repopath))
154
159
                {
155
160
                    // Try a checkout
156
161
                    do_action("svncheckout", current_path, {"path":
157
 
                        [
158
 
                            path_join(username, path, name), // url
159
 
                            path_join(path, name) // localpath
160
 
                        ]});
 
162
                        [repopath, localpath]});
161
163
                }
162
164
            },
163
165
            false);
183
185
 
184
186
    if (response.status == 200)
185
187
    {
186
 
        return;
 
188
        return true;
187
189
    }
188
190
    else if (response.status == 404)
189
191
    {
192
194
                {
193
195
                    "action": "svnrepomkdir",
194
196
                    "path": path,
195
 
                    "logmsg": "Automated creation of '" + name + "' work directory"
 
197
                    "logmsg": "Automated creation of '" + path + "' work directory"
196
198
                }, "POST");
197
199
 
198
200
        if (r2.status == 200)