[Pkg-mozext-commits] [wot] 187/226: Added illogicality check

David Prévot taffit at moszumanska.debian.org
Fri May 1 00:35:50 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 f81b8a60f4da92d4826df255cd924d2204f9d463
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date:   Mon Nov 18 16:50:13 2013 +0200

    Added illogicality check
---
 content/categories.js        |  54 +++++-
 content/ratingwindow.js      |   8 +-
 content/rw/ratingwindow.html |   1 +
 content/rw/ratingwindow.js   |  99 +++++++++-
 content/rw/wot.js            |  41 +++-
 locale/en-US/wot.properties  |  11 +-
 locale/ru-RU/wot.properties  |   9 +-
 skin/ratingslider.css        | 441 +++++++++++++++++++++++++++++++++++++++++++
 skin/ratingwindow.css        | 321 +++++--------------------------
 9 files changed, 690 insertions(+), 295 deletions(-)

diff --git a/content/categories.js b/content/categories.js
index 1344cce..c8f7098 100644
--- a/content/categories.js
+++ b/content/categories.js
@@ -21,6 +21,7 @@
 var wot_categories = {
 
     PREF_CATEGORY: "category",
+    PREF_CONFLICTS: "conflicts",
     PREF_GROUPINGS: "groupings",
     CATEGORY_THRESHOLD: 3,  // confidence level to show a category as identified
     inited: false,
@@ -28,6 +29,8 @@ var wot_categories = {
     categories: {},
     grouping: [],   // Groupings for building category selector in Rating Window. Loaded from API server/update.xml.
     cgroups: {},    // Categories' groups and their mapping to colors and TR/CS.
+	cat_combinations: {},
+	cat_combinations_prio: [],
 
     load_delayed: function () {
         if (this.inited) return;
@@ -109,11 +112,29 @@ var wot_categories = {
             cat_obj.cs = (cat_obj.application == "4");               // set ChildSafety flag
             cat_obj.type = this.cgroups[cat_obj.group].type; // set type of the category based on parent group
 
-//            this.categories[cat_obj.id] = cat_obj;
-
             wot_prefs.setChar(this.PREF_CATEGORY + "." + cat_obj.name, JSON.stringify(cat_obj), true); // using utf8
         }
 
+	    // Iterage through <conflict> tag that describes how categories may conflict with each other.
+	    var conflicts_node = categories_node.getElementsByTagName("conflict"),
+		    conflicts = [];
+	    for (i = 0; i < conflicts_node.length; i++) {
+		    var conflict_node = conflicts_node[i],
+			    conflict_obj = wot_util.copy_attrs(conflict_node),
+		        voted_nodes = conflict_node.getElementsByTagName("voted");
+
+		    conflict_obj.voted = [];
+
+		    for (j = 0; j < voted_nodes.length; j++) {
+			    var voted = wot_util.copy_attrs(voted_nodes[j]);
+			    conflict_obj.voted.push(voted);
+		    }
+
+		    conflicts.push(conflict_obj);
+	    }
+
+	    wot_prefs.setJSON(this.PREF_CONFLICTS, conflicts);      // save parsed results to preferences storage
+
         this.init_categories();
 
         this.loading = false;
@@ -146,6 +167,33 @@ var wot_categories = {
             var groupings_json = wot_prefs.getChar(this.PREF_GROUPINGS + ".all", "{}", true); //using utf8
             this.grouping = JSON.parse(groupings_json);
 
+	        // Init proper structure for categories conflicts rules
+	        this.cat_combinations = {};
+	        this.cat_combinations_prio = ["6a"];    // first default value
+
+	        var conflicts = wot_prefs.getJSON(this.PREF_CONFLICTS, []);
+	        for (i = 0; i < conflicts.length; i++) {
+		        var conflict = conflicts[i],
+			        rule = String(conflict.rule).toLowerCase();
+
+		        this.cat_combinations_prio.push(rule);
+
+		        if (conflict.voted && conflict.voted.length) {
+			        for(var j = 0; j < conflict.voted.length; j++) {
+				        var group = conflict.voted[j] && conflict.voted[j].group ? conflict.voted[j].group : "";
+				        var cats = group.split(",");
+				        if (cats.length > 1) {
+					        var cat1 = cats[0], cat2 = cats[1];
+					        if (!this.cat_combinations[cat1]) this.cat_combinations[cat1] = {};
+					        if (!this.cat_combinations[cat2]) this.cat_combinations[cat2] = {};
+
+					        this.cat_combinations[cat1][cat2] = rule;
+					        this.cat_combinations[cat2][cat1] = rule;
+				        }
+			        }
+		        }
+	        }
+
             this.inited = true;
 
         } catch (e) {
@@ -296,4 +344,4 @@ var wot_categories = {
     }
 };
 
-wot_modules.push({ name: "wot_categories", obj: wot_categories });
\ No newline at end of file
+wot_modules.push({ name: "wot_categories", obj: wot_categories });
diff --git a/content/ratingwindow.js b/content/ratingwindow.js
index 675ddad..773b9d9 100644
--- a/content/ratingwindow.js
+++ b/content/ratingwindow.js
@@ -387,6 +387,10 @@ var wot_rw = {
                 case "keeper.save_comment":
                     wot_keeper.save_comment(data.target, data.user_comment, data.user_comment_id, data.votes, data.keeper_status);
                     break;
+
+	            case "log":
+		            wdump("LOG: " + JSON.stringify(data));
+		            break;
             }
 
             return true;
@@ -429,6 +433,8 @@ var wot_rw = {
             rw_wot.categories = wot_categories.categories;
             rw_wot.grouping = wot_categories.grouping;
             rw_wot.cgroups = wot_categories.cgroups;
+            rw_wot.cat_combinations = wot_categories.cat_combinations;
+            rw_wot.cat_combinations_prio = wot_categories.cat_combinations_prio;
 
             // init other values
             rw_wot.firstrunupdate = WOT_FIRSTRUN_CURRENT;
@@ -444,4 +450,4 @@ var wot_rw = {
 
 };
 
-wot_modules.push({ name: "wot_rw", obj: wot_rw });
\ No newline at end of file
+wot_modules.push({ name: "wot_rw", obj: wot_rw });
diff --git a/content/rw/ratingwindow.html b/content/rw/ratingwindow.html
index 35c2629..612937b 100644
--- a/content/rw/ratingwindow.html
+++ b/content/rw/ratingwindow.html
@@ -32,6 +32,7 @@
     <script type="text/javascript" src="chrome://wot/content/rw/ratingwindow.js"></script>
 
     <style type="text/css">
+        @import "chrome://wot/skin/ratingslider.css";
         @import "chrome://wot/skin/ratingwindow.css";
         @import "chrome://wot/skin/welcometips.css";
     </style>
diff --git a/content/rw/ratingwindow.js b/content/rw/ratingwindow.js
index 149ab7b..4a8527c 100644
--- a/content/rw/ratingwindow.js
+++ b/content/rw/ratingwindow.js
@@ -57,6 +57,9 @@ $.extend(wot, { ratingwindow: {
     resetstate: function () {
         // resets testimonies state
         wot.ratingwindow.state = { down: -1 };
+	    wot.ratingwindow.cat_selector.is_illogical = false;
+	    $(".category-description").removeClass("warning");
+	    $("#btn-submit").removeClass("warning highlight");
     },
 
     updatestate: function(target, data)
@@ -92,6 +95,10 @@ $.extend(wot, { ratingwindow: {
         /* remember previous state */
 	    _this.state = $.extend(state, _this.state);
 	    _this.cat_selector.init_voted(data.value.cats); // re-build user votes with new data
+
+	    _this.cat_selector.is_illogical = _this.cat_selector.calc_illogicality();
+	    _this.cat_selector.warn_illogicality(_this.cat_selector.is_illogical);
+
 	    return was_target_changed;
     },
 
@@ -903,7 +910,7 @@ $.extend(wot, { ratingwindow: {
         return passed;
     },
 
-    update_submit_button: function (enable) {
+    update_submit_button: function (enable, warn) {
         var _rw = wot.ratingwindow,
             $_submit = $("#btn-submit"),
             delete_action = false;
@@ -917,6 +924,8 @@ $.extend(wot, { ratingwindow: {
         } else {
             enable = _rw.is_allowed_submit();
             $_submit.toggleClass("disabled", !enable);
+            $_submit.toggleClass("highlight", (enable && !warn));
+            $_submit.toggleClass("warning", !!warn);
 
             // If user wants to delete ratings, change the text of the button and hide "Delete ratings" button
             if (enable && !_rw.is_rated(_rw.state) && !_rw.comments.has_valid_comment()) {
@@ -1350,7 +1359,7 @@ $.extend(wot, { ratingwindow: {
                 }
             });
 
-            _rw.update_submit_button();
+            _rw.update_submit_button(null, wot.ratingwindow.cat_selector.is_illogical);
         }
     },
 
@@ -1409,7 +1418,10 @@ $.extend(wot, { ratingwindow: {
                     _rw.update_catsel_state();  // update the category selector with current state
                 }
 
-                _rw.update_submit_button();
+	            _rw.cat_selector.calc_illogicality();
+	            _rw.cat_selector.warn_illogicality(_rw.cat_selector.is_illogical);
+
+	            _rw.update_submit_button(null, _rw.cat_selector.is_illogical);
                 _rw.comments.update_button("rate", true);
                 _rw.was_in_ratemode = true;
 
@@ -1521,10 +1533,12 @@ $.extend(wot, { ratingwindow: {
     },
 
     cat_selector: {
+	    MAX_UPVOTED_BEFORE_WARN: 3,
         inited: false,
         $_cat_selector: null,
         short_list: true,
         voted: {},
+	    is_illogical: false,
 
         build: function () {
             var _rw = wot.ratingwindow,
@@ -1844,6 +1858,8 @@ $.extend(wot, { ratingwindow: {
                 $_category_title = $(".category-title"),
                 $_cat_description = $(".category-description");
 
+	        if ($_cat_description.hasClass("warning")) return;
+
             var cat_id = $_cat.attr("data-cat"),
                 is_hovered = (e.type == "mouseenter") && (cat_id !== undefined);
 
@@ -1983,8 +1999,81 @@ $.extend(wot, { ratingwindow: {
                 if (_this.votes[cat_id]) delete _this.votes[cat_id];
             }
 
-            wot.ratingwindow.update_submit_button(); // enable/disable "Save" button
-        }
+            var is_illogical = _this.calc_illogicality();
+	        _this.warn_illogicality(is_illogical);  // set or remove warning about wrong categories choice
+
+	        wot.ratingwindow.update_submit_button(null, is_illogical); // enable/disable "Save" button
+        },
+
+	    calc_illogicality: function () {
+		    var _this = wot.ratingwindow.cat_selector,
+		        user_votes = _this.get_user_votes(true),    // get user votes as an object
+			    warns = {},
+			    upvoted = 0;
+
+		    _this.is_illogical = false;
+
+		    for (var cat1 in user_votes) {
+			    if (!user_votes.hasOwnProperty(cat1) || user_votes[cat1] != 1) continue;
+			    upvoted++;
+			    for (var cat2 in user_votes) {
+				    if (!user_votes.hasOwnProperty(cat2) || cat2 == cat1 || user_votes[cat2] != 1) continue;
+				    if (wot.cat_combinations[cat1] && wot.cat_combinations[cat1][cat2]) {
+					    warns[wot.cat_combinations[cat1][cat2]] = true;
+				    }
+			    }
+		    }
+
+		    if (upvoted > _this.MAX_UPVOTED_BEFORE_WARN) {
+			    warns["6a"] = true;
+		    } else {
+			    delete warns["6a"];
+		    }
+
+		    // now take the most important warning according to defined priorities
+		    for (var p = 0; p < wot.cat_combinations_prio.length; p++) {
+			    if (warns[wot.cat_combinations_prio[p]]) {
+				    _this.is_illogical = wot.cat_combinations_prio[p];
+				    break;
+			    }
+		    }
+
+		    return _this.is_illogical;
+	    },
+
+	    warn_illogicality: function (warning) {
+
+		    var warn_text = wot.i18n("ratingwindow", "check_"+String(warning));
+
+		    var _this = wot.ratingwindow.cat_selector,
+			    $_category_title = $(".category-title"),
+			    $_cat_description = $(".category-description"),
+			    previously_warned = $_cat_description.hasClass("warning"),
+			    $_btn_submit = $("#btn-submit");
+
+		    if (warning && !warn_text || !_this.$_cat_selector) {        // do nothing if there is no warning text
+			    $_cat_description.removeClass("warning");
+			    $_btn_submit.removeClass("warning");
+			    return;
+		    }
+
+		    _this.$_cat_selector.closest(".category-selector").toggleClass("warning", !!warning);
+		    $_cat_description.toggleClass("warning",  !!warning);
+		    $_btn_submit.toggleClass("warning",  !!warning);
+
+		    if (warning) {
+			    $_category_title.hide(0, function () {
+				    $_cat_description.text(warn_text);
+				    $_cat_description.show();
+			    });
+		    } else {
+			    if (previously_warned) {
+				    $_cat_description.hide(0, function () {
+					    $_category_title.show();
+				    });
+			    }
+		    }
+	    }
     }, /* end of cat_selector {} */
 
     /* Start of Comments API and Comments UI code */
diff --git a/content/rw/wot.js b/content/rw/wot.js
index 6cf105d..49ea59f 100644
--- a/content/rw/wot.js
+++ b/content/rw/wot.js
@@ -34,7 +34,6 @@ var wot = {
 		is_mailru: false,
 		is_yandex: false,
 		is_rambler: false,
-
 		is_accessible: false
 	},
 
@@ -50,6 +49,10 @@ var wot = {
 
     categories: {}, // is loaded from preferences during launch and updated from server regularly
 
+	cat_combinations: {},   // is loaded at the same time as categories
+
+	cat_combinations_prio: [],
+
     category_threshold: 3,  // confidence level to show a category as identified
 
 	reputationlevels: [
@@ -751,6 +754,32 @@ var wot = {
                         }
                     }
                 }
+
+                // update categories' combinations
+                if (update_state.categories[0].combinations) {
+                    var lst = update_state.categories[0].combinations;
+	                for (var c = 0; c < lst.length; c++) {
+		                var cat1 = lst[c].cat1,
+			                cat2 = lst[c].cat2,
+			                state = String(lst[c].s).toLowerCase();
+
+		                if (!wot.cat_combinations[cat1]) {
+			                wot.cat_combinations[cat1] = {};
+		                }
+
+		                wot.cat_combinations[cat1][cat2] = state;
+	                }
+                }
+
+	            // update cat-combinations warnings priority
+	            if (update_state.categories[0].combinations_priority) {
+		            wot.cat_combinations_prio = [];
+		            lst = update_state.categories[0].combinations_priority;
+		            for (var cp = 0; cp < lst.length; cp++) {
+			            wot.cat_combinations_prio.push(String(lst[cp].priority).toLowerCase());
+		            }
+	            }
+
             } else {
                 console.warn("No categories are known yet. Not good situation.");
             }
@@ -1032,9 +1061,9 @@ wot.utils = {
 	},
 
     isEmptyObject: function (obj) {
-    for (var name in obj) {
-        return false;
-    }
-    return true;
-}
+		for (var name in obj) {
+			return false;
+		}
+		return true;
+	}
 };
diff --git a/locale/en-US/wot.properties b/locale/en-US/wot.properties
index 1d54d2b..536999a 100644
--- a/locale/en-US/wot.properties
+++ b/locale/en-US/wot.properties
@@ -76,7 +76,7 @@ ratingwindow_commenthints = <p>Be precise</p><p>Give evidence or example</p><p>C
 ratingwindow_novoted = Click here to provide reasons
 ratingwindow_morecats = more
 ratingwindow_rerate_change = change
-ratingwindow_rerate_category =  
+ratingwindow_rerate_category =
 ratingwindow_fulllist = show full list
 ratingwindow_vote_yes = Yes
 ratingwindow_vote_no = I disagree
@@ -103,7 +103,7 @@ buttons_ok = OK
 popup_headertext = click to view details
 popup_nocattext = share your opinion about this website
 ratingwindow_thankyou = Thanks for sharing your experience!
-activityscore_text = Your activity score is now 
+activityscore_text = Your activity score is now
 activityscore_rookie = rookie
 activityscore_bronze = bronze
 activityscore_silver = silver
@@ -134,3 +134,10 @@ warnings_blocked = Blocked
 auto_update_check = Enable automatic updates (recommended)
 auto_update_button_no = Remind me later
 auto_update_message = A new version of WOT is available. Would you like to update your add-on?
+ratingwindow_check_1a = Other users may not understand why you selected 'good site' if you also had severe negative things to say.
+ratingwindow_check_1b = Other users may not think that a site designed for children should have such negative characteristics.
+ratingwindow_check_2a = Other users may not consider your review credible, because you selected several unrelated negative things.
+ratingwindow_check_3a = Other users may question if all negative statements on content and site functionality are true.
+ratingwindow_check_4a = Other users may not consider your review credible, because you selected several unrelated things.
+ratingwindow_check_5a = 'Other' category should be used only if no other options applies, and then explained in written comments.
+ratingwindow_check_6a = Too many categories may result in people questioning the credibility of your review.
diff --git a/locale/ru-RU/wot.properties b/locale/ru-RU/wot.properties
index d438a40..3a37d41 100644
--- a/locale/ru-RU/wot.properties
+++ b/locale/ru-RU/wot.properties
@@ -103,7 +103,7 @@ buttons_ok = OK
 popup_headertext = кликните, чтобы посмотреть подробности
 popup_nocattext = высказать своё мнение об этом сайте
 ratingwindow_thankyou = Спасибо за ваше мнение!
-activityscore_text = Ваша оценка активности – 
+activityscore_text = Ваша оценка активности –
 activityscore_rookie = новичок
 activityscore_bronze = бронзовый
 activityscore_silver = серебряный
@@ -134,3 +134,10 @@ warnings_blocked = Заблокировано
 auto_update_check = Включить автоматические обновления (рекомендуется)
 auto_update_button_no = Напомнить позднее
 auto_update_message = Доступна новая версия надстройки WOT. Обновить надстройку?
+ratingwindow_check_1a = Другие пользователи могут не понять, почему вы выбрали причину 'Хороший сайт' одновременно с негативной.
+ratingwindow_check_1b = Другие могут не согласится, что сайт, имеющий негативные категории подходит для детей.
+ratingwindow_check_2a = Ваш отзыв может показаться сомнительным, потому что вы указали несколько несвязанных негативных причин.
+ratingwindow_check_3a = Ваш отзыв может показаться сомнительным, потому что вы выбрали негативные причины одновременно про содержание и работу сайта.
+ratingwindow_check_4a = Выбраны слишком разные категории. Это может вызывать недоверие к вашему мнению.
+ratingwindow_check_5a = Причина 'Прочее' имеет смысл только если вы напишите комментарий, объясняющий ваше мнение.
+ratingwindow_check_6a = Слишком много выбранных категорий может вызвать сомнения в правильности вашего мнения.
diff --git a/skin/ratingslider.css b/skin/ratingslider.css
new file mode 100644
index 0000000..52ce624
--- /dev/null
+++ b/skin/ratingslider.css
@@ -0,0 +1,441 @@
+/*
+	ratingslider.css
+	Copyright © 2013  WOT Services Oy <info at mywot.com>
+
+	This file is part of WOT.
+
+	WOT is free software: you can redistribute it and/or modify it
+	under the terms of the GNU General Public License as published by
+	the Free Software Foundation, either version 3 of the License, or
+	(at your option) any later version.
+
+	WOT is distributed in the hope that it will be useful, but WITHOUT
+	ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+	or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+	License for more details.
+
+	You should have received a copy of the GNU General Public License
+	along with WOT. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+.wot-rating {
+    position: absolute;
+    height: 60px;
+    margin-left: 16px;
+    margin-right: 0;
+    width: 240px;
+    -moz-user-select: none;
+    top: 42px;
+}
+
+/* Child Safety rating control */
+#wot-rating-4 {
+    left: 278px;
+}
+
+.wot-rating-data {
+    display: block;
+}
+
+.wot-rating-testimony {
+    display: block;
+    float: left;
+    height: 16px;
+    margin-left: 6px;
+    margin-top: 2px;
+    position: relative;
+}
+
+#ratings-area:not([disabled=disabled]) .wot-rating:hover .wot-rating-data[r=r0] .wot-rating-help,
+#ratings-area:not([disabled=disabled]) .wot-rating.hover .wot-rating-data[r=r0] .wot-rating-help {
+    display: none;
+}
+
+.wot-rating-data[r] .wot-rating-help {
+    opacity: 1;
+}
+
+.rating-bound-left,
+.rating-bound-right {
+    position: absolute;
+}
+
+.rating-bound-left {
+    left: 0;
+}
+
+.rating-bound-right {
+    right: 0;
+}
+
+.wot-rating-stack {
+    display: block;
+    height: 34px;
+    padding-left: 0;
+    width: 204px;
+    z-index: 5;
+    cursor: pointer;
+}
+
+
+.wot-rating-bounds {
+    position: relative;
+    font-size: 11px;
+    height: 16px;
+    margin: 4px 48px -6px 2px;
+    color: #919191;
+    opacity: 0;
+    display: none;
+    -moz-transition: opacity 5.5s;
+}
+
+/* show boundary labels only when rating bars are enabled */
+#ratings-area:not([disabled=disabled]) .wot-rating:hover .wot-rating-data[r=r0] .wot-rating-bounds,
+#ratings-area:not([disabled=disabled]) .wot-rating.hover .wot-rating-data[r=r0] .wot-rating-bounds {
+    opacity: 1;
+    display: block;
+}
+
+#ratings-area[disabled=disabled] .wot-rating-stack {
+    cursor: default;
+}
+
+.wot-rating-slider {
+    background-image: url("chrome://wot/skin/b/slider.png");
+    background-repeat: no-repeat;
+    background-size: auto 216px;
+    background-position: 0 -180px;
+    display: block;
+    height: 30px;
+    margin-top: 3px;
+    width: 172px;
+    cursor: pointer;
+}
+
+#wot-ratingwindow.accessible .wot-rating-slider {
+    background-image: url("chrome://wot/skin/b/accessible/slider.png");
+}
+
+#ratings-area[disabled=disabled] .wot-rating-slider {
+    cursor: default;
+}
+
+.wot-rating-stack[r="r1"] .wot-rating-slider {
+    background-position: 0 -144px;
+}
+
+.wot-rating-stack[r="r2"] .wot-rating-slider {
+    background-position: 0 -108px;
+}
+
+.wot-rating-stack[r="r3"] .wot-rating-slider {
+    background-position: 0 -72px;
+}
+
+.wot-rating-stack[r="r4"] .wot-rating-slider {
+    background-position: 0 -36px;
+}
+
+.wot-rating-stack[r="r5"] .wot-rating-slider {
+    background-position: 0 0;
+}
+
+.wot-rating-indicator {
+    display: block;
+    height: 30px;
+    margin-left: -8px;
+    margin-top: -22px;
+    width: 21px;
+    float: left;
+    position: relative;
+    background-image: url("chrome://wot/skin/b/slider_handle.png");
+    background-repeat: no-repeat;
+    background-size: 21px auto;
+    z-index: 5;
+    left: 166px;
+}
+
+#wot-ratingwindow.accessible .wot-rating-indicator {
+    background-image: url("chrome://wot/skin/b/accessible/slider_handle.png");
+}
+
+.wot-rating-stack .wot-rating-indicator {
+    background-position: 0 -140px;
+}
+
+.wot-rating-stack.testimony[r="r1"] .wot-rating-indicator {
+    background-position: 0 -112px;
+}
+
+.wot-rating-stack.testimony[r="r2"] .wot-rating-indicator {
+    background-position: 0 -84px;
+}
+
+.wot-rating-stack.testimony[r="r3"] .wot-rating-indicator {
+    background-position: 0 -56px;
+}
+
+.wot-rating-stack.testimony[r="r4"] .wot-rating-indicator {
+    background-position: 0 -28px;
+}
+
+.wot-rating-stack.testimony[r="r5"] .wot-rating-indicator {
+    background-position: 0 0;
+}
+
+.wot-rating-help {
+    display: block;
+
+    margin-bottom: -6px;
+    margin-left: 2px;
+    margin-right: 0;
+    margin-top: 4px;
+    width: 154px;
+    -moz-transition: opacity 2.5s linear 2s;
+}
+
+.wot-rating-data:not([r]) .wot-rating-help {
+    opacity: 0;
+}
+
+.wot-rating-helptext,
+.wot-rating-helplink {
+    height: 16px;
+    margin-top: 3px;
+    font-size: 11px;
+    text-align: left;
+    color: #878787;
+}
+
+.wot-rating-helptext[r=r1] {
+    color: #dd2e31;
+    text-align: left;
+}
+
+.wot-rating-helptext[r=r2] {
+    color: #e25533;
+    text-align: left;
+}
+
+.wot-rating-helptext[r=r3] {
+    color: #de7c1b;
+    text-align: center;
+}
+
+.wot-rating-helptext[r=r4] {
+    color: #5bab28;
+    text-align: right;
+}
+
+.wot-rating-helptext[r=r5] {
+    color: #3b9013;
+    text-align: right;
+}
+
+#ratings-area[disabled=disabled] .wot-rating-helptext {
+    visibility: hidden;
+}
+
+.wot-rating-helplink {
+    display: none;
+}
+.wot-rating-helplink.comment {
+    color: #3073c5;
+    cursor: pointer;
+    display: block;
+}
+#wot-ratingwindow.accessible .wot-rating-helplink.comment {
+    color: #333;
+    text-decoration: underline;
+}
+
+.rating-delete {
+    margin-left: 160px;
+    margin-top: 20px;
+    top: 0;
+    position: absolute;
+    z-index: 1;
+}
+
+.rating-delete-icon {
+    position: relative;
+    background: url("chrome://wot/skin/b/delete-testimony.png") top left no-repeat;
+    background-size: auto 18px;
+    background-position: -34px 0;
+    width: 18px;
+    height: 18px;
+    margin: -2px 0 0 0;
+}
+
+/* Cross inside the "delete" icon */
+.delete .rating-delete-icon {
+    background-position: 0 0;
+}
+
+.rating-delete.delete .rating-delete-icon,
+.rating-delete.delete .rating-deletelabel {
+    cursor: pointer;
+}
+
+.rating-deletelabel {
+    font-size: 10px;
+    color: #808080;
+    margin: 4px auto 0;
+    text-align: center;
+    height: 1.4em;
+    white-space: nowrap;
+}
+
+.rating-delete.delete:hover .rating-deletelabel {
+    color: red;
+}
+
+.rating-delete.delete:hover .rating-delete-icon {
+    background-position: -17px 0;
+}
+
+/*.wot-rating-stack {*/
+/*display: block;*/
+/*height: 34px;*/
+/*padding-left: 0;*/
+/*width: 204px;*/
+/*z-index: 5;*/
+/*cursor: pointer;*/
+/*}*/
+
+/*.wot-rating-slider {*/
+/*background-image: url("chrome://wot/skin/b/slider.png");*/
+/*background-repeat: no-repeat;*/
+/*background-size: auto 216px;*/
+/*background-position: 0 -180px;*/
+/*display: block;*/
+/*height: 30px;*/
+/*margin-top: 3px;*/
+/*width: 172px;*/
+/*cursor: pointer;*/
+/*}*/
+
+/*#wot-ratingwindow.accessible .wot-rating-slider {*/
+/*background-image: url("chrome://wot/skin/b/accessible/slider.png");*/
+/*}*/
+
+/*#ratings-area[disabled=disabled] .wot-rating-slider {*/
+/*cursor: default;*/
+/*}*/
+
+/*.wot-rating-stack[r="r1"] .wot-rating-slider {*/
+/*background-position: 0 -144px;*/
+/*}*/
+
+/*.wot-rating-stack[r="r2"] .wot-rating-slider {*/
+/*background-position: 0 -108px;*/
+/*}*/
+
+/*.wot-rating-stack[r="r3"] .wot-rating-slider {*/
+/*background-position: 0 -72px;*/
+/*}*/
+
+/*.wot-rating-stack[r="r4"] .wot-rating-slider {*/
+/*background-position: 0 -36px;*/
+/*}*/
+
+/*.wot-rating-stack[r="r5"] .wot-rating-slider {*/
+/*background-position: 0 0;*/
+/*}*/
+
+
+
+
+/*.wot-rating-help {*/
+/*display: block;*/
+
+/*margin-bottom: -6px;*/
+/*margin-left: 2px;*/
+/*margin-right: 0;*/
+/*margin-top: 4px;*/
+/*width: 154px;*/
+/*-moz-transition: opacity 2.5s linear 2s;*/
+/*}*/
+
+/*.wot-rating-data:not([r]) .wot-rating-help {*/
+/*opacity: 0;*/
+/*}*/
+
+/*.wot-rating-helptext,*/
+/*.wot-rating-helplink {*/
+/*height: 16px;*/
+/*margin-top: 3px;*/
+/*font-size: 11px;*/
+/*text-align: left;*/
+/*color: #878787;*/
+/*}*/
+
+/*.wot-rating-helptext[r=r1] {*/
+/*color: #dd2e31;*/
+/*text-align: left;*/
+/*}*/
+
+/*.wot-rating-helptext[r=r2] {*/
+/*color: #e25533;*/
+/*text-align: left;*/
+/*}*/
+
+/*.wot-rating-helptext[r=r3] {*/
+/*color: #de7c1b;*/
+/*text-align: center;*/
+/*}*/
+
+/*.wot-rating-helptext[r=r4] {*/
+/*color: #5bab28;*/
+/*text-align: right;*/
+/*}*/
+
+/*.wot-rating-helptext[r=r5] {*/
+/*color: #3b9013;*/
+/*text-align: right;*/
+/*}*/
+
+/*#ratings-area[disabled=disabled] .wot-rating-helptext {*/
+/*visibility: hidden;*/
+/*}*/
+
+/*.wot-rating-helplink {*/
+/*display: none;*/
+/*}*/
+/*.wot-rating-helplink.comment {*/
+/*color: #3073c5;*/
+/*cursor: pointer;*/
+/*display: block;*/
+/*}*/
+/*#wot-ratingwindow.accessible .wot-rating-helplink.comment {*/
+/*color: #333;*/
+/*text-decoration: underline;*/
+/*}*/
+
+/*.rating-delete {*/
+/*margin-left: 160px;*/
+/*margin-top: 20px;*/
+/*top: 0;*/
+/*position: absolute;*/
+/*z-index: 1;*/
+/*}*/
+
+/*.rating-delete-icon {*/
+/*position: relative;*/
+/*background: url("chrome://wot/skin/b/delete-testimony.png") top left no-repeat;*/
+/*background-size: auto 18px;*/
+/*background-position: -34px 0;*/
+/*width: 18px;*/
+/*height: 18px;*/
+/*margin: -2px 0 0 0;*/
+/*}*/
+
+/* Cross inside the "delete" icon */
+/*.delete .rating-delete-icon {*/
+/*background-position: 0 0;*/
+/*}*/
+
+/*.rating-delete.delete .rating-delete-icon,*/
+/*.rating-delete.delete .rating-deletelabel {*/
+/*cursor: pointer;*/
+/*}*/
diff --git a/skin/ratingwindow.css b/skin/ratingwindow.css
index d097994..5d53e62 100644
--- a/skin/ratingwindow.css
+++ b/skin/ratingwindow.css
@@ -284,20 +284,6 @@ body {
     margin-right: 2px;
     width: 312px;
 }
-.wot-rating {
-    position: absolute;
-    height: 60px;
-    margin-left: 16px;
-    margin-right: 0;
-    width: 240px;
-    -moz-user-select: none;
-    top: 42px;
-}
-
-/* Child Safety rating control */
-#wot-rating-4 {
-    left: 278px;
-}
 
 #rated-votes {
     margin-top: 74px;
@@ -491,10 +477,6 @@ body {
     margin-top: 9px;
 }
 
-.wot-rating-data {
-    display: block;
-}
-
 .rating-values {
     position: relative;
     min-height: 30px;
@@ -630,262 +612,6 @@ body {
     white-space: nowrap;
 }
 
-.wot-rating-testimony {
-    display: block;
-    float: left;
-    height: 16px;
-    margin-left: 6px;
-    margin-top: 2px;
-    position: relative;
-}
-
-.wot-rating-bounds {
-    position: relative;
-    font-size: 11px;
-    height: 16px;
-    margin: 4px 48px -6px 2px;
-    color: #919191;
-    opacity: 0;
-    display: none;
-    -moz-transition: opacity 5.5s;
-}
-
-/* show boundary labels only when rating bars are enabled */
-#ratings-area:not([disabled=disabled]) .wot-rating:hover .wot-rating-data[r=r0] .wot-rating-bounds,
-#ratings-area:not([disabled=disabled]) .wot-rating.hover .wot-rating-data[r=r0] .wot-rating-bounds {
-    opacity: 1;
-    display: block;
-}
-
-#ratings-area:not([disabled=disabled]) .wot-rating:hover .wot-rating-data[r=r0] .wot-rating-help,
-#ratings-area:not([disabled=disabled]) .wot-rating.hover .wot-rating-data[r=r0] .wot-rating-help {
-    display: none;
-}
-
-.wot-rating-data[r] .wot-rating-help {
-    opacity: 1;
-}
-
-.rating-bound-left,
-.rating-bound-right {
-    position: absolute;
-}
-
-.rating-bound-left {
-    left: 0;
-}
-
-.rating-bound-right {
-    right: 0;
-}
-
-.wot-rating-stack {
-    display: block;
-	height: 34px;
-	padding-left: 0;
-	width: 204px;
-    z-index: 5;
-    cursor: pointer;
-}
-
-#ratings-area[disabled=disabled] .wot-rating-stack {
-    cursor: default;
-}
-
-.wot-rating-slider {
-	background-image: url("chrome://wot/skin/b/slider.png");
-    background-repeat: no-repeat;
-    background-size: auto 216px;
-    background-position: 0 -180px;
-    display: block;
-	height: 30px;
-    margin-top: 3px;
-	width: 172px;
-    cursor: pointer;
-}
-
-#wot-ratingwindow.accessible .wot-rating-slider {
-    background-image: url("chrome://wot/skin/b/accessible/slider.png");
-}
-
-#ratings-area[disabled=disabled] .wot-rating-slider {
-    cursor: default;
-}
-
-.wot-rating-stack[r="r1"] .wot-rating-slider {
-    background-position: 0 -144px;
-}
-
-.wot-rating-stack[r="r2"] .wot-rating-slider {
-    background-position: 0 -108px;
-}
-
-.wot-rating-stack[r="r3"] .wot-rating-slider {
-    background-position: 0 -72px;
-}
-
-.wot-rating-stack[r="r4"] .wot-rating-slider {
-    background-position: 0 -36px;
-}
-
-.wot-rating-stack[r="r5"] .wot-rating-slider {
-    background-position: 0 0;
-}
-
-.wot-rating-indicator {
-    display: block;
-	height: 30px;
-	margin-left: -8px;
-	margin-top: -22px;
-	width: 21px;
-    float: left;
-    position: relative;
-    background-image: url("chrome://wot/skin/b/slider_handle.png");
-    background-repeat: no-repeat;
-    background-size: 21px auto;
-    z-index: 5;
-    left: 166px;
-}
-
-#wot-ratingwindow.accessible .wot-rating-indicator {
-    background-image: url("chrome://wot/skin/b/accessible/slider_handle.png");
-}
-
-.wot-rating-stack .wot-rating-indicator {
-    background-position: 0 -140px;
-}
-
-.wot-rating-stack.testimony[r="r1"] .wot-rating-indicator {
-    background-position: 0 -112px;
-}
-
-.wot-rating-stack.testimony[r="r2"] .wot-rating-indicator {
-    background-position: 0 -84px;
-}
-
-.wot-rating-stack.testimony[r="r3"] .wot-rating-indicator {
-    background-position: 0 -56px;
-}
-
-.wot-rating-stack.testimony[r="r4"] .wot-rating-indicator {
-    background-position: 0 -28px;
-}
-
-.wot-rating-stack.testimony[r="r5"] .wot-rating-indicator {
-    background-position: 0 0;
-}
-
-.wot-rating-help {
-    display: block;
-
-    margin-bottom: -6px;
-    margin-left: 2px;
-    margin-right: 0;
-    margin-top: 4px;
-    width: 154px;
-    -moz-transition: opacity 2.5s linear 2s;
-}
-
-.wot-rating-data:not([r]) .wot-rating-help {
-    opacity: 0;
-}
-
-.wot-rating-helptext,
-.wot-rating-helplink {
-    height: 16px;
-    margin-top: 3px;
-    font-size: 11px;
-    text-align: left;
-    color: #878787;
-}
-
-.wot-rating-helptext[r=r1] {
-    color: #dd2e31;
-    text-align: left;
-}
-
-.wot-rating-helptext[r=r2] {
-    color: #e25533;
-    text-align: left;
-}
-
-.wot-rating-helptext[r=r3] {
-    color: #de7c1b;
-    text-align: center;
-}
-
-.wot-rating-helptext[r=r4] {
-    color: #5bab28;
-    text-align: right;
-}
-
-.wot-rating-helptext[r=r5] {
-    color: #3b9013;
-    text-align: right;
-}
-
-#ratings-area[disabled=disabled] .wot-rating-helptext {
-    visibility: hidden;
-}
-
-.wot-rating-helplink {
-    display: none;
-}
-.wot-rating-helplink.comment {
-    color: #3073c5;
-    cursor: pointer;
-    display: block;
-}
-#wot-ratingwindow.accessible .wot-rating-helplink.comment {
-    color: #333;
-    text-decoration: underline;
-}
-
-.rating-delete {
-    margin-left: 160px;
-    margin-top: 20px;
-    top: 0;
-    position: absolute;
-    z-index: 1;
-}
-
-.rating-delete-icon {
-    position: relative;
-    background: url("chrome://wot/skin/b/delete-testimony.png") top left no-repeat;
-    background-size: auto 18px;
-    background-position: -34px 0;
-    width: 18px;
-    height: 18px;
-    margin: -2px 0 0 0;
-}
-
-/* Cross inside the "delete" icon */
-.delete .rating-delete-icon {
-    background-position: 0 0;
-}
-
-.rating-delete.delete .rating-delete-icon,
-.rating-delete.delete .rating-deletelabel {
-    cursor: pointer;
-}
-
-.rating-deletelabel {
-    font-size: 10px;
-    color: #808080;
-    margin: 4px auto 0;
-    text-align: center;
-    height: 1.4em;
-    white-space: nowrap;
-}
-
-.rating-delete.delete:hover .rating-deletelabel {
-    color: red;
-}
-
-.rating-delete.delete:hover .rating-delete-icon {
-    background-position: -17px 0;
-}
-
 /* Reputation Info area */
 
 #reputation-info {
@@ -1348,6 +1074,32 @@ body {
     text-transform: capitalize;
 }
 
+.btn-submit:not(.disabled).warning {
+    background-image: -moz-linear-gradient(top, #FFF 0%, #ffcc00 83%, #ffcc00 100%);
+    border-top-color: #E7DB7E;
+    border-right-color: #E6CE1F;
+    border-left-color: #EBCC50;
+    border-bottom-color: #E2BB1E;
+    text-shadow: 1px 1px rgba(240, 208, 141, 0.75);
+}
+
+.rw-button:not(.disabled).warning:hover {
+    background-image: -moz-linear-gradient(top, #FFF 0%, #f1be00 83%, #e5b200 100%);
+}
+
+.btn-submit:not(.disabled).highlight {
+    background-image: -moz-linear-gradient(top, #FFF 0%, #97ed8b 100%);
+    border-top-color: #CAF0D3;
+    border-right-color: #A9D6AC;
+    border-left-color: #A9D8AB;
+    border-bottom-color: #92B98F;
+    text-shadow: 1px 1px rgba(225, 247, 226, 0.75);
+}
+
+.rw-button:not(.disabled).highlight:hover {
+    background-image: -moz-linear-gradient(top, #FFF 0%, #8bd381 100%);
+}
+
 .rw-buttons-expander {
     display: inline;
     float: left;
@@ -1380,6 +1132,17 @@ body {
     border: 1px solid #D4E5FC;
 }
 
+.category-description.warning {
+    font-size: 12px;
+    padding: 1px 5px 7px;
+    background-color: #FFCC00;
+    border-color: #FFCC00;
+    color: #494949;
+    font-weight: bold;
+    border-radius: 1px;
+    box-shadow: 1px 1px 5px #A5691D;
+}
+
 .group-title {
     font-size: 12px;
     cursor: pointer;
@@ -1454,6 +1217,10 @@ body {
     border: 1px solid #ccc;
 }
 
+.category-selector.warning .popover {
+    /*border: 1px solid #FF2C00;*/
+}
+
 .category-selector .category {
     line-height: 13px;
     font-weight: normal;
@@ -1567,15 +1334,15 @@ body {
 }
 
 .category-selector li:first-of-type {
-    -webkit-border-radius: 6px 0 0 0;
+    -moz-border-radius: 6px 0 0 0;
     border-radius: 6px 0 0 0;
     background-clip: padding-box;
 }
 
 .category-selector li:not(.invisible):last-of-type {
-    -webkit-border-radius: 0 0 0 6px;
+    -moz-border-radius: 0 0 0 6px;
     border-radius: 0 0 0 6px;
-    -webkit-background-clip: padding-box;
+    -moz-background-clip: padding-box;
     background-clip: padding-box;
 }
 

-- 
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