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

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/svnlog/media/log.js

  • Committer: David Coles
  • Date: 2009-12-02 00:26:04 UTC
  • mto: This revision was merged to the branch mainline in revision 1327.
  • Revision ID: coles.david@gmail.com-20091202002604-cdu4yb5o3bhbx12z
Disable the 'Update to Revision x' button when sending request.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    current_path = get_path();
30
30
}
31
31
 
32
 
function update_revision(revid) {
 
32
function update_revision(button, revid) {
 
33
    button.disabled = true;
33
34
    do_action("svnupdate", current_path, {'path':'.', 'revision': revid},
34
35
        null, function(path, response) {
35
 
            window.location.href = make_path(browser_app)+'/'+path;
 
36
            var error = response.getResponseHeader("X-IVLE-Action-Error");
 
37
            if(error == null || error == "")
 
38
            {
 
39
                /** If no error, return to current_path in browser */
 
40
                window.location.href = make_path(browser_app)+'/'+path;
 
41
            }
 
42
            else
 
43
            {
 
44
                /** Otherwise stay here */
 
45
                button.disabled = false;
 
46
            }
36
47
        });
37
48
}