[Pkg-mozext-commits] [wot] 176/226: - Simplified category selector; - merged stats code from Chrome; - Highlight "My profile" link for unregistered users

David Prévot taffit at moszumanska.debian.org
Fri May 1 00:35:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository wot.

commit 2c601092a2ec5ca33aff40f48ba6a906d793baff
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date:   Tue Oct 8 11:47:06 2013 +0300

    - Simplified category selector;
    - merged stats code from Chrome;
    - Highlight "My profile" link for unregistered users
---
 content/injections/ga_configure.js |  13 ++++
 content/rw/ratingwindow.js         | 130 ++++++++++++++++++++-------------
 locale/en-US/wot.properties        |   2 +-
 locale/fi-FI/wot.properties        |   2 +-
 locale/ru-RU/wot.properties        |   2 +-
 skin/ratingwindow.css              | 145 +++++++++++++++++++------------------
 6 files changed, 171 insertions(+), 123 deletions(-)

diff --git a/content/injections/ga_configure.js b/content/injections/ga_configure.js
index 80c5313..0190a84 100644
--- a/content/injections/ga_configure.js
+++ b/content/injections/ga_configure.js
@@ -46,9 +46,22 @@ $.extend(wot, { ga: {
 	},
 
 	actions: {
+		RW_NOTARGET:   "RW_notarget",
 		RW_TESTIMONY:   "RW_testimony",
+		RW_TESTIMONY_DEL: "RW_testimony_del",
+		RW_COMMENTADDED: "RW_comment_posted",
+		RW_COMMENTREMOVED: "RW_comment_removed",
+		RW_COMMENTKEPT: "RW_comment_kept",      // the comment is kept locally
+
 		RW_BTN_CLOSE:   "RW_btn_close",
 		RW_MSG_CLICKED: "RW_msg_clicked",
+		RW_DELETE:      "RW_delete",
+		RW_DELETEALL:   "RW_delete_all",
+		RW_ADDCOMMENT:  "RW_addcomment",
+		RW_EDITCOMMENT: "RW_editcomment",
+		RW_PICKACAT:    "RW_pickcategory",
+		RW_BTNCANCEL:   "RW_btn_cancel",
+		RW_PROFILELNK:  "RW_profilelnk",
 
 		WS_SHOW:        "WS_shown",
 		WS_BTN_ENTER:   "WS_btn_enter",
diff --git a/content/rw/ratingwindow.js b/content/rw/ratingwindow.js
index 2ad2d94..6be2a0f 100644
--- a/content/rw/ratingwindow.js
+++ b/content/rw/ratingwindow.js
@@ -41,14 +41,11 @@ $.extend(wot, { ratingwindow: {
         var ratings = wot.ratingwindow.getcached().value,
             is_rated = false;
 
-//        console.log("is_rated()", state, ratings);
-
         state = state ? state : ratings;
 
         // Detect if the website is rated by user, to activate proper mode
         wot.components.forEach(function (i) {
             var name = i.name;
-//            console.log(name, state[name]);
             if (state[name] && state[name].t >= 0) {
                 is_rated = true;
                 return false;
@@ -260,9 +257,15 @@ $.extend(wot, { ratingwindow: {
 
                 bgwot.api.submit(target, params, false); // don't update RW yet
 
+                var submission_mode = unload ? "auto" : "manual";
+
                 // count testimony event
-                // TODO: add either label or number to count voted categories AND/OR whether ratings were deleted
-                bgwot.ga.fire_event(wot.ga.categories.RW, wot.ga.actions.RW_TESTIMONY);
+                if (is_rated) {
+                    bgwot.ga.fire_event(wot.ga.categories.RW, wot.ga.actions.RW_TESTIMONY, submission_mode);
+                } else {
+                    bgwot.ga.fire_event(wot.ga.categories.RW, wot.ga.actions.RW_TESTIMONY_DEL, submission_mode);
+                }
+
             } else {
 //                bg.console.log("No testimonies & votes to submit them. Ignored.");
             }
@@ -270,10 +273,11 @@ $.extend(wot, { ratingwindow: {
             if (unload) {  // RW was closed by browser (not by clicking "Save")
 //                bg.console.log("RW triggered finish state during Unload");
 
-                if ((comment_changed)) {
+                if (comment_changed) {
 //                    bg.console.log("The comment seems to be changed");
                     // when comment body is changed, we might want to store it locally
                     bgwot.keeper.save_comment(target, user_comment, user_comment_id, votes, wot.keeper.STATUSES.LOCAL);
+                    bgwot.ga.fire_event(wot.ga.categories.RW, wot.ga.actions.RW_COMMENTKEPT);
                 }
 
             } else { // User clicked Save
@@ -288,8 +292,8 @@ $.extend(wot, { ratingwindow: {
                         bgwot.keeper.save_comment(target, user_comment, user_comment_id, votes, keeper_status);
 
                         if (rw.comments.allow_commenting && rw.is_registered) {
-                            // TODO: send GA signal about submitting a comment
                             bgwot.api.comments.submit(target, user_comment, user_comment_id, rw._make_votes(votes));
+                            bgwot.ga.fire_event(wot.ga.categories.RW, wot.ga.actions.RW_COMMENTADDED);
                         }
 
                     } else {
@@ -299,7 +303,7 @@ $.extend(wot, { ratingwindow: {
                             bgwot.keeper.remove_comment(target);
                             if (rw.is_registered) {
                                 bgwot.api.comments.remove(target);
-                                // TODO: send GA signal about removing a comment
+                                bgwot.ga.fire_event(wot.ga.categories.RW, wot.ga.actions.RW_COMMENTREMOVED);
                             }
                         }
                     }
@@ -387,8 +391,6 @@ $.extend(wot, { ratingwindow: {
             visible_hostname = "",
             rw_title = "";
 
-        /* update current rating state */
-//        _this.updatestate(_this.current.target, cached);
         var normalized_target = cached.value.normalized ? cached.value.normalized : _this.current.target;
 
         var $_hostname = $("#hostname-text"),
@@ -409,6 +411,8 @@ $.extend(wot, { ratingwindow: {
         $_hostname.text(visible_hostname);
         $_wot_title_text.text(rw_title);
 
+        $("#wot-ratingwindow").toggleClass("unregistered", !_this.is_registered);
+
         /* reputations */
         /* ratings */
 
@@ -572,6 +576,10 @@ $.extend(wot, { ratingwindow: {
             _rw.modes.reset();
             _rw.cat_selector.init_voted();
             _rw.modes.auto();
+
+			if (!data.target) {
+				bg.wot.ga.fire_event(wot.ga.categories.RW, wot.ga.actions.RW_NOTARGET);
+			}
         } catch (e) {
             console.log("ratingwindow.update: failed with ", e);
         }
@@ -763,6 +771,7 @@ $.extend(wot, { ratingwindow: {
             $_hand = $('<div class="category-hand"><div class="hand-icon"></div></div>'),
             $_cat_text = $('<div class="category-text"></div>');
 
+	    $_cat_wrapper.addClass(vote == 1 ? "hand-up" : "hand-down");
         $_hand.addClass(vote == 1 ? "hand-up" : "hand-down");
         $_hand.attr("title", wot.i18n("ratingwindow", vote == 1 ? "vote_yes" : "vote_no"));
         $_cat_text.attr("title", cat_name);
@@ -955,6 +964,8 @@ $.extend(wot, { ratingwindow: {
         });
 
         $("#wot-header-link-profile").bind("click", function() {
+            bg.wot.ga.fire_event(wot.ga.categories.RW, wot.ga.actions.RW_PROFILELNK,
+                _rw.is_registered ? "registered" : "unregistered");
             wot.ratingwindow.navigate(wurls.profile, wurls.contexts.rwprofile);
         });
 
@@ -1150,6 +1161,8 @@ $.extend(wot, { ratingwindow: {
         bg.wot.keeper.remove_comment(_rw.state.target); // remove locally saved comment
         _rw.update_comment(cached, null); // restore comment to server-side version
 
+        wot.ga.fire_event(wot.ga.categories.RW, wot.ga.actions.RW_BTNCANCEL);
+
         _rw.modes.auto();   // switch RW mode according to current state
     },
 
@@ -1515,18 +1528,20 @@ $.extend(wot, { ratingwindow: {
             // cycle through grouping to create main sections
             for (var gi = 0; gi < wot.grouping.length; gi++) {
                 var grp = wot.grouping[gi];
-                if (!grp.omnipresent && grp.text && grp.groups) {
+                if (!grp.omnipresent && grp.text) {
                     var $_li = _this._build_grouping(grp.text, grp.name);
 
                     var $_popover = $("<div></div>").addClass("popover");   // container for a list of categories
 
                     // Iterate over list of groups in the grouping (section)
-                    for(var a = 0; a < grp.groups.length; a++) {
-                        var g = grp.groups[a], // g.name == id, g.type == css style
-                            g_id = parseInt(g.name);
+                    if (grp.groups && grp.groups.length) {
+                        for(var a = 0; a < grp.groups.length; a++) {
+                            var g = grp.groups[a], // g.name == id, g.type == css style
+                                g_id = parseInt(g.name);
 
-                        cats = wot.select_categories(g_id, g_id);   // list if categories' IDs
-                        _rw.cat_selector._build_from_list(cats, $_popover, false);
+                            cats = wot.select_categories(g_id, g_id);   // list if categories' IDs
+                            _rw.cat_selector._build_from_list(cats, $_popover, false, false);
+                        }
                     }
 
                     $_li.append($_popover);
@@ -1554,7 +1569,7 @@ $.extend(wot, { ratingwindow: {
             return $_li;
         },
 
-        _build_from_list: function (cat_list, $_target_popover, omni) {
+        _build_from_list: function (cat_list, $_target_popover, omni, dynamic) {
             /* Makes HTML elements of categories with all controls and inserts them into Popover wrapper */
             var _this = wot.ratingwindow.cat_selector;
             var textvote_yes = wot.i18n("ratingwindow", "vote_yes"),
@@ -1576,30 +1591,33 @@ $.extend(wot, { ratingwindow: {
                     if (!wot.utils.isEmptyObject(cat)) {
                         var $_po_cat = $("<div></div>").addClass("category"); // container for a category
                         $_po_cat.attr("data-cat", cat.id);
-                        if (omni) {
-                            $_po_cat.addClass("omni");
-                        }
+                        $_po_cat.toggleClass("omni", omni);
+						$_po_cat.toggleClass("dynamic", dynamic);
 
                         if (cat.fullonly) {
                             $_po_cat.addClass("fullonly");
                             $_po_cat.toggleClass("invisible", _this.short_list);
                         }
 
-                        $("<div></div>")    // the category line
-                            .text(wot.get_category_name(cat.id, true))
-                            .addClass("cat-name")
-                            .appendTo($_po_cat);
+	                    var $_cat_vote = $("<div></div>").addClass("cat-vote");
+	                    if (dynamic) {
+		                    // here we show "I disagree" button on the right side
+		                    $("<div></div>").text(textvote_no).addClass("cat-vote-right").appendTo($_cat_vote);
+	                    } else {
+		                    // In "normal" sections we show checkboxes only, on the left side
+		                    $("<div></div>").addClass("cat-vote-left").appendTo($_cat_vote);
+	                    }
 
-                        var $_cat_vote = $("<div></div>").addClass("cat-vote");
+//	                    $("<div></div>").addClass("delete-icon")
+//		                    .appendTo($("<div></div>").addClass("cat-vote-del").appendTo($_cat_vote));
 
-                        // TODO: use translations for strings
-                        $("<div></div>").text(textvote_yes).addClass("cat-vote-left").appendTo($_cat_vote);
-                        $("<div></div>").text(textvote_no).addClass("cat-vote-right").appendTo($_cat_vote);
+	                    $_cat_vote.appendTo($_po_cat);
 
-                        $("<div></div>").addClass("delete-icon")
-                            .appendTo($("<div></div>").addClass("cat-vote-del").appendTo($_cat_vote));
 
-                        $_cat_vote.appendTo($_po_cat);
+                        $("<div></div>")    // the category line
+                            .text(wot.get_category_name(cat.id, true))
+                            .addClass("cat-name")
+                            .appendTo($_po_cat);
 
                         $_target_popover.append($_po_cat);
 
@@ -1607,7 +1625,6 @@ $.extend(wot, { ratingwindow: {
                         console.warn("Can't find category", cat_list[ci]);
                     }
                 }
-
             }
             return cat_list.length;
         },
@@ -1615,7 +1632,8 @@ $.extend(wot, { ratingwindow: {
         set_state: function (state, identified) {
             // Sets the category selector into proper state taking into account user's ratings and currently identified categories.
             var _rw = wot.ratingwindow,
-                _this = _rw.cat_selector;
+                _this = _rw.cat_selector,
+                $_popover = null;
 
             if (!_this.inited) return;  // do nothing when I'm not ready yet
 
@@ -1658,7 +1676,7 @@ $.extend(wot, { ratingwindow: {
             /* now omni_to_show[] contains all cats for the given testimony and we need to make filtered lists
             for every section in the selector.         */
             for (var j = 0; j < wot.grouping.length; j++) {
-                if (wot.grouping[j].omnipresent) continue;  // skip omni grouping for obvious reason
+                if (wot.grouping[j].omnipresent || wot.grouping[j].dynamic) continue;  // skip omni grouping for obvious reason
                 var section_id = wot.grouping[j].name;
                 omni_per_section[section_id] = omni_to_show.filter(function (elem, i , arr) {
                     var cat = wot.get_category(elem);
@@ -1674,9 +1692,10 @@ $.extend(wot, { ratingwindow: {
             var cached = _rw.getcached(),
                 cats_object = cached.value.cats,
                 dyn_cats = [],
-                dyn_grp = wot.determ_grouping(null, "dynamic"); // find the dynamic group to identify "popover" DOM element
+                dyn_grp = wot.determ_grouping(null, "dynamic"), // find the dynamic group to identify "popover" DOM element
+                filtered_dynamic = [];
 
-            if (dyn_grp.groups) {
+            if (dyn_grp.groups && dyn_grp.groups.length) {
                 for (var i= 0, gid; i < dyn_grp.groups.length; i++) {
                     gid = parseInt(dyn_grp.groups[i].name);
                     dyn_cats = dyn_cats.concat(wot.select_categories(gid, gid));
@@ -1687,29 +1706,31 @@ $.extend(wot, { ratingwindow: {
                 var cats = wot.rearrange_categories(cats_object);   // list of categories' IDs
                 // filter out categories that are in the omni-area already
                 // and that are only voted but not identified by community
-                var filtered_dynamic = cats.trustworthy.concat(cats.childsafety).filter(function(elem){
+                filtered_dynamic = cats.trustworthy.concat(cats.childsafety).filter(function(elem){
                     var cat_id = parseInt(elem.id);
-                    var fltr = !(omni_to_show.indexOf(cat_id) >= 0);
-                    fltr = fltr && elem.c;  // Identified cats have "c" attribute's value greater than than zero;
+                    var fltr = elem.c;  // Identified cats have "c" attribute's value greater than zero;
                     fltr = fltr && !(dyn_cats.indexOf(cat_id) >= 0); // drop categories that are already in dyn_cats
                     return fltr;
                 });
 
                 filtered_dynamic = dyn_cats.concat(filtered_dynamic);
-
-                var $_popover = $("li[grp-name="+dyn_grp.name+"] .popover", _this.$_cat_selector).first();
-                $(".category", $_popover).detach(); // remove all previous categories from the popover
-                _rw.cat_selector._build_from_list(filtered_dynamic, $_popover, false); // fill the popover with categories
             }
 
+            $_popover = $("li[grp-name="+dyn_grp.name+"] .popover", _this.$_cat_selector).first();
+            $(".category", $_popover).detach(); // remove all previous categories from the popover
+            _rw.cat_selector._build_from_list(filtered_dynamic, $_popover, false, true); // fill the dynamic popover with categories
+
+            // Toggle visibility of the dynamic grouping based on presence of categories there
+            $("li[grp-name="+dyn_grp.name+"]", _this.$_cat_selector).toggleClass("invisible", !filtered_dynamic.length);
+
             // 4. Append finally Omni Categories
             $(".category-selector .popover .omni").detach();    // remove all previous omni groups from all popovers
 
             // Create and attach omni categories to _all_ popovers (groupings)
             for (var si in omni_per_section) {
                 if (omni_per_section[si]) {
-                    var $_popover = $(".category-selector li[grp-name=" + si + "] .popover");
-                    _this._build_from_list(omni_per_section[si], $_popover, true);
+                    $_popover = $(".category-selector li[grp-name=" + si + "] .popover");
+                    _this._build_from_list(omni_per_section[si], $_popover, true, false);
                 }
             }
 
@@ -1902,12 +1923,21 @@ $.extend(wot, { ratingwindow: {
             selected_elem.removeClass("maintainHover");
         },
 
-        _calc_vote_result: function (vs, vy, vn, vd, vc) {
-            // Calculates the resulted vote depending on what was clicked and current vote state
-            if (vd == 1) return 0; // if "delete" is clicked
+        _calc_vote_result: function (vs, vy, vn, dynamic, vc) {
+            // Calculates the resulting vote depending on what was clicked and current vote state
             var fy = vy * Math.min(vy, vy - vs);
             var fn = vn * Math.max(-1, -vn - vs);
-            var fc = vc * ((vs + 2) % 3 - 1);
+	        var fc = 0;
+
+	        if (vc) {
+		        if (dynamic) {
+			        fc = vs < 0 ? 0 : -1;
+		        } else {
+			        fc = vs != 1 ? 1 : 0;
+		        }
+	        }
+
+//            var fc = vc * ((vs + 2) % 3 - 1);
             return fy + fn + fc;
         },
 
@@ -1925,7 +1955,7 @@ $.extend(wot, { ratingwindow: {
             var vy = $_clicked.hasClass("cat-vote-left") ? 1 : 0;      // clicked Yes
             var vn = $_clicked.hasClass("cat-vote-right") ? 1 : 0;     // clicked No
             var vc = $_clicked.hasClass("category") ? 1 : 0;          // Clicked Category line
-            var vd = $_clicked.hasClass("cat-vote-del") ? 1 : 0;       // Clicked "delete" vote
+            var vd = $_clicked.closest(".category").hasClass("dynamic") ? 1 : 0;       // Clicked "delete" vote
             var vs = currently_voted ? parseInt(currently_voted) : 0; // current vote state for the clicked category
             var new_vote = _this._calc_vote_result(vs, vy, vn, vd, vc);
 
diff --git a/locale/en-US/wot.properties b/locale/en-US/wot.properties
index 0289f9d..d5ff2df 100644
--- a/locale/en-US/wot.properties
+++ b/locale/en-US/wot.properties
@@ -79,7 +79,7 @@ ratingwindow_rerate_change = change
 ratingwindow_rerate_category =  
 ratingwindow_fulllist = show full list
 ratingwindow_vote_yes = Yes
-ratingwindow_vote_no = No
+ratingwindow_vote_no = I disagree
 messages_ready = Reputation of
 testimony_0_levels_r0 = click the bar to rate
 testimony_0_levels_r1 = I don't trust
diff --git a/locale/fi-FI/wot.properties b/locale/fi-FI/wot.properties
index 93df116..ab2960a 100644
--- a/locale/fi-FI/wot.properties
+++ b/locale/fi-FI/wot.properties
@@ -79,7 +79,7 @@ ratingwindow_rerate_change = vaihda
 ratingwindow_rerate_category =  
 ratingwindow_fulllist = näytä koko lista
 ratingwindow_vote_yes = Kyllä
-ratingwindow_vote_no = Ei
+ratingwindow_vote_no = Eri mieltä
 messages_ready = Maine
 testimony_0_levels_r0 = Arvioidaksesi klikkaa palkkia
 testimony_0_levels_r1 = En luota
diff --git a/locale/ru-RU/wot.properties b/locale/ru-RU/wot.properties
index 1268858..36d6c98 100644
--- a/locale/ru-RU/wot.properties
+++ b/locale/ru-RU/wot.properties
@@ -79,7 +79,7 @@ ratingwindow_rerate_change = изменить
 ratingwindow_rerate_category = указать
 ratingwindow_fulllist = полный список
 ratingwindow_vote_yes = Да
-ratingwindow_vote_no = Нет
+ratingwindow_vote_no = Не согласен
 messages_ready = Репутация сайта
 testimony_0_levels_r0 = кликните чтобы оценить
 testimony_0_levels_r1 = не доверяю
diff --git a/skin/ratingwindow.css b/skin/ratingwindow.css
index f6318bb..79cc070 100644
--- a/skin/ratingwindow.css
+++ b/skin/ratingwindow.css
@@ -154,6 +154,13 @@ body {
     cursor: pointer;
 }
 
+.unregistered #wot-header-link-profile {
+    color: #727272;
+    background-color: #E7F1FF;
+    border-radius: 5px;
+    padding: 2px 0.6em 0;
+}
+
 #wot-header-close {
     position: absolute;
     top: -1px;
@@ -340,7 +347,7 @@ body {
 }
 
 #voted-categories {
-    width: 425px;
+    width: 430px;
     position: absolute;
     overflow: hidden;
     color: #acacac;
@@ -354,6 +361,10 @@ body {
     color: #6A6A6A;
 }
 
+#voted-categories.wider {
+    width: 530px;
+}
+
 #voted-categories-content {
     border-bottom: 1px dotted transparent;
     cursor: pointer;
@@ -397,6 +408,11 @@ body {
     cursor: pointer;
 }
 
+/* For Up votes no need to show thumbs up */
+#voted-categories-content .votedcategory.hand-up .category-text {
+    width: 72px;
+}
+
 #voted-categories-content .more-categories {
     font-size: 11px;
     color: #808080;
@@ -413,10 +429,12 @@ body {
 
 .category-hand.hand-up {
     background-color: #FCFCFC;
+    display: none;
 }
 
 .category-hand.hand-down {
-    background-color: #A3A3A3;
+    /*background-color: #A3A3A3;*/
+    background-color: #7DA6DB;
 }
 
 .hand-up .hand-icon,
@@ -1390,6 +1408,10 @@ body {
     background: linear-gradient(to bottom, #ffffff 0%, #ebebeb 100%); /* W3C */
 }
 
+.category-selector li.invisible {
+    display: none;
+}
+
 .category-selector li .group-title {
     display: block;
     clear: both;
@@ -1426,7 +1448,8 @@ body {
     line-height: 15px;
 }
 
-.category-selector .category:hover {
+.category-selector .category:hover,
+.category-selector .category:hover .cat-vote-right {
     background: #ebebeb;
     cursor: pointer;
 }
@@ -1445,98 +1468,78 @@ body {
     color: #747474;
 }
 
-.category-selector .cat-vote {
+.category-selector .dynamic .cat-vote {
     position: absolute;
     right: 0;
     top: 0;
 }
 
-.category-selector .cat-vote-left,
+.category-selector .cat-vote-left {
+    display: inline;
+    float: left;
+    margin: -1px 0px 0 0;
+    padding: 0px 2px;
+    border: 0px solid transparent;
+    font-size: 10px;
+    background-image: url("b/checkbox.png");
+    background-position: 0 0;
+    background-repeat:no-repeat;
+    width: 16px;
+    height: 16px;
+}
+
 .category-selector .cat-vote-right {
     display: inline;
     float: left;
-    margin: 2px 0px 0 0;
+    margin: 2px 2px 0 0;
     padding: 1px 5px 0;
     border: 1px solid transparent;
     text-transform: uppercase;
     font-size: 10px;
+    background-color: white;
 }
 
-.category-selector .cat-vote-left:after {
-    padding-left: 3px;
-    position: absolute;
-    color: silver;
-    content: "|";
-}
+/*.category-selector .cat-vote-left:after {*/
+    /*padding-left: 3px;*/
+    /*position: absolute;*/
+    /*color: silver;*/
+    /*content: "|";*/
+/*}*/
 
 /* when yes/no is hovered, hide the vertical pipe-separator */
-.category-selector .cat-vote:hover .cat-vote-left:after,
-.category-selector .category[voted] .cat-vote-left:after {
-    content: "";
+/*.category-selector .cat-vote:hover .cat-vote-left:after,*/
+/*.category-selector .category[voted] .cat-vote-left:after {*/
+    /*content: "";*/
+/*}*/
+
+.category-selector .cat-vote-left:hover {
 }
 
-.category-selector .cat-vote-left:hover,
-.category-selector .cat-vote-right:hover {
-    /*width: 23px;*/
-    /*height: 18px;*/
-    border: 1px solid #ccc;
+/* Checkbox in voted state */
+.category-selector .category[voted="1"] .cat-vote-left {
+    background-position: 0 -15px;
+}
+
+.category-selector .category .cat-vote-right:hover {
+    border: 1px solid #74B1FF;
     background-color: white;
     color: #319de7;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
     border-radius: 4px;
 }
 
-.category-selector .category[voted="1"] .cat-vote-left,
-.category-selector .category[voted="-1"] .cat-vote-right {
-    border: 1px solid #c7ddef;
-    background: #eaf2fa;
+/* "I disagree" in voted state */
+.category-selector .category[voted="-1"] .cat-vote-right,
+.category-selector .category[voted="-1"] .cat-vote-right:hover {
+    border: 1px solid transparent;  /* different in Firefox */
+    background: #2C7FE9 !important;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
     border-radius: 4px;
+    color: #ffffff !important;
 }
 
-.category-selector .cat-vote-del {
-    display: inline;
-    float: left;
-    visibility: hidden;
-    height: 20px;
-}
-
-.category-selector .category[voted] .cat-vote-del {
-    visibility: visible;
-}
-
-.category-selector .delete-icon {
-    position: relative;
-    width: 12px;
-    height: 12px;
-    background-color: #f0efef;
-    margin: 3px 3px 0 3px;
-    cursor: pointer;
-    border: 1px solid #dadada;
-    border-radius: 50%;
-}
-
-/* Cross inside the "delete" icon */
-.category-selector .delete-icon:after,
-.category-selector .delete-icon:before {
-    content: "";
-    position: absolute;
-    top: 50%;
-    z-index: 10;
-    left: 5px;
-    width: 2px;
-    height: 10px;
-    margin-top: -5px;
-    background: #a5a5a5;
-}
-
-.category-selector .delete-icon:before {
-    transform: rotate(45deg);
-}
-
-.category-selector .delete-icon:after {
-    transform: rotate(135deg);
-}
-
-
 .category-selector .category-breakline {
     height: 1px;
     width: 100%;
@@ -1550,7 +1553,7 @@ body {
     background-clip: padding-box;
 }
 
-.category-selector li:last-of-type {
+.category-selector li:not(.invisible):last-of-type {
     -webkit-border-radius: 0 0 0 6px;
     border-radius: 0 0 0 6px;
     -webkit-background-clip: padding-box;
@@ -1602,6 +1605,7 @@ input[type=checkbox].css-checkbox:checked + label.css-label {
 #commenting-area {
     display: none;  /* is shown from JS when needed */
     margin: auto 19px;
+    min-height: 225px;
 }
 
 .comment-title {
@@ -1698,6 +1702,7 @@ input[type=checkbox].css-checkbox:checked + label.css-label {
 
 #thanks-area {
     display: none;
+    min-height: 194px;
 }
 
 .thanks-text {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git



More information about the Pkg-mozext-commits mailing list