Page 1 of 1

mobile and desktop - different button's action

PostPosted: Tue Jun 24, 2014 1:41 pm
by franzkekko
Hi everybody,
I'm creating a tour that on desktop pressing info on cross controlbar will open a websitebox, but when device is mobile, nothing happens.
I created a PDF with a description; I want that my info button on mobile and tablet simply link to a pdf on my directory.

But, it seems to be harder than my thought. I tryed this edit:

Code: Select all
   <layer name="crosscornerbarbtn_display_info"
         device="desktop"
           url="%FIRSTXML%/graphics/crosscornerbar/btn_info.png"
           onclick="openWebsite-websiteViewer(button1websiteViewer|websiteViewer|displaywebsitewebsite_url, button1websiteViewer|websiteViewer|displaywebsitewebsite_title);"   
           style="crosscornerbarbtn_horizontal_style|crosscornerbarbtn_horizontal_style_alpha"
           visible="false"
           />
       
   <layer name="crosscornerbarbtn_display_info"
         device="mobile"
           url="%FIRSTXML%/graphics/crosscornerbar/btn_info.png"
           onclick="openurl(pages.pdf);"   
           style="crosscornerbarbtn_horizontal_style|crosscornerbarbtn_horizontal_style_alpha"
           visible="false"
           />
         


It works, but both desktop and tablet do the same action, opening pdf.
Any help?

Thanks in advance ;)

P.S. I didn't find anything on XML or JavaScript reference about "visible" and "displayed" attributes...what are the differences?

Re: mobile and desktop - different button's action

PostPosted: Tue Aug 26, 2014 2:02 pm
by franzkekko
up

Re: mobile and desktop - different button's action

PostPosted: Tue Aug 26, 2014 3:35 pm
by mediavets
franzkekko wrote:up


I suggest you use a simple button plugin to open the PDF viewer box?

Re: mobile and desktop - different button's action

PostPosted: Tue Aug 26, 2014 3:40 pm
by franzkekko
may be, but in desktop mode it's good to see the website page of the product...
If it's possible it would be great...otherwise I'll use a pdf on both view.

Re: mobile and desktop - different button's action

PostPosted: Tue Aug 26, 2014 3:43 pm
by mediavets
franzkekko wrote:may be, but in desktop mode it's good to see the website page of the product...
If it's possible it would be great...otherwise I'll use a pdf on both view.


OK - I'm sorry I didn't spot that you are trying to get different functionality on desktop and mobile platforms.

Good luck with that.

Re: mobile and desktop - different button's action

PostPosted: Tue Aug 26, 2014 3:52 pm
by franzkekko
but shouldn't be so difficult... why doesn't work properly using property device="dektop" or device="mobile" ?

Re: mobile and desktop - different button's action

PostPosted: Thu Aug 28, 2014 9:11 am
by benji33
franzkekko wrote:but shouldn't be so difficult... why doesn't work properly using property device="dektop" or device="mobile" ?


With an S to devices like that ?
devices="mobile" / devices="dektop" / devices="tablet"

Code: Select all
<... devices="dektop" ...></ ...>

<... devices="tablet|mobile" ...></ ...>

Re: mobile and desktop - different button's action

PostPosted: Thu Aug 28, 2014 11:42 am
by franzkekko
that's so embarassing.... emm... it... works :rolleyes:

It was so easy =D =D :)

Thanks :)

Re: mobile and desktop - different button's action

PostPosted: Thu Aug 28, 2014 12:06 pm
by franzkekko
If you want to see and comment, here's my work.

http://www.francescosartoriph.com/vtour ... 145t2.html