remove tt-rss tabcontrol

This commit is contained in:
Andrew Dolgov 2013-02-06 11:09:45 +04:00
parent 0a3fd79b0e
commit 38325ad6d1
5 changed files with 15 additions and 80 deletions

View File

@ -2910,7 +2910,7 @@
$rv['content'] .= "<div class=\"postReply\" id=\"POST-$id\">"; $rv['content'] .= "<div class=\"postReply\" id=\"POST-$id\">";
$rv['content'] .= "<div onclick=\"return postClicked(event, $id)\" $rv['content'] .= "<div onclick=\"return hlClicked(event, $id)\"
class=\"postHeader\" id=\"POSTHDR-$id\">"; class=\"postHeader\" id=\"POSTHDR-$id\">";
$entry_author = $line["author"]; $entry_author = $line["author"];

View File

@ -153,9 +153,7 @@
</div> </div>
<div dojoType="dijit.layout.BorderContainer" region="center" id="header-wrap" gutters="false"> <div dojoType="dijit.layout.BorderContainer" region="center" id="header-wrap" gutters="false">
<div dojoType="dijit.layout.TabContainer" region="center" id="content-tabs"> <div dojoType="dijit.layout.BorderContainer" region="center" id="content-wrap">
<div dojoType="dijit.layout.BorderContainer" region="center" id="content-wrap"
title="<?php echo __("News") ?>">
<div id="toolbar" dojoType="dijit.layout.ContentPane" region="top"> <div id="toolbar" dojoType="dijit.layout.ContentPane" region="top">
<div id="main-toolbar" dojoType="dijit.Toolbar"> <div id="main-toolbar" dojoType="dijit.Toolbar">
@ -249,7 +247,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<?php db_close($link); ?> <?php db_close($link); ?>

View File

@ -107,10 +107,6 @@ function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
} */ } */
} }
if (offset == 0 && !background)
dijit.byId("content-tabs").selectChild(
dijit.byId("content-tabs").getChildren()[0]);
if (!background) { if (!background) {
_viewfeed_last = get_timestamp(); _viewfeed_last = get_timestamp();

View File

@ -1372,10 +1372,6 @@ function zoomToArticle(event, id) {
try { try {
var cached_article = cache_get("article: " + id); var cached_article = cache_get("article: " + id);
if (dijit.byId("ATAB-" + id))
if (!event || !event.shiftKey)
return dijit.byId("content-tabs").selectChild(dijit.byId("ATAB-" + id));
if (dijit.byId("ATSTRTIP-" + id)) if (dijit.byId("ATSTRTIP-" + id))
dijit.byId("ATSTRTIP-" + id).destroyRecursive(); dijit.byId("ATSTRTIP-" + id).destroyRecursive();
@ -1388,11 +1384,6 @@ function zoomToArticle(event, id) {
id: 'ATAB-' + id, id: 'ATAB-' + id,
closable: true }); closable: true });
dijit.byId("content-tabs").addChild(article_pane);
if (!event || !event.shiftKey)
dijit.byId("content-tabs").selectChild(article_pane);
if ($("PTITLE-" + id)) if ($("PTITLE-" + id))
article_pane.attr('title', $("PTITLE-" + id).innerHTML); article_pane.attr('title', $("PTITLE-" + id).innerHTML);
@ -1420,11 +1411,6 @@ function zoomToArticle(event, id) {
id: 'ATAB-' + id, id: 'ATAB-' + id,
closable: true }); closable: true });
dijit.byId("content-tabs").addChild(article_pane);
if (!event || !event.shiftKey)
dijit.byId("content-tabs").selectChild(article_pane);
if ($("PTITLE-" + id)) if ($("PTITLE-" + id))
article_pane.attr('title', $("PTITLE-" + id).innerHTML); article_pane.attr('title', $("PTITLE-" + id).innerHTML);
} }
@ -1612,7 +1598,8 @@ function cdmClicked(event, id) {
} }
toggleUnread(id, 0, false); toggleUnread(id, 0, false);
zoomToArticle(event, id);
openArticleInNewWindow(id);
} }
request_counters(); request_counters();
@ -1624,45 +1611,18 @@ function cdmClicked(event, id) {
return false; return false;
} }
function postClicked(event, id) {
try {
if (!event.ctrlKey) {
return true;
} else {
postOpenInNewTab(event, id);
return false;
}
} catch (e) {
exception_error("postClicked");
}
}
function hlOpenInNewTab(event, id) {
toggleUnread(id, 0, false);
zoomToArticle(event, id);
}
function postOpenInNewTab(event, id) {
closeArticlePanel(id);
zoomToArticle(event, id);
}
function hlClicked(event, id) { function hlClicked(event, id) {
try { try {
if (event.which == 2) { if (event.which == 2) {
view(id); view(id);
return true; return true;
} else if (event.altKey) { } else if (event.ctrlKey) {
toggleSelected(id, true);
toggleUnread(id, 0, false);
openArticleInNewWindow(id); openArticleInNewWindow(id);
} else if (!event.ctrlKey) {
view(id);
return false; return false;
} else { } else {
toggleSelected(id); view(id);
toggleUnread(id, 0, false);
zoomToArticle(event, id);
return false; return false;
} }
@ -1775,18 +1735,10 @@ function headlineActionsChange(elem) {
function closeArticlePanel() { function closeArticlePanel() {
var tabs = dijit.byId("content-tabs");
var child = tabs.selectedChildWidget;
if (child && tabs.getIndexOfChild(child) > 0) {
tabs.removeChild(child);
child.destroy();
} else {
if (dijit.byId("content-insert")) if (dijit.byId("content-insert"))
dijit.byId("headlines-wrap-inner").removeChild( dijit.byId("headlines-wrap-inner").removeChild(
dijit.byId("content-insert")); dijit.byId("content-insert"));
} }
}
function initHeadlinesMenu() { function initHeadlinesMenu() {
try { try {
@ -1836,12 +1788,6 @@ function initHeadlinesMenu() {
openArticleInNewWindow(this.getParent().callerRowId); openArticleInNewWindow(this.getParent().callerRowId);
}})); }}));
menu.addChild(new dijit.MenuItem({
label: __("View in a tt-rss tab"),
onClick: function(event) {
hlOpenInNewTab(event, this.getParent().callerRowId);
}}));
menu.addChild(new dijit.MenuSeparator()); menu.addChild(new dijit.MenuSeparator());
menu.addChild(new dijit.MenuItem({ menu.addChild(new dijit.MenuItem({

View File

@ -1079,8 +1079,10 @@ div.fatalError textarea {
#content-wrap { #content-wrap {
padding : 0px; padding : 0px;
border-width : 0px; border-width : 1px 0px 1px 1px;
margin : 0px; border-style : solid;
border-color : #c0c0c0;
margin : 25px 0px 0px 0px;
} }
#feeds-holder { #feeds-holder {
@ -1111,12 +1113,6 @@ div.fatalError textarea {
display : none; display : none;
} }
#content-tabs {
margin : 0px;
padding : 0px;
border-width : 0px;
}
#toolbar { #toolbar {
padding : 0px; padding : 0px;
margin : 0px; margin : 0px;