[Pkg-mozext-commits] [wot] 131/226: - Don't submit comment if only votes were changed; - Added other locales to the manifest; - Show full length text of invitation to pick a category; - minor cleaning of the code;

David Prévot taffit at moszumanska.debian.org
Fri May 1 00:35:43 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 ae5885960af8bfa58ffcf3477edf6554ad0ee969
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date:   Mon Sep 2 13:25:45 2013 +0300

    - Don't submit comment if only votes were changed;
    - Added other locales to the manifest;
    - Show full length text of invitation to pick a category;
    - minor cleaning of the code;
---
 chrome.manifest            | 15 +++++++++++++++
 content/rw/ratingwindow.js | 19 ++++++++++---------
 2 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/chrome.manifest b/chrome.manifest
index 424c323..011633f 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -5,5 +5,20 @@ overlay	chrome://browser/content/browser.xul	chrome://wot/content/overlay.xul
 overlay	chrome://navigator/content/navigatorOverlay.xul	chrome://wot/content/overlay.xul
 locale	wot	en-US	locale/en-US/
 locale	wot	ru-RU	locale/ru-RU/
+locale	wot	cs-CZ	locale/cs-CZ/
+locale	wot	de-DE	locale/de-DE/
+locale	wot	fi-FI	locale/fi-FI/
+locale	wot	pl-PL	locale/pl-PL/
+locale	wot	sv-SE	locale/sv-SE/
+locale	wot	it-IT	locale/it-IT/
+locale	wot	fr-FR	locale/fr-FR/
+locale	wot	pt-BR	locale/pt-BR/
+locale	wot	es-ES	locale/es-ES/
+locale	wot	ja-JP	locale/ja-JP/
+locale	wot	ko-KR	locale/ko-KR/
+locale	wot	zh-CN	locale/zh-CN/
+locale	wot	zh-TW	locale/zh-TW/
+locale	wot	uk-UA	locale/uk-UA/
+locale	wot	tr-TR	locale/tr-TR/
 skin	wot	classic/1.0	skin/
 style	chrome://global/content/customizeToolbar.xul	chrome://wot/skin/toolbar.css
diff --git a/content/rw/ratingwindow.js b/content/rw/ratingwindow.js
index 3a3cf07..532c5b0 100644
--- a/content/rw/ratingwindow.js
+++ b/content/rw/ratingwindow.js
@@ -271,7 +271,8 @@ $.extend(wot, { ratingwindow: {
                 }
 
             } else { // User clicked Save
-                if ((comment_changed || votes_changed) && has_up_votes) {
+                // TODO: make it so, that if votes were changed and user have seen the comment, then submit the comment
+                if (comment_changed && has_up_votes) {
                     // Comment should be submitted, if (either comment OR categories votes were changed) AND at least one up vote is given
                     if (has_comment) {
 //                        bg.console.log("SUBMIT COMMENT");
@@ -487,8 +488,6 @@ $.extend(wot, { ratingwindow: {
             $("#wot-user-0").css("display", "block");
         }
 
-        /* partner */
-        $("#wot-partner").attr("partner", wot.partner || "");
     },
 
     insert_categories: function (cat_list, $_target) {
@@ -770,6 +769,7 @@ $.extend(wot, { ratingwindow: {
             cat = null,
             $_change = $("#change-ratings"),
             $_voted_content = $("#voted-categories-content"),
+            $_voted_categories = $("#voted-categories"),
             change_link_text = "";
 
         // try to get user's votes from the category selector (if there are any)
@@ -799,6 +799,8 @@ $.extend(wot, { ratingwindow: {
 
         if (up_voted.length > 0) {
 
+            $_voted_categories.removeClass("wider");
+
             up_voted.forEach(function(elem) {
                 $_voted_content.append(elem);
             });
@@ -817,13 +819,14 @@ $.extend(wot, { ratingwindow: {
 
             change_link_text = wot.i18n("ratingwindow", "rerate_change");
         } else {
-            res = wot.i18n("ratingwindow", "novoted");
-            $_voted_content.text(res);
-            change_link_text = wot.i18n("ratingwindow", "rerate_category");
+            $_voted_categories.addClass("wider");
+            $_voted_content.text(wot.i18n("ratingwindow", "novoted"));
+            change_link_text = "";
         }
 
         $("#rated-votes").toggleClass("voted", (up_voted.length > 0));
         $_change.text(change_link_text);
+        $_change.toggle(change_link_text && change_link_text.length > 0);
     },
 
     has_1upvote: function (votes_obj) {
@@ -1130,8 +1133,6 @@ $.extend(wot, { ratingwindow: {
             _rw.rate_control.updateratings(_rw.state[a]);  // restore user's testimonies visually
         });
 
-        _rw.get_bg().console.log(_rw.state);
-
         _rw.cat_selector.init_voted(); // restore previous votes
 
         bg.wot.keeper.remove_comment(_rw.state.target); // remove locally saved comment
@@ -1948,7 +1949,7 @@ $.extend(wot, { ratingwindow: {
             var bg = wot.ratingwindow.get_bg(),
                 bgwot = bg.wot;
 
-            bg.console.log("RW: wot.ratingwindow.comments.get_comment(target)", target);
+//            bg.console.log("RW: wot.ratingwindow.comments.get_comment(target)", target);
 
             bgwot.api.comments.get(target);
         },

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