726
726
/* Subversion actions */
727
/* TODO: Work out when these are appropriate */
728
727
var svnadd = document.getElementById("act_svnadd");
728
var svndiff = document.getElementById("act_svndiff");
729
729
var svnrevert = document.getElementById("act_svnrevert");
730
730
var svncommit = document.getElementById("act_svncommit");
731
/* These are only useful if we are in a versioned directory and have some
733
if (numsel >= 1 && current_file.svnstatus)
733
735
svnadd.setAttribute("class", "choice");
734
736
svnadd.removeAttribute("disabled");
737
739
svncommit.setAttribute("class", "choice");
738
740
svncommit.removeAttribute("disabled");
744
svnadd.setAttribute("class", "disabled");
745
svnadd.setAttribute("disabled", "disabled");
746
svnrevert.setAttribute("class", "disabled");
747
svnrevert.setAttribute("disabled", "disabled");
748
svncommit.setAttribute("class", "disabled");
749
svncommit.setAttribute("disabled", "disabled");
752
/* Diff only supports one path at the moment. */
755
svnst = file_listing[selected_files[0]].svnstatus;
757
/* Diff also doesn't like unversioned paths, and diffs on unchanged
758
* files are pointless. */
759
if (svnst && svnst != "unversioned" && svnst != "normal")
761
svndiff.setAttribute("class", "choice");
762
svndiff.removeAttribute("disabled");
767
svndiff.setAttribute("class", "disabled");
768
svndiff.setAttribute("disabled", "disabled");
740
771
var svncheckout = document.getElementById("act_svncheckout");
741
772
/* current_path == username: We are at the top level */
742
773
if (current_path == username)