aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/fr/hstrings.php19
-rw-r--r--view/js/autocomplete.js13
-rw-r--r--view/js/main.js38
-rw-r--r--view/js/mod_help.js4
-rwxr-xr-xview/tpl/admin_site.tpl1
-rw-r--r--view/tpl/cloud_header.tpl2
-rwxr-xr-xview/tpl/comment_item.tpl3
-rwxr-xr-xview/tpl/jot-header.tpl88
-rwxr-xr-xview/tpl/photo_album.tpl2
-rwxr-xr-xview/tpl/photos_recent.tpl2
-rwxr-xr-xview/tpl/settings.tpl1
-rwxr-xr-xview/tpl/settings_features.tpl22
-rwxr-xr-xview/tpl/settings_oauth2.tpl35
-rwxr-xr-xview/tpl/settings_oauth2_edit.tpl21
-rwxr-xr-xview/tpl/settings_oauth_edit.tpl1
15 files changed, 244 insertions, 8 deletions
diff --git a/view/fr/hstrings.php b/view/fr/hstrings.php
index d883cc240..fd8676826 100644
--- a/view/fr/hstrings.php
+++ b/view/fr/hstrings.php
@@ -3046,3 +3046,22 @@ App::$strings["Logged out."] = "Deconnecté.";
App::$strings["Failed authentication"] = "Échec de l'authentification";
App::$strings["Help:"] = "Aide :";
App::$strings["Not Found"] = "Introuvable";
+App::$strings["This site requires email verification. After completing this form, please check your email for further instructions."] = "Ce site nécessite une vérification par courriel. Après avoir rempli ce formulaire, veuillez consulter votre courriel pour obtenir des instructions supplémentaires.";
+App::$strings["New Member Links"] = "Liens pour les nouveaux membres";
+App::$strings["Profile Creation"] = "Création de profil";
+App::$strings["Upload profile photo"] = "Téléverser la photo du profil";
+App::$strings["Upload cover photo"] = "Téléverser la photo de couverture";
+App::$strings["Find and Connect with others"] = "Trouver et contacter d'autres personnes";
+App::$strings["View the directory"] = "Voir l'annuaire";
+App::$strings["View friend suggestions"] = "Voir les suggestions d'amis";
+App::$strings["Manage your connections"] = "Gérez vos connexions";
+App::$strings["Communicate"] = "Communiquer";
+App::$strings["View your channel homepage"] = "Voir la page d'accueil de votre canal";
+App::$strings["View your network stream"] = "Visualisez votre flux réseau";
+App::$strings["View public stream"] = "Voir le flux public";
+App::$strings["Activity"] = "Activité";
+App::$strings["Public Stream"] = "Flux public";
+App::$strings["New Events"] = "Nouveaux événements";
+App::$strings["Add Apps"] = "Ajouter des applications";
+App::$strings["Arrange Apps"] = "Organiser les applications";
+
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 07b9bc449..69ccd1fe5 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -243,8 +243,19 @@ function string2bb(element) {
replace: basic_replace,
template: contact_format,
};
+
+ // Autocomplete forums
+ forums = {
+ match: /(^\!)([^\n]{3,})$/,
+ index: 2,
+ search: function(term, callback) { contact_search(term, callback, backend_url, 'f', [], spinelement='#nav-search-spinner'); },
+ replace: basic_replace,
+ template: contact_format
+ };
+
+
this.attr('autocomplete', 'off');
- var a = this.textcomplete([contacts], {className:'acpopup', maxCount:100, zIndex: 1020, appendTo:'nav'});
+ var a = this.textcomplete([contacts,forums], {className:'acpopup', maxCount:100, zIndex: 1020, appendTo:'nav'});
a.on('textComplete:select', function(e, value, strategy) { submit_form(this); });
};
})( jQuery );
diff --git a/view/js/main.js b/view/js/main.js
index e700c4e6e..ab950e4fb 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -25,13 +25,14 @@ var liveRecurse = 0;
var savedTitle = '';
var initialLoad = true;
-// Clear the session storage if we switch channel or log out
+// Clear the session and local storage if we switch channel or log out
var cache_uid = '';
if(sessionStorage.getItem('uid') !== null) {
cache_uid = sessionStorage.getItem('uid');
}
if(cache_uid !== localUser.toString()) {
sessionStorage.clear();
+ localStorage.clear();
sessionStorage.setItem('uid', localUser.toString());
}
@@ -166,6 +167,16 @@ function handle_comment_form(e) {
$('#' + commentElm).addClass('expanded').removeAttr('placeholder');
$('#' + commentElm).attr('tabindex','9');
$('#' + submitElm).attr('tabindex','10');
+
+ if(auto_save_draft) {
+ var commentBody = localStorage.getItem("comment_body");
+ if(commentBody && $('#' + commentElm).val() === '') {
+ $('#' + commentElm).val(commentBody);
+ }
+ } else {
+ localStorage.removeItem("comment_body");
+ }
+
form.find(':not(:visible)').show();
}
@@ -185,6 +196,30 @@ function handle_comment_form(e) {
form.find(':not(.comment-edit-text)').hide();
}
});
+
+ var commentSaveTimer = null;
+ var emptyCommentElm = form.find('.comment-edit-text').attr('id');
+ $(document).on('focusout','#' + emptyCommentElm,function(e){
+ if(commentSaveTimer)
+ clearTimeout(commentSaveTimer);
+ commentSaveChanges(true);
+ commentSaveTimer = null;
+ });
+
+ $(document).on('focusin','#' + emptyCommentElm,function(e){
+ commentSaveTimer = setTimeout(function () {
+ commentSaveChanges(false);
+ },10000);
+ });
+
+ function commentSaveChanges(isFinal = false) {
+ if(auto_save_draft) {
+ localStorage.setItem("comment_body", $('#' + emptyCommentElm).val());
+ if( !isFinal) {
+ commentSaveTimer = setTimeout(commentSaveChanges,10000);
+ }
+ }
+ }
}
function commentClose(obj, id) {
@@ -1106,6 +1141,7 @@ function post_comment(id) {
$("#comment-edit-form-" + id).serialize(),
function(data) {
if(data.success) {
+ localStorage.removeItem("comment_body");
$("#comment-edit-preview-" + id).hide();
$("#comment-edit-wrapper-" + id).hide();
$("#comment-edit-text-" + id).val('');
diff --git a/view/js/mod_help.js b/view/js/mod_help.js
index 8ee89dd61..a37207807 100644
--- a/view/js/mod_help.js
+++ b/view/js/mod_help.js
@@ -53,7 +53,7 @@ $(document).ready(function () {
.removeClass('selected-doco-nav')
.eq(i).addClass('selected-doco-nav');
if (typeof ($('#doco-side-toc li').eq(i).find('a').attr('href').split('#')[1]) !== 'undefined') {
- window.history.pushState({}, '', location.href.split('#')[0] + '#' + $('#doco-side-toc li').eq(i).find('a').attr('href').split('#')[1]);
+ window.history.replaceState({}, '', location.href.split('#')[0] + '#' + $('#doco-side-toc li').eq(i).find('a').attr('href').split('#')[1]);
}
}
});
@@ -100,7 +100,7 @@ $(document).ready(function () {
}
// Update the address bar to reflect the loaded language
- window.history.pushState({}, '', '/' + pathParts.join('/'));
+ window.history.replaceState({}, '', '/' + pathParts.join('/'));
// Highlight the language in the language selector that is currently viewed
$('.lang-selector').find('.lang-choice:contains("' + help_language + '")').addClass('active');
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl
index fb96ef2cf..7e99b2c86 100755
--- a/view/tpl/admin_site.tpl
+++ b/view/tpl/admin_site.tpl
@@ -101,6 +101,7 @@
{{include file="field_input.tpl" field=$maxloadavg}}
{{include file="field_input.tpl" field=$abandon_days}}
{{include file="field_input.tpl" field=$default_expire_days}}
+ {{include file="field_input.tpl" field=$active_expire_days}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
diff --git a/view/tpl/cloud_header.tpl b/view/tpl/cloud_header.tpl
index 307dc8956..642fb1866 100644
--- a/view/tpl/cloud_header.tpl
+++ b/view/tpl/cloud_header.tpl
@@ -6,7 +6,7 @@
<a href="/sharedwithme" class="btn btn-sm btn-outline-secondary"><i class="fa fa-cloud-download"></i>&nbsp;{{$shared}}</a>
{{/if}}
<button id="files-create-btn" class="btn btn-sm btn-primary" onclick="openClose('files-mkdir-tools'); closeMenu('files-upload-tools');"><i class="fa fa-folder-o"></i>&nbsp;{{$create}}</button>
- <button id="files-upload-btn" class="btn btn-sm btn-success" onclick="openClose('files-upload-tools'); closeMenu('files-mkdir-tools');"><i class="fa fa-arrow-circle-o-up"></i>&nbsp;{{$upload}}</button>
+ <button id="files-upload-btn" class="btn btn-sm btn-success" onclick="openClose('files-upload-tools'); closeMenu('files-mkdir-tools');"><i class="fa fa-plus-circle"></i>&nbsp;{{$upload}}</button>
{{/if}}
</div>
diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl
index 3b51971ec..23594677c 100755
--- a/view/tpl/comment_item.tpl
+++ b/view/tpl/comment_item.tpl
@@ -1,3 +1,6 @@
+ <script>
+ var auto_save_draft = {{$auto_save_draft}};
+ </script>
{{if $threaded}}
<div class="comment-wwedit-wrapper threaded" id="comment-edit-wrapper-{{$id}}" style="display: block;">
{{else}}
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index c1dab52d5..991a4c8b1 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -560,3 +560,91 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del
}
});
</script>
+
+
+<script>
+ var postSaveTimer = null;
+
+ function postSaveChanges(action, type) {
+ if({{$auto_save_draft}}) {
+
+ if(action != 'clean') {
+ localStorage.setItem("post_title", $("#jot-title").val());
+ localStorage.setItem("post_body", $("#profile-jot-text").val());
+ if($("#jot-category").length)
+ localStorage.setItem("post_category", $("#jot-category").val());
+ }
+
+ if(action == 'start') {
+ postSaveTimer = setTimeout(function () {
+ postSaveChanges('start');
+ },10000);
+ }
+
+ if(action == 'stop') {
+ clearTimeout(postSaveTimer);
+ postSaveTimer = null;
+ }
+
+ if(action == 'clean') {
+ clearTimeout(postSaveTimer);
+ postSaveTimer = null;
+ localStorage.removeItem("post_title");
+ localStorage.removeItem("post_body");
+ localStorage.removeItem("post_category");
+ }
+ }
+
+ }
+
+ $(document).ready(function() {
+
+ var cleaned = false;
+
+ if({{$auto_save_draft}}) {
+ var postTitle = localStorage.getItem("post_title");
+ var postBody = localStorage.getItem("post_body");
+ var postCategory = (($("#jot-category").length) ? localStorage.getItem("post_category") : '');
+ var openEditor = false;
+
+ if(postTitle) {
+ $('#jot-title').val(postTitle);
+ openEditor = true;
+ }
+ if(postBody) {
+ $('#profile-jot-text').val(postBody);
+ openEditor = true;
+ }
+ if(postCategory) {
+ var categories = postCategory.split(',');
+ categories.forEach(function(cat) {
+ $('#jot-category').tagsinput('add', cat);
+ });
+ openEditor = true;
+ }
+ if(openEditor) {
+ initEditor();
+ }
+ } else {
+ postSaveChanges('clean');
+ }
+
+ $(document).on('submit', '#profile-jot-form', function() {
+ postSaveChanges('clean');
+ cleaned = true;
+ });
+
+ $(document).on('focusout',"#profile-jot-wrapper",function(e){
+ if(! cleaned)
+ postSaveChanges('stop');
+ });
+
+ $(document).on('focusin',"#profile-jot-wrapper",function(e){
+ postSaveTimer = setTimeout(function () {
+ postSaveChanges('start');
+ },10000);
+ });
+
+
+ });
+</script>
diff --git a/view/tpl/photo_album.tpl b/view/tpl/photo_album.tpl
index 678e790ac..de59809f4 100755
--- a/view/tpl/photo_album.tpl
+++ b/view/tpl/photo_album.tpl
@@ -9,7 +9,7 @@
<i class="fa fa-pencil btn btn-outline-secondary btn-sm" title="{{$album_edit.0}}" onclick="openClose('photo-album-edit-wrapper'); closeMenu('photo-upload-form');"></i>
{{/if}}
{{if $can_post}}
- <button class="btn btn-sm btn-success btn-sm" title="{{$usage}}" onclick="openClose('photo-upload-form'); {{if $album_edit.1}}closeMenu('photo-album-edit-wrapper');{{/if}}"><i class="fa fa-arrow-circle-o-up"></i>&nbsp;{{$upload.0}}</button>
+ <button class="btn btn-sm btn-success btn-sm" title="{{$usage}}" onclick="openClose('photo-upload-form'); {{if $album_edit.1}}closeMenu('photo-album-edit-wrapper');{{/if}}"><i class="fa fa-plus-circle"></i>&nbsp;{{$upload.0}}</button>
{{/if}}
</div>
</div>
diff --git a/view/tpl/photos_recent.tpl b/view/tpl/photos_recent.tpl
index a9574aade..d24b362f8 100755
--- a/view/tpl/photos_recent.tpl
+++ b/view/tpl/photos_recent.tpl
@@ -2,7 +2,7 @@
<div class="section-title-wrapper">
<div class="pull-right">
{{if $can_post}}
- <button class="btn btn-sm btn-success acl-form-trigger" title="{{$usage}}" onclick="openClose('photo-upload-form');" data-form_id="photos-upload-form"><i class="fa fa-arrow-circle-o-up"></i>&nbsp;{{$upload.0}}</button>
+ <button class="btn btn-sm btn-success acl-form-trigger" title="{{$usage}}" onclick="openClose('photo-upload-form');" data-form_id="photos-upload-form"><i class="fa fa-plus-circle"></i>&nbsp;{{$upload.0}}</button>
{{/if}}
</div>
<h2>{{$title}}</h2>
diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl
index 0055fa265..d258f1992 100755
--- a/view/tpl/settings.tpl
+++ b/view/tpl/settings.tpl
@@ -145,6 +145,7 @@
{{if $vnotify13}}
{{include file="field_intcheckbox.tpl" field=$vnotify13}}
{{/if}}
+ {{include file="field_intcheckbox.tpl" field=$vnotify14}}
{{include file="field_intcheckbox.tpl" field=$always_show_in_notices}}
{{include file="field_input.tpl" field=$evdays}}
</div>
diff --git a/view/tpl/settings_features.tpl b/view/tpl/settings_features.tpl
index f8c162e17..998199c8e 100755
--- a/view/tpl/settings_features.tpl
+++ b/view/tpl/settings_features.tpl
@@ -1,9 +1,31 @@
+<script>
+ $(document).ready(function() {
+ $('#id_techlevel').change(function() {
+ var techlvl = $('#id_techlevel').val();
+ window.location.href='{{$baseurl}}/settings/features?f=&techlevel=' + techlvl;
+ });
+ });
+</script>
+
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<h2>{{$title}}</h2>
</div>
<form action="settings/features" method="post" autocomplete="off">
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+ {{if ! $techlock}}
+ <div class="section-content-tools-wrapper">
+ {{include file="field_select.tpl" field=$techlevel}}
+ </div>
+ {{else}}
+ <input type="hidden" name="techlevel" value="{{$techlevel.2}}" />
+ {{/if}}
+
+ {{if $hiddens}}
+ {{foreach $hiddens as $k => $v}}
+ <input type="hidden" name="feature_{{$k}}" value="{{$v}}" />
+ {{/foreach}}
+ {{/if}}
<div class="panel-group" id="settings" role="tablist" aria-multiselectable="true">
{{foreach $features as $g => $f}}
<div class="panel">
diff --git a/view/tpl/settings_oauth2.tpl b/view/tpl/settings_oauth2.tpl
new file mode 100755
index 000000000..882d34ea9
--- /dev/null
+++ b/view/tpl/settings_oauth2.tpl
@@ -0,0 +1,35 @@
+<div class="generic-content-wrapper">
+<div class="section-title-wrapper">
+ <h2>{{$title}}</h2>
+</div>
+
+<div class="section-content-tools-wrapper">
+<form action="settings/oauth2" method="post" autocomplete="off">
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+ <div id="profile-edit-links">
+ <ul>
+ <li>
+ <a id="profile-edit-view-link" href="{{$baseurl}}/settings/oauth2/add">{{$add}}</a>
+ </li>
+ </ul>
+ </div>
+
+ {{foreach $apps as $app}}
+ <div class='oauthapp'>
+ {{if $app.client_id}}<h4>{{$app.client_id}}</h4>{{else}}<h4>{{$noname}}</h4>{{/if}}
+ {{if $app.my}}
+ {{if $app.oauth_token}}
+ <div class="settings-submit-wrapper" ><button class="settings-submit" type="submit" name="remove" value="{{$app.oauth_token}}">{{$remove}}</button></div>
+ {{/if}}
+ {{/if}}
+ {{if $app.my}}
+ <a href="{{$baseurl}}/settings/oauth2/edit/{{$app.client_id}}" title="{{$edit}}"><i class="fa fa-pencil btn btn-outline-secondary"></i></a>
+ <a href="{{$baseurl}}/settings/oauth2/delete/{{$app.client_id}}?t={{$form_security_token}}" title="{{$delete}}"><i class="fa fa-trash-o btn btn-outline-secondary"></i></a>
+ {{/if}}
+ </div>
+ {{/foreach}}
+
+</form>
+</div>
+</div>
diff --git a/view/tpl/settings_oauth2_edit.tpl b/view/tpl/settings_oauth2_edit.tpl
new file mode 100755
index 000000000..399c64977
--- /dev/null
+++ b/view/tpl/settings_oauth2_edit.tpl
@@ -0,0 +1,21 @@
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ <h2>{{$title}}</h2>
+ </div>
+<div class="section-content-tools-wrapper">
+<form method="POST">
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+{{include file="field_input.tpl" field=$name}}
+{{include file="field_input.tpl" field=$secret}}
+{{include file="field_input.tpl" field=$redirect}}
+{{include file="field_input.tpl" field=$grant}}
+{{include file="field_input.tpl" field=$scope}}
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
+<input type="submit" name="cancel" class="settings-submit" value="{{$cancel}}" />
+</div>
+
+</form>
+</div>
+</div>
diff --git a/view/tpl/settings_oauth_edit.tpl b/view/tpl/settings_oauth_edit.tpl
index b94dec48a..e44b44723 100755
--- a/view/tpl/settings_oauth_edit.tpl
+++ b/view/tpl/settings_oauth_edit.tpl
@@ -5,7 +5,6 @@
<div class="section-content-tools-wrapper">
<form method="POST">
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
{{include file="field_input.tpl" field=$name}}
{{include file="field_input.tpl" field=$key}}
{{include file="field_input.tpl" field=$secret}}