always open links embedded in knowledge base answers in new tab

This commit is contained in:
Anand Doshi 2012-11-19 18:46:23 +05:30
parent fee73cf273
commit fdfa60546a
3 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,8 @@
erpnext.updates = [
["19th November 2012", [
"Sales Order: Bugfix - Shipping Address should be a Link field",
"Link Fields: Search Profile, Employee and Lead using Full Names instead of ID",
"Sales Order: Bugfix - Shipping Address should be a Link field.",
"Link Fields: Search Profile, Employee and Lead using Full Names instead of ID.",
"Knowledge Base: Always open links, embedded in an answer, in a new tab."
]],
["16th November 2012", [
"Appraisal: Cleaned up form and logic. Removed complex and unnecessary approval logic, \

View File

@ -100,7 +100,9 @@ EditableText = function(args) {
</div>', args)).appendTo(me.parent);
this.set_display = function(txt) {
me.$w.find('.ed-text-display').html(wn.markdown(txt));
var display_wrapper = me.$w.find('.ed-text-display');
display_wrapper.html(wn.markdown(txt));
display_wrapper.find("a").attr("target", "blank");
me.text = txt;
}

View File

@ -183,8 +183,6 @@ KBAnswer = function(body, data, ans_list) {
with_tags: 0,
doctype: 'Answer'
}, ans_list)
}
wn.require('app/utilities/page/kb_common/kb_common.js');
wn.require('app/js/kb_common.js');