Skip to content

Instantly share code, notes, and snippets.

@theredpea
Last active August 23, 2018 15:46
Show Gist options
  • Save theredpea/4ac14114eb22824d3e549378a6104c33 to your computer and use it in GitHub Desktop.
Save theredpea/4ac14114eb22824d3e549378a6104c33 to your computer and use it in GitHub Desktop.
define("text!storytelling.views/play/play.ng.html", [], function() {
return `\x3c!-- Exit button --\x3e
<button ng-show="!slideTransitionInProgress"
qva-activate="onExitClicked($event)"
class="lui-overlay-button qv-story-play-exit"
q-title-translation="Common.Close"
dir="{{ directionService.direction }}"
ng-style="exitButtonStyle">
<span class="lui-overlay-button__icon lui-icon lui-icon--close"></span>
</button>
\x3c!-- Slides --\x3e
<div class="qv-story-slide-window" ng-style="slideWindowStyle" dir="{{ directionService.direction }}">
<div ng-repeat="slide in slides" class="qv-story-play-slide" ng-style="slideStyle" ng-class="{\'qv-story-slide-active\': activeSlideIndex==$index}" dir="ltr">
<div id="{{slideItem.qInfo.qId}}"
ng-if="$parent.$index <= $parent.$parent.activeSlideIndex + 1 && $parent.$index >= $parent.$parent.activeSlideIndex - 1"
class="qv-story-grid-object borderbox qv-story-{{slideItem.qData.visualization}}{{slideItem.qData.visualizationType ? \'-\' + slideItem.qData.visualizationType : \'\' }}"
ng-repeat="slideItem in slide.slideItems"
ng-class="{\'item-active\': active, \'qv-story-shape\': slideItem.qData.visualization === \'shape\'}"
ng-style="{{slideItem.qData.position}}">
<qv-slide-item-section/>
</div>
</div>
</div>
<div class="qv-play-nav-container"
qv-play-navigation
x-show-navigation="showNavigation"
x-show-more="showMore"
x-open-export-menu="openExportMenu"
x-export-story="exportStory"
x-export-button="exportButton"
x-print-to-ppt="printToPpt"
x-print-to-pdf="printToPdf"
x-close-export-popover="closeExportPopover"
qva-outside="onOutsideClicked($event)">
<button
qva-activate="toggleNavigation();"
class="qv-play-more lui-overlay-button qv-animate"
q-title-translation="Storytelling.play.actions"
ng-show="!showNavigation && showMore">
<span class="lui-overlay-button__icon lui-icon lui-icon--more"></span>
</button>
<div class="qv-play-navigator qv-animate ng-hide" ng-show="showNavigation" >
<button
class="lui-fade-button lui-fade-button--inverse qv-play-prev"
q-title-translation="{{ directionService.isRtl ? \'Storytelling.play.next\' : \'Storytelling.play.previous\' }}"
qva-activate="$event.preventDefault();onLeftNavPressed();">
<span class="lui-icon lui-icon--arrow-left"></span>
</button>
<div
class="qv-story-slide-number"
q-translation="CurrentSelections.Of,{{activeSlideIndex + 1}},{{slides.length}}">
</div>
<button
class="lui-fade-button lui-fade-button--inverse qv-play-next"
q-title-translation="{{ directionService.isRtl ? \'Storytelling.play.previous\' : \'Storytelling.play.next\' }}"
qva-activate="$event.preventDefault();onRightNavPressed();">
<span class="lui-icon lui-icon--arrow-right"></span>
</button>
<div ng-if="!isSmallDevice() && shouldPrintBeAdded()" class="qv-play-divider"></div>
<button
ng-if="!isSmallDevice() && shouldPrintBeAdded()"
q-title-translation="Storytelling.Open.ExportMenu"
class="lui-fade-button lui-fade-button--inverse lui-icon lui-icon--export"
qva-activate="openExportMenu($event)">
</button>
</div>
</div>
<immidiate-contextual class="export-story-popover"
ng-if="exportStory"
align-to="exportButton"
position="\'top\'"
width ="\'250\'"
on-close-view="closeExportPopover(event)">
<ul class="qui-icontextlist">
<li>
<span class="qui-textlist-text"
q-translation="Storytelling.ExportMenu.Ppt"
tid="storytelling-export-to-ppt"
q-title-translation="GlobalMenu.ExportStoryToPpt"
qva-activate="printToPpt()"></span>
</li>
<li>
<span class="qui-textlist-text"
tid="storytelling-export-to-pdf"
q-translation="Storytelling.ExportMenu.Pdf"
q-title-translation="GlobalMenu.ExportStoryToPdf"
qva-activate="printToPdf()"></span>
</li>
</ul>
</immidiate-contextual>
`
}),
define("storytelling.views/play/play-navigation", ["qvangular", "client.utils/state", "client.dialogs/print-dialog/print-dialog"], function(a, b, c) {
var d = null
, e = !1;
a.directive("qvPlayNavigation", function() {
return {
scope: {
showNavigation: "=",
showMore: "=",
openExportMenu: "=",
exportStory: "=",
exportButton: "=",
printToPpt: "=",
printToPdf: "=",
closeExportPopover: "="
},
//....
a.printToPdf = function() {
c.showForGlobalMenu(b, "Pdf", "Story"),
a.exportStory = !1
}
,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment