use dijit form widget for attachments dropdown
This commit is contained in:
parent
176a489e54
commit
6810a1de42
|
@ -701,12 +701,13 @@ class Feeds extends Handler_Protected {
|
||||||
|
|
||||||
$always_display_enclosures = sql_bool_to_bool($line["always_display_enclosures"]);
|
$always_display_enclosures = sql_bool_to_bool($line["always_display_enclosures"]);
|
||||||
|
|
||||||
$reply['content'] .= format_article_enclosures($id, $always_display_enclosures, $line["content"], sql_bool_to_bool($line["hide_images"]));
|
|
||||||
|
|
||||||
$reply['content'] .= "</div>";
|
$reply['content'] .= "</div>";
|
||||||
|
|
||||||
$reply['content'] .= "<div class=\"cdmFooter\" onclick=\"cdmFooterClick(event)\">";
|
$reply['content'] .= "<div class=\"cdmFooter\" onclick=\"cdmFooterClick(event)\">";
|
||||||
|
|
||||||
|
$reply['content'] .= format_article_enclosures($id, $always_display_enclosures, $line["content"], sql_bool_to_bool($line["hide_images"]));
|
||||||
|
$reply['content'] .= "<br/>";
|
||||||
|
|
||||||
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_LEFT_BUTTON) as $p) {
|
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_LEFT_BUTTON) as $p) {
|
||||||
$reply['content'] .= $p->hook_article_left_button($line);
|
$reply['content'] .= $p->hook_article_left_button($line);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,6 @@ div.postReply div.postContent video {
|
||||||
}
|
}
|
||||||
|
|
||||||
div.postReply div.postEnclosures {
|
div.postReply div.postEnclosures {
|
||||||
margin-top : 1em;
|
|
||||||
color : #555;
|
color : #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1114,3 +1113,7 @@ body#ttrssMain #feedTree .dijitTreeRow img.dijitTreeExpandoLeaf {
|
||||||
:focus {
|
:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dijitDropDownButton.attachments {
|
||||||
|
margin-bottom : 10px;
|
||||||
|
}
|
|
@ -1314,21 +1314,6 @@
|
||||||
<link rel=\"shortcut icon\" type=\"image/png\" href=\"images/favicon.png\">
|
<link rel=\"shortcut icon\" type=\"image/png\" href=\"images/favicon.png\">
|
||||||
<link rel=\"icon\" type=\"image/png\" sizes=\"72x72\" href=\"images/favicon-72px.png\">
|
<link rel=\"icon\" type=\"image/png\" sizes=\"72x72\" href=\"images/favicon-72px.png\">
|
||||||
|
|
||||||
<script type=\"text/javascript\">
|
|
||||||
function openSelectedAttachment(elem) {
|
|
||||||
try {
|
|
||||||
var url = elem[elem.selectedIndex].value;
|
|
||||||
|
|
||||||
if (url) {
|
|
||||||
window.open(url);
|
|
||||||
elem.selectedIndex = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (e) {
|
|
||||||
exception_error(\"openSelectedAttachment\", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head><body id=\"ttrssZoom\">";
|
</head><body id=\"ttrssZoom\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1446,10 +1431,13 @@
|
||||||
$rv['content'] .= "<div class=\"postContent\" lang=\"".$line['lang']."\">";
|
$rv['content'] .= "<div class=\"postContent\" lang=\"".$line['lang']."\">";
|
||||||
|
|
||||||
$rv['content'] .= $line["content"];
|
$rv['content'] .= $line["content"];
|
||||||
|
|
||||||
|
if (!$zoom_mode) {
|
||||||
$rv['content'] .= format_article_enclosures($id,
|
$rv['content'] .= format_article_enclosures($id,
|
||||||
sql_bool_to_bool($line["always_display_enclosures"]),
|
sql_bool_to_bool($line["always_display_enclosures"]),
|
||||||
$line["content"],
|
$line["content"],
|
||||||
sql_bool_to_bool($line["hide_images"]));
|
sql_bool_to_bool($line["hide_images"]));
|
||||||
|
}
|
||||||
|
|
||||||
$rv['content'] .= "</div>";
|
$rv['content'] .= "</div>";
|
||||||
|
|
||||||
|
@ -1988,8 +1976,10 @@
|
||||||
$rv .= "<hr clear='both'/>";
|
$rv .= "<hr clear='both'/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$rv .= "<select class=\"attachments\" onchange=\"openSelectedAttachment(this)\">".
|
$rv .= "<div class=\"attachments\" dojoType=\"dijit.form.DropDownButton\">".
|
||||||
"<option value=''>" . __('Attachments')."</option>";
|
"<span>" . __('Attachments')."</span>";
|
||||||
|
|
||||||
|
$rv .= "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
|
||||||
|
|
||||||
foreach ($entries as $entry) {
|
foreach ($entries as $entry) {
|
||||||
if ($entry["title"])
|
if ($entry["title"])
|
||||||
|
@ -1997,11 +1987,13 @@
|
||||||
else
|
else
|
||||||
$title = "";
|
$title = "";
|
||||||
|
|
||||||
$rv .= "<option value=\"".htmlspecialchars($entry["url"])."\">" . htmlspecialchars($entry["filename"]) . "$title</option>";
|
$rv .= "<div onclick='window.open(\"".htmlspecialchars($entry["url"])."\")'
|
||||||
|
dojoType=\"dijit.MenuItem\">".htmlspecialchars($entry["filename"])."$title</div>";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$rv .= "</select>";
|
$rv .= "</div>";
|
||||||
|
$rv .= "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rv;
|
return $rv;
|
||||||
|
|
|
@ -2347,20 +2347,6 @@ function displayArticleUrl(id) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openSelectedAttachment(elem) {
|
|
||||||
try {
|
|
||||||
var url = elem[elem.selectedIndex].value;
|
|
||||||
|
|
||||||
if (url) {
|
|
||||||
window.open(url);
|
|
||||||
elem.selectedIndex = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (e) {
|
|
||||||
exception_error("openSelectedAttachment", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function scrollToRowId(id) {
|
function scrollToRowId(id) {
|
||||||
try {
|
try {
|
||||||
var row = $(id);
|
var row = $(id);
|
||||||
|
|
Loading…
Reference in New Issue