aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorttsanton2014-02-04 14:14:15 (EST)
committerttsanton2014-02-04 14:16:19 (EST)
commit16574f7dda846cb4a07cbffce383b8ec68bf6003 (patch)
tree12bd7490c05ad14911aa3d18c282d66ffe2e1bb6
parentd0c49d1e5542b2d9fdbe4e0295ba778d1029e635 (diff)
downloadorg.eclipse.lyo.docs-16574f7dda846cb4a07cbffce383b8ec68bf6003.zip
org.eclipse.lyo.docs-16574f7dda846cb4a07cbffce383b8ec68bf6003.tar.gz
org.eclipse.lyo.docs-16574f7dda846cb4a07cbffce383b8ec68bf6003.tar.bz2
Bug 426997 - Nina Enable large preview when small preview not foundrefs/changes/26/21526/2
Change-Id: I74f68354cb1a60593b20e42a80b4b773f07fa4ed Signed-off-by: ttsanton <ttsanton@us.ibm.com>
-rw-r--r--ninacrm/src/main/webapp/index.jsp12
1 files changed, 9 insertions, 3 deletions
diff --git a/ninacrm/src/main/webapp/index.jsp b/ninacrm/src/main/webapp/index.jsp
index 65b5447..0571e5e 100644
--- a/ninacrm/src/main/webapp/index.jsp
+++ b/ninacrm/src/main/webapp/index.jsp
@@ -1,5 +1,5 @@
<%--
- Copyright (c) 2011, 2012 IBM Corporation.
+ Copyright (c) 2011, 2014 IBM Corporation.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
@@ -210,8 +210,14 @@ function showPreview(elem) { // (1)
function parsePreview(xml) { // (1)
var ret = {};
var compact = firstChild(firstChild(xml));
- var preview = firstChild(
- firstChildNamed(compact,'oslc:smallPreview')); // (2)
+ var smallPrev = firstChildNamed(compact,'oslc:smallPreview'); //(2a)
+ var largePrev = firstChildNamed(compact, 'oslc:largePreview'); //(2b)
+ var preview;
+ if(smallPrev != null){
+ preview = firstChild(smallPrev);
+ } else{
+ preview = firstChild(largePrev);
+ }
if (preview) {
var document = firstChildNamed(preview, 'oslc:document');
if (document) ret.uri = document.getAttribute('rdf:resource');