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

View File

@ -328,12 +328,6 @@ body.ttrss_main div.prefHelp {
color: #555; color: #555;
padding: 5px; padding: 5px;
} }
body.ttrss_main .insensitive {
color: #555;
}
body.ttrss_main .small {
font-size: 11px;
}
body.ttrss_main span.preview { body.ttrss_main span.preview {
color: #999; color: #999;
font-weight: normal; font-weight: normal;
@ -421,30 +415,6 @@ body.ttrss_main div.whiteBox {
border: 0px solid #ddd; border: 0px solid #ddd;
border-bottom-width: 1px; 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 { body.ttrss_main div#headlines-frame.wide .title {
overflow: visible; overflow: visible;
white-space: normal; white-space: normal;
@ -986,6 +956,41 @@ body.ttrss_utility hr {
border: 0px solid #ccc; border: 0px solid #ccc;
border-bottom-width: 1px; 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 { ::selection {
background: #257aa7; background: #257aa7;
color: white; color: white;
@ -1569,21 +1574,15 @@ body.ttrss_utility.feed_debugger,
body.ttrss_utility.ttrss_zoom { body.ttrss_utility.ttrss_zoom {
margin: 2em; margin: 2em;
} }
body#sharepopup { body.ttrss_utility.share_popup {
color: black; margin: 0;
padding: 0;
background: white; background: white;
margin: 10px;
} }
body#sharepopup h1 { body.ttrss_utility.share_popup .content {
font-size: 14px; padding: 15px;
margin: 0px; border-width: 0;
color: #257aa7; box-shadow: none;
}
body#sharepopup form {
height: 100%;
}
body#sharepopup input {
width: 100%;
} }
.flat li { .flat li {
padding: 2px; padding: 2px;

File diff suppressed because one or more lines are too long

View File

@ -374,14 +374,6 @@ body.ttrss_main {
padding : 5px; padding : 5px;
} }
.insensitive {
color : @default-text;
}
.small {
font-size : 11px;
}
span.preview { span.preview {
color : #999; color : #999;
font-weight : normal; font-weight : normal;
@ -484,35 +476,6 @@ body.ttrss_main {
border-bottom-width: 1px; 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 { div#headlines-frame.wide {
.title { .title {
overflow: visible; overflow: visible;
@ -1165,6 +1128,41 @@ body.ttrss_main, body.ttrss_utility {
border-bottom-width: 1px; 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 { ::selection {

View File

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

View File

@ -329,12 +329,6 @@ body.ttrss_main div.prefHelp {
color: #ccc; color: #ccc;
padding: 5px; padding: 5px;
} }
body.ttrss_main .insensitive {
color: #ccc;
}
body.ttrss_main .small {
font-size: 11px;
}
body.ttrss_main span.preview { body.ttrss_main span.preview {
color: #999; color: #999;
font-weight: normal; font-weight: normal;
@ -422,30 +416,6 @@ body.ttrss_main div.whiteBox {
border: 0px solid #222; border: 0px solid #222;
border-bottom-width: 1px; 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 { body.ttrss_main div#headlines-frame.wide .title {
overflow: visible; overflow: visible;
white-space: normal; white-space: normal;
@ -987,6 +957,41 @@ body.ttrss_utility hr {
border: 0px solid #ccc; border: 0px solid #ccc;
border-bottom-width: 1px; 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 { ::selection {
background: #b87d2c; background: #b87d2c;
color: #333; color: #333;
@ -1570,21 +1575,15 @@ body.ttrss_utility.feed_debugger,
body.ttrss_utility.ttrss_zoom { body.ttrss_utility.ttrss_zoom {
margin: 2em; margin: 2em;
} }
body#sharepopup { body.ttrss_utility.share_popup {
color: #ccc; margin: 0;
background: #333; padding: 0;
margin: 10px; background: white;
} }
body#sharepopup h1 { body.ttrss_utility.share_popup .content {
font-size: 14px; padding: 15px;
margin: 0px; border-width: 0;
color: #b87d2c; box-shadow: none;
}
body#sharepopup form {
height: 100%;
}
body#sharepopup input {
width: 100%;
} }
.flat li { .flat li {
padding: 2px; 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; color: #ccc;
padding: 5px; padding: 5px;
} }
body.ttrss_main .insensitive {
color: #ccc;
}
body.ttrss_main .small {
font-size: 11px;
}
body.ttrss_main span.preview { body.ttrss_main span.preview {
color: #999; color: #999;
font-weight: normal; font-weight: normal;
@ -422,30 +416,6 @@ body.ttrss_main div.whiteBox {
border: 0px solid #222; border: 0px solid #222;
border-bottom-width: 1px; 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 { body.ttrss_main div#headlines-frame.wide .title {
overflow: visible; overflow: visible;
white-space: normal; white-space: normal;
@ -987,6 +957,41 @@ body.ttrss_utility hr {
border: 0px solid #ccc; border: 0px solid #ccc;
border-bottom-width: 1px; 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 { ::selection {
background: #257aa7; background: #257aa7;
color: #333; color: #333;
@ -1570,21 +1575,15 @@ body.ttrss_utility.feed_debugger,
body.ttrss_utility.ttrss_zoom { body.ttrss_utility.ttrss_zoom {
margin: 2em; margin: 2em;
} }
body#sharepopup { body.ttrss_utility.share_popup {
color: #ccc; margin: 0;
background: #333; padding: 0;
margin: 10px; background: white;
} }
body#sharepopup h1 { body.ttrss_utility.share_popup .content {
font-size: 14px; padding: 15px;
margin: 0px; border-width: 0;
color: #257aa7; box-shadow: none;
}
body#sharepopup form {
height: 100%;
}
body#sharepopup input {
width: 100%;
} }
.flat li { .flat li {
padding: 2px; padding: 2px;

File diff suppressed because one or more lines are too long