From a5aff7d0c969adb78338e35a1d736ad80462b34b Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Wed, 4 Apr 2018 15:22:38 -0400 Subject: Post body and title are auto-saved --- view/tpl/jot.tpl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'view/tpl') diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index bc9339d4c..90058ab30 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -40,6 +40,38 @@ {{/if}} + +
-- cgit v1.2.3 From 4a45c35c4e0e27b737d80a6f151b0b50aaef3d1e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 5 Apr 2018 21:01:36 -0700 Subject: oauth2 client settings page --- view/tpl/settings_oauth2.tpl | 35 +++++++++++++++++++++++++++++++++++ view/tpl/settings_oauth2_edit.tpl | 21 +++++++++++++++++++++ view/tpl/settings_oauth_edit.tpl | 1 - 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100755 view/tpl/settings_oauth2.tpl create mode 100755 view/tpl/settings_oauth2_edit.tpl (limited to 'view/tpl') 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 @@ +
+
+

{{$title}}

+
+ +
+
+ + + + + {{foreach $apps as $app}} +
+ {{if $app.client_id}}

{{$app.client_id}}

{{else}}

{{$noname}}

{{/if}} + {{if $app.my}} + {{if $app.oauth_token}} +
+ {{/if}} + {{/if}} + {{if $app.my}} + + + {{/if}} +
+ {{/foreach}} + +
+
+
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 @@ +
+
+

{{$title}}

+
+
+
+ +{{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}} + +
+ + +
+ +
+
+
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 @@
- {{include file="field_input.tpl" field=$name}} {{include file="field_input.tpl" field=$key}} {{include file="field_input.tpl" field=$secret}} -- cgit v1.2.3 From 4d08fcf1a7075c933c8b57b9bf1d66acbb19ec07 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 7 Apr 2018 13:29:36 +0200 Subject: Use Add Files/Photos instead of Upload to open the upload dialog --- view/tpl/cloud_header.tpl | 2 +- view/tpl/photo_album.tpl | 2 +- view/tpl/photos_recent.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'view/tpl') 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 @@  {{$shared}} {{/if}} - + {{/if}}
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 @@ {{/if}} {{if $can_post}} - + {{/if}} 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 @@
{{if $can_post}} - + {{/if}}

{{$title}}

-- cgit v1.2.3 From 43cafcc761bc12f442c30ab952164736aa18f9d8 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 8 Apr 2018 14:18:10 -0400 Subject: Auto-save post and comment entry using localStorage in browser. --- view/tpl/jot-header.tpl | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ view/tpl/jot.tpl | 32 ---------------------------- 2 files changed, 55 insertions(+), 32 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index c1dab52d5..2b4284ade 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -560,3 +560,58 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del } }); + + + \ No newline at end of file diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 90058ab30..bc9339d4c 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -40,38 +40,6 @@
{{/if}} - -
-- cgit v1.2.3 From f9ec3c66ff1305ca0647454d27793ac5365f7f4a Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 8 Apr 2018 19:44:21 -0400 Subject: Added feature setting for auto-save, defaulting to enabled. --- view/tpl/comment_item.tpl | 3 +++ view/tpl/jot-header.tpl | 62 ++++++++++++++++++++++++++--------------------- 2 files changed, 38 insertions(+), 27 deletions(-) (limited to 'view/tpl') 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 @@ + {{if $threaded}}
{{else}} diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 2b4284ade..7af344681 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -580,37 +580,45 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del }); function postSaveChanges(isFinal = false, type) { - localStorage.setItem("post_title", $("#jot-title").val()); - localStorage.setItem("post_body", $("#profile-jot-text").val()); - localStorage.setItem("post_category", $("#jot-category").val()); - if( !isFinal) { - postSaveTimer = setTimeout(postSaveChanges,10000); - } + if({{$auto_save_draft}}) { + localStorage.setItem("post_title", $("#jot-title").val()); + localStorage.setItem("post_body", $("#profile-jot-text").val()); + localStorage.setItem("post_category", $("#jot-category").val()); + if( !isFinal) { + postSaveTimer = setTimeout(postSaveChanges,10000); + } + } } $(document).ready(function() { - var postTitle = localStorage.getItem("post_title"); - var postBody = localStorage.getItem("post_body"); - var postCategory = 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(); + if({{$auto_save_draft}}) { + var postTitle = localStorage.getItem("post_title"); + var postBody = localStorage.getItem("post_body"); + var postCategory = 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 { + localStorage.removeItem("post_title"); + localStorage.removeItem("post_body"); + localStorage.removeItem("post_category"); } }); -- cgit v1.2.3 From e0255c0dc45d8c670b865087336b4807d831e0fb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 8 Apr 2018 20:05:30 -0700 Subject: first cut of feature/techlevel merge --- view/tpl/settings_features.tpl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'view/tpl') diff --git a/view/tpl/settings_features.tpl b/view/tpl/settings_features.tpl index f8c162e17..0b65e2524 100755 --- a/view/tpl/settings_features.tpl +++ b/view/tpl/settings_features.tpl @@ -4,6 +4,13 @@
+ {{if ! $techlock}} +
+ {{include file="field_select.tpl" field=$techlevel}} +
+ {{else}} + + {{/if}}
{{foreach $features as $g => $f}}
-- cgit v1.2.3 From e4ee165e296404b5ff6ed8ee252c98313f84de91 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 8 Apr 2018 22:02:48 -0700 Subject: more work merging techlevels and features --- view/tpl/settings_features.tpl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'view/tpl') diff --git a/view/tpl/settings_features.tpl b/view/tpl/settings_features.tpl index 0b65e2524..998199c8e 100755 --- a/view/tpl/settings_features.tpl +++ b/view/tpl/settings_features.tpl @@ -1,3 +1,12 @@ + +

{{$title}}

@@ -11,6 +20,12 @@ {{else}} {{/if}} + + {{if $hiddens}} + {{foreach $hiddens as $k => $v}} + + {{/foreach}} + {{/if}}
{{foreach $features as $g => $f}}
-- cgit v1.2.3 From 887a59066bafeb3061091515970359e702443654 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 10 Apr 2018 00:05:20 -0700 Subject: last commented expiration setting in admin --- view/tpl/admin_site.tpl | 1 + 1 file changed, 1 insertion(+) (limited to 'view/tpl') 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}}
-- cgit v1.2.3 From 91aeb2552308d782970ccff2eaa2ac814bc4a223 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 10 Apr 2018 11:17:20 +0200 Subject: fix autosave content not cleaned after post submission --- view/tpl/jot-header.tpl | 71 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 24 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 7af344681..68f7e7a41 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -563,35 +563,43 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del \ No newline at end of file + $(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); + }); + + + }); + -- cgit v1.2.3 From a2cb7b9ca4e4dabb59f43c9dd0d610792fbd0e63 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 10 Apr 2018 11:37:57 +0200 Subject: do not get or set post category if the field is not available. remove logging. --- view/tpl/jot-header.tpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 68f7e7a41..d6d93a863 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -567,11 +567,12 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del function postSaveChanges(action, type) { if({{$auto_save_draft}}) { - console.log(action); + if(action != 'clean') { localStorage.setItem("post_title", $("#jot-title").val()); localStorage.setItem("post_body", $("#profile-jot-text").val()); - localStorage.setItem("post_category", $("#jot-category").val()); + if($("#jot-category").length) + localStorage.setItem("post_category", $("#jot-category").val()); } if(action == 'start') { @@ -603,8 +604,9 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del if({{$auto_save_draft}}) { var postTitle = localStorage.getItem("post_title"); var postBody = localStorage.getItem("post_body"); - var postCategory = localStorage.getItem("post_category"); + var postCategory = (($("#jot-category").length) ? localStorage.getItem("post_category") : ''); var openEditor = false; + if(postTitle) { $('#jot-title').val(postTitle); openEditor = true; -- cgit v1.2.3 From e294dfa7602d6283a776625167deeb84d11cf2e0 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 11 Apr 2018 08:17:30 +0200 Subject: wrong function --- view/tpl/jot-header.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index d6d93a863..991a4c8b1 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -626,7 +626,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del initEditor(); } } else { - autoSaveCleanup(); + postSaveChanges('clean'); } $(document).on('submit', '#profile-jot-form', function() { -- cgit v1.2.3 From fee258edbe0fe20b9c5ba66968fabe15699c6458 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 11 Apr 2018 11:49:33 +0200 Subject: allow to toggle visibility of likes/dislikes in notifications --- view/tpl/settings.tpl | 1 + 1 file changed, 1 insertion(+) (limited to 'view/tpl') 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}}
-- cgit v1.2.3