2010-09-09 12:50:10 +00:00
|
|
|
var last_feeds = [];
|
|
|
|
|
2010-09-09 17:44:04 +00:00
|
|
|
var _active_feed_id = false;
|
|
|
|
var _active_feed_offset = false;
|
2010-09-10 09:59:21 +00:00
|
|
|
var _update_timeout = false;
|
2010-09-09 17:44:04 +00:00
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
function catchup_article(article_id, callback) {
|
|
|
|
try {
|
|
|
|
var query = "?op=rpc&subop=catchupSelected" +
|
|
|
|
"&cmode=0&ids=" + article_id;
|
|
|
|
|
|
|
|
new Ajax.Request("backend.php", {
|
|
|
|
parameters: query,
|
|
|
|
onComplete: function(transport) {
|
|
|
|
if (callback) callback(transport);
|
|
|
|
} });
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("catchup_article", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_selected_feed(feed_id) {
|
2010-09-11 07:33:47 +00:00
|
|
|
try {
|
|
|
|
var feeds = $("feeds-content").getElementsByTagName("LI");
|
|
|
|
|
|
|
|
for (var i = 0; i < feeds.length; i++) {
|
|
|
|
if (feeds[i].id == "F-" + feed_id)
|
|
|
|
feeds[i].className = "selected";
|
|
|
|
else
|
|
|
|
feeds[i].className = "";
|
|
|
|
}
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
_active_feed_id = feed_id;
|
|
|
|
|
2010-09-11 07:33:47 +00:00
|
|
|
} catch (e) {
|
|
|
|
exception_error("mark_selected_feed", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-10 09:59:21 +00:00
|
|
|
function zoom(article_id) {
|
2010-09-09 18:01:35 +00:00
|
|
|
try {
|
2010-09-10 09:59:21 +00:00
|
|
|
var elem = $('A-' + article_id);
|
2010-09-09 18:01:35 +00:00
|
|
|
|
2010-09-10 09:59:21 +00:00
|
|
|
if (elem) {
|
|
|
|
var divs = elem.getElementsByTagName('DIV');
|
|
|
|
|
|
|
|
for (var i = 0; i < divs.length; i++) {
|
|
|
|
if (divs[i].className == 'excerpt')
|
|
|
|
Element.hide(divs[i]);
|
|
|
|
|
|
|
|
if (divs[i].className == 'content')
|
|
|
|
Element.show(divs[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
catchup_article(article_id,
|
|
|
|
function() { update(); });
|
2010-09-10 09:59:21 +00:00
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("zoom", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function load_more() {
|
|
|
|
try {
|
|
|
|
viewfeed(_active_feed_id, _active_feed_offset + 10);
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("load_more", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function update() {
|
|
|
|
try {
|
2010-09-11 11:25:47 +00:00
|
|
|
console.log('updating feeds...');
|
|
|
|
|
|
|
|
window.clearTimeout(_update_timeout);
|
|
|
|
|
|
|
|
new Ajax.Request("backend.php", {
|
|
|
|
parameters: "?op=rpc&subop=digest-init",
|
|
|
|
onComplete: function(transport) {
|
|
|
|
parse_feeds(transport);
|
|
|
|
set_selected_feed(_active_feed_id);
|
|
|
|
} });
|
|
|
|
|
|
|
|
_update_timeout = window.setTimeout('update()', 5*1000);
|
2010-09-10 09:59:21 +00:00
|
|
|
} catch (e) {
|
|
|
|
exception_error("update", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
function remove_headline_entry(article_id) {
|
2010-09-10 09:59:21 +00:00
|
|
|
try {
|
|
|
|
var elem = $('A-' + article_id);
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
if (elem) {
|
|
|
|
elem.parentNode.removeChild(elem);
|
|
|
|
}
|
2010-09-10 09:59:21 +00:00
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
} catch (e) {
|
|
|
|
exception_error("remove_headline_entry", e);
|
|
|
|
}
|
|
|
|
}
|
2010-09-10 09:59:21 +00:00
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
function view(article_id, dismiss_only) {
|
|
|
|
try {
|
|
|
|
remove_headline_entry(article_id);
|
2010-09-10 09:59:21 +00:00
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
catchup_article(article_id,
|
|
|
|
function() { update(); });
|
2010-09-10 09:59:21 +00:00
|
|
|
|
|
|
|
return dismiss_only != true;
|
2010-09-09 18:01:35 +00:00
|
|
|
} catch (e) {
|
|
|
|
exception_error("view", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-09 17:44:04 +00:00
|
|
|
function viewfeed(feed_id, offset) {
|
2010-09-09 15:02:12 +00:00
|
|
|
try {
|
|
|
|
|
2010-09-09 17:44:04 +00:00
|
|
|
if (!feed_id) feed_id = _active_feed_id;
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
if (!offset) {
|
2010-09-09 17:44:04 +00:00
|
|
|
offset = 0;
|
2010-09-11 11:25:47 +00:00
|
|
|
} else {
|
2010-09-09 17:44:04 +00:00
|
|
|
offset = _active_feed_offset + offset;
|
2010-09-11 11:25:47 +00:00
|
|
|
}
|
2010-09-09 17:44:04 +00:00
|
|
|
|
|
|
|
var query = "backend.php?op=rpc&subop=digest-update&feed_id=" + feed_id +
|
|
|
|
"&offset=" + offset;
|
|
|
|
|
2010-09-09 15:02:12 +00:00
|
|
|
new Ajax.Request("backend.php", {
|
2010-09-09 17:44:04 +00:00
|
|
|
parameters: query,
|
2010-09-09 15:02:12 +00:00
|
|
|
onComplete: function(transport) {
|
2010-09-11 11:25:47 +00:00
|
|
|
parse_headlines(transport, offset == 0);
|
|
|
|
set_selected_feed(feed_id);
|
2010-09-09 17:44:04 +00:00
|
|
|
_active_feed_offset = offset;
|
2010-09-11 07:33:47 +00:00
|
|
|
} });
|
2010-09-09 15:02:12 +00:00
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("view", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-10 09:59:21 +00:00
|
|
|
function find_article(articles, article_id) {
|
|
|
|
try {
|
|
|
|
for (var i = 0; i < articles.length; i++) {
|
|
|
|
if (articles[i].id == article_id)
|
|
|
|
return articles[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("find_article", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-09 12:50:10 +00:00
|
|
|
function find_feed(feeds, feed_id) {
|
|
|
|
try {
|
|
|
|
for (var i = 0; i < feeds.length; i++) {
|
|
|
|
if (feeds[i].id == feed_id)
|
|
|
|
return feeds[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("find_feed", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-09 15:02:12 +00:00
|
|
|
function get_feed_icon(feed) {
|
|
|
|
try {
|
|
|
|
if (feed.has_icon)
|
|
|
|
return 'icons/' + feed.id + '.ico';
|
|
|
|
|
|
|
|
if (feed.id == -1)
|
|
|
|
return 'images/mark_set.png';
|
|
|
|
|
|
|
|
if (feed.id == -2)
|
|
|
|
return 'images/pub_set.png';
|
|
|
|
|
|
|
|
if (feed.id == -3)
|
|
|
|
return 'images/fresh.png';
|
|
|
|
|
|
|
|
if (feed.id == -4)
|
|
|
|
return 'images/tag.png';
|
|
|
|
|
|
|
|
if (feed.id < -10)
|
|
|
|
return 'images/label.png';
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
return 'images/blank_icon.gif';
|
|
|
|
|
2010-09-09 15:02:12 +00:00
|
|
|
} catch (e) {
|
|
|
|
exception_error("get_feed_icon", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-09 12:50:10 +00:00
|
|
|
function add_feed_entry(feed) {
|
|
|
|
try {
|
|
|
|
var icon_part = "";
|
|
|
|
|
2010-09-09 15:02:12 +00:00
|
|
|
icon_part = "<img src='" + get_feed_icon(feed) + "'/>";
|
2010-09-09 12:50:10 +00:00
|
|
|
|
2010-09-11 07:33:47 +00:00
|
|
|
var tmp_html = "<li id=\"F-"+feed.id+"\">" +
|
2010-09-09 12:50:10 +00:00
|
|
|
icon_part +
|
2010-09-09 17:44:04 +00:00
|
|
|
"<a href=\"#\" onclick=\"viewfeed("+feed.id+")\">" + feed.title +
|
2010-09-09 12:50:10 +00:00
|
|
|
"<div class='unread-ctr'>" + feed.unread + "</div>" +
|
|
|
|
"</li>";
|
|
|
|
|
|
|
|
$("feeds-content").innerHTML += tmp_html;
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("add_feed_entry", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function add_headline_entry(article, feed) {
|
|
|
|
try {
|
|
|
|
|
|
|
|
var icon_part = "";
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
icon_part = "<img class='icon' src='" + get_feed_icon(feed) + "'/>";
|
2010-09-09 12:50:10 +00:00
|
|
|
|
2010-09-09 18:01:35 +00:00
|
|
|
var tmp_html = "<li id=\"A-"+article.id+"\">" +
|
2010-09-09 12:50:10 +00:00
|
|
|
icon_part +
|
2010-09-10 13:45:59 +00:00
|
|
|
"<div class='digest-check'>" +
|
|
|
|
"<img title='Set starred' onclick=\"toggleMark(this, "+article.id+")\" src='images/mark_unset.png'>" +
|
|
|
|
"<img title='Set published' onclick=\"togglePub(this, "+article.id+")\" src='images/pub_unset.png'>" +
|
2010-09-10 09:59:21 +00:00
|
|
|
"<img title='Dismiss' onclick=\"view("+article.id+", true)\" class='digest-check' src='images/digest_checkbox.png'>" +
|
2010-09-10 13:45:59 +00:00
|
|
|
"</div>" +
|
2010-09-09 18:01:35 +00:00
|
|
|
"<a target=\"_blank\" href=\""+article.link+"\""+
|
|
|
|
"onclick=\"return view("+article.id+")\" class='title'>" +
|
|
|
|
article.title + "</a>" +
|
2010-09-10 09:59:21 +00:00
|
|
|
"<div class='body'>" +
|
|
|
|
"<div title=\"Click to expand article\" onclick=\"zoom("+article.id+")\" class='excerpt'>" +
|
|
|
|
article.excerpt + "</div>" +
|
|
|
|
"<div style='display : none' class='content'>" +
|
|
|
|
article.content + "</div>" +
|
2010-09-10 11:47:15 +00:00
|
|
|
"<div class='info'><a href=\#\" onclick=\"viewfeed("+feed.id+")\">" +
|
|
|
|
feed.title + "</a> " + " @ " +
|
2010-09-09 15:02:12 +00:00
|
|
|
new Date(article.updated * 1000) + "</div>" +
|
2010-09-09 17:44:04 +00:00
|
|
|
"</div></li>";
|
2010-09-09 12:50:10 +00:00
|
|
|
|
|
|
|
$("headlines-content").innerHTML += tmp_html;
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("add_headline_entry", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
function parse_feeds(transport) {
|
|
|
|
try {
|
|
|
|
|
|
|
|
var feeds = transport.responseXML.getElementsByTagName('feeds')[0];
|
|
|
|
|
|
|
|
if (feeds) {
|
|
|
|
feeds = eval("(" + feeds.firstChild.nodeValue + ")");
|
|
|
|
|
|
|
|
last_feeds = feeds;
|
|
|
|
|
|
|
|
$('feeds-content').innerHTML = "";
|
|
|
|
|
|
|
|
for (var i = 0; i < feeds.length; i++) {
|
|
|
|
add_feed_entry(feeds[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("parse_feeds", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function parse_headlines(transport, replace) {
|
|
|
|
try {
|
|
|
|
var headlines = transport.responseXML.getElementsByTagName('headlines')[0];
|
|
|
|
|
|
|
|
if (headlines) {
|
|
|
|
headlines = eval("(" + headlines.firstChild.nodeValue + ")");
|
|
|
|
|
|
|
|
if (replace) $('headlines-content').innerHTML = '';
|
|
|
|
|
|
|
|
var pr = $('MORE-PROMPT');
|
|
|
|
|
|
|
|
if (pr) pr.parentNode.removeChild(pr);
|
|
|
|
|
|
|
|
for (var i = 0; i < headlines.length; i++) {
|
|
|
|
|
|
|
|
if (!$('A-' + headlines[i].id)) {
|
|
|
|
add_headline_entry(headlines[i],
|
|
|
|
find_feed(last_feeds, headlines[i].feed_id));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pr) {
|
|
|
|
$('headlines-content').appendChild(pr);
|
|
|
|
} else {
|
|
|
|
$('headlines-content').innerHTML += "<li id='MORE-PROMPT'>" +
|
|
|
|
"<div class='body'><a href=\"javascript:load_more()\">" +
|
|
|
|
__("More articles...") + "</a></div></li>";
|
|
|
|
}
|
|
|
|
|
|
|
|
new Effect.Appear('headlines-content');
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("parse_headlines", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*function digest_update(transport, feed_id, offset) {
|
2010-09-09 12:50:10 +00:00
|
|
|
try {
|
|
|
|
var feeds = transport.responseXML.getElementsByTagName('feeds')[0];
|
|
|
|
var headlines = transport.responseXML.getElementsByTagName('headlines')[0];
|
|
|
|
|
|
|
|
if (feeds) {
|
|
|
|
feeds = eval("(" + feeds.firstChild.nodeValue + ")");
|
|
|
|
|
2010-09-09 17:44:04 +00:00
|
|
|
last_feeds = feeds;
|
|
|
|
|
2010-09-09 15:02:12 +00:00
|
|
|
$('feeds-content').innerHTML = "";
|
|
|
|
|
2010-09-09 12:50:10 +00:00
|
|
|
for (var i = 0; i < feeds.length; i++) {
|
|
|
|
add_feed_entry(feeds[i]);
|
|
|
|
}
|
2010-09-09 17:44:04 +00:00
|
|
|
} else {
|
|
|
|
feeds = last_feeds;
|
2010-09-09 12:50:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (headlines) {
|
|
|
|
headlines = eval("(" + headlines.firstChild.nodeValue + ")");
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
if (_active_feed_id != feed_id || !offset)
|
2010-09-10 09:59:21 +00:00
|
|
|
$('headlines-content').innerHTML = "";
|
|
|
|
|
|
|
|
var pr = $('MORE-PROMPT');
|
2010-09-09 15:02:12 +00:00
|
|
|
|
2010-09-10 09:59:21 +00:00
|
|
|
if (pr) {
|
|
|
|
pr.id = '';
|
|
|
|
Element.hide(pr);
|
|
|
|
}
|
2010-09-09 17:44:04 +00:00
|
|
|
|
2010-09-09 12:50:10 +00:00
|
|
|
for (var i = 0; i < headlines.length; i++) {
|
2010-09-10 09:59:21 +00:00
|
|
|
var elem = $('A-' + headlines[i].id);
|
|
|
|
|
|
|
|
if (elem && Element.visible(elem)) {
|
2010-09-11 11:25:47 +00:00
|
|
|
if (!headlines[i].unread)
|
|
|
|
remove_headline_entry(headlines[i].id);
|
2010-09-10 09:59:21 +00:00
|
|
|
|
|
|
|
} else {
|
|
|
|
add_headline_entry(headlines[i], find_feed(feeds, headlines[i].feed_id));
|
|
|
|
}
|
2010-09-09 12:50:10 +00:00
|
|
|
}
|
2010-09-09 15:02:12 +00:00
|
|
|
|
2010-09-10 09:59:21 +00:00
|
|
|
$('headlines-content').innerHTML += "<li id='MORE-PROMPT'>" +
|
|
|
|
"<div class='body'><a href=\"#\" onclick=\"load_more()\">" +
|
|
|
|
__("More articles...") + "</a></div></li>";
|
2010-09-09 17:44:04 +00:00
|
|
|
|
|
|
|
new Effect.Appear('headlines-content');
|
2010-09-11 11:25:47 +00:00
|
|
|
}
|
2010-09-09 17:44:04 +00:00
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
if (feed_id != undefined) {
|
|
|
|
_active_feed_id = feed_id;
|
2010-09-09 12:50:10 +00:00
|
|
|
}
|
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
if (offset != undefined) _active_feed_offset = offset;
|
|
|
|
|
|
|
|
mark_selected_feed(_active_feed_id);
|
|
|
|
|
2010-09-09 12:50:10 +00:00
|
|
|
} catch (e) {
|
|
|
|
exception_error("digest_update", e);
|
|
|
|
}
|
2010-09-11 11:25:47 +00:00
|
|
|
} */
|
2010-09-09 12:50:10 +00:00
|
|
|
|
2010-09-11 11:25:47 +00:00
|
|
|
function init() {
|
2010-09-09 12:50:10 +00:00
|
|
|
try {
|
|
|
|
|
|
|
|
new Ajax.Request("backend.php", {
|
|
|
|
parameters: "backend.php?op=rpc&subop=digest-init",
|
|
|
|
onComplete: function(transport) {
|
2010-09-11 11:25:47 +00:00
|
|
|
parse_feeds(transport);
|
2010-09-09 17:44:04 +00:00
|
|
|
window.setTimeout('viewfeed(-4)', 100);
|
2010-09-11 11:25:47 +00:00
|
|
|
_update_timeout = window.setTimeout('update()', 5*1000);
|
2010-09-09 12:50:10 +00:00
|
|
|
} });
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("digest_init", e);
|
|
|
|
}
|
|
|
|
}
|
2010-09-10 13:45:59 +00:00
|
|
|
|
|
|
|
function tMark_afh_off(effect) {
|
|
|
|
try {
|
|
|
|
var elem = effect.effects[0].element;
|
|
|
|
|
|
|
|
console.log("tMark_afh_off : " + elem.id);
|
|
|
|
|
|
|
|
if (elem) {
|
|
|
|
elem.src = elem.src.replace("mark_set", "mark_unset");
|
|
|
|
elem.alt = __("Star article");
|
|
|
|
Element.show(elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("tMark_afh_off", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function tPub_afh_off(effect) {
|
|
|
|
try {
|
|
|
|
var elem = effect.effects[0].element;
|
|
|
|
|
|
|
|
console.log("tPub_afh_off : " + elem.id);
|
|
|
|
|
|
|
|
if (elem) {
|
|
|
|
elem.src = elem.src.replace("pub_set", "pub_unset");
|
|
|
|
elem.alt = __("Publish article");
|
|
|
|
Element.show(elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("tPub_afh_off", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function toggleMark(mark_img, id) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
var query = "?op=rpc&id=" + id + "&subop=mark";
|
|
|
|
|
|
|
|
query = query + "&afid=" + _active_feed_id;
|
|
|
|
query = query + "&omode=c";
|
|
|
|
|
|
|
|
if (!mark_img) return;
|
|
|
|
|
|
|
|
if (mark_img.src.match("mark_unset")) {
|
|
|
|
mark_img.src = mark_img.src.replace("mark_unset", "mark_set");
|
|
|
|
mark_img.alt = __("Unstar article");
|
|
|
|
query = query + "&mark=1";
|
|
|
|
} else {
|
|
|
|
mark_img.alt = __("Please wait...");
|
|
|
|
query = query + "&mark=0";
|
|
|
|
|
|
|
|
mark_img.src = mark_img.src.replace("mark_set", "mark_unset");
|
|
|
|
mark_img.alt = __("Star article");
|
|
|
|
}
|
|
|
|
|
|
|
|
new Ajax.Request("backend.php", {
|
|
|
|
parameters: query,
|
|
|
|
onComplete: function(transport) {
|
|
|
|
//
|
|
|
|
} });
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("toggleMark", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function togglePub(mark_img, id, note) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
var query = "?op=rpc&id=" + id + "&subop=publ";
|
|
|
|
|
|
|
|
query = query + "&afid=" + _active_feed_id;
|
|
|
|
|
|
|
|
if (note != undefined) {
|
|
|
|
query = query + "¬e=" + param_escape(note);
|
|
|
|
} else {
|
|
|
|
query = query + "¬e=undefined";
|
|
|
|
}
|
|
|
|
|
|
|
|
query = query + "&omode=c";
|
|
|
|
|
|
|
|
if (!mark_img) return;
|
|
|
|
|
|
|
|
if (mark_img.src.match("pub_unset") || note != undefined) {
|
|
|
|
mark_img.src = mark_img.src.replace("pub_unset", "pub_set");
|
|
|
|
mark_img.alt = __("Unpublish article");
|
|
|
|
query = query + "&pub=1";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
mark_img.alt = __("Please wait...");
|
|
|
|
query = query + "&pub=0";
|
|
|
|
|
|
|
|
mark_img.src = mark_img.src.replace("pub_set", "pub_unset");
|
|
|
|
mark_img.alt = __("Publish article");
|
|
|
|
}
|
|
|
|
|
|
|
|
new Ajax.Request("backend.php", {
|
|
|
|
parameters: query,
|
|
|
|
onComplete: function(transport) {
|
|
|
|
//
|
|
|
|
} });
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("togglePub", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|