DJIN#37278 een 'meer..' linkje toegevoegd aan bepaalde kennisbankitems

svn path=/Website/trunk/; revision=34112
This commit is contained in:
2017-06-01 14:46:55 +00:00
parent 836cb8da6c
commit 4db635882d
5 changed files with 44 additions and 14 deletions

View File

@@ -111,6 +111,7 @@ else
RWTEXTAREATR("fac_question", "fldtxt required", L("lcl_faq_question"), question, {html: "rows='3' maxlength='4000'"});
RWTEXTAREATR("fac_answer", "fldtxt required", L("lcl_faq_answer"), answer, {html: "rows='3' maxlength='4000'"});
RWTEXTAREATR("fac_hint", "fldtxt", L("lcl_faq_hint"), hint);
RWFIELDTR("fac_url", "fld", L("lcl_faq_link"), url);
BLOCK_END();
BLOCK_START("mldInfo", L("lcl_faq_itemadm"));
@@ -124,7 +125,6 @@ else
RWCHECKBOXTR("fac_faq_displaymode", "fldcheck", L("lcl_faq_displaymode"), !displaymode); // KFNS#38663 inverted
RWFIELDTR("fac_bron", "fld", L("lcl_faq_bron"), source);
RWFIELDTR("fac_url", "fld", L("lcl_faq_link"), url);
if (!canWriteFAQBOF && datum==null)
ROFIELDTR("fld", L("lcl_faq_datum"), L("lcl_faq_needaccept"));
else

View File

@@ -127,20 +127,20 @@ var canChange = canWriteFAQBOF || (canWriteFAQFOF && datum == null)
<div id="edit">
<form name="u2" onSubmit="return false;">
<%
BLOCK_START("mldFaqedit", L("lcl_faq_item"));
ROTEXTAREATR("fldtxt", L("lcl_faq_question"), question, {id: "fac_question", html: "rows='3' maxlength='4000'"});
BLOCK_START("mldFaqedit", L("lcl_faq_item"));
ROTEXTAREATR("fldtxt", L("lcl_faq_question"), question, {id: "fac_question", html: "rows='3' maxlength='4000'"});
// PF: Aangepast. Zo kon je geen html formatting toepassen, dan maar niet meer die gekke kopieeroptie
ROTEXTAREATR("fldtxt fclthtml", L("lcl_faq_answer"), answer);
ROTEXTAREATR("fldtxt", L("lcl_faq_hint"), hint, { suppressEmpty: true } );
ROTEXTAREATR("fldtxt fclthtml", L("lcl_faq_answer"), answer);
ROTEXTAREATR("fldtxt", L("lcl_faq_hint"), hint, { suppressEmpty: true } );
ROFIELDTR("fld", L("lcl_faq_link"), url, { infoPointer: {Url: url, Title: L("lcl_faq_item"), NewWindow: true}, suppressEmpty: true});
BLOCK_END();
if (isProf)
{
BLOCK_START("mldInfo", L("lcl_faq_itemadm"));
ROFIELDTR("fld", L("lcl_faq_level"), fac.getfaqleveltext(level));
ROFIELDTR("fld", L("lcl_faq_level"), fac.getfaqleveltext(level));
ROCHECKBOXTR("fldcheck", L("lcl_faq_displaymode"), !displaymode);
ROFIELDTR("fld", L("lcl_faq_bron"), source, { suppressEmpty: true});
ROFIELDTR("fld", L("lcl_faq_link"), url, { infoPointer: {Url: url, Title: L("lcl_faq_item"), NewWindow: true}, suppressEmpty: true});
ROFIELDTR("fld", L("lcl_faq_bron"), source, { suppressEmpty: true});
FCLTpersoonselector("sgPers",
"sgPers",
{ perslidKey: perslidkey,
@@ -155,9 +155,9 @@ var canChange = canWriteFAQBOF || (canWriteFAQFOF && datum == null)
BLOCK_START("faqFlex2", L("lcl_faq_flexblok"));
generateFlexKenmerkCode ({ faq_key: faq_key,
reado : true,
flexcolumns: S("faq_flexcolumns")
});
reado : true,
flexcolumns: S("faq_flexcolumns")
});
BLOCK_END();
%>
</form>

View File

@@ -2852,7 +2852,9 @@ mld = {setmeldingstatus:
}
// KFNS#38663 -> always 'inline'
var data = { question: oRs("fac_faq_question").Value,
var data = { faq_key: oRs("fac_faq_key").Value,
has_kenm: oRs("aantal_kenm").Value > 0,
question: oRs("fac_faq_question").Value,
answer: safe.fclthtml(oRs("fac_faq_answer").Value),
displaymode: oRs("displaymode").Value };
@@ -5415,7 +5417,13 @@ mld = {setmeldingstatus:
+ " fac_faq_question, "
+ " fac_faq_answer, "
+ " fac_faq_url, "
+ " fac_faq_level "
+ " fac_faq_level, "
+ " (SELECT COUNT (*)"
+ " FROM faq_kenmerk k, faq_kenmerkwaarde kw"
+ " WHERE k.faq_kenmerk_verwijder IS NULL"
+ " AND k.faq_kenmerk_key = kw.faq_kenmerk_key"
+ " AND kw.faq_kenmerkwaarde_verwijder IS NULL"
+ " AND kw.fac_faq_key = ff.fac_faq_key) aantal_kenm"
+ sqlSelect
+ " FROM fac_faq ff"
+ sqlFrom

View File

@@ -77,6 +77,12 @@ function mldDoubleCallback(data, text)
}
}
function showFaq(faq_key)
{
if (faq_key > 0)
FcltMgr.openDetail("appl/fac/fac_faq.asp?urole=fe&faq_key=" + faq_key, {reuse: true});
}
function mld_submit_callback(json)
{
if (json.doublecheck)
@@ -525,6 +531,8 @@ function show_fixed_faq(changed, fixed_faq)
var safeanswer = $("<span>").text(fixed_faq[i].answer).text().replace(/\n/g, "<br>");
if (fixed_faq[i].hurl)
safeanswer += "<br><a href={0} target='_new'>{1}</a>".format(fixed_faq[i].hurl, fixed_faq[i].hlnk);
else if (fixed_faq[i].has_kenm)
safeanswer += "<br><div class='faqlink'><a href='javascript:showFaq("+fixed_faq[i].faq_key+")'>"+L('lcl_more')+"</a></div>";
$tbl.append("<tr style='display:none' class='"+fixed_faq[i].faq_type+"'><td class='fixedfaqanswer'><span='fclthtml'>" + safeanswer + "</span></td></tr>");
}
$("#mldFaq").show();

View File

@@ -49,6 +49,12 @@ user.auth_required_or_abort(authparamsUSE || authparamsFOF);
FcltMgr.closeDetail(window, { accept: true });
}
function showFaq(faq_key)
{
if (faq_key > 0)
FcltMgr.openDetail("appl/fac/fac_faq.asp?urole=fe&faq_key=" + faq_key, {reuse: true});
}
function faqSolved(faq_key)
{ // Increment the rank of a FAQ (kennisbankitem)
var data = {faq_key: faq_key};
@@ -99,7 +105,13 @@ user.auth_required_or_abort(authparamsUSE || authparamsFOF);
+ " fac_faq_question, "
+ " fac_faq_answer, "
+ " fac_faq_url, "
+ " fac_faq_level "
+ " fac_faq_level, "
+ " (SELECT COUNT (*)"
+ " FROM faq_kenmerk k, faq_kenmerkwaarde kw"
+ " WHERE k.faq_kenmerk_verwijder IS NULL"
+ " AND k.faq_kenmerk_key = kw.faq_kenmerk_key"
+ " AND kw.faq_kenmerkwaarde_verwijder IS NULL"
+ " AND kw.fac_faq_key = ff.fac_faq_key) aantal_kenm"
+ " FROM fac_faq ff, "
+ " mld_stdmeldingfaq sf"
+ " WHERE fac_faq_datum < SYSDATE"
@@ -131,6 +143,8 @@ user.auth_required_or_abort(authparamsUSE || authparamsFOF);
else // in cust subdir
hurl = custpath + "/" + hurl;
%> <a href="<%=safe.htmlattr(hurl)%>" target="_new"><%=safe.html(hlnk)%></a><br/>
<% } else if (oRs("aantal_kenm").Value > 0) { %>
<div class="faqlink"><a href="javascript:showFaq(<%=oRs("fac_faq_key").Value%>)"><%=L("lcl_more")%></a></div><br/>
<% } %>
<div id="faqsolved" onClick="faqSolved(<%=oRs("fac_faq_key").value%>);" class="ref"><span class="button">
<i class="fa fa-fw fa-check" title="<%=L("lcl_faq_mld_3")%>"></i>