Permalink
Browse files

Version 1.5.12 (14-Jul-2013 00:07)

  • Loading branch information...
1 parent bca184f commit 68474e848943c6849185a892c27d77e085f5deed @lwt-project committed Jul 13, 2013
Showing with 989 additions and 1 deletion.
  1. +83 −0 do_test.php
  2. +83 −0 do_text.php
  3. +6 −1 info.htm
  4. +817 −0 php-mobile-detect/Mobile_Detect.php
View
@@ -21,6 +21,8 @@
require_once( 'connect.inc.php' );
require_once( 'dbutils.inc.php' );
require_once( 'utilities.inc.php' );
+require_once( 'php-mobile-detect/Mobile_Detect.php' );
+$detect = new Mobile_Detect;
$p = '';
if (isset($_REQUEST['selection']) && isset($_SESSION['testsql']))
@@ -33,8 +35,87 @@
if ($p != '') {
framesetheader('Test');
+
+ $tabletMode = getSettingWithDefault('set-text-test-tablet-mode')+0;
+
+ if ( $detect->isMobile() ) {
?>
+
+ <style type="text/css">
+ body {
+ background-color: #888888;
+ margin: 0;
+ overflow: hidden;
+ }
+ #frame-h {
+ position:absolute;
+ border: 1px solid #000000;
+ }
+ #frame-l {
+ position:absolute;
+ border: 1px solid #000000;
+ }
+ #frame-ro {
+ position:absolute;
+ border: 1px solid #000000;
+ }
+ #frame-ru {
+ position:absolute;
+ border: 1px solid #000000;
+ }
+ </style>
+ <script type="text/javascript" src="js/jquery.js" charset="utf-8"></script>
+ <script type="text/javascript">
+//<![CDATA[
+ function rsizeIframes() {
+ var h_height = <?php echo getSettingWithDefault('set-test-h-frameheight'); ?> + 10;
+ var lr_perc = <?php echo getSettingWithDefault('set-test-l-framewidth-percent'); ?>;
+ var r_perc = <?php echo getSettingWithDefault('set-test-r-frameheight-percent'); ?>;
+ var w = $(window).width();
+ var h = $(window).height();
+ var l_width = w*lr_perc/100;
+ var r_width = w - l_width;
+ var l_height = h - h_height;
+ var ro_height = h*r_perc/100;
+ var ru_height = h - ro_height;
+ $('#frame-h').width(l_width-5).height(h_height-5).css('top',0).css('left',0);
+ $('#frame-h-2').width('100%').height('100%').css('top',0).css('left',0);
+ $('#frame-l').width((l_width-5)).height(l_height-5).css('top',h_height).css('left',0);
+ $('#frame-l-2').width('100%').height('100%').css('top',0).css('left',0);
+ $('#frame-ro').width(r_width-5).height(ro_height-5).css('top',0).css('left',l_width);
+ $('#frame-ro-2').width('100%').height('100%').css('top',0).css('left',0);
+ $('#frame-ru').width(r_width-5).height(ru_height-5).css('top',ro_height).css('left',l_width);
+ $('#frame-ru-2').width('100%').height('100%').css('top',0).css('left',0);
+ }
+
+ function init() {
+ rsizeIframes();
+ $(window).resize(rsizeIframes);
+ }
+
+ $(document).ready(init);
+//]]>
+</script>
+<div id="frame-h" style="overflow:scroll; -webkit-overflow-scrolling: touch;">
+ <iframe id="frame-h-2" src="do_test_header.php?<?php echo $p; ?>" scrolling="yes" name="h" style="display:inline-block;"></iframe>
+</div>
+<div id="frame-ro" style="overflow:scroll; -webkit-overflow-scrolling: touch;">
+<iframe id="frame-ro-2" src="empty.htm" scrolling="yes" name="ro" style="display:inline-block;"></iframe>
+</div>
+<div id="frame-l" style="overflow:scroll; -webkit-overflow-scrolling: touch;">
+ <iframe id="frame-l-2" src="empty.htm" scrolling="yes" name="l" style="display:inline-block; overflow:scroll;"></iframe>
+</div>
+<div id="frame-ru" style="overflow:scroll; -webkit-overflow-scrolling: touch;">
+ <iframe id="frame-ru-2" src="empty.htm" scrolling="yes" name="ru" style="display:inline-block;"></iframe>
+</div>
+
+<?php
+
+ } else {
+
+?>
+
<frameset cols="<?php echo tohtml(getSettingWithDefault('set-test-l-framewidth-percent')); ?>%,*">
<frameset rows="<?php echo tohtml(getSettingWithDefault('set-test-h-frameheight')); ?>,*">
<frame src="do_test_header.php?<?php echo $p; ?>" scrolling="auto" name="h" />
@@ -49,6 +130,8 @@
</html>
<?php
+ }
+
}
else {
View
@@ -19,14 +19,95 @@
require_once( 'connect.inc.php' );
require_once( 'dbutils.inc.php' );
require_once( 'utilities.inc.php' );
+require_once( 'php-mobile-detect/Mobile_Detect.php' );
+$detect = new Mobile_Detect;
if (isset($_REQUEST['start'])) {
$audio = get_first_value('select TxAudioURI as value from ' . $tbpref . 'texts where TxID = ' . $_REQUEST['start']);
framesetheader('Read');
+
+ $tabletMode = getSettingWithDefault('set-text-test-tablet-mode')+0;
+
+ if ( $detect->isMobile() ) {
?>
+
+ <style type="text/css">
+ body {
+ background-color: #888888;
+ margin: 0;
+ overflow: hidden;
+ }
+ #frame-h {
+ position:absolute;
+ border: 1px solid #000000;
+ }
+ #frame-l {
+ position:absolute;
+ border: 1px solid #000000;
+ }
+ #frame-ro {
+ position:absolute;
+ border: 1px solid #000000;
+ }
+ #frame-ru {
+ position:absolute;
+ border: 1px solid #000000;
+ }
+ </style>
+ <script type="text/javascript" src="js/jquery.js" charset="utf-8"></script>
+ <script type="text/javascript">
+//<![CDATA[
+ function rsizeIframes() {
+ var h_height = <?php echo (isset($audio) ? getSettingWithDefault('set-text-h-frameheight-with-audio') : getSettingWithDefault('set-text-h-frameheight-no-audio')); ?> + 10;
+ var lr_perc = <?php echo getSettingWithDefault('set-text-l-framewidth-percent'); ?>;
+ var r_perc = <?php echo getSettingWithDefault('set-text-r-frameheight-percent'); ?>;
+ var w = $(window).width();
+ var h = $(window).height();
+ var l_width = w*lr_perc/100;
+ var r_width = w - l_width;
+ var l_height = h - h_height;
+ var ro_height = h*r_perc/100;
+ var ru_height = h - ro_height;
+ $('#frame-h').width(l_width-5).height(h_height-5).css('top',0).css('left',0);
+ $('#frame-h-2').width('100%').height('100%').css('top',0).css('left',0);
+ $('#frame-l').width((l_width-5)).height(l_height-5).css('top',h_height).css('left',0);
+ $('#frame-l-2').width('100%').height('100%').css('top',0).css('left',0);
+ $('#frame-ro').width(r_width-5).height(ro_height-5).css('top',0).css('left',l_width);
+ $('#frame-ro-2').width('100%').height('100%').css('top',0).css('left',0);
+ $('#frame-ru').width(r_width-5).height(ru_height-5).css('top',ro_height).css('left',l_width);
+ $('#frame-ru-2').width('100%').height('100%').css('top',0).css('left',0);
+ }
+
+ function init() {
+ rsizeIframes();
+ $(window).resize(rsizeIframes);
+ }
+
+ $(document).ready(init);
+//]]>
+</script>
+<div id="frame-h" style="overflow:scroll; -webkit-overflow-scrolling: touch;">
+ <iframe id="frame-h-2" src="do_text_header.php?text=<?php echo $_REQUEST['start']; ?>" scrolling="yes" name="h" style="display:inline-block;"></iframe>
+</div>
+<div id="frame-ro" style="overflow:scroll; -webkit-overflow-scrolling: touch;">
+<iframe id="frame-ro-2" src="empty.htm" scrolling="yes" name="ro" style="display:inline-block;"></iframe>
+</div>
+<div id="frame-l" style="overflow:scroll; -webkit-overflow-scrolling: touch;">
+ <iframe id="frame-l-2" src="do_text_text.php?text=<?php echo $_REQUEST['start']; ?>" scrolling="yes" name="l" style="display:inline-block; overflow:scroll;"></iframe>
+</div>
+<div id="frame-ru" style="overflow:scroll; -webkit-overflow-scrolling: touch;">
+ <iframe id="frame-ru-2" src="empty.htm" scrolling="yes" name="ru" style="display:inline-block;"></iframe>
+</div>
+
+<?php
+
+ } else {
+
+?>
+
<frameset cols="<?php echo tohtml(getSettingWithDefault('set-text-l-framewidth-percent')); ?>%,*">
<frameset rows="<?php echo (isset($audio) ? getSettingWithDefault('set-text-h-frameheight-with-audio') : getSettingWithDefault('set-text-h-frameheight-no-audio') ); ?>,*">
<frame src="do_text_header.php?text=<?php echo $_REQUEST['start']; ?>" scrolling="auto" name="h" />
@@ -41,6 +122,8 @@
</html>
<?php
+ }
+
}
else {
View
@@ -582,6 +582,10 @@
</li>
<li>
+ mobiledetect - Copyright © Șerban Ghiță &amp; Victor Stanciu, <a href="http://mobiledetect.net/" target="_blank">http://mobiledetect.net</a> (php-mobile-detect/Mobile_Detect.php)
+ </li>
+
+ <li>
iUI - Copyright © 2007-2011, <a href="http://www.iui-js.org/" target="_blank">http://www.iui-js.org/</a> (iui)
</li>
</ul>
@@ -2422,7 +2426,8 @@
<dd>
<ul>
<li>1.5.12 (July ?? 2013):<br />
- New Sort option for Terms/Expressions: "Word Count in Active Texts" (Descending).<br /><br />
+ New Sort option for Terms/Expressions: "Word Count in Active Texts" (Descending).<br />
+ (Hopefully) better Tablet/iPad® user experience in frame set screens.<br /><br />
</li>
<li>1.5.11 (July 12 2013):<br />
Oops, something went wrong.

0 comments on commit 68474e8

Please sign in to comment.