Dashboard: open further links in a modal popup.

(Or just show/hide them for use-popups.)

For some weird reason, this seems to fire only on the second click
on the toggler, not on the first. Need input from @onli on this.

Also, this needs a better icon. I did not want to go through a new
iconfont build just for this one icon now.
This commit is contained in:
Matthias Mees 2013-10-01 21:03:39 +02:00
parent 3146238b35
commit 1b11b31a18
3 changed files with 44 additions and 48 deletions

View File

@ -1,4 +1,7 @@
<h2>{$CONST.WELCOME_BACK} {$username|escape:"html"}</h2>
<div id="dashboard_header" class="clearfix">
<h2>{$CONST.WELCOME_BACK} {$username|escape:"html"}</h2>
<a href="#s9y_links" class="button_link toggle_links"><span class="icon-plus"></span><span class="visuallyhidden"> {$CONST.FURTHER_LINKS}</span></a>
</div>
{$backend_frontpage_display}
<div id="dashboard" class="clearfix">
{if $update}
@ -63,19 +66,17 @@
</ol>
</section>
{/if}
<section id="further_links">
<h3 class="collapsed"><a href="#s9y_links" class="toggle_links"><span class="icon-plus"></span> {$CONST.FURTHER_LINKS}</a></h3>
<section id="s9y_links" class="clearfix mfp-hide">
<h3>{$CONST.FURTHER_LINKS}</h3>
<div id="s9y_links" class="additional_info">
<ul class="clearfix plainList">
<li><a href="http://www.s9y.org/">{$CONST.FURTHER_LINKS_S9Y}</a></li>
<li><a href="http://www.s9y.org/33.html">{$CONST.FURTHER_LINKS_S9Y_DOCS}</a></li>
<li><a href="http://blog.s9y.org/">{$CONST.FURTHER_LINKS_S9Y_BLOG}</a></li>
<li><a href="http://www.s9y.org/forums/">{$CONST.FURTHER_LINKS_S9Y_FORUMS}</a></li>
<li><a href="http://spartacus.s9y.org/">{$CONST.FURTHER_LINKS_S9Y_SPARTACUS}</a></li>
<li><a class="s9y_bookmarklet" href="{$bookmarklet}" title="{$CONST.FURTHER_LINKS_S9Y_BOOKMARKLET_DESC}">{$CONST.FURTHER_LINKS_S9Y_BOOKMARKLET}</a></li>
</ul>
</div>
<ul class="plainList">
<li><a href="http://www.s9y.org/">{$CONST.FURTHER_LINKS_S9Y}</a></li>
<li><a href="http://www.s9y.org/33.html">{$CONST.FURTHER_LINKS_S9Y_DOCS}</a></li>
<li><a href="http://blog.s9y.org/">{$CONST.FURTHER_LINKS_S9Y_BLOG}</a></li>
<li><a href="http://www.s9y.org/forums/">{$CONST.FURTHER_LINKS_S9Y_FORUMS}</a></li>
<li><a href="http://spartacus.s9y.org/">{$CONST.FURTHER_LINKS_S9Y_SPARTACUS}</a></li>
<li><a class="s9y_bookmarklet" href="{$bookmarklet}" title="{$CONST.FURTHER_LINKS_S9Y_BOOKMARKLET_DESC}">{$CONST.FURTHER_LINKS_S9Y_BOOKMARKLET}</a></li>
</ul>
</section>
</div>
<script src="{serendipity_getFile file='admin/js/jquery.syncheight.js'}"></script>

View File

@ -973,17 +973,17 @@ var AccessifyHTML5 = function (defaults, more_fixes) {
// Show further links
$('.toggle_links').click(function(e) {
var $el = $(this);
$($el.attr('href')).toggleClass('additional_info');
$el.parent().toggleClass('collapsed');
var $toggleIcon = $el.find('> span');
var $toggleState = $toggleIcon.attr('class');
if($toggleState == 'icon-minus') {
$toggleIcon.removeClass('icon-minus').addClass('icon-plus');
} else {
$toggleIcon.removeClass('icon-plus').addClass('icon-minus');
}
e.preventDefault();
{if $use_popups}
$('#s9y_links').toggleClass('mfp-hide');
{else}
$(this).magnificPopup({
items: [{
src: '#s9y_links',
type: 'inline'
}]
});
{/if}
});
// Media file actions

View File

@ -1069,7 +1069,8 @@ summary {
#entries_list .form_check,
.pagination .prev,
.pagination .next,
#serendipity_customfields textarea {
#serendipity_customfields textarea,
#dashboard_header h2 {
float: left;
}
@ -1094,10 +1095,15 @@ summary {
}
.edit_actions,
#entries_list .actions {
#entries_list .actions,
.toggle_links {
float: right;
}
.toggle_links {
margin: 1.25em 2% .75em 0
}
#edit_entry_title label,
#edit_entry_metadata label,
#filter_comments label,
@ -1135,7 +1141,8 @@ summary {
#serendipity_comment .form_field input,
#serendipity_comment select,
.js .configuration_group .media_choose input,
.js #serendipity_category .form_field #category_icon {
.js #serendipity_category .form_field #category_icon,
#dashboard_header h2 {
width: 85%;
}
@ -1500,6 +1507,15 @@ form > .button_link:first-of-type,
border: 1px solid #aaa;
}
.mfp-content #s9y_links {
background: #fcfcfc;
margin: 0 auto;
max-width: 480px;
padding: 0 2em;
position: relative;
width: 96%;
}
#template_select article,
.plugins_installable > li,
.media_file {
@ -1546,22 +1562,6 @@ form > .button_link:first-of-type,
float: right;
}
.js #dashboard > #further_links > .collapsed {
border-bottom: 0 none;
}
#further_links h3 > a,
#further_links h3 > a:visited {
color: #666;
text-decoration: none;
}
#further_links h3 > a:hover,
#further_links h3 > a:focus {
color: #222;
text-decoration: none;
}
.media_wrap_thumb {
float: left;
margin: 0 2% 1em 0;
@ -1939,12 +1939,12 @@ form > .button_link:first-of-type,
.no-js .template_show_info,
.no-js #serendipity_comments_list .comment_summary,
.no-js .editor_toolbar,
.no-js #s9y_links > span,
.no-js .toggle_info .info-icon-circled,
.no-js .pluginmanager_grablet,
.no-js .image_resize_hint,
.no-js #serendipityScaleForm > .form_check,
.no-js .customfieldMedia,
.no-js .toggle_links,
.js .additional_info,
.installer .toggle_info,
.hidden,
@ -2533,11 +2533,6 @@ img.mfp-img {
width: 33%;
}
#further_links li {
display: inline-block;
margin-right: 1em;
}
#image_directory_edit_form > div > .form_select {
float: left;
margin: 0 5% 0 0;