X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=js%2Ffunctions.js;h=7da9abfbd636589861593ccca843ad4f625197d6;hb=f820f205d0ec1c5ce9027e49755fc8642b0c5b42;hp=a9367da60704e4f14c00794adf087a135d3cfb9d;hpb=6ef8ec84cb66b053edf84e8738a04089f8ca1b07;p=tt-rss.git
diff --git a/js/functions.js b/js/functions.js
index a9367da6..7da9abfb 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -2,6 +2,7 @@ var notify_silent = false;
var loading_progress = 0;
var sanity_check_done = false;
var init_params = {};
+var _label_base_index = -1024;
Ajax.Base.prototype.initialize = Ajax.Base.prototype.initialize.wrap(
function (callOriginal, options) {
@@ -193,30 +194,29 @@ function notify_real(msg, no_hide, n_type) {
*/
- if (typeof __ != 'undefined') {
- msg = __(msg);
- }
+ msg = __(msg);
if (n_type == 1) {
n.className = "notify";
} else if (n_type == 2) {
- n.className = "notifyProgress";
+ n.className = "notify progress";
msg = " " + msg;
} else if (n_type == 3) {
- n.className = "notifyError";
+ n.className = "notify error";
msg = " " + msg;
} else if (n_type == 4) {
- n.className = "notifyInfo";
+ n.className = "notify info";
msg = " " + msg;
}
-// msg = " " + msg;
-
if (no_hide) {
- msg += " (X)";
+ msg += " (" +
+ __("close") + ")";
}
+// msg = " " + msg;
+
nb.innerHTML = msg;
if (!no_hide) {
@@ -717,15 +717,6 @@ function hotkey_prefix_timeout() {
}
}
-function hideAuxDlg() {
- try {
- Element.hide('auxDlg');
- } catch (e) {
- exception_error("hideAuxDlg", e);
- }
-}
-
-
function uploadIconHandler(rc) {
try {
switch (rc) {
@@ -1338,6 +1329,8 @@ function backend_sanity_check_callback(transport) {
for (k in params) {
var v = params[k];
console.log("IP: " + k + " => " + v);
+
+ if (k == "label_base_index") _label_base_index = parseInt(v);
}
}
@@ -1986,3 +1979,13 @@ function htmlspecialchars_decode (string, quote_style) {
return string;
}
+
+
+function label_to_feed_id(label) {
+ return _label_base_index - 1 - Math.abs(label);
+}
+
+function feed_to_label_id(feed) {
+ return _label_base_index - 1 + Math.abs(feed);
+}
+