diff options
author | zotlabs <mike@macgirvin.com> | 2017-10-04 19:37:50 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-10-04 19:37:50 -0700 |
commit | 4ab21edba8511eb96b08371424841d6ffb808cf8 (patch) | |
tree | fcf56e3e85e6d28d8901ef3a0a638bfb40212b51 /view | |
parent | 15b9a67c01964b83ac724945fe416dd35f66e914 (diff) | |
parent | 6f88d5e92be06ad8fa61f900e8a4fb41ba54135e (diff) | |
download | volse-hubzilla-4ab21edba8511eb96b08371424841d6ffb808cf8.tar.gz volse-hubzilla-4ab21edba8511eb96b08371424841d6ffb808cf8.tar.bz2 volse-hubzilla-4ab21edba8511eb96b08371424841d6ffb808cf8.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'view')
-rw-r--r-- | view/css/bootstrap-red.css | 4 | ||||
-rw-r--r-- | view/js/main.js | 4 | ||||
-rw-r--r-- | view/pdl/mod_channel.pdl | 5 | ||||
-rwxr-xr-x | view/tpl/common_friends.tpl | 24 | ||||
-rwxr-xr-x | view/tpl/nav.tpl | 35 | ||||
-rwxr-xr-x | view/tpl/remote_friends_common.tpl | 36 | ||||
-rw-r--r-- | view/tpl/wiki.tpl | 68 |
7 files changed, 97 insertions, 79 deletions
diff --git a/view/css/bootstrap-red.css b/view/css/bootstrap-red.css index e0018989d..fb6ea911e 100644 --- a/view/css/bootstrap-red.css +++ b/view/css/bootstrap-red.css @@ -7,6 +7,10 @@ nav .badge { font-size: 0.75rem; } +nav .dropdown-menu { + min-width: 16rem; +} + @media screen and (min-width: 767px) { nav .badge { top: 0px; diff --git a/view/js/main.js b/view/js/main.js index 73b2f3616..dc40db360 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -444,7 +444,7 @@ function NavUpdate() { updateCountsOnly = false; - if(data.network || data.home || data.intros || data.mail || data.all_events || data.notify || data.files || data.pubs) { + if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) { $('#notifications-btn').css('opacity', 1); } else { @@ -490,7 +490,7 @@ function NavUpdate() { if(data.notify == 0) { data.notify = ''; $('.notify-update, .notify-button').hide(); } else { $('.notify-update, .notify-button').show(); } $('.notify-update').html(data.notify); - if(data.register == 0) { data.register = ''; $('.register-update').removeClass('show'); } else { $('.register-update').addClass('show'); } + if(data.register == 0) { data.register = ''; $('.register-update, .register-button').hide(); } else { $('.register-update, .register-button').show(); } $('.register-update').html(data.register); if(data.events == 0) { data.events = ''; $('.events-update, .events-button').hide(); } else { $('.events-update, .events-button').show(); } diff --git a/view/pdl/mod_channel.pdl b/view/pdl/mod_channel.pdl index 967dd89b4..45ce31720 100644 --- a/view/pdl/mod_channel.pdl +++ b/view/pdl/mod_channel.pdl @@ -3,12 +3,9 @@ [/region] [region=aside] [widget=fullprofile][/widget] +[widget=common_friends][/widget] [widget=archive][var=wall]1[/var][/widget] [widget=categories][/widget] [widget=tagcloud_wall][var=limit]24[/var][/widget] [/region] -[region=content] -[widget=common_friends][/widget] -$content -[/region] diff --git a/view/tpl/common_friends.tpl b/view/tpl/common_friends.tpl index fa2cf5a13..b99075210 100755 --- a/view/tpl/common_friends.tpl +++ b/view/tpl/common_friends.tpl @@ -1,15 +1,17 @@ <div class="generic-content-wrapper"> - <div class="profile-match-photo"> - <a href="{{$url}}"> - <img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" /> - </a> + <div class="section-title-wrapper"> + <h2>{{$title}}</h2> </div> - <div class="profile-match-break"></div> - <div class="profile-match-name"> - <a href="{{$url}}" title="{{$name}}[{{$tags}}]">{{$name}}</a> + <div class="section-content-wrapper clearfix"> + {{foreach $items as $item}} + <div class="float-left mr-4"> + <a href="{{$item.url}}"> + <img class="contact-block-img" src="{{$item.photo}}" alt="{{$item.name}}" title="{{$item.name}} [{{$item.url}}]" /> + </a> + <div> + {{$item.name}} + </div> + </div> + {{/foreach}} </div> - {{if $note}} - <div class="profile-match-note">{{$note}}</div> - {{/if}} - <div class="profile-match-end"></div> </div> diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index 72860aebe..82cdc0dd0 100755 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -128,7 +128,7 @@ {{/if}} {{if $nav.intros}} <li class="nav-item dropdown intro-button" style="display: none;"> - <a class="nav-link" href="{{$nav.intros.0}}" title="{{$nav.intros.3}}" id="{{$nav.intros.4}}" data-toggle="dropdown" rel="#nav-intros-menu"> + <a class="nav-link" href="#" title="{{$nav.intros.3}}" id="{{$nav.intros.4}}" data-toggle="dropdown" rel="#nav-intros-menu"> <i class="fa fa-fw fa-users"></i> <span class="badge badge-pill badge-danger intro-update"></span> </a> @@ -138,9 +138,20 @@ </div> </li> {{/if}} + {{if $nav.registrations}} + <li class="nav-item dropdown register-button" style="display: none;"> + <a class="nav-link" href="#" title="{{$nav.registrations.3}}" id="{{$nav.registrations.4}}" data-toggle="dropdown" rel="#nav-register-menu"> + <i class="fa fa-fw fa-user-o"></i> + <span class="badge badge-pill badge-danger register-update"></span> + </a> + <div id="nav-register-menu" class="dropdown-menu" rel="register"> + {{$emptynotifications}} + </div> + </li> + {{/if}} {{if $nav.notifications}} <li class="nav-item dropdown notify-button" style="display: none;"> - <a class="nav-link" href="{{$nav.notifications.0}}" title="{{$nav.notifications.1}}" id="{{$nav.notifications.4}}" data-toggle="dropdown" rel="#nav-notify-menu"> + <a class="nav-link" href="#" title="{{$nav.notifications.1}}" id="{{$nav.notifications.4}}" data-toggle="dropdown" rel="#nav-notify-menu"> <i class="fa fa-fw fa-exclamation"></i> <span class="badge badge-pill badge-danger notify-update"></span> </a> @@ -151,6 +162,17 @@ </div> </li> {{/if}} + {{if $nav.files}} + <li class="nav-item dropdown files-button" style="display: none;"> + <a class="nav-link" href="#" title="{{$nav.files.3}}" id="{{$nav.files.4}}" data-toggle="dropdown" rel="#nav-files-menu"> + <i class="fa fa-fw fa-folder"></i> + <span class="badge badge-pill badge-danger files-update"></span> + </a> + <div id="nav-files-menu" class="dropdown-menu" rel="files"> + {{$emptynotifications}} + </div> + </li> + {{/if}} {{if $nav.login && !$userinfo}} <li class="nav-item d-none d-md-flex"> <a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">{{$nav.loginmenu.1.1}}</a> @@ -166,14 +188,7 @@ <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> </li> {{/if}} - {{if $nav.files}} - <li class="nav-item dropdown files-button" style="display: none;"> - <a class="nav-link" href="{{$nav.files.0}}" title="{{$nav.files.3}}" id="{{$nav.files.4}}" rel="#nav-files-menu"> - <i class="fa fa-fw fa-folder"></i> - <span class="badge badge-pill badge-primary files-update"></span> - </a> - </li> - {{/if}} + {{if $nav.pubs}} <li class="nav-item dropdown pubs-button" style="display: none;"> <a class="nav-link" href="{{$nav.pubs.0}}" title="{{$nav.pubs.3}}" id="{{$nav.pubs.4}}" rel="#nav-pubs-menu"> diff --git a/view/tpl/remote_friends_common.tpl b/view/tpl/remote_friends_common.tpl index 7ec1a2e6b..9e149b574 100755 --- a/view/tpl/remote_friends_common.tpl +++ b/view/tpl/remote_friends_common.tpl @@ -1,28 +1,16 @@ <div class="widget"> - <div class="panel"> - <div class="section-subtitle-wrapper" role="tab" id="common-friends-visitor"> - <h3><a data-toggle="collapse" href="#common-friends-collapse">{{$desc}}</a></h3> - </div> - <div id="common-friends-collapse" class="collapse" role="tabpanel" aria-labelledby="common-friends-visitor"> - {{if $items}} - {{foreach $items as $item}} - <div class="profile-match-wrapper"> - <div class="profile-match-photo"> - <a href="{{$base}}/chanview?f=&url={{$item.xchan_url}}"> - <img src="{{$item.xchan_photo_m}}" width="80" height="80" alt="{{$item.xchan_name}}" title="{{$item.xchan_name}}" /> - </a> - </div> - <div class="profile-match-break"></div> - <div class="profile-match-name"> - <a href="{{$base}}/chanview?f=&url={{$item.xchan_url}}" title="{{$item.xchan_name}}">{{$item.xchan_name}}</a> - </div> - <div class="profile-match-end"></div> - </div> - {{/foreach}} - {{/if}} - <div id="rfic-end" class="clear"></div> - {{if $linkmore}}<button class="btn btn-default"><a href="{{$base}}/common/{{$uid}}">{{$more}}</a></button>{{/if}} + <h3>{{$desc}}</h3> + {{if $linkmore}} + <a class="allcontact-link" href="{{$base}}/common/{{$uid}}">{{$more}}</a> + {{/if}} + {{if $items}} + <div class="contact-block-content"> + {{foreach $items as $item}} + <div class="contact-block-div"> + <a class="contact-block-link mpfriend" href="{{$base}}/chanview?f=&url={{$item.xchan_url}}"><img class="contact-block-img mpfriend" src="{{$item.xchan_photo_s}}"alt="{{$item.xchan_name}}" title="{{$item.xchan_name}} [{{$item.xchan_addr}}]" /></a> </div> + {{/foreach}} </div> -</div> + {{/if}} +<div> diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 70a13806d..22480be5b 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -1,7 +1,7 @@ -<div class="generic-content-wrapper" {{if $hideEditor}}style="display: none;"{{/if}}> +<div class="generic-content-wrapper"> <div class="section-title-wrapper"> <div class="pull-right"> - <span class="wiki-typename">[{{$typename}}] </span> + <span class="text-muted wiki-typename">[{{$typename}}] </span> {{if $showPageControls}} <div id="page-tools" class="btn-group" style="display: none;"> <button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown"> @@ -53,18 +53,6 @@ <textarea id="editor">{{$content}}</textarea> </div> {{/if}} - {{if $showPageControls}} - <div> - <div id="id_{{$commitMsg.0}}_wrapper" class="field input"> - <div class="input-group"> - <input class="form-control form-control-sm" name="{{$commitMsg.0}}" id="id_{{$commitMsg.0}}" type="text" value="{{$commitMsg.2}}"{{if $commitMsg.5}} {{$commitMsg.5}}{{/if}}> - <div class="input-group-btn"> - <button id="save-page" type="button" class="btn btn-primary disabled">Save</button> - </div> - </div> - </div> - </div> - {{/if}} </div> <div id="preview-pane" class="tab-pane active"> <div id="wiki-preview"> @@ -74,6 +62,16 @@ <div id="page-history-pane" class="tab-pane"> <div id="page-history-list"></div> </div> + {{if $showPageControls}} + <div id="id_{{$commitMsg.0}}_wrapper" class="field input" style="display: none"> + <div class="input-group"> + <input class="form-control form-control-sm" name="{{$commitMsg.0}}" id="id_{{$commitMsg.0}}" type="text" value="{{$commitMsg.2}}"{{if $commitMsg.5}} {{$commitMsg.5}}{{/if}}> + <div class="input-group-btn"> + <button id="save-page" type="button" class="btn btn-primary disabled">Save</button> + </div> + </div> + </div> + {{/if}} </div> </div> </div> @@ -106,6 +104,7 @@ window.wiki_page_name = '{{$page}}'; window.wiki_page_content = '{{$content|escape:'javascript'}}'; window.wiki_page_commit = '{{$commit}}'; + window.saved = true; $("#generic-modal-ok-{{$wikiModalID}}").removeClass('btn-primary'); $("#generic-modal-ok-{{$wikiModalID}}").addClass('btn-danger'); @@ -174,10 +173,16 @@ adjustInlineEditorHeight(); } }, 500); // Return the focus to the editor allowing immediate text entry - $('#page-tools').show(); + $('#page-tools, #id_{{$commitMsg.0}}_wrapper').show(); }); $('#wiki-get-preview').click(function (ev) { + if(window.saved) { + $('#page-tools, #id_{{$commitMsg.0}}_wrapper').hide(); + } + else { + $('#page-tools').hide(); + } $.post("wiki/{{$channel_address}}/preview", { {{if !$mimeType || $mimeType == 'text/markdown'}} content: editor.getValue(), @@ -188,30 +193,34 @@ mimetype: '{{$mimeType}}' }, function (data) { - if (data.success) { - $('#wiki-preview').html(data.html); - {{if !$mimeType || $mimeType == 'text/markdown'}} - $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"}); - {{/if}} - $('#page-tools').hide(); - } else { - window.console.log('Error previewing page.'); - } + if (data.success) { + $('#wiki-preview').html(data.html); + {{if !$mimeType || $mimeType == 'text/markdown'}} + $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"}); + {{/if}} + } else { + window.console.log('Error previewing page.'); + } }, 'json'); ev.preventDefault(); }); $('#wiki-get-history').click(function (ev) { + if(window.saved) { + $('#page-tools, #id_{{$commitMsg.0}}_wrapper').hide(); + } + else { + $('#page-tools').hide(); + } $.post("wiki/{{$channel_address}}/history/page", {name: window.wiki_page_name, resource_id: window.wiki_resource_id}, function (data) { if (data.success) { $('#page-history-list').html(data.historyHTML); - $('#page-tools').hide(); } else { window.console.log('Error getting page history.'); } - }, 'json'); - ev.preventDefault(); - }); + }, 'json'); + ev.preventDefault(); + }); function wiki_refresh_page_list() { if (window.wiki_resource_id === '') { @@ -254,6 +263,7 @@ }, function (data) { if (data.success) { + window.saved = true; window.console.log('Page saved successfully.'); window.wiki_page_content = currentContent; $('#id_commitMsg').val(''); // Clear the commit message box @@ -446,6 +456,7 @@ {{if !$mimeType || $mimeType == 'text/markdown'}} $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"}); window.editor.on("input", function() { + window.saved = false; if(window.editor.getSession().getUndoManager().isClean()) { $('#save-page').addClass('disabled'); } else { @@ -454,6 +465,7 @@ }); {{else}} window.editor.on("input", function() { + window.saved = false; $('#save-page').removeClass('disabled'); }); {{if $mimeType == 'text/bbcode'}} |