Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    Empty slots in Rack view take up less space than occupied slots

    Scheduled Pinned Locked Moved Development
    2 Posts 2 Posters 2.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N Offline
      nfpct
      last edited by

      An empty slot in Rack (front/back) view takes up less space than an occupied slot.
      The alignment of the front and back column gets out of order if there are more empty slots in one of these columns.

      I changed line 632 of the "/idoit/src/tools/js/scripts.js" file to fix this problem.

      el.insert(new Element('tr', {
          className: css,
          'data-slotnum': i
      }).update(new Element('td').update(num + ' ')).insert(new Element('td', {
          className: 'slot'
      }).update( ')).insert(new Element('td').update(' ' + num)));
      if (rowspan > 0) {
          el.down('tr:last').down('td', 1).remove();
          rowspan--;
      }
      
      el.insert(new Element('tr', {
          className: css,
          'data-slotnum': i
      }).update(new Element('td').update(num + ' ')).insert(new Element('td', {
          className: 'slot'
      }).update(new Element('div').setStyle({
          height: '19px'
      }))).insert(new Element('td').update(' ' + num)));
      if (rowspan > 0) {
          el.down('tr:last').down('td', 1).remove();
          rowspan--;
      }
      

      This bug is present in the pro version.

      1 Reply Last reply Reply Quote 0
      • LFischerL Offline
        LFischer
        last edited by

        Hi there,

        thanks a lot for the patch - I'll implement this in the next minor release (i-doiv v 1.2.3).
        But first we need to test a few browsers (Chrome, Firefox, IE, …).

        By the way, this seems to work a bit better (because we need to consider the "room" view)

        el.insert(
          new Element('tr', {className:css, 'data-slotnum':i})
            .update(new Element('td').update(num + ' '))
            .insert(new Element('td', {className:'slot'}).update(''))
            //.insert(new Element('td', {className:'slot'}).update(' '))
            .insert(new Element('td').update(' ' + num))
        );
        

        Greetings from germany

        1 Reply Last reply Reply Quote 0
        • First post
          Last post