Author: dward
Date: 2008-01-08 19:04:48 +0100 (Tue, 08 Jan 2008)
New Revision: 6675
Modified:
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/client/wizard/CreateCollectionWizard.java
Log:
- CURRIKI-1186
- Allow document to be created in a space other than the creator's.
Modified:
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/client/wizard/CreateCollectionWizard.java
===================================================================
---
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/client/wizard/CreateCollectionWizard.java
2008-01-08 17:12:22 UTC (rev 6674)
+++
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/client/wizard/CreateCollectionWizard.java
2008-01-08 18:04:48 UTC (rev 6675)
@@ -42,10 +42,10 @@
import org.curriki.gwt.client.widgets.siteadd.ThankYouDialog;
public class CreateCollectionWizard {
- private String createdPage;
private String category;
private static ModalDialog metaPanel;
private ThankYouDialog thankYouDialog;
+ private String space;
private Document doc;
@@ -54,6 +54,7 @@
}
public void createCollection(String space, String pageName, String
pageTitle){
+ this.space = space;
CurrikiService.App.getInstance().createCollectionDocument(space,
pageName, pageTitle, new CurrikiAsyncCallback() {
public void onFailure(Throwable throwable) {
super.onFailure(throwable);
@@ -92,7 +93,11 @@
metaPanel.hide();
// We need to move the asset to the root collection
-
CurrikiService.App.getInstance().finalizeAssetCreation(doc.getFullName(),
Constants.ROOT_COLLECTION_PAGE, -1,
+ String parent = Constants.ROOT_COLLECTION_PAGE;
+ if (space != null){
+ parent = space+"."+parent;
+ }
+
CurrikiService.App.getInstance().finalizeAssetCreation(doc.getFullName(),
parent, -1,
new CurrikiAsyncCallback(){
public void onFailure(Throwable caught) {
super.onFailure(caught);
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications