-
Posts
5,714 -
Joined
-
Last visited
-
Days Won
269
Everything posted by bernhard
-
@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...
-
Could you maybe create a screencast of this issue and report it on github? ?
-
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...
-
Am I the only one preferring panels a LOT over modals? ?
-
Custom look for page reference field select, radio or checkbox etc
bernhard replied to sambadave's topic in General Support
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. -
FieldtypeHandsontable: Excel-like Inputfield
bernhard replied to bernhard's topic in Modules/Plugins
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: -
Adding image to Page via API $page->images->add() (SOLVED)
bernhard replied to EyeDentify's topic in Getting Started
Why don't you just install TracyDebugger and try it out? It makes so many things so easy: -
Adding image to Page via API $page->images->add() (SOLVED)
bernhard replied to EyeDentify's topic in Getting Started
As simple as that: -
Sorry, of course it should be %Y-m-d% see https://www.php.net/manual/en/function.date.php
-
There's also a nice roadmap of tabulator: https://trello.com/b/rPZ0Yavc/tabulator-roadmap Looking really nice so far!
-
I guess it should be %YYYY-MM-DD% as written in the field's notes?
-
FieldtypeHandsontable: Excel-like Inputfield
bernhard replied to bernhard's topic in Modules/Plugins
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? -
FieldtypeHandsontable: Excel-like Inputfield
bernhard replied to bernhard's topic in Modules/Plugins
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? -
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?
-
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); }
-
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!
- 1 reply
-
- 1
-
UnionFS for "parent" and "child" site profiles?
bernhard replied to Jonathan Lahijani's topic in Dev Talk
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. -
For me the most helpful is Intelephense:
-
Copy & Paste Repeater across different pages?
bernhard replied to bartelsmedia's topic in Wishlist & Roadmap
Also have a look here: -
Visualisation Module: Pre-Alpha (WIP)
bernhard replied to kongondo's topic in Module/Plugin Development
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, .... -
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.
-
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 ?
-
Enabled https for localhost, now I can't turn it off :(
bernhard replied to OrganizedFellow's topic in Dev Talk
That's what it does and why it is great ? -
Enabled https for localhost, now I can't turn it off :(
bernhard replied to OrganizedFellow's topic in Dev Talk
That's what it does. Nothing more, nothing less.