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) {
*/
- if (typeof __ != 'undefined') {
- msg = __(msg);
- }
+ msg = __(msg);
if (n_type == 1) {
n.className = "notify";
} else if (n_type == 2) {
- n.className = "notifyProgress";
- msg = "<img src='"+getInitParam("sign_progress")+"'> " + msg;
+ n.className = "notify progress";
+ msg = "<img src='images/indicator_white.gif'> " + msg;
} else if (n_type == 3) {
- n.className = "notifyError";
- msg = "<img src='"+getInitParam("sign_excl")+"'> " + msg;
+ n.className = "notify error";
+ msg = "<img src='images/sign_excl.svg'> " + msg;
} else if (n_type == 4) {
- n.className = "notifyInfo";
- msg = "<img src='"+getInitParam("sign_info")+"'> " + msg;
+ n.className = "notify info";
+ msg = "<img src='images/sign_info.svg'> " + msg;
}
-// msg = "<img src='images/live_com_loading.gif'> " + msg;
-
if (no_hide) {
- msg += " (<a href='#' onclick=\"notify('')\">X</a>)";
+ msg += " <span>(<a href='#' onclick=\"notify('')\">" +
+ __("close") + "</a>)</span>";
}
+// msg = "<img src='images/live_com_loading.gif'> " + msg;
+
nb.innerHTML = msg;
if (!no_hide) {
}
}
-function hideAuxDlg() {
- try {
- Element.hide('auxDlg');
- } catch (e) {
- exception_error("hideAuxDlg", e);
- }
-}
-
-
function uploadIconHandler(rc) {
try {
switch (rc) {
var lh = dojo.connect(dialog, "onLoad", function(){
dojo.disconnect(lh);
- var title = $("PTITLE-FULL-" + getActiveArticleId());
+ var query = "op=rpc&method=getlinktitlebyid&id=" + getActiveArticleId();
- if (title || getActiveFeedId() || activeFeedIsCat()) {
- if (title) title = title.innerHTML;
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ var reply = JSON.parse(transport.responseText);
- console.log(title + " " + getActiveFeedId());
+ var title = false;
- var feed_id = activeFeedIsCat() ? 'CAT:' + parseInt(getActiveFeedId()) :
- getActiveFeedId();
+ if (reply && reply) title = reply.title;
- var rule = { reg_exp: title, feed_id: feed_id, filter_type: 1 };
+ if (title || getActiveFeedId() || activeFeedIsCat()) {
+
+ console.log(title + " " + getActiveFeedId());
+
+ var feed_id = activeFeedIsCat() ? 'CAT:' + parseInt(getActiveFeedId()) :
+ getActiveFeedId();
+
+ var rule = { reg_exp: title, feed_id: feed_id, filter_type: 1 };
+
+ addFilterRule(null, dojo.toJson(rule));
+ }
+
+ } });
- addFilterRule(null, dojo.toJson(rule));
- }
});
}
for (k in params) {
var v = params[k];
console.log("IP: " + k + " => " + v);
+
+ if (k == "label_base_index") _label_base_index = parseInt(v);
}
}
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);
+}
+