[Pkg-mozext-commits] [wot] 92/226: View mode of RW works fine now. Some other bugs were fixed.

David Prévot taffit at moszumanska.debian.org
Fri May 1 00:35:38 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 6f9f8088fb0efe49d294a9e813c49d75640b0f57
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date:   Thu Aug 1 14:55:37 2013 +0300

    View mode of RW works fine now. Some other bugs were fixed.
---
 content/categories.js                   |   2 +
 content/overlay.xul                     |   3 +-
 content/ratingwindow.js                 | 184 ++++++++++++++++++++++++++++++--
 content/rw/proxies.js                   | 175 ++++++++++++++++++++++++++++++
 content/rw/ratingwindow.html            |  11 +-
 content/rw/ratingwindow.js              |  84 +++++----------
 content/ui.js                           |  23 +---
 skin/b/checkbox.png                     | Bin 0 -> 3271 bytes
 skin/b/delete-myrating.png              | Bin 0 -> 3277 bytes
 skin/b/delete-testimony.png             | Bin 0 -> 5287 bytes
 skin/b/hands_150dpi.png                 | Bin 0 -> 3908 bytes
 skin/b/input-icons.png                  | Bin 0 -> 5182 bytes
 skin/b/rep-explanation.png              | Bin 0 -> 627 bytes
 skin/b/rep_symbol.png                   | Bin 0 -> 11924 bytes
 skin/b/slider handle.png                | Bin 0 -> 8437 bytes
 skin/b/slider.png                       | Bin 0 -> 20912 bytes
 skin/b/thumbs.png                       | Bin 0 -> 650 bytes
 skin/fusion/16_16/{no_r0.png => r0.png} | Bin
 skin/fusion/logo.png                    | Bin 1706 -> 1659 bytes
 skin/include/popup.css                  |   2 +-
 skin/{b => }/ratingwindow.css           |  61 ++++++-----
 skin/wot.css                            |  39 ++++---
 22 files changed, 444 insertions(+), 140 deletions(-)

diff --git a/content/categories.js b/content/categories.js
index 8252b14..217b529 100644
--- a/content/categories.js
+++ b/content/categories.js
@@ -199,6 +199,8 @@ var wot_categories = {
             }
             if (!wot_util.isEmpty(cat_obj)) {
                 cat_obj['id'] = cat_obj.name;
+                cat_obj.v = cat_obj.vote;   // comply with Chrome's codebase
+                delete cat_obj.vote;
                 cats[cat_obj.name] = cat_obj;
             }
         }
diff --git a/content/overlay.xul b/content/overlay.xul
index 0f9c877..411f370 100644
--- a/content/overlay.xul
+++ b/content/overlay.xul
@@ -47,7 +47,6 @@
     <script type="application/x-javascript" src="chrome://wot/content/partner.js"/>
     <script type="application/x-javascript" src="chrome://wot/content/core.js"/>
 
-
     <stringbundleset id="stringbundleset">
         <stringbundle id="wot-strings" src="chrome://wot/locale/wot.properties"/>
     </stringbundleset>
@@ -84,7 +83,7 @@
                    onpopuphiding="wot_rw.hide_popup();">
 
             <iframe id="wot-rwframe" src="chrome://wot/content/rw/ratingwindow.html" type="content-primary"
-                    flex="1" transparent="true" showcaret="true" width="100%" height="380px"/>
+                    transparent="false" showcaret="true" width="100%" height="418px"/>
 
         </menupopup>
 
diff --git a/content/ratingwindow.js b/content/ratingwindow.js
index c493042..ba2ea91 100644
--- a/content/ratingwindow.js
+++ b/content/ratingwindow.js
@@ -23,6 +23,8 @@ var wot_rw = {
     RW_URL: "chrome://wot/content/rw/ratingwindow.html",
     FRAME_ID: "wot-rwframe",
     is_inited: false,
+    CHAN_ELEM_ID: "wot-comm-channel",
+    CHAN_EVENT_ID: "wotrw",
 
     get_rw_window: function () {
         var rw_frame = document.getElementById(this.FRAME_ID);
@@ -39,20 +41,28 @@ var wot_rw = {
         return rw ? rw.wot : null;
     },
 
-    /* Called when the popup window is hidden */
-    hide_popup: function()
-    {
+    unseenmessage: function () {
         try {
             if (wot_api_query.message_id.length > 0 &&
                 wot_api_query.message_id !=
                     WOT_SERVICE_XML_QUERY_MSG_ID_MAINT) {
                 wot_prefs.setChar("last_message", wot_api_query.message_id);
             }
+        } catch (e) {
+            wdump("wot_rw.unseenmessage: failed with " + e);
+        }
+    },
+
+    /* Called when the popup window is hidden */
+    hide_popup: function()
+    {
+        try {
+            wot_rw.unseenmessage();
 
             /* Stores any pending testimonies */
             wot_core.update();
         } catch (e) {
-            dump("wot_events.hide_popup: failed with " + e + "\n");
+            wdump("wot_rw.hide_popup: failed with " + e);
         }
     },
 
@@ -66,22 +76,180 @@ var wot_rw = {
 
         if (!this.is_inited) {
             this.initialize(rw, rw_doc, rw_wot);
+            // RW will ask BG to update it, so no need to update it here
+        } else {
+            // RW is already loaded so we need to just update it
+            wot_rw.update();
+        }
+    },
+
+    update: function () {
+        wdump("RW.update()");
+
+        var rw = this.get_rw_window(),
+            rw_doc = this.get_rw_document(),
+            rw_wot = this.get_rw_wot(),
+            data = {},
+            target = wot_core.hostname;
+
+        wdump("Target: " + target);
+
+        if (!rw || !rw_doc || !rw_wot) return;
+
+        if (wot_cache.isok(target)) {
+            wdump("target " + target + " is cached. Good.");
+            var normalized_target = wot_cache.get(target, "normalized") || target;
+
+            data = {
+                target: target,
+                normalized: wot_shared.decodehostname(normalized_target),
+                updated: wot_cache.get(target, "time"),
+                cached: {
+                    status: wot_cache.get(target, "status"),
+                    value: {}
+                }
+            };
+
+            for (var i = 0; i < WOT_COMPONENTS.length; i++) {
+                var app = WOT_COMPONENTS[i];
+                var rep = wot_cache.get(target, "reputation_" + app),
+                    cnf = wot_cache.get(target, "confidence_" + app),
+                    exl = wot_cache.get(target, "excluded_" + app),
+                    t = wot_cache.get(target, "testimony_" + app);
+
+                if (!data.cached.value[app]) {
+                    data.cached.value[app] = {};
+                }
+
+                data.cached.value[app].r = exl ? -2 : rep;
+                data.cached.value[app].c = exl ? 0 : cnf;
+                data.cached.value[app].t = t;
+            }
+
+            data.cached.value.cats = wot_categories.target_categories(target);
+            data.cached.value.blacklist = wot_categories.target_blacklists(target);
+
+        } else {
+            data = {
+                target: target,
+                normalized: target,
+                updated: null,
+                cached: {
+                    status: WOT_QUERY_ERROR,
+                    value: {}
+                }
+            };
+        }
+
+        wdump("data: " + JSON.stringify(data));
+
+        rw_wot.ratingwindow.update(target, JSON.stringify(data));
+    },
+
+    get_preferences: function () {
+
+        var prefs = {
+            accessible: wot_prefs.accessible
+        };
+
+        return prefs;
+    },
+
+    push_preferences: function (rw, prefs) {
+        rw.wot_bg.wot.prefs.load_prefs(JSON.stringify(prefs));
+    },
+
+    on_ratingwindow_event: function (event) {
+        var details = event.detail;
+        if (!details) return false;
+
+        wdump("on_ratingwindow_event() " + JSON.stringify(details));
+
+        var message_id = details.message_id,
+            data = details.data;
+
+        // Important: don't use "this" here, because it points to other than wot_rw object!
+
+        switch (message_id) {
+            case "update":  // bg.wot.core.update() is called from RW
+                if (data && data.update_rw) {
+                    wot_rw.update();
+                }
+                // TODO: do other updates (e.g. toolbar icon, etc)
+                break;
+
+            case "update_ratingwindow_comment":
+                // TODO: implement
+                break;
+
+            case "unseenmessage":
+                wot_rw.unseenmessage();
+                break;
         }
+    },
+
+    init_channel: function (elem_id, event_id) {
+        var doc = this.get_rw_document(),
+            rw = this.get_rw_window();
 
-        rw_doc.getElementById("ratings-area").addEventListener("click", function(event){
-            wdump("RW area clicked");
-        }, false);
+        if (!doc || !rw) return false;
 
+        rw.wot_bg.wot.core.moz_connect(elem_id, event_id);
+
+        var chan = doc.getElementById(elem_id);
+        if (chan) {
+            chan.addEventListener(event_id, this.on_ratingwindow_event);
+        } else {
+            wdump("Can't find 'wot-comm-channel' element in RatingWindow DOM. Very bad!");
+        }
+
+        return true;
     },
 
     initialize: function (rw, rw_doc, rw_wot) {
 
+        this.init_channel(this.CHAN_ELEM_ID, this.CHAN_EVENT_ID);
+
         var locale_strings = wot_util.get_all_strings();
         rw.chrome.i18n.loadMessages(JSON.stringify(locale_strings));    // using JSON to push data to sandboxed content
 
-        rw_wot.ratingwindow.localize();
+        // TODO: provide preferences to RW
+        wdump(JSON.stringify(this.get_preferences()));
+
+        var prefs = this.get_preferences();
+        this.push_preferences(rw, prefs);
+
+        // setup categories data in the RW
+        rw_wot.categories = wot_categories.categories;
+        rw_wot.grouping = wot_categories.grouping;
+        rw_wot.cgroups = wot_categories.cgroups;
+
+        // TODO: provide "level" (decrypted) value
+
+        rw_wot.ratingwindow.onload();   // this runs only once in FF
 
         this.is_inited = true;
+    },
+
+    update_title: function(description) {
+        try {
+            var title_elem = this.getElem("wot-title-text"),
+                hostname_elem = this.getElem("wot-hostname-text");
+
+            if (title_elem && hostname_elem) {
+                if (wot_cache.isok(wot_core.hostname)) {
+                    title_elem.value = wot_util.getstring("description_reputation");
+                    title_elem.setAttribute("status", "target");
+                    hostname_elem.value = wot_shared.decodehostname(wot_core.hostname);
+                } else {
+                    title_elem.value = description;
+                    title_elem.setAttribute("status", "information");
+                    hostname_elem.value = "";
+                }
+            }
+        } catch (e) {
+            wdump("wot_ui.update_title: failed with " + e);
+        }
     }
 
 };
diff --git a/content/rw/proxies.js b/content/rw/proxies.js
new file mode 100644
index 0000000..d4bd955
--- /dev/null
+++ b/content/rw/proxies.js
@@ -0,0 +1,175 @@
+/*
+ proxies.js
+ Copyright © 2009 - 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/>.
+ */
+
+// The purpose of this file is to handle objects and methods that exist in Chrome browser but doesn't in Firefox
+
+var wot_bg = {    // background page object
+
+    wot: {
+        prefs: { // preferences
+
+            _prefs: {},
+
+            get: function (k) {
+                return wot_bg.wot.prefs._prefs[k];
+            },
+
+            set: function (k, v) {
+                var _this = wot_bg.wot;
+                // TODO: implement pushing setting preferences to the BG
+                wot_bg.wot.prefs._prefs[k] = v;
+                _this.core.moz_send("prefs:set", {key: k, value: v});
+            },
+
+            load_prefs: function (json_data) {
+                wot_bg.wot.prefs._prefs = JSON.parse(json_data);
+            }
+        },
+
+        core: { // stubs of Background page
+
+            _level: "", // TODO: implement getting current user "level",
+            _moz_element_id: null,
+            _moz_event_id: null,
+
+            usermessage: {},
+
+            is_level: function (level) {
+                return wot_bg.wot.core._level == level;
+            },
+
+            update: function (update_rw) {
+                wot_bg.wot.core.moz_send("update", { update_rw: update_rw});  // ask BG to update rating window
+            },
+
+            update_ratingwindow_comment: function () {
+                wot_bg.wot.core.moz_send("update_ratingwindow_comment", null);  // ask BG to update comment data
+            },
+
+            unseenmessage: function () {
+                wot_bg.wot.core.moz_send("unseenmessage", null);
+            },
+
+            moz_connect: function (element_id, event_id) {
+                // init communication channel's properties
+                wot_bg.wot.core._moz_element_id = element_id;
+                wot_bg.wot.core._moz_event_id = event_id;
+            },
+
+            moz_send: function (message_id, data) {
+                // Sends event with data to background code (outside of RatingWindow)
+                var obj = document.getElementById(wot_bg.wot.core._moz_element_id);
+                var e = new CustomEvent(wot_bg.wot.core._moz_event_id, {
+                    "detail": {
+                        "message_id": message_id,
+                        "data": data
+                    }
+                });
+                obj.dispatchEvent(e);
+            }
+        },
+
+        keeper: {
+            remove_comment: function (target) {
+                // TODO: implement
+            },
+
+            save_comment: function (target, user_comment, user_comment_id, votes, keeper_status) {
+
+            }
+        },
+
+        url: {
+            decodehostname: function (v) { return v;}   // no need to process data in RW since it is already process in BG
+        },
+
+        api: {
+
+            submit: function () {
+
+            },
+
+            comments: {
+
+                get: function (target) {
+
+                },
+
+                submit: function (target, user_comment, user_comment_id, votes) {
+
+                },
+
+                remove: function (target) {
+
+                }
+
+            }
+
+        },
+
+        ga: {}  // this object is replaced on every chrome.extension.getBackgroundPage() call
+    },
+
+    console: {
+
+        log: function(args) {
+            if (window.console && window.console.log) {
+                window.console.log("LOG: " + arguments[1] + " , " + arguments[2] + " , " + arguments[3]);
+            }
+        },
+        warn: function (args) {
+            if (window.console && window.console.log) {
+                window.console.log("WARN: " + arguments[1] + " , " + arguments[2] + " , " + arguments[3]);
+            }
+        },
+        error: function (args) {
+            if (window.console && window.console.log) {
+                window.console.log("ERROR: " + arguments[1] + " , " + arguments[2] + " , " + arguments[3]);
+            }
+        }
+    }
+
+};
+
+var chrome = {
+    extension: {
+        getBackgroundPage: function () {
+            if (wot.ga) {
+                wot_bg.wot.ga = wot.ga; // init/update the GA object
+            }
+            return wot_bg;
+        }
+    },
+
+    i18n: {
+
+        messages: {},
+
+        getMessage: function(c) {
+            return chrome.i18n.messages[c];
+        },
+
+        loadMessages: function (json_data) {
+            chrome.i18n.messages = JSON.parse(json_data);
+        }
+
+    }
+};
+
diff --git a/content/rw/ratingwindow.html b/content/rw/ratingwindow.html
index 984f607..34b2df7 100644
--- a/content/rw/ratingwindow.html
+++ b/content/rw/ratingwindow.html
@@ -25,13 +25,14 @@
 <head>
     <script type="text/javascript" src="chrome://wot/content/rw/jquery.js"></script>
     <script type="text/javascript" src="chrome://wot/content/rw/jquery.menu-aim.js"></script>
+    <script type="text/javascript" src="chrome://wot/content/rw/proxies.js"></script>
     <script type="text/javascript" src="chrome://wot/content/rw/wot.js"></script>
     <script type="text/javascript" src="chrome://wot/content/rw/keeper.js"></script>
-    <!--<script type="text/javascript" src="ga_configure.js"></script>-->
+    <script type="text/javascript" src="chrome://wot/content/injections/ga_configure.js"></script>
     <script type="text/javascript" src="chrome://wot/content/rw/ratingwindow.js"></script>
 
     <style type="text/css">
-        @import "chrome://wot/skin/b/ratingwindow.css";
+        @import "chrome://wot/skin/ratingwindow.css";
         /*@import "skin/include/welcometips.css";*/
     </style>
 </head>
@@ -272,6 +273,10 @@
     </div>
 
 </div>
-<script type="text/javascript" src="ga_init.js"></script>
+<div id="wot-comm-channel" style="display: none;">
+    <!-- this Node is used to communicate with background code of the add-on -->
+</div>
+
+<script type="text/javascript" src="chrome://wot/content/injections/ga_init.js"></script>
 </body>
 </html>
diff --git a/content/rw/ratingwindow.js b/content/rw/ratingwindow.js
index 9350720..d4ee122 100644
--- a/content/rw/ratingwindow.js
+++ b/content/rw/ratingwindow.js
@@ -18,36 +18,6 @@
  along with WOT. If not, see <http://www.gnu.org/licenses/>.
  */
 
-var chrome = {
-    extension: {
-        getBackgroundPage: function () {
-            return {    // background page object
-
-                wot: {
-                    prefs: {
-                        get: function (k) {return k;}
-                    }
-                }
-
-            };
-        }
-    },
-
-    i18n: {
-
-        messages: {},
-
-        getMessage: function(c) {
-            return chrome.i18n.messages[c];
-        },
-
-        loadMessages: function (json_data) {
-            chrome.i18n.messages = JSON.parse(json_data);
-        }
-
-    }
-};
-
 $.extend(wot, { ratingwindow: {
     MAX_VOTED_VISIBLE: 4,   // how many voted categories we can show in one line
 	sliderwidth: 154,
@@ -563,32 +533,27 @@ $.extend(wot, { ratingwindow: {
 
     update: function(target, data)
     {
-        chrome.windows.getCurrent(function(obj) {
-            chrome.tabs.getSelected(obj.id, function(tab) {
-                var _rw = wot.ratingwindow;
-                try {
-                    if (tab.id == target.id) {
-                        // TODO: check whether target is changed. If not, then don't update
-                        _rw.current = data || {};
-                        _rw.updatecontents();
-                        _rw.update_categories();
-
-                        if (_rw.is_registered) {
-                            // ask server if there is my comment for the website
-                            _rw.comments.get_comment(data.target);
-                        } else {
-                            var bg = chrome.extension.getBackgroundPage();
-                            bg.wot.core.update_ratingwindow_comment(); // don't allow unregistered addons to comment
-                        }
+        var _rw = wot.ratingwindow;
+        try {
+            console.log(target, data);
+            data = JSON.parse(data);    // for safety
+            _rw.current = data || {};
+            _rw.updatecontents();
+            _rw.update_categories();
+
+            if (_rw.is_registered) {
+                // ask server if there is my comment for the website
+                _rw.comments.get_comment(data.target);
+            } else {
+                var bg = chrome.extension.getBackgroundPage();
+                bg.wot.core.update_ratingwindow_comment(); // don't allow unregistered addons to comment
+            }
 
-                        _rw.modes.reset();
-                        _rw.modes.auto();
-                    }
-                } catch (e) {
-                    console.log("ratingwindow.update: failed with ", e);
-                }
-            });
-        });
+            _rw.modes.reset();
+            _rw.modes.auto();
+        } catch (e) {
+            console.log("ratingwindow.update: failed with ", e);
+        }
     },
 
     update_comment: function (cached, local_comment, captcha_required) {
@@ -810,6 +775,7 @@ $.extend(wot, { ratingwindow: {
         } else {
             // try to get user's votes from cache (server response)
             voted = wot.select_voted(_rw.getcached().value.cats);
+            console.log(JSON.stringify(_rw.getcached().value.cats));
             for(cat in voted) {
                 if (voted[cat].v == 1) {
                     up_voted.push(_rw.build_voted_category_html(wot.get_category(cat), voted[cat].v));
@@ -1061,7 +1027,7 @@ $.extend(wot, { ratingwindow: {
         bg.wot.core.update(true);     // this starts main data initialization (e.g. before it, there is no "cached" data)
 
         var wt =     bg.wot.wt,
-            locale = bg.wot.i18n("locale");
+            locale = wot.i18n("locale");
 
         // Welcome Tip button "close"
         $(".wt-rw-close").click(function (e){
@@ -1079,7 +1045,7 @@ $.extend(wot, { ratingwindow: {
         $("#wt-learnmore-link").click(function (){
             var time_before_click = Math.round(wot.time_since(wot.ratingwindow.opened_time));
             wot.ga.fire_event(wot.ga.categories.WT, wot.ga.actions.WT_RW_LEARN, String(time_before_click));
-            bg.wot.core.open_mywot(wot.urls.tour_rw, wot.urls.contexts.wt_rw_lm);
+            bg.wot.core.open_mywot(wot.urls.tour_rw, wot.urls.contexts.wt_rw_lm); // FIXME
         });
 
         // TODO: uncomment and test after public beta launch:
@@ -1288,7 +1254,7 @@ $.extend(wot, { ratingwindow: {
 
             if (mode == "unrated") {
                 var cached = _rw.getcached();
-                if (cached.value && cached.value.target) {
+                if (_rw.state.target) {
                     $_ratingarea.attr("disabled", null);
                 } else {
                     $_ratingarea.attr("disabled", "disabled");
@@ -1396,7 +1362,9 @@ $.extend(wot, { ratingwindow: {
 
             activate: function () {
                 if (!wot.ratingwindow.modes._activate("rated")) return false;
+                console.log("Rated");
                 wot.ratingwindow.update_uservoted();
+                console.log("update_uservoted");
                 return true;
             }
         },
diff --git a/content/ui.js b/content/ui.js
index b2c3fb4..3abcace 100644
--- a/content/ui.js
+++ b/content/ui.js
@@ -220,7 +220,7 @@ var wot_ui = {
 		try {
 			wot_commands.update();
 			this.show_elements();
-			this.update_title(description);
+//			this.update_title(description);
 			this.update_rating();
 			this.update_testimonies();
 			this.update_scorecard();
@@ -231,27 +231,6 @@ var wot_ui = {
 		}
 	},
 
-	update_title: function(description) {
-		try {
-			var title_elem = this.getElem("wot-title-text"),
-                hostname_elem = this.getElem("wot-hostname-text");
-
-			if (title_elem && hostname_elem) {
-				if (wot_cache.isok(wot_core.hostname)) {
-					title_elem.value = wot_util.getstring("description_reputation");
-					title_elem.setAttribute("status", "target");
-                    hostname_elem.value = wot_shared.decodehostname(wot_core.hostname);
-				} else {
-					title_elem.value = description;
-					title_elem.setAttribute("status", "information");
-                    hostname_elem.value = "";
-				}
-			}
-		} catch (e) {
-			wdump("wot_ui.update_title: failed with " + e);
-		}
-	},
-
 	update_rating: function()
 	{
 		try {
diff --git a/skin/b/checkbox.png b/skin/b/checkbox.png
new file mode 100644
index 0000000..9966146
Binary files /dev/null and b/skin/b/checkbox.png differ
diff --git a/skin/b/delete-myrating.png b/skin/b/delete-myrating.png
new file mode 100644
index 0000000..02aeee5
Binary files /dev/null and b/skin/b/delete-myrating.png differ
diff --git a/skin/b/delete-testimony.png b/skin/b/delete-testimony.png
new file mode 100644
index 0000000..233d165
Binary files /dev/null and b/skin/b/delete-testimony.png differ
diff --git a/skin/b/hands_150dpi.png b/skin/b/hands_150dpi.png
new file mode 100644
index 0000000..29bda27
Binary files /dev/null and b/skin/b/hands_150dpi.png differ
diff --git a/skin/b/input-icons.png b/skin/b/input-icons.png
new file mode 100644
index 0000000..97613a4
Binary files /dev/null and b/skin/b/input-icons.png differ
diff --git a/skin/b/rep-explanation.png b/skin/b/rep-explanation.png
new file mode 100755
index 0000000..dd35b8f
Binary files /dev/null and b/skin/b/rep-explanation.png differ
diff --git a/skin/b/rep_symbol.png b/skin/b/rep_symbol.png
new file mode 100644
index 0000000..9a2826a
Binary files /dev/null and b/skin/b/rep_symbol.png differ
diff --git a/skin/b/slider handle.png b/skin/b/slider handle.png
new file mode 100644
index 0000000..41abc6f
Binary files /dev/null and b/skin/b/slider handle.png differ
diff --git a/skin/b/slider.png b/skin/b/slider.png
new file mode 100644
index 0000000..0dea6a1
Binary files /dev/null and b/skin/b/slider.png differ
diff --git a/skin/b/thumbs.png b/skin/b/thumbs.png
new file mode 100644
index 0000000..b3a67d7
Binary files /dev/null and b/skin/b/thumbs.png differ
diff --git a/skin/fusion/16_16/no_r0.png b/skin/fusion/16_16/r0.png
similarity index 100%
rename from skin/fusion/16_16/no_r0.png
rename to skin/fusion/16_16/r0.png
diff --git a/skin/fusion/logo.png b/skin/fusion/logo.png
index aba32ed..51c64be 100644
Binary files a/skin/fusion/logo.png and b/skin/fusion/logo.png differ
diff --git a/skin/include/popup.css b/skin/include/popup.css
index 0ad5ba4..a347670 100644
--- a/skin/include/popup.css
+++ b/skin/include/popup.css
@@ -21,7 +21,7 @@
     font-size: 11px;
     padding: 5px 5px;
     background-position: 6px 6px;
-    background-size: 26%;
+    background-size: 11%;
 }
 
 .wot-ratings {
diff --git a/skin/b/ratingwindow.css b/skin/ratingwindow.css
similarity index 94%
rename from skin/b/ratingwindow.css
rename to skin/ratingwindow.css
index b8fea7e..bf75662 100644
--- a/skin/b/ratingwindow.css
+++ b/skin/ratingwindow.css
@@ -21,8 +21,9 @@
 body {
     overflow: hidden;
     cursor: default;
-    -webkit-user-select: none;
+    -moz-user-select: none; /* FF specific */
     width: 580px;
+    margin: 0; /* FF specific */
 }
 
 #wot-ratingwindow {
@@ -57,7 +58,6 @@ body {
 /* height of rating area depends on the mode:
  low height (94px): unrated, rate
  high height: (122px): rated, commenting, thanks
-
  */
 .view-mode #ratings-area,
 .commenting #ratings-area {
@@ -86,7 +86,6 @@ body {
 #ratings-area[disabled=disabled],
 #ratings-area[disabled=disabled] .wot-rating-slider {
     filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+ */
-    -webkit-filter: grayscale(100%);
     opacity: 0.7;
 }
 
@@ -125,7 +124,7 @@ body {
     position: absolute;
     top: 2px;
     left: 0;
-    background: url("fusion/logo.png") top left no-repeat;
+    background: url("chrome://wot/skin/fusion/logo.png") top left no-repeat;
     cursor: pointer;
     display: inline-block;
     /*float: left;*/
@@ -197,11 +196,11 @@ body {
 }
 
 #wot-header-close:before {
-    -webkit-transform: rotate(45deg);
+    -moz-transform: rotate(45deg);
 }
 
 #wot-header-close:after {
-    -webkit-transform: rotate(135deg);
+    -moz-transform: rotate(135deg);
 }
 
 #wot-title-text {
@@ -224,7 +223,7 @@ body {
     font-size: 13px;
     font-weight: bold;
     overflow: hidden;
-    -webkit-user-select: text;
+    -moz-user-select: text;
     margin-top: 5px;
     display: block;
 }
@@ -293,7 +292,7 @@ body {
     margin-left: 16px;
     margin-right: 0;
     width: 240px;
-    -webkit-user-select: none;
+    -moz-user-select: none;
     top: 42px;
 }
 
@@ -318,7 +317,7 @@ body {
 #rated-votes:before {
     content: "";
     position: absolute;
-    background-image: url(../skin/b/input-icons.png);
+    background-image: url("chrome://wot/skin/b/input-icons.png");
     background-repeat: no-repeat;
     background-position: 0 0;
     background-size: 40px auto;
@@ -435,7 +434,7 @@ body {
 
 .hand-up .hand-icon,
 .hand-down .hand-icon {
-    background-image: url(../skin/b/thumbs.png);
+    background-image: url("chrome://wot/skin/b/thumbs.png");
     background-repeat: no-repeat;
     width: 12px;
     height: 14px;
@@ -493,7 +492,7 @@ body {
 
 .wot-rating-reputation {
     position: absolute;
-	background: url("b/donuts_150.png") top left no-repeat;
+	background: url("chrome://wot/skin/b/donuts_150.png") top left no-repeat;
     background-position: 0 -165px;
     background-size: 35px 198px;
 	height: 33px;
@@ -536,7 +535,7 @@ body {
     margin-left: 26px;
     margin-top: -2px;
     width: 34px;
-	background: url("b/confidence_150dpi.png") top left no-repeat;
+	background: url("chrome://wot/skin/b/confidence_150dpi.png") top left no-repeat;
     background-size: 33px auto;
     background-position: 0 -168px;
 }
@@ -564,7 +563,7 @@ body {
 .rating-legend-wrapper {
     position: absolute;
     margin: 3px 0 auto 75px;
-    background: url("b/bubl_speech_c_150.png")  top left repeat-x;
+    background: url("chrome://wot/skin/b/bubl_speech_c_150.png")  top left repeat-x;
     background-size: 1px 23px;
     height: 23px;
 }
@@ -575,7 +574,7 @@ body {
     height: 23px;
     width: 17px;
     margin-left: -17px;
-    background: url("b/bubl_speech_l_150.png") top left no-repeat;
+    background: url("chrome://wot/skin/b/bubl_speech_l_150.png") top left no-repeat;
     background-size: 17px 23px;
 }
 
@@ -585,7 +584,7 @@ body {
     height: 23px;
     width: 17px;
     right: -17px;
-    background: url("b/bubl_speech_r_150.png") top left no-repeat;
+    background: url("chrome://wot/skin/b/bubl_speech_r_150.png") top left no-repeat;
     background-size: 10px 23px;
     top: 0px;
 }
@@ -664,7 +663,7 @@ body {
     color: #919191;
     opacity: 0;
     display: none;
-    -webkit-transition: opacity 5.5s;
+    -moz-transition: opacity 5.5s;
 }
 
 /* show boundary labels only when rating bars are enabled */
@@ -710,7 +709,7 @@ body {
 }
 
 .wot-rating-slider {
-	background: url("b/slider.png") top left no-repeat;
+	background: url("chrome://wot/skin/b/slider.png") top left no-repeat;
     background-size: auto 216px;
     background-position: 0 -180px;
     display: block;
@@ -752,7 +751,7 @@ body {
 	width: 21px;
     float: left;
     position: relative;
-    background: url("b/slider%20handle.png") top left no-repeat;
+    background: url("chrome://wot/skin/b/slider%20handle.png") top left no-repeat;
     background-size: 21px auto;
     z-index: 5;
     left: 166px;
@@ -799,7 +798,7 @@ body {
     margin-right: 0;
     margin-top: 4px;
     width: 154px;
-    -webkit-transition: opacity 2.5s linear 2s;
+    -moz-transition: opacity 2.5s linear 2s;
 }
 
 .wot-rating-data:not([r]) .wot-rating-help {
@@ -867,7 +866,7 @@ body {
 
 .rating-delete-icon {
     position: relative;
-    background: url("b/delete-testimony.png") top left no-repeat;
+    background: url("chrome://wot/skin/b/delete-testimony.png") top left no-repeat;
     background-size: auto 18px;
     background-position: -34px 0;
     width: 18px;
@@ -980,7 +979,7 @@ body {
     min-height: 46px;
     line-height: 9px;
     column-count: 2;
-    -webkit-column-count: 2;
+    -moz-column-count: 2;
 }
 
 .cat-item {
@@ -1006,25 +1005,25 @@ body {
 
 .cat-item .ico.c-neutral {
     background-color: #707070;
-    background: -webkit-radial-gradient(center, ellipse cover, #9e9c9c 0%,#707070 100%); /* Chrome10+,Safari5.1+ */
+    background: -moz-radial-gradient(center, ellipse cover, #9e9c9c 0%,#707070 100%); /* Chrome10+,Safari5.1+ */
     border-color: #7d7d7d;
 }
 
 .cat-item .ico.c-questionable {
     background-color: #ffd100;
-    background: -webkit-radial-gradient(center, ellipse cover, #f8df68 0%,#f6cd0e 100%); /* Chrome10+,Safari5.1+ */
+    background: -moz-radial-gradient(center, ellipse cover, #f8df68 0%,#f6cd0e 100%); /* Chrome10+,Safari5.1+ */
     border-color: #f6cd0e;
 }
 
 .cat-item .ico.c-negative {
     background-color: #f66d3f;
-    background: -webkit-radial-gradient(center, ellipse cover, #fca080 0%,#f77448 100%); /* Chrome10+,Safari5.1+ */
+    background: -moz-radial-gradient(center, ellipse cover, #fca080 0%,#f77448 100%); /* Chrome10+,Safari5.1+ */
     border-color: #f66d3f;
 }
 
 .cat-item .ico.c-positive {
     background-color: #68c800;
-    background: -webkit-radial-gradient(center, ellipse cover, #83d561 0%,#6dc14a 100%); /* Chrome10+,Safari5.1+ */
+    background: -moz-radial-gradient(center, ellipse cover, #83d561 0%,#6dc14a 100%); /* Chrome10+,Safari5.1+ */
     border-color: #6dc14a;
 }
 
@@ -1288,7 +1287,7 @@ body {
     font-size: 12px;
     font-weight: bold;
     color: #585858;
-    background-image: -webkit-linear-gradient(top, #FFF 0%, #e7e5e5 100%);
+    background-image: -moz-linear-gradient(top, #FFF 0%, #e7e5e5 100%);
     box-shadow: 1px 1px 5px #D2D2D2;
     text-shadow: 1px 1px rgba(255,255,255,0.75);
     cursor: pointer;
@@ -1300,7 +1299,7 @@ body {
 }
 
 .rw-button:not(.disabled):hover {
-    background-image: -webkit-linear-gradient(top, #FFF 0%,#dadada 83%, #f3f1f1 100%);
+    background-image: -moz-linear-gradient(top, #FFF 0%,#dadada 83%, #f3f1f1 100%);
     /*color: #6aac43;*/
 }
 
@@ -1318,7 +1317,7 @@ body {
 .btn-delete_icon {
     height: 18px;
     width: 18px;
-    background: url("b/delete-myrating.png") top left no-repeat;
+    background: url("chrome://wot/skin/b/delete-myrating.png") top left no-repeat;
     background-size: auto 18px;
     float: left;
     margin-right: 4px;
@@ -1569,11 +1568,11 @@ body {
 }
 
 .category-selector .delete-icon:before {
-    -webkit-transform: rotate(45deg);
+    -moz-transform: rotate(45deg);
 }
 
 .category-selector .delete-icon:after {
-    -webkit-transform: rotate(135deg);
+    -moz-transform: rotate(135deg);
 }
 
 
@@ -1623,7 +1622,7 @@ input[type=checkbox].css-checkbox:checked + label.css-label {
     background-position: 0 -15px;
 }
 
-.css-label { background-image:url(b/checkbox.png); }
+.css-label { background-image:url("chrome://wot/skin/b/checkbox.png"); }
 
 .cat-full-list {
     margin: 1em 0.5em;
diff --git a/skin/wot.css b/skin/wot.css
index 2b26d27..845fe9f 100644
--- a/skin/wot.css
+++ b/skin/wot.css
@@ -58,7 +58,7 @@
 	list-style-image: url("chrome://wot/skin/fusion/16_16/no_rep_calculated.png");
 }
 #main-window[wot-status="nohost-update"] toolbar[iconsize="small"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/16_16/message_no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/16_16/message_r0.png");
 }
 #main-window[wot-status="notready"] toolbar[iconsize="small"] #wot-button {
 	list-style-image: url("chrome://wot/skin/fusion/16_16/getting_info.png");
@@ -82,11 +82,11 @@
 }
 #main-window[wot-status="0"] toolbar[iconsize="small"] #wot-button,
 #main-window[wot-status="0-testimony"] toolbar[iconsize="small"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/16_16/no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/16_16/r0.png");
 }
 #main-window[wot-status="0-testimony-update"] toolbar[iconsize="small"] #wot-button,
 #main-window[wot-status="0-update"] toolbar[iconsize="small"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/16_16/message_no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/16_16/message_r0.png");
 }
 #main-window[wot-status="excluded"] toolbar[iconsize="small"] #wot-button,
 #main-window[wot-status="excluded-testimony"] toolbar[iconsize="small"] #wot-button,
@@ -155,7 +155,7 @@
 	list-style-image: url("chrome://wot/skin/fusion/accessible/16_16/no_rep_calculated.png");
 }
 #main-window[wot-mode="accessible"][wot-status="nohost-update"] toolbar[iconsize="small"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/accessible/16_16/message_no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/accessible/16_16/message_r0.png");
 }
 #main-window[wot-mode="accessible"][wot-status="notready"] toolbar[iconsize="small"] #wot-button {
 	list-style-image: url("chrome://wot/skin/fusion/accessible/16_16/getting_info.png");
@@ -179,11 +179,11 @@
 }
 #main-window[wot-mode="accessible"][wot-status="0"] toolbar[iconsize="small"] #wot-button,
 #main-window[wot-mode="accessible"][wot-status="0-testimony"] toolbar[iconsize="small"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/accessible/16_16/no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/accessible/16_16/r0.png");
 }
 #main-window[wot-mode="accessible"][wot-status="0-testimony-update"] toolbar[iconsize="small"] #wot-button,
 #main-window[wot-mode="accessible"][wot-status="0-update"] toolbar[iconsize="small"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/accessible/16_16/message_no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/accessible/16_16/message_r0.png");
 }
 #main-window[wot-mode="accessible"][wot-status="excluded"] toolbar[iconsize="small"] #wot-button,
 #main-window[wot-mode="accessible"][wot-status="excluded-testimony"] toolbar[iconsize="small"] #wot-button,
@@ -252,7 +252,7 @@
 	list-style-image: url("chrome://wot/skin/fusion/24_24/no_rep_calculated.png");
 }
 #main-window[wot-status="nohost-update"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/24_24/message_no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/24_24/message_r0.png");
 }
 #main-window[wot-status="notready"] #wot-button {
 	list-style-image: url("chrome://wot/skin/fusion/24_24/getting_info.png");
@@ -276,11 +276,11 @@
 }
 #main-window[wot-status="0"] #wot-button,
 #main-window[wot-status="0-testimony"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/24_24/no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/24_24/r0.png");
 }
 #main-window[wot-status="0-testimony-update"] #wot-button,
 #main-window[wot-status="0-update"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/24_24/message_no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/24_24/message_r0.png");
 }
 #main-window[wot-status="excluded"] #wot-button,
 #main-window[wot-status="excluded-testimony"] #wot-button,
@@ -349,7 +349,7 @@
 	list-style-image: url("chrome://wot/skin/fusion/accessible/24_24/no_rep_calculated.png");
 }
 #main-window[wot-mode="accessible"][wot-status="nohost-update"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/accessible/24_24/message_no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/accessible/24_24/message_r0.png");
 }
 #main-window[wot-mode="accessible"][wot-status="notready"] #wot-button {
 	list-style-image: url("chrome://wot/skin/fusion/accessible/24_24/getting_info.png");
@@ -373,11 +373,11 @@
 }
 #main-window[wot-mode="accessible"][wot-status="0"] #wot-button,
 #main-window[wot-mode="accessible"][wot-status="0-testimony"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/accessible/24_24/no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/accessible/24_24/r0.png");
 }
 #main-window[wot-mode="accessible"][wot-status="0-testimony-update"] #wot-button,
 #main-window[wot-mode="accessible"][wot-status="0-update"] #wot-button {
-	list-style-image: url("chrome://wot/skin/fusion/accessible/24_24/message_no_rep_available.png");
+	list-style-image: url("chrome://wot/skin/fusion/accessible/24_24/message_r0.png");
 }
 #main-window[wot-mode="accessible"][wot-status="excluded"] #wot-button,
 #main-window[wot-mode="accessible"][wot-status="excluded-testimony"] #wot-button,
@@ -395,12 +395,21 @@
 
 /* rating window */
 #wot-popup {
+    background: #ffffff !important;
+    opacity: 1;
 	padding: 0;
 	margin: 0;
 	font-family: Tahoma, Arial, sans-serif;
     width: 580px;
-    height: 390px;
+    height: 426px;
+    overflow: hidden;
 }
+
+#wot-rwframe {
+    background: #ffffff !important;
+    opacity: 1;
+}
+
 #wot-elements {
 	background: #ffffff;
 	width: 580px;
@@ -574,7 +583,7 @@
 	background: url("chrome://wot/skin/fusion/28_28/r5.png") top left no-repeat;
 }
 .wot-rating-reputation[reputation="0"] {
-	background: url("chrome://wot/skin/fusion/28_28/no_rep_available.png") top left no-repeat;
+	background: url("chrome://wot/skin/fusion/28_28/r0.png") top left no-repeat;
 }
 .wot-rating-reputation[reputation="excluded"] {
 	background: url("chrome://wot/skin/fusion/28_28/excluded.png") top left no-repeat;
@@ -598,7 +607,7 @@
 	background: url("chrome://wot/skin/fusion/accessible/28_28/r5.png") top left no-repeat;
 }
 #main-window[wot-mode="accessible"] .wot-rating-reputation[reputation="0"] {
-	background: url("chrome://wot/skin/fusion/accessible/28_28/no_rep_available.png") top left no-repeat;
+	background: url("chrome://wot/skin/fusion/accessible/28_28/r0.png") top left no-repeat;
 }
 #main-window[wot-mode="accessible"] .wot-rating-reputation[reputation="excluded"] {
 	background: url("chrome://wot/skin/fusion/28_28/excluded.png") top left no-repeat;

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