[geeklog-hg] geeklog: Fixed a bug "More.." tab in the configuration UI does n...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Mar 2 06:55:01 EST 2013


changeset 8972:d9a8caae40ab
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/d9a8caae40ab
user: dengen
date: Sat Mar 02 20:54:22 2013 +0900
description:
Fixed a bug "More.." tab in the configuration UI does not work correctly (bug #0001560)

diffstat:

 public_html/javascript/ver.1.8/admin.configuration.js |  23 +++++++++++++++---
 1 files changed, 19 insertions(+), 4 deletions(-)

diffs (60 lines):

diff -r f459ecb9804d -r d9a8caae40ab public_html/javascript/ver.1.8/admin.configuration.js
--- a/public_html/javascript/ver.1.8/admin.configuration.js	Sat Mar 02 16:33:00 2013 +0900
+++ b/public_html/javascript/ver.1.8/admin.configuration.js	Sat Mar 02 20:54:22 2013 +0900
@@ -1,6 +1,6 @@
 /* Reminder: always indent with 4 spaces (no tabs). */
 // +---------------------------------------------------------------------------+
-// | Geeklog 1.7                                                               |
+// | Geeklog 2.0                                                               |
 // +---------------------------------------------------------------------------+
 // | javascript functions to support the online configuration manager          |
 // |                                                                           |
@@ -117,7 +117,7 @@
                     });
                 }
                 
-//                return false;
+                return false;
             } else {
                 $('#tabs-dropdown').hide().parent().removeClass('ui-tabs-selected ui-state-active');
                 $('.ui-tabs-panel').removeClass('ui-tabs-hide');
@@ -256,6 +256,19 @@
         var targetParent = target.parent();
         
         if ($('#tabs-dropdown').length > 0) {
+            if ((target.attr('class') === 'ui-tabs-anchor') && (target.attr('href') !== '#tab-dropdown')) {
+                var idx = tabs.tabs('option', 'active');
+                var dummy = idx + ((idx == 0) ? 1 : -1); // dummy is any value not idx
+                tabs.tabs("option", "active", dummy);
+                tabs.tabs("option", "active", idx);
+
+                $("#tabs-dropdown > li").each(function() {
+                    var href = $('a', this).attr('href');
+                    $(href).addClass('ui-tabs-hide');
+                });
+                return false;
+            }
+
             if ( target.is('a') && (target.attr('href') === '#tab-dropdown')) {
 //                $('#tabs-dropdown').toggle();
                 e.preventDefault();
@@ -268,6 +281,7 @@
                 return dropDownHandler(e);
             }
         }
+
         $('#tabs-dropdown').hide();
         $('.config_name', tabs).removeClass('active-config');
         
@@ -375,8 +389,9 @@
      */
     function selectTabInHiddenTabs(href) {
         $('.ui-tabs-nav li.ui-state-default').each(function() {
-            $(this).removeClass('ui-tabs-selected');
-            $(this).removeClass('ui-state-active');
+            $(this).removeClass('ui-state-active ui-tabs-active');
+//            $(this).attr('aria-selected', false);
+//            $(this).attr('tabindex', -1);
         });
         $('.ui-tabs-panel', tabs).addClass('ui-tabs-hide');
         href = href.substring(href.lastIndexOf('#'));



More information about the geeklog-cvs mailing list