diff --git a/frappe/public/js/frappe/list/list_item_subject.html b/frappe/public/js/frappe/list/list_item_subject.html
index 23c2b98ba3..1e4475fe47 100644
--- a/frappe/public/js/frappe/list/list_item_subject.html
+++ b/frappe/public/js/frappe/list/list_item_subject.html
@@ -13,9 +13,10 @@
{{ (_liked_by.length > 9 ? "9+" : _liked_by.length) || "" }}
{{ _title }}
+ title="{{ _full_title }}">{{ strip_html(_title) }}
{% if (_workflow && !_without_workflow) { %}
diff --git a/frappe/public/js/frappe/misc/common.js b/frappe/public/js/frappe/misc/common.js
index 9715e1f847..4e444768a2 100644
--- a/frappe/public/js/frappe/misc/common.js
+++ b/frappe/public/js/frappe/misc/common.js
@@ -89,6 +89,10 @@ function replace_all(s, t1, t2) {
return s.split(t1).join(t2);
}
+function strip_html(txt) {
+ return txt.replace(/<[^>]*>/g, "");
+}
+
var strip = function(s, chars) {
if (s) {
var s= lstrip(s, chars)
diff --git a/frappe/public/js/frappe/model/create_new.js b/frappe/public/js/frappe/model/create_new.js
index 8ac178df18..ed83f16319 100644
--- a/frappe/public/js/frappe/model/create_new.js
+++ b/frappe/public/js/frappe/model/create_new.js
@@ -329,8 +329,15 @@ frappe.new_doc = function (doctype, opts) {
} else {
frappe.ui.form.quick_entry(doctype, function(doc) {
//frappe.set_route('List', doctype);
+ var title = doc.name;
+ var title_field = frappe.get_meta(doc.doctype).title_field;
+ if (title_field) {
+ title = doc[title_field];
+ }
+
+ console.log(title, title_field);
show_alert(''
- + __('{0} {1} created', [doc.doctype, doc.name]) + '');
+ + __('{0} {1} created', [doc.doctype, strip_html(title)]) + '');
});
}
});
diff --git a/frappe/public/js/frappe/ui/page.js b/frappe/public/js/frappe/ui/page.js
index 1896daf134..82753f4b58 100644
--- a/frappe/public/js/frappe/ui/page.js
+++ b/frappe/public/js/frappe/ui/page.js
@@ -289,7 +289,7 @@ frappe.ui.Page = Class.extend({
if(!txt) txt = "";
// strip html
- txt = txt.replace(/<[^>]*>/g, "");
+ txt = strip_html(txt);
this.title = txt;
frappe.utils.set_title(txt);
diff --git a/frappe/public/js/legacy/form.js b/frappe/public/js/legacy/form.js
index 6b14d8932f..19199c515c 100644
--- a/frappe/public/js/legacy/form.js
+++ b/frappe/public/js/legacy/form.js
@@ -575,7 +575,10 @@ _f.Frm.prototype.setnewdoc = function() {
});
frappe.breadcrumbs.add(me.meta.module, me.doctype)
- })
+ });
+
+ // update seen
+ $('.list-id[data-name="'+ me.docname +'"]').addClass('seen');
}