cvs: pearweb /public_html/javascript detect-user-agent.js /public_html/javascript/TreeMenu TreeMenu.js /public_html/pepr pepr-proposal-edit.php
/templates category-manager.html

From: Date: Sat, 23 May 2009 17:04:54 +0000
Subject: cvs: pearweb /public_html/javascript detect-user-agent.js /public_html/javascript/TreeMenu TreeMenu.js /public_html/pepr pepr-proposal-edit.php
/templates category-manager.html
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-8435@lists.php.net to get a copy of this message
clockwerx Sat May 23 17:04:54 2009 UTC Added files: /pearweb/public_html/javascript detect-user-agent.js Modified files: /pearweb/public_html/javascript/TreeMenu TreeMenu.js /pearweb/templates category-manager.html /pearweb/public_html/pepr pepr-proposal-edit.php Log: Bug #16062 - pear_editor.js actually depends on user agent detection

http://cvs.php.net/viewvc.cgi/pearweb/public_html/javascript/TreeMenu/TreeMenu.js?r1=1.1&r2=1.2&diff_format=u Index: pearweb/public_html/javascript/TreeMenu/TreeMenu.js diff -u pearweb/public_html/javascript/TreeMenu/TreeMenu.js:1.1 pearweb/public_html/javascript/TreeMenu/TreeMenu.js:1.2 --- pearweb/public_html/javascript/TreeMenu/TreeMenu.js:1.1 Sun Dec 1 18:37:32 2002 +++ pearweb/public_html/javascript/TreeMenu/TreeMenu.js Sat May 23 17:04:54 2009 @@ -32,7 +32,7 @@ // | Harald Radi <harald.radi@nme.at> | // +-----------------------------------------------------------------------+ // -// $Id: TreeMenu.js,v 1.1 2002/12/01 18:37:32 richard Exp $ +// $Id: TreeMenu.js,v 1.2 2009/05/23 17:04:54 clockwerx Exp $ /** @@ -553,88 +553,4 @@ } } -/** -* That's the end of the tree classes. What follows is -* the browser detection code. -*/ - -//<!-- -// Ultimate client-side JavaScript client sniff. Version 3.03 -// (C) Netscape Communications 1999-2001. Permission granted to reuse and distribute. -// Revised 17 May 99 to add is_nav5up and is_ie5up (see below). -// Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up -// also added support for IE5.5 Opera4&5 HotJava3 AOLTV -// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4, -// correct Opera 5 detection -// add support for winME and win2k -// synch with browser-type-oo.js -// Revised 26 Mar 01 to correct Opera detection -// Revised 02 Oct 01 to add IE6 detection - -// Everything you always wanted to know about your JavaScript client -// but were afraid to ask. Creates "is_" variables indicating: -// (1) browser vendor: -// is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV -// (2) browser version number: -// is_major (integer indicating major version number: 2, 3, 4 ...) -// is_minor (float indicating full version number: 2.02, 3.01, 4.04 ...) -// (3) browser vendor AND major version number -// is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3, -// is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_ie6, is_ie6up, is_hotjava3, is_hotjava3up, -// is_opera2, is_opera3, is_opera4, is_opera5, is_opera5up -// (4) JavaScript version number: -// is_js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...) -// (5) OS platform and version: -// is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k -// is_os2 -// is_mac, is_mac68k, is_macppc -// is_unix -// is_sun, is_sun4, is_sun5, is_suni86 -// is_irix, is_irix5, is_irix6 -// is_hpux, is_hpux9, is_hpux10 -// is_aix, is_aix1, is_aix2, is_aix3, is_aix4 -// is_linux, is_sco, is_unixware, is_mpras, is_reliant -// is_dec, is_sinix, is_freebsd, is_bsd -// is_vms -// -// See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and -// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html -// for detailed lists of userAgent strings. -// -// Note: you don't want your Nav4 or IE4 code to "turn off" or -// stop working when new versions of browsers are released, so -// in conditional code forks, use is_ie5up ("IE 5.0 or greater") -// is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5 -// to check version in code which you want to work on future -// versions. - -/** -* Severly curtailed all this as only certain elements -* are required by TreeMenu, specifically: -* o is_ie4up -* o is_nav6up -* o is_gecko -*/ - - // convert all characters to lowercase to simplify testing - var agt=navigator.userAgent.toLowerCase(); - - // *** BROWSER VERSION *** - // Note: On IE5, these return 4, so use is_ie5up to detect IE5. - var is_major = parseInt(navigator.appVersion); - var is_minor = parseFloat(navigator.appVersion); - - // Note: Opera and WebTV spoof Navigator. We do strict client detection. - // If you want to allow spoofing, take out the tests for opera and webtv. - var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) - && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) - && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)); - var is_nav6up = (is_nav && (is_major >= 5)); - var is_gecko = (agt.indexOf('gecko') != -1); - - - var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); - var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) ); - var is_ie4up = (is_ie && (is_major >= 4)); -//--> end hide JavaScript http://cvs.php.net/viewvc.cgi/pearweb/templates/category-manager.html?r1=1.6&r2=1.7&diff_format=u Index: pearweb/templates/category-manager.html diff -u pearweb/templates/category-manager.html:1.6 pearweb/templates/category-manager.html:1.7 --- pearweb/templates/category-manager.html:1.6 Sun May 17 04:44:32 2009 +++ pearweb/templates/category-manager.html Sat May 23 17:04:54 2009 @@ -1,5 +1,7 @@ <?php response_header(); ?> +<!-- TreeMenu depends on detect-user-agent --> +<script type="text/javascript" src="/javascript/detect-user-agent.js"></script> <script type="text/javascript" src="/javascript/TreeMenu/TreeMenu.js"></script> <script type="text/javascript"> <!-- http://cvs.php.net/viewvc.cgi/pearweb/public_html/pepr/pepr-proposal-edit.php?r1=1.56&r2=1.57&diff_format=u Index: pearweb/public_html/pepr/pepr-proposal-edit.php diff -u pearweb/public_html/pepr/pepr-proposal-edit.php:1.56 pearweb/public_html/pepr/pepr-proposal-edit.php:1.57 --- pearweb/public_html/pepr/pepr-proposal-edit.php:1.56 Fri May 8 05:15:17 2009 +++ pearweb/public_html/pepr/pepr-proposal-edit.php Sat May 23 17:04:54 2009 @@ -20,7 +20,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: pepr-proposal-edit.php,v 1.56 2009/05/08 05:15:17 clockwerx Exp $ + * @version $Id: pepr-proposal-edit.php,v 1.57 2009/05/23 17:04:54 clockwerx Exp $ */ auth_require('pear.pepr'); @@ -76,7 +76,9 @@ } ?> -<script language="javascript" src="/javascript/pear_editor.js"></script> +<!-- pear-editor depends on detect-user-agent --> +<script type="text/javascript" src="/javascript/detect-user-agent.js"></script> +<script type="text/javascript" src="/javascript/pear_editor.js"></script> <?php include_once 'HTML/QuickForm.php'; $form =& new HTML_QuickForm('proposal_edit', 'post', @@ -403,4 +405,4 @@ display_pepr_nav($proposal); $form->display(); -response_footer(); \ No newline at end of file +response_footer(); http://cvs.php.net/viewvc.cgi/pearweb/public_html/javascript/detect-user-agent.js?view=markup&rev=1.1 Index: pearweb/public_html/javascript/detect-user-agent.js +++ pearweb/public_html/javascript/detect-user-agent.js /** * @see TreeMenu.js * @see pear_editor.js */ //<!-- // Ultimate client-side JavaScript client sniff. Version 3.03 // (C) Netscape Communications 1999-2001. Permission granted to reuse and distribute. // Revised 17 May 99 to add is_nav5up and is_ie5up (see below). // Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up // also added support for IE5.5 Opera4&5 HotJava3 AOLTV // Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4, // correct Opera 5 detection // add support for winME and win2k // synch with browser-type-oo.js // Revised 26 Mar 01 to correct Opera detection // Revised 02 Oct 01 to add IE6 detection // Everything you always wanted to know about your JavaScript client // but were afraid to ask. Creates "is_" variables indicating: // (1) browser vendor: // is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV // (2) browser version number: // is_major (integer indicating major version number: 2, 3, 4 ...) // is_minor (float indicating full version number: 2.02, 3.01, 4.04 ...) // (3) browser vendor AND major version number // is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3, // is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_ie6, is_ie6up, is_hotjava3, is_hotjava3up, // is_opera2, is_opera3, is_opera4, is_opera5, is_opera5up // (4) JavaScript version number: // is_js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...) // (5) OS platform and version: // is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k // is_os2 // is_mac, is_mac68k, is_macppc // is_unix // is_sun, is_sun4, is_sun5, is_suni86 // is_irix, is_irix5, is_irix6 // is_hpux, is_hpux9, is_hpux10 // is_aix, is_aix1, is_aix2, is_aix3, is_aix4 // is_linux, is_sco, is_unixware, is_mpras, is_reliant // is_dec, is_sinix, is_freebsd, is_bsd // is_vms // // See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and // http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html // for detailed lists of userAgent strings. // // Note: you don't want your Nav4 or IE4 code to "turn off" or // stop working when new versions of browsers are released, so // in conditional code forks, use is_ie5up ("IE 5.0 or greater") // is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5 // to check version in code which you want to work on future // versions. /** * Severly curtailed all this as only certain elements * are required by TreeMenu, specifically: * o is_ie4up * o is_nav6up * o is_gecko */ // convert all characters to lowercase to simplify testing var agt=navigator.userAgent.toLowerCase(); // *** BROWSER VERSION *** // Note: On IE5, these return 4, so use is_ie5up to detect IE5. var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); // Note: Opera and WebTV spoof Navigator. We do strict client detection. // If you want to allow spoofing, take out the tests for opera and webtv. var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)); var is_nav6up = (is_nav && (is_major >= 5)); var is_gecko = (agt.indexOf('gecko') != -1); var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) ); var is_ie4up = (is_ie && (is_major >= 4)); //--> end hide JavaScript
« previous php.pear.core (#8435) next »