Categories

.shopmailtypeUiEditmailaddress()

Categories: UI

de_epages.shopmailtypeUiEditmailaddress(options)

Subclass: de_epages

Inherit: (Subclass: de_epages) .widget()

Plugin: de_epages.shopmailtype.ui.editmailaddress

Description: Attach simpledialog with a form with some email inputs as its content to the selected set of elements.

  • de_epages.shopmailtypeUiEditmailaddress(options)

    version added: 6.15.0

    options   A map of additional options pass to the method.

The de_epages.shopmailtypeUiEditmailaddress() attaches simpledialog with a form with some email inputs as its content to the selected set of elements.

  • Attach shopmailtypeUiEditmailaddress to edit button passing along some options in data attribute.

    HTML:
    <input class="ep-width-70p Disabled-Edit" type="text" value="&quot;TTester&quot; &lt;ttester@epages.com&gt;" name="FROM" readonly="readonly">
    <span class="CommandLinkSmall" id="ep-edit-FROM" data-de_epages-shopmailtype-ui-editmailaddress="{&quot;name&quot; : &quot;FROM&quot;, &quot;data&quot;:{&quot;FROM&quot;:[{&quot;email&quot;:&quot;ttester@epages.com&quot;,&quot;name&quot;:&quot;TTester&quot;}]},&quot;multiple&quot;:false,&quot;showSetDefault&quot;:true,&quot;wording&quot;:{&quot;setDefault&quot;:&quot;Use This Address As Default Sender&quot;,&quot;email&quot;:&quot;E-mail address&quot;,&quot;name&quot; : &quot;Name&quot;, &quot;deleteMail&quot; : &quot;Delete&quot;, &quot;addMail&quot; : &quot;Add Email Address&quot;,&quot;apply&quot;:&quot;Apply&quot;}}"><span><span class="WithIcon Edit">Edit</span></span></span>
    
    Code:
    de_epages('#ep-edit-FROM').shopmailtypeUiEditmailaddress();
    
    
  • multiple

    version added: 6.15.0

    Allow multiple e-mail addresses to be entered.

    Default: true

  • name

    version added: 6.15.0

    Name of the associated input. $('input[name="' + name + '"]')

    Default: "dummy"

  • showSetDefault

    version added: 6.15.0

    If true, there is a checkbox inside the dialog. When the checkbox is checked and apply is clicked, the entered e-mail address data is ajaxed over to the server.

    Default: false

  • wording

    version added: 6.15.0

    Wording for the dialog. See example.

    Default: {}

  • data

    version added: 6.15.0

    E-mail data for the dialog. There has to be a key (named as the option name) which holds an array of objects with keys "email" and "name"

    Default: {"dummy":[]}