diff options
author | Aditi <aditi.iitr@gmail.com> | 2013-08-09 16:38:55 +0530 |
---|---|---|
committer | Aditi <aditi.iitr@gmail.com> | 2013-08-09 16:38:55 +0530 |
commit | 18fd3a272b29820e2ad1ba00c7cbea0bdfb7bd0d (patch) | |
tree | 96ccfbab12fce17b20de16ecaa592f9d8645d5e1 /mediagoblin/static | |
parent | 97ce2563ed4fd4fa68a5d1e3db802e0d41d48a29 (diff) | |
parent | d7ecae5a4e8030915295b5c520d78971aad0f828 (diff) | |
download | mediagoblin-18fd3a272b29820e2ad1ba00c7cbea0bdfb7bd0d.tar.lz mediagoblin-18fd3a272b29820e2ad1ba00c7cbea0bdfb7bd0d.tar.xz mediagoblin-18fd3a272b29820e2ad1ba00c7cbea0bdfb7bd0d.zip |
Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin
Diffstat (limited to 'mediagoblin/static')
-rw-r--r-- | mediagoblin/static/images/home_goblin.png | bin | 0 -> 61657 bytes | |||
-rw-r--r-- | mediagoblin/static/js/comment_show.js | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/mediagoblin/static/images/home_goblin.png b/mediagoblin/static/images/home_goblin.png Binary files differnew file mode 100644 index 00000000..5ba9afeb --- /dev/null +++ b/mediagoblin/static/images/home_goblin.png diff --git a/mediagoblin/static/js/comment_show.js b/mediagoblin/static/js/comment_show.js index c5ccee66..df3c1093 100644 --- a/mediagoblin/static/js/comment_show.js +++ b/mediagoblin/static/js/comment_show.js @@ -15,12 +15,25 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +var content=""; +function previewComment(){ + if ($('#comment_content').val() && (content != $('#comment_content').val())) { + content = $('#comment_content').val(); + $.post($('#previewURL').val(),$('#form_comment').serialize(), + function(data){ + preview = JSON.parse(data) + $('#comment_preview').replaceWith("<div id=comment_preview><h3>" + $('#previewText').val() +"</h3><br />" + preview.content + + "<hr style='border: 1px solid #333;' /></div>"); + }); + } +} $(document).ready(function(){ $('#form_comment').hide(); $('#button_addcomment').click(function(){ $(this).fadeOut('fast'); $('#form_comment').slideDown(function(){ + setInterval("previewComment()",1000); $('#comment_content').focus(); }); }); |