FCLT#63770 Savepoint, GUI voor single file upload varianten
svn path=/Website/trunk/; revision=60299
This commit is contained in:
@@ -106,17 +106,6 @@ else
|
||||
{
|
||||
FcltMgr.closeDetail(window, { cancel: true } );
|
||||
}
|
||||
|
||||
function UploadImage()
|
||||
{
|
||||
url = "<%=protectQS.create("../shared/BijlagenForm.asp?module=ALGPHT")%>";
|
||||
FcltMgr.openModalDetail(url, L("lcl_change"),
|
||||
{ callback: function (data)
|
||||
{
|
||||
if (data.filenaam)
|
||||
$("#ter_image").val(data.filenaam); }
|
||||
} );
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
@@ -646,17 +646,6 @@ var ins_deel_aantal = 1;
|
||||
return -1;
|
||||
<% } %>
|
||||
}
|
||||
|
||||
function UploadImage()
|
||||
{
|
||||
url = "<%=protectQS.create("../shared/BijlagenForm.asp?module=INSPHD")%>";
|
||||
FcltMgr.openModalDetail(url, L("lcl_change"),
|
||||
{ callback: function (data)
|
||||
{
|
||||
if (data.filenaam)
|
||||
$("#deel_image").val(data.filenaam); }
|
||||
} );
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ $(function ()
|
||||
{ // initialisatie
|
||||
$("#disciplinetype").change( change_disciplinetype );
|
||||
$("#discipline").change( change_discipline );
|
||||
$("#_upload").addClass("stdmsymbol_button").click( Upload );
|
||||
$("#autoorder").change( onChangeAutoorder );
|
||||
$("#autoorderamount").change( onChangeAutoorderAmount );
|
||||
$("#accepttime").change( onChangeAccepttime );
|
||||
@@ -178,17 +177,4 @@ function process_stdminfo(data)
|
||||
select.empty().append(new_lov);
|
||||
if (sel_key.length)
|
||||
select.val(sel_key);
|
||||
}
|
||||
|
||||
function Upload()
|
||||
{
|
||||
parent.FcltMgr.openModalDetail( proturl_bijlage
|
||||
, L("lcl_change")
|
||||
, { callback: function (data)
|
||||
{ if (data.filenaam)
|
||||
$("#symbolname").val(data.filenaam.replace(/.dwf$/i,'')); // strip extensie
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -79,21 +79,7 @@ else // Nieuw bericht. Defaults bepalen
|
||||
<%
|
||||
FCLTHeader.Generate();
|
||||
%>
|
||||
<script type="text/javascript" >
|
||||
|
||||
var mrk_key = <%=mrk_key%>;
|
||||
function fotoUpload()
|
||||
{
|
||||
var url = "<%=protectQS.create("../shared/BijlagenForm.asp?module=MRK&key="+mrk_key)%>";
|
||||
FcltMgr.openModalDetail(url, L("lcl_mrk_upload_foto"),
|
||||
{ callback: function (data)
|
||||
{ if (data.fileName)
|
||||
$("input[name=fotoupload]").val(data.fileName.replace(/.jpg$/i, "")); // Toon bestandsnaam
|
||||
else
|
||||
$("input[name=fotoupload]").val(L("lcl_mrk_upload")); // Toon upload
|
||||
}
|
||||
} );
|
||||
}
|
||||
<script>
|
||||
|
||||
$(function()
|
||||
{
|
||||
@@ -113,8 +99,8 @@ var buttons = [{ title: L("lcl_submit"), icon: "fa-fclt-save", action:"mrk_subm
|
||||
<form id="u2" name="u2" action="mrk_edit_bericht_save.asp" method="post" onSubmit="mrk_submit();">
|
||||
<% BLOCK_START("mrkInfo", (mrk_key > 0? L("lcl_mrk_marktplaats_bericht") + " " + mrk_key : L("lcl_mrk_new_bericht")), { icon: "fa-comment-alt-lines" });
|
||||
|
||||
%>
|
||||
<input type="hidden" name="mrk_key" id="mrk_key" value="<%=mrk_key%>">
|
||||
%>
|
||||
<input type="hidden" name="mrk_key" id="mrk_key" value="<%=mrk_key%>">
|
||||
<input type="hidden" name="urole" id="urole" value="<%=urole%>">
|
||||
<%
|
||||
|
||||
@@ -171,24 +157,13 @@ var buttons = [{ title: L("lcl_submit"), icon: "fa-fclt-save", action:"mrk_subm
|
||||
BLOCK_END();
|
||||
|
||||
BLOCK_START("mrkFoto", L("lcl_image"), { icon: "fa-image" });
|
||||
var props = flexProps("MRK", mrk_key, null, null, {getFiles: true});
|
||||
var vBestandnaam = (props.files.length > 0 ? props.files[0].name : "")
|
||||
|
||||
// Foto upload
|
||||
RWFIELDTR("mrkfoto_button",
|
||||
"button",
|
||||
L("lcl_mrk_upload_foto"),
|
||||
vBestandnaam == ""? L("lcl_mrk_upload") : vBestandnaam,
|
||||
{ datatype: "button",
|
||||
html: 'onClick="fotoUpload();return false;"',
|
||||
endicon: "fa-cloud-upload"
|
||||
});
|
||||
FILEPICKERTR("mrkfoto_button", L("lcl_mrk_upload_foto"), null, { "key": mrk_key, "module": "MRK" });
|
||||
BLOCK_END();
|
||||
|
||||
IFACE.FORM_END();
|
||||
%>
|
||||
</form>
|
||||
<% SUBFRAME_END();%>
|
||||
<% SUBFRAME_END();%>
|
||||
</body>
|
||||
</html>
|
||||
<% ASPPAGE_END(); %>
|
||||
<% ASPPAGE_END(); %>
|
||||
|
||||
@@ -93,27 +93,14 @@ user.auth_required_or_abort(this_mrk.canReadAny);
|
||||
(this_mrk != -1)? mrk_bericht.omschrijving : "",
|
||||
{id: "omschrijving"});
|
||||
BLOCK_END();
|
||||
|
||||
var props = flexProps("MRK", mrk_key, null, null, {getFiles: true});
|
||||
var vBestandnaam = (props.files.length > 0 ? props.files[0].name : "")
|
||||
|
||||
if (vBestandnaam != "")
|
||||
{ // Foto Show
|
||||
BLOCK_START("mrkFoto", L("lcl_image"), {icon: "fa-image"});
|
||||
var imagePathFile = props.RelativePath + props.files[0].name;
|
||||
%><tr><td class='label'><label><%=L("lcl_mrk_foto")%></label></td>
|
||||
<td><img title='<%=safe.htmlattr(vBestandnaam)%>'
|
||||
alt='<%=safe.htmlattr(vBestandnaam)%>'
|
||||
onclick='FcltMgr.windowopen("<%=safe.jsstring(imagePathFile)%>")'
|
||||
class='photo' src='<%=safe.htmlattr(imagePathFile)%>'></td>
|
||||
</tr>
|
||||
<%
|
||||
BLOCK_END();
|
||||
}
|
||||
BLOCK_START("mrkFoto", L("lcl_image"), {icon: "fa-image"});
|
||||
FILEPICKERTR("mrkfoto_button", L("lcl_mrk_upload_foto"), null, { "key": mrk_key, "module": "MRK", "readonly": true });
|
||||
BLOCK_END();
|
||||
IFACE.FORM_END();
|
||||
%>
|
||||
</form>
|
||||
<% SUBFRAME_END(); %>
|
||||
</body>
|
||||
</html>
|
||||
<% ASPPAGE_END(); %>
|
||||
<% ASPPAGE_END(); %>
|
||||
|
||||
@@ -638,8 +638,8 @@ MODAL_BLOCK_START("bijlagen", L("lcl_appendixes"), { icon: "fa-paperclip" });
|
||||
success: true,
|
||||
cnt: <%=fileArray.length%>,
|
||||
fileName: "<%=safe.jsstring(fileArray.length > 0? fileArray[0].name : "")%>"
|
||||
<% if (fileArray.length > 0) { %>
|
||||
, deleteUrl: "<%=protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?x=x"+transitParam)%>"
|
||||
<% if (fileArray.length === 1) { %>
|
||||
, deleteUrl: "<%=protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?DoDelete=" + Server.URLEncode(fileArray[0].name) + transitParam)%>"
|
||||
<% } %>
|
||||
};
|
||||
FcltMgr.setCloseParams(window.return_data); // Zelfs als je kruisje gebruikt
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
Globals:
|
||||
Context:
|
||||
Note:
|
||||
TODO: Vergelijk autorisatie in ../MLD/UploadDisciplines.asp
|
||||
*/ %>
|
||||
|
||||
<%
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
Globals:
|
||||
Context:
|
||||
Note:
|
||||
TODO: Vergelijk autorisatie in ../MLD/UploadDisciplines.asp
|
||||
*/ %>
|
||||
|
||||
<%
|
||||
@@ -61,4 +60,4 @@ var sql = "SELECT sg." + module + "_srtgroep_key srtgroep_key"
|
||||
|
||||
WriteResult(sql, bAll, "srtgroep_omschrijving", "srtgroep_key", "ins_discipline_omschrijving", "extra");
|
||||
%>
|
||||
<% ASPPAGE_END(); %>
|
||||
<% ASPPAGE_END(); %>
|
||||
|
||||
@@ -954,13 +954,16 @@ div.mldicmenu div.iconitem {
|
||||
border: 1px solid rgba(52, 63, 77, 0.2);
|
||||
}
|
||||
|
||||
.mld-menu-col .row:hover .iconitem:not(:hover),
|
||||
.bes-menu-col .row:hover .iconitem:not(:hover),
|
||||
:is(.mld-menu-col, .bes-menu-col) .row:hover .iconitem:not(:hover),
|
||||
.res-menu-flex:hover > :not(.no-action) > :is(.iconitem:not(:hover), .res-flex-recent-card:not(:hover)),
|
||||
.res-flex-recent-card:hover > .res-flex-recent-item:not(:hover) {
|
||||
opacity: .65;
|
||||
}
|
||||
|
||||
:is(.mld-menu-col, .bes-menu-col) .row:hover .iconitem:hover :is(i, img) {
|
||||
scale: 1.025;
|
||||
}
|
||||
|
||||
div.iconimg,
|
||||
div.bes-icon-wrapper,
|
||||
div.mld-icon-wrapper,
|
||||
@@ -968,6 +971,7 @@ div.mld-icon-wrapper,
|
||||
width: 100%;
|
||||
height: 60%;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
color: var(--menuiconcolor);
|
||||
}
|
||||
.res-flex-recent-label {
|
||||
@@ -986,14 +990,12 @@ div.iconimg > img,
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
.mld-icon-wrapper img,
|
||||
.bes-icon-wrapper img,
|
||||
.mld-icon-wrapper i,
|
||||
.bes-icon-wrapper i,
|
||||
:is(.mld-icon-wrapper, .bes-icon-wrapper) :is(i, img),
|
||||
.iconimg > * {
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
transition: 150ms scale;
|
||||
}
|
||||
|
||||
.res-iconlabel,
|
||||
|
||||
@@ -1076,9 +1076,15 @@ function ICONPICKERTR_HTML(pname, plabel, pvalue, params) {
|
||||
}
|
||||
|
||||
function FILEPICKERTR_HTML(pname, plabel, pvalue, params) {
|
||||
if (params.readonly || pvalue === null) {
|
||||
var fileProps = flexProps(params.module, params.key, null, null, { getFiles: true });
|
||||
if (pvalue === null && fileProps.files.length > 0) { // Geen waarde, wel files gevonden; 1 map per 'key' -> pak de eerste (Todo; multi variant)
|
||||
pvalue = fileProps.files[0].name;
|
||||
params.addDeleteUrl = "&DoDelete=" + Server.URLEncode(pvalue);
|
||||
}
|
||||
}
|
||||
if (params.readonly) {
|
||||
var preview_url = "../Shared/BijlagenPreview.asp?key=" + params.key + "&module=" + params.module;
|
||||
var fileProps = flexProps(params.module, params.key, null, null, { getFiles: true });
|
||||
if (fileProps.files.length == 0 && (params.suppressEmpty && !(__Logging & 64)))
|
||||
return; // Early exit
|
||||
|
||||
@@ -1091,7 +1097,7 @@ function FILEPICKERTR_HTML(pname, plabel, pvalue, params) {
|
||||
+ " </td>"
|
||||
+ " <td>"
|
||||
+ (fileProps.files.length
|
||||
? "<span class='details' onclick='FcltMgr.windowopen(\"" + safe.htmlattr(safe.jsstring(fileProps.files[0].deepurl)) + "\", \"" + safe.htmlattr(plabel) + "\")'>" + safe.html(pvalue) + "</span>"
|
||||
? "<span class='details' onclick='FcltMgr.windowopen(\"" + safe.htmlattr(safe.jsstring(fileProps.files[0].deepurl)) + "\", \"" + safe.htmlattr(plabel) + "\")'>" + safe.html(pvalue || fileProps.files[0].name) + "</span>"
|
||||
: "")
|
||||
+ " </td>"
|
||||
+ "</tr>";
|
||||
@@ -1104,7 +1110,7 @@ function FILEPICKERTR_HTML(pname, plabel, pvalue, params) {
|
||||
+ " <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)) + "'"
|
||||
+ " data-delete-url='" + safe.htmlattr(protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?key=" + (params.key || -1) + "&module=" + params.module + (params.addDeleteUrl || ""))) + "'"
|
||||
+ ">"
|
||||
+ I("fa-trash-alt")
|
||||
+ " </span>"
|
||||
|
||||
Reference in New Issue
Block a user