Jump to content

dotnetic

Members
  • Posts

    1,078
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by dotnetic

  1. There are different libs out there which convert existing HTML and CSS to a PDF. If I create a Bitmap graphic out of the website, the PDF would not be searchable. So converting to a bitmap is not a solution for me. Looping over the fields and generating own markup would be the exact same process as if I did it on the frontend. I have to take every single fieldtype into account and render it accordingly. This is one thing ProcessWire's admin already does. Although this solution would be a lot cleaner with simpler HTML. Then I would create an own stylesheet and generate the PDF out of it. As I said before, I would not like to do this. But it might be an option.
  2. @bernhard I try to generate PDFs of one one or more admin pages (forms). I built an application with PW where people can enter details (for example a job application or a request form for office material) and there are many fields (150+) in the admin. Also in the admin I ordered and positioned the fields like they should appear on the resulting PDF. So I do not want to make a new template on the frontend level, just to recreate what I already have in the admin. If fields are added I have to change nothing. So I hope to come up with a good solution. I already seen your RockPDF module, and also Pages2PDF and PDFcomposer. Thanks for the additional hint.
  3. I want to create PDFs of certain pages in the admin. I do not want to recreate the admin template on the frontend and write code to show every field that I have in my template. Instead I would like to get just the HTML of the admin page in a variable so I can use it for generating my PDFs. How would I do that? Can it be done via API? Or use ob_start to capture the output?
  4. Get well soon Ryan.
  5. I really love your Theme but I don't know if it is right to use it because the Uikit version you use, is outdated. Right now there is a RC17 version. Also I think Ryan made some additions in the AdminThemeUikit, do you plan to be on par, if something changes or is added?
  6. I had the same request, and wanted to create a new Inputfield at first. But I think we could see this in a more general manner. It would be nice if we could have field prefixes and suffixes, and also can choose if they are displayed as icons or text. Uikit has some options at least for icons: The icons can even be clickable, you can read about it in the docs: https://getuikit.com/docs/form#form-and-icons I would love to see support for suffixes and prefixes for most inputfields in the core. Me and some other guys like @bernhard are also building applications in the backend and this would be a good addition. Maybe we should open a ticket on github?
  7. This is not intuitive. What does a red header mean? It could be anything. A timer that reads "Time until logout: 10 sec." would be the best from a UX perspective.
  8. @bernhard I would like to do this if someone comes up with a good name for this module *wink*
  9. Maybe you have some inspirations for a better blog title?
  10. Okay guys. This was very hard with much trial & error, but I finally got the solution (which is after all very simple). It is even worth an own blog post on my website: How to disable options in select elements that are already selected in another select element Here is a YouTube video of it in action
  11. Yes, thats true if you show all properties from the start. But this is not what I want, because then I have to show lots of fields. I want to keep the form small and simple, and so the user should only select the properties he wants, instead of seeing them all. My script for disabling the options of a select is mostly ready. Now it just needs to work with multiple InputfieldTables.
  12. Hey guys, thanks for your ideas, but actually none of them would handle my problem. I updated the first post, to clarify things a little bit more. @bernhard Functional fields serve a whole different purpose. HandsOnTable seems not to support a Page Reference field and even if so, it would not prevent a user from entering a property multiple times. @BitPoet Matrix fieldtype is nice but also has the problem of preventing a user from entering a property multiple times. @elabx The properties are defined this way. Seems it was a little bit hard to read, that I already use a page reference field, so I updated my first post. I have some other fields, that work similar to what you described. I display them as checkboxes. but the last checkbox requires the input of an additional information (Umgebungsgeräusche) in a textfield. So I could add an additional textfield for every checkbox, and show them conditionally if a checkbox is selected, but that would make it hundreds of them, and this is why I used ProFields: table for it. I really think the best way is to go with ProFields: Table and disable used options in the Page Reference field (Eigenschaft). I will post my solution here as soon as it's ready.
  13. I am looking for the best (or at least a good) way to assign multiple properties to a real world object (a room in my case). The number of properties should be random (because my customer can add as many properties as he wants), but each property should be assigned to the room only once. So right now I have a ProFields: Table with two fields: a page field for the property and another one for a description to the property (it is very important to have a description field for the property). The property (Eigenschaft) field is a page field (Page reference) which has a reference to pages which my customer can configure himself. It is displayed as an select input. Most of the time the users are working in the backend, as I am building a software and not a website with it. The problem is, that I can assign the same property multiple times. What would be the best way so I can select a property only once? Sure I could tell my customer that only the first appearabce of a property he used, would be saved, but a good UI also prevents users from doing so. It is always bad, if a user has to remember how to do things, because then it is not intuitive. So if he is allowed to use multiple properties more than once, what does he think, which value is going to be saved/used? How would I handle this on the server-side? Add a hook before Page::saveReady? Any help is appreciated. Solution: I developed a module Okay guys. This was very hard with much trial & error, but I finally got the solution (which is after all very simple). It is even worth an own blog post on my website: How to disable options in select elements that are already selected in another select element Here is a YouTube video of it in action
  14. Regarding transactions, please also take a look at the newest core addition in 3.0.114 which has a new method $database->supportsTransaction() https://github.com/processwire/processwire/commit/b4aec46a67f7521a0bb8933bf0fb48ae5b9c8303
  15. Please take a look about the new autoheight setting https://www.ag-grid.com/javascript-grid-width-and-height/#auto-height Here is an example where you can switch between a fixed height and autoheight: Example With autoheight enabled the vertical scrollbar appears, which might be a small bug in ag grid, but it doesn't bother me.
  16. @bernhard You should update ag grid to the latest version, as it brings numerous good improvements. See https://www.ag-grid.com/ag-grid-changelog/?fixVersion=18.0.0 and https://www.ag-grid.com/ag-grid-changelog/?fixVersion=19.0.0 I made a quick test with the new version and everything works well in my case. The name of the script has been changed to ag-grid-community.js
  17. I think that autoload order should be an extra setting instead of choosing between boolean|string|callable|int. Because of that you could choose to use a condition and also give it an order. For example, only execute the module in the backend or when a special user role is active, and then load it with high priority.
  18. Thanks for the update. RockGrid is getting better and better.
  19. As https://www.ag-grid.com/javascript-grid-row-styles/#row-class says, you need to modify the gridOptions.rowClassRules for this. Now I found out how to do this. In your javascript file do this: document.addEventListener('RockGridItemAfterInit', function (e) { if (e.target.id != 'RockGridItem_stats') return var grid = RockGrid.getGrid(e.target.id) // set style of all rows to color #cecece remember styles are bad, better use classes grid.gridOptions.rowStyle = {background: '#cecece'}; // this is untested. First is the class to be assigned and second is the condition grid.gridOptions.rowClassRules: { 'rag-green': 'data.age < 20', 'rag-amber': 'data.age >= 20 && data.age < 25', 'rag-red': 'data.age >= 25' } // you can use the grid api like this: // grid.api().sizeColumnsToFit(); //grid.api().setHeaderHeight(48); })
  20. Also I want to know how did you handle translations? For example translating the pager? There are instructions how to at https://www.ag-grid.com/javascript-grid-internationalisation/ but my general problem is understanding how to modify the gridOptions object.
  21. Hi @bernhard. I would like to change the styling/rendering of one or more header columns. For example I want to change the background color. How would I do that? I found this instruction from the aggrid site https://www.ag-grid.com/javascript-grid-header-rendering/ but how would I integrate this into RockGrid? Or is there an easy way to add a class to a specific header column? How do I disable a plugin/button? For example the Excel export button? Somewhere in your code I found document.addEventListener('RockGridButtons.beforeRender', function (e) { // Buttons entfernen if (e.target.id != 'RockGridItem_stats') return var grid = RockGrid.getGrid(e.target.id) var plugin = grid.plugins.buttons // remove a btton plugin.buttons.remove('refresh') }) which does not work. The the listener event is never fired. Also I found document.addEventListener('RockGridItemBeforeInit', function (e) { if (e.target.id != 'RockGridItem_stats') return var grid = RockGrid.getGrid(e.target.id) grid.disablePlugin('excel'); }) which also doesn't work.
  22. That is strange, because Textformatters are only active on the frontend and not in the backend (far as I know). I never experienced a real slowdown with this module active and in use. Maybe it has something to do with your database access, because the module caches the embed code in the database. The module also works with multilanguage fields, as I am using it for that purpose on https://p-jentschura.com
  23. I meant this without using a centralized (and included) version number. Just wanted to say that if either the fieldtype or inputfield should change, the version number should be updated in all of the modules accordingly, because I see them as a whole module package.
  24. @bernhard Du bist der Beste ? I will try to optimize my queries tomorrow based on your post. Also some more questions are coming up as I dive in further.
×
×
  • Create New...