Merge pull request #64 from anandpdoshi/stable
Notifications fix and Support Ticket fix
This commit is contained in:
commit
522ca22dd7
4 changed files with 14 additions and 5 deletions
|
|
@ -182,7 +182,7 @@ if(me.doc.__islocal){$c('webnotes.widgets.form.getdoctype',{'doctype':me.doctype
|
|||
$c('webnotes.widgets.form.getdoc',{'name':me.docname,'doctype':me.doctype,'getdoctype':1,'user':user},ret_fn,null,null,'Refreshing '+me.docname+'...');}}
|
||||
_f.Frm.prototype.savedoc=function(save_action,onsave,onerr){this.error_in_section=0;save_doclist(this.doctype,this.docname,save_action,onsave,onerr);}
|
||||
_f.Frm.prototype.saveupdate=function(){this.save('Update');}
|
||||
_f.Frm.prototype.savesubmit=function(){var answer=confirm("Permanently Submit "+this.docname+"?");if(answer)this.save('Submit');}
|
||||
_f.Frm.prototype.savesubmit=function(){var answer=confirm("Permanently Submit "+this.docname+"?");var me=this;if(answer){this.save('Submit',function(){if(me.cscript.on_submit){me.runclientscript('on_submit',me.doctype,me.docname);}});}}
|
||||
_f.Frm.prototype.savecancel=function(){var answer=confirm("Permanently Cancel "+this.docname+"?");if(answer)this.save('Cancel');}
|
||||
_f.Frm.prototype.savetrash=function(){var me=this;var answer=confirm("Permanently Delete "+this.docname+"? This action cannot be reversed");if(answer){$c('webnotes.model.delete_doc',{dt:this.doctype,dn:this.docname},function(r,rt){if(r.message=='okay'){LocalDB.delete_doc(me.doctype,me.docname);if(page_body.wntoolbar)page_body.wntoolbar.rdocs.remove(me.doctype,me.docname);nav_obj.show_last_open();}})}}
|
||||
_f.Frm.prototype.amend_doc=function(){if(!this.fields_dict['amended_from']){alert('"amended_from" field must be present to do an amendment.');return;}
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,14 @@ _f.Frm.prototype.saveupdate = function() {
|
|||
|
||||
_f.Frm.prototype.savesubmit = function() {
|
||||
var answer = confirm("Permanently Submit "+this.docname+"?");
|
||||
if(answer) this.save('Submit');
|
||||
var me = this;
|
||||
if(answer) {
|
||||
this.save('Submit', function() {
|
||||
if(me.cscript.on_submit) {
|
||||
me.runclientscript('on_submit', me.doctype, me.docname);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
_f.Frm.prototype.savecancel = function() {
|
||||
|
|
|
|||
|
|
@ -217,4 +217,4 @@ _f.FrmHeader.prototype.refresh_labels = function(f) {
|
|||
|
||||
// timestamp
|
||||
this.timestamp_area.innerHTML = me.get_timestamp(doc);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,9 +66,11 @@ class IncomingMail:
|
|||
Extracts thread id of the message between first []
|
||||
from the subject
|
||||
"""
|
||||
import re
|
||||
subject = self.mail.get('Subject', '')
|
||||
if '[' in subject and ']' in subject:
|
||||
return subject.split('[')[1].split(']')[0]
|
||||
|
||||
return re.findall('(?<=\[)\w+', subject)
|
||||
|
||||
|
||||
def process_part(self, part):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue