Giter Club home page Giter Club logo

Comments (8)

SimonHeimberg avatar SimonHeimberg commented on August 17, 2024 1

@MartinRosserEB what about the changeset shown above?
Because the hiding is saved in a css rule, it is automatically applied to new cells.

Used in one place currently: http://hesi.dev.cubetools.ch/tm/app_dev.php/execution/testrun/
Your login is the same as on the productive system.

from cube-common-bundle.

SimonHeimberg avatar SimonHeimberg commented on August 17, 2024
ruleNode = $('#columnsTableXxx');
if (ruleNode) {
     sheet = ruleNode[0].sheet;
} else {
    style = document.createElement('style');
    style.style.appendChild(document.createTextNode("")); //webkit hack
    style.setAttr('id', 'columnsTableXxx');
    document.head.appendChild(style);
    sheet = style.sheet;
}
rule = cssRules.item(columnSelector);
if (rule) {
    rule.style.display = 'visible';
} else {
    cssRules.insertRule(columnSelector+'{'+'display: '+'visible'+'}', 0);
}

ToDo: check if cssRules.item(columnSelector); works on various browsers: ff OK, IE ?, Edge OK, Chrome ?

from cube-common-bundle.

SimonHeimberg avatar SimonHeimberg commented on August 17, 2024

page .../tm/.../exectionion/testrun/ tested (with MartinRosserEB) on:

  • Firefox/54.0
  • Edge/15.15063
  • IE
  • Chrome

Inserting new rows tested with Edge by using the console.

from cube-common-bundle.

SimonHeimberg avatar SimonHeimberg commented on August 17, 2024

Can be further improved by doing filtering in twig. But this need some more macros, which must be applied everywhere.

pro:

contra:

  • more effort to apply everywhere (will be simpler when we do more with macros)
  • needs data transmission on column hiding/showing. (Is currently done on client side.)

from cube-common-bundle.

SimonHeimberg avatar SimonHeimberg commented on August 17, 2024

hiding currently (1.1.1) done with display none+adapting of total column count

shortcoming:
* works only for colspan of full length

Tries with "visibility: collapse" on colgroup>col + hiding cells failed (1.1.0)
current problem: Firefox does not support "table-layout: auto" and "visibility: collapse" on colgroup>col, the col element keeps its width (even when it's width is set to 0)

TODO:

  • implement correctly (for all colspan), but working

to consider

  • browsers IE, Firefox, Chrome, Edge
  • table-layout: fixed (../doc/document, ../meetings/action) / auto (../reservation)

from cube-common-bundle.

MartinRosserEB avatar MartinRosserEB commented on August 17, 2024

I suggest to only support table-layout: auto; for generic use cases.

We have issues with table-layout: fixed since content may overflow (columns do not fit on one page), and we cannot set a width to all columns.

from cube-common-bundle.

SimonHeimberg avatar SimonHeimberg commented on August 17, 2024

hopefully fixed with pr #61

from cube-common-bundle.

SimonHeimberg avatar SimonHeimberg commented on August 17, 2024

last issue in #64

from cube-common-bundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.