aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2018-01-30 16:13:30 +0100
committerGitHub <noreply@github.com>2018-01-30 16:13:30 +0100
commit7ac4b477020689572a50dbc777c968263e86f6c4 (patch)
tree470336bcbdf0f989d48fb2c3349bd0ac0513da42 /view
parentc2abbe2c238fa4d66e8a088c7d271acaa7e20876 (diff)
parentd24cf0b85b24cb8d6d10e9fe66fed568f9fb08b2 (diff)
downloadvolse-hubzilla-7ac4b477020689572a50dbc777c968263e86f6c4.tar.gz
volse-hubzilla-7ac4b477020689572a50dbc777c968263e86f6c4.tar.bz2
volse-hubzilla-7ac4b477020689572a50dbc777c968263e86f6c4.zip
Merge pull request #13 from redmatrix/dev
Dev
Diffstat (limited to 'view')
-rw-r--r--view/en-au/register_verify_member.tpl12
-rw-r--r--view/en-gb/register_verify_member.tpl12
-rw-r--r--view/en/register_verify_member.tpl7
-rw-r--r--view/js/main.js22
-rw-r--r--view/pdl/mod_go.pdl6
-rwxr-xr-xview/tpl/admin_accounts.tpl4
-rwxr-xr-xview/tpl/admin_site.tpl1
-rw-r--r--view/tpl/email_validation.tpl16
-rw-r--r--view/tpl/go.tpl16
-rwxr-xr-xview/tpl/hq.tpl10
-rwxr-xr-xview/tpl/jot-header.tpl11
-rw-r--r--view/tpl/notifications_widget.tpl50
12 files changed, 121 insertions, 46 deletions
diff --git a/view/en-au/register_verify_member.tpl b/view/en-au/register_verify_member.tpl
index d1e34be67..9bdd7fa51 100644
--- a/view/en-au/register_verify_member.tpl
+++ b/view/en-au/register_verify_member.tpl
@@ -10,7 +10,12 @@ Login with the password you chose at registration.
We need to verify your email address in order to give you full access.
-If you registered this account, please visit the following link:
+Your validation code is
+
+{{$hash}}
+
+
+If you registered this account, please enter the validation code when requested or visit the following link:
{{$siteurl}}/regver/allow/{{$hash}}
@@ -23,3 +28,8 @@ To deny the request and remove the account, please visit:
Thank you.
+
+--
+Terms Of Service:
+{{$siteurl}}/help/TermsOfService
+
diff --git a/view/en-gb/register_verify_member.tpl b/view/en-gb/register_verify_member.tpl
index d1e34be67..9bdd7fa51 100644
--- a/view/en-gb/register_verify_member.tpl
+++ b/view/en-gb/register_verify_member.tpl
@@ -10,7 +10,12 @@ Login with the password you chose at registration.
We need to verify your email address in order to give you full access.
-If you registered this account, please visit the following link:
+Your validation code is
+
+{{$hash}}
+
+
+If you registered this account, please enter the validation code when requested or visit the following link:
{{$siteurl}}/regver/allow/{{$hash}}
@@ -23,3 +28,8 @@ To deny the request and remove the account, please visit:
Thank you.
+
+--
+Terms Of Service:
+{{$siteurl}}/help/TermsOfService
+
diff --git a/view/en/register_verify_member.tpl b/view/en/register_verify_member.tpl
index 71f0964d4..9bdd7fa51 100644
--- a/view/en/register_verify_member.tpl
+++ b/view/en/register_verify_member.tpl
@@ -10,7 +10,12 @@ Login with the password you chose at registration.
We need to verify your email address in order to give you full access.
-If you registered this account, please visit the following link:
+Your validation code is
+
+{{$hash}}
+
+
+If you registered this account, please enter the validation code when requested or visit the following link:
{{$siteurl}}/regver/allow/{{$hash}}
diff --git a/view/js/main.js b/view/js/main.js
index 8eb02156b..02b0f125c 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -70,11 +70,19 @@ $(document).ready(function() {
if(! $('#nav-' + notifyType + '-sub').hasClass('show')) {
loadNotificationItems(notifyType);
+ sessionStorage.setItem('notification_open', notifyType);
+ }
+ else {
+ sessionStorage.removeItem('notification_open');
}
-
- $(this).data('clicked', true);
});
+ if(sessionStorage.getItem('notification_open') !== null) {
+ var notifyType = sessionStorage.getItem('notification_open');
+ $('#nav-' + notifyType + '-sub').addClass('show');
+ loadNotificationItems(notifyType);
+ }
+
// Allow folks to stop the ajax page updates with the pause/break key
$(document).keydown(function(event) {
if(event.keyCode == '8') {
@@ -446,11 +454,7 @@ function handleNotificationsItems(notifyType, data) {
notify_menu.append(html);
});
- $(".dropdown-menu img[data-src], .notification img[data-src]").each(function(i, el){
- // Replace data-src attribute with src attribute for every image
- $(el).attr('src', $(el).data("src"));
- $(el).removeAttr("data-src");
- });
+ datasrc2src('#notifications .notification img[data-src]');
if($('#tt-' + notifyType + '-only').hasClass('active'))
$('#nav-' + notifyType + '-menu [data-thread_top=false]').hide();
@@ -824,7 +828,7 @@ function liveUpdate(notify_id) {
// else data was valid - reset the recursion counter
liveRecurse = 0;
- if(typeof notify_id !== 'undefined') {
+ if(typeof notify_id !== 'undefined' && notify_id !== 'undefined') {
$.post(
"hq",
{
@@ -932,9 +936,11 @@ function loadNotificationItems(notifyType) {
var pingExCmd = 'ping/' + notifyType + ((localUser != 0) ? '?f=&uid=' + localUser : '');
var clicked = $('[data-type=\'' + notifyType + '\']').data('clicked');
+
if((clicked === undefined) && (sessionStorage.getItem(notifyType + '_notifications_cache') !== null)) {
var cached_data = JSON.parse(sessionStorage.getItem(notifyType + '_notifications_cache'));
handleNotificationsItems(notifyType, cached_data);
+ $('[data-type=\'' + notifyType + '\']').data('clicked',true);
console.log('updating ' + notifyType + ' notifications from cache...');
}
else {
diff --git a/view/pdl/mod_go.pdl b/view/pdl/mod_go.pdl
new file mode 100644
index 000000000..c34898dd5
--- /dev/null
+++ b/view/pdl/mod_go.pdl
@@ -0,0 +1,6 @@
+[region=aside]
+[widget=fullprofile][/widget]
+[/region]
+[region=right_aside]
+[widget=notifications][/widget]
+[/region]
diff --git a/view/tpl/admin_accounts.tpl b/view/tpl/admin_accounts.tpl
index 3535363a0..d6c9591fd 100755
--- a/view/tpl/admin_accounts.tpl
+++ b/view/tpl/admin_accounts.tpl
@@ -41,7 +41,7 @@
</tbody>
</table>
<div class="selectall"><a href="#" onclick="return toggle_selectall('pending_ckbx');">{{$select_all}}</a></div>
- <div class="submit"><input type="submit" name="page_users_deny" value="{{$deny}}"> <input type="submit" name="page_users_approve" value="{{$approve}}"></div>
+ <div class="submit"><input type="submit" name="page_accounts_deny" value="{{$deny}}"> <input type="submit" name="page_accounts_approve" value="{{$approve}}"></div>
{{else}}
<p>{{$no_pending}}</p>
{{/if}}
@@ -80,7 +80,7 @@
</tbody>
</table>
<div class="selectall"><a href="#" onclick="return toggle_selectall('users_ckbx');">{{$select_all}}</a></div>
- <div class="submit"><input type="submit" name="page_users_block" value="{{$block}}/{{$unblock}}"> <input type="submit" name="page_users_delete" value="{{$delete}}" onclick="return confirm_delete_multi()"></div>
+ <div class="submit"><input type="submit" name="page_accounts_block" value="{{$block}}/{{$unblock}}"> <input type="submit" name="page_accounts_delete" value="{{$delete}}" onclick="return confirm_delete_multi()"></div>
{{else}}
NO USERS?!?
{{/if}}
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl
index 50482f03d..0eabe620d 100755
--- a/view/tpl/admin_site.tpl
+++ b/view/tpl/admin_site.tpl
@@ -74,6 +74,7 @@
{{include file="field_select.tpl" field=$access_policy}}
{{include file="field_input.tpl" field=$location}}
{{include file="field_input.tpl" field=$sellpage}}
+ {{include file="field_input.tpl" field=$firstpage}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
diff --git a/view/tpl/email_validation.tpl b/view/tpl/email_validation.tpl
new file mode 100644
index 000000000..f049a040f
--- /dev/null
+++ b/view/tpl/email_validation.tpl
@@ -0,0 +1,16 @@
+<h2>{{$title}}</h2>
+
+<div class="descriptive-paragraph" style="font-size: 1.2em;"><p>{{$desc}}</p></div>
+
+<form action="email_validation" method="post">
+{{include file="field_input.tpl" field=$token}}
+
+<div class="pull-right">
+ <a href="email_resend/{{$email}}" class="btn btn-warning">{{$resend}}</a>
+</div>
+<div class="submit-wrapper" >
+ <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button>
+</div>
+</form>
+<div class="clear"></div>
+
diff --git a/view/tpl/go.tpl b/view/tpl/go.tpl
new file mode 100644
index 000000000..f0f9ee79e
--- /dev/null
+++ b/view/tpl/go.tpl
@@ -0,0 +1,16 @@
+<h2>{{$title}}</h2>
+
+<div class="descriptive-text">
+ <p>{{$m}}</p>
+ <p>{{$m1}}</p>
+</div>
+
+{{if $options}}
+<ul class="nav nav-pills flex-column">
+{{foreach $options as $k => $v}}
+ <li class="nav-item"><a href="{{$k}}" class="nav-link">{{$v}}</a></li>
+{{/foreach}}
+</ul>
+{{/if}}
+
+
diff --git a/view/tpl/hq.tpl b/view/tpl/hq.tpl
index fce11ff83..099d892bb 100755
--- a/view/tpl/hq.tpl
+++ b/view/tpl/hq.tpl
@@ -1,13 +1,3 @@
-{{if $no_messages}}
-<div class="alert alert-warning alert-dismissible fade show" role="alert">
- <button type="button" class="close" data-dismiss="alert" aria-label="Close">
- <span aria-hidden="true">&times;</span>
- </button>
- <h3>{{$no_messages_label.0}}</h3>
- <br>
- {{$no_messages_label.1}}
-</div>
-{{/if}}
<div id="jot-popup">
{{$editor}}
</div>
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index ffaa4e208..0ffc8b349 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -110,10 +110,21 @@ var activeCommentID = 0;
var activeCommentText = '';
$(document).ready(function() {
+
/* enable tinymce on focus and click */
$("#profile-jot-text").focus(enableOnUser);
$("#profile-jot-text").click(enableOnUser);
+ $('#id_mimetype').on('load', jotSetMime);
+ $('#id_mimetype').on('change', jotSetMime);
+
+ function jotSetMime() {
+ var mtype = $('#id_mimetype').val();
+ if(mtype == 'text/bbcode')
+ $('#profile-jot-submit-left').show();
+ else
+ $('#profile-jot-submit-left').hide();
+ }
$('#invisible-wall-file-upload').fileupload({
url: 'wall_attach/{{$nickname}}',
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 69e5e15bc..0f27b1a47 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -21,7 +21,7 @@
};
});
- {{if $module == 'display' || $module == 'hq'}}
+ {{if $module == 'display' || $module == 'hq' || $startpage == 'hq'}}
$(document).on('click', '.notification', function(e) {
var b64mid = $(this).data('b64mid');
var notify_id = $(this).data('notify_id');
@@ -31,30 +31,34 @@
if(b64mid === 'undefined' && notify_id === 'undefined')
return;
- {{if $module == 'display'}}
- history.pushState(stateObj, '', 'display/' + b64mid);
- {{/if}}
- {{if $module == 'hq'}}
- history.pushState(stateObj, '', 'hq/' + b64mid);
- {{/if}}
-
- {{if $module == 'hq'}}
- if(b64mid !== 'undefined') {
- {{else}}
- if(path === 'display' && b64mid) {
- {{/if}}
+ {{if $module != 'hq' && $startpage == 'hq'}}
e.preventDefault();
-
- if(! page_load) {
- if($(this).parent().attr('id') !== 'nav-pubs-menu')
- $(this).fadeOut();
-
- getData(b64mid, notify_id);
+ window.location.href = 'hq/' + b64mid;
+ return;
+ {{else}}
+ {{if $module == 'display'}}
+ history.pushState(stateObj, '', 'display/' + b64mid);
+ {{/if}}
+
+ {{if $module == 'hq'}}
+ history.pushState(stateObj, '', 'hq/' + b64mid);
+ {{/if}}
+
+ {{if $module == 'hq'}}
+ if(b64mid !== 'undefined') {
+ {{else}}
+ if(path === 'display' && b64mid) {
+ {{/if}}
+ e.preventDefault();
+
+ if(! page_load) {
+ getData(b64mid, notify_id);
+ }
+
+ if($('#notifications_wrapper').hasClass('fs'))
+ $('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs');
}
-
- if($('#notifications_wrapper').hasClass('fs'))
- $('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs');
- }
+ {{/if}}
});
{{/if}}