DD component finished
authorVásáry Dániel <vasary@elgekko.net>
Thu, 29 Feb 2024 20:41:59 +0000 (21:41 +0100)
committerVásáry Dániel <vasary@elgekko.net>
Thu, 29 Feb 2024 20:41:59 +0000 (21:41 +0100)
sly-crm-ui/src/main/resources/web/form/attachment-form.zul

index 7b3900a8aee4cb2d487eff163976de868e19a8ca..df9cafc23ba02d6d67f7fb98a175eb5b48909f0b 100644 (file)
             </toolbar>
         </north>
         <west title="Fájlok" size="160px" flex="true" border="none" splittable="true" collapsible="true">
-            <listbox vflex="true" hflex="true" model="@load(vm.entityDocumentDataModel)"
-                     multiple="false"
-                     sizedByContent="true" onSelect="@command(vm.entityDocumentDataModel.onSelectionChanged())">
-                <listhead visible="false">
-                    <listheader hflex="true" align="center"/>
-                </listhead>
-                <template name="model">
-                    <listitem>
-                        <listcell iconSclass="z-icon-file-pdf-o" style="font-size: 1.5em">
-                            <vlayout>
-                                <label value="@load(each.name)"/>
-                            </vlayout>
-                        </listcell>
-                    </listitem>
-                </template>
-            </listbox>
+            <div id="attachment" hflex="true" vflex="true">
+                <dropupload native="true" detection="browser" hflex="true" vflex="true" anchor="${attachment}"
+                            style="border-style: dashed; background: white"
+                            onUpload="@command('doUploadFiles', files=event.medias)">
+                    <attribute name="content">
+                    </attribute>
+                </dropupload>
+                <listbox vflex="true" hflex="true" model="@load(vm.entityDocumentDataModel)"
+                         multiple="false"
+                         sizedByContent="true" onSelect="@command(vm.entityDocumentDataModel.onSelectionChanged())">
+                    <listhead visible="false">
+                        <listheader hflex="true" align="center"/>
+                    </listhead>
+                    <template name="model">
+                        <listitem>
+                            <listcell iconSclass="z-icon-file-pdf-o" style="font-size: 1.5em">
+                                <vlayout>
+                                    <label value="@load(each.name)"/>
+                                </vlayout>
+                            </listcell>
+                        </listitem>
+                    </template>
+                </listbox>
+            </div>
         </west>
         <center border="none" hflex="true" vflex="true">
             <iframe hflex="true" vflex="true"
                     content="@load(vm.entityDocumentDataModel.selectedDocument.file) @converter('hu.user.lis.ui.converter.ByteArrayToAMediaConverter')"/>
         </center>
-        <east>
-            <!--            <div id="attachment" hflex="true" vflex="true">-->
-            <!--            </div>-->
-            <!--                anchor="${attachment}"-->
-            <dropupload native="true" detection="none" hflex="true" vflex="true" style="background: red"
-                        onUpload="@command('doUploadFiles', files=event.medias)">
-                <attribute name="content">
-                    <![CDATA[
-                            <div style="text-align: center; border: 3px solid green;">
-                            <b>Drop here to upload!</b>
-                            </div>
-                        ]]>
-                </attribute>
-            </dropupload>
-        </east>
     </borderlayout>
 </zk>
\ No newline at end of file