Changeset 7778


Ignore:
Timestamp:
Feb 28, 2020, 10:45:08 AM (21 months ago)
Author:
Nicklas Nordborg
Message:

References #2202: Include information from parent items in list pages

Change some styles and colors while data is lazy-loading to make the user feel that something is going on.

Location:
trunk/www/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/include/scripts/lazy-parent-items.js

    r7769 r7778  
    5353  {
    5454    var lazyItems = [];
    55     // Collect 'item-id' from the first column until we have MAX_ITEMS_IN_BATCH
    56     while (lazyNo < lazyElements.length && lazyItems.length < itemsInBatch)
     55    while (lazyNo < lazyElements.length)
    5756    {
    5857      var e = lazyElements[lazyNo];
    59       lazyNo++;
    60       if (Data.get(e, 'index') == '0')
     58      var colIndex = Data.int(e, 'index');
     59      if (colIndex == 0)
    6160      {
     61        // Collect 'item-id' from the first column until we have 'itemsInBatch' items
     62        if (lazyItems.length == itemsInBatch) break;
    6263        lazyItems[lazyItems.length] = Data.get(e, 'item-id');
    6364      }
     65      Doc.removeClass(e, 'not-loaded');
     66      Doc.addClass(e, 'loading');
     67      lazyNo++;
    6468    }
    6569   
     
    109113        {
    110114          e.innerHTML = item.data[col];
    111           Doc.removeClass(e, 'not-loaded');
     115          Doc.removeClass(e, 'loading');
     116          Doc.removeClass(e, 'loaded');
    112117          Doc.autoInitElements(e);
    113118        }
  • trunk/www/include/styles/table.css

    r7775 r7778  
    394394}
    395395
    396 .lazy-parent.not-loaded
     396.lazy-parent.not-loaded, .lazy-parent.loading
    397397{
    398398  outline: 1px dotted #A0A0A0;
     
    401401}
    402402
    403 
     403.lazy-parent.loading
     404{
     405  outline: 1px solid #D0D0D0;
     406  background-color: rgba(236, 236, 128, 0.25);
     407}
     408
     409
     410
     411
     412
Note: See TracChangeset for help on using the changeset viewer.