diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/mod_connedit.js | 2 | ||||
-rw-r--r-- | view/js/mod_display.js | 7 | ||||
-rw-r--r-- | view/js/mod_profiles.js | 4 | ||||
-rw-r--r-- | view/js/mod_settings.js | 13 |
4 files changed, 20 insertions, 6 deletions
diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index 4739c490c..7100e0d07 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -82,7 +82,7 @@ $(document).ready(function() { function doRemove() { var what = $(this).data('remove'); var element = $(this).parents('div.form-' + what); - var where = '#abook_edit_form' + $(this).data('id'); + var where = '#abook-edit-form' + $(this).data('id'); if(what === 'vcard-org' || what === 'vcard-title' || what === 'vcard-note') { $(where + ' .add-' + what).show() diff --git a/view/js/mod_display.js b/view/js/mod_display.js new file mode 100644 index 000000000..60a1cdaa8 --- /dev/null +++ b/view/js/mod_display.js @@ -0,0 +1,7 @@ +<script> +$(document).ready(function() { + $(".comment-edit-wrapper textarea").editor_autocomplete(baseurl+"/acl?f=&n=1"); + // make auto-complete work in more places + $(".wall-item-comment-wrapper textarea").editor_autocomplete(baseurl+"/acl?f=&n=1"); +}); +</script> diff --git a/view/js/mod_profiles.js b/view/js/mod_profiles.js index acc9f9953..784f64458 100644 --- a/view/js/mod_profiles.js +++ b/view/js/mod_profiles.js @@ -38,7 +38,7 @@ $(document).ready(function() { var what = $(this).data('add'); var id = $(this).data('id'); var element = '#template-form-' + what; - var where = '#abook-edit-form'; + var where = '#profile-edit-form'; $(element + ' .remove-field').attr('data-id', id) @@ -58,7 +58,7 @@ $(document).ready(function() { function doRemove() { var what = $(this).data('remove'); var element = $(this).parents('div.form-' + what); - var where = '#abook_edit_form' + $(this).data('id'); + var where = '#profile-edit-form' + $(this).data('id'); if(what === 'vcard-org' || what === 'vcard-title' || what === 'vcard-note') { $(where + ' .add-' + what).show() diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index 5c729fa48..f9faa3d5c 100644 --- a/view/js/mod_settings.js +++ b/view/js/mod_settings.js @@ -37,12 +37,19 @@ function setTheme(elm) { function previewTheme(elm) { theme = $(elm).val(); + var schema = $('#id_schema').val(); $.getJSON('theme_info/' + theme,function(data) { $('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" style="max-width:100%; max-height:300px" alt="' + theme + '"></a>'); $('#id_schema').empty(); - $(data.schemas).each(function(index,item) { - $('<option/>',{value:item['key'],text:item['val']}).appendTo('#id_schema'); - }); + if(data.schemas.length) { + $(data.schemas).each(function(index,item) { + $('<option/>',{value:item['key'],text:item['val']}).appendTo('#id_schema'); + }); + $('#id_schema').val(schema ? schema : '---'); + } + else { + $('<option/>',{value:'',text:'No schemes available'}).appendTo('#id_schema'); + } $('#custom-settings-content .section-content-tools-wrapper').html(data.config); }); } |