Categories

.presentationUiUploader()

Categories: UI

.presentationUiUploader( [ options ] )

Subclass: de_epages

Inherit: (Subclass: de_epages) .widget()

Plugin: de_epages.presentation.ui.uploader

Description: Create an uploader.

  • .presentationUiUploader( [ options ] )

    version added: 6.12.0

    options   A map of additional options pass to the method.

The .presentationUiUploader() method make an element editable on click the element.

Only applicable to <input type="file"> nodes.

  • Loads the Uploader to an input field to upload images.l,

    Code:
    
    <input type="file" name="NewFile" class="ep-js" data-js="de_epages.presentationUiUploader({
      multiple:false,
      accept:'image/*',
      big:true,
      data:{
        ChangeAction:'SaveImage',
        ObjectID:#ObjectID,
        SCALE_WIDTH_l:#Shop.ProductImageLargeWidth,
        SCALE_HEIGHT_l:#Shop.ProductImageLargeHeight,
        SCALE_WIDTH_m:200,
        SCALE_WIDTH_s:100,
        SCALE_HEIGHT_s:100,
        SCALE_WIDTH_h:150,
        SCALE_HEIGHT_h:150,
        SCALE_WIDTH_xs:50,
        SCALE_HEIGHT_xs:33,
        SCALE_NAME_m:'ImageMedium',
        SCALE_NAME_s:'ImageSmall',
        SCALE_NAME_h:'ImageHotDeal'
      },
      callback:'?ViewAction='+ep.config.viewAction+'&ObjectID='+ep.config.objectId+'&DialogArea=ViewArea'
    })"/>
    
    
  • accept

    version added: 6.12.0

    A string of MIME types and/or MIME type groups.

    Default: */*

  • url

    version added: 6.12.0

    A string containing the URL to which the request is sent.

    Default: ?

  • buttonText

    version added: 6.15.0

    A string for the upload button

    Default: \'\'

  • data

    version added: 6.12.0

    A map of additional data to send with the request.

    Default: {ViewAction:\'JSONViewResponse\'}

  • callback

    version added: 6.12.0

    A url to open or method to call when upload process is finished. The callback method receives data and statusText as arguments.

  • multiple

    version added: 6.12.0

    A boolean indication whether to allow muplitple files to upload.

    Default: false

  • big

    version added: 6.12.0

    A boolean boolean short handle set style big.

    Default: false

  • style

    version added: 6.12.0

    One of the available styles: normal,big,icon.

    Default: \'normal\'

  • exists

    version added: 6.12.0

    An array including already existing files.

    Default: []

  • destroy

    • .presentationUiUploader('destroy')

      version added: 6.12.0

    This method removes the container on which the Uploader has been appended to.