From d8f16442a1ca7d0be18dedd52c0f4eb339ba19b6 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Feb 2014 00:52:34 -0800 Subject: bookmark permissions --- view/js/mod_connedit.js | 1 + view/js/mod_settings.js | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'view') diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index 51dbcf4bf..6bb39fb7a 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -17,6 +17,7 @@ function connectFullShare() { $('#me_id_perms_chat').attr('checked','checked'); $('#me_id_perms_view_storage').attr('checked','checked'); $('#me_id_perms_republish').attr('checked','checked'); + $('#me_id_perms_bookmark').attr('checked','checked'); } function connectCautiousShare() { diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index 1c411113e..7ede7fb73 100644 --- a/view/js/mod_settings.js +++ b/view/js/mod_settings.js @@ -43,6 +43,7 @@ function channel_privacy_macro(n) { $('#id_write_pages option').eq(0).attr('selected','selected'); $('#id_delegate option').eq(0).attr('selected','selected'); $('#id_republish option').eq(0).attr('selected','selected'); + $('#id_bookmark option').eq(0).attr('selected','selected'); $('#id_profile_in_directory_onoff .off').removeClass('hidden'); $('#id_profile_in_directory_onoff .on').addClass('hidden'); $('#id_profile_in_directory').val(0); @@ -65,6 +66,7 @@ function channel_privacy_macro(n) { $('#id_write_pages option').eq(1).attr('selected','selected'); $('#id_delegate option').eq(0).attr('selected','selected'); $('#id_republish option').eq(0).attr('selected','selected'); + $('#id_bookmark option').eq(0).attr('selected','selected'); $('#id_profile_in_directory_onoff .off').removeClass('hidden'); $('#id_profile_in_directory_onoff .on').addClass('hidden'); $('#id_profile_in_directory').val(0); @@ -87,6 +89,7 @@ function channel_privacy_macro(n) { $('#id_write_pages option').eq(0).attr('selected','selected'); $('#id_delegate option').eq(0).attr('selected','selected'); $('#id_republish option').eq(1).attr('selected','selected'); + $('#id_bookmark option').eq(1).attr('selected','selected'); $('#id_profile_in_directory_onoff .on').removeClass('hidden'); $('#id_profile_in_directory_onoff .off').addClass('hidden'); $('#id_profile_in_directory').val(1); @@ -109,6 +112,7 @@ function channel_privacy_macro(n) { $('#id_write_pages option').eq(2).attr('selected','selected'); $('#id_delegate option').eq(0).attr('selected','selected'); $('#id_republish option').eq(4).attr('selected','selected'); + $('#id_bookmark option').eq(4).attr('selected','selected'); $('#id_profile_in_directory_onoff .on').removeClass('hidden'); $('#id_profile_in_directory_onoff .off').addClass('hidden'); $('#id_profile_in_directory').val(1); -- cgit v1.2.3 From aede006970fb9124161b4732b9f44002a35d17ef Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Feb 2014 17:12:13 -0800 Subject: bookmarks - mop up and go home --- view/js/mod_connedit.js | 2 +- view/js/mod_settings.js | 2 +- view/tpl/conv_item.tpl | 3 +++ view/tpl/jot-header.tpl | 8 +++++++- 4 files changed, 12 insertions(+), 3 deletions(-) (limited to 'view') diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index 6bb39fb7a..7a33952dc 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -17,7 +17,7 @@ function connectFullShare() { $('#me_id_perms_chat').attr('checked','checked'); $('#me_id_perms_view_storage').attr('checked','checked'); $('#me_id_perms_republish').attr('checked','checked'); - $('#me_id_perms_bookmark').attr('checked','checked'); + } function connectCautiousShare() { diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index 7ede7fb73..16101db57 100644 --- a/view/js/mod_settings.js +++ b/view/js/mod_settings.js @@ -66,7 +66,7 @@ function channel_privacy_macro(n) { $('#id_write_pages option').eq(1).attr('selected','selected'); $('#id_delegate option').eq(0).attr('selected','selected'); $('#id_republish option').eq(0).attr('selected','selected'); - $('#id_bookmark option').eq(0).attr('selected','selected'); + $('#id_bookmark option').eq(1).attr('selected','selected'); $('#id_profile_in_directory_onoff .off').removeClass('hidden'); $('#id_profile_in_directory_onoff .on').addClass('hidden'); $('#id_profile_in_directory').val(0); diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 50a243ff4..869692bfa 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -85,6 +85,9 @@ {{/if}} {{if $item.filer}} + {{/if}} + {{if $item.bookmark}} + {{/if}} diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 878e1e7da..80421d552 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -185,7 +185,6 @@ function enableOnUser(){ } } - function jotGetLocation() { reply = prompt("{{$whereareu}}", $('#jot-location').val()); if(reply && reply.length) { @@ -295,6 +294,13 @@ function enableOnUser(){ } + function itemBookmark(id) { + $.get('{{$baseurl}}/bookmarks?f=&item=' + id); + if(timer) clearTimeout(timer); + timer = setTimeout(NavUpdate,1000); + } + + function jotClearLocation() { $('#jot-coord').val(''); $('#profile-nolocation-wrapper').hide(); -- cgit v1.2.3 From 9f439c3248c0464298e0b486a85ad74ec2df8270 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Feb 2014 17:14:22 -0800 Subject: add icon translation for new icon --- view/js/icon_translate.js | 1 + 1 file changed, 1 insertion(+) (limited to 'view') diff --git a/view/js/icon_translate.js b/view/js/icon_translate.js index 838ff899f..737164cb8 100644 --- a/view/js/icon_translate.js +++ b/view/js/icon_translate.js @@ -51,4 +51,5 @@ $(document).ready(function() { $('.icon-globe').addClass(''); $('.icon-circle-blank').addClass(''); $('.icon-circle').addClass(''); + $('.icon-bookmark').addClass(''); }); \ No newline at end of file -- cgit v1.2.3 From 8a11c2941395bdd325ac076bd22ad011fe41f3c7 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Feb 2014 19:39:56 -0800 Subject: make links in comments bookmark-able --- view/js/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index c8e9fc9a2..44cb79949 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -55,6 +55,8 @@ if(typeof(insertFormatting) != 'undefined') return(insertFormatting(comment,BBcode,id)); + var urlprefix = ((BBcode == 'url') ? '#^' : ''); + var tmpStr = $("#comment-edit-text-" + id).val(); if(tmpStr == comment) { tmpStr = ""; @@ -68,11 +70,11 @@ if (document.selection) { textarea.focus(); selected = document.selection.createRange(); - selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]"; + selected.text = urlprefix+"["+BBcode+"]" + selected.text + "[/"+BBcode+"]"; } else if (textarea.selectionStart || textarea.selectionStart == "0") { var start = textarea.selectionStart; var end = textarea.selectionEnd; - textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); + textarea.value = textarea.value.substring(0, start) + urlprefix+"["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); } return true; } -- cgit v1.2.3 From 0844110f7b154a0fb5102362fe732c2b091222d7 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 5 Feb 2014 03:44:46 -0800 Subject: preserve system bit when editing menus --- view/tpl/menuedit.tpl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'view') diff --git a/view/tpl/menuedit.tpl b/view/tpl/menuedit.tpl index 324dbe426..1ccfb3d68 100644 --- a/view/tpl/menuedit.tpl +++ b/view/tpl/menuedit.tpl @@ -10,6 +10,10 @@ {{if $menu_id}} {{/if}} +{{if $menu_system}} + +{{/if}} + {{include file="field_input.tpl" field=$menu_name}} {{include file="field_input.tpl" field=$menu_desc}} -- cgit v1.2.3