Code Duplication    Length = 31-31 lines in 2 locations

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

@@ 4075-4105 (lines=31) @@
4072
    var Notification = Control$1.extend({
4073
      Mixins: [Movable],
4074
      Defaults: { classes: 'widget notification' },
4075
      init: function (settings) {
4076
        var self = this;
4077
        self._super(settings);
4078
        self.maxWidth = settings.maxWidth;
4079
        if (settings.text) {
4080
          self.text(settings.text);
4081
        }
4082
        if (settings.icon) {
4083
          self.icon = settings.icon;
4084
        }
4085
        if (settings.color) {
4086
          self.color = settings.color;
4087
        }
4088
        if (settings.type) {
4089
          self.classes.add('notification-' + settings.type);
4090
        }
4091
        if (settings.timeout && (settings.timeout < 0 || settings.timeout > 0) && !settings.closeButton) {
4092
          self.closeButton = false;
4093
        } else {
4094
          self.classes.add('has-close');
4095
          self.closeButton = true;
4096
        }
4097
        if (settings.progressBar) {
4098
          self.progressBar = new Progress();
4099
        }
4100
        self.on('click', function (e) {
4101
          if (e.target.className.indexOf(self.classPrefix + 'close') !== -1) {
4102
            self.close();
4103
          }
4104
        });
4105
      },
4106
      renderHtml: function () {
4107
        var self = this;
4108
        var prefix = self.classPrefix;

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

@@ 2595-2625 (lines=31) @@
2592
    var Notification = Control$1.extend({
2593
      Mixins: [Movable],
2594
      Defaults: { classes: 'widget notification' },
2595
      init: function (settings) {
2596
        var self = this;
2597
        self._super(settings);
2598
        self.maxWidth = settings.maxWidth;
2599
        if (settings.text) {
2600
          self.text(settings.text);
2601
        }
2602
        if (settings.icon) {
2603
          self.icon = settings.icon;
2604
        }
2605
        if (settings.color) {
2606
          self.color = settings.color;
2607
        }
2608
        if (settings.type) {
2609
          self.classes.add('notification-' + settings.type);
2610
        }
2611
        if (settings.timeout && (settings.timeout < 0 || settings.timeout > 0) && !settings.closeButton) {
2612
          self.closeButton = false;
2613
        } else {
2614
          self.classes.add('has-close');
2615
          self.closeButton = true;
2616
        }
2617
        if (settings.progressBar) {
2618
          self.progressBar = new Progress();
2619
        }
2620
        self.on('click', function (e) {
2621
          if (e.target.className.indexOf(self.classPrefix + 'close') !== -1) {
2622
            self.close();
2623
          }
2624
        });
2625
      },
2626
      renderHtml: function () {
2627
        var self = this;
2628
        var prefix = self.classPrefix;