diff --git a/Documentation-develop/diagram/Chat.drawio b/Documentation-develop/diagram/Chat.drawio new file mode 100644 index 0000000000000000000000000000000000000000..f8eaf6df270ae896de4d33e0352937a52f057922 --- /dev/null +++ b/Documentation-develop/diagram/Chat.drawio @@ -0,0 +1,202 @@ +<mxfile host="Electron" modified="2024-01-03T19:27:06.434Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.0.3 Chrome/114.0.5735.289 Electron/25.8.4 Safari/537.36" etag="wh0tHHfw4X95EODRYkmv" version="22.0.3" type="device"> + <diagram name="Page-1" id="G4riudcGwKSBY6AT9g6t"> + <mxGraphModel dx="3459" dy="2969" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> + <root> + <mxCell id="0" /> + <mxCell id="1" parent="0" /> + <mxCell id="69TjubzfDTc9KxY89VLu-1" value="<b>Chat - c</b>" style="swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e1d5e7;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=0;marginBottom=0;swimlaneFillColor=#ffffff;align=center;rounded=0;shadow=0;comic=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Courier New;fontSize=14;strokeColor=#9673a6;autosize=0;container=0;resizeHeight=0;swimlaneLine=1;" vertex="1" parent="1"> + <mxGeometry x="-1770" y="-1220" width="320" height="286" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-2" value="id: <b>1</b>" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="26" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-3" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-2"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-4" value="cIdTopic: &lt;int&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="52" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-5" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-4"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-6" value="xId: &lt;int&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="78" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-7" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-6"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-49" value="cIdThread: &lt;int&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="104" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-50" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-49"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-8" value="type: message|<b>topic</b>" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="130" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-9" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-8"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-10" value="message: &lt;text&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="156" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-11" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-10"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-19" value="reference:<b> RueckfrageAntragsteller</b>" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="182" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-20" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-19"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-53" value="done: &lt;enum('yes','<b>no</b>')" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="208" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-54" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-53"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-57" value="username: &lt;varchar&gt;<br>" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="234" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-58" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-57"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-59" value="pIdCreator: &lt;person.id&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-1"> + <mxGeometry y="260" width="320" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-60" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-59"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-21" value="<b>Chat - c</b>" style="swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e1d5e7;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=0;marginBottom=0;swimlaneFillColor=#ffffff;align=center;rounded=0;shadow=0;comic=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Courier New;fontSize=14;strokeColor=#9673a6;autosize=0;container=0;resizeHeight=0;swimlaneLine=1;" vertex="1" parent="1"> + <mxGeometry x="-1340" y="-1150" width="280" height="286" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-22" value="id: <b>2</b>" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="26" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-23" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-22"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-24" value="cIdTopic: &lt;int&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="52" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-25" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-24"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-26" value="xId: &lt;int&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="78" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-27" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-26"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-51" value="cIdThread: &lt;int&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="104" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-52" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-51"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-28" value="type: <b>message</b>|topic" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="130" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-29" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-28"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-30" value="message: <b>&lt;text&gt;</b>" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="156" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-31" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-30"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-32" value="reference:&nbsp;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="182" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-33" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-32"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-55" value="done: &lt;enum('yes','<b style="border-color: var(--border-color);">no</b>')" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="208" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-56" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-55"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-61" value="username: &lt;varchar&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="234" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-62" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-61"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-63" value="pIdCreator: &lt;person.id&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-21"> + <mxGeometry y="260" width="280" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-64" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-63"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-34" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="69TjubzfDTc9KxY89VLu-24" target="69TjubzfDTc9KxY89VLu-2"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-65" value="<b>Chat - c</b>" style="swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e1d5e7;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=0;marginBottom=0;swimlaneFillColor=#ffffff;align=center;rounded=0;shadow=0;comic=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Courier New;fontSize=14;strokeColor=#9673a6;autosize=0;container=0;resizeHeight=0;swimlaneLine=1;" vertex="1" parent="1"> + <mxGeometry x="-1590" y="-810" width="490" height="338" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-66" value="id: <b>2</b>" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="26" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-67" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-66"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-68" value="cIdTopic: &lt;int&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="52" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-69" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-68"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-70" value="xId: &lt;int&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="78" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-71" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-70"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-72" value="cIdThread: &lt;int&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="104" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-73" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-72"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-74" value="type: <b>message</b>|topic|done|reminder" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="130" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-75" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-74"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-76" value="message: <b>&lt;text&gt;</b>" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="156" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-77" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-76"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-78" value="reference:&nbsp;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="182" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-79" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-78"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-80" value="done: &lt;enum('yes','<b style="border-color: var(--border-color);">no</b>')" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="208" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-81" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-80"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-82" value="username: &lt;varchar&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="234" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-83" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-82"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-84" value="pIdCreator: &lt;person.id&gt;" style="shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontFamily=Courier New;" vertex="1" parent="69TjubzfDTc9KxY89VLu-65"> + <mxGeometry y="260" width="490" height="26" as="geometry" /> + </mxCell> + <mxCell id="69TjubzfDTc9KxY89VLu-85" value="<font face="Courier New">o</font>" style="shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;right=1;strokeColor=#CCCCCC;fontStyle=0;labelBackgroundColor=none;labelBorderColor=none;shadow=0;" vertex="1" connectable="0" parent="69TjubzfDTc9KxY89VLu-84"> + <mxGeometry width="30" height="26" as="geometry" /> + </mxCell> + </root> + </mxGraphModel> + </diagram> +</mxfile> diff --git a/extension/Classes/Core/AbstractBuildForm.php b/extension/Classes/Core/AbstractBuildForm.php index ed76fb314b0176e9bd00cdeed73a4a5b80c8e906..1e17d5a0b816fce5d0a80c90ba408e04da580a7d 100644 --- a/extension/Classes/Core/AbstractBuildForm.php +++ b/extension/Classes/Core/AbstractBuildForm.php @@ -3122,6 +3122,7 @@ abstract class AbstractBuildForm { */ public function createUploadElement(array $formElement, string $value, string $sipUpload, string $sipDownloadKey, string $disabled): string { $defaultText = 'Drag & Drop or <span class="btn btn-default filepond--label-action"> '. $formElement[FE_FILE_BUTTON_TEXT] . ' </span>'; + $projectPath = Path::absoluteApp(); // Check for upload type new or old and initialize json config for new upload type $jsonConfig = array(); @@ -3162,10 +3163,10 @@ abstract class AbstractBuildForm { $sipFileDestination = $storeExtra[FE_FILE_DESTINATION] ?? ''; if ($value !== '' || $sipFileDestination !== '') { $path = empty($value) ? $sipFileDestination : $value; - $pathToCheck = $_SERVER["DOCUMENT_ROOT"] . '/' . $path; + $pathToCheck = $projectPath . '/' . $path; if (file_exists($pathToCheck)) { // Currently no information except path is stored for upload over form. - $preloadedFiles = '[{"id":"1","pathFileName":"'. $_SERVER["DOCUMENT_ROOT"] . '/' . $path . '","size":"null","type":"null"}]'; + $preloadedFiles = '[{"id":"1","pathFileName":"'. $projectPath . '/' . $path . '","size":"null","type":"null"}]'; $link = new Link($this->sip, $this->dbIndexData); $sipDownload = $link->renderLink('', 's|M:file|d|r:8|F:' . $path); $this->store->setVar($sipDownloadKey, array(),STORE_EXTRA); diff --git a/extension/Classes/Core/Constants.php b/extension/Classes/Core/Constants.php index e7320652b8d2dd6a266a18684967a470f33eb074..cfa11c60d2552c0b3e3c5b3d4e751a3e9807100b 100644 --- a/extension/Classes/Core/Constants.php +++ b/extension/Classes/Core/Constants.php @@ -955,6 +955,7 @@ const API_SUBMIT_REASON_SAVE_FORCE = 'save,force'; const API_LOCK_ACTION_LOCK = 'lock'; const API_LOCK_ACTION_EXTEND = 'extend'; const API_LOCK_ACTION_RELEASE = 'release'; +const API_LOCK_ACTION_CHECK = 'check'; const API_ANSWER_STATUS_SUCCESS = 'success'; const API_ANSWER_STATUS_CONFLICT = 'conflict'; diff --git a/extension/Classes/Core/Form/Dirty.php b/extension/Classes/Core/Form/Dirty.php index 6c4c42dc6f0eaeac9720e34da74dda66873ea60e..59143fd78a158f8fef400742d1c92a8f375460f2 100644 --- a/extension/Classes/Core/Form/Dirty.php +++ b/extension/Classes/Core/Form/Dirty.php @@ -117,7 +117,7 @@ class Dirty { $recordId = empty($sipVars[SIP_RECORD_ID]) ? 0 : $sipVars[SIP_RECORD_ID]; if ($recordId == 0) { // For r=0 (new) , 'dirty' will always succeed. - return [API_STATUS => 'success', API_MESSAGE => '']; + return [API_STATUS => API_ANSWER_STATUS_SUCCESS, API_MESSAGE => '']; } $this->dbIndexQfq = $this->store->getVar(SYSTEM_DB_INDEX_QFQ, STORE_SYSTEM); @@ -138,6 +138,12 @@ class Dirty { case API_LOCK_ACTION_RELEASE: $answer = $this->checkDirtyAndRelease(FORM_SAVE, $tableVars[F_RECORD_LOCK_TIMEOUT_SECONDS], $tableVars[F_DIRTY_MODE], $tableVars[F_TABLE_NAME], $tableVars[F_PRIMARY_KEY], $recordId); break; + case API_LOCK_ACTION_CHECK: + $rcRecordDirty = array(); + $rcMsg = ''; + $rc = $this->getCheckDirty($tableVars[F_TABLE_NAME], $recordId, $rcRecordDirty, $rcMsg); + $answer = ($rc === LOCK_FOUND_CONFLICT) ? [API_STATUS => API_ANSWER_STATUS_CONFLICT, API_MESSAGE => $rcMsg] : [API_STATUS => API_ANSWER_STATUS_SUCCESS, API_MESSAGE => '']; + break; default; throw new \CodeException("Unknown action: " . $this->client[API_LOCK_ACTION], ERROR_DIRTY_UNKNOWN_ACTION); } @@ -178,7 +184,7 @@ class Dirty { if (count($recordDirty) == 0) { if ($formDirtyMode == DIRTY_MODE_NONE) { - $answer = [API_STATUS => 'success', API_MESSAGE => '']; + $answer = [API_STATUS => API_ANSWER_STATUS_SUCCESS, API_MESSAGE => '']; } else { // No dirty record found: create lock $answer = $this->writeDirty($this->client[SIP_SIP], $recordId, $tableVars, $feUser, $rcMd5, $tabUniqId); @@ -186,7 +192,7 @@ class Dirty { } else { if ($tabUniqId == $recordDirty[TAB_UNIQ_ID]) { // In case it's the same tab (page reload): OK - $answer = [API_STATUS => 'success', API_MESSAGE => '']; + $answer = [API_STATUS => API_ANSWER_STATUS_SUCCESS, API_MESSAGE => '']; } else { // Here is probably a conflict. $answer = $this->conflict($recordDirty, $formDirtyMode, $primaryKey); @@ -419,7 +425,7 @@ class Dirty { // Check if the record has changed in the meantime. if ($flagCheckModifiedFirst && $this->isRecordModified($tableName, $primaryKey, $recordId, $this->client[DIRTY_RECORD_HASH_MD5], $dummy)) { - throw new \UserFormException ('The record has been modified in the meantime. Please reload the form, edit and save again. [3]', ERROR_DIRTY_RECORD_MODIFIED); + throw new \InfoException('The record has been modified in the meantime. Please reload the form, edit and save again. [3]', ERROR_DIRTY_RECORD_MODIFIED); } $lockStatus = $this->getCheckDirty($tableName, $recordId, $rcRecordDirty, $rcMsg); diff --git a/extension/Classes/Core/QuickFormQuery.php b/extension/Classes/Core/QuickFormQuery.php index faa84b184846623f21813a4b6304aeb335cd7e72..ac537cb9065593f066fb9048263255a76a2c01f4 100644 --- a/extension/Classes/Core/QuickFormQuery.php +++ b/extension/Classes/Core/QuickFormQuery.php @@ -559,7 +559,7 @@ class QuickFormQuery { $this->formSpec[F_NAME] = ''; $this->formSpec[F_TABLE_NAME] = $table; $this->formSpec[F_RECORD_LOCK_TIMEOUT_SECONDS] = 1; // just indicate a timeout, the exact timeout is stored in the dirty record. - $this->formSpec[F_DIRTY_MODE] = DIRTY_MODE_EXCLUSIVE; // just set a mode,, the exact mode is stored in the dirty record. + $this->formSpec[F_DIRTY_MODE] = DIRTY_MODE_EXCLUSIVE; // just set a mode, the exact mode is stored in the dirty record. $this->formSpec[F_PRIMARY_KEY] = F_PRIMARY_KEY_DEFAULT; $tmpDbIndexData = $this->store->getVar(PARAM_DB_INDEX_DATA, STORE_SIP); diff --git a/javascript/src/Dirty.js b/javascript/src/Dirty.js index 333332e11516c3a379982fbf3b04605529df55af..1246223810ffc1065931250cb84af81e5e890c6a 100644 --- a/javascript/src/Dirty.js +++ b/javascript/src/Dirty.js @@ -43,16 +43,23 @@ var QfqNS = QfqNS || {}; RENEWAL_ENDED: 'dirty.renewal.ended', RENEWAL_SUCCESS: 'dirty.renewal.success', RENEWAL_DENIED: 'dirty.renewal.denied', - RENEWAL_FAILED: 'dirty.renewal.failed' + RENEWAL_FAILED: 'dirty.renewal.failed', + + CHECK_STARTED: 'dirty.check.started', + CHECK_SUCCESS: 'dirty.check.success', + CHECK_FAILED: 'dirty.check.failed', + CHECK_ENDED: 'dirty.check.ended', }; n.Dirty.ENDPOINT_OPERATIONS = { - /** Aquire Lock */ + /** Acquire Lock */ LOCK: "lock", /** Release Lock */ RELEASE: "release", /** Renew Lock */ - RENEW: "extend" + RENEW: "extend", + /** Check Lock */ + CHECK: "check" }; n.Dirty.MINIMUM_TIMER_DELAY_IN_SECONDS = 5; @@ -330,4 +337,65 @@ var QfqNS = QfqNS || {}; queryString = $.param(mergedQueryParameterObject); return this.dirtyUrl + "?" + queryString; }; + + /** + * Check with the server if record is already locked. + * + * @param sip {string} sip. + * @public + */ + n.Dirty.prototype.check = function (sip, optionalQueryParameters) { + var eventData; + + if (!this.dirtyUrl) { + n.Log.debug("notify: cannot contact server, no dirtyUrl."); + return; + } + eventData = n.EventEmitter.makePayload(this, null); + this.eventEmitter.emitEvent(n.Dirty.EVENTS.CHECK_STARTED, eventData); + $.ajax({ + url: this.makeUrl(sip, n.Dirty.ENDPOINT_OPERATIONS.CHECK, optionalQueryParameters), + type: 'GET', + cache: false + }) + .done(this.ajaxCheckSuccessHandler.bind(this)) + .fail(this.ajaxCheckErrorHandler.bind(this)); + }; + + /** + * @private + * @param data + * @param textStatus + * @param jqXHR + */ + n.Dirty.prototype.ajaxCheckSuccessHandler = function (data, textStatus, jqXHR) { + var eventData = n.EventEmitter.makePayload(this, data); + if (data.status && data.status === "success") { + this.eventEmitter.emitEvent(n.Dirty.EVENTS.CHECK_SUCCESS, eventData); + } else { + this.eventEmitter.emitEvent(n.Dirty.EVENTS.CHECK_FAILED, eventData); + } + + this.setTimeoutIfRequired(data, eventData); + this.eventEmitter.emitEvent(n.Dirty.EVENTS.CHECK_ENDED, eventData); + }; + + /** + * @private + * @param jqXHR + * @param textStatus + * @param errorThrown + */ + n.Dirty.prototype.ajaxCheckErrorHandler = function (jqXHR, textStatus, errorThrown) { + var eventData = n.EventEmitter.makePayload(this, null, { + textStatus: textStatus, + errorThrown: errorThrown, + jqXHR: jqXHR + }); + + this.lockTimeoutInMilliseconds = n.Dirty.NO_LOCK_TIMEOUT; + + this.eventEmitter.emitEvent(n.Dirty.EVENTS.CHECK_FAILED, eventData); + this.eventEmitter.emitEvent(n.Dirty.EVENTS.CHECK_ENDED, eventData); + }; })(QfqNS); diff --git a/javascript/src/Helper/codemirror.js b/javascript/src/Helper/codemirror.js index aad30e4e008a4984dc75a86f3f12a50ebfff3620..f6e74e7564ae936a2cac6196fa0502ced5486911 100644 --- a/javascript/src/Helper/codemirror.js +++ b/javascript/src/Helper/codemirror.js @@ -129,7 +129,7 @@ $(document).ready(function () { function showHtmlEditor(formContent, baseUrl) { $(formContent[0]).removeAttr("class"); $(formContent[0]).addClass("externWindow"); - var cssPath = baseUrl + "typo3conf/ext/qfq/Resources/Public/Css/codemirror/monokai.css"; + var cssPath = baseUrl + "typo3conf/ext/qfq/Resources/Public/Css/theme/monokai.css"; var darkTheme = '<link rel="stylesheet" href="' + cssPath + '">'; var idNameForWindow = $(formContent[0]).attr('id'); htmlContent = '<!DOCTYPE html>' + $("head").html() + darkTheme + $(formContent)[0].outerHTML; diff --git a/javascript/src/Helper/filePond.js b/javascript/src/Helper/filePond.js index 5fbc52b5dc315d19c15248e02641812a418fa2da..2d4122949222d59ca2b06dbb12c1ad2442924c14 100644 --- a/javascript/src/Helper/filePond.js +++ b/javascript/src/Helper/filePond.js @@ -6,7 +6,15 @@ var QfqNS = QfqNS || {}; +/** + * Qfq Helper Namespace + * + * @namespace QfqNS.Helper + */ +QfqNS.Helper = QfqNS.Helper || {}; + (function (n) { + 'use strict'; n.filePond = function createFileUpload(inputElement) { // Retrieve all needed data and configurations @@ -413,7 +421,74 @@ var QfqNS = QfqNS || {}; this.configuration.activeTypeValidation = this.configuration.accept !== null; this.configuration.activeSizeValidation = this.configuration.maxFileSize !== null; + + this.configuration.accept = this.convertMixedTypesToMimeTypes(this.configuration.accept); }; -})(QfqNS); + // Converting list of extensions to mime type + n.filePond.prototype.convertMixedTypesToMimeTypes = function (inputString) { + if (inputString === null) { + return null; + } + const mimeTypesMap = { + '.pdf': 'application/pdf', + '.jpg': 'image/jpeg', + '.jpeg': 'image/jpeg', + '.png': 'image/png', + '.gif': 'image/gif', + '.txt': 'text/plain', + '.doc': 'application/msword', + '.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + '.xls': 'application/vnd.ms-excel', + '.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + '.mp3': 'audio/mpeg', + '.wav': 'audio/wav', + '.ogg': 'audio/ogg', + '.mp4': 'video/mp4', + '.avi': 'video/x-msvideo', + '.mov': 'video/quicktime', + '.wmv': 'video/x-ms-wmv', + }; + + return inputString.split(',').map(item => { + const trimmedItem = item.trim().toLowerCase(); + + // Check if the item is already a MIME type + if (trimmedItem.includes('/')) { + return trimmedItem; + } + + // Convert extension to MIME type if available in the mapping + return mimeTypesMap[trimmedItem] || trimmedItem; + }).join(','); + } + + n.initializeFilePondInContainer = function (container, form) { + const inputElements = container.querySelectorAll('input[type="file"].fileupload'); + const visibleInputElements = Array.from(inputElements).filter(input => input.offsetParent !== null); + + visibleInputElements.forEach(inputElement => { + inputElements.forEach((inputElement, index) => { + let fileObject = new n.filePond(inputElement); + fileObject.createFilePondObject(); + + // Call the form change after file remove + if (form !== '') { + fileObject.pond.on('removefile', function(file) { + const element = fileObject.pond.element; + form.inputAndPasteHandlerCalled = true; + form.markChanged(element); + }); + + fileObject.pond.on('processfile', function(file) { + const element = fileObject.pond.element; + form.inputAndPasteHandlerCalled = true; + form.markChanged(element); + }); + } + }); + }); + } + +})(QfqNS.Helper); diff --git a/javascript/src/Main.js b/javascript/src/Main.js index 675ff717a770027abbd063e8c8542c88bac899e7..b4892b37b77135fb6ab2a43c260bd5c10a32391a 100644 --- a/javascript/src/Main.js +++ b/javascript/src/Main.js @@ -245,26 +245,19 @@ $(document).ready( function () { n.initializeIgnoreHistoryBtn(); n.Helper.calendar(); - FilePond.registerPlugin(FilePondPluginFileValidateSize); - FilePond.registerPlugin(FilePondPluginFileValidateType); - - // Get a reference to the file input element - const inputElements = document.querySelectorAll('input[type="file"].fileupload'); - - // Iterate over the NodeList and create a FilePond instance for each element - inputElements.forEach((inputElement, index) => { - let fileObject = new n.filePond(inputElement); - fileObject.createFilePondObject(); - - // Call the form change after file remove - if (n.form !== '') { - fileObject.pond.on('removefile', function(file) { - const element = fileObject.pond.element; - n.form.inputAndPasteHandlerCalled = true; - n.form.markChanged(element); - }); - } - }); + if (typeof FilePond !== 'undefined') { + FilePond.registerPlugin(FilePondPluginFileValidateSize); + FilePond.registerPlugin(FilePondPluginFileValidateType); + } + + // Get currently shown upload elements to initialize them + const activeTabContent = document.querySelector('.tab-pane.active'); + if (activeTabContent) { + n.Helper.initializeFilePondInContainer(activeTabContent, n.form); + } else { + // In case of forms without tabs or reports + n.Helper.initializeFilePondInContainer(document, n.form); + } })(QfqNS); }); diff --git a/javascript/src/QfqForm.js b/javascript/src/QfqForm.js index e292a30b5a4819d9700216d32e6bb5cb0992d3a9..bf3f32b6bd31468b78a27149bde60ee2cc86904d 100644 --- a/javascript/src/QfqForm.js +++ b/javascript/src/QfqForm.js @@ -22,7 +22,7 @@ var QfqNS = QfqNS || {}; /** * Represents a QFQ Form. * - * QfqForm will autonomously fire an lock `extend` request when the lock expired, but the last change `t_c` has + * QfqForm will autonomously fire a lock `extend` request when the lock expired, but the last change `t_c` has * been made during the lock period `t_l`. I.e. let `t_{current}` be the current time, an `extend` request is made * when * @@ -95,7 +95,8 @@ var QfqNS = QfqNS || {}; this.dirty.on(n.Dirty.EVENTS.SUCCESS_TIMEOUT, this.dirtyTimeout.bind(this)); this.dirty.on(n.Dirty.EVENTS.RENEWAL_DENIED, this.dirtyRenewalDenied.bind(this)); this.dirty.on(n.Dirty.EVENTS.RENEWAL_SUCCESS, this.dirtyRenewalSuccess.bind(this)); - + this.dirty.on(n.Dirty.EVENTS.CHECK_SUCCESS, this.dirtyCheckSuccess.bind(this)); + this.dirty.on(n.Dirty.EVENTS.CHECK_FAILED, this.dirtyCheckFailed.bind(this)); this.form.on('form.changed', this.changeHandler.bind(this)); this.form.on('form.reset', this.resetHandler.bind(this)); @@ -171,6 +172,8 @@ var QfqNS = QfqNS || {}; checkboxes[i].checked = $(this).is(':checked'); } }); + + this.dirty.check(this.getSip(), this.getRecordHashMd5AsQueryParameter()); }; n.QfqForm.prototype.on = n.EventEmitter.onMixin; @@ -180,6 +183,24 @@ var QfqNS = QfqNS || {}; // Intentionally empty. May be used later on. }; + n.QfqForm.prototype.dirtyCheckSuccess = function (obj) { + // Intentionally empty. May be used later on. + }; + + n.QfqForm.prototype.dirtyCheckFailed = function (obj) { + var message = new n.Alert({ + message: obj.data.message, + type: "error", + timeout: n.Alert.constants.NO_TIMEOUT, + modal: true, + buttons: [{ + label: "Close", + eventName: 'close' + }] + }); + message.show(); + }; + n.QfqForm.prototype.dirtyRenewalSuccess = function (obj) { this.lockAcquired = true; }; @@ -621,12 +642,12 @@ var QfqNS = QfqNS || {}; this.lastButtonPress = "close"; if (this.form.getFormChanged()) { var alert = new n.Alert({ - message: "You have unsaved changes. Do you want to save first?", + message: "Unsaved Changes.", type: "warning", modal: true, buttons: [ - {label: "Yes", eventName: "yes"}, - {label: "No", eventName: "no", focus: true}, + {label: "Save", eventName: "yes"}, + {label: "Discard", eventName: "no", focus: true}, {label: "Cancel", eventName: "cancel"} ] }); @@ -728,12 +749,12 @@ var QfqNS = QfqNS || {}; this.lastButtonPress = "new"; if (this.form.getFormChanged()) { var alert = new n.Alert({ - message: "You have unsaved changes. Do you want to save first?", + message: "Unsaved Changes.", type: "warning", modal: true, buttons: [ - {label: "Yes", eventName: "yes", focus: true}, - {label: "No", eventName: "no"}, + {label: "Save", eventName: "yes", focus: true}, + {label: "Discard", eventName: "no"}, {label: "Cancel", eventName: "cancel"} ] }); diff --git a/javascript/src/QfqPage.js b/javascript/src/QfqPage.js index 0b9dae588e107cbf2610f6c93218f937bb087e0d..270384279dd9f80d07e879ec6ff189e4615ed205 100644 --- a/javascript/src/QfqPage.js +++ b/javascript/src/QfqPage.js @@ -89,6 +89,16 @@ var QfqNS = QfqNS || {}; } this.bsTabs.on('bootstrap.tab.shown', this.tabShowHandler.bind(this)); + this.bsTabs.on('bootstrap.tab.shown', function(e){ + // Initialize FilePond in the newly active tab content + setTimeout(() => { + // Get the ID of the tab content + const tabContentId = e.target.currentTab; + const tabContent = document.querySelector(`#${tabContentId}`); + n.Helper.initializeFilePondInContainer(tabContent, n.form); + }, 100); + }); + this.settings.pageState.on('pagestate.state.popped', this.popStateHandler.bind(this)); } catch (e) { n.Log.message(e.message); diff --git a/less/qfq-bs.css.less b/less/qfq-bs.css.less index f33c79badb831bf2308272ba241c42a5990c114d..8fa8a6ef510672afa588cbf8c4009d976f65a9eb 100644 --- a/less/qfq-bs.css.less +++ b/less/qfq-bs.css.less @@ -1422,7 +1422,7 @@ thead.qfq-sticky td { top: 33px; } -.dropdown-menu { +.dropdown-menu:not(.bootstrap-datetimepicker-widget) { z-index: 991; min-width: max-content; }