summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/edit/htdocs/page/page.html
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-03-08 08:18:07 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-03-08 08:18:07 +0000
commit49b878b1b0f2e52bbd5282c22ac32a68e1e8736c (patch)
tree1eb26926f9d703c61b329a0f07178090b57cd55d /sca-cpp/trunk/modules/edit/htdocs/page/page.html
parent5b33dc5c5a87fff146951ca0543bf558454c331d (diff)
Change ATOM and RSS feed representations to use name value pairs instead of just strings, to allow support for all ATOM and RSS attributes and avoid confusion with non-feed string results.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1079292 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/page/page.html16
1 files changed, 9 insertions, 7 deletions
diff --git a/sca-cpp/trunk/modules/edit/htdocs/page/page.html b/sca-cpp/trunk/modules/edit/htdocs/page/page.html
index 7ace732526..297e5c5a69 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/page/page.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/page/page.html
@@ -42,7 +42,6 @@
</th>
<th class="thl thr" style="padding-top: 0px; padding-bottom: 0px; padding-right: 0px; text-align: right;">
-<span id="source" style="font-weight: normal;">[atom json]</span>
<input type="button" id="saveButton" style="font-weight: bold;" Value="Saved"/>
</th>
</tr>
@@ -80,15 +79,18 @@ var pages = sca.reference(editWidget, "pages");
* The current app name.
*/
var appname = ui.queryParams()['app'];
-$('source').innerHTML = '[<a href="/pages/' + appname + '">atom</a> <a href="/appcache/' + appname + '/app.html">json</a>]';
/**
* Return the page in an ATOM entry.
*/
function atompage(doc) {
- var entry = atom.readATOMEntryDocument(doc);
- var item = caddr(entry);
- return cddr(item);
+ var entry = atom.readATOMEntry(mklist(doc));
+ if (isNil(entry))
+ return mklist();
+ var content = namedElementChild("'content", car(entry));
+ if (content == null)
+ return mklist();
+ return elementChildren(content);
}
/**
@@ -180,8 +182,8 @@ function save() {
// Update the page ATOM entry
var entry = '<entry xmlns="http://www.w3.org/2005/Atom">' +
- '<title type="text">' + appname + '</title><id>' + appname + '</id><content type="application/xml"><item>' +
- savedpagexhtml + '</item></content></entry>';
+ '<title type="text">' + appname + '</title><id>' + appname + '</id><content type="application/xml">' +
+ savedpagexhtml + '</content></entry>';
pages.put(appname, entry, function(e) {
if (savedpagexhtml == pagexhtml())