cleanup sharepopup dialog

This commit is contained in:
Andrew Dolgov 2019-02-20 13:05:12 +03:00
parent d9e20f8b16
commit be322d6fc8
9 changed files with 260 additions and 249 deletions

View File

@ -545,15 +545,37 @@ class Handler_Public extends Handler {
}
header('Content-Type: text/html; charset=utf-8');
print "<html><head><title>Tiny Tiny RSS</title>
<link rel=\"shortcut icon\" type=\"image/png\" href=\"images/favicon.png\">
<link rel=\"icon\" type=\"image/png\" sizes=\"72x72\" href=\"images/favicon-72px.png\">";
?>
<html>
<head>
<title><?php echo __("Share with Tiny Tiny RSS") ?> ?></title>
<?php
echo stylesheet_tag("css/default.css");
echo javascript_tag("lib/prototype.js");
echo javascript_tag("lib/dojo/dojo.js");
echo javascript_tag("lib/dojo/tt-rss-layer.js");
echo javascript_tag("lib/scriptaculous/scriptaculous.js?load=effects,controls")
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" type="image/png" href="images/favicon.png">
<link rel="icon" type="image/png" sizes="72x72" href="images/favicon-72px.png">
</head>
<body class='flat ttrss_utility share_popup'>
<script type="text/javascript">
require(['dojo/parser', "dojo/ready", 'dijit/form/Button','dijit/form/CheckBox', 'dijit/form/Form',
'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser, ready){
ready(function() {
parser.parse();
echo stylesheet_tag("css/default.css");
echo javascript_tag("lib/prototype.js");
echo javascript_tag("lib/scriptaculous/scriptaculous.js?load=effects,controls");
print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
</head><body id='sharepopup' class='ttrss_utility'>";
new Ajax.Autocompleter('labels_value', 'labels_choices',
"backend.php?op=rpc&method=completeLabels",
{ tokens: ',', paramName: "search" });
});
});
</script>
<div class="content">
<?php
$action = clean($_REQUEST["action"]);
@ -578,50 +600,43 @@ class Handler_Public extends Handler {
$url = htmlspecialchars(clean($_REQUEST["url"]));
?>
<table height='100%' width='100%' class="panel"><tr><td colspan='2'>
<h1><?php echo __("Share with Tiny Tiny RSS") ?></h1>
</td></tr>
<form id='share_form' name='share_form'>
<input type="hidden" name="op" value="sharepopup">
<input type="hidden" name="action" value="share">
<input type="hidden" name="op" value="sharepopup">
<input type="hidden" name="action" value="share">
<tr><td align='right'><?php echo __("Title:") ?></td>
<td width='80%'><input name='title' value="<?php echo $title ?>"></td></tr>
<tr><td align='right'><?php echo __("URL:") ?></td>
<td><input name='url' value="<?php echo $url ?>"></td></tr>
<tr><td align='right'><?php echo __("Content:") ?></td>
<td><input name='content' value=""></td></tr>
<tr><td align='right'><?php echo __("Labels:") ?></td>
<td><input name='labels' id="labels_value"
placeholder='Alpha, Beta, Gamma' value="">
</td></tr>
<fieldset>
<label><?php echo __("Title:") ?></label>
<input style='width : 270px' dojoType='dijit.form.TextBox' name='title' value="<?php echo $title ?>">
</fieldset>
<tr><td>
<div class="autocomplete" id="labels_choices"
style="display : block"></div></td></tr>
<fieldset>
<label><?php echo __("URL:") ?></label>
<input style='width : 270px' name='url' dojoType='dijit.form.TextBox' value="<?php echo $url ?>">
</fieldset>
<script type='text/javascript'>document.forms[0].title.focus();</script>
<fieldset>
<label><?php echo __("Content:") ?></label>
<input style='width : 270px' name='content' dojoType='dijit.form.TextBox' value="">
</fieldset>
<script type='text/javascript'>
new Ajax.Autocompleter('labels_value', 'labels_choices',
"backend.php?op=rpc&method=completeLabels",
{ tokens: ',', paramName: "search" });
</script>
<fieldset>
<label><?php echo __("Labels:") ?></label>
<input style='width : 270px' name='labels' dojoType='dijit.form.TextBox' id="labels_value"
placeholder='Alpha, Beta, Gamma' value="">
<div class="autocomplete" id="labels_choices"
style="display : block"></div>
</fieldset>
<tr><td colspan='2'>
<div style='float : right' class='insensitive-small'>
<?php echo __("Shared article will appear in the Published feed.") ?>
</div>
<button type="submit"><?php echo __('Share') ?></button>
<button onclick="return window.close()"><?php echo __('Cancel') ?></button>
</td>
<hr/>
<fieldset>
<button dojoType='dijit.form.Button' class="alt-primary" type="submit"><?php echo __('Share') ?></button>
<button dojoType='dijit.form.Button' onclick="return window.close()"><?php echo __('Cancel') ?></button>
<span class="insensitive small"><?php echo __("Shared article will appear in the Published feed.") ?></span>
</fieldset>
</form>
</td></tr></table>
</body></html>
<?php
}
@ -629,34 +644,44 @@ class Handler_Public extends Handler {
} else {
$return = urlencode($_SERVER["REQUEST_URI"])
?>
<form action="public.php?return=<?php echo $return ?>"
method="POST" id="loginForm" name="loginForm">
<?php print_error("Not logged in"); ?>
<input type="hidden" name="op" value="login">
<form action="public.php?return=<?php echo $return ?>" method="post">
<table height='100%' width='100%'><tr><td colspan='2'>
<h1><?php echo __("Not logged in") ?></h1></td></tr>
<input type="hidden" name="op" value="login">
<tr><td align="right"><?php echo __("Login:") ?></td>
<td align="right"><input name="login"
value="<?php echo $_SESSION["fake_login"] ?>"></td></tr>
<tr><td align="right"><?php echo __("Password:") ?></td>
<td align="right"><input type="password" name="password"
value="<?php echo $_SESSION["fake_password"] ?>"></td></tr>
<tr><td colspan='2'>
<button type="submit">
<?php echo __('Log in') ?></button>
<fieldset>
<label><?php echo __("Login:") ?></label>
<input name="login" id="login" dojoType="dijit.form.TextBox" type="text"
onchange="fetchProfiles()" onfocus="fetchProfiles()" onblur="fetchProfiles()"
required="1" value="<?php echo $_SESSION["fake_login"] ?>" />
</fieldset>
<button onclick="return window.close()">
<?php echo __('Cancel') ?></button>
</td></tr>
</table>
<fieldset>
<label><?php echo __("Password:") ?></label>
<input type="password" name="password" required="1"
dojoType="dijit.form.TextBox"
class="input input-text"
value="<?php echo $_SESSION["fake_password"] ?>"/>
</fieldset>
<hr/>
<fieldset>
<label> </label>
<button dojoType="dijit.form.Button" type="submit" class="alt-primary"><?php echo __('Log in') ?></button>
</fieldset>
</form>
<?php
}
print "</div></body></html>";
}
function login() {

View File

@ -328,12 +328,6 @@ body.ttrss_main div.prefHelp {
color: #555;
padding: 5px;
}
body.ttrss_main .insensitive {
color: #555;
}
body.ttrss_main .small {
font-size: 11px;
}
body.ttrss_main span.preview {
color: #999;
font-weight: normal;
@ -421,30 +415,6 @@ body.ttrss_main div.whiteBox {
border: 0px solid #ddd;
border-bottom-width: 1px;
}
body.ttrss_main div.autocomplete {
position: absolute;
width: 250px;
background-color: white;
border: 1px solid #ddd;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul {
list-style-type: none;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul li.selected {
background-color: #e6e6e6;
}
body.ttrss_main div.autocomplete ul li {
list-style-type: none;
display: block;
margin: 0;
padding: 2px;
height: 32px;
cursor: pointer;
}
body.ttrss_main div#headlines-frame.wide .title {
overflow: visible;
white-space: normal;
@ -986,6 +956,41 @@ body.ttrss_utility hr {
border: 0px solid #ccc;
border-bottom-width: 1px;
}
body.ttrss_main .insensitive,
body.ttrss_utility .insensitive {
color: #555;
}
body.ttrss_main .small,
body.ttrss_utility .small {
font-size: 11px;
}
body.ttrss_main div.autocomplete,
body.ttrss_utility div.autocomplete {
position: absolute;
width: 250px;
background-color: white;
border: 1px solid #ddd;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul,
body.ttrss_utility div.autocomplete ul {
list-style-type: none;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul li.selected,
body.ttrss_utility div.autocomplete ul li.selected {
background-color: #e6e6e6;
}
body.ttrss_main div.autocomplete ul li,
body.ttrss_utility div.autocomplete ul li {
list-style-type: none;
display: block;
margin: 0;
padding: 2px;
cursor: pointer;
}
::selection {
background: #257aa7;
color: white;
@ -1569,21 +1574,15 @@ body.ttrss_utility.feed_debugger,
body.ttrss_utility.ttrss_zoom {
margin: 2em;
}
body#sharepopup {
color: black;
body.ttrss_utility.share_popup {
margin: 0;
padding: 0;
background: white;
margin: 10px;
}
body#sharepopup h1 {
font-size: 14px;
margin: 0px;
color: #257aa7;
}
body#sharepopup form {
height: 100%;
}
body#sharepopup input {
width: 100%;
body.ttrss_utility.share_popup .content {
padding: 15px;
border-width: 0;
box-shadow: none;
}
.flat li {
padding: 2px;

File diff suppressed because one or more lines are too long

View File

@ -374,14 +374,6 @@ body.ttrss_main {
padding : 5px;
}
.insensitive {
color : @default-text;
}
.small {
font-size : 11px;
}
span.preview {
color : #999;
font-weight : normal;
@ -484,35 +476,6 @@ body.ttrss_main {
border-bottom-width: 1px;
}
div.autocomplete {
position : absolute;
width : 250px;
background-color : @default-bg;
border :1px solid @border-default;
margin : 0px;
padding : 0px;
ul {
list-style-type : none;
margin : 0px;
padding : 0px;
}
ul li.selected {
background-color : darken(@default-bg, 10%);
}
ul li {
list-style-type : none;
display : block;
margin : 0;
padding : 2px;
height : 32px;
cursor : pointer;
}
}
div#headlines-frame.wide {
.title {
overflow: visible;
@ -1165,6 +1128,41 @@ body.ttrss_main, body.ttrss_utility {
border-bottom-width: 1px;
}
.insensitive {
color : @default-text;
}
.small {
font-size : 11px;
}
div.autocomplete {
position : absolute;
width : 250px;
background-color : @default-bg;
border :1px solid @border-default;
margin : 0px;
padding : 0px;
ul {
list-style-type : none;
margin : 0px;
padding : 0px;
}
ul li.selected {
background-color : darken(@default-bg, 10%);
}
ul li {
list-style-type : none;
display : block;
margin : 0;
padding : 2px;
cursor : pointer;
}
}
}
::selection {

View File

@ -131,23 +131,14 @@ body.ttrss_utility.ttrss_zoom {
margin : 2em;
}
body#sharepopup {
color : @default-fg;
background: @default-bg;
margin : 10px;
body.ttrss_utility.share_popup {
margin : 0;
padding : 0;
background : white;
h1 {
font-size : 14px;
margin : 0px;
color : @color-accent;
.content {
padding : 15px;
border-width : 0;
box-shadow : none;
}
form {
height : 100%;
}
input {
width : 100%;
}
}

View File

@ -329,12 +329,6 @@ body.ttrss_main div.prefHelp {
color: #ccc;
padding: 5px;
}
body.ttrss_main .insensitive {
color: #ccc;
}
body.ttrss_main .small {
font-size: 11px;
}
body.ttrss_main span.preview {
color: #999;
font-weight: normal;
@ -422,30 +416,6 @@ body.ttrss_main div.whiteBox {
border: 0px solid #222;
border-bottom-width: 1px;
}
body.ttrss_main div.autocomplete {
position: absolute;
width: 250px;
background-color: #333;
border: 1px solid #222;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul {
list-style-type: none;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul li.selected {
background-color: #1a1a1a;
}
body.ttrss_main div.autocomplete ul li {
list-style-type: none;
display: block;
margin: 0;
padding: 2px;
height: 32px;
cursor: pointer;
}
body.ttrss_main div#headlines-frame.wide .title {
overflow: visible;
white-space: normal;
@ -987,6 +957,41 @@ body.ttrss_utility hr {
border: 0px solid #ccc;
border-bottom-width: 1px;
}
body.ttrss_main .insensitive,
body.ttrss_utility .insensitive {
color: #ccc;
}
body.ttrss_main .small,
body.ttrss_utility .small {
font-size: 11px;
}
body.ttrss_main div.autocomplete,
body.ttrss_utility div.autocomplete {
position: absolute;
width: 250px;
background-color: #333;
border: 1px solid #222;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul,
body.ttrss_utility div.autocomplete ul {
list-style-type: none;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul li.selected,
body.ttrss_utility div.autocomplete ul li.selected {
background-color: #1a1a1a;
}
body.ttrss_main div.autocomplete ul li,
body.ttrss_utility div.autocomplete ul li {
list-style-type: none;
display: block;
margin: 0;
padding: 2px;
cursor: pointer;
}
::selection {
background: #b87d2c;
color: #333;
@ -1570,21 +1575,15 @@ body.ttrss_utility.feed_debugger,
body.ttrss_utility.ttrss_zoom {
margin: 2em;
}
body#sharepopup {
color: #ccc;
background: #333;
margin: 10px;
body.ttrss_utility.share_popup {
margin: 0;
padding: 0;
background: white;
}
body#sharepopup h1 {
font-size: 14px;
margin: 0px;
color: #b87d2c;
}
body#sharepopup form {
height: 100%;
}
body#sharepopup input {
width: 100%;
body.ttrss_utility.share_popup .content {
padding: 15px;
border-width: 0;
box-shadow: none;
}
.flat li {
padding: 2px;

File diff suppressed because one or more lines are too long

View File

@ -329,12 +329,6 @@ body.ttrss_main div.prefHelp {
color: #ccc;
padding: 5px;
}
body.ttrss_main .insensitive {
color: #ccc;
}
body.ttrss_main .small {
font-size: 11px;
}
body.ttrss_main span.preview {
color: #999;
font-weight: normal;
@ -422,30 +416,6 @@ body.ttrss_main div.whiteBox {
border: 0px solid #222;
border-bottom-width: 1px;
}
body.ttrss_main div.autocomplete {
position: absolute;
width: 250px;
background-color: #333;
border: 1px solid #222;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul {
list-style-type: none;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul li.selected {
background-color: #1a1a1a;
}
body.ttrss_main div.autocomplete ul li {
list-style-type: none;
display: block;
margin: 0;
padding: 2px;
height: 32px;
cursor: pointer;
}
body.ttrss_main div#headlines-frame.wide .title {
overflow: visible;
white-space: normal;
@ -987,6 +957,41 @@ body.ttrss_utility hr {
border: 0px solid #ccc;
border-bottom-width: 1px;
}
body.ttrss_main .insensitive,
body.ttrss_utility .insensitive {
color: #ccc;
}
body.ttrss_main .small,
body.ttrss_utility .small {
font-size: 11px;
}
body.ttrss_main div.autocomplete,
body.ttrss_utility div.autocomplete {
position: absolute;
width: 250px;
background-color: #333;
border: 1px solid #222;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul,
body.ttrss_utility div.autocomplete ul {
list-style-type: none;
margin: 0px;
padding: 0px;
}
body.ttrss_main div.autocomplete ul li.selected,
body.ttrss_utility div.autocomplete ul li.selected {
background-color: #1a1a1a;
}
body.ttrss_main div.autocomplete ul li,
body.ttrss_utility div.autocomplete ul li {
list-style-type: none;
display: block;
margin: 0;
padding: 2px;
cursor: pointer;
}
::selection {
background: #257aa7;
color: #333;
@ -1570,21 +1575,15 @@ body.ttrss_utility.feed_debugger,
body.ttrss_utility.ttrss_zoom {
margin: 2em;
}
body#sharepopup {
color: #ccc;
background: #333;
margin: 10px;
body.ttrss_utility.share_popup {
margin: 0;
padding: 0;
background: white;
}
body#sharepopup h1 {
font-size: 14px;
margin: 0px;
color: #257aa7;
}
body#sharepopup form {
height: 100%;
}
body#sharepopup input {
width: 100%;
body.ttrss_utility.share_popup .content {
padding: 15px;
border-width: 0;
box-shadow: none;
}
.flat li {
padding: 2px;

File diff suppressed because one or more lines are too long