fixed tags in kb
This commit is contained in:
parent
d2b2174ee4
commit
0ad995460c
@ -108,6 +108,7 @@ EditableText = function(args) {
|
|||||||
this.set_display(me.text);
|
this.set_display(me.text);
|
||||||
|
|
||||||
if(me.height) me.$w.find('.ed-text-input').css('height', me.height);
|
if(me.height) me.$w.find('.ed-text-input').css('height', me.height);
|
||||||
|
if(me.width) me.$w.find('.ed-text-input').css('width', me.width);
|
||||||
|
|
||||||
// edit
|
// edit
|
||||||
me.$w.find('.ed-text-edit').click(function() {
|
me.$w.find('.ed-text-edit').click(function() {
|
||||||
|
@ -90,6 +90,7 @@ KBQuestionView = function(w, qid, qtext) {
|
|||||||
$(w.add_answer_area, '<h3>Add your Answer</h3>\
|
$(w.add_answer_area, '<h3>Add your Answer</h3>\
|
||||||
<div class="help">In markdown format</div>');
|
<div class="help">In markdown format</div>');
|
||||||
this.input = $a(w.add_answer_area, 'textarea');
|
this.input = $a(w.add_answer_area, 'textarea');
|
||||||
|
$(this.input).css({width: "90%", height: "200px"});
|
||||||
//wn.tinymce.add_simple(this.input);
|
//wn.tinymce.add_simple(this.input);
|
||||||
|
|
||||||
this.btn = $btn($a(w.add_answer_area, 'div'), 'Post', function() {
|
this.btn = $btn($a(w.add_answer_area, 'div'), 'Post', function() {
|
||||||
@ -174,7 +175,8 @@ KBAnswer = function(body, data, ans_list) {
|
|||||||
text: data.answer,
|
text: data.answer,
|
||||||
inp_class: 'qv-ans-input',
|
inp_class: 'qv-ans-input',
|
||||||
disp_class: 'qv-ans-text',
|
disp_class: 'qv-ans-text',
|
||||||
height: '300px'
|
height: '300px',
|
||||||
|
width: '90%'
|
||||||
});
|
});
|
||||||
|
|
||||||
$(edtxt.wrapper).addClass('well');
|
$(edtxt.wrapper).addClass('well');
|
||||||
|
@ -25,19 +25,17 @@ pscript.onload_questions = function(wrapper) {
|
|||||||
// kb
|
// kb
|
||||||
var kb = new KnowledgeBase(body);
|
var kb = new KnowledgeBase(body);
|
||||||
|
|
||||||
// sidebar
|
wn.model.with_doctype("Question", function() {
|
||||||
this.sidebar = new wn.widgets.PageSidebar($(wrapper).find('.questions-tags').get(0), {
|
this.sidebar_stats = new wn.views.SidebarStats({
|
||||||
sections: [
|
doctype: "Question",
|
||||||
{
|
stats: ["_user_tags"],
|
||||||
title: 'Top Tags',
|
parent: $(wrapper).find('.questions-tags'),
|
||||||
render: function(body) {
|
set_filter: function(fieldname, label) {
|
||||||
new wn.widgets.TagCloud(body, 'Question', function(tag)
|
kb.set_filter(fieldname, label);
|
||||||
{ kb.set_tag_filter(tag) });
|
//me.set_filter(fieldname, label);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
});
|
||||||
});
|
})
|
||||||
set_title('Knowledge Base');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// knowledge base object
|
// knowledge base object
|
||||||
@ -137,6 +135,9 @@ function KnowledgeBase(w) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.set_filter = function(fieldname, label) {
|
||||||
|
this.set_tag_filter({label:label});
|
||||||
|
}
|
||||||
// add a tag filter to the search in the
|
// add a tag filter to the search in the
|
||||||
// main page
|
// main page
|
||||||
this.set_tag_filter = function(tag) {
|
this.set_tag_filter = function(tag) {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{% include 'html/product_missing_image.html' %}
|
{% include 'html/product_missing_image.html' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 80px; overflow: hidden; font-size: 80%;">
|
<div style="height: 100px; overflow: hidden; font-size: 80%;">
|
||||||
<h4 style="margin-bottom: 2px;"><a href="{{ page_name }}">{{ item_name }}</a></h4>
|
<h4 style="margin-bottom: 2px;"><a href="{{ page_name }}">{{ item_name }}</a></h4>
|
||||||
<p class="help">Item Code: {{ name }}</p>
|
<p class="help">Item Code: {{ name }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
{% set title="ERPNext - Web Based, Open Source ERP" %}
|
{% set title="ERPNext - Web Based, Open Source ERP" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="layout-attributions">
|
<div class="layout-attributions span12">
|
||||||
<div class="layout-main">
|
|
||||||
<h3>This website is made using these Awesome Open Source Projects <i class="icon-heart" style="color: red"></i></h3>
|
<h3>This website is made using these Awesome Open Source Projects <i class="icon-heart" style="color: red"></i></h3>
|
||||||
<hr>
|
<hr>
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
@ -105,6 +104,5 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p class="alert">Note: A link to this page must be easily accessible.</p>
|
<p class="alert">Note: A link to this page must be easily accessible.</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user