updates to form comment (post on enter) and global defaults

This commit is contained in:
Rushabh Mehta 2012-09-28 09:56:55 +05:30
parent 6c0f160509
commit c1384af1d2
2 changed files with 19 additions and 2 deletions

View file

@ -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()

16
wnf.py
View file

@ -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