Plugin Directory

Changeset 2594450


Ignore:
Timestamp:
09/06/2021 04:58:17 PM (5 years ago)
Author:
Supertext
Message:

Sync with GitHub

Location:
polylang-supertext/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • polylang-supertext/trunk/plugin.php

    r2572857 r2594450  
    77Domain Path: /resources/languages
    88Author: Supertext AG
    9 Version: 4.05
     9Version: 4.06
    1010Author URI: http://www.supertext.ch
    1111License: GPLv2 or later
    1212*/
    1313
    14 define('SUPERTEXT_PLUGIN_VERSION', '4.05');
    15 define('SUPERTEXT_PLUGIN_REVISION', 44);
     14define('SUPERTEXT_PLUGIN_VERSION', '4.06');
     15define('SUPERTEXT_PLUGIN_REVISION', 45);
    1616define('SUPERTEXT_BASE_PATH', __DIR__);
    1717define('SUPERTEXT_VIEW_PATH', __DIR__ . '/views/');
  • polylang-supertext/trunk/readme.txt

    r2572857 r2594450  
    110110== Changelog ==
    111111
     112= 4.06 =
     113* Fix bug with Custom vs. Elementor settings that saved the entered custom fields as Elementor field
     114
    112115= 4.05 =
    113116* Expose startTranslationOrderProcess and startProofreadOrderProcess on Supertext.Interface to be able to start either of the two order processes
  • polylang-supertext/trunk/resources/scripts/settings-library.js

    r2426422 r2594450  
    77  'use strict';
    88
    9   var $tableBody,
    10     $rowTemplate;
     9  var $tableBody, $rowTemplate;
    1110
    1211  function addUserField() {
     
    2827      options = options || {};
    2928
    30       $tableBody = $("#tblStFields tbody");
     29      $tableBody = $('#tblStFields tbody');
    3130      $tableBody.find('tr .saved-user-id-hidden');
    3231      $tableBody.find('tr .remove-user-button').click(removeUserField);
     
    4948  'use strict';
    5049  var customFieldsSettings = (function () {
    51     var $customFieldInputCopy;
     50    var inputListsInputElements = {};
    5251
    5352    function addCustomFieldInput() {
    5453      var $this = $(this);
    55       var $newCustomFieldInput = $customFieldInputCopy.clone();
    56 
    57       $newCustomFieldInput.children('.custom-field-remove-input')
    58         .click(removeCustomFieldInput);
     54
     55      var $newCustomFieldInput = inputListsInputElements[$this.data('input-name')].clone();
     56      $newCustomFieldInput.children('.field-remove-input').click(removeCustomFieldInput);
     57
     58      $newCustomFieldInput.children('.custom-field-remove-input').click(removeCustomFieldInput);
    5959
    6060      $newCustomFieldInput.insertBefore($this).show();
     
    6767    return {
    6868      initialize: function (options) {
    69 
    70         $customFieldInputCopy = $('#translatablefieldsSettingsForm .custom-field-input').last().clone();
    71 
    72         $('#translatablefieldsSettingsForm .custom-field-remove-input')
    73           .click(removeCustomFieldInput);
    74 
    75         $('#translatablefieldsSettingsForm .custom-field-add-input')
    76           .click(addCustomFieldInput);
     69        $('#translatablefieldsSettingsForm .field-remove-input').click(removeCustomFieldInput);
     70        $('#translatablefieldsSettingsForm .field-add-input').click(addCustomFieldInput);
     71
     72        var $inputLists = $('#translatablefieldsSettingsForm .settings-input-list');
     73
     74        $inputLists.each(function (_index, inputList) {
     75          var $inputList = $(inputList);
     76          var $inputElement = $inputList.children('.settings-input-element').last().clone();
     77          var inputListName = $inputList.children('.field-add-input').first().data('input-name');
     78          inputListsInputElements[inputListName] = $inputElement;
     79        });
    7780      }
    7881    };
    79 
    80   }());
     82  })();
    8183
    8284  var pluginCustomFieldsSettings = (function () {
    83     var
    84       fieldDefinitionsTrees = {},
     85    var fieldDefinitionsTrees = {},
    8586      checkedFieldsInputs = {};
    8687
    8788    function setCheckedFields() {
    88       $.each(fieldDefinitionsTrees, function(pluginId, tree){
    89         var checkedNodes = tree.jstree("get_checked", false);
     89      $.each(fieldDefinitionsTrees, function (pluginId, tree) {
     90        var checkedNodes = tree.jstree('get_checked', false);
    9091        checkedFieldsInputs[pluginId].val(checkedNodes.join(','));
    9192      });
     
    9697        options = options || {};
    9798
    98         for(var pluginId in savedFieldDefinitionIds){
     99        for (var pluginId in savedFieldDefinitionIds) {
    99100          if (!savedFieldDefinitionIds.hasOwnProperty(pluginId)) {
    100101            continue;
    101102          }
    102103
    103           fieldDefinitionsTrees[pluginId] = $('#fieldDefinitionsTree'+pluginId);
    104           checkedFieldsInputs[pluginId] = $('#checkedFieldsInput'+pluginId);
     104          fieldDefinitionsTrees[pluginId] = $('#fieldDefinitionsTree' + pluginId);
     105          checkedFieldsInputs[pluginId] = $('#checkedFieldsInput' + pluginId);
    105106
    106107          fieldDefinitionsTrees[pluginId].jstree({
    107             'core': {
    108               'themes': {
    109                 'name': 'wordpress-dark'
     108            core: {
     109              themes: {
     110                name: 'wordpress-dark'
    110111              }
    111112            },
    112             'plugins': ['checkbox'],
    113             'checkbox': {
    114               'keep_selected_style': false
     113            plugins: ['checkbox'],
     114            checkbox: {
     115              keep_selected_style: false
    115116            }
    116117          });
     
    122123      }
    123124    };
    124   }());
     125  })();
    125126
    126127  return {
     
    138139  'use strict';
    139140
    140   var shortcodeSettingTemplate,
    141       shortcodeAttributeTemplate;
    142 
    143   function addShortcodeSetting($container, name, contentEncoding){
     141  var shortcodeSettingTemplate, shortcodeAttributeTemplate;
     142
     143  function addShortcodeSetting($container, name, contentEncoding) {
    144144    var lastIndex = $container.data('lastIndex');
    145     var newIndex =  lastIndex === undefined ? 0 : lastIndex + 1;
     145    var newIndex = lastIndex === undefined ? 0 : lastIndex + 1;
    146146
    147147    var html = shortcodeSettingTemplate({
     
    155155    $container.data('lastIndex', newIndex);
    156156
    157     $shortcodeSetting.children('.shortcode-remove-setting')
    158       .click(function(){
    159         $shortcodeSetting.remove();
    160       });
    161 
    162     $shortcodeSetting.find('.shortcode-attribute-add-input')
    163       .click(function(){
    164         addAttributeInput($shortcodeSetting.find('.shortcode-setting-attributes'), newIndex);
    165       });
     157    $shortcodeSetting.children('.shortcode-remove-setting').click(function () {
     158      $shortcodeSetting.remove();
     159    });
     160
     161    $shortcodeSetting.find('.shortcode-attribute-add-input').click(function () {
     162      addAttributeInput($shortcodeSetting.find('.shortcode-setting-attributes'), newIndex);
     163    });
    166164
    167165    initEncodingAutoComplete($shortcodeSetting);
     
    171169  function addAttributeInput($container, shortcodeIndex, name, encoding) {
    172170    var lastIndex = $container.data('lastIndex');
    173     var newIndex =  lastIndex === undefined ? 0 : lastIndex + 1;
    174 
    175     var $shortcodeAttribute = $(shortcodeAttributeTemplate({
    176       shortcodeIndex: shortcodeIndex,
    177       attributeIndex: newIndex,
    178       name: name,
    179       encoding: encoding
    180     }));
     171    var newIndex = lastIndex === undefined ? 0 : lastIndex + 1;
     172
     173    var $shortcodeAttribute = $(
     174      shortcodeAttributeTemplate({
     175        shortcodeIndex: shortcodeIndex,
     176        attributeIndex: newIndex,
     177        name: name,
     178        encoding: encoding
     179      })
     180    );
    181181
    182182    $container.append($shortcodeAttribute);
    183183    $container.data('lastIndex', newIndex);
    184184
    185     $shortcodeAttribute.children('.shortcode-attribute-remove-input')
    186       .click(function(){
    187         $shortcodeAttribute.remove();
    188       });
     185    $shortcodeAttribute.children('.shortcode-attribute-remove-input').click(function () {
     186      $shortcodeAttribute.remove();
     187    });
    189188
    190189    initEncodingAutoComplete($shortcodeAttribute);
     
    199198  }
    200199
    201   function initShortcodeAutoComplete($element){
    202     $element.find('.shortcode-input-name')
    203       .bind("keydown", function (event) {
    204         if (event.keyCode === $.ui.keyCode.TAB &&
    205           $(this).autocomplete("instance").menu.active) {
     200  function initShortcodeAutoComplete($element) {
     201    $element
     202      .find('.shortcode-input-name')
     203      .bind('keydown', function (event) {
     204        if (event.keyCode === $.ui.keyCode.TAB && $(this).autocomplete('instance').menu.active) {
    206205          event.preventDefault();
    207206        }
     
    213212          response($.ui.autocomplete.filter(registeredShortcodes, request.term));
    214213        }
    215       }
    216     );
    217   }
    218 
    219   function initEncodingAutoComplete($element){
    220     $element.find('.shortcode-input-encoding')
    221       .bind("keydown", function (event) {
    222         if (event.keyCode === $.ui.keyCode.TAB &&
    223           $(this).autocomplete("instance").menu.active) {
     214      });
     215  }
     216
     217  function initEncodingAutoComplete($element) {
     218    $element
     219      .find('.shortcode-input-encoding')
     220      .bind('keydown', function (event) {
     221        if (event.keyCode === $.ui.keyCode.TAB && $(this).autocomplete('instance').menu.active) {
    224222          event.preventDefault();
    225223        }
     
    242240          terms.push(ui.item.value);
    243241          // add placeholder to get the comma-and-space at the end
    244           terms.push("");
    245           this.value = terms.join(", ");
     242          terms.push('');
     243          this.value = terms.join(', ');
    246244          return false;
    247245        }
    248       }
    249     );
     246      });
    250247  }
    251248
     
    254251      options = options || {};
    255252
    256       shortcodeSettingTemplate = options.template("sttr-shortcode-setting");
    257       shortcodeAttributeTemplate = options.template("sttr-shortcode-attribute");
    258 
    259       var $shortcodeSettings = $("#shortcode-settings");
    260 
    261       $.each(savedShortcodes, function(name, shortcode){
     253      shortcodeSettingTemplate = options.template('sttr-shortcode-setting');
     254      shortcodeAttributeTemplate = options.template('sttr-shortcode-attribute');
     255
     256      var $shortcodeSettings = $('#shortcode-settings');
     257
     258      $.each(savedShortcodes, function (name, shortcode) {
    262259        addShortcodeSetting($shortcodeSettings, name, shortcode.content_encoding);
    263260        var $container = $shortcodeSettings.find('.shortcode-setting-container:last .shortcode-setting-attributes');
    264261        var shortcodeIndex = $shortcodeSettings.data('lastIndex');
    265262
    266         $.each(shortcode.attributes, function(index, attribute){
     263        $.each(shortcode.attributes, function (index, attribute) {
    267264          addAttributeInput($container, shortcodeIndex, attribute.name, attribute.encoding);
    268265        });
    269266      });
    270      
    271       $('#shortcodesSettingsForm .shortcode-add-setting')
    272         .click(function(){
    273           addShortcodeSetting($shortcodeSettings);
    274         });
     267
     268      $('#shortcodesSettingsForm .shortcode-add-setting').click(function () {
     269        addShortcodeSetting($shortcodeSettings);
     270      });
    275271    }
    276272  };
     
    280276  'use strict';
    281277
    282   var
    283     $apiUrl,
    284     $apiSelection;
    285 
    286   function updateAlternativeApiUrlInput(){
     278  var $apiUrl, $apiSelection;
     279
     280  function updateAlternativeApiUrlInput() {
    287281    $apiUrl.val($apiSelection.val());
    288282
    289     if($apiSelection.children('option:last').is(':selected')){
     283    if ($apiSelection.children('option:last').is(':selected')) {
    290284      $apiUrl.removeProp('readonly');
    291     }else{
     285    } else {
    292286      $apiUrl.prop('readonly', true);
    293287    }
     
    325319
    326320    case 'shortcodes':
    327       Supertext.Settings.Shortcodes.initialize({ template: wp.template});
     321      Supertext.Settings.Shortcodes.initialize({ template: wp.template });
    328322      break;
    329323
    330324    case 'workflow':
    331     Supertext.Settings.Workflow.initialize();
    332     break;
     325      Supertext.Settings.Workflow.initialize();
     326      break;
    333327  }
    334328});
  • polylang-supertext/trunk/resources/scripts/settings-library.min.js

    r2572430 r2594450  
    55 * @version 2.7.0
    66 * Copyright 2021 */
    7 var Supertext=Supertext||{};Supertext.Settings={},Supertext.Settings.Users=function(t){"use strict";var i,n;function o(){var e=n.clone();e.find(".remove-user-button").click(r),i.append(e)}function r(){t(this).parent("td").parent("tr").remove(),0===i.find("tr").length&&o()}return{initialize:function(e){(i=t("#tblStFields tbody")).find("tr .saved-user-id-hidden"),i.find("tr .remove-user-button").click(r),i.find("tr .saved-user-id-hidden").each(function(){var e=t(this);e.prev().val(e.val())}),(n=t("#tblStFields tr:last").clone()).find("input").val(""),t("#btnAddUser").click(o)}}}(jQuery),Supertext.Settings.TranslatableFields=function(i){"use strict";var n,t={initialize:function(e){n=i("#translatablefieldsSettingsForm .custom-field-input").last().clone(),i("#translatablefieldsSettingsForm .custom-field-remove-input").click(r),i("#translatablefieldsSettingsForm .custom-field-add-input").click(o)}};function o(){var e=i(this),t=n.clone();t.children(".custom-field-remove-input").click(r),t.insertBefore(e).show()}function r(){i(this).parent().remove()}var s,a,c=(s={},a={},{initialize:function(e){for(var t in savedFieldDefinitionIds)savedFieldDefinitionIds.hasOwnProperty(t)&&(s[t]=i("#fieldDefinitionsTree"+t),a[t]=i("#checkedFieldsInput"+t),s[t].jstree({core:{themes:{name:"wordpress-dark"}},plugins:["checkbox"],checkbox:{keep_selected_style:!1}}),s[t].jstree("select_node",savedFieldDefinitionIds[t]));i("#translatablefieldsSettingsForm").submit(d)}});function d(){i.each(s,function(e,t){t=t.jstree("get_checked",!1);a[e].val(t.join(","))})}return{initialize:function(e){t.initialize(e=e||{}),c.initialize(e)}}}(jQuery),Supertext.Settings.Shortcodes=function(s){"use strict";var a,c;function r(e,t,i){var n=e.data("lastIndex"),o=void 0===n?0:n+1,i=a({shortcodeIndex:o,name:t,contentEncoding:i}),r=s(i);e.append(r),e.data("lastIndex",o),r.children(".shortcode-remove-setting").click(function(){r.remove()}),r.find(".shortcode-attribute-add-input").click(function(){d(r.find(".shortcode-setting-attributes"),o)}),u(r),r.find(".shortcode-input-name").bind("keydown",function(e){e.keyCode===s.ui.keyCode.TAB&&s(this).autocomplete("instance").menu.active&&e.preventDefault()}).autocomplete({minLength:0,source:function(e,t){t(s.ui.autocomplete.filter(registeredShortcodes,e.term))}})}function d(e,t,i,n){var o=e.data("lastIndex"),o=void 0===o?0:o+1,r=s(c({shortcodeIndex:t,attributeIndex:o,name:i,encoding:n}));e.append(r),e.data("lastIndex",o),r.children(".shortcode-attribute-remove-input").click(function(){r.remove()}),u(r)}function n(e){return e.split(/,\s*/)}function u(e){e.find(".shortcode-input-encoding").bind("keydown",function(e){e.keyCode===s.ui.keyCode.TAB&&s(this).autocomplete("instance").menu.active&&e.preventDefault()}).autocomplete({minLength:0,source:function(e,t){t(s.ui.autocomplete.filter(availableEncodingFunctions,n(e.term).pop()))},focus:function(){return!1},select:function(e,t){var i=n(this.value);return i.pop(),i.push(t.item.value),i.push(""),this.value=i.join(", "),!1}})}return{initialize:function(e){a=(e=e||{}).template("sttr-shortcode-setting"),c=e.template("sttr-shortcode-attribute");var o=s("#shortcode-settings");s.each(savedShortcodes,function(e,t){r(o,e,t.content_encoding);var i=o.find(".shortcode-setting-container:last .shortcode-setting-attributes"),n=o.data("lastIndex");s.each(t.attributes,function(e,t){d(i,n,t.name,t.encoding)})}),s("#shortcodesSettingsForm .shortcode-add-setting").click(function(){r(o)})}}}(jQuery),Supertext.Settings.Workflow=function(t){"use strict";var i,n;function o(){i.val(n.val()),n.children("option:last").is(":selected")?i.removeProp("readonly"):i.prop("readonly",!0)}return{initialize:function(e){i=t("#sttr-api-url"),(n=t("#sttr-api-selection")).change(o),o()}}}(jQuery),jQuery(document).ready(function(){var e=window.location.search,e=/tab=(.*?)(&|$|\s)/.exec(e);switch(null===e?"users":e[1]){case"users":Supertext.Settings.Users.initialize();break;case"translatablefields":Supertext.Settings.TranslatableFields.initialize();break;case"shortcodes":Supertext.Settings.Shortcodes.initialize({template:wp.template});break;case"workflow":Supertext.Settings.Workflow.initialize()}});
     7var Supertext=Supertext||{};Supertext.Settings={},Supertext.Settings.Users=function(t){"use strict";var i,n;function r(){var e=n.clone();e.find(".remove-user-button").click(o),i.append(e)}function o(){t(this).parent("td").parent("tr").remove(),0===i.find("tr").length&&r()}return{initialize:function(e){(i=t("#tblStFields tbody")).find("tr .saved-user-id-hidden"),i.find("tr .remove-user-button").click(o),i.find("tr .saved-user-id-hidden").each(function(){var e=t(this);e.prev().val(e.val())}),(n=t("#tblStFields tr:last").clone()).find("input").val(""),t("#btnAddUser").click(r)}}}(jQuery),Supertext.Settings.TranslatableFields=function(n){"use strict";var r,t=(r={},{initialize:function(e){n("#translatablefieldsSettingsForm .field-remove-input").click(o),n("#translatablefieldsSettingsForm .field-add-input").click(i),n("#translatablefieldsSettingsForm .settings-input-list").each(function(e,t){var i=n(t),t=i.children(".settings-input-element").last().clone(),i=i.children(".field-add-input").first().data("input-name");r[i]=t})}});function i(){var e=n(this),t=r[e.data("input-name")].clone();t.children(".field-remove-input").click(o),t.children(".custom-field-remove-input").click(o),t.insertBefore(e).show()}function o(){n(this).parent().remove()}var s,a,c=(s={},a={},{initialize:function(e){for(var t in savedFieldDefinitionIds)savedFieldDefinitionIds.hasOwnProperty(t)&&(s[t]=n("#fieldDefinitionsTree"+t),a[t]=n("#checkedFieldsInput"+t),s[t].jstree({core:{themes:{name:"wordpress-dark"}},plugins:["checkbox"],checkbox:{keep_selected_style:!1}}),s[t].jstree("select_node",savedFieldDefinitionIds[t]));n("#translatablefieldsSettingsForm").submit(d)}});function d(){n.each(s,function(e,t){t=t.jstree("get_checked",!1);a[e].val(t.join(","))})}return{initialize:function(e){t.initialize(e=e||{}),c.initialize(e)}}}(jQuery),Supertext.Settings.Shortcodes=function(s){"use strict";var a,c;function o(e,t,i){var n=e.data("lastIndex"),r=void 0===n?0:n+1,i=a({shortcodeIndex:r,name:t,contentEncoding:i}),o=s(i);e.append(o),e.data("lastIndex",r),o.children(".shortcode-remove-setting").click(function(){o.remove()}),o.find(".shortcode-attribute-add-input").click(function(){d(o.find(".shortcode-setting-attributes"),r)}),l(o),o.find(".shortcode-input-name").bind("keydown",function(e){e.keyCode===s.ui.keyCode.TAB&&s(this).autocomplete("instance").menu.active&&e.preventDefault()}).autocomplete({minLength:0,source:function(e,t){t(s.ui.autocomplete.filter(registeredShortcodes,e.term))}})}function d(e,t,i,n){var r=e.data("lastIndex"),r=void 0===r?0:r+1,o=s(c({shortcodeIndex:t,attributeIndex:r,name:i,encoding:n}));e.append(o),e.data("lastIndex",r),o.children(".shortcode-attribute-remove-input").click(function(){o.remove()}),l(o)}function n(e){return e.split(/,\s*/)}function l(e){e.find(".shortcode-input-encoding").bind("keydown",function(e){e.keyCode===s.ui.keyCode.TAB&&s(this).autocomplete("instance").menu.active&&e.preventDefault()}).autocomplete({minLength:0,source:function(e,t){t(s.ui.autocomplete.filter(availableEncodingFunctions,n(e.term).pop()))},focus:function(){return!1},select:function(e,t){var i=n(this.value);return i.pop(),i.push(t.item.value),i.push(""),this.value=i.join(", "),!1}})}return{initialize:function(e){a=(e=e||{}).template("sttr-shortcode-setting"),c=e.template("sttr-shortcode-attribute");var r=s("#shortcode-settings");s.each(savedShortcodes,function(e,t){o(r,e,t.content_encoding);var i=r.find(".shortcode-setting-container:last .shortcode-setting-attributes"),n=r.data("lastIndex");s.each(t.attributes,function(e,t){d(i,n,t.name,t.encoding)})}),s("#shortcodesSettingsForm .shortcode-add-setting").click(function(){o(r)})}}}(jQuery),Supertext.Settings.Workflow=function(t){"use strict";var i,n;function r(){i.val(n.val()),n.children("option:last").is(":selected")?i.removeProp("readonly"):i.prop("readonly",!0)}return{initialize:function(e){i=t("#sttr-api-url"),(n=t("#sttr-api-selection")).change(r),r()}}}(jQuery),jQuery(document).ready(function(){var e=window.location.search,e=/tab=(.*?)(&|$|\s)/.exec(e);switch(null===e?"users":e[1]){case"users":Supertext.Settings.Users.initialize();break;case"translatablefields":Supertext.Settings.TranslatableFields.initialize();break;case"shortcodes":Supertext.Settings.Shortcodes.initialize({template:wp.template});break;case"workflow":Supertext.Settings.Workflow.initialize()}});
  • polylang-supertext/trunk/views/backend/settings-custom-fields.php

    r2520480 r2594450  
    11<?php
    22
    3 function getCustomFieldInput($value=''){
    4   return '<div class="custom-field-input">
    5       <input type="text" name="custom-fields[]" placeholder="'.__('Custom field name...', 'supertext').'" value="'.$value.'"/>
    6       <button type="button" class="button button-highlighted button-remove custom-field-remove-input"><span class="dashicons dashicons-trash"></span></button>
     3function getCustomFieldInput($value = '')
     4{
     5  return '<div class="settings-input-element">
     6      <input type="text" name="custom-fields[]" placeholder="' . __('Custom field name...', 'supertext') . '" value="' . $value . '"/>
     7      <button type="button" class="button button-highlighted button-remove field-remove-input"><span class="dashicons dashicons-trash"></span></button>
    78    </div>';
    89}
     
    1011$savedCustomFieldsInputs = '';
    1112
    12 foreach($savedCustomFields as $savedCustomField){
     13foreach ($savedCustomFields as $savedCustomField) {
    1314  $savedCustomFieldsInputs .= getCustomFieldInput($savedCustomField);
    1415}
     
    1617?>
    1718<div class="postbox postbox_admin">
    18   <div class="inside">
     19  <div class="inside settings-input-list">
    1920    <h3><?php _e('General custom fields', 'supertext'); ?></h3>
    2021    <p>
     
    2324    <?php echo $savedCustomFieldsInputs; ?>
    2425    <?php echo getCustomFieldInput(); ?>
    25     <button type="button" class="button button-highlighted button-add custom-field-add-input"><?php _e('Add field', 'supertext'); ?></button>
     26    <button type="button" class="button button-highlighted button-add field-add-input" data-input-name="custom-field"><?php _e('Add field', 'supertext'); ?></button>
    2627  </div>
    2728</div>
    28 
  • polylang-supertext/trunk/views/backend/settings-elementor.php

    r2565361 r2594450  
    33function getElementorTextPropertyInput($value = '')
    44{
    5   return '<div class="custom-field-input">
    6         <input type="text" name="elementor-text-properties[]" placeholder="' . __('Property name...', 'supertext') . '" value="' . $value . '"/>
    7         <button type="button" class="button button-highlighted button-remove custom-field-remove-input"><span class="dashicons dashicons-trash"></span></button>
    8       </div>';
     5  return '<div class="settings-input-element">
     6      <input type="text" name="elementor-text-properties[]" placeholder="' . __('Property name...', 'supertext') . '" value="' . $value . '"/>
     7      <button type="button" class="button button-highlighted button-remove field-remove-input"><span class="dashicons dashicons-trash"></span></button>
     8    </div>';
    99}
    1010
     
    1717?>
    1818<div class="postbox postbox_admin">
    19   <div class="inside">
     19  <div class="inside settings-input-list">
    2020    <h3><?php _e('Elementor (Plugin)', 'supertext'); ?></h3>
    2121    <p>
     
    2424    <?php echo $elementorTextPropertyInputs; ?>
    2525    <?php echo getElementorTextPropertyInput(); ?>
    26     <button type="button" class="button button-highlighted button-add custom-field-add-input"><?php _e('Add text property', 'supertext'); ?></button>
     26    <button type="button" class="button button-highlighted button-add field-add-input" data-input-name="elementor-field"><?php _e('Add text property', 'supertext'); ?></button>
    2727  </div>
    2828</div>
Note: See TracChangeset for help on using the changeset viewer.