AnsweredAssumed Answered

Custom Update file dialog

Question asked by john85 on Nov 7, 2010
Hi all,

Im been playing around alfresco for a while now and i just thought it would be nice if the update function in alfresco will have other options like the same with Done-editing dialog. 

* if document isnt versionable - display radio button  with version {1.0}
* if document is versionned - Display radio buttons {Minor {1.1} and Major {2.0})
* Display version notes text box.

So far ive been adding methods in CCUpdateFileDialog.java i fashioned the code the same with DoneEditingDialog.java
   public String getMajorNewVersionLabel()
   {
      String label = getCurrentVersionLabel();
      StringTokenizer st = new StringTokenizer(label, ".");
      return (Integer.valueOf(st.nextToken()) + 1) + ".0";
   }
   public String getMinorNewVersionLabel()
   {
      String label = getCurrentVersionLabel();
      StringTokenizer st = new StringTokenizer(label, ".");
      return st.nextToken() + "." + (Integer.valueOf(st.nextToken()) + 1);
   }

or
   public boolean isSourceVersionable()
   {
      return sourceVersionable;
   }

is there something missing???

After editing Update-file.jsp, the dialog can't seem to retrieve the document version or set the value for version up (if not versionnable {1.0} ) .

or can i just redirect the dialog after click update button to proceed to done-editing.jsp screen before any update on file will occur???

hope somebody will help :(

tnx,
john

Outcomes