[Laszlo-checkins] r10595 - in openlaszlo/trunk/WEB-INF/lps/lfc: kernel/dhtml kernel/swf kernel/swf9 services views
bargull@openlaszlo.org
bargull at openlaszlo.org
Tue Aug 5 14:26:19 PDT 2008
Author: bargull
Date: 2008-08-05 14:26:13 -0700 (Tue, 05 Aug 2008)
New Revision: 10595
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzBrowserKernel.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzBrowserKernel.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzBrowserKernel.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
Log:
Change 20080805-bargull-PUU by bargull at dell--p4--2-53 on 2008-08-05 09:28:22
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Allow to query os-info
New Features: LPP-2991
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Added method "getOS()" to LzBrowser, it returns a runtime-dependent (!) os-info string.
Tests:
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzBrowserKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzBrowserKernel.lzs 2008-08-05 20:24:28 UTC (rev 10594)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzBrowserKernel.lzs 2008-08-05 21:26:13 UTC (rev 10595)
@@ -92,6 +92,13 @@
}
/**
+ * Returns information about the operating system
+ */
+static function getOS () {
+ return navigator.platform;
+}
+
+/**
* Returns the URL from which the application was loaded.
* @return String : the URL the swf was loaded from
*
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzBrowserKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzBrowserKernel.lzs 2008-08-05 20:24:28 UTC (rev 10594)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzBrowserKernel.lzs 2008-08-05 21:26:13 UTC (rev 10595)
@@ -146,7 +146,7 @@
*/
static function getVersion () {
if (!LzBrowserKernel._ver) {
- var o = getVersion().split(' ');
+ var o = System.capabilities.version.split(' ');
LzBrowserKernel._os = o[0];
o = o[1].split(',');
LzBrowserKernel._ver = (o[0] + '.' + o[2]) * 1;
@@ -155,6 +155,13 @@
}
/**
+ * Returns information about the operating system
+ */
+static function getOS () {
+ return System.capabilities.os;
+}
+
+/**
* Returns the URL from which the application was loaded.
* @return String : the URL the swf was loaded from
*
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzBrowserKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzBrowserKernel.lzs 2008-08-05 20:24:28 UTC (rev 10594)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzBrowserKernel.lzs 2008-08-05 21:26:13 UTC (rev 10595)
@@ -77,15 +77,15 @@
return lz.Utils.safeEval(js);
}
-static var _os = null;
-static var _ver = null;
+static var _os :String = null;
+static var _ver :String = null;
/**
* Returns version information about the browser
*/
-static function getVersion () {
+static function getVersion () :String {
if (!LzBrowserKernel._ver) {
- var o = Capabilities.version.split(' ');
+ var o:Array = Capabilities.version.split(' ');
LzBrowserKernel._os = o[0];
o = o[1].split(',');
LzBrowserKernel._ver = String(Number(o[0] + '.' + o[2]));
@@ -94,6 +94,13 @@
}
/**
+ * Returns information about the operating system
+ */
+static function getOS () :String {
+ return Capabilities.os;
+}
+
+/**
* Returns the URL from which the application was loaded.
* @return String : the URL the swf was loaded from
*
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs 2008-08-05 20:24:28 UTC (rev 10594)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs 2008-08-05 21:26:13 UTC (rev 10595)
@@ -88,10 +88,16 @@
/**
* Returns version information about the browser
*/
- function getVersion ()
+ function getVersion () :String
{ return LzBrowserKernel.getVersion ();}
-
+
/**
+ * Returns information about the operating system
+ */
+ function getOS () :String
+ { return LzBrowserKernel.getOS ();}
+
+ /**
* Returns the URL from which the application was loaded.
* @return String: the URL the swf was loaded from
*
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2008-08-05 20:24:28 UTC (rev 10594)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2008-08-05 21:26:13 UTC (rev 10595)
@@ -730,7 +730,7 @@
* Compute version info as a string
* @access public
*/
-static function versionInfoString () {
+static function versionInfoString () :String {
return (
'URL: ' + lz.Browser.getLoadURL() + '\n' +
'Version: ' + canvas.lpsversion + '\n' +
@@ -738,7 +738,8 @@
'Build: ' + canvas.lpsbuild + '\n' +
'Date: ' + canvas.lpsbuilddate + '\n' +
'Target: ' + canvas.runtime + '\n' +
- 'Runtime: ' + lz.Browser.getVersion() + '\n');
+ 'Runtime: ' + lz.Browser.getVersion() + '\n' +
+ 'OS: ' + lz.Browser.getOS() + '\n');
}
/**
More information about the Laszlo-checkins
mailing list