UWVA#52393 opdr scherm wordt nu 'hot' (edit-mode) als voor een opdr_note de edit mode aangegaan wordt. zelfde werking als mld_show_note2.asp
svn path=/Website/branches/v2017.3/; revision=37188
This commit is contained in:
@@ -88,7 +88,10 @@ if (opdr_key > 0)
|
||||
}
|
||||
function opdr_notechange(opdr_note_key)
|
||||
{
|
||||
if (FcltMgr.mayEdit(window))
|
||||
{
|
||||
window.location.href = "opdr_show_note2.asp?urole=<%=urole%>&opdr_key=<%=opdr_key%>¬e_key="+opdr_note_key + "&tracking=<%=tracking?1:0%>";
|
||||
}
|
||||
}
|
||||
function note_submit()
|
||||
{
|
||||
@@ -104,6 +107,10 @@ if (opdr_key > 0)
|
||||
}
|
||||
function note_submit_callback(json)
|
||||
{
|
||||
if (window.noteediting && FcltMgr.stopEdit(window))
|
||||
{
|
||||
window.noteediting = false;
|
||||
}
|
||||
window.location.href = "opdr_show_note2.asp?urole=<%=urole%>&opdr_key=<%=opdr_key%>&tracking=<%=tracking?1:0%>";
|
||||
<% if (parent_reload == 1) { %>
|
||||
window.parent.FcltMgr.reload();
|
||||
@@ -126,45 +133,80 @@ if (opdr_key > 0)
|
||||
params.appendurl = "tmp_note=" + $("#note").val() + "&parent_reload=1";
|
||||
FcltMgr.reload(params);
|
||||
}
|
||||
var note_key = <%=note_key%>;
|
||||
$(function () {
|
||||
$('textarea').autogrow();
|
||||
// Let op: scrollen is complexer dan je denkt. Ons huidige document heeft
|
||||
// helemaal geen scrollbars, die zijn van de parent-IFrame!
|
||||
<% if (!verynew && getQParamInt("autoscroll", 0) == 1) { %>
|
||||
window.setTimeout(function() { $('#note').focus(); }, 1);
|
||||
window.setTimeout('parent.scrollBy(0,$(\'#note\').height() + $(\'#note_submit\').height())', 1);
|
||||
<% } %>
|
||||
|
||||
var timerID=null;
|
||||
function delayed(delay, fn)
|
||||
{
|
||||
if (window.timerID)
|
||||
clearTimeout(window.timerID);
|
||||
window.timerID = setTimeout(fn, delay);
|
||||
}
|
||||
function doFilter(deze)
|
||||
{
|
||||
var deze = $("#autofilter");
|
||||
var valThis = deze.val().toLowerCase();
|
||||
$('#opdrHistorieList table.fcltblocktab>tbody>tr.mldhandlingdiv,tr.mldhandlinghead').each(function(){
|
||||
var text = $(this).text().toLowerCase();
|
||||
var moretext = ($(this).find("span.rsTruncmore").attr('resttxt')||"").toLowerCase();
|
||||
$(this).toggle(text.indexOf(valThis) > -1 || moretext.indexOf(valThis) > -1);
|
||||
});
|
||||
}
|
||||
window.noteediting = false;
|
||||
if (note_key > -1 && FcltMgr.startEdit(window))
|
||||
{
|
||||
window.noteediting = true;
|
||||
}
|
||||
|
||||
$('textarea').autogrow();
|
||||
// Let op: scrollen is complexer dan je denkt. Ons huidige document heeft
|
||||
// helemaal geen scrollbars, die zijn van de parent-IFrame!
|
||||
<% if (!verynew && getQParamInt("autoscroll", 0) == 1) { %>
|
||||
window.setTimeout(function() { $('#note').focus(); }, 1);
|
||||
window.setTimeout('parent.scrollBy(0,$(\'#note\').height() + $(\'#note_submit\').height())', 1);
|
||||
<% } %>
|
||||
|
||||
$(window).on("beforeunload", function() {
|
||||
if (window.noteediting)
|
||||
{
|
||||
FcltMgr.stopEdit(window);
|
||||
}
|
||||
});
|
||||
|
||||
$("#note").keyup(function ()
|
||||
{
|
||||
if (note_key == -1 && $("#note").val() == "" && window.noteediting)
|
||||
{
|
||||
if (FcltMgr.stopEdit(window))
|
||||
{
|
||||
window.noteediting = false;
|
||||
}
|
||||
}
|
||||
else if (!window.noteediting && (note_key > -1 || $("#note").val() != ""))
|
||||
{
|
||||
if (FcltMgr.startEdit(window))
|
||||
{
|
||||
window.noteediting = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var timerID=null;
|
||||
function delayed(delay, fn)
|
||||
{
|
||||
if (window.timerID)
|
||||
clearTimeout(window.timerID);
|
||||
window.timerID = setTimeout(fn, delay);
|
||||
}
|
||||
|
||||
function doFilter(deze)
|
||||
{
|
||||
var deze = $("#autofilter");
|
||||
var valThis = deze.val().toLowerCase();
|
||||
$('#opdrHistorieList table.fcltblocktab>tbody>tr.mldhandlingdiv,tr.mldhandlinghead').each(function(){
|
||||
var text = $(this).text().toLowerCase();
|
||||
var moretext = ($(this).find("span.rsTruncmore").attr('resttxt')||"").toLowerCase();
|
||||
$(this).toggle(text.indexOf(valThis) > -1 || moretext.indexOf(valThis) > -1);
|
||||
});
|
||||
}
|
||||
|
||||
if ($('#opdrHistorieList table.fcltblocktab>tbody>tr').length > 12)
|
||||
{
|
||||
$("#opdrHistorie .fcltblockhead").append("<input id='autofilter' type='text' placeholder='"+L("lcl_autofilter")+"'>");
|
||||
$("#autofilter")
|
||||
.click(function (e) {e.stopPropagation()})
|
||||
.keyup(function(e){
|
||||
if (e.which == 27) {
|
||||
$("#autofilter").val("");
|
||||
}
|
||||
delayed(200, doFilter);
|
||||
});
|
||||
}
|
||||
|
||||
if ($('#opdrHistorieList table.fcltblocktab>tbody>tr').length > 12)
|
||||
{
|
||||
$("#opdrHistorie .fcltblockhead").append("<input id='autofilter' type='text' placeholder='"+L("lcl_autofilter")+"'>");
|
||||
$("#autofilter")
|
||||
.click(function (e) {e.stopPropagation()})
|
||||
.keyup(function(e){
|
||||
if (e.which == 27) {
|
||||
$("#autofilter").val("");
|
||||
}
|
||||
delayed(200, doFilter);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
@@ -190,7 +232,7 @@ if (opdr_key > 0)
|
||||
}
|
||||
|
||||
var buttons = [];
|
||||
buttons.push({ icon: "page_refresh.png", title: L("lcl_refresh"), action: "FcltMgr.reload()"});
|
||||
buttons.push({ icon: "page_refresh.png", title: L("lcl_refresh"), action: "FcltMgr.stopEdit(window);FcltMgr.reload()"});
|
||||
|
||||
if (urole=="fo" || urole=="bo")
|
||||
buttons.push({ icon: "print.png", title: L("lcl_print"), action: 'doPrint()' });
|
||||
|
||||
Reference in New Issue
Block a user