aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-08 19:21:20 -0800
committerzotlabs <mike@macgirvin.com>2017-11-08 19:21:20 -0800
commit75471ba10ff0c9ca3dfdc943c6647fc6ab1332f8 (patch)
treecf4cc209bec0eb22bafacaa75cdf613a76f42b72 /view
parent5e47b767ea6ed92f6f7ea0a3368762827937a5d8 (diff)
parente7d20efb1b8d579bcb9bdef99205aad19281f6b2 (diff)
downloadvolse-hubzilla-75471ba10ff0c9ca3dfdc943c6647fc6ab1332f8.tar.gz
volse-hubzilla-75471ba10ff0c9ca3dfdc943c6647fc6ab1332f8.tar.bz2
volse-hubzilla-75471ba10ff0c9ca3dfdc943c6647fc6ab1332f8.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'view')
-rw-r--r--view/css/bootstrap-red.css2
-rw-r--r--view/js/main.js14
-rw-r--r--view/js/mod_defperms.js32
-rw-r--r--view/pdl/mod_defperms.pdl6
-rw-r--r--view/theme/redbasic/css/style.css31
-rwxr-xr-xview/tpl/defperms.tpl55
-rwxr-xr-xview/tpl/navbar_default.tpl15
7 files changed, 144 insertions, 11 deletions
diff --git a/view/css/bootstrap-red.css b/view/css/bootstrap-red.css
index 2dfc9e07b..18efd69e4 100644
--- a/view/css/bootstrap-red.css
+++ b/view/css/bootstrap-red.css
@@ -19,7 +19,6 @@ nav .dropdown-menu {
}
}
-
@media screen and (max-width: 767px) {
.navbar {
padding: .5rem 7px;
@@ -41,6 +40,7 @@ nav .dropdown-menu {
.navbar-toggler-right {
padding: 0.2rem 0;
+ white-space: nowrap;
}
#navbar-collapse-1 i {
diff --git a/view/js/main.js b/view/js/main.js
index 882f50e8a..c3873d823 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -32,7 +32,12 @@ function handle_comment_form(e) {
var fields_empty = true;
if(form.find('.comment-edit-text').length) {
- form.find('.comment-edit-text').addClass('expanded').removeAttr('placeholder');
+ var commentElm = form.find('.comment-edit-text').attr('id');
+ var submitElm = commentElm.replace(/text/,'submit');
+
+ $('#' + commentElm).addClass('expanded').removeAttr('placeholder');
+ $('#' + commentElm).attr('tabindex','9');
+ $('#' + submitElm).attr('tabindex','10');
form.find(':not(:visible)').show();
}
@@ -43,7 +48,12 @@ function handle_comment_form(e) {
fields_empty = false;
});
if(fields_empty) {
- form.find('.comment-edit-text').removeClass('expanded').attr('placeholder', aStr.comment);
+ var emptyCommentElm = form.find('.comment-edit-text').attr('id');
+ var emptySubmitElm = commentElm.replace(/text/,'submit');
+
+ $('#' + emptyCommentElm).removeClass('expanded').attr('placeholder', aStr.comment);
+ $('#' + emptyCommentElm).removeAttr('tabindex');
+ $('#' + emptySubmitElm).removeAttr('tabindex');
form.find(':not(.comment-edit-text)').hide();
}
});
diff --git a/view/js/mod_defperms.js b/view/js/mod_defperms.js
new file mode 100644
index 000000000..c89142579
--- /dev/null
+++ b/view/js/mod_defperms.js
@@ -0,0 +1,32 @@
+$(document).ready(function() {
+
+ $('#id_permcat').change(function() {
+ $('.loading-role-rotator').show();
+ var permName = $('#id_permcat').val();
+ loadConnectionRole(permName);
+ });
+
+
+});
+
+
+function loadConnectionRole(name) {
+
+ if(! name)
+ name = 'default';
+
+ $('.defperms-edit input').each(function() {
+ if(! $(this).is(':disabled'))
+ $(this).removeAttr('checked');
+ });
+
+ $.get('permcat/' + name, function(data) {
+ $(data.perms).each(function() {
+ if(this.value)
+ $('#id_perms_' + this.name).attr('checked','checked');
+ });
+ $('.loading-role-rotator').hide();
+ });
+}
+
+
diff --git a/view/pdl/mod_defperms.pdl b/view/pdl/mod_defperms.pdl
new file mode 100644
index 000000000..53a3ac9e5
--- /dev/null
+++ b/view/pdl/mod_defperms.pdl
@@ -0,0 +1,6 @@
+[region=aside]
+[widget=settings_menu][/widget]
+[/region]
+[region=right_aside]
+[widget=notifications][/widget]
+[/region]
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 9f9ece7c3..6df5a060b 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -161,10 +161,6 @@ nav {
filter:alpha(opacity=$nav_percent_min_opacity);
}
-#nav-app-link {
- white-space: nowrap;
-}
-
#powered-by {
font-size: 0.5rem;
position: absolute;
@@ -977,6 +973,11 @@ a .drop-icons:hover {
color: #FF0000;
}
+.perm-inherited {
+ color: #FF0000;
+}
+
+
#menulist {
list-style-type: none;
}
@@ -1255,6 +1256,12 @@ img.mail-conv-sender-photo {
border-radius: $radius;
}
+#nav-app-link {
+ padding: 0 !important;
+ line-height: 1.175;
+ white-space: nowrap;
+}
+
.page-title {
margin: 7px 0px;
}
@@ -1492,6 +1499,11 @@ blockquote {
left: 0px;
}
+ #nav-app-link-wrapper {
+ min-width: 0;
+ flex-basis: 25%;
+ }
+
}
.shareable_element_text {
@@ -1639,6 +1651,17 @@ dl.bb-dl > dd > li {
background-color: #0275d8;
}
+
+.form-group.checkbox > div > input:disabled + label .onoffswitch-switch {
+ background-color: red;
+ border-radius: 3px;
+ opacity: 0.3;
+ filter:alpha(opacity=30);
+
+}
+
+
+
.help-searchlist {
list-style-type: none;
}
diff --git a/view/tpl/defperms.tpl b/view/tpl/defperms.tpl
new file mode 100755
index 000000000..f4a711957
--- /dev/null
+++ b/view/tpl/defperms.tpl
@@ -0,0 +1,55 @@
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ <h2>{{$header}}</h2>
+ </div>
+ <div class="section-content-wrapper-np">
+ <form id="abook-edit-form" action="defperms/{{$contact_id}}" method="post" >
+
+ <input type="hidden" name="contact_id" value="{{$contact_id}}">
+ <input type="hidden" name="section" value="{{$section}}">
+
+ <div class="panel-group" id="contact-edit-tools" role="tablist" aria-multiselectable="true">
+ <div class="panel">
+ <div id="perms-tool-collapse" class="panel-collapse collapse show" role="tabpanel" aria-labelledby="perms-tool">
+ <div class="section-content-tools-wrapper">
+ <div class="section-content-warning-wrapper">
+ <p>{{$autolbl}}</p>
+ <p>{{$permnote_self}}</p>
+ </div>
+ {{if $permcat_enable}}
+ <div class="loading-role-rotator spinner-wrapper"></div>
+ <a href="settings/permcats" class="pull-right"><i class="fa fa-plus"></i>&nbsp;{{$permcat_new}}</a>
+ {{include file="field_select.tpl" field=$permcat}}
+ {{/if}}
+
+ <div class="defperms-edit">
+ {{foreach $perms as $prm}}
+ {{include file="field_checkbox.tpl" field=$prm}}
+ {{/foreach}}
+ </div>
+
+ {{if $hidden_perms}}
+ {{foreach $hidden_perms as $prm}}
+ <input type="hidden" name="{{$prm.0}}" value="{{$prm.1}}" >
+ {{/foreach}}
+ {{/if}}
+
+
+
+ <div>
+ <div class="section-content-info-wrapper">
+ {{$autoapprove}}
+ </div>
+ {{include file="field_checkbox.tpl" field=$autoperms}}
+ </div>
+
+ <div class="settings-submit-wrapper" >
+ <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+</div>
diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl
index b330993c8..426d32047 100755
--- a/view/tpl/navbar_default.tpl
+++ b/view/tpl/navbar_default.tpl
@@ -17,8 +17,8 @@
</div>
{{/if}}
{{if $userinfo}}
-<div class="dropdown usermenu">
- <div class="fakelink" data-toggle="dropdown">
+<div class="dropdown">
+ <div class="fakelink usermenu" data-toggle="dropdown">
<img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}">
<i class="fa fa-caret-down"></i>
</div>
@@ -59,10 +59,17 @@
</div>
{{/if}}
</div>
-<div class="navbar-nav mr-auto">
- <div><a id="nav-app-link" href="{{$url}}" class="nav-link">{{$sel.name}}</a></div>
+{{if $sel.name}}
+<div id="nav-app-link-wrapper" class="navbar-nav mr-auto">
+ <a id="nav-app-link" href="{{$url}}" class="nav-link text-truncate">
+ {{$sel.name}}
+ {{if $sitelocation}}
+ <br><small class="text-muted">{{$sitelocation}}</small>
+ {{/if}}
+ </a>
</div>
{{/if}}
+{{/if}}
<div class="navbar-toggler-right">
{{if $nav.help.6}}
<button id="context-help-btn" class="navbar-toggler border-0" type="button" onclick="contextualHelp(); return false;">