diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/icon_translate.js | 1 | ||||
-rw-r--r-- | view/js/main.js | 6 | ||||
-rw-r--r-- | view/js/mod_connedit.js | 1 | ||||
-rw-r--r-- | view/js/mod_settings.js | 4 |
4 files changed, 10 insertions, 2 deletions
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 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; } diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index 51dbcf4bf..7a33952dc 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'); + } function connectCautiousShare() { diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index 1c411113e..16101db57 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(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); @@ -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); |