diff --git a/public/js/legacy/wn/widgets/form/comments.js b/public/js/legacy/wn/widgets/form/comments.js index 80b12b3323..e4f6d06b08 100644 --- a/public/js/legacy/wn/widgets/form/comments.js +++ b/public/js/legacy/wn/widgets/form/comments.js @@ -37,6 +37,11 @@ wn.widgets.form.sidebar.Comments = function(parent, sidebar, doctype, docname) { else this.wrapper = $a(parent, 'div', 'sidebar-comment-wrapper'); this.input = $a_input(this.wrapper, 'text'); + $(this.input).keydown(function(e) { + if(e.which==13) { + $(me.btn).click(); + } + }) this.btn = $btn(this.wrapper, 'Post', function() { me.add_comment() }, {marginLeft:'8px'}); this.render_comments() diff --git a/wnf.py b/wnf.py index 453bef214e..6ac9212de1 100755 --- a/wnf.py +++ b/wnf.py @@ -75,8 +75,20 @@ def search_replace_with_prompt(fpath, txt1, txt2, force=False): print colored('Updated', 'green') def pull(remote, branch): - os.system('cd lib && git pull %s %s' % (remote, branch)) - os.system('cd ../app && git pull %s %s' % (remote, branch)) + os.chdir("lib") + os.system('git pull %s %s' % (remote, branch)) + os.chdir("../app") + os.system('git pull %s %s' % (remote, branch)) + rebuild() + +def rebuild(): + # build js / css + from webnotes.utils import bundlejs + bundlejs.bundle(options.no_compress) + + # build cache + import website.web_cache + website.web_cache.refresh_cache(['Blog']) def apply_latest_patches(): import webnotes.modules.patch_handler