As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
$document->addScript($this->profile->share.'/yui/selector/selector-beta-min.jss');
// Document Preview $document->addStylesheet($this->profile->share.'/components/preview/preview.css'); $document->addScript($this->profile->share.'/components/preview/preview.js'); $document->addStylesheet($this->profile->share.'/components/preview/full-preview.css'); $document->addScript($this->profile->share.'/components/preview/full-preview.js');
$document->addStylesheet($this->profile->share.'/components/preview/web-preview.css'); $document->addScript($this->profile->share.'/components/preview/web-preview.js'); $document->addStylesheet($this->profile->share.'/components/preview/WebPreviewer.css');
<script type="text/javascript">//<![CDATA[ new Alfresco.WebPreview("document-details").setOptions({…
<script type="text/javascript">//<![CDATA[ new Alfresco.WebPreview("document-details").setOptions({ nodeRef: 'workspace://SpacesStore/<?php echo $this->file->uuid ?>', name: '<?php echo $this->file->name ?>', icon: '/components/images/generic-file-32.png', mimeType: '<?php echo $this->file->content_type ?>', previews: <?php echo json_encode($this->thumbnail->definitions) ?> }).setMessages( {"label.currentFrame": "Page <b>{0}<\/b> of <b>{1}<\/b>", "button.next": "Next", "header.previewDocument": "Preview of {0}", "error.contentNotAVM2MovieClip": "The preview cannot be displayed since its not a AVM2 movie clip", "label.noFlash": "To view the preview please download the latest Flash Player from the<br\/> <a href=\"http:\/\/www.adobe.com\/go\/getflashplayer\">Adobe Flash Player Download Center<\/a>.", "label.jumpToPage": "Jump to page:", "label.noPreview": "This document can't be previewed.<br\/>Click <a href=\"{0}\">here<\/a> to download it.", "button.fullPreview": "Full Screen", "message.invalidFrame": "You must enter a frame between {0} and {1}", "error.server": "The preview cannot be displayed due to a server error", "button.previous": "Prev"} ); //]]></script>
the key change is new Alfresco.Preview needs to become "new Alfresco.WebPreview"
var so = new deconcept.SWFObject(Alfresco.constants.URL_CONTEXT + "/components/preview/WebPreviewer.swf","WebPreviewer", "100%", "670", "9.0.45"); so.addVariable("fileName", this.options.name); so.addVariable("paging", previewCtx.paging); so.addVariable("url", escape(previewCtx.url)); so.addVariable("jsCallback", "Alfresco.util.ComponentManager.find({id:'" + this.id + "'})[0].onWebPreviewerEvent"); so.addParam("allowScriptAccess", "always"); //so.addParam("allowScriptAccess", "sameDomain"); so.addParam("allowFullScreen", "true"); so.addParam("wmode", "transparent"); so.write(this.id + "-swfPlayer-div");
so.addParam("allowScriptAccess", "always");
so.addVariable("url", escape(previewCtx.url));