You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ma...@apache.org on 2014/07/07 22:45:58 UTC
svn commit: r1608605 -
/openoffice/ooo-site/trunk/content/download/test/download.js
Author: marcus
Date: Mon Jul 7 20:45:58 2014
New Revision: 1608605
URL: http://svn.apache.org/r1608605
Log:
Added language ISO code as title for the respective option item, updated comments
Modified:
openoffice/ooo-site/trunk/content/download/test/download.js
Modified: openoffice/ooo-site/trunk/content/download/test/download.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/download.js?rev=1608605&r1=1608604&r2=1608605&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download.js (original)
+++ openoffice/ooo-site/trunk/content/download/test/download.js Mon Jul 7 20:45:58 2014
@@ -235,6 +235,7 @@ DL.fillOSSelection = function() {
option.value = DL.SEL_OS[ i ];
// Assign the UI platform name.
option.text = DL.SEL_OS[ i + 1 ];
+ // Add the new option to the already existing ones.
selection.appendChild( option );
}
@@ -255,8 +256,11 @@ DL.fillLanguageSelection = function() {
option = document.createElement( "option" );
// Assign the language ISO code as index value.
option.value = DL.SEL_LANG[ i ];
- // Assign the UI name like "English (Native) (ISO code)".
+ // Assign the language ISO code as title.
+ option.title = DL.SEL_LANG[ i ];
+ // Assign the language name as "English name (Native name)".
option.text = DL.SEL_LANG[ i + 1 ];
+ // Add the new option to the already existing ones.
selection.appendChild( option );
}
@@ -279,6 +283,7 @@ DL.fillVersionSelection = function() {
option.value = DL.SEL_VER[ i ];
// Assign the UI version.
option.text = DL.SEL_VER[ i + 1 ];
+ // Add the new option to the already existing ones.
selection.appendChild( option );
}
@@ -297,7 +302,7 @@ DL.setOSSelection = function() {
// Set the recognized browser platform as default for the select box.
for( var i = 0, j = DL.SEL_OS.length; i < j; i = i + 3 ) {
- // If the platform was found, assign the found index to the select box.
+ // If the platform was found, set it as pre-selected.
if( DL.SEL_OS[ i ] === DL.PLATFORM ) {
selection.selectedIndex = i / 3;
break;
@@ -309,7 +314,7 @@ DL.setOSSelection = function() {
if( selection.selectedIndex === 0 ) {
// Default: Assign "Windows".
for( var i = 0, j = DL.SEL_OS.length; i < j; i = i + 3 ) {
- // If the platform was found, assign the found index to the select box.
+ // If the platform was found, set it as pre-selected.
if( DL.SEL_OS[ i ] === "Win_x86_install" ) {
selection.selectedIndex = i / 3;
break;
@@ -334,7 +339,7 @@ DL.setLanguageSelection = function() {
// Set the recognized browser language as default for the select box.
for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 2 ) {
- // If the language was found, assign the found index to the select box.
+ // If the language was found, set it as pre-selected.
if( DL.SEL_LANG[ i ] === DL.LANG_ISO ) {
selection.selectedIndex = i / 2;
found = true;
@@ -347,7 +352,7 @@ DL.setLanguageSelection = function() {
if( ! found ) {
// Default: Assign "en-US".
for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 2 ) {
- // If the language was found, assign the found index to the select box.
+ // If the language was found, set it as pre-selected.
if( DL.SEL_LANG[ i ] === "en-US" ) {
selection.selectedIndex = i / 2;
break;
@@ -371,7 +376,7 @@ DL.setVersionSelection = function() {
// Set the value of $DL.VERSION as default for the select box.
for( var i = 0, j = DL.SEL_VER.length; i < j; i = i + 2 ) {
- // If the version was found, assign the found index to the select box.
+ // If the version was found, set it as pre-selected.
if( DL.SEL_VER[ i ] === DL.VERSION ) {
selection.selectedIndex = i/2;
break;
@@ -383,7 +388,7 @@ DL.setVersionSelection = function() {
if( selection.selectedIndex === 0 ) {
// Default: Assign "4.1.0".
for( var i = 0, j = DL.SEL_VER.length; i < j; i = i + 2 ) {
- // If the version was found, assign the found index to the select box.
+ // If the version was found, set it as pre-selected.
if( DL.SEL_VER[ i ] === "4.1.0" ) {
selection.selectedIndex = i / 2;
break;