cleanup sharepopup dialog

master
Andrew Dolgov 6 years ago
parent d9e20f8b16
commit be322d6fc8

@ -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"]));
?> ?>
<form id='share_form' name='share_form'>
<table height='100%' width='100%' class="panel"><tr><td colspan='2'> <input type="hidden" name="op" value="sharepopup">
<h1><?php echo __("Share with Tiny Tiny RSS") ?></h1> <input type="hidden" name="action" value="share">
</td></tr>
<form id='share_form' name='share_form'> <fieldset>
<label><?php echo __("Title:") ?></label>
<input style='width : 270px' dojoType='dijit.form.TextBox' name='title' value="<?php echo $title ?>">
</fieldset>
<input type="hidden" name="op" value="sharepopup"> <fieldset>
<input type="hidden" name="action" value="share"> <label><?php echo __("URL:") ?></label>
<input style='width : 270px' name='url' dojoType='dijit.form.TextBox' value="<?php echo $url ?>">
</fieldset>
<tr><td align='right'><?php echo __("Title:") ?></td> <fieldset>
<td width='80%'><input name='title' value="<?php echo $title ?>"></td></tr> <label><?php echo __("Content:") ?></label>
<tr><td align='right'><?php echo __("URL:") ?></td> <input style='width : 270px' name='content' dojoType='dijit.form.TextBox' value="">
<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 __("Labels:") ?></label>
style="display : block"></div></td></tr> <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>
<script type='text/javascript'>document.forms[0].title.focus();</script> <hr/>
<script type='text/javascript'> <fieldset>
new Ajax.Autocompleter('labels_value', 'labels_choices', <button dojoType='dijit.form.Button' class="alt-primary" type="submit"><?php echo __('Share') ?></button>
"backend.php?op=rpc&method=completeLabels", <button dojoType='dijit.form.Button' onclick="return window.close()"><?php echo __('Cancel') ?></button>
{ tokens: ',', paramName: "search" }); <span class="insensitive small"><?php echo __("Shared article will appear in the Published feed.") ?></span>
</script> </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>
</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">
<form action="public.php?return=<?php echo $return ?>" method="post">
<input type="hidden" name="op" value="login">
<input type="hidden" name="op" value="login"> <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>
<table height='100%' width='100%'><tr><td colspan='2'> <fieldset>
<h1><?php echo __("Not logged in") ?></h1></td></tr> <label><?php echo __("Password:") ?></label>
<tr><td align="right"><?php echo __("Login:") ?></td> <input type="password" name="password" required="1"
<td align="right"><input name="login" dojoType="dijit.form.TextBox"
value="<?php echo $_SESSION["fake_login"] ?>"></td></tr> class="input input-text"
<tr><td align="right"><?php echo __("Password:") ?></td> value="<?php echo $_SESSION["fake_password"] ?>"/>
<td align="right"><input type="password" name="password" </fieldset>
value="<?php echo $_SESSION["fake_password"] ?>"></td></tr>
<tr><td colspan='2'>
<button type="submit">
<?php echo __('Log in') ?></button>
<button onclick="return window.close()"> <hr/>
<?php echo __('Cancel') ?></button>
</td></tr> <fieldset>
</table> <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() {

@ -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 {
font-size: 14px;
margin: 0px;
color: #257aa7;
} }
body#sharepopup form { body.ttrss_utility.share_popup .content {
height: 100%; padding: 15px;
} border-width: 0;
body#sharepopup input { box-shadow: none;
width: 100%;
} }
.flat li { .flat li {
padding: 2px; padding: 2px;

File diff suppressed because one or more lines are too long

@ -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 {

@ -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 {
font-size : 14px;
margin : 0px;
color : @color-accent;
}
form {
height : 100%;
}
input { .content {
width : 100%; padding : 15px;
border-width : 0;
box-shadow : none;
} }
} }

@ -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 {
font-size: 14px;
margin: 0px;
color: #b87d2c;
}
body#sharepopup form {
height: 100%;
} }
body#sharepopup input { body.ttrss_utility.share_popup .content {
width: 100%; padding: 15px;
border-width: 0;
box-shadow: none;
} }
.flat li { .flat li {
padding: 2px; padding: 2px;

File diff suppressed because one or more lines are too long

@ -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 {
font-size: 14px;
margin: 0px;
color: #257aa7;
}
body#sharepopup form {
height: 100%;
} }
body#sharepopup input { body.ttrss_utility.share_popup .content {
width: 100%; padding: 15px;
border-width: 0;
box-shadow: none;
} }
.flat li { .flat li {
padding: 2px; padding: 2px;

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save