Jump to content

bernhard

Members
  • Posts

    5,714
  • Joined

  • Last visited

  • Days Won

    269

Everything posted by bernhard

  1. @Robin S there are lots of modal libraries, but the only reliable that I've found for including admin pages (iframes, html content, videos etc) in a modal is http://fancyapps.com/fancybox/3/ (and maybe magnific popup). What I've not found is a library that makes it easy to create panels just like the pw admin does. Where one can simply add class="pw-panel" and it loads in an iframe, sliding in from left or right, being resizable, hideable, reloadable etc...
  2. Could you maybe create a screencast of this issue and report it on github? ?
  3. It might be a good idea to tell us more about your goal ? Maybe there is a better solution to what you are trying to achieve with an additional field populated after the page is added from the page field... If I understand you correctly, you have a template "dog" with two page fields, one for "father" and one for "mother", right? So maybe you don't even need to populate this field, because you could just use another query. Or you could just use a saveReady hook, that set's the sex of the father to male and sex of the mother to female whenever the child dog is saved...
  4. Am I the only one preferring panels a LOT over modals? ?
  5. Hi @sambadave, if the available solutions do not fit, you can modify the markup of any field as you want quite easily. One option is the Inputfield::render hook. First, start with a general hook to check if everything works: // /site/ready.php $wire->addHookAfter("Inputfield::render", function(HookEvent $event) { bd('fired'); }); You should get lots of dumps when opening your page (using TracyDebugger of course): Make it conditional to only fire for your field and change the class to InputfieldSelect to be more specific: $wire->addHookAfter("InputfieldSelect(name=availability)::render", function(HookEvent $event) { bd('fired'); }); It will fire only once: The HTML is in the "return" property of the $event: $wire->addHookAfter("InputfieldSelect(name=availability)::render", function(HookEvent $event) { bdb($event->return); }); You can then modify this html like this: $wire->addHookAfter("InputfieldSelect(name=availability)::render", function(HookEvent $event) { $html = $event->return; $html = str_replace("value='1'", "value='1' style='background: red; color: white;'", $html); $html = str_replace("value='2'", "value='2' style='background: blue; color: white;'", $html); $html = str_replace("value='3'", "value='3' style='background: green; color: white;'", $html); $event->return = $html; }); For more complex modifications it's better to hook the field before it get's rendered (search the forum via google for ProcessPageEdit::buildForm). You can also see https://github.com/BernhardBaumrock/TemplatePreviewImages for a simple example of modifying inputfields and applying an additional library.
  6. v0.0.9 adds support for dynamic rowHeaders. Previously they had to be manually defined via JavaScript. Now they can be defined by user input:
  7. Why don't you just install TracyDebugger and try it out? It makes so many things so easy:
  8. Sorry, of course it should be %Y-m-d% see https://www.php.net/manual/en/function.date.php
  9. There's also a nice roadmap of tabulator: https://trello.com/b/rPZ0Yavc/tabulator-roadmap Looking really nice so far!
  10. I guess it should be %YYYY-MM-DD% as written in the field's notes?
  11. I've also found this site but didn't find anything that attracted me... I think it might make sense to rebuild RockGrid to RockTabulator and use http://tabulator.info/docs/4.0/clipboard instead of Handsontable... Any thoughts?
  12. The folks at Handsontable have just released a new version 7.0.0: https://handsontable.com/blog/articles/2019/3/handsontable-7.0.0-is-here Unfortunately a single dev licence is 790$ so we either have to stay at 6.2.2 or watch out for another library... Does anyone of you know a proper alternative?
  13. Hey @Beluga, thanks for your fork! You are right about that, but actually recently I was thinking of doing a rewrite of RockGrid anyhow. So tabulator might be a good thing to try! It looks great both from the features and from the documentation. RockGrid got a little messy in both areas, so a rewrite could make a lot of sense. Though I have some applications relying on RockGrid, so I can't drop aggrid for tabulator. Would anybody of you guys would be willing to work on RockTabulator as a community/team project?
  14. Just added support for tippy.js to show nice tooltips with additional information. For example here I needed to show all available invoices related to one project of one month and I don't want different line heights, so I show the links on hover: Using tippy.js col = grid.getColDef('ids'); col.headerName = 'Rechnung'; col.cellRenderer = function(params) { if(!params.value) return ''; var ids = params.data.ids.split(','); var out = 'IDs: ' + ids.join(', '); var tippy = 'One per line:<br>' + ids.join('<br>'); return RockGrid.tippy(out, tippy); }
  15. Hi JavaScript experts! I wanted to use tippy.js ( https://github.com/atomiks/tippyjs ) for RockGrid but I don't know how to load the necessary files. I got it to work with the default theme by injecting the CDN files, but I need to add the light-border theme and that's not part of the CDN files from the docs. Can anybody please help me - I don't know how all this NPM YARN stuff works and how to get the right files in the right place and which files to add to my $config->scripts and $config->styles in the admin. Thank you!
  16. Which CSS Framework are you going to use? I've built a FrontendThemeUikit module last November and used it for two sites, but it's nothing releasable yet. If you are interested I can share my work with you. The concept is similar to what Robin posted above. https://screencast-o-matic.com/watch/cFXnX1Y72l The goal would be to have one master theme that does all the tedious tasks (rendering menus, injecting styles and scripts, do the basic setup with markup regions) and have a second theme only for customisations.
  17. Hi @ce90 and welcome to the forum! I'd be happy to hear more about your setup to get a better context ?
  18. Yeah, it could for sure. Though I'd prefer seeing support for queries like RockFinder does in the core. It works, but it has some flaws and I think it could be done a lot better. Making it possible to query the PW data via SQL in an easy way should not be the task of a 3rd party module. It can be helpful in so many scenarios... Grids, REST apis, Charts, ....
  19. The docs are far from complete. For page reference fields you might have a look at https://github.com/BernhardBaumrock/RockFinder/blob/master/readme.md#joins Joins are great, because you can split the queries into easy finders, see how it works and then join everything together in one result. Complex fields like page reference fields or repeaters might mess up some queries or might need some extra work on the module.
  20. Hi @kongondo, it is language aware in general, yes. There might be some special cases though like repeater fields, where some additional tweaks would be necessary. I've updated the docs with some words about that: https://github.com/BernhardBaumrock/RockFinder/blob/master/readme.md#multilanguage Hope that helps. Easy finders should just be fine and you can always use RockFinder as a start and join custom SQL as you need ?
×
×
  • Create New...