Quantcast
Channel: SCN : Unanswered Discussions - SAP GUI
Viewing all articles
Browse latest Browse all 2552

Screen Personas 3 - Flavor resize

$
0
0

Hi everyone,

I have a (hopefully) little problem and want you to ask for help.


My wish is to provide two flavors with more or less identic content, each with its own resolution (1024*768 and 1280 * 1024) and a resolution responsive flavor switching.
So if the first user is joining with the resolution of 1024*768 he should get FlavorA and the second user with a resolution of 1280*1024 FlavorB.
In my actual tryings, I’ve added the following Script, to switch from FlavorA to FlavorB, resolution responsive:


//check for screen resolution
// 1. Check your screen size 
var screenSize, flavor; 
screenSize = session.findById("wnd[0]").width; 
// 2.Decide which flavor is the best fits 
if (screenSize > 1279) { 
flavor = 'FlavorA'; 
} else {
flavor = 'FlavorB'; 

// 3. Switch to the flavor if it is not already used 
if (flavor !=
session.info.flavorId) { 
session.utils.changeFlavor(flavor); 


This works and I’m pretty happy with that. But I’m really struggling, trying to force the screen size in FlavorB.
Here are my coding attempts:


session.findById("wnd[0]").height = "768px";
session.findById("wnd[0]").width = "1024px";

window.width = "1024px";
window.height = "768px";

Nothing really works.

Maybe I can manage this with a second Theme, which is getting automatically chosen in FlavorB.
But I can’t find any codings for that.

 

 

Personas 3.0 SP2


Thanks a lot



Viewing all articles
Browse latest Browse all 2552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>