Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column selector options are not stored/saved after page reload #2747

Open
7 tasks done
myosotisgit opened this issue Mar 3, 2020 · 12 comments
Open
7 tasks done

Column selector options are not stored/saved after page reload #2747

myosotisgit opened this issue Mar 3, 2020 · 12 comments
Milestone

Comments

@myosotisgit
Copy link

To reproduce:

  • Go to Reports > Detailed transactions
  • Deselect "type, Sold To, sold By"
  • Reload page
    The columns that you just deselected are displayed again...

And where are the "default" columns defined anyway?

Background information

  • Reporting an issue of an unmodified OSPOS installation
  • Checked open and closed issues and no similar issue was already reported (please make sure you searched!)
  • Read README, WHATS_NEW, INSTALL.md and UPGRADE
  • Read the FAQ for any known install and/or upgrade gotchas (in specific PHP extensions installed)
  • Read the wiki
  • Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
  • Aware the installation code is in bintray (see README), and GitHub master is for developers only and therefore not complete nor stable

Installation information

  • OSPOS version is: latest
  • PHP version is: 7
  • MySQL or MariaDB version is: latest
  • OS and version is: unknown
  • WebServer is: unknown
  • Selected language is: EN
@myosotisgit
Copy link
Author

I looked into this a bit. The toolbar (and table) is generated by the "Bootstrap-table" bower plugin. And this plugin (see bootstrap-table.com) also does not store/save the deselected/selected column toggles. So it might be a stretch to get this functionality.

However, in v1.16.x of bootstrap-table they have added the option "showColumnTogleAll".
https://bootstrap-table.com/versions/1.15.5/docs/api/table-options/#showcolumnstoggleall

This is pretty nice to have
image

See example: https://examples.bootstrap-table.com/#options/columns-toggle-all.html

I have tried adding this option to application/views/reports/tabular_details.php but it doesnt work or is not recognized. Like so :
image

@odiea
Copy link
Collaborator

odiea commented Mar 4, 2020

It does work but it removes the ability to upload any tables and it also adds the Rewards table twice for some reason.

@myosotisgit
Copy link
Author

It does work but it removes the ability to upload any tables and it also adds the Rewards table twice for some reason.

I dont understand the "removes the ability to upload tables". Is there an option to upload tables??

I have added the "showColumnsToggleAll" option but in my installation i dont see the option in the pulldown menu

image

@odiea
Copy link
Collaborator

odiea commented Mar 5, 2020

This is the appearance I get using the example.
2020-03-05 03_41_14-Window

@myosotisgit
Copy link
Author

Did you add the "showColumnsToggleAll" option to application/views/reports/tabular_details.php ?

@odiea
Copy link
Collaborator

odiea commented Mar 5, 2020

This below load view partial header

<link href="https://unpkg.com/bootstrap-table@1.16.0/dist/bootstrap-table.min.css" rel="stylesheet">
<script src="https://unpkg.com/bootstrap-table@1.16.0/dist/bootstrap-table.min.js"></script>

Then

<div id="table_holder">
	<table id="table" data-show-columns-toggle-all="true" ></table>
</div>

@odiea
Copy link
Collaborator

odiea commented Mar 5, 2020

It does add quite a few Improvements over the standard table.

@daN4cat
Copy link
Collaborator

daN4cat commented Mar 5, 2020

Maybe we should update the table widget but with 3.4.0.

@odiea
Copy link
Collaborator

odiea commented Mar 5, 2020

It allows page refresh, auto expand works ,full screen display and Toggle all .

<table
  id="table"
  data-toolbar="#toolbar" 
  data-show-refresh="true"
  data-show-toggle="true"
  data-show-fullscreen="true"
  data-show-columns="true"
  data-show-columns-toggle-all="true"
  data-detail-view="true"
  data-show-export="true"
  data-click-to-select="true"
  data-detail-formatter="detailFormatter"
  data-minimum-count-columns="2"
  data-show-pagination-switch="true"
  data-pagination="true"
  data-id-field="id"
  data-page-list="[10, 25, 50, 100, all]"
  data-show-footer="true"
  data-side-pagination="server"
  data-url="https://examples.wenzhixin.net.cn/examples/bootstrap_table/data"
  data-response-handler="responseHandler">
</table>

@odiea
Copy link
Collaborator

odiea commented Mar 5, 2020

@daN4cat Let me know what to change and I will give that a try.

@odiea
Copy link
Collaborator

odiea commented Mar 5, 2020

Appears to work good in Detailed Transactions but the other Reports that use Tabular_details do not.
The Reports also take forever to load. I should have tried this in multiple browsers

@stale
Copy link

stale bot commented Apr 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 4, 2020
@stale stale bot closed this as completed Apr 11, 2020
@daN4cat daN4cat reopened this Apr 12, 2020
@stale stale bot removed the wontfix label Apr 12, 2020
@daN4cat daN4cat added this to the 3.4.0 milestone Apr 12, 2020
@objecttothis objecttothis modified the milestones: 3.4.0, 3.5.0 Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants