%3 ::xowiki::MenuItem ::xowiki::MenuItem init render ::xowiki::MenuComponent ::xowiki::MenuComponent ::xowiki::MenuItem->::xowiki::MenuComponent ::xowiki::Menu ::xowiki::Menu render ::xowiki::Menu->::xowiki::MenuComponent ::xowiki::BootstrapNavbarDropzone ::xowiki::BootstrapNavbarDropzone render ::xowiki::BootstrapNavbarDropzone->::xowiki::MenuComponent ::xo::tdom::Object ::xo::tdom::Object ::xowiki::MenuComponent->::xo::tdom::Object ::xo::tdom::AttributeManager ::xo::tdom::AttributeManager ::xo::tdom::Object->::xo::tdom::AttributeManager ::xo::OrderedComposite ::xo::OrderedComposite ::xo::tdom::Object->::xo::OrderedComposite

Class ::xowiki::BootstrapNavbarDropzone

::xowiki::BootstrapNavbarDropzone[i] create ... \
           [ -disposition (default "File") ] \
           [ -file_name_prefix (default "") ] \
           [ -href (default "#") ] \
           [ -label (default "DropZone") ] \
           [ -text (default "") ]

Dropzone widget for drag and drop of files, e.g. in the menubar. The widget provides added support for updating the current page with feedback of the dropped files.
Documented Parameters:
href
URL for POST request
label
Text to be displayed at the place where files are dropped to
file_name_prefix
prefix for files being uploaded (used e.g. by the online exam).
disposition
define, what happens after the file was uploaded, e.g. whether the content has to be transformed, stored and displayed later.
Defined in /var/www/openacs.org/packages/xowiki/tcl/bootstrap-procs.tcl

Class Relations

  • class: ::xo::tdom::Class[i]
  • superclass: ::xowiki::MenuComponent[i]
::xo::tdom::Class create ::xowiki::BootstrapNavbarDropzone \
     -superclass ::xowiki::MenuComponent

Methods (to be applied on instances)

  • render (scripted, public)

     <instance of xowiki::BootstrapNavbarDropzone[i]> render

    doku

    Testcases:
    create_folder_with_page, create_workflow_with_instance
    if {${:href} ni {"" "#"}} {
      html::li {
        html::form -method "post" -enctype "multipart/form-data"  -style "display: none;"  -id "js-upload-form" {
              html::div -class "form-inline" {
                html::div -class "form-group" {
                  html::input  -type "file"  -name {files[]}  -id "js-upload-files"  -data-file_name_prefix ${:file_name_prefix}  -data-url ${:href}  -data-disposition ${:disposition}  -multiple multiple
                }
                html::button -type "submit" -class "btn btn-sm btn-primary" -id "js-upload-submit" {
                  html::t ${:text}
                }
                ::html::CSRFToken
              }
            }
        html::div -class "upload-drop-zone" -id "drop-zone" {
          html::span {html::t ${:label}}
          html::div -class "progress" {
            html::div -style "width: 0%;" -class "progress-bar" -id dropzone-progress-bar {
              html::span -class "sr-only" {html::t ""}
            }
          }
        }
      }
      :js
    }