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/09/23 21:37:31 UTC

svn commit: r1627131 - /openoffice/ooo-site/trunk/content/scripts/ooo.js

Author: marcus
Date: Tue Sep 23 19:37:30 2014
New Revision: 1627131

URL: http://svn.apache.org/r1627131
Log:
Changed the global functions into methods of a single global object

Modified:
    openoffice/ooo-site/trunk/content/scripts/ooo.js

Modified: openoffice/ooo-site/trunk/content/scripts/ooo.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/scripts/ooo.js?rev=1627131&r1=1627130&r2=1627131&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/scripts/ooo.js (original)
+++ openoffice/ooo-site/trunk/content/scripts/ooo.js Tue Sep 23 19:37:30 2014
@@ -1,18 +1,23 @@
 /*
- * Overview of all methods (functions) defined below of the global object "DL"
- * ---------------------------------------------------------------------------
- * function follow       ( platform )
- * function showEventBox ()
- * function showAlertBox ()
- * function setRedirect  ()
+ * Overview of all methods (functions) of the global object "INDEX"
+ * ----------------------------------------------------------------
+ * function INDEX.follow       ( platform )
+ * function INDEX.showEventBox ()
+ * function INDEX.showAlertBox ()
+ * function INDEX.setRedirect  ()
  */
 
+
+
+// Object that contains all following methods (functions) and properties (variables).
+var INDEX = new Object();
+
 /*
  * Link AOO to a social media
  * @param:  platform - The social media (Apache Blog, Facebook, Twitter, Google+) that the scriping should link to
  * @return: None
  */
-function follow( platform ) {
+INDEX.follow = function( platform ) {
 	_gaq.push( ['_trackEvent', 'social', 'followUs', platform] ); 
 
 	if ( platform == 'ApacheBlog' ) {
@@ -33,7 +38,7 @@ function follow( platform ) {
  * @param:  None
  * @return: None
  */
-function showEventBox() {
+INDEX.showEventBox = function() {
 	// The text is defined in "/msg_prop_l10n.js".
 
 	// Show the event box or not?
@@ -72,7 +77,7 @@ function showEventBox() {
  * @param:  None
  * @return: None
  */
-function showAlertBox() {
+INDEX.showAlertBox = function() {
 	// The text is defined in "/msg_prop_l10n.js".
 
 	// Show the alert box or not?
@@ -118,7 +123,7 @@ function showAlertBox() {
  * @return: None
  */
 
-function setRedirect() {
+INDEX.setRedirect = function() {
 	// The text is defined in "/msg_prop_l10n.js".
 	DL.NL_LANG	= "";					// Set to empty as both variables ...
 	DL.LANG_SEL	= "";					// ... must not be used in following function.