From 5456ee7f655b854c37cddf0479f0d8757802ca86 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 22 Feb 2018 21:45:00 -0800 Subject: cloud 'view-as-tiles' toggle wasn't available (at all) for guests and they are the most likely to prefer that view. Fix that and make tiles the default view for guests, and list mode the default view for the channel owner. --- view/tpl/cloud_header.tpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'view') diff --git a/view/tpl/cloud_header.tpl b/view/tpl/cloud_header.tpl index 468f2febc..307dc8956 100644 --- a/view/tpl/cloud_header.tpl +++ b/view/tpl/cloud_header.tpl @@ -1,14 +1,15 @@
- {{if $actionspanel}}
+ {{if $actionspanel}} {{if $is_owner}}  {{$shared}} {{/if}} + {{/if}}
- {{/if}} +

{{$header}}

-- cgit v1.2.3 From 5e53f36f340472c593d88e40d69628eac017f441 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 22 Feb 2018 23:54:43 -0800 Subject: mod_new_channel: don't require nickname validation after name validation (which generates a valid nickname). Enable the submit button as long as there are no errors. --- view/js/mod_new_channel.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'view') diff --git a/view/js/mod_new_channel.js b/view/js/mod_new_channel.js index 7ae59032a..e78de2596 100644 --- a/view/js/mod_new_channel.js +++ b/view/js/mod_new_channel.js @@ -11,6 +11,9 @@ $("#help_name").html(""); zFormError("#help_name",data.error); } + else { + $("#newchannel-submit-button").removeAttr('disabled'); + } $("#name-spinner").hide(); }); }); -- cgit v1.2.3 From 3dd64e7916872d21122c8184abb80eaa5a79a3fc Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 23 Feb 2018 13:21:49 -0800 Subject: usability: click your own profile photo to change it instead of hunting it down in the profile edit navmenu. We still need work on the 'or use a photo from your albums' to use something like the photo selection widget in the post editor as you otherwise have to track down the 'use as profile photo' entry in the photo detail navmenu instead of just clicking an image. --- view/tpl/profile_vcard.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view') diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index 0f30e5816..07e6dcc0a 100755 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -1,6 +1,6 @@
{{if ! $zcard}} -
{{$profile.fullname}}
+
{{if $editmenu}}{{/if}}{{$profile.fullname}}{{if $editmenu}}{{/if}}
{{/if}} {{if $connect}} -- cgit v1.2.3 From 2d91aed183a08a78bc2cc0f3554f3d4c277ae798 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 23 Feb 2018 19:23:17 -0800 Subject: use embed photos javascript widget to select existing photos for profile and cover photos --- view/js/mod_cover_photo.js | 83 ++++++++++++++++++++++++++++++++++++++++++++ view/js/mod_profile_photo.js | 83 ++++++++++++++++++++++++++++++++++++++++++++ view/tpl/cover_photo.tpl | 26 ++++++++++++-- view/tpl/profile_photo.tpl | 29 +++++++++++++++- 4 files changed, 218 insertions(+), 3 deletions(-) create mode 100644 view/js/mod_cover_photo.js create mode 100644 view/js/mod_profile_photo.js (limited to 'view') diff --git a/view/js/mod_cover_photo.js b/view/js/mod_cover_photo.js new file mode 100644 index 000000000..b9af8ce5c --- /dev/null +++ b/view/js/mod_cover_photo.js @@ -0,0 +1,83 @@ + var initializeEmbedPhotoDialog = function () { + $('.embed-photo-selected-photo').each(function (index) { + $(this).removeClass('embed-photo-selected-photo'); + }); + getPhotoAlbumList(); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('show'); + }; + + var choosePhotoFromAlbum = function (album) { + $.post("embedphotos/album", {name: album}, + function(data) { + if (data['status']) { + $('#embedPhotoModalLabel').html("{{$modalchooseimages}}"); + $('#embedPhotoModalBodyAlbumDialog').html('\ + ') + $('#embedPhotoModalBodyAlbumDialog').append(data['content']); + $('#embedPhotoModalBodyAlbumDialog').click(function (evt) { + evt.preventDefault(); + var image = document.getElementById(evt.target.id); + if (typeof($(image).parent()[0]) !== 'undefined') { + var imageparent = document.getElementById($(image).parent()[0].id); + $(imageparent).toggleClass('embed-photo-selected-photo'); + } + }); + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); + $('#embed-photo-OKButton').click(function () { + $('.embed-photo-selected-photo').each(function (index) { + var href = $(this).attr('href'); + $.post("embedphotos/photolink", {href: href}, + function(ddata) { + if (ddata['status']) { + window.location.href = 'cover_photo/use/' + ddata['resource_id']; + } else { + window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); + } + return false; + }, + 'json'); + }); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + }); + } else { + window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; + + var getPhotoAlbumList = function () { + $.post("embedphotos/albumlist", {}, + function(data) { + if (data['status']) { + var albums = data['albumlist']; //JSON.parse(data['albumlist']); + $('#embedPhotoModalLabel').html("{{$modalchoosealbum}}"); + $('#embedPhotoModalBodyAlbumList').html(''); + for(var i=0; i' + albumName + ''; + albumLink += ''; + $('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink); + } + $('#embedPhotoModalBodyAlbumDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none'); + } else { + window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; diff --git a/view/js/mod_profile_photo.js b/view/js/mod_profile_photo.js new file mode 100644 index 000000000..76b120684 --- /dev/null +++ b/view/js/mod_profile_photo.js @@ -0,0 +1,83 @@ + var initializeEmbedPhotoDialog = function () { + $('.embed-photo-selected-photo').each(function (index) { + $(this).removeClass('embed-photo-selected-photo'); + }); + getPhotoAlbumList(); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('show'); + }; + + var choosePhotoFromAlbum = function (album) { + $.post("embedphotos/album", {name: album}, + function(data) { + if (data['status']) { + $('#embedPhotoModalLabel').html("{{$modalchooseimages}}"); + $('#embedPhotoModalBodyAlbumDialog').html('\ + ') + $('#embedPhotoModalBodyAlbumDialog').append(data['content']); + $('#embedPhotoModalBodyAlbumDialog').click(function (evt) { + evt.preventDefault(); + var image = document.getElementById(evt.target.id); + if (typeof($(image).parent()[0]) !== 'undefined') { + var imageparent = document.getElementById($(image).parent()[0].id); + $(imageparent).toggleClass('embed-photo-selected-photo'); + } + }); + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); + $('#embed-photo-OKButton').click(function () { + $('.embed-photo-selected-photo').each(function (index) { + var href = $(this).attr('href'); + $.post("embedphotos/photolink", {href: href}, + function(ddata) { + if (ddata['status']) { + window.location.href = 'profile_photo/use/' + ddata['resource_id']; + } else { + window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); + } + return false; + }, + 'json'); + }); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + }); + } else { + window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; + + var getPhotoAlbumList = function () { + $.post("embedphotos/albumlist", {}, + function(data) { + if (data['status']) { + var albums = data['albumlist']; //JSON.parse(data['albumlist']); + $('#embedPhotoModalLabel').html("{{$modalchoosealbum}}"); + $('#embedPhotoModalBodyAlbumList').html(''); + for(var i=0; i' + albumName + ''; + albumLink += ''; + $('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink); + } + $('#embedPhotoModalBodyAlbumDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none'); + } else { + window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl index 4352501ae..28bc7dc24 100755 --- a/view/tpl/cover_photo.tpl +++ b/view/tpl/cover_photo.tpl @@ -21,9 +21,31 @@
-
+ diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index ca107bfcc..8dc640e35 100755 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -22,6 +22,8 @@ {{else}} + + @@ -40,9 +44,32 @@
-
+ + -- cgit v1.2.3 From 59dafb610d049c8b19a038871fa282231f809c93 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 23 Feb 2018 19:36:46 -0800 Subject: style the 'use existing' button a wee bit --- view/tpl/cover_photo.tpl | 3 +-- view/tpl/profile_photo.tpl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'view') diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl index 28bc7dc24..f2758b36d 100755 --- a/view/tpl/cover_photo.tpl +++ b/view/tpl/cover_photo.tpl @@ -22,9 +22,8 @@
diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index 8dc640e35..04d04d549 100755 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -45,9 +45,8 @@
-- cgit v1.2.3 From 7ddf51722cdbe2d69084b7e9597fc6b11aeeb686 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 23 Feb 2018 19:43:05 -0800 Subject: style the buttons even more --- view/tpl/cover_photo.tpl | 4 ++-- view/tpl/profile_photo.tpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'view') diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl index f2758b36d..7ad4482e4 100755 --- a/view/tpl/cover_photo.tpl +++ b/view/tpl/cover_photo.tpl @@ -22,8 +22,8 @@
diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index 04d04d549..1f468c2e5 100755 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -45,8 +45,8 @@
-- cgit v1.2.3 From c618bfc607498998916f01fd9c6985c2ecd47356 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 24 Feb 2018 19:42:39 +0100 Subject: mark connections where we do not have post_comments permissions with an no entry sign. --- view/css/mod_connections.css | 8 +++++++- view/css/mod_viewconnections.css | 6 ++++++ view/css/widgets.css | 7 +++++++ view/theme/redbasic/css/style.css | 5 +++++ view/tpl/connection_template.tpl | 7 ++++++- view/tpl/contact_template.tpl | 3 +++ view/tpl/micropro_img.tpl | 2 +- 7 files changed, 35 insertions(+), 3 deletions(-) (limited to 'view') diff --git a/view/css/mod_connections.css b/view/css/mod_connections.css index 00e6e2a70..4c26193b4 100644 --- a/view/css/mod_connections.css +++ b/view/css/mod_connections.css @@ -36,4 +36,10 @@ .connphone { color: green; -} \ No newline at end of file +} + +.contact-photo-wrapper .oneway-overlay { + margin-top: -25px; + margin-left: 53px; + font-size: 20px; +} diff --git a/view/css/mod_viewconnections.css b/view/css/mod_viewconnections.css index 56add4cac..1b0c7ab62 100644 --- a/view/css/mod_viewconnections.css +++ b/view/css/mod_viewconnections.css @@ -31,3 +31,9 @@ .contact-entry-end { clear: both; } + +.contact-entry-photo-wrapper .oneway-overlay { + margin-top: 25px; + margin-left: -25px; + font-size: 20px; +} diff --git a/view/css/widgets.css b/view/css/widgets.css index a32ac045b..9cfcb4a88 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -216,3 +216,10 @@ a.wikilist { #notifications { margin-bottom: 1rem; } + +/* contact block */ +.contact-block-div .oneway-overlay { + font-size: 20px; + margin-left: -25px; + margin-top: 25px; +} diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 1611cda60..75992468e 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1800,3 +1800,8 @@ dl.bb-dl > dd > li { .caption-visible { max-height: 75%; } + +.oneway-overlay { + position: absolute; + text-shadow: -2px 0 1px #fff, 0 2px 1px#fff, 2px 0 1px #fff, 0 -2px 1px #fff; +} diff --git a/view/tpl/connection_template.tpl b/view/tpl/connection_template.tpl index 8e49c9e27..4543a69d0 100755 --- a/view/tpl/connection_template.tpl +++ b/view/tpl/connection_template.tpl @@ -18,7 +18,12 @@
- {{$contact.name}} + + {{$contact.name}} + + {{if $contact.oneway}} + + {{/if}}
{{if $contact.status}} diff --git a/view/tpl/contact_template.tpl b/view/tpl/contact_template.tpl index 3d1bfa4a4..2a2f996f4 100755 --- a/view/tpl/contact_template.tpl +++ b/view/tpl/contact_template.tpl @@ -1,6 +1,9 @@
{{$contact.name}} + {{if $contact.oneway}} + + {{/if}}
{{$contact.name}}
diff --git a/view/tpl/micropro_img.tpl b/view/tpl/micropro_img.tpl index a7c5973f3..7464430b5 100755 --- a/view/tpl/micropro_img.tpl +++ b/view/tpl/micropro_img.tpl @@ -1 +1 @@ -
+ -- cgit v1.2.3 From 3153129e2eb968a189a8a7050d06892cbc13c651 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 24 Feb 2018 13:20:59 -0800 Subject: make the profile photo image picker work correctly with multiple profiles. --- view/js/mod_profile_photo.js | 4 +++- view/tpl/profile_photo.tpl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'view') diff --git a/view/js/mod_profile_photo.js b/view/js/mod_profile_photo.js index 76b120684..832da764b 100644 --- a/view/js/mod_profile_photo.js +++ b/view/js/mod_profile_photo.js @@ -37,7 +37,9 @@ $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { - window.location.href = 'profile_photo/use/' + ddata['resource_id']; + var pf = $('#profile-photo-profiles').val(); + var prof = ((typeof pf !== 'undefined') ? '?f=&pf=' + pf : ''); + window.location.href = 'profile_photo/use/' + ddata['resource_id'] + prof; } else { window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); } diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index 1f468c2e5..832f135f3 100755 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -27,7 +27,7 @@
-- cgit v1.2.3 From 04ec35d9cc39cbf62c8db2818574c1f6d56f2a20 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 25 Feb 2018 19:25:00 -0800 Subject: hubzilla issue #979 - alter image selection widget to accept/submit on choose (jot, wiki, cover_photo, profile_photo) --- view/js/mod_cover_photo.js | 23 ++++++++++------------- view/js/mod_profile_photo.js | 23 ++++++++++------------- view/tpl/cover_photo.tpl | 4 ---- view/tpl/jot-header.tpl | 20 ++++++++------------ view/tpl/jot.tpl | 4 ---- view/tpl/profile_photo.tpl | 6 ------ view/tpl/wiki.tpl | 41 +++++++++++++++++------------------------ 7 files changed, 45 insertions(+), 76 deletions(-) (limited to 'view') diff --git a/view/js/mod_cover_photo.js b/view/js/mod_cover_photo.js index b9af8ce5c..5b64b8b91 100644 --- a/view/js/mod_cover_photo.js +++ b/view/js/mod_cover_photo.js @@ -27,13 +27,7 @@ if (typeof($(image).parent()[0]) !== 'undefined') { var imageparent = document.getElementById($(image).parent()[0].id); $(imageparent).toggleClass('embed-photo-selected-photo'); - } - }); - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - $('#embed-photo-OKButton').click(function () { - $('.embed-photo-selected-photo').each(function (index) { - var href = $(this).attr('href'); + var href = $(imageparent).attr('href'); $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { @@ -42,13 +36,16 @@ window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); } return false; - }, - 'json'); - }); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); + }, + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } }); + + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); } else { window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); } diff --git a/view/js/mod_profile_photo.js b/view/js/mod_profile_photo.js index 832da764b..c05c8e25e 100644 --- a/view/js/mod_profile_photo.js +++ b/view/js/mod_profile_photo.js @@ -27,13 +27,7 @@ if (typeof($(image).parent()[0]) !== 'undefined') { var imageparent = document.getElementById($(image).parent()[0].id); $(imageparent).toggleClass('embed-photo-selected-photo'); - } - }); - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - $('#embed-photo-OKButton').click(function () { - $('.embed-photo-selected-photo').each(function (index) { - var href = $(this).attr('href'); + var href = $(imageparent).attr('href'); $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { @@ -44,13 +38,16 @@ window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); } return false; - }, - 'json'); - }); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); + }, + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } }); + + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); } else { window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); } diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl index 7ad4482e4..cbcf46320 100755 --- a/view/tpl/cover_photo.tpl +++ b/view/tpl/cover_photo.tpl @@ -41,10 +41,6 @@
-
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 0ffc8b349..c1dab52d5 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -459,13 +459,7 @@ var activeCommentText = ''; if (typeof($(image).parent()[0]) !== 'undefined') { var imageparent = document.getElementById($(image).parent()[0].id); $(imageparent).toggleClass('embed-photo-selected-photo'); - } - }); - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - $('#embed-photo-OKButton').click(function () { - $('.embed-photo-selected-photo').each(function (index) { - var href = $(this).attr('href'); + var href = $(imageparent).attr('href'); $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { @@ -476,12 +470,14 @@ var activeCommentText = ''; } return false; }, - 'json'); - }); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } }); + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); } else { window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); } diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 13e7602be..bc9339d4c 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -293,10 +293,6 @@
- diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index 832f135f3..edde6af3f 100755 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -35,8 +35,6 @@
{{/if}} - -
@@ -65,10 +63,6 @@
- diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index f1ab1ebad..2be323deb 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -91,10 +91,6 @@
- @@ -391,16 +387,10 @@ if (typeof($(image).parent()[0]) !== 'undefined') { var imageparent = document.getElementById($(image).parent()[0].id); $(imageparent).toggleClass('embed-photo-selected-photo'); - } - }); - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - $('#embed-photo-OKButton').click(function () { - $('.embed-photo-selected-photo').each(function (index) { - var href = $(this).attr('href'); - $.post("embedphotos/photolink", {href: href}, - function(ddata) { - if (ddata['status']) { + var href = $(imageparent).attr('href'); + $.post("embedphotos/photolink", {href: href}, + function(ddata) { + if (ddata['status']) { {{if !$mimeType || $mimeType == 'text/markdown'}} var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '\n![image]($1)' ) editor.getSession().insert(editor.getCursorPosition(), imgURL) @@ -408,17 +398,20 @@ var currentContent = $('#editor').val(); $('#editor').val(currentContent + ddata['photolink']); {{/if}} - } else { - window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); - } - return false; + } else { + window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); + } + return false; }, - 'json'); - }); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); - }); + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } + }); + + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); } else { window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); } -- cgit v1.2.3 From d2ed3a9abbb5c68d1a02eae629bc103aa43a1263 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 25 Feb 2018 21:40:19 -0800 Subject: provide opt-out link and text with notification emails --- view/tpl/email_notify_html.tpl | 3 +++ view/tpl/email_notify_text.tpl | 1 + 2 files changed, 4 insertions(+) (limited to 'view') diff --git a/view/tpl/email_notify_html.tpl b/view/tpl/email_notify_html.tpl index 5b4954c8e..f4e12d793 100755 --- a/view/tpl/email_notify_html.tpl +++ b/view/tpl/email_notify_html.tpl @@ -21,6 +21,9 @@ {{$hitemlink}} {{$thanks}} {{$site_admin}} + + {{$opt_out1}} + {{$opt_out2}} diff --git a/view/tpl/email_notify_text.tpl b/view/tpl/email_notify_text.tpl index 56925c18b..5f1984edb 100755 --- a/view/tpl/email_notify_text.tpl +++ b/view/tpl/email_notify_text.tpl @@ -11,3 +11,4 @@ {{$thanks}} {{$site_admin}} +{{$opt_out1}} {{$opt_out2}} \ No newline at end of file -- cgit v1.2.3 From a5f843ba9ba3dd3ce9ad22a89d57dfcb5fa46586 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 26 Feb 2018 11:05:48 +0100 Subject: switch to fork-awesome --- view/theme/redbasic/php/theme_init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view') diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php index 73ae8f6d2..d9750de42 100644 --- a/view/theme/redbasic/php/theme_init.php +++ b/view/theme/redbasic/php/theme_init.php @@ -1,6 +1,6 @@ Date: Mon, 26 Feb 2018 12:54:26 +0100 Subject: change fontname in css and fix issue with unicode characters --- view/css/widgets.css | 2 +- view/theme/redbasic/css/style.css | 12 ++---------- view/tpl/acl_selector.tpl | 2 +- view/tpl/navbar_default.tpl | 2 +- view/tpl/navbar_tucson.tpl | 2 +- 5 files changed, 6 insertions(+), 14 deletions(-) (limited to 'view') diff --git a/view/css/widgets.css b/view/css/widgets.css index 9cfcb4a88..03150c67a 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -180,7 +180,7 @@ a.wikilist { } .notifications-textinput input { - font-family: FontAwesome, sans-serif; + font-family: sans-serif, ForkAwesome; } .notifications-textinput { diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 75992468e..9af1c461e 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -604,14 +604,6 @@ footer { padding: .15rem .5rem; } -#nav-search-text::-webkit-input-placeholder { - font-family: FontAwesome, sans-serif; -} - -#nav-search-text::-moz-placeholder { - font-family: FontAwesome, sans-serif; -} - nav .acpopup { top: 46px !important; margin-left: -35px; @@ -842,12 +834,12 @@ div.jGrowl div.jGrowl-notification { #acl-search::-webkit-input-placeholder { /* non-fontawesome fonts set a fallback for text parts of the placeholder*/ - font-family: FontAwesome, sans-serif, arial, freesans; + font-family: ForkAwesome, sans-serif, arial, freesans; } #acl-search::-moz-placeholder { /* non-fontawesome fonts set a fallback for text parts of the placeholder*/ - font-family: FontAwesome, sans-serif, arial, freesans; + font-family: ForkAwesome, sans-serif, arial, freesans; } .acl-list-item { diff --git a/view/tpl/acl_selector.tpl b/view/tpl/acl_selector.tpl index f4f851c8a..e032071b3 100755 --- a/view/tpl/acl_selector.tpl +++ b/view/tpl/acl_selector.tpl @@ -31,7 +31,7 @@
- + {{$showlimitedDesc}}
diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl index 2c9570938..b0b3198c6 100755 --- a/view/tpl/navbar_default.tpl +++ b/view/tpl/navbar_default.tpl @@ -120,7 +120,7 @@

') - $('#embedPhotoModalBodyAlbumDialog').append(data['content']); - $('#embedPhotoModalBodyAlbumDialog').click(function (evt) { - evt.preventDefault(); - var image = document.getElementById(evt.target.id); - if (typeof($(image).parent()[0]) !== 'undefined') { - var imageparent = document.getElementById($(image).parent()[0].id); - $(imageparent).toggleClass('embed-photo-selected-photo'); - var href = $(imageparent).attr('href'); - $.post("embedphotos/photolink", {href: href}, - function(ddata) { - if (ddata['status']) { - window.location.href = 'cover_photo/use/' + ddata['resource_id']; - } else { - window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); - } - return false; - }, - 'json'); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); - } - }); - - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - } else { - window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); - } - return false; - }, - 'json'); - }; - - var getPhotoAlbumList = function () { - $.post("embedphotos/albumlist", {}, - function(data) { - if (data['status']) { - var albums = data['albumlist']; //JSON.parse(data['albumlist']); - $('#embedPhotoModalLabel').html("{{$modalchoosealbum}}"); - $('#embedPhotoModalBodyAlbumList').html(''); - for(var i=0; i' + albumName + ''; - albumLink += ''; - $('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink); - } - $('#embedPhotoModalBodyAlbumDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none'); - } else { - window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']); - } - return false; - }, - 'json'); - }; diff --git a/view/js/mod_profile_photo.js b/view/js/mod_profile_photo.js deleted file mode 100644 index c05c8e25e..000000000 --- a/view/js/mod_profile_photo.js +++ /dev/null @@ -1,82 +0,0 @@ - var initializeEmbedPhotoDialog = function () { - $('.embed-photo-selected-photo').each(function (index) { - $(this).removeClass('embed-photo-selected-photo'); - }); - getPhotoAlbumList(); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('show'); - }; - - var choosePhotoFromAlbum = function (album) { - $.post("embedphotos/album", {name: album}, - function(data) { - if (data['status']) { - $('#embedPhotoModalLabel').html("{{$modalchooseimages}}"); - $('#embedPhotoModalBodyAlbumDialog').html('\ - ') - $('#embedPhotoModalBodyAlbumDialog').append(data['content']); - $('#embedPhotoModalBodyAlbumDialog').click(function (evt) { - evt.preventDefault(); - var image = document.getElementById(evt.target.id); - if (typeof($(image).parent()[0]) !== 'undefined') { - var imageparent = document.getElementById($(image).parent()[0].id); - $(imageparent).toggleClass('embed-photo-selected-photo'); - var href = $(imageparent).attr('href'); - $.post("embedphotos/photolink", {href: href}, - function(ddata) { - if (ddata['status']) { - var pf = $('#profile-photo-profiles').val(); - var prof = ((typeof pf !== 'undefined') ? '?f=&pf=' + pf : ''); - window.location.href = 'profile_photo/use/' + ddata['resource_id'] + prof; - } else { - window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); - } - return false; - }, - 'json'); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); - } - }); - - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - } else { - window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); - } - return false; - }, - 'json'); - }; - - var getPhotoAlbumList = function () { - $.post("embedphotos/albumlist", {}, - function(data) { - if (data['status']) { - var albums = data['albumlist']; //JSON.parse(data['albumlist']); - $('#embedPhotoModalLabel').html("{{$modalchoosealbum}}"); - $('#embedPhotoModalBodyAlbumList').html(''); - for(var i=0; i' + albumName + ''; - albumLink += ''; - $('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink); - } - $('#embedPhotoModalBodyAlbumDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none'); - } else { - window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']); - } - return false; - }, - 'json'); - }; diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl index cbcf46320..829a3a556 100755 --- a/view/tpl/cover_photo.tpl +++ b/view/tpl/cover_photo.tpl @@ -1,3 +1,86 @@ + +

{{$title}}

diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index edde6af3f..e48d05330 100755 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -1,3 +1,89 @@ + + +

{{$title}}

-- cgit v1.2.3 From 48b1042347d098672e583010fe9dbf71eb81623c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 7 Mar 2018 16:59:55 -0800 Subject: hashtag autocomplete --- view/js/autocomplete.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 01def9900..2d017db18 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -74,6 +74,10 @@ function bbco_format(item) { return ""; } +function tag_format(item) { + return ""; +} + function editor_replace(item) { if(typeof item.replace !== 'undefined') { return '$1$2' + item.replace; @@ -202,6 +206,16 @@ function string2bb(element) { }; + // Autocomplete hashtags + tags = { + match: /(^|\s)(\#)([^ \n]{2,})$/, + index: 3, + search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term) === 0 ? entry : null; })); }); }, + replace: function(item) { return "$1$2" + item.text + ' '; }, + template: tag_format + }; + + smilies = { match: /(^|\s)(:[a-z_:]{2,})$/, index: 2, @@ -211,7 +225,7 @@ function string2bb(element) { template: smiley_format }; this.attr('autocomplete','off'); - this.textcomplete([contacts,forums,smilies], {className:'acpopup', zIndex:1020}); + this.textcomplete([contacts,forums,smilies,tags], {className:'acpopup', zIndex:1020}); }; })( jQuery ); -- cgit v1.2.3 From 7ac70e1f2375b4a320c27ca4e50f75ee0b958fe4 Mon Sep 17 00:00:00 2001 From: "Mathieu \"Thrar\" Bacou" Date: Thu, 8 Mar 2018 20:14:44 +0100 Subject: Fix code background in wiki pages Fix needed after commit c444e40c016c0faaec604335093b19661b3585b7 --- view/theme/redbasic/schema/dark.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'view') diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css index 0a142a07f..98e2bac9a 100644 --- a/view/theme/redbasic/schema/dark.css +++ b/view/theme/redbasic/schema/dark.css @@ -343,6 +343,10 @@ pre { border:1px solid #090909; } +#wiki-content-container code { + background: #000; +} + .notif-item a { color: #ccc; } -- cgit v1.2.3 From 76a80060034b381ac14d9d897b18c9d650347dd8 Mon Sep 17 00:00:00 2001 From: "Mathieu \"Matbac\" Bacou" Date: Thu, 8 Mar 2018 20:56:23 +0100 Subject: Fix background of tags field --- view/theme/redbasic/schema/dark.css | 38 ++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'view') diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css index 98e2bac9a..edc6e5f65 100644 --- a/view/theme/redbasic/schema/dark.css +++ b/view/theme/redbasic/schema/dark.css @@ -20,8 +20,18 @@ textarea, input, select margin-bottom: 5px; } +#jot-category-wrap { + background: #000; + border-bottom: none; + margin-bottom: 5px; +} + +.bootstrap-tagsinput { + background: #333; +} + optgroup { - color: #CCC !important; + color: #CCC !important; } option { @@ -132,7 +142,7 @@ option { .abook-self { border: 1px solid #222; color: #555; - background-color:#111; + background-color:#111; } .modal-content { @@ -208,7 +218,7 @@ a.btn, aside a { } .btn-danger:hover, .btn-danger:focus, form#chat-destroy > input:hover, form#chat-destroy > input:focus { color: #FFF !important; - background-color: #C9302C !important; + background-color: #C9302C !important; border-color: #AC2925 !important; } @@ -278,7 +288,7 @@ nav .dropdown-menu { border-bottom:1px solid #333; } -.nav-tabs .nav-link.active { +.nav-tabs .nav-link.active { color: #fff; background-color: #111; border-color: #333; @@ -297,7 +307,7 @@ aside .nav > li > a:hover, aside .nav > li > a:focus { background-color: #222; } -a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link { +a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link { font-weight: bold; } @@ -356,23 +366,23 @@ pre { } .dropdown-menu { - background-color: #222; + background-color: #222; } .dropdown-menu >li > a { - color: #ccc; + color: #ccc; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { - color: #ddd; - background-color: #333; + color: #ddd; + background-color: #333; background-image: none; } .open .dropdown-toggle.btn-default, .open .dropdown-toggle.btn-default:focus { - color: #ccc; - background-color: #222; - border-color: #222; + color: #ccc; + background-color: #222; + border-color: #222; } .pmenu-item:hover a { @@ -448,7 +458,7 @@ pre { .profile-match-wrapper { - width: 150px; + width: 150px; height: 120px; border: none; } @@ -466,5 +476,3 @@ pre { .widget-nav-pills-checkbox:hover + a { background-color: #222; } - - -- cgit v1.2.3 From f9cca2422adb05db69c13ebd48d79e6108291d8f Mon Sep 17 00:00:00 2001 From: "Mathieu \"Matbac\" Bacou" Date: Thu, 8 Mar 2018 21:02:51 +0100 Subject: Remove useless background spec for category field --- view/theme/redbasic/schema/dark.css | 1 - 1 file changed, 1 deletion(-) (limited to 'view') diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css index edc6e5f65..ebcfcdd13 100644 --- a/view/theme/redbasic/schema/dark.css +++ b/view/theme/redbasic/schema/dark.css @@ -21,7 +21,6 @@ textarea, input, select } #jot-category-wrap { - background: #000; border-bottom: none; margin-bottom: 5px; } -- cgit v1.2.3 From 500b141341451b5dcf31b7818c2e085cd7a98303 Mon Sep 17 00:00:00 2001 From: "Mathieu \"Matbac\" Bacou" Date: Thu, 8 Mar 2018 21:12:33 +0100 Subject: Uniformize title input with other input fields Add rounded corners to mimic categories input field and main text area. --- view/theme/redbasic/schema/dark.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'view') diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css index ebcfcdd13..d0154bfb1 100644 --- a/view/theme/redbasic/schema/dark.css +++ b/view/theme/redbasic/schema/dark.css @@ -15,6 +15,10 @@ textarea, input, select padding: 10px 0; } +#jot-title { + border-radius: 3px; +} + #jot-title-wrap { border-bottom: none; margin-bottom: 5px; -- cgit v1.2.3 From 3ee35b83c2651b9c9ab6a27cab4ea6517375744f Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 8 Mar 2018 14:23:34 -0800 Subject: notifications-btn-1 does not actually require the text-white class and this is known to cause issues on dark themes --- view/tpl/navbar_default.tpl | 2 +- view/tpl/navbar_tucson.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'view') diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl index b0b3198c6..92b067bcb 100755 --- a/view/tpl/navbar_default.tpl +++ b/view/tpl/navbar_default.tpl @@ -80,7 +80,7 @@ {{if $localuser || $nav.pubs}} - {{/if}} diff --git a/view/tpl/navbar_tucson.tpl b/view/tpl/navbar_tucson.tpl index b0b3198c6..92b067bcb 100755 --- a/view/tpl/navbar_tucson.tpl +++ b/view/tpl/navbar_tucson.tpl @@ -80,7 +80,7 @@ {{if $localuser || $nav.pubs}} - {{/if}} -- cgit v1.2.3 From a417389934933af64e631c6372d410cbf864450a Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 10 Mar 2018 13:20:20 -0800 Subject: trim expects error ... in admin/site --- view/tpl/admin_site.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view') diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl index 78e3ee245..9481d70e4 100755 --- a/view/tpl/admin_site.tpl +++ b/view/tpl/admin_site.tpl @@ -74,7 +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}} + {{include file="field_input.tpl" field=$first_page}}
-- cgit v1.2.3 From ec12b78ddfe0a70e05920cf96d51979eb1e47b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Jim=C3=A9nez=20Friaza?= Date: Sun, 11 Mar 2018 13:07:11 +0100 Subject: =?UTF-8?q?Spanish=20translation:=20added=20el=20before=20art?= =?UTF-8?q?=C3=ADculo,=20which=20is=20the=20correct=20construction.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/es-es/hmessages.po | 6 +++--- view/es-es/hstrings.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'view') diff --git a/view/es-es/hmessages.po b/view/es-es/hmessages.po index b6104c8f7..2321b2819 100644 --- a/view/es-es/hmessages.po +++ b/view/es-es/hmessages.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: Redmatrix\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-03-01 08:51+0100\n" -"PO-Revision-Date: 2018-03-02 17:15+0000\n" +"PO-Revision-Date: 2018-03-10 11:43+0000\n" "Last-Translator: Manuel Jiménez Friaza \n" "Language-Team: Spanish (Spain) (http://www.transifex.com/Friendica/red-matrix/language/es_ES/)\n" "MIME-Version: 1.0\n" @@ -13331,7 +13331,7 @@ msgstr "ficha" #: ../../include/bbcode.php:337 msgid "article" -msgstr "artículo" +msgstr "el artículo" #: ../../include/bbcode.php:420 ../../include/bbcode.php:428 msgid "Click to open/close" @@ -13343,7 +13343,7 @@ msgstr "spoiler" #: ../../include/bbcode.php:441 msgid "View article" -msgstr "Ver artículo" +msgstr "Ver el artículo" #: ../../include/bbcode.php:441 msgid "View summary" diff --git a/view/es-es/hstrings.php b/view/es-es/hstrings.php index 3c9946ebb..a28b0e3e9 100644 --- a/view/es-es/hstrings.php +++ b/view/es-es/hstrings.php @@ -3012,10 +3012,10 @@ App::$strings["Encrypted content"] = "Contenido cifrado"; App::$strings["Install %1\$s element %2\$s"] = "Instalar el elemento de%1\$s%2\$s"; App::$strings["This post contains an installable %s element, however you lack permissions to install it on this site."] = "Esta entrada contiene el elemento instalable %s, sin embargo le faltan permisos para instalarlo en este sitio."; App::$strings["card"] = "ficha"; -App::$strings["article"] = "artículo"; +App::$strings["article"] = "el artículo"; App::$strings["Click to open/close"] = "Pulsar para abrir/cerrar"; App::$strings["spoiler"] = "spoiler"; -App::$strings["View article"] = "Ver artículo"; +App::$strings["View article"] = "Ver el artículo"; App::$strings["View summary"] = "Ver sumario"; App::$strings["$1 wrote:"] = "$1 escribió:"; App::$strings[" by "] = "por"; -- cgit v1.2.3