for (var i = 0; i < items.length; i++) {
if (items[i] == treeItem) {
- for (j = i+1; j < items.length; j++) {
+ for (var j = i+1; j < items.length; j++) {
var unread = this.store.getValue(items[j], 'unread');
var id = this.store.getValue(items[j], 'id');
if (unread > 0 && (is_cat || id.match("FEED:"))) return items[j];
}
- for (j = 0; j < i; j++) {
+ for (var j = 0; j < i; j++) {
var unread = this.store.getValue(items[j], 'unread');
var id = this.store.getValue(items[j], 'id');
for (var i = 0; i < items.length; i++) {
if (items[i] == treeItem) {
- for (j = i+1; j < items.length; j++) {
+ for (var j = i+1; j < items.length; j++) {
var id = String(items[j].id);
var box = this._itemNodesMap[id];
for (var i = 0; i < items.length; i++) {
if (items[i] == treeItem) {
- for (j = i-1; j > 0; j--) {
+ for (var j = i-1; j > 0; j--) {
var id = String(items[j].id);
var box = this._itemNodesMap[id];
var item = dijit.getEnclosingWidget(target).item;
// disable copying items
- source.copyState = function() { return false; }
+ source.copyState = function() { return false; };
var source_item = false;
if (!source_item || !item) return false;
- var id = String(item.id);
- var source_id = String(source_item.id);
-
var id = this.tree.model.store.getValue(item, 'id');
var source_id = source.tree.model.store.getValue(source_item, 'id');
console.log(query);
+ var img = false;
+
if ($("F-" + feed_id)) {
- var img = $("F-" + feed_id).getElementsByTagName("IMG")[0];
+ img = $("F-" + feed_id).getElementsByTagName("IMG")[0];
if (img && !no_indicator) {
img.setAttribute("orig_src", img.src);
feeds.sort( function (a,b)
{
if (b.unread != a.unread)
- return (b.unread - a.unread)
+ return (b.unread - a.unread);
else
if (a.title > b.title)
return 1;
dijit.byId("content-tabs").selectChild(
dijit.byId("content-tabs").getChildren()[0]);
- var force_nocache = false;
-
if (!background) {
if (getActiveFeedId() != feed || offset == 0) {
active_post_id = 0;
function parse_counters(elems, scheduled_call) {
try {
-
- var feeds_found = 0;
-
for (var l = 0; l < elems.length; l++) {
- var id = elems[l].id
+ var id = elems[l].id;
var kind = elems[l].kind;
- var ctr = parseInt(elems[l].counter)
+ var ctr = parseInt(elems[l].counter);
var error = elems[l].error;
var has_img = elems[l].has_img;
var updated = elems[l].updated;
- var title = elems[l].title;
if (id == "global-unread") {
global_unread = ctr;
continue;
}
- var treeItem;
-
// TODO: enable new content notification for categories
if (!activeFeedIsCat() && id == getActiveFeedId()
for (var i=0; i < this.length; i++) {
if (s == this[i]) this.splice(i, 1);
}
-}
+};
/* create console.log if it doesn't exist */
if(x.length>1) {
// remove negative sign
x=Math.abs(x)+"";
- for(j=0;j<x.length;j++) {
+ for(var j=0;j<x.length;j++) {
// call isNumeric recursively for each character
number=isNumeric(x.substring(j,j+1));
if(!number) return number;
}
function dropboxSelect(e, v) {
- for (i = 0; i < e.length; i++) {
+ for (var i = 0; i < e.length; i++) {
if (e[i].value == v) {
e.selectedIndex = i;
break;
//console.log("infobox_callback2");
notify('');
- var content;
- var dtitle = "Dialog";
-
- var dlg = transport.responseXML.getElementsByTagName("dlg")[0];
-
var title = transport.responseXML.getElementsByTagName("title")[0];
if (title)
title = title.firstChild.nodeValue;
if (inPreferences()) {
updateFilterList();
}
- }})
+ }});
}
}
}});
try {
var elem_rows = $(id).rows;
- for (i = 0; i < elem_rows.length; i++) {
+ for (var i = 0; i < elem_rows.length; i++) {
if (elem_rows[i].hasClassName("Selected")) {
var bare_id = elem_rows[i].id.replace(/^[A-Z]*?-/, "");
rows.push(bare_id);
dialog.hide();
notify('');
updateFeedList();
- }})
+ }});
}
},
href: query});
currState = this.checkboxState;
}
- return currState // the current state of the checkbox (true/false or undefined)
+ return currState; // the current state of the checkbox (true/false or undefined)
},
_setCheckboxState: function(/*dojo.data.Item*/ storeItem, /*Boolean*/ newState ) {
parents.push(this.root);
}
}
- return parents // parent(s) of a dojo.data.item (Array of dojo.data.items)
+ return parents; // parent(s) of a dojo.data.item (Array of dojo.data.items)
},
validateData: function(/*dojo.data.Item*/ storeItem, /*thisObject*/ scope ) {
w = w ? w : window;
var width = w.innerWidth || (w.document.documentElement.clientWidth || w.document.body.clientWidth);
var height = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);
- return [width, height]
-}
+ return [width, height];
+};
/* http://textsnippets.com/posts/show/836 */
}
element.style.top = (ph/2) - (h/2) - Position.deltaY + "px";
element.style.left = (pw/2) - (w/2) - Position.deltaX + "px";
-}
+};
<a class="button blueButton" onclick='do_login()'><?php echo __('Log in') ?></a>
</div>
- <form target="_self" title="Login" action="index.php" id="login" class="panel" method="POST" name="login" selected="true">
+ <form target="_self" title="Login" action="index.php" id="login" class="panel" method="post" name="login" selected="true">
<fieldset>
onComplete: function(transport) {
dialog.hide();
updateFilterList();
- }})
+ }});
}
}
}});
title: __("Edit Multiple Feeds"),
style: "width: 600px",
getChildByName: function (name) {
- var rv = null
+ var rv = null;
this.getChildren().each(
function(child) {
if (child.name == name) {
onComplete: function(transport) {
dialog.hide();
updateFeedList();
- }})
+ }});
}
},
content: transport.responseText});
try {
if (e.target.nodeName == "INPUT") return;
- var keycode;
+ var keycode = false;
var shift_key = false;
var cmdline = $('cmdline');
},
execute: function() {
if (this.validate()) {
- var caption = this.attr('value').id;
var caption = this.attr('value').caption;
var fg_color = this.attr('value').fg_color;
var bg_color = this.attr('value').bg_color;
</head>
+<body id="ttrssPrefs" class="claro">
+
<div id="notify" class="notify"><span id="notify_body"> </span></div>
<div id="cmdline" style="display : none"></div>
-<body id="ttrssPrefs" class="claro">
-
<div id="overlay">
<div id="overlay_inner">
<div class="insensitive"><?php echo __("Loading, please wait...") ?></div>
</td><td>
<input type="submit" value="<?php echo __('Check availability') ?>" onclick='return checkUsername()'>
</td></tr>
- <td><?php echo __('Email:') ?></td><td>
+ <tr><td><?php echo __('Email:') ?></td><td>
<input name="email">
</td></tr>
- <td><?php echo __('How much is two plus two:') ?></td><td>
+ <tr><td><?php echo __('How much is two plus two:') ?></td><td>
<input name="turing_test"></td></tr>
<tr><td colspan="2" align="right">
<input type="submit" name="sub_btn" value="<?php echo __('Submit registration') ?>"
return;
}
- var error_flag;
-
if (k == "daemon_is_running" && v != 1) {
notify_error("<span onclick=\"javascript:explainError(1)\">Update daemon is not running.</span>", true);
return;
var str = __("Mark all articles in %s as read?").replace("%s", fn);
if (getInitParam("confirm_feed_catchup") != 1 || confirm(str)) {
- return viewCurrentFeed('MarkAllRead')
+ return viewCurrentFeed('MarkAllRead');
}
}
var str = __("Mark all articles in %s as read?").replace("%s", title);
if (getInitParam("confirm_feed_catchup") != 1 || confirm(str)) {
- return viewCurrentFeed('MarkAllReadGR:' + id)
+ return viewCurrentFeed('MarkAllReadGR:' + id);
}
} catch (e) {
}
function viewModeChanged() {
- return viewCurrentFeed('')
+ return viewCurrentFeed('');
}
function viewLimitChanged() {
- return viewCurrentFeed('')
+ return viewCurrentFeed('');
}
/* function adjustArticleScore(id, score) {
if (e.target.nodeName == "INPUT" || e.target.nodeName == "TEXTAREA") return;
- var keycode;
+ var keycode = false;
var shift_key = false;
var cmdline = $('cmdline');
}
if (keycode == 85) { // u
- selectionToggleUnread(undefined, false, true)
+ selectionToggleUnread(undefined, false, true);
return;
}
<div id="feeds-holder" dojoType="dijit.layout.ContentPane" region="leading" style="width : 20%" splitter="true">
<div id="feedlistLoading">
- <img src='images/indicator_tiny.gif'>
+ <img src='images/indicator_tiny.gif'/>
<?php echo __("Loading, please wait..."); ?></div>
<div id="feedTree"></div>
</div>
<?php } else if ($op == 'callback') { ?>
- <?php print_notice(__('Congratulations! You have successfully registered with Twitter.')) ?>
+ <p><?php print_notice(__('Congratulations! You have successfully registered with Twitter.')) ?>
</p>
<form method="GET" action="prefs.php">
var is_cat = false;
var feed_id = false;
- var reply;
+ var reply = false;
try {
reply = JSON.parse(transport.responseText);
var counters = reply['counters'];
var articles = reply['articles'];
- var runtime_info = reply['runtime-info'];
+ //var runtime_info = reply['runtime-info'];
if (offset == 0 && infscroll_req == false) {
dijit.byId("headlines-frame").attr('content',
function selectionRemoveLabel(id, ids) {
try {
- if (!ids) var ids = getSelectedArticleIds2();
+ if (!ids) ids = getSelectedArticleIds2();
if (ids.length == 0) {
alert(__("No articles are selected."));
return;
}
- for (i = 0; i < rows.length; i++) {
+ for (var i = 0; i < rows.length; i++) {
var row = $("RROW-" + rows[i]);
if (row) {
if (set_state == undefined) {
return;
}
- for (i = 0; i < rows.length; i++) {
+ for (var i = 0; i < rows.length; i++) {
toggleMark(rows[i], true, true);
}
return;
}
- for (i = 0; i < rows.length; i++) {
+ for (var i = 0; i < rows.length; i++) {
togglePub(rows[i], true, true);
}
}
selectArticles('all');
- selectionToggleUnread(false, 'viewCurrentFeed()', true)
+ selectionToggleUnread(false, 'viewCurrentFeed()', true);
selectArticles('none');
}
var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
var str;
- var op;
if (getActiveFeedId() != 0) {
str = __("Delete %d selected articles in %s?");
return;
}
- selectionToggleUnread(false, 'viewCurrentFeed()', true)
+ selectionToggleUnread(false, 'viewCurrentFeed()', true);
} catch (e) {
exception_error("catchupSelection", e);
var reply = JSON.parse(transport.responseText);
reply.each(function(article) {
- $("CWRAP-" + article['id']).innerHTML = article['content']
+ $("CWRAP-" + article['id']).innerHTML = article['content'];
cids_requested.remove(article['id']);
});
}});
function cdmClicked(event, id) {
try {
- var shift_key = event.shiftKey;
+ //var shift_key = event.shiftKey;
hideAuxDlg();