[Yanel-commits] rev 60552 - public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Thu Sep 8 11:32:54 CEST 2011
Author: michi
Date: 2011-09-08 11:32:53 +0200 (Thu, 08 Sep 2011)
New Revision: 60552
Modified:
public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java
Log:
allow disabling the mobile view completely
Modified: public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java
===================================================================
--- public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java 2011-09-08 09:31:23 UTC (rev 60551)
+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java 2011-09-08 09:32:53 UTC (rev 60552)
@@ -568,6 +568,14 @@
* Check whether mobile view is requested. Please overwrite this method in case there exist other rules than just being a mobile device.
*/
protected boolean isMobileView() {
+ try {
+ String isMobileViewParamValue = getResourceConfigProperty("is-mobile-view");
+ if (isMobileViewParamValue != null && isMobileViewParamValue.equals("false")) { // INFO: In some cases one wants to disable the mobile view completely (including mobile CSS, if applicable)
+ return false;
+ }
+ } catch(Exception e) {
+ log.error(e, e);
+ }
return isMobileDevice();
}
More information about the Yanel-commits
mailing list