Announcement

Collapse
No announcement yet.

Event Duration are not editable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Event Duration are not editable

    Hi,
    we just noticed that event default duration values are not completely editable.
    We see we have the option to add new values but not to remove any value, default ones or not.
    Seems like a bug, please check.
    Thanks for this amazing application!
    V

  • #2
    Hi, I will check.

    Comment


    • #3
      Originally posted by yurikuzn View Post
      Hi, I will check.
      Hi, any news about it?

      Comment


      • #4
        Originally posted by Athensmusic View Post

        Hi, any news about it?
        Hi Athens,

        Is this it? https://github.com/espocrm/espocrm/c...dfc1b2a768718f


        Try making those changes to your version and see if this is fix. If it is then that the code.

        Comment


        • #5
          Yes, that fixed this issue.
          So, we replaced client/src/views/fields/array-int.js file content with the code above.

          define('views/fields/array-int', 'views/fields/array', function (Dep) {

          return Dep.extend({

          type: 'arrayInt',

          fetchFromDom: function () {
          var selected = [];
          this.$el.find('.list-group .list-group-item').each(function (i, el) {
          var value = $(el).data('value');
          if (typeof value === 'string' || value instanceof String) {
          value = parseInt($(el).data('value'));
          }
          selected.push(value);
          });
          this.selected = selected;
          },

          addValue: function (value) {
          value = parseInt(value);
          if (isNaN(value)) {
          return;
          }
          Dep.prototype.addValue.call(this, value);
          },

          removeValue: function (value) {
          value = parseInt(value);
          if (isNaN(value)) {
          return;
          }
          var valueInternal = value.toString().replace(/"/g, '\"');

          this.$list.children('[data-value="' + valueInternal + '"]').remove();

          var index = this.selected.indexOf(value);
          this.selected.splice(index, 1);
          this.trigger('change');
          //Dep.prototype.removeValue.call(this, value);
          },

          });
          });

          Thank you!

          Comment


          • #6
            Hi Athens,

            it is part of the version 5.8.3, so I recommend you do a Update just to make sure those manual change you did is correct.

            EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.

            EspoCRM Upgrade directory. Download the file to upgrade CRM application.

            Comment

            Working...
            X