mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
12772: Fix for ETHREEOH-1183 - Share wiki pages now created with indexable mimetype git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12773 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
* A collection of general functions used across most wiki scripts.
|
||||
*/
|
||||
const DEFAULT_PAGE_CONTENT = "This is a new page. It has no content";
|
||||
|
||||
/**
|
||||
* Takes an array of template parameter arguments
|
||||
* and returns an object keyed on parameter name.
|
||||
*
|
||||
*/
|
||||
function getTemplateArgs(params)
|
||||
{
|
||||
@@ -24,14 +24,6 @@ function getTemplateArgs(params)
|
||||
/* Format and return error object */
|
||||
function jsonError(errorString)
|
||||
{
|
||||
/*
|
||||
var obj =
|
||||
{
|
||||
"error": errorString
|
||||
};
|
||||
|
||||
return obj;
|
||||
*/
|
||||
status.setCode(status.STATUS_BAD_REQUEST, errorString);
|
||||
}
|
||||
|
||||
@@ -49,8 +41,10 @@ function createWikiPage(name, folder, options)
|
||||
if (options.content)
|
||||
{
|
||||
page.content = options.content;
|
||||
page.mimetype = "text/html";
|
||||
}
|
||||
}
|
||||
|
||||
// Initialise tags to empty array
|
||||
page.tags = [];
|
||||
|
||||
@@ -80,6 +74,4 @@ function getWikiContainer(site)
|
||||
}
|
||||
|
||||
return wiki;
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -1,12 +1,11 @@
|
||||
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/wiki/lib/wiki.lib.js">
|
||||
|
||||
/**
|
||||
* Update specified wiki page.
|
||||
*
|
||||
*
|
||||
* @method PUT
|
||||
* @param uri {string} /slingshot/wiki/page/{siteid}/{pageTitle}
|
||||
*/
|
||||
|
||||
function getTemplateParams()
|
||||
{
|
||||
// Grab the URI parameters
|
||||
@@ -165,7 +164,6 @@ function sortByLabel(version1, version2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getLatestVersion(versionHistory)
|
||||
{
|
||||
versionHistory.sort(sortByLabel);
|
||||
|
Reference in New Issue
Block a user