FCLT#63770 savepoint modellen en flexfiles definities bijgewerkt
svn path=/Website/trunk/; revision=60267
This commit is contained in:
@@ -122,15 +122,10 @@ _model_bes_discipline = // Internal only
|
||||
"label": L("ins_discipline_ktodrempel"),
|
||||
"typ": "number"
|
||||
},
|
||||
"_upload": {
|
||||
"dbs": "",
|
||||
"label": L("lcl_bes_symbol_upload"),
|
||||
"typ": "button2",
|
||||
"defaultvalue": L("lcl_bes_browse_upload")
|
||||
},
|
||||
"symbolname": {
|
||||
"dbs": "ins_discipline_image",
|
||||
"typ": "varchar",
|
||||
"typ": "symbol",
|
||||
"module": "BESD",
|
||||
"label": L("lcl_bes_symbol_name")
|
||||
},
|
||||
"externnr": {
|
||||
|
||||
@@ -109,15 +109,10 @@ function _model_bgt_discipline()
|
||||
"default": "false",
|
||||
"hidden_fld": true
|
||||
},
|
||||
"_upload": {
|
||||
"dbs": "",
|
||||
"label": L("lcl_bgt_symbol_upload"),
|
||||
"typ": "button2",
|
||||
"defaultvalue": L("lcl_bgt_browse_upload")
|
||||
},
|
||||
"symbolname": {
|
||||
"dbs": "ins_discipline_image",
|
||||
"typ": "varchar",
|
||||
"typ": "symbol",
|
||||
"module": "BGTD",
|
||||
"label": L("lcl_bgt_symbol_name")
|
||||
},
|
||||
"externnr": {
|
||||
|
||||
@@ -94,15 +94,10 @@ function model_cht_discipline(disc_key, params)
|
||||
"typ": "number",
|
||||
"multiedit": true
|
||||
},
|
||||
"_upload": {
|
||||
"dbs": "",
|
||||
"label": L("lcl_res_symbol_upload"),
|
||||
"typ": "button2",
|
||||
"defaultvalue": L("lcl_res_browse_upload")
|
||||
},
|
||||
"symbolname": {
|
||||
"dbs": "ins_discipline_image",
|
||||
"typ": "varchar",
|
||||
"typ": "symbol",
|
||||
"module": "CHTD",
|
||||
"label": L("lcl_res_symbol_name")
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -101,15 +101,10 @@ _model_cnt_discipline = // Internal only
|
||||
"label": L("ins_discipline_email"),
|
||||
"typ": "varchar"
|
||||
},
|
||||
// "_upload": {
|
||||
// "dbs": "",
|
||||
// "label": L("lcl_cnt_symbol_upload"),
|
||||
// "typ": "button2",
|
||||
// "defaultvalue": L("lcl_cnt_browse_upload")
|
||||
// },
|
||||
"symbolname": {
|
||||
"dbs": "ins_discipline_image",
|
||||
"typ": "varchar",
|
||||
"typ": "symbol",
|
||||
"module": "CNTD",
|
||||
"label": L("lcl_cnt_symbol_name")
|
||||
},
|
||||
"externnr": {
|
||||
|
||||
@@ -101,15 +101,10 @@ _model_ins_discipline = // Internal only
|
||||
"typ": "color",
|
||||
"label": L("lcl_ins_colors")
|
||||
},
|
||||
"_upload": {
|
||||
"dbs": "",
|
||||
"label": L("lcl_ins_symbol_upload"),
|
||||
"typ": "button2",
|
||||
"defaultvalue": L("lcl_ins_browse_upload")
|
||||
},
|
||||
"symbolname": {
|
||||
"dbs": "ins_discipline_image",
|
||||
"typ": "varchar",
|
||||
"typ": "symbol",
|
||||
"module": "INSD",
|
||||
"label": L("lcl_ins_symbol_name")
|
||||
},
|
||||
"externnr": {
|
||||
|
||||
@@ -138,15 +138,10 @@ function model_mld_srtdiscipline()
|
||||
"label": L("lcl_ins_colors"),
|
||||
"defaultvalue": ""
|
||||
},
|
||||
"_upload": {
|
||||
"dbs": "",
|
||||
"label": L("lcl_mld_symbol_upload"),
|
||||
"typ": "button2",
|
||||
"defaultvalue": L("lcl_mld_browse_upload")
|
||||
},
|
||||
"symbolname": {
|
||||
"dbs": "ins_srtdiscipline_image",
|
||||
"typ": "varchar",
|
||||
"typ": "symbol",
|
||||
"module": "MLDSD",
|
||||
"label": L("lcl_mld_symbol_name")
|
||||
},
|
||||
"externnr": {
|
||||
|
||||
@@ -324,7 +324,8 @@ function model_mld_stdmelding()
|
||||
},
|
||||
"symbolname": {
|
||||
"dbs": "mld_stdmelding_image",
|
||||
"typ": "varchar",
|
||||
"typ": "symbol",
|
||||
"module": "MLDS",
|
||||
"label": L("lcl_mld_symbol_name")
|
||||
},
|
||||
"colors": {
|
||||
@@ -484,12 +485,6 @@ function model_mld_stdmelding()
|
||||
"typ": "varchar",
|
||||
"label": L("lcl_mld_externurl")
|
||||
},
|
||||
"_upload": {
|
||||
"dbs": "",
|
||||
"label": L("lcl_mld_symbol_upload"),
|
||||
"typ": "button2",
|
||||
"defaultvalue": L("lcl_mld_browse_upload")
|
||||
},
|
||||
"_limitlabel": {
|
||||
"dbs": "",
|
||||
"label": "",
|
||||
|
||||
@@ -145,15 +145,10 @@ _model_res_discipline = // Internal only
|
||||
"typ": "number",
|
||||
"multiedit": true
|
||||
},
|
||||
"_upload": {
|
||||
"dbs": "",
|
||||
"label": L("lcl_res_symbol_upload"),
|
||||
"typ": "button2",
|
||||
"defaultvalue": L("lcl_res_browse_upload")
|
||||
},
|
||||
"symbolname": {
|
||||
"dbs": "ins_discipline_image",
|
||||
"typ": "varchar",
|
||||
"typ": "symbol",
|
||||
"module": "RESD",
|
||||
"label": L("lcl_res_symbol_name")
|
||||
},
|
||||
"externnr": {
|
||||
|
||||
@@ -27,9 +27,7 @@ FCLTHeader.Requires({ plugins:["jQuery"],
|
||||
|
||||
function tekening_list(pautfunction, params)
|
||||
{
|
||||
var buttons = [];
|
||||
|
||||
autfunction = "WEB_CADFOF";
|
||||
var autfunction = "WEB_CADFOF";
|
||||
var authparams = user.checkAutorisation(autfunction);
|
||||
|
||||
var canAdd = (authparams.ALGwritelevel < 9);
|
||||
@@ -79,12 +77,6 @@ function tekening_list(pautfunction, params)
|
||||
var url = "appl/CAD/default.asp?floor_key=" + cadData.flr_key + "&concept=1";
|
||||
FcltMgr.openDetail(url, L("lcl_fg_tek_rapp"));
|
||||
}
|
||||
|
||||
function Upload()
|
||||
{
|
||||
url = "<%=protectQS.create("../shared/BijlagenForm.asp?module=FGII")%>";
|
||||
FcltMgr.openModalDetail(url, L("lcl_upload_file"));
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body id="listbody">
|
||||
@@ -290,8 +282,6 @@ function tekening_list(pautfunction, params)
|
||||
return {eVerschil : eVerschil, eContouren: eContouren};
|
||||
}
|
||||
|
||||
buttons.push({title: L("lcl_upload_file"), action:"Upload();", icon: "fa-upload", id:"bSearch" });
|
||||
|
||||
var rst = new ResultsetTable({ sql: sqln,
|
||||
keyColumn: "row_key", // we gebruiken hem niet maar hij mag niet leeg zijn
|
||||
ID: "workTable",
|
||||
@@ -299,8 +289,7 @@ function tekening_list(pautfunction, params)
|
||||
rowData: fnrowData,
|
||||
rowActionEnabler: fnrowActionEnabler,
|
||||
outputmode: outputmode,
|
||||
filterParams: params,
|
||||
buttons: buttons
|
||||
filterParams: params
|
||||
});
|
||||
|
||||
rst.addColumn(new Column({caption: L("lcl_fg_tek_loc"), content: "alg_locatie_omschrijving"}));
|
||||
|
||||
@@ -35,9 +35,8 @@ var authparams = user.checkAutorisation(autfunction);
|
||||
|
||||
<title><%=L("lcl_fg_tek_fac_change_file")%></title>
|
||||
<script type="text/javascript">
|
||||
function doSubmit()
|
||||
function cad_tek_submit()
|
||||
{
|
||||
$("#file").val($("#file_show").val().replace(/.dwf$/i,''));
|
||||
document.forms.u2.submit();
|
||||
}
|
||||
</script>
|
||||
@@ -45,7 +44,7 @@ var authparams = user.checkAutorisation(autfunction);
|
||||
|
||||
<body class="modal" id="mod_tekedit">
|
||||
<% MODAL_START(); %>
|
||||
<form action="tek_file_save.asp" method="post" name="u2" target="hidFrame" onsubmit="doSubmit()">
|
||||
<form action="tek_file_save.asp" method="post" name="u2" target="hidFrame" onsubmit="cad_tek_submit()">
|
||||
<% /* Pass on some relevant paramaters */
|
||||
MODAL_BLOCK_START("", L("lcl_fg_tek_change_file"), { icon: "fa-file-edit" });
|
||||
%>
|
||||
@@ -56,16 +55,11 @@ var authparams = user.checkAutorisation(autfunction);
|
||||
ROFIELDTR("fld", L("lcl_location"), loc);
|
||||
ROFIELDTR("fld", L("lcl_building"), bld);
|
||||
ROFIELDTR("fld", L("lcl_floor"), flr);
|
||||
FCLTflexfileselector("file",
|
||||
"sgFile",
|
||||
{
|
||||
filename: file_name,
|
||||
label: L("lcl_fg_tek_file"),
|
||||
flexmodule: "FGII"
|
||||
});
|
||||
FILEPICKERTR("file", L("lcl_fg_tek_file"), file_name, { "key": cad_tek_key, "module": "FGII" });
|
||||
|
||||
MODAL_BLOCK_END();
|
||||
|
||||
var buttons = [{title: L("lcl_submit"), icon: "fa-fclt-save", action: "doSubmit()", importance: 1},
|
||||
var buttons = [{title: L("lcl_submit"), icon: "fa-fclt-save", action: "cad_tek_submit()", importance: 1},
|
||||
{title: L("lcl_cancel"), icon: "fa-fclt-cancel", action: "FcltMgr.closeDetail(window, { cancel: true })", importance: 3}];
|
||||
SIMPLE_BLOCK_START();
|
||||
CreateButtons(buttons);
|
||||
|
||||
@@ -205,12 +205,6 @@ if (menu_key > -1)
|
||||
}
|
||||
}
|
||||
|
||||
function edit_image()
|
||||
{
|
||||
var url = "<%=protectQS.create("../../appl/shared/BijlagenForm.asp?module=MENU&multi=1")%>";
|
||||
FcltMgr.openModalDetail(url, L("lcl_mrk_upload_foto"));
|
||||
}
|
||||
|
||||
function menuitemChanged(init_key)
|
||||
{
|
||||
var new_menuitem_key = init_key || parseInt($("#fac_menuitems_key :SELECTED").val(), 10);
|
||||
@@ -346,7 +340,6 @@ if (menu_key > -1)
|
||||
var buttons = [];
|
||||
|
||||
buttons.push({ title: L("lcl_submit"), icon: "fa-fclt-save", action: "doSubmit()" });
|
||||
buttons.push({ title: L("lcl_image"), icon: "fa-upload", action: "edit_image()"});
|
||||
buttons.push({ title: L("lcl_cancel"), icon: "fa-fclt-cancel", action: "doCancel()" });
|
||||
|
||||
IFRAMER_HEADER(L("lcl_fac_menuoptie"), buttons);
|
||||
@@ -504,15 +497,7 @@ if (menu_key > -1)
|
||||
|
||||
RWCHECKBOXTR("portal", "fldcheck", mobilemenu ? L("lcl_menu_app") : L("lcl_menuportal"), portal);
|
||||
|
||||
// een icon zou geen flexfile zijn, kan dus ook wat anders kiezen Hoe netjes? TODO
|
||||
RWFIELDTR("image", "fld", L("lcl_image")+" (icon)", image);
|
||||
|
||||
FCLTflexfileselector("image",
|
||||
"sgFile",
|
||||
{ filename: image,
|
||||
label: L("lcl_image"),
|
||||
flexmodule: "MENU"
|
||||
});
|
||||
RWSYMBOLTR("image", L("lcl_image"), image, { "module": "MENU", "key": menu_key });
|
||||
|
||||
BLOCK_END();
|
||||
|
||||
|
||||
@@ -120,12 +120,6 @@ function fncolGroep(oRsvalue)
|
||||
window.location.href = "fac_edit_menu.asp?menu_key=<%=menu_key%>&menuitem_key=<%=menuitem_key%>";
|
||||
}
|
||||
|
||||
function edit_image()
|
||||
{
|
||||
var url = "<%=protectQS.create("../../appl/shared/BijlagenForm.asp?module=MENU&multi=1")%>";
|
||||
FcltMgr.openModalDetail(url, L("lcl_mrk_upload_foto") );
|
||||
}
|
||||
|
||||
function copy_menu()
|
||||
{
|
||||
FcltMgr.openDetail("/appl/fac/fac_menu.asp?copy=1&menu_key=<%=menu_key%>", L("lcl_fac_menu_copy") + " " + L("lcl_fac_menuoptie").toLowerCase());
|
||||
@@ -158,7 +152,6 @@ function fncolGroep(oRsvalue)
|
||||
<%
|
||||
SUBFRAME_START();
|
||||
buttons = [ { title: L("lcl_change"), icon: "fa-fclt-edit", action: "edit_menu()" },
|
||||
{ title: L("lcl_image"), icon: "fa-upload", action: "edit_image()" },
|
||||
{ title: L("lcl_fac_menu_copy"), icon: "fa-copy", action: "copy_menu()", tooltip: L("lcl_fac_menu_copy_hint") },
|
||||
{ title: L("lcl_delete"), icon: "fa-trash-alt", action: "delete_menu()" }];
|
||||
IFRAMER_HEADER(L("lcl_fac_menuoptie"), buttons);
|
||||
@@ -235,7 +228,7 @@ SUBFRAME_START();
|
||||
ROCHECKBOXTR("fldcheck", mobilemenu ? L("lcl_menu_app") : L("lcl_menuportal"), portal, { suppressEmpty: true });
|
||||
|
||||
// Afbeelding
|
||||
ROFIELDTR("fld", L("lcl_image"), image, { suppressEmpty: true });
|
||||
ROSYMBOLTR("fld", L("lcl_image"), image, { "key": menu_key, "module": "MENU" });
|
||||
BLOCK_END();
|
||||
%>
|
||||
</form>
|
||||
|
||||
@@ -23,7 +23,7 @@ FCLTHeader.Requires({ plugins:["jQuery"], js: ["jQuery-ui.js"]});
|
||||
FCLTHeader.Generate();
|
||||
%>
|
||||
<script>
|
||||
|
||||
"use strict";
|
||||
function icon_cancel() {
|
||||
FcltMgr.closeDetail(window, { cancel: true });
|
||||
}
|
||||
@@ -40,7 +40,7 @@ FCLTHeader.Requires({ plugins:["jQuery"], js: ["jQuery-ui.js"]});
|
||||
$("#autofilter").on("keyup", e => {
|
||||
var searchStr = $("#autofilter").val();
|
||||
$(".fa-icon-picker").find("i").each((i, elem) => {
|
||||
$(elem).toggle(String($(elem).data("search")).indexOf(searchStr) > -1);
|
||||
$(elem).toggle(String($(elem).attr("title")).indexOf(searchStr) > -1);
|
||||
});
|
||||
FcltMgr.resized();
|
||||
}).focus();
|
||||
@@ -83,8 +83,8 @@ FCLTHeader.Requires({ plugins:["jQuery"], js: ["jQuery-ui.js"]});
|
||||
for (var j in fa_symbols[i]) {
|
||||
terms.push(fa_symbols[i][j].slice(4, -7)); // Strip '.fa-' en ':before'
|
||||
}
|
||||
icon = fa_symbols[i][0].slice(1, -7);
|
||||
%> <i class="<%=safe.htmlattr(fa_style)%> fa-fw <%=safe.htmlattr(icon)%>" title="<%=safe.htmlattr(icon)%>" data-search="<%=terms.join(" ")%>"></i>
|
||||
icon = fa_symbols[i][0].slice(1, -7); // Strip leading '.' en ':before' van de eerste alias
|
||||
%> <i class="<%=safe.htmlattr(fa_style)%> fa-fw <%=safe.htmlattr(icon)%>" title="<%=safe.htmlattr(terms.join("\r\n"))%>"></i>
|
||||
<% } %>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -1033,12 +1033,7 @@ var ins_deel_aantal = 1;
|
||||
, {maxlength: 8, datatype: "float", html: "onChange='onChangeUitvoertijd();'", selector: selectparams
|
||||
, readonly: !this_ins.canChangeAlg, suppressEmpty: true});
|
||||
|
||||
RWFIELDTR("deel_image", "fld", L("lcl_ins_deel_image"), deel_image, {maxlength: 255, readonly: (parent_key > 0 || isLendOut) || !this_ins.canChangeAlg, suppressEmpty: true });
|
||||
var params = { datatype: "button",
|
||||
html: "title='" + L("lcl_ins_symbol_upload") + "' onclick='UploadImage()'",
|
||||
endicon: "fa-folder-open"
|
||||
}
|
||||
RWFIELDTR("image_button", "button", L("lcl_ins_deel_image_upload"), L("lcl_fg_upload"), params);
|
||||
RWSYMBOLTR("deel_image", L("lcl_ins_deel_image"), deel_image, { "key": ins_key, "module": "INSPHD" });
|
||||
BLOCK_END();
|
||||
|
||||
if (urole != "fo" || uitleen_flex_present) // FO ziet ze alleen als er uitleen flex zijn?
|
||||
|
||||
@@ -118,27 +118,7 @@ else
|
||||
{
|
||||
FcltMgr.closeDetail(window, { cancel: true } );
|
||||
}
|
||||
|
||||
function UploadAcadsymbol()
|
||||
{
|
||||
url = "<%=protectQS.create("../shared/BijlagenForm.asp?module=FGIIS")%>";
|
||||
FcltMgr.openModalDetail(url, L("lcl_change"),
|
||||
{ callback: function (data)
|
||||
{ if (data.filenaam)
|
||||
$("#srtdeel_acadsymbol").val(data.filenaam.replace(/.dwf$/i,'')); } // strip extensie
|
||||
} );
|
||||
}
|
||||
|
||||
function UploadImage()
|
||||
{
|
||||
url = "<%=protectQS.create("../shared/BijlagenForm.asp?module=INSPHS")%>";
|
||||
FcltMgr.openModalDetail(url, L("lcl_change"),
|
||||
{ callback: function (data)
|
||||
{ if (data.filenaam)
|
||||
$("#srtdeel_image").val(data.filenaam); }
|
||||
} );
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
</head>
|
||||
<body class="editmode">
|
||||
<% SUBFRAME_START();
|
||||
@@ -188,13 +168,7 @@ else
|
||||
maxlength: 100
|
||||
});
|
||||
|
||||
RWFIELDTR("srtdeel_image", "fld", L("lcl_ins_image"), srtdeel.srtdeel_image );
|
||||
|
||||
var params = { datatype: "button",
|
||||
html: "title='" + L("lcl_obj_image_upload") + "' onclick='UploadImage()'",
|
||||
endicon: "fa-cloud-upload"
|
||||
}
|
||||
RWFIELDTR("image_button", "button", L("lcl_obj_image_upload"), L("lcl_fg_upload"), params);
|
||||
RWSYMBOLTR("srtdeel_image", L("lcl_ins_image"), srtdeel.srtdeel_image, { "key": srtdeel_key, "module": "INSPHS" });
|
||||
RWFIELDTR("srtdeel_volgnr", "fld", L("lcl_ins_volgnr"), srtdeel.srtdeel_volgnr );
|
||||
RWFIELDTR("srtdeel_eenheid", "fld", L("lcl_obj_unit"), srtdeel.srtdeel_eenheid );
|
||||
FCLTcalendar("vervaldatum",
|
||||
@@ -240,12 +214,7 @@ else
|
||||
BLOCK_END();
|
||||
|
||||
BLOCK_START("insGraph", L("lcl_graphics"), {icon: "fa-map"});
|
||||
RWFIELDTR("srtdeel_acadsymbol", "fld", L("lcl_obj_symbol"), srtdeel.srtdeel_acadsymbol );
|
||||
var params = { datatype: "button",
|
||||
html: "title='" + L("lcl_obj_symbol_upload") + "' onclick='UploadAcadsymbol()'",
|
||||
endicon: "fa-cloud-upload"
|
||||
}
|
||||
RWFIELDTR("symbol_button", "button", L("lcl_obj_symbol_upload"), L("lcl_fg_upload"), params);
|
||||
RWSYMBOLTR("srtdeel_acadsymbol", L("lcl_obj_symbol"), srtdeel.srtdeel_acadsymbol, { "key": srtdeel_key, "module": "FGIIS" });
|
||||
RWFIELDTR("srtdeel_acadsymbol_dwgx", "fldshort", L("lcl_obj_symbol_dwgx"), srtdeel.srtdeel_acadsymbol_dwgx );
|
||||
RWFIELDTR("srtdeel_acadsymbol_dwgy", "fldshort", L("lcl_obj_symbol_dwgy"), srtdeel.srtdeel_acadsymbol_dwgy );
|
||||
if (srtdeel.ins_disc_params_type&16) // alleen als de discipline labels aan heeft staan
|
||||
|
||||
@@ -574,7 +574,7 @@ oRs.Close();
|
||||
if (uitvoertijd)
|
||||
uitvoertijd = uitvoertijd + " " + (uitvoertijd_eenheid == 'D'? L("lcl_mld_days") : L("lcl_mld_hours"))
|
||||
ROFIELDTR("fldshort", L("lcl_ins_uitvoertijd"), uitvoertijd, {suppressEmpty: true});
|
||||
ROFIELDTR("fld", L("lcl_ins_deel_image"), deel_image, { suppressEmpty: true });
|
||||
ROSYMBOLTR("fld", L("lcl_ins_deel_image"), deel_image, { "key": ins_key, "module": "INSPHD" });
|
||||
BLOCK_END();
|
||||
|
||||
// Note: levert op deze manier (soms?) ongeldige html op (tr zonder table)
|
||||
|
||||
@@ -120,8 +120,7 @@ oRs.close();
|
||||
ROFIELDTR("fld", L("lcl_obj_srtdeel_code"), srtdeel.srtdeel_code);
|
||||
ROFIELDTR("fld", L("lcl_descr"), srtdeel.srtdeel_omschrijving,
|
||||
{ translate: { fld: "ins_srtdeel_omschrijving", key : srtdeel_key }});
|
||||
|
||||
ROFIELDTR("fld", L("lcl_ins_symbol_name"), srtdeel.srtdeel_image, {suppressEmpty: true } );
|
||||
ROSYMBOLTR("fld", L("lcl_ins_symbol_name"), srtdeel.srtdeel_image, { "key": srtdeel_key, "module": "INSPHS" });
|
||||
ROFIELDTR("fld", L("lcl_ins_volgnr"), srtdeel.srtdeel_volgnr, {suppressEmpty: true } );
|
||||
ROFIELDTR("fld", L("lcl_obj_unit"), srtdeel.srtdeel_eenheid,
|
||||
{ suppressEmpty: true, translate: { fld: "ins_srtdeel_eenheid", key : srtdeel_key }});
|
||||
@@ -198,25 +197,6 @@ oRs.close();
|
||||
}
|
||||
BLOCK_END();
|
||||
|
||||
|
||||
|
||||
if (srtdeel.srtdeel_image)
|
||||
{
|
||||
var imageFile = S("ins_image_path") + srtdeel.srtdeel_image;
|
||||
if (fso.FileExists(Server.MapPath(imageFile)))
|
||||
{
|
||||
BLOCK_START("insImage", L("lcl_ins_image") + ": " + srtdeel.srtdeel_image);
|
||||
%>
|
||||
<tr>
|
||||
<td>
|
||||
<img alt="<%=L("lcl_obj_photo")%>" id="insphoto" src="<%=safe.htmlattr(imageFile)%>">
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
BLOCK_END();
|
||||
}
|
||||
}
|
||||
|
||||
generateFlexKenmerkBlock({ urole: urole,
|
||||
//ins_key: ins_key,
|
||||
bewerkniveau: "S",
|
||||
|
||||
@@ -493,6 +493,98 @@ var iface =
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
// Opent een upload modal en callbacked naar update_symbol_fld
|
||||
upload_symbol: function _upload_symbol() {
|
||||
let fld = $(this).attr("aria-controls");
|
||||
let url = $(this).data("upload-url");
|
||||
let isNew = $(this).data("new");
|
||||
if (isNew && $("#" + fld).val()) {
|
||||
url += "&newfilename=" + $("#" + fld).val();
|
||||
}
|
||||
parent.FcltMgr.openModalDetail( url
|
||||
, L("lcl_mld_symbol_upload")
|
||||
, { callback: FcltCallbackAndThen(function (json) { iface.update_symbol_fld(json, fld); }) }
|
||||
);
|
||||
},
|
||||
// Verwijdert een bestand of icoon uit een symbool-veld en callbacked naar update_symbol_fld
|
||||
remove_symbol: function _remove_symbol() {
|
||||
let fld = $(this).attr("aria-controls");
|
||||
let $val_fld = $("#" + fld);
|
||||
let $filebtn = $("[aria-controls=" + fld + "].symbol-upload");
|
||||
let valType = $(this).closest("td[data-type]").attr("data-type"); // Gecombineerd symbool-veld
|
||||
if (typeof valType === "undefined") {
|
||||
if ($(this).closest(".iconpicker").length) { // Alleen een iconpicker
|
||||
valType = 1;
|
||||
} else if ($(this).closest(".filepicker").length) { // Alleen een filepicker
|
||||
valType = 2;
|
||||
}
|
||||
}
|
||||
if (valType == 1) {
|
||||
iface.update_symbol_fld({ "delete": true }, fld);
|
||||
} else if (valType == 2) {
|
||||
let fileName = $val_fld.val();
|
||||
FcltMgr.confirm(L("lcl_delete") + " " + fileName + "?", function() {
|
||||
let data = {};
|
||||
protectRequest.dataToken(data);
|
||||
let url = $("[aria-controls=" + fld + "].symbol-delete").attr("data-delete-url");
|
||||
let isNew = $filebtn.data("new");
|
||||
if (isNew && $val_fld.val()) {
|
||||
url += "&newfilename=" + $val_fld.val();
|
||||
}
|
||||
$.post(
|
||||
url,
|
||||
data,
|
||||
FcltCallbackAndThen(function (json) { iface.update_symbol_fld({ "delete": true }, fld); })
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
// Opent de iconpicker in een modal en callbacked naar update_symbol_fld
|
||||
iconpicker: function _iconpicker() {
|
||||
let fld = $(this).attr("aria-controls");
|
||||
parent.FcltMgr.openModalDetail( rooturl + "/appl/FontAwesome/iconpicker.asp"
|
||||
, L("lcl_fac_choose_fa_icon")
|
||||
, { callback: FcltCallbackAndThen(function (json) { iface.update_symbol_fld(json, fld); }),
|
||||
width: 1000 }
|
||||
);
|
||||
},
|
||||
|
||||
update_symbol_fld: function _update_symbol_fld(json, fld) {
|
||||
let $iconbtn = $("[aria-controls=" + fld + "].symbol-iconpicker");
|
||||
let $filebtn = $("[aria-controls=" + fld + "].symbol-upload");
|
||||
let $del_btn = $("[aria-controls=" + fld + "].symbol-delete");
|
||||
let $val_fld = $("#" + fld); // Het hidden value veld (de echte waarde)
|
||||
if (json.success) {
|
||||
if (json.icon) {
|
||||
$iconbtn = $(".symbol-iconpicker[aria-controls=" + fld + "]");
|
||||
$iconbtn.val(json.icon).attr("title", json.icon); // Knop
|
||||
$iconbtn.closest(".button-icon-wrapper").find("i").replaceWith(I(json.icon));
|
||||
$val_fld.val(json.icon).closest("td[data-type]").attr("data-type", "1");
|
||||
} else if ("fileName" in json) {
|
||||
if (json.fileName) { // Er is een bestand
|
||||
if ($filebtn.data("module").indexOf("FGII") === 0) {
|
||||
json.fileName = json.fileName.replace(/\.dwf$/, ""); // DWF's worden zonder extensie in de DB opgeslagen
|
||||
}
|
||||
$filebtn = $(".symbol-upload[aria-controls=" + fld + "]");
|
||||
$filebtn.val(json.fileName).attr("title", json.fileName); // Knop
|
||||
$val_fld.val(json.fileName).closest("td[data-type]").attr("data-type", "2");
|
||||
$del_btn.attr("data-delete-url", json.deleteUrl); // Om de delete knop te doen werken
|
||||
} else {
|
||||
iface.update_symbol_fld({ delete: true }, fld);
|
||||
}
|
||||
}
|
||||
} else if (json.delete) {
|
||||
$iconbtn.val(L("mgt_kenmerk_icon")).attr("title", $iconbtn.data("default-title"));
|
||||
$filebtn.val(L("lcl_image")).attr("title", $filebtn.data("default-title"));
|
||||
$val_fld.val("").closest("td[data-type]").attr("data-type", "0"); // Leeg
|
||||
$iconbtn.closest(".button-icon-wrapper").find("i").replaceWith(I("fa-flag")); // Default FA-icoon
|
||||
$del_btn.attr("data-delete-url", "");
|
||||
}
|
||||
},
|
||||
|
||||
preview_image: function _preview_image() {
|
||||
FcltMgr.openModalDetail($(this).data("preview-url"), L("lcl_flex_preview"));
|
||||
}
|
||||
}
|
||||
// params: checkOnly : [] beperkt array met velden die gecontroleerd moeten worden
|
||||
@@ -1288,6 +1380,11 @@ $(function ()
|
||||
$(".text-styles > .default-clickable-icon").on("click", iface._insert_bb_code);
|
||||
$("textarea.bb_enabled:not([readonly])").on("keydown", iface.onKeydown_bb_code);
|
||||
|
||||
$(".symbol-upload").on("click", iface.upload_symbol);
|
||||
$(".symbol-delete").on("click", iface.remove_symbol);
|
||||
$(".symbol-iconpicker").on("click", iface.iconpicker);
|
||||
$("[data-preview-url]").on("click", iface.preview_image);
|
||||
|
||||
// set trigger on mouseenter event to resize labels
|
||||
function setResizeOnMouseenter() {
|
||||
$('td.label label, td.label label > span').filter(':not([title]), [title=""]').off('mouseenter').on('mouseenter', function(event) {
|
||||
|
||||
@@ -63,7 +63,6 @@ scaffolding(this_model,
|
||||
"forothers",
|
||||
"fedeliver",
|
||||
"ordermandate",
|
||||
"_upload",
|
||||
"symbolname"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -176,7 +176,6 @@ var this_params = {
|
||||
"fields": [
|
||||
"hint",
|
||||
"externallink",
|
||||
"_upload",
|
||||
"symbolname",
|
||||
"colors",
|
||||
"survey",
|
||||
|
||||
@@ -314,11 +314,15 @@ function scf_ROFIELDTR(model, fld, val, key, params)
|
||||
{
|
||||
ROTEXTAREATR("fldtxt", field.label, txt, params);
|
||||
}
|
||||
else if (field.typ == "color" || field.typ == "symbol")
|
||||
else if (field.typ == "color")
|
||||
{
|
||||
params.datatype = field.typ;
|
||||
ROFIELDTR("fldshort", field.label, txt, params);
|
||||
}
|
||||
else if (field.typ == "symbol")
|
||||
{
|
||||
ROSYMBOLTR(fld, field.label, val, { "key": key, "module": field.module });
|
||||
}
|
||||
else
|
||||
{
|
||||
ROFIELDTR("fld", field.label, txt, params);
|
||||
@@ -793,7 +797,7 @@ function scf_RWFIELDTR(model, fld, val, key, params)
|
||||
}
|
||||
else if (field.typ == "symbol")
|
||||
{
|
||||
scf_SYMBOL(fld, field, val, { "key": key });
|
||||
RWSYMBOLTR(fld, field.label, val, { "key": key, "module": field.module });
|
||||
}
|
||||
else if (field.typ == "varchar" && field.events)
|
||||
{
|
||||
@@ -947,42 +951,6 @@ function scf_BUTTONSPAN(fld, field, params)
|
||||
+'</tr>');
|
||||
}
|
||||
|
||||
function scf_SYMBOL(fld, field, val, params) {
|
||||
var valType = 0; // Geen waarde
|
||||
if (val) {
|
||||
if (val.indexOf("fa-") > -1 && val.indexOf(".") === -1) {
|
||||
valType = 1; // Icoon
|
||||
} else {
|
||||
valType = 2; // Bestand
|
||||
}
|
||||
}
|
||||
Response.Write('<tr>'
|
||||
+' <td class="label">'
|
||||
+' <label>'+(field.label?field.label:'')+'</label>'
|
||||
+' </td>'
|
||||
+' <td data-type="' + valType + '">'
|
||||
+' <input type="hidden" id="'+fld+'" name="'+fld+'" value="' + safe.htmlattr(val) + '">'
|
||||
+' <span class="button-icon-wrapper fa-picker">'
|
||||
+' <span class="starticon">' + (valType == 1 ? I(val) : I("fa-flag")) + '</span>'
|
||||
+' <input type="button" class="button scf-iconpicker" title="'+field.label+'" value="' + safe.htmlattr(val || L("mgt_kenmerk_icon")) + '"'
|
||||
+ ' data-default-title="'+field.label+'" aria-controls="' + fld + '">'
|
||||
+' </span>'
|
||||
+' <span class="button-icon-wrapper file-picker">'
|
||||
+' <span class="starticon">' + I("fa-file-image") + '</span>'
|
||||
+' <input type="button" class="button scf-upload" title="'+field.label+'" value="' + safe.htmlattr(val || L("lcl_image")) + '"'
|
||||
+ ' aria-controls="' + fld + '" data-default-title="'+field.label+'"'
|
||||
+ ' data-upload-url="' + protectQS.create("../shared/BijlagenForm.asp?key=" + params.key + "&module=" + field.module + (mode == "show"? "&reado=1" : "")) + '">'
|
||||
+' </span>'
|
||||
+' <span class="default-clickable-icon symbol-delete" aria-controls="' + fld + '"'
|
||||
+ (valType == 2 ? ' data-delete-url="' + safe.htmlattr(protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?key=" + params.key + "&module=" + field.module)) + '"'
|
||||
: '')
|
||||
+ '>'
|
||||
+I("fa-trash-alt")
|
||||
+' </span>'
|
||||
+' </td>'
|
||||
+'</tr>');
|
||||
}
|
||||
|
||||
function scf_DIV(fld, field, params)
|
||||
{
|
||||
Response.Write('<div id="'+fld+'" name="'+fld+'">'+field.defaultvalue+'</div>');
|
||||
|
||||
@@ -317,84 +317,6 @@ function scaffolding_edit(model, scf_params)
|
||||
sethint();
|
||||
}
|
||||
|
||||
function scf_upload() {
|
||||
let fld = $(this).attr("aria-controls");
|
||||
let url = $(this).data("upload-url");
|
||||
<% if (key === -1) { %>
|
||||
if ($("#" + fld).val()) {
|
||||
url += "&newfilename=" + $("#" + fld).val();
|
||||
}
|
||||
<% } %>
|
||||
parent.FcltMgr.openModalDetail( url
|
||||
, L("lcl_mld_symbol_upload")
|
||||
, { callback: FcltCallbackAndThen(function (json) { scf_update_symbol(json, fld); }) }
|
||||
);
|
||||
}
|
||||
|
||||
function scf_delete_symbol() {
|
||||
let fld = $(this).attr("aria-controls");
|
||||
let valType = $(this).closest("[data-type]").attr("data-type") || 0;
|
||||
if (valType == 1) {
|
||||
scf_update_symbol({ "delete": true }, fld);
|
||||
} else if (valType == 2) {
|
||||
let fileName = $("#" + fld).val();
|
||||
FcltMgr.confirm(L("lcl_delete") + " " + fileName + "?", function() {
|
||||
let data = {};
|
||||
protectRequest.dataToken(data);
|
||||
let url = $("[aria-controls=" + fld + "].symbol-delete").attr("data-delete-url");
|
||||
<% if (key === -1) { %>
|
||||
if ($("#" + fld).val()) {
|
||||
url += "&newfilename=" + $("#" + fld).val();
|
||||
}
|
||||
<% } %>
|
||||
$.post(
|
||||
url,
|
||||
data,
|
||||
FcltCallbackAndThen(function (json) { scf_update_symbol({ "delete": true }, fld); })
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function scf_iconpicker() {
|
||||
let fld = $(this).attr("aria-controls");
|
||||
parent.FcltMgr.openModalDetail( "<%=safe.jsstring(rooturl + "/appl/FontAwesome/iconpicker.asp")%>"
|
||||
, L("lcl_fac_choose_fa_icon")
|
||||
, { callback: FcltCallbackAndThen(function (json) { scf_update_symbol(json, fld); }),
|
||||
width: 1000 }
|
||||
);
|
||||
}
|
||||
|
||||
function scf_update_symbol(json, fld) {
|
||||
let $iconbtn = $("[aria-controls=" + fld + "].scf-iconpicker");
|
||||
let $filebtn = $("[aria-controls=" + fld + "].scf-upload");
|
||||
let $del_btn = $("[aria-controls=" + fld + "].symbol-delete");
|
||||
let $val_fld = $("#" + fld); // Het hidden value veld (de echte waarde)
|
||||
if (json.success) {
|
||||
if (json.icon) {
|
||||
$iconbtn = $(".scf-iconpicker[aria-controls=" + fld + "]");
|
||||
$iconbtn.val(json.icon).attr("title", json.icon); // Knop
|
||||
$iconbtn.closest(".button-icon-wrapper").find("i").replaceWith(I(json.icon));
|
||||
$val_fld.val(json.icon).closest("td").attr("data-type", "1");
|
||||
} else if ("fileName" in json) {
|
||||
if (json.fileName) { // Er is een bestand
|
||||
$filebtn = $(".scf-upload[aria-controls=" + fld + "]");
|
||||
$filebtn.val(json.fileName).attr("title", json.fileName); // Knop
|
||||
$val_fld.val(json.fileName).closest("td").attr("data-type", "2");
|
||||
$del_btn.attr("data-delete-url", json.deleteUrl); // Om de delete knop te doen werken
|
||||
} else {
|
||||
scf_update_symbol({ delete: true }, fld);
|
||||
}
|
||||
}
|
||||
} else if (json.delete) {
|
||||
$iconbtn.val(L("mgt_kenmerk_icon")).attr("title", $iconbtn.data("default-title"));
|
||||
$filebtn.val(L("lcl_image")).attr("title", $iconbtn.data("default-title"));
|
||||
$val_fld.val("").closest("td").attr("data-type", "0"); // Leeg
|
||||
$iconbtn.closest(".button-icon-wrapper").find("i").replaceWith(I("fa-flag")); // Default FA-icoon
|
||||
$del_btn.attr("data-delete-url", "");
|
||||
}
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
$('textarea').resize(function () { FcltMgr.resized(window) });
|
||||
@@ -412,9 +334,6 @@ function scaffolding_edit(model, scf_params)
|
||||
window.lastinputid = this.htmlFor;
|
||||
sethint();
|
||||
});
|
||||
$("[type=button].scf-upload").on("click", scf_upload);
|
||||
$(".symbol-delete").on("click", scf_delete_symbol);
|
||||
$(".scf-iconpicker").on("click", scf_iconpicker);
|
||||
|
||||
FcltMgr.resized(); // Indien labels over meer dan 1 regel staan.
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ function bijlagen(autfunction, label, module, reado, imp_exp_key)
|
||||
{
|
||||
if (xfunc.canWrite(autfunction))
|
||||
{
|
||||
var url = "../shared/BijlagenForm.asp?module=" + module + transitParam;
|
||||
var url = "../shared/BijlagenForm.asp?key=0&module=" + module + transitParam;
|
||||
if (reado)
|
||||
url += "&reado=1";
|
||||
if (imp_exp_key)
|
||||
|
||||
@@ -51,7 +51,7 @@ if (!agent.match(/MSIE \d|Trident/))
|
||||
FCLTHeader.Requires({ js:["./BijlagenForm_async.js"] });
|
||||
}
|
||||
|
||||
protectQS.verify({ allowparams: ["no_autoscroll", "newfilename"]}); // tamper check
|
||||
protectQS.verify({ allowparams: ["no_autoscroll", "newfilename"] }); // tamper check
|
||||
|
||||
// key of folder wordt doorgegeven
|
||||
|
||||
@@ -490,7 +490,7 @@ __Log("Zoeken bestanden onder " + params.AttachPath);
|
||||
}
|
||||
let extraTransitParam = "";
|
||||
<% if (pKey === -1 && "linkImmediate" in params) { %>
|
||||
extraTransitParam = "&newfilename=" + encodeURIComponent(uploaded_files[0]);
|
||||
extraTransitParam = "&newfilename=" + encodeURIComponent(uploaded_files[0].replace(/\.dwf$/, ""));
|
||||
<% } %>
|
||||
window.location = "<%=protectQS.create("BijlagenForm.asp?x=x" + transitParam)%>" + extraTransitParam;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ else if (pModule == "MLD" && pNiveau == "O")
|
||||
<!-- #include file="../Shared/common.inc" -->
|
||||
<!-- #include file="./flexfiles.inc" -->
|
||||
<%
|
||||
protectQS.verify({ allowparams: ["newfilename"]}); // tamper check
|
||||
protectQS.verify({ allowparams: ["newfilename"] }); // tamper check
|
||||
protectRequest.validateToken();
|
||||
|
||||
var pKenmerk_key = getQParamInt("kenmerk_key", -1);
|
||||
@@ -46,6 +46,9 @@ if (pDoDelete === "" && "linkImmediate" in params) {
|
||||
} else {
|
||||
pDoDelete = getQParam("newfilename", "");
|
||||
}
|
||||
if (pDoDelete && pModule.indexOf("FGII") === 0) {
|
||||
pDoDelete = pDoDelete.replace(/(\.dwf)?$/, ".dwf");
|
||||
}
|
||||
}
|
||||
|
||||
result = { success: true, toaster: L("lcl_appendix_removed").format(safe.html(pDoDelete))};
|
||||
|
||||
@@ -39,7 +39,7 @@ var picsPerLine = getQParamInt("nrOfPict", -1);
|
||||
var regex = new RegExp(S("flexPreviewExt"), "i");
|
||||
for (var x = 0; x < p_key_arr.length; x++)
|
||||
{
|
||||
var params = flexProps(pModule, p_key_arr[x], String(pKenmerk_key), pNiveau);
|
||||
var params = flexProps(pModule, p_key_arr[x], String(pKenmerk_key), pNiveau, { getFiles: true });
|
||||
for (var i = 0; i < params.files.length; i++)
|
||||
{
|
||||
// Only preview the extensions as specified in S("flexPreviewExt")
|
||||
@@ -92,7 +92,9 @@ var picsPerLine = getQParamInt("nrOfPict", -1);
|
||||
|
||||
for (var i = 0; i < lijst.length; i++)
|
||||
{
|
||||
href = protectQS.create(OpenFlexFile( lijst[i].module
|
||||
href = params.directlink
|
||||
? protectQS.create(lijst[i].deepurl)
|
||||
: protectQS.create(OpenFlexFile( lijst[i].module
|
||||
, lijst[i].key
|
||||
, { mime_type: lijst[i].mimetype, contentdp: "inline" }
|
||||
));
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
Context:
|
||||
Note: pModule, pKey en pSubpath worden genormaliseerd
|
||||
tot simpele/veilige padnamen
|
||||
|
||||
pickfile heeft als bijeffect dat je een bijlage uit de lijst kunt kiezen
|
||||
*/
|
||||
|
||||
var fso = Server.CreateObject("Scripting.FileSystemObject"); // Die hebben we hier *zo* vaak nodig.
|
||||
@@ -327,8 +325,15 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
result.AttachRootPath = S("flexfilespath") + "/cad/concept/";
|
||||
result.AttachPath = result.AttachRootPath;
|
||||
result.searchfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = "dwf";
|
||||
result.linkImmediate = {
|
||||
"table" : "cad_tekening",
|
||||
"key_col" : "cad_tekening_key",
|
||||
"link_col" : "cad_tekening_filenaam"
|
||||
}
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = "^" + safe.regexp(pKey) + ".dwf$";
|
||||
}
|
||||
break;
|
||||
case "FGIIV": // Vluchtplannen
|
||||
result.AttachRootPath = S("flexfilespath") + "/cad/vlucht/";
|
||||
@@ -337,17 +342,22 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
result.multi = true;
|
||||
result.extFilter = "dwf";
|
||||
break;
|
||||
case "FGIIS": // Facilitor Graphics symbolen
|
||||
case "FGIIS": // Facilitor Graphics symbolen
|
||||
result.AttachRootPath = S("flexfilespath") + "/cad/symbols/";
|
||||
result.AttachPath = result.AttachRootPath;
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = "dwf";
|
||||
result.linkImmediate = {
|
||||
"table" : "ins_srtdeel",
|
||||
"key_col" : "ins_srtdeel_key",
|
||||
"link_col" : "ins_srtdeel_acadsymbol"
|
||||
}
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = "^" + safe.regexp(pKey) + ".dwf$";
|
||||
}
|
||||
break;
|
||||
case "FGIIP":
|
||||
result.AttachRootPath = S("flexfilespath") + "/cad/prj/";
|
||||
result.AttachPath = result.AttachRootPath + pKey + "/";
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = "dwf";
|
||||
break;
|
||||
@@ -365,6 +375,7 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
// Bestanden zijn te vinden op prs_bedrijf.prs_bedrijf_image_loc of ...cust/xxxx/photos/bes/[disc_key]/
|
||||
// Wij kunnen alleen bestanden naar ...cust/xxxx/photos/bes/[disc_key]/ uploaden.
|
||||
result.AttachRootPath = Server.MapPath(S("bes_image_path"));
|
||||
result.RelativePath = S("bes_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/" + pKey + "/";
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.pickfile = true;
|
||||
@@ -375,90 +386,111 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
case "INSPHS": // ins_srtdeel (Objectsoort)
|
||||
// Bestanden zijn te vinden op ...cust/x/photos/ins
|
||||
result.AttachRootPath = Server.MapPath(S("ins_image_path"));
|
||||
result.RelativePath = S("ins_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.regexp = S("ins_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = "ins_srtdeel";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = "^" + safe.regexp(pKey) + "$";
|
||||
}
|
||||
break;
|
||||
case "BESD": // bes_discipline symbolen
|
||||
result.AttachRootPath = Server.MapPath(S("besd_image_path"));
|
||||
result.RelativePath = S("besd_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.regexp = S("bes_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = "discipline";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = safe.regexp(pKey);
|
||||
}
|
||||
break;
|
||||
case "BGTD": // bgt_discipline symbolen
|
||||
result.AttachRootPath = Server.MapPath(S("bgtd_image_path"));
|
||||
result.RelativePath = S("bgtd_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.regexp = S("bgt_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = "discipline";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = safe.regexp(pKey);
|
||||
}
|
||||
break;
|
||||
case "INSD": // ins_discipline symbolen
|
||||
result.AttachRootPath = Server.MapPath(S("insd_image_path"));
|
||||
result.RelativePath = S("insd_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.regexp = S("ins_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = "discipline";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = safe.regexp(pKey);
|
||||
}
|
||||
break;
|
||||
case "CNTD": // cnt_discipline symbolen
|
||||
result.AttachRootPath = Server.MapPath(S("cntd_image_path"));
|
||||
result.RelativePath = S("cntd_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.regexp = S("cnt_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = "discipline";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = safe.regexp(pKey);
|
||||
}
|
||||
break;
|
||||
case "RESD": // ins_discipline symbolen
|
||||
result.AttachRootPath = Server.MapPath(S("resd_image_path"));
|
||||
result.RelativePath = S("resd_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.regexp = S("res_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = "discipline";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = safe.regexp(pKey);
|
||||
}
|
||||
break;
|
||||
case "MLDS": // Stdmelding symbolen
|
||||
result.AttachRootPath = Server.MapPath(S("mlds_image_path"));
|
||||
result.RelativePath = S("mlds_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.regexp = S("mld_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = "mld_stdmelding";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = safe.regexp(pKey);
|
||||
}
|
||||
break;
|
||||
case "MLDD": // mld_discipline symbolen
|
||||
result.AttachRootPath = Server.MapPath(S("mldd_image_path"));
|
||||
result.RelativePath = S("mldd_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.regexp = S("mld_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = {
|
||||
"table" : "ins_tab_discipline",
|
||||
"key_col" : "ins_discipline_key",
|
||||
"link_col" : "ins_discipline_image"
|
||||
}
|
||||
if (typeof pKey == "string") {
|
||||
params.filter = "^" + safe.regexp(pKey) + "$";
|
||||
result.linkImmediate = "discipline";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = safe.regexp(pKey);
|
||||
}
|
||||
break;
|
||||
case "MLDSD": // mld_srtdiscipline symbolen
|
||||
result.AttachRootPath = Server.MapPath(S("mldsd_image_path"));
|
||||
result.RelativePath = S("mldsd_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.pickfile = true;
|
||||
result.multi = true;
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.regexp = S("mld_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = "ins_srtdiscipline";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = safe.regexp(pKey);
|
||||
}
|
||||
break;
|
||||
case "ALG":
|
||||
case "BES":
|
||||
@@ -512,6 +544,7 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
case "ALGPHT":
|
||||
// Bestanden zijn te vinden op ...cust/x/photos
|
||||
result.AttachRootPath = Server.MapPath(S("alg_image_path"));
|
||||
/* result.RelativePath => Wordt verderop al geregeld */
|
||||
if (pModule == "ALGPHL")
|
||||
result.AttachRootPath += '/locatie';
|
||||
if (pModule == "ALGPHG")
|
||||
@@ -520,11 +553,10 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
result.AttachRootPath += '/terrein';
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.pickfile = true;
|
||||
result.searchfile = true;
|
||||
result.multi = true;
|
||||
result.regexp = S("alg_photo_size");
|
||||
result.directlink = true;
|
||||
/* result.linkImmediate = "discipline"; TODO */
|
||||
if (typeof pKey == "string")
|
||||
params.filter = pKey;
|
||||
break;
|
||||
@@ -533,16 +565,16 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
case "RESPHD":
|
||||
// Bestanden zijn te vinden op ...cust/x/photos
|
||||
result.AttachRootPath = Server.MapPath(S("res_image_path"));
|
||||
/* result.RelativePath => Wordt verderop al geregeld */
|
||||
if (pModule == "RESPHA")
|
||||
result.AttachRootPath += '/artikel';
|
||||
if (pModule == "RESPHD")
|
||||
result.AttachRootPath += '/deel';
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.searchfile = true;
|
||||
result.multi = true;
|
||||
result.regexp = S("res_photo_size");
|
||||
result.directlink = true;
|
||||
/* result.linkImmediate = "discipline"; TODO */
|
||||
if (typeof pKey == "string")
|
||||
params.filter = pKey;
|
||||
break;
|
||||
@@ -587,25 +619,27 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
// Bestanden zijn te vinden op ...cust/x/photos
|
||||
result.AttachRootPath = Server.MapPath(S("ins_image_path"));
|
||||
result.AttachRootPath += '/deel';
|
||||
result.RelativePath = S("ins_image_path") + "/deel/";
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.pickfile = true;
|
||||
result.searchfile = true;
|
||||
result.multi = true;
|
||||
result.RelativePath = S("ins_image_path") + "/insdeel/";
|
||||
//result.forcesingle = true; // verwijder eventuele anderen
|
||||
result.regexp = S("ins_photo_size"); // "r200x150", Resized naar binnen 200x150 (zonder crop, met behoud aspect ratio)
|
||||
result.directlink = true;
|
||||
if (typeof pKey == "string")
|
||||
params.filter = pKey;
|
||||
result.linkImmediate = "ins_deel";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = "^" + safe.regexp(pKey) + "$";
|
||||
}
|
||||
break;
|
||||
case "MENU":
|
||||
result.AttachRootPath = Server.MapPath(S("menu_image_path"));
|
||||
result.RelativePath = S("menu_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/";
|
||||
result.multi = true;
|
||||
result.extFilter = S("flexExtensionFilter"); // was "jpg|png"; maar tegenwoordig ook andere bestanden
|
||||
result.regexp = S("menu_photo_size");
|
||||
result.directlink = true;
|
||||
result.linkImmediate = "fac_menu";
|
||||
if (typeof pKey === "string") {
|
||||
params.filter = "^" + safe.regexp(pKey) + "$";
|
||||
}
|
||||
break;
|
||||
case "BDRADR":
|
||||
result.AttachRootPath = S("bdradrfiles_path");
|
||||
@@ -791,6 +825,14 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
result.maxfiles = 10;
|
||||
oRs.Close();
|
||||
break;
|
||||
case "STYLE": /* TODO */
|
||||
result.AttachRootPath = Server.MapPath(S("style_image_path"));
|
||||
result.RelativePath = S("style_image_path");
|
||||
result.AttachPath = result.AttachRootPath + "/" + pKey + "/"; // pKey = de naam van het style-item
|
||||
result.extFilter = S("imgAllowedExt");
|
||||
result.regexp = S("menu_photo_size"); // TODO
|
||||
result.directlink = true; // ?
|
||||
break;
|
||||
default:
|
||||
_AiAi("INTERNAL_ERROR, invalid module {0}".format(pModule));
|
||||
}
|
||||
@@ -807,6 +849,22 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
result.AttachRootPath = result.AttachRootPath.replace("..", "_");
|
||||
result.AttachPath = result.AttachPath.replace("..", "_");
|
||||
|
||||
if (typeof result.linkImmediate === "string") { // Alleen tabelnaam mag ook, dan gaan we uit van _key en _image column-namen
|
||||
if (result.linkImmediate === "discipline") {
|
||||
result.linkImmediate = {
|
||||
"table" : "ins_tab_discipline",
|
||||
"key_col" : "ins_discipline_key",
|
||||
"link_col": "ins_discipline_image"
|
||||
}
|
||||
} else {
|
||||
result.linkImmediate = {
|
||||
"table" : result.linkImmediate,
|
||||
"key_col" : result.linkImmediate + "_key",
|
||||
"link_col": result.linkImmediate + "_image"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (result.fac_bijlagen && ((pKey > 0) || params.bijlagen_key > 0))
|
||||
{
|
||||
var v_bijlagen = get_bijlagen(pModule, pKey, pKenmerk_key, params.bijlagen_key, pNiveau, params.kenmerk_geldig);
|
||||
@@ -852,7 +910,11 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
+ " WHERE " + result.linkImmediate.key_col + " = " + pKey;
|
||||
var oRs = Oracle.Execute(sql);
|
||||
if (!oRs.EoF) {
|
||||
params.filter += safe.regexp(oRs(0).Value);
|
||||
var linkedFilename = oRs(0).Value;
|
||||
if (linkedFilename && pModule.indexOf("FGII") === 0) { // Deze worden mogelijk zonder extensie opgeslagen in de DB
|
||||
linkedFilename = linkedFilename.replace(/(\.dwf)?$/, ".dwf");
|
||||
}
|
||||
params.filter += safe.regexp(linkedFilename);
|
||||
}
|
||||
oRs.Close();
|
||||
params.filter += "$";
|
||||
@@ -863,14 +925,13 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
{
|
||||
totalfiles ++;
|
||||
var fsoFile = fc.item();
|
||||
if (params.filter && !(new RegExp(params.filter, "i").test(fsoFile.Name)))
|
||||
continue;
|
||||
|
||||
if (result.extFilter && !(new RegExp(".({0})$".format(result.extFilter), "i").test(fsoFile.Name)))
|
||||
{
|
||||
if (params.filter && !(new RegExp(params.filter, "i").test(fsoFile.Name))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (result.extFilter && !(new RegExp(".({0})$".format(result.extFilter), "i").test(fsoFile.Name))) {
|
||||
continue;
|
||||
}
|
||||
var extension = fsoFile.Name.split(".").pop().toLowerCase();
|
||||
var ffile = { key: -1
|
||||
, name: fsoFile.Name
|
||||
@@ -885,7 +946,6 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
{
|
||||
ffile.ishistory = true;
|
||||
}
|
||||
|
||||
var filedata = oneFileInfo(ffile, result, pModule, pKey, pSubpath, pNiveau, params);
|
||||
result.files.push(filedata);
|
||||
}
|
||||
@@ -1007,44 +1067,40 @@ function oneFileInfo(pFileData, pResult, pModule, pKey, pSubpath, pNiveau, param
|
||||
if (pResult.directlink)
|
||||
{
|
||||
var root = HTTP.urlzelfnoroot() + pResult.RelativePath;
|
||||
if (pModule.substr(0, 5) == "ALGPH")
|
||||
{
|
||||
var root = HTTP.urlzelfnoroot() + S("ins_image_path");
|
||||
if (pModule.substr(0, 5) == "ALGPH") {
|
||||
root = HTTP.urlzelfnoroot() + S("alg_image_path");
|
||||
if (pModule == "ALGPHL")
|
||||
root += 'locatie/';
|
||||
if (pModule == "ALGPHG")
|
||||
root += 'gebouw/';
|
||||
if (pModule == "ALGPHT")
|
||||
root += 'terrein/';
|
||||
}
|
||||
if (pModule.substr(0, 5) == "RESPH")
|
||||
{
|
||||
var root = HTTP.urlzelfnoroot() + S("res_image_path");
|
||||
} else if (pModule.substr(0, 5) == "RESPH") {
|
||||
root = HTTP.urlzelfnoroot() + S("res_image_path");
|
||||
if (pModule == "RESPHA")
|
||||
root += 'artikel/';
|
||||
if (pModule == "RESPHD")
|
||||
root += 'deel/';
|
||||
}
|
||||
|
||||
filedata.deepurl = root + filedata.name;
|
||||
}
|
||||
else // Alleen streaming, bestand staat buiten webroot?
|
||||
}
|
||||
else // Alleen streaming, bestand staat buiten webroot?
|
||||
{
|
||||
var deepurl = HTTP.urlzelf() + "/appl/shared/BijlagenStream.asp"
|
||||
+ "?module=" + pModule;
|
||||
if (filedata.key > 0)
|
||||
{
|
||||
var deepurl = HTTP.urlzelf() + "/appl/shared/BijlagenStream.asp"
|
||||
+ "?module=" + pModule;
|
||||
if (filedata.key > 0)
|
||||
{
|
||||
deepurl += "&bijlagen_key=" + filedata.key;
|
||||
}
|
||||
else
|
||||
{
|
||||
deepurl += "&key=" + pKey
|
||||
+ (pNiveau? "&niveau=" + pNiveau : "")
|
||||
+ "&kenmerk_key=" + pSubpath
|
||||
+ "&filename=" + Server.URLencode(filedata.name);
|
||||
}
|
||||
filedata.deepurl = protectQS.create(deepurl);
|
||||
deepurl += "&bijlagen_key=" + filedata.key;
|
||||
}
|
||||
else
|
||||
{
|
||||
deepurl += "&key=" + pKey
|
||||
+ (pNiveau? "&niveau=" + pNiveau : "")
|
||||
+ "&kenmerk_key=" + pSubpath
|
||||
+ "&filename=" + Server.URLencode(filedata.name);
|
||||
}
|
||||
filedata.deepurl = protectQS.create(deepurl);
|
||||
}
|
||||
}
|
||||
return filedata;
|
||||
}
|
||||
@@ -1394,8 +1450,7 @@ function DeleteFile(fullpath, km_params)
|
||||
if ("linkImmediate" in km_params && pKey > 0) { // Unlink dit bestand ook van de entiteit waar het bij hoor in de DB
|
||||
var sql = "UPDATE " + km_params.linkImmediate.table
|
||||
+ " SET " + km_params.linkImmediate.link_col + " = NULL"
|
||||
+ " WHERE " + km_params.linkImmediate.link_col + " = " + safe.quoted_sql(km_params.file) // Overbodig maar ok
|
||||
+ " AND " + km_params.linkImmediate.key_col + " = " + km_params.refkey;
|
||||
+ " WHERE " + km_params.linkImmediate.key_col + " = " + km_params.refkey;
|
||||
Oracle.Execute(sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -193,9 +193,13 @@ var oorzaak_bekend = false;
|
||||
result.filesize.push(fso.GetFile(attachfile).Size);
|
||||
var oCrypto = new ActiveXObject("SLNKDWF.Crypto");
|
||||
result.digest.push(oCrypto.hex_sha1_file(attachfile));
|
||||
var linkedFilename = savedfilename;
|
||||
if (pModule.indexOf("FGII") === 0) {
|
||||
linkedFilename = linkedFilename.replace(/\.dwf$/, "");
|
||||
}
|
||||
if ("linkImmediate" in params && pKey > 0) { // Link dit bestand direct aan de entiteit waar het bij hoor in de DB
|
||||
var sql = "UPDATE " + params.linkImmediate.table
|
||||
+ " SET " + params.linkImmediate.link_col + " = " + safe.quoted_sql(savedfilename)
|
||||
+ " SET " + params.linkImmediate.link_col + " = " + safe.quoted_sql(linkedFilename)
|
||||
+ " WHERE " + params.linkImmediate.key_col + " = " + pKey;
|
||||
Oracle.Execute(sql);
|
||||
}
|
||||
|
||||
@@ -1914,7 +1914,7 @@ body:not(#listbody, #planbody) td.label {
|
||||
width: 30%;
|
||||
}
|
||||
section#searchbody td.label + td,
|
||||
body:not(#listbody, #planbody) td.label:not(.flexsearch) + td:not([data-type]) {
|
||||
body:not(#listbody, #planbody) td.label:not(.flexsearch) + td:not(.iconpicker, .filepicker, [data-type]) {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
@@ -2759,6 +2759,8 @@ span:is(.bijlage, .bijlage1, .endicon, .starticon) {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.button-icon-wrapper:hover > [type=button]:not([disabled]),
|
||||
input[type=button]:hover:not([disabled]),
|
||||
input[type=text].button:hover:not([disabled]),
|
||||
.uploadbutton:hover,
|
||||
@@ -2766,13 +2768,12 @@ span.button:hover {
|
||||
color: var(--buttonhovercolor);
|
||||
background-color:var(--buttonhoverbackgroundcolor);
|
||||
}
|
||||
|
||||
input:hover:not([disabled]) + span:is(.bijlage, .bijlage1, .endicon),
|
||||
.button-icon-wrapper:hover > .starticon {
|
||||
.button-icon-wrapper:hover > :is(.starticon,
|
||||
[type=button]:not([disabled]) + :is(.bijlage, .bijlage1, .endicon)) {
|
||||
color: var(--buttonhovercolor);
|
||||
}
|
||||
|
||||
input[type=button][disabled]{
|
||||
input[type=button][disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@@ -3073,48 +3074,37 @@ input[type=file] {
|
||||
padding-right: 10px; /* Button default */
|
||||
}
|
||||
|
||||
/* Symbool knoppen */
|
||||
[data-type] .button-icon-wrapper {
|
||||
overflow: hidden;
|
||||
}
|
||||
[data-type] .button-icon-wrapper input[type=button] {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.symbol-delete {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
[data-type] {
|
||||
|
||||
/* Symbool knoppen */
|
||||
:is(.iconpicker, .filepicker, [data-type]) {
|
||||
display: grid;
|
||||
column-gap: 1px;
|
||||
}
|
||||
:is(.iconpicker, .filepicker, [data-type]) .button-icon-wrapper {
|
||||
overflow: hidden;
|
||||
}
|
||||
:is(.iconpicker, .filepicker, [data-type]) .button-icon-wrapper input[type=button] {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* type = 0 laat 2 gelijke knoppen zien */
|
||||
[data-type="0"] {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
[data-type="0"] .fa-picker {
|
||||
grid-area: 1 / 1;
|
||||
}
|
||||
[data-type="0"] .file-picker {
|
||||
grid-area: 1 / 2;
|
||||
}
|
||||
|
||||
/* Anders 1 knop met 1 'delete'-icoontje */
|
||||
:is([data-type="1"], [data-type="2"]) {
|
||||
grid-template-columns: 99fr 1fr;
|
||||
}
|
||||
:is([data-type="1"], [data-type="2"]) :is(.fa-picker, .file-picker) {
|
||||
grid-area: 1 / 1;
|
||||
}
|
||||
:is([data-type="1"], [data-type="2"]) .symbol-delete {
|
||||
grid-area: 1 / 2;
|
||||
:is([data-type="1"], [data-type="2"], .iconpicker, .filepicker) {
|
||||
grid-template-columns: 999fr 1fr;
|
||||
}
|
||||
|
||||
[data-type="0"] > .symbol-delete,
|
||||
[data-type="1"] > .file-picker,
|
||||
[data-type="2"] > .fa-picker {
|
||||
[data-type="2"] > .fa-picker,
|
||||
:is([data-type="0"], .iconpicker, .filepicker) > [type=hidden][value=""] ~ .symbol-delete {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -3168,6 +3158,7 @@ img.kenmerk[src]:not([src=""]) + .flex-bijlage.button-icon-wrapper {
|
||||
}
|
||||
span.starticon {
|
||||
left: 0.5em;
|
||||
right: initial;
|
||||
}
|
||||
|
||||
span:is(.starticon, .endicon) {
|
||||
|
||||
@@ -34,6 +34,7 @@ settings =
|
||||
// logischer is om ze ooit allemaal onder een /photos/ te plaatsen
|
||||
image_path_virtual: { v: custpath },
|
||||
menu_image_path: { v: custpath + "/flexfiles/menu/" },
|
||||
style_image_path: { v: custpath + "/flexfiles/FAC/style/" },
|
||||
alg_image_path: { v: custpath + "/photos/" },
|
||||
prs_image_path: { v: custpath + "/flexfiles/prs/" },
|
||||
res_image_path: { v: custpath + "/photos/" },
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
Description: generic interface functions for buttons and maybe more
|
||||
__Logging & 64 onderdukt de suppressEmpty functionaliteit
|
||||
*/ %>
|
||||
<!-- #include file="./FlexFiles.inc" -->
|
||||
<!-- #include file="../FontAwesome/icons.inc" -->
|
||||
<%
|
||||
if (JSON_Result)
|
||||
@@ -675,11 +676,6 @@ function ROFIELD(pclass, plabel, pvalue, params)
|
||||
pvalue = safe.showFloat(pvalue, params.decimals, params.trimZeros);
|
||||
pclass += " float";
|
||||
break;
|
||||
case "symbol":
|
||||
if (pvalue.indexOf("fa-") > -1 && pvalue.indexOf(".") === -1) {
|
||||
safe_value = I(pvalue);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -727,7 +723,7 @@ function ROFIELD(pclass, plabel, pvalue, params)
|
||||
if (params.secret)
|
||||
input += " title='{0}' onclick='this.innerText=this.title;this.onclick=null'>".format(safe.htmlattr(pvalue)) + I("fa-eye fa-lg") +"</span>";
|
||||
else
|
||||
input += ">" + (safe_value ? safe_value : safe.html(pvalue)) + "</span>";
|
||||
input += ">" + safe.html(pvalue) + "</span>";
|
||||
|
||||
if (params.tooltip)
|
||||
input += " <span class=\"tooltip\">" + safe.html(params.tooltip) + "</span>";
|
||||
@@ -1034,25 +1030,117 @@ function CHECKBOX(pclass, pid, pvalue, params)
|
||||
Response.Write(CHECKBOX_HTML(pclass, pid, pvalue, params));
|
||||
}
|
||||
|
||||
function SWITCH_TOGGLE_HTML(pname, pclass, plabel, pvalue, params)
|
||||
{
|
||||
params = params || {};
|
||||
var result = '';
|
||||
result += '<div class="switch-container">';
|
||||
|
||||
pclass = (pclass ? pclass + " " : "") + "switch-checkbox";
|
||||
result += CHECKBOX_HTML(pclass, pname, pvalue, params);
|
||||
|
||||
result += '<label class="switch-label" for="' + pname + '">' + safe.html(plabel) + "</label>";
|
||||
result += '</div>';
|
||||
|
||||
function ICONPICKER_HTML(pname, plabel, pvalue) {
|
||||
var result = "";
|
||||
var hasIcon = pvalue && pvalue.indexOf("fa-") > -1 && pvalue.indexOf(".") === -1;
|
||||
// De TR functies die deze aanroepen moeten het hidden fld maar aanmaken die deze picker dan vult
|
||||
result += "<span class='button-icon-wrapper fa-picker'>"
|
||||
+ " <span class='starticon'>" + (hasIcon ? I(pvalue) : I("fa-flag")) + "</span>"
|
||||
+ " <input type='button' class='button symbol-iconpicker' title='" + safe.htmlattr(plabel) + "' value='" + safe.htmlattr(pvalue || L("mgt_kenmerk_icon")) + "'"
|
||||
+ " data-default-title='" + safe.htmlattr(plabel) + "' aria-controls='" + pname + "'>"
|
||||
+ "</span>";
|
||||
return result;
|
||||
}
|
||||
|
||||
function SWITCH_TOGGLE(pname, pclass, plabel, pvalue, params)
|
||||
function FILEPICKER_HTML(pname, plabel, pvalue, params) {
|
||||
var result = "";
|
||||
// De TR functies die deze aanroepen moeten het hidden fld maar aanmaken die deze picker dan vult
|
||||
result += "<span class='button-icon-wrapper file-picker'>"
|
||||
+ " <span class='starticon'>" + I("fa-file-image") + "</span>"
|
||||
+ " <input type='button' class='button symbol-upload' title='" + safe.htmlattr(plabel) + "' value='" + safe.htmlattr(pvalue || L("lcl_image")) + "'"
|
||||
+ " aria-controls='" + pname + "' data-default-title='" + safe.htmlattr(plabel) + "' data-new='" + (params.key > 0 ? 0 : 1) + "' data-module='" + params.module + "'"
|
||||
+ " data-upload-url='" + protectQS.create("../shared/BijlagenForm.asp?key=" + (params.key || -1) + "&module=" + params.module) + "'>"
|
||||
+ "</span>";
|
||||
return result;
|
||||
}
|
||||
|
||||
// Laat 2 knoppen zien, 1 voor de iconpicker en 1 voor de filepicker
|
||||
function RWSYMBOLTR_HTML(pname, plabel, pvalue, params)
|
||||
{
|
||||
var valType = 0; // Geen waarde
|
||||
if (pvalue) {
|
||||
valType = pvalue.indexOf("fa-") === 0 ? 1 : 2;
|
||||
}
|
||||
var result = "<tr>"
|
||||
+ " <td class='label'>"
|
||||
+ " <label>" + safe.html(plabel) + "</label>"
|
||||
+ " </td>"
|
||||
+ " <td data-type='" + valType + "'>"
|
||||
+ " <input type='hidden' id='" + pname + "' name='" + pname + "' value='" + safe.htmlattr(pvalue) + "'>"
|
||||
+ ICONPICKER_HTML(pname, plabel, pvalue)
|
||||
+ FILEPICKER_HTML(pname, plabel, pvalue, params)
|
||||
+ " <span class='default-clickable-icon symbol-delete' aria-controls='" + pname + "'"
|
||||
+ (valType == 2 ? " data-delete-url='" + safe.htmlattr(protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?key=" + (params.key || -1) + "&module=" + params.module)) + "'"
|
||||
: "")
|
||||
+ ">"
|
||||
+ I("fa-trash-alt")
|
||||
+ " </span>"
|
||||
+ " </td>"
|
||||
+ "</tr>";
|
||||
return result;
|
||||
}
|
||||
|
||||
function FILEPICKERTR(pname, plabel, pvalue, params) {
|
||||
params = params || {};
|
||||
Response.Write("<tr>"
|
||||
+ " <td class='label'>"
|
||||
+ " <label>" + safe.html(plabel) + "</label>"
|
||||
+ " </td>"
|
||||
+ " <td class='filepicker'>"
|
||||
+ " <input type='hidden' id='" + pname + "' name='" + pname + "' value='" + safe.htmlattr(pvalue) + "'>"
|
||||
+ FILEPICKER_HTML(pname, plabel, pvalue, params)
|
||||
+ " <span class='default-clickable-icon symbol-delete' aria-controls='" + pname + "'"
|
||||
+ " data-delete-url='" + safe.htmlattr(protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?key=" + (params.key || -1) + "&module=" + params.module)) + "'"
|
||||
+ ">"
|
||||
+ I("fa-trash-alt")
|
||||
+ " </span>"
|
||||
+ " </td>"
|
||||
+ "</tr>");
|
||||
}
|
||||
|
||||
function RWSYMBOLTR(pname, plabel, pvalue, params)
|
||||
{
|
||||
params = params || {};
|
||||
Response.Write(SWITCH_TOGGLE_HTML(pname, pclass, plabel, pvalue, params));
|
||||
Response.Write(RWSYMBOLTR_HTML(pname, plabel, pvalue, params));
|
||||
}
|
||||
|
||||
function ROSYMBOLTR_HTML(pname, plabel, pvalue, params)
|
||||
{
|
||||
var valType = 0;
|
||||
var preview_url = "../Shared/BijlagenPreview.asp?key=" + params.key + "&module=" + params.module;
|
||||
if (pvalue) {
|
||||
if (pvalue.indexOf("fa-") === 0) {
|
||||
valType = 1; // Icon
|
||||
} else {
|
||||
valType = 2; // Image
|
||||
var fileProps = flexProps(params.module, params.key, null, null, { getFiles: true });
|
||||
if (!fileProps.files.length) {
|
||||
valType = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (valType == 0 && (params.suppressEmpty && !(__Logging & 64)))
|
||||
return; // Early exit
|
||||
|
||||
var result = "<tr>"
|
||||
+ " <td class='label'>"
|
||||
+ " <label>" + safe.html(plabel) + "</label>"
|
||||
+ (valType == 2 ? "<span class='labelextra details preview' data-preview-url='" + safe.htmlattr(protectQS.create(preview_url)) + "' title='" + safe.htmlattr(L("lcl_flex_preview")) + "'>" + I("fa-image fa-lg") + "</span>"
|
||||
: "")
|
||||
+ " </td>"
|
||||
+ " <td>"
|
||||
+ (valType == 1 ? I(pvalue + " fa-lg") : "<span class='details' onclick='FcltMgr.windowopen(\"" + safe.htmlattr(safe.jsstring(fileProps.files[0].deepurl)) + "\", \"" + safe.htmlattr(plabel) + "\")'>" + safe.html(pvalue) + "</span>")
|
||||
+ " </td>"
|
||||
+ "</tr>";
|
||||
return result;
|
||||
}
|
||||
|
||||
function ROSYMBOLTR(pname, plabel, pvalue, params)
|
||||
{
|
||||
params = params || {};
|
||||
params.suppressEmpty = params.suppressEmpty || true; // Default true
|
||||
Response.Write(ROSYMBOLTR_HTML(pname, plabel, pvalue, params));
|
||||
}
|
||||
|
||||
function RWCHECKBOXTR(pname, pclass, plabel, pvalue, params)
|
||||
|
||||
Reference in New Issue
Block a user