Janine (janinedog) wrote in changelog,
Janine
janinedog
changelog

[livejournal] r12382: Two JS fixes for IE and Safari:

Committer: janine
Two JS fixes for IE and Safari:
* Remove the commas from the ends of lists so there's no JS errors
* Make the AJAX nav links work

U   branches/customize/cgi-bin/LJ/Widget/CurrentTheme.pm
U   branches/customize/cgi-bin/LJ/Widget/CustomizeTheme.pm
U   branches/customize/cgi-bin/LJ/Widget/JournalTitles.pm
U   branches/customize/cgi-bin/LJ/Widget/LayoutChooser.pm
U   branches/customize/cgi-bin/LJ/Widget/MoodThemeChooser.pm
U   branches/customize/cgi-bin/LJ/Widget/NavStripChooser.pm
U   branches/customize/cgi-bin/LJ/Widget/S2PropGroup.pm
U   branches/customize/cgi-bin/LJ/Widget/ThemeChooser.pm
U   branches/customize/cgi-bin/LJ/Widget/ThemeNav.pm
Modified: branches/customize/cgi-bin/LJ/Widget/CurrentTheme.pm
===================================================================
--- branches/customize/cgi-bin/LJ/Widget/CurrentTheme.pm	2007-08-30 22:21:20 UTC (rev 12381)
+++ branches/customize/cgi-bin/LJ/Widget/CurrentTheme.pm	2007-08-31 01:06:51 UTC (rev 12382)
@@ -76,6 +76,7 @@
             filter_links.forEach(function (filter_link) {
                 var getArgs = LiveJournal.parseGetArgs(filter_link.href);
                 for (var arg in getArgs) {
+                    if (!getArgs.hasOwnProperty(arg)) continue;
                     if (arg == "authas" || arg == "filter_available") continue;
                     DOM.addEventListener(filter_link, "click", function (evt) { Customize.ThemeNav.filterThemes(evt, arg, getArgs[arg]) });
                     break;
@@ -84,7 +85,7 @@
         },
         onRefresh: function (data) {
             this.initWidget();
-        },
+        }
     ];
 }
 

Modified: branches/customize/cgi-bin/LJ/Widget/CustomizeTheme.pm
===================================================================
--- branches/customize/cgi-bin/LJ/Widget/CustomizeTheme.pm	2007-08-30 22:21:20 UTC (rev 12381)
+++ branches/customize/cgi-bin/LJ/Widget/CustomizeTheme.pm	2007-08-31 01:06:51 UTC (rev 12382)
@@ -296,7 +296,7 @@
         },
         onRefresh: function (data) {
             this.initWidget();
-        },
+        }
     ];
 }
 

Modified: branches/customize/cgi-bin/LJ/Widget/JournalTitles.pm
===================================================================
--- branches/customize/cgi-bin/LJ/Widget/JournalTitles.pm	2007-08-30 22:21:20 UTC (rev 12381)
+++ branches/customize/cgi-bin/LJ/Widget/JournalTitles.pm	2007-08-31 01:06:51 UTC (rev 12382)
@@ -86,7 +86,7 @@
         onRefresh: function (data) {
             this.initWidget();
             JournalTitle.init();
-        },
+        }
     ];    
 }
 

Modified: branches/customize/cgi-bin/LJ/Widget/LayoutChooser.pm
===================================================================
--- branches/customize/cgi-bin/LJ/Widget/LayoutChooser.pm	2007-08-30 22:21:20 UTC (rev 12381)
+++ branches/customize/cgi-bin/LJ/Widget/LayoutChooser.pm	2007-08-31 01:06:51 UTC (rev 12382)
@@ -137,7 +137,7 @@
                 layout_choice: form.Widget_LayoutChooser_layout_choice.value,
                 layout_prop: form.Widget_LayoutChooser_layout_prop.value,
                 show_sidebar_prop: form.Widget_LayoutChooser_show_sidebar_prop.value,
-                ad_layout_id: $('ad_layout_id').value,
+                ad_layout_id: $('ad_layout_id').value
             });
             Event.stop(evt);
         },
@@ -146,7 +146,7 @@
         },
         onRefresh: function (data) {
             this.initWidget();
-        },
+        }
     ];
 }
 

Modified: branches/customize/cgi-bin/LJ/Widget/MoodThemeChooser.pm
===================================================================
--- branches/customize/cgi-bin/LJ/Widget/MoodThemeChooser.pm	2007-08-30 22:21:20 UTC (rev 12381)
+++ branches/customize/cgi-bin/LJ/Widget/MoodThemeChooser.pm	2007-08-31 01:06:51 UTC (rev 12382)
@@ -137,12 +137,12 @@
                 user: Customize.username,
                 getextra: Customize.getExtra,
                 preview_moodthemeid: $('moodtheme_dropdown').value,
-                forcemoodtheme: opt_forcemoodtheme,
+                forcemoodtheme: opt_forcemoodtheme
             });
         },
         onRefresh: function (data) {
             this.initWidget();
-        },
+        }
     ];
 }
 

Modified: branches/customize/cgi-bin/LJ/Widget/NavStripChooser.pm
===================================================================
--- branches/customize/cgi-bin/LJ/Widget/NavStripChooser.pm	2007-08-30 22:21:20 UTC (rev 12381)
+++ branches/customize/cgi-bin/LJ/Widget/NavStripChooser.pm	2007-08-31 01:06:51 UTC (rev 12382)
@@ -284,7 +284,7 @@
         },
         onRefresh: function (data) {
             this.initWidget();
-        },
+        }
     ];
 }
 

Modified: branches/customize/cgi-bin/LJ/Widget/S2PropGroup.pm
===================================================================
--- branches/customize/cgi-bin/LJ/Widget/S2PropGroup.pm	2007-08-30 22:21:20 UTC (rev 12381)
+++ branches/customize/cgi-bin/LJ/Widget/S2PropGroup.pm	2007-08-31 01:06:51 UTC (rev 12382)
@@ -446,7 +446,7 @@
         },
         onRefresh: function (data) {
             this.initWidget();
-        },
+        }
     ];
 }
 

Modified: branches/customize/cgi-bin/LJ/Widget/ThemeChooser.pm
===================================================================
--- branches/customize/cgi-bin/LJ/Widget/ThemeChooser.pm	2007-08-30 22:21:20 UTC (rev 12381)
+++ branches/customize/cgi-bin/LJ/Widget/ThemeChooser.pm	2007-08-31 01:06:51 UTC (rev 12382)
@@ -295,6 +295,7 @@
                     DOM.addEventListener(filter_link, "click", function (evt) { Customize.ThemeNav.filterThemes(evt, "page", getArgs["page"]) });
                 } else {
                     for (var arg in getArgs) {
+                        if (!getArgs.hasOwnProperty(arg)) continue;
                         if (arg == "authas" || arg == "filter_available") continue;
                         DOM.addEventListener(filter_link, "click", function (evt) { Customize.ThemeNav.filterThemes(evt, arg, getArgs[arg]) });
                         break;
@@ -313,7 +314,7 @@
             this.doPost({
                 user: Customize.username,
                 apply_themeid: form.Widget_ThemeChooser_apply_themeid.value,
-                apply_layoutid: form.Widget_ThemeChooser_apply_layoutid.value,
+                apply_layoutid: form.Widget_ThemeChooser_apply_layoutid.value
             });
             Event.stop(evt);
         },
@@ -326,21 +327,21 @@
                 filter_available: Customize.filter_available,
                 page: Customize.page,
                 getextra: Customize.getExtra,
-                theme_chooser_id: $('theme_chooser_id').value,
+                theme_chooser_id: $('theme_chooser_id').value
             });
             Customize.CurrentTheme.updateContent({
                 user: Customize.username,
                 getextra: Customize.getExtra,
-                filter_available: Customize.filter_available,
+                filter_available: Customize.filter_available
             });
             Customize.LayoutChooser.updateContent({
                 user: Customize.username,
-                ad_layout_id: $('ad_layout_id').value,
+                ad_layout_id: $('ad_layout_id').value
             });
         },
         onRefresh: function (data) {
             this.initWidget();
-        },
+        }
     ];
 }
 

Modified: branches/customize/cgi-bin/LJ/Widget/ThemeNav.pm
===================================================================
--- branches/customize/cgi-bin/LJ/Widget/ThemeNav.pm	2007-08-30 22:21:20 UTC (rev 12381)
+++ branches/customize/cgi-bin/LJ/Widget/ThemeNav.pm	2007-08-31 01:06:51 UTC (rev 12382)
@@ -190,6 +190,7 @@
             filter_links.forEach(function (filter_link) {
                 var getArgs = LiveJournal.parseGetArgs(filter_link.href);
                 for (var arg in getArgs) {
+                    if (!getArgs.hasOwnProperty(arg)) continue;
                     if (arg == "authas" || arg == "filter_available") continue;
                     DOM.addEventListener(filter_link, "click", function (evt) { self.filterThemes(evt, arg, getArgs[arg]) });
                     break;
@@ -221,7 +222,7 @@
                 filter_available: Customize.filter_available,
                 page: Customize.page,
                 getextra: Customize.getExtra,
-                theme_chooser_id: $('theme_chooser_id').value,
+                theme_chooser_id: $('theme_chooser_id').value
             });
 
             Event.stop(evt);
@@ -229,7 +230,7 @@
         onRefresh: function (data) {
             this.initWidget();
             Customize.ThemeChooser.initWidget();
-        },
+        }
     ];
 }
 

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments