33( function ( angular ) {
44 angular
55 . module ( 'mediaCenterRSSPluginWidget' )
6- . controller ( 'WidgetMediaCtrl' , [ '$scope' , '$sce' , 'DataStore' , 'Buildfire' , 'TAG_NAMES' , 'ItemDetailsService' , '$filter' , 'Location' , 'MEDIUM_TYPES' , '$rootScope' , 'trackAnalyticsActions' , 'utils' ,
6+ . controller ( 'WidgetMediaCtrl' , [ '$scope' , '$sce' , 'DataStore' , 'Buildfire' , 'TAG_NAMES' , 'ItemDetailsService' , '$filter' , 'Location' , 'MEDIUM_TYPES' , '$rootScope' , 'trackAnalyticsActions' , 'utils' ,
77 function ( $scope , $sce , DataStore , Buildfire , TAG_NAMES , ItemDetailsService , $filter , Location , MEDIUM_TYPES , $rootScope , trackAnalyticsActions , utils ) {
88
99 $rootScope . deviceHeight = window . innerHeight ;
6161 */
6262 WidgetMedia . item = ItemDetailsService . getData ( ) ;
6363 var regex = / ( s t y l e = " .+ ?" ) / gm;
64-
64+
6565 if ( ! WidgetMedia . item ) {
6666 return Location . goTo ( '#/' ) ;
6767 }
6868 WidgetMedia . item . description = ( WidgetMedia && WidgetMedia . item && WidgetMedia . item . description ) ? WidgetMedia . item . description . replace ( regex , '' ) : "" ;
69-
69+
7070 $rootScope . preventResetDefaults = false ;
7171
7272 /*
219219 }
220220 if ( WidgetMedia . data && WidgetMedia . data . design && WidgetMedia . data . design . itemDetailsLayout === 'Feed_Layout_3' ) {
221221 WidgetMedia . scrollableContainer = document . querySelectorAll ( '.slide' ) [ 1 ] ;
222- WidgetMedia . scrollHandler = function ( ) {
222+ WidgetMedia . scrollHandler = function ( ) {
223223 if ( ( window . innerHeight - WidgetMedia . scrollableContainer . scrollTop ) >= 0 ) {
224224 document . getElementById ( 'fullscreenImageDiv' ) . style . opacity = ( window . innerHeight - WidgetMedia . scrollableContainer . scrollTop ) / window . innerHeight ;
225225 }
245245 if ( $rootScope . data . design . itemDetailsLayout == WidgetMedia . data . design . itemDetailsLayout ) {
246246 resetDefaults ( ) ;
247247 currentRssUrl = WidgetMedia . data . content . rssUrl ;
248- $rootScope . showFeed = true ;
248+ $rootScope . showFeedList = true ;
249249 Buildfire . history . pop ( ) ;
250250 Location . goTo ( '#/' ) ;
251251 } else {
263263 WidgetMedia . data = $rootScope . data ;
264264 $scope . hideandshow = true ;
265265 currentRssUrl = $rootScope . data . currentRssUrl ;
266- $rootScope . showFeed = false ;
266+ $rootScope . showFeedList = false ;
267267 initScrollHandler ( ) ;
268268 if ( WidgetMedia . data && WidgetMedia . data . design && WidgetMedia . data . design . itemDetailsLayout === 'Feed_Layout_3' ) {
269269 Buildfire . spinner . show ( ) ;
312312 // check if a audio is playing
313313 audioPlayer . isPaused ( ( err , isPaused ) => {
314314 if ( err ) return console . err ( err ) ;
315-
315+
316316 if ( isPaused ) {
317317 $rootScope . audioPlayerPlaying = false ;
318318 } else {
495495 } ;
496496
497497 WidgetMedia . openLink = function ( link ) {
498- Buildfire . navigation . openWindow ( link , '_system' ) ;
498+ if ( Buildfire . getContext ( ) . device . platform === 'web' ) {
499+ window . open ( link , '_blank' )
500+ }
501+ else {
502+ Buildfire . navigation . openWindow ( link , '_system' ) ;
503+ }
499504 } ;
500505
501506 WidgetMedia . videoLoaded = function ( ) {
645650
646651 }
647652 ] ) ;
648- } ) ( window . angular ) ;
653+ } ) ( window . angular ) ;
0 commit comments