[evolution/wip-webkit2] ITIPFormatter - Fix showing of checkboxes



commit 5fb56e3025197097108942c671e076b6bfc57d17
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Nov 21 13:28:21 2013 +0100

    ITIPFormatter - Fix showing of checkboxes

 modules/itip-formatter/itip-view.c                 |    2 +-
 .../module-itip-formatter-dom-utils.c              |   11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index c102756..94159fc 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -875,7 +875,7 @@ update_start_end_times (ItipView *view)
        } else
                hide_element (view, TABLE_ROW_START_DATE, TRUE);
 
-       if (priv->start_header && priv->start_label) {
+       if (priv->end_header && priv->end_label) {
                g_dbus_proxy_call (
                        priv->web_extension,
                        "UpdateTimes",
diff --git a/modules/itip-formatter/module-itip-formatter-dom-utils.c 
b/modules/itip-formatter/module-itip-formatter-dom-utils.c
index 8133c49..0cb7706 100644
--- a/modules/itip-formatter/module-itip-formatter-dom-utils.c
+++ b/modules/itip-formatter/module-itip-formatter-dom-utils.c
@@ -336,13 +336,11 @@ module_itip_formatter_dom_utils_show_checkbox (WebKitDOMDocument *document,
 {
        WebKitDOMElement *label;
        WebKitDOMElement *el;
+       gchar *row_id;
 
-       el = webkit_dom_document_get_element_by_id (
-               document, id);
+       el = webkit_dom_document_get_element_by_id (document, id);
        webkit_dom_html_element_set_hidden (WEBKIT_DOM_HTML_ELEMENT (el), !show);
 
-       el = webkit_dom_document_get_element_by_id (
-               document, id);
        label = webkit_dom_element_get_next_element_sibling (el);
        webkit_dom_html_element_set_hidden (WEBKIT_DOM_HTML_ELEMENT (label), !show);
 
@@ -357,6 +355,11 @@ module_itip_formatter_dom_utils_show_checkbox (WebKitDOMDocument *document,
                        WEBKIT_DOM_HTML_INPUT_ELEMENT (el),
                        NULL, NULL);
        }
+
+       row_id = g_strconcat ("table_row_", id, NULL);
+       el = webkit_dom_document_get_element_by_id (document, row_id);
+       webkit_dom_html_element_set_hidden (WEBKIT_DOM_HTML_ELEMENT (el), !show);
+       g_free (row_id);
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]