From f0de7af14312368a11014befa428ff91bbebff76 Mon Sep 17 00:00:00 2001 From: Kamil Kaminski Date: Sun, 14 Dec 2014 04:39:17 -0600 Subject: fracturedcms, a flat file cms, fork of wondercms - minor code refactoring - fix improper navigation/footer link generation when current page is ?login or ?logout - include local jquery --- js/editinplace.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 js/editinplace.php (limited to 'js/editinplace.php') diff --git a/js/editinplace.php b/js/editinplace.php new file mode 100644 index 0000000..612617a --- /dev/null +++ b/js/editinplace.php @@ -0,0 +1,44 @@ +/*! +Autosize v1.18.1 - 2013-11-05 +Automatically adjust textarea height based on user input. +(c) 2013 Jack Moore - http://www.jacklmoore.com/autosize +license: http://www.opensource.org/licenses/mit-license.php +*/ +(function(e){var t,o={className:"autosizejs",append:"",callback:!1,resizeDelay:10},i='"); + a.children(':first').focus().autosize().trigger('autosize.resize'); + } + changing = true; + }); + + $('.toggle').click(function(){ + $('.hide').toggle('200'); + }); +}); + +function nl2br(s){ + return (s + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1
$2'); +} + +function fieldSave(key,val){ + $.post('edittext.php', {fieldname: key, content: val}).done(function(data){ + if(key == 'theme_name'){location.reload(true);} + else if(val==''){$('#'+key).html($('#'+key).attr('title'));} + else {$("#"+key).html(data);} + changing = false; + }); +} \ No newline at end of file -- cgit v1.2.3