jvdrean (SVN) wrote:
Author: jvdrean
Date: 2008-06-23 18:02:25 +0200 (Mon, 23 Jun 2008)
New Revision: 10627
Modified:
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/import.js
xwiki-platform/web/trunk/standard/src/main/webapp/templates/importinline.vm
Log:
XE-14 : Merge XWiki.WebHome page content & wiki administration
Fixed bug when import was used without the admin app installed.
Modified: xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/import.js
===================================================================
---
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/import.js 2008-06-23
15:58:03 UTC (rev 10626)
+++
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/import.js 2008-06-23
16:02:25 UTC (rev 10627)
@@ -48,12 +48,17 @@
}
});
-function selectPackage(name)
+function selectPackage(attachmentName)
{
- var str = "<input type=\"hidden\" name=\"name\"
value=\"" + name + "\" />";
+ selectPackage("XWiki", "Import", attachmentName);
+}
+
+function selectPackage(space, page, attachmentName)
+{
+ var str = "<input type=\"hidden\" name=\"name\"
value=\"" + attachmentName + "\" />";
$('importDocName').innerHTML = str;
- var pars =
"action=getPackageInfos&name="+name+"&xpage=plain";
- var myAjax = new Ajax.XWikiRequest( "XWiki", "Import", {method:
'get', parameters: pars, onComplete: showPackageInfos} , "import");
+ var pars =
"action=getPackageInfos&name="+attachmentName+"&xpage=plain";
+ var myAjax = new Ajax.XWikiRequest(space, page, {method: 'get', parameters:
pars, onComplete: showPackageInfos} , "import");
}
Javascript doesn't allow 2 functions with the same name. In the end, only the last one
is actually
reachable.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/