Code Duplication    Length = 31-31 lines in 2 locations

public/js/tinymce/themes/inlite/theme.js 1 location

@@ 5445-5475 (lines=31) @@
5442
        });
5443
        return self$$1._super();
5444
      },
5445
      renderHtml: function () {
5446
        var self$$1 = this, id = self$$1._id, settings = self$$1.settings, prefix = self$$1.classPrefix;
5447
        var value = self$$1.state.get('value') || '';
5448
        var icon, text, openBtnHtml = '', extraAttrs = '', statusHtml = '';
5449
        if ('spellcheck' in settings) {
5450
          extraAttrs += ' spellcheck="' + settings.spellcheck + '"';
5451
        }
5452
        if (settings.maxLength) {
5453
          extraAttrs += ' maxlength="' + settings.maxLength + '"';
5454
        }
5455
        if (settings.size) {
5456
          extraAttrs += ' size="' + settings.size + '"';
5457
        }
5458
        if (settings.subtype) {
5459
          extraAttrs += ' type="' + settings.subtype + '"';
5460
        }
5461
        statusHtml = '<i id="' + id + '-status" class="mce-status mce-ico" style="display: none"></i>';
5462
        if (self$$1.disabled()) {
5463
          extraAttrs += ' disabled="disabled"';
5464
        }
5465
        icon = settings.icon;
5466
        if (icon && icon !== 'caret') {
5467
          icon = prefix + 'ico ' + prefix + 'i-' + settings.icon;
5468
        }
5469
        text = self$$1.state.get('text');
5470
        if (icon || text) {
5471
          openBtnHtml = '<div id="' + id + '-open" class="' + prefix + 'btn ' + prefix + 'open" tabIndex="-1" role="button">' + '<button id="' + id + '-action" type="button" hidefocus="1" tabindex="-1">' + (icon !== 'caret' ? '<i class="' + icon + '"></i>' : '<i class="' + prefix + 'caret"></i>') + (text ? (icon ? ' ' : '') + text : '') + '</button>' + '</div>';
5472
          self$$1.classes.add('has-open');
5473
        }
5474
        return '<div id="' + id + '" class="' + self$$1.classes + '">' + '<input id="' + id + '-inp" class="' + prefix + 'textbox" value="' + self$$1.encode(value, false) + '" hidefocus="1"' + extraAttrs + ' placeholder="' + self$$1.encode(settings.placeholder) + '" />' + statusHtml + openBtnHtml + '</div>';
5475
      },
5476
      value: function (value) {
5477
        if (arguments.length) {
5478
          this.state.set('value', value);

public/js/tinymce/themes/modern/theme.js 1 location

@@ 5263-5293 (lines=31) @@
5260
        });
5261
        return self$$1._super();
5262
      },
5263
      renderHtml: function () {
5264
        var self$$1 = this, id = self$$1._id, settings = self$$1.settings, prefix = self$$1.classPrefix;
5265
        var value = self$$1.state.get('value') || '';
5266
        var icon, text, openBtnHtml = '', extraAttrs = '', statusHtml = '';
5267
        if ('spellcheck' in settings) {
5268
          extraAttrs += ' spellcheck="' + settings.spellcheck + '"';
5269
        }
5270
        if (settings.maxLength) {
5271
          extraAttrs += ' maxlength="' + settings.maxLength + '"';
5272
        }
5273
        if (settings.size) {
5274
          extraAttrs += ' size="' + settings.size + '"';
5275
        }
5276
        if (settings.subtype) {
5277
          extraAttrs += ' type="' + settings.subtype + '"';
5278
        }
5279
        statusHtml = '<i id="' + id + '-status" class="mce-status mce-ico" style="display: none"></i>';
5280
        if (self$$1.disabled()) {
5281
          extraAttrs += ' disabled="disabled"';
5282
        }
5283
        icon = settings.icon;
5284
        if (icon && icon !== 'caret') {
5285
          icon = prefix + 'ico ' + prefix + 'i-' + settings.icon;
5286
        }
5287
        text = self$$1.state.get('text');
5288
        if (icon || text) {
5289
          openBtnHtml = '<div id="' + id + '-open" class="' + prefix + 'btn ' + prefix + 'open" tabIndex="-1" role="button">' + '<button id="' + id + '-action" type="button" hidefocus="1" tabindex="-1">' + (icon !== 'caret' ? '<i class="' + icon + '"></i>' : '<i class="' + prefix + 'caret"></i>') + (text ? (icon ? ' ' : '') + text : '') + '</button>' + '</div>';
5290
          self$$1.classes.add('has-open');
5291
        }
5292
        return '<div id="' + id + '" class="' + self$$1.classes + '">' + '<input id="' + id + '-inp" class="' + prefix + 'textbox" value="' + self$$1.encode(value, false) + '" hidefocus="1"' + extraAttrs + ' placeholder="' + self$$1.encode(settings.placeholder) + '" />' + statusHtml + openBtnHtml + '</div>';
5293
      },
5294
      value: function (value) {
5295
        if (arguments.length) {
5296
          this.state.set('value', value);