[Pkg-mozext-commits] [wot] 184/226: Fixes #76 No categories to pick if only CS rated
David Prévot
taffit at moszumanska.debian.org
Fri May 1 00:35:49 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 01a80965fd71cfd462b4f8dba2b85807ab8d3edc
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date: Mon Oct 28 14:07:56 2013 +0200
Fixes #76 No categories to pick if only CS rated
---
content/rw/proxies.js | 2 ++
content/rw/ratingwindow.js | 28 +++++++++++++---------------
content/rw/wot.js | 12 ++++++------
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/content/rw/proxies.js b/content/rw/proxies.js
index 0f2e9e7..30320f1 100644
--- a/content/rw/proxies.js
+++ b/content/rw/proxies.js
@@ -202,6 +202,8 @@ $.extend(wot_bg.wot, wot, {
wt: { // Welcome Tips proxy wrapper
+ activity_score_max: 1500,
+
settings: {
rw_ok: false,
rw_shown: 0,
diff --git a/content/rw/ratingwindow.js b/content/rw/ratingwindow.js
index 4a96d82..149ab7b 100644
--- a/content/rw/ratingwindow.js
+++ b/content/rw/ratingwindow.js
@@ -30,7 +30,6 @@ $.extend(wot, { ratingwindow: {
is_registered: false, // whether user has an account on mywot.com
delete_action: false, // remembers whether user is deleting rating
prefs: {}, // shortcut for background preferences
- UPDATE_ROUND: 3, // = 3 version when we launched WOT 2.0 in September 2013
get_bg: function () {
// just a shortcut
@@ -91,7 +90,7 @@ $.extend(wot, { ratingwindow: {
}
/* remember previous state */
- _this.state = $.extend(state, _this.state);
+ _this.state = $.extend(state, _this.state);
_this.cat_selector.init_voted(data.value.cats); // re-build user votes with new data
return was_target_changed;
},
@@ -249,8 +248,7 @@ $.extend(wot, { ratingwindow: {
wot.components.forEach(function(item) {
if (rw.state[item.name]) {
- params["testimony_" + item.name] =
- rw.state[item.name].t;
+ params["testimony_" + item.name] = rw.state[item.name].t;
}
});
@@ -781,9 +779,9 @@ $.extend(wot, { ratingwindow: {
$_cat_wrapper.addClass(vote == 1 ? "hand-up" : "hand-down");
$_hand.addClass(vote == 1 ? "hand-up" : "hand-down");
- if (vote == 1) {
- $_hand.addClass(wot.get_category_css(category.id));
- }
+ if (vote == 1) {
+ $_hand.addClass(wot.get_category_css(category.id));
+ }
$_hand.attr("title", wot.i18n("ratingwindow", vote == 1 ? "vote_yes" : "vote_no"));
$_cat_text.attr("title", cat_name);
$_cat_text.text(cat_name);
@@ -1080,11 +1078,11 @@ $.extend(wot, { ratingwindow: {
bg.wot.core.open_mywot(wot.urls.tour_rw, wot.urls.contexts.wt_rw_lm); // FIXME
});
- var tts_wtip = (first_opening || wot.firstrunupdate == _rw.UPDATE_ROUND) &&
+ var tts_wtip = first_opening &&
!(wt.settings.rw_ok || wt.settings.rw_shown > 0) &&
wot.is_defined(["rw_text", "rw_text_hdr"], "wt");
-// tts_wtip = tts_wtip && (wot.get_activity_score() < bg.wot.wt.activity_score_max || wot.firstrunupdate == _rw.UPDATE_ROUND);
+ tts_wtip = tts_wtip && (wot.get_activity_score() < bg.wot.wt.activity_score_max);
if (bg.wot.prefs.get("super_wtips")) tts_wtip = true; // override by super-setting
@@ -1882,12 +1880,12 @@ $.extend(wot, { ratingwindow: {
cached = {},
cats_object = {};
- if (!cats || wot.utils.isEmptyObject(cats)) {
- cached = _rw.getcached();
- cats_object = (cached && cached.value && cached.value.cats) ? cached.value.cats : {};
- } else {
- cats_object = cats;
- }
+ if (!cats || wot.utils.isEmptyObject(cats)) {
+ cached = _rw.getcached();
+ cats_object = (cached && cached.value && cached.value.cats) ? cached.value.cats : {};
+ } else {
+ cats_object = cats;
+ }
_this.votes = wot.select_voted(cats_object);
_this.markup_voted();
diff --git a/content/rw/wot.js b/content/rw/wot.js
index 5de4f56..5c5fdab 100644
--- a/content/rw/wot.js
+++ b/content/rw/wot.js
@@ -114,7 +114,7 @@ var wot = {
base: "http://www.mywot.com/",
scorecard: "http://www.mywot.com/scorecard/",
settings: "http://www.mywot.com/settings",
- profile: "http://www.mywot.com/user",
+ profile: "http://www.mywot.com/user",
signup: "https://www.mywot.com/signup",
welcome: "http://www.mywot.com/settings/welcome",
setcookies: "http://www.mywot.com/setcookies.php",
@@ -380,13 +380,11 @@ var wot = {
data.message = name + ":" + message;
this.log("post: posting " + data.message + "\n");
port.postMessage(data);
+ } else {
+ console.warn("Can't find port to send message", name, message, data);
}
},
- is_allowed_sender: function(sender_id) {
- return wot.allowed_senders[sender_id] || wot.debug; // allow known senders or any in
- },
-
/* i18n */
i18n: function(category, id, shorter)
@@ -631,6 +629,8 @@ var wot = {
if(wot.env.is_mailru) {
// set param to label requests
wot.partner = "mailru";
+ } else if (wot.env.is_yandex) {
+ wot.partner = "yandex";
}
if(!readonly) wot.prefs.set("partner", wot.partner);
@@ -885,7 +885,7 @@ var wot = {
if (!grp.omnipresent && !type) { // skip only omnipresent, and if type is not set
var tmin = grp.tmin !== null ? grp.tmin : -1,
tmax = grp.tmax !== null ? grp.tmax : -1;
- if ((t0 == -1 && grp.dynamic) || (t0 >= tmin && t0 <= tmax)) {
+ if (t0 == -1 || (t0 >= tmin && t0 <= tmax)) {
return grp;
}
}
--
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