Author: marcus
Date: Mon Jul 14 18:22:35 2014
New Revision: 1610478

URL: http://svn.apache.org/r1610478
Log:
Show information in the alert box, some further updates

Modified:
    openoffice/ooo-site/trunk/content/index_redirect.html

Modified: openoffice/ooo-site/trunk/content/index_redirect.html
URL: 
http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/index_redirect.html?rev=1610478&r1=1610477&r2=1610478&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/index_redirect.html (original)
+++ openoffice/ooo-site/trunk/content/index_redirect.html Mon Jul 14 18:22:35 
2014
@@ -92,75 +92,57 @@
        DL.LANG_SEL     = "";
        var lang_iso    = DL.getLanguage();     // Get the language ISO code 
from browser guessed data.
        var lang_text   = "";                   // The message text that can be 
shown.
-//     var redirect    = false;                // Set a hard-redirect without 
showing a message (false/true)?
-//     var show        = false;                // Should the found language be 
used to redirect (false/true)?
 
        // Query if the browser language is one of the released languages.
        // The array has 3 elements per language (defined in 
"/download/globalvars.js"
        for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 3 ) {
          // If the ISO code is found in the language array.
          if( DL.SEL_LANG[ i ] === lang_iso ) {
-/*
-           // Only if the language is OK to redirect, assign the text and set 
redirect = true.
-           if( l10n.index_redirect_text[ i / 3 * 2 ] === "y" ) {
-             lang_text = l10n.index_redirect_text[ i / 3 * 2 + 1 ];
-             redirect  = true;
-           }
-           break;
-*/
            // Query for the redirect method (defined in "/msg_prop_l10n.js", 
column 0).
            switch( l10n.index_redirect_text[ i / 3 * 2 ] ) {
              case "hard":
                // Don't show a message, just redirect. 
+
                alert( "Just for debugging purpose:"                            
        + "\n\n"
                + "Browser language ISO code: \t\t"     + lang_iso              
        + "\n"
-               + "Redirect method? \t\t\t\t"           + "Hard, without 
message"       + "\n" );
+               + "Redirect method? \t\t\t\t"           + "Hard, without 
message"       + "\n"
+               + "Position in language array: \t\t"    + i / 3                 
        + "\n"
+               + "Found language text: \t\t\t"         + 
l10n.index_redirect_text[ i / 3 * 2 + 1 ] );
 
                window.open( "http://www.openoffice.org/"; + lang_iso , "_self" 
);
                break;
              case "soft":
                // Show a message and redirect on user's click.
-               alert( "Just for debugging purpose:"                            
        + "\n\n"
-               + "Browser language ISO code: \t\t"     + lang_iso              
        + "\n"
-               + "Redirect method? \t\t\t\t"           + "Soft, with message"  
        + "\n"
-               + "Position in language array: \t\t"    + i / 3                 
        + "\n"
-               + "Found language text: \t\t\t"         + lang_text );
-
                // Assign the message text (defined in "/msg_prop_l10n.js", 
column 1).
-               lang_text = l10n.index_redirect_text[ i / 3 * 2 + 1 ];
-//             redirect  = true;
+
                document.write( "<div id='redirect_box'"
                  + " onclick='window.open( \"http://www.openoffice.org/"; + 
lang_iso
                  + "\", \"_blank\" ); return false;'>"
 //               + " onclick='window.open( \"http://www.openoffice.org/"; + 
lang_iso
 //               + "\", \"_self\" ); return false;'>"
-                 + "<p>" + lang_text + "</p>"
+                 + "<p>" + l10n.index_redirect_text[ i / 3 * 2 + 1 ] + "</p>"
                + "</div>" ); // redirect box
+
+               alert( "Just for debugging purpose:"                            
        + "\n\n"
+               + "Browser language ISO code: \t\t"     + lang_iso              
        + "\n"
+               + "Redirect method? \t\t\t\t"           + "Soft, with message"  
        + "\n"
+               + "Position in language array: \t\t"    + i / 3                 
        + "\n"
+               + "Found language text: \t\t\t"         + 
l10n.index_redirect_text[ i / 3 * 2 + 1 ] );
                break;
              case "none":
              default:
                // Do and show nothing.
-               lang_text = l10n.index_redirect_text[ i / 3 * 2 + 1 ];
+
                alert( "Just for debugging purpose:"                            
        + "\n\n"
                + "Browser language ISO code: \t\t"     + lang_iso              
        + "\n"
                + "Redirect method? \t\t\t\t"           + "None, do and show 
nothing"   + "\n"
                + "Position in language array: \t\t"    + i / 3                 
        + "\n"
-               + "Found language text: \t\t\t"         + lang_text );
+               + "Found language text: \t\t\t"         + 
l10n.index_redirect_text[ i / 3 * 2 + 1 ] );
            }
            break;
          }
        }
-/*
-       // Show redirect box or not?
-       if( redirect ) {
-         // Show redirect box with defined background color and the text with 
link and cursor as poiner.
-         document.write( "<div id='redirect_box'"
-           + " onclick='window.open( \"http://www.openoffice.org/"; + lang_iso 
+ "\", \"_blank\" ); return false;'>"
-//         + " onclick='window.open( \"http://www.openoffice.org/"; + lang_iso 
+ "\", \"_self\" ); return false;'>"
-           + "<p>" + lang_text + "</p>"
-         + "</div>" ); // redirect box
-       }
-*/
+
        return;
       }
     </script>


Reply via email to