Leaderboard
Popular Content
Showing content with the highest reputation on 04/01/2019 in all areas
-
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); }3 points
-
I am willing to work on it ? I was just about to come back to this as I recently completed a couple of unrelated website rebuilds. I also want to resume my JavaScript studies (halfway through Eloquent JS at the moment). I haven't ran into any downsides or lacking features yet, but the issue tracker might be an enlightening place in that regard.2 points
-
Since the icons seem to be used globally and everywhere, its probably best to go through something global to distribute it. I'd probably go through $config: $config->icons = Collection::fromPath('path/to/svg/files'); So you're able to access it everywhere from $config->icons or wire('config')->icons inside a class.2 points
-
Hi, Have a look at your menus settings, specifically the 'Use enable/disable menu items feature'. This requires the permission 'menu-builder-disable-items'. When enabled, you will see under each menu item's settings panel, a checkbox 'Disabled'. Tick that for the menu items you wish to disable and voila; no need to delete them. However, if you do not wish the user to be going to these settings, enabling and disabling menu items, you can instead use getMenuItems() and filter out unpublished and hidden pages. If you can open an issue in the project repo, I can consider to add these as options i.e. 'skip_unpublished' and 'skip_hidden'. I can't remember of the top of my head how ProcessWire page->viewable() relates to hidden and unpublished pages. We already check for viewable() in menu builder but I'd have to investigate this further.2 points
-
Pinging the grid heads: @bernhard @jmartsch @mel47 @dragan @szabesz In short, I have modified RockGrid to work with Tabulator instead of ag-Grid. I left out ajax and plugins for now. I fully understand, if Bernhard is not interested in switching the "engine" of RockGrid, but at least it is food for thought and a proven alternate solution ? The "HackGrid" can be found here: https://github.com/mestaritonttu/FieldtypeRockGrid/tree/tabulator Longer story: During the last week of November I ran into Tabulator by accident. It occurred to me "someone in the early days of RockGrid suggested some other solution". I searched the PW forums and found out that someone was szabesz and the solution was Tabulator! Now, the important thing here is that since the PW forum discussion (April 2018), Tabulator has seen significant changes. It got rid of jQuery & jQuery UI dependencies and added a ton of features. Why have I decided to switch to Tabulator? Lately ag-Grid has left a bad taste in my mouth - the performance of its row autoheight sucks, so I had to work around it - inside the autoheight workaround I had to add another workaround to avoid an infinite event triggering/listening loop - the closed nature is showing its bad sides more and more, like not being able to see the content in their enterprise bug tracker So what do we get with Tabulator? - row autoheight that just works - dropdown filter out of the box, so I don't need my awkward external filter - features matching the enterprise version of ag-Grid, such as http://tabulator.info/docs/4.1/select#setup-range http://tabulator.info/docs/4.1/group http://tabulator.info/docs/4.1/download#xlsx http://tabulator.info/docs/4.1/tree http://tabulator.info/examples/4.1#nested-tables http://tabulator.info/docs/4.1/clipboard What are the philosophical differences? In the words of the Tabulator main dev, ag-Grid focuses on being a fully functional spreadsheet while Tabulator goes more down the route of interactive table. I would have announced this already nearly 3 weeks ago, but caught pneumonia ? Use on the RockGrid side is really not much different. Mostly just using col.title instead of col.headerName. For some reason the grid.js stuff is lost (to get the field titles), but I did not have time to investigate.1 point
-
https://jspreadsheets.com/ lead me to this: jQuery.sheet/WickedGrid > https://spreadsheets.github.io/WickedGrid/ but I am not sure it is still in development...1 point
-
While there are many ways of installing Sublime Text on Linux, here is my favorite. cd ~/Downloads/ wget https://download.sublimetext.com/sublime_text_3_build_3200_x64.tar.bz2 tar xvjf sublime_text_3_build_3200_x64.tar.bz2 sudo mv sublime_text_3/ /opt/ sudo ln -s /opt/sublime_text_3/sublime_text /usr/local/bin/sublime sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/sublime 90 By the way: build_3200 is the latest version as of today. I just installed it myself and then went into VSCode and installed the extension Sublime Text Keymap and Settings Importer . I've used Sublime for years and just started VSCode. It is slow loading on this tiny Acer Chromebook (runs Debian + XFCE). If your 'low end touch device' runs slowly on Solus, it's most likely due to the visuals in KDE, GNOME or Mate desktop. I might suggest Debian with OpenBox. It is insanely minimal and super fast. I don't run it because of lacking support on this model.1 point
-
Late to the party, but this looks really good at first sight. I recommended Ag-Grid to @bernhard back in the day, because imho it is much more powerful and at the same time easier to customize than the jQuery Datatables plugin he was using at the time (https://datatables.net/). Now (again at first sight, I didn't deep-dive into Tabulator) this looks on a par with Ag Grid, feature-wise and easy-of-use-wise. A big plus I see is that it's completely MIT-licensed and there aren't any features hidden behind an enterprise licensing model. Have you come across any downsides when working with Tabular or any essential features that it lacks?1 point
-
Thanks @Autofahrn, adding it to $config worked perfectly!1 point
-
Hi! I've had a problem with uploading PNG files into Image field. I've had an error: Error: Uncaught Error: Call to undefined function ProcessWire\utf8_encode() in /var/www/domain.com/public_html/wire/core/PWPNG.php:117 Stack trace: #0 /var/www/dksb.turala.com/public_html/wire/core/PWPNG.php(31): ProcessWire\PWPNG->_parsepngstream(Resource id #155, 'image.260x...') #1 /var/www/dksb.turala.com/public_html/wire/core/ImageInspector.php(203): ProcessWire\PWPNG->loadFile('/var/www/domain...') #2 /var/www/dksb.turala.com/public_html/wire/core/ImageInspector.php(129): ProcessWire\ImageInspector->loadImageInfoPng() #3 /var/www/dksb.turala.com/public_html/wire/core/ImageSizer.php(102): ProcessWire\ImageInspector->inspect('/var/www/domain...', true) #4 /var/www/dksb.turala.com/public_html/wire/core/Pageimage.php(479): ProcessWire\ImageSizer->__construct('/var/www/domain...', Array) #5 /var/www/dksb.turala.com/public_html/wire/core/Pageimage.php(346): ProcessWire\Pageimage->___size(260, 0, Array) #6 /var/www/dksb.turala.com/public_html/wire/core/Pageimage.php(632): ProcessWire\Pageimage->size(260, 0, (line 117 of /var/www/dksb.turala.com/public_html/wire/core/PWPNG.php) In this case I've had to install PHP-XML library for PHP-FPM deamon. On CentOS 7 it's: yum install php-xml And after that I've had to restart PHP-FPM deamon: systemctl restart php-fpm I hope this solution will help others with the same problem.1 point
-
Just had a similar problem after switching from PHP5.x to a PHP7.1.x system. Fatal error in admin (line 117 of /wire/core/PWPNG.php) while rebuilding a PNG thumbnail. Obviously, utf8_encode() is not necessarily part of core PHP functions (anymore). I fixed the problem by asking my server admin to install the missing PHP XML module. Though, I wonder if it would be a worth the effort to avoid use of utf8_encode() in the PW core altogether? It seems to be used rarely - I found two places only in V3.0.123. Would iconv() do the job?1 point
-
3rd choice: sorry, I was on mobile and I miscread page 3 to choice 3 ? I guess you could use OR groups here: https://processwire.com/docs/selectors/#or-groups1 point
-
I don't have much to add to previous feedback posted already here, except that delivering a suitable (physical) image variation is good practise. It impacts page speed performance and also affects mobile SEO ranking: https://webmasters.googleblog.com/2018/01/using-page-speed-in-mobile-search.html Even in 2019, not everyone has ultra high-speed internet access everywhere and all the time.1 point
-
If you don't create any variations on the front-end using size, width, etc. calls, ProcessWire won't create anything except for the variations created by default for admin (preview) purposes. Third party modules may still create their own variations, but if you're strictly against that behaviour, you can always avoid using any modules that do this ? What you're probably missing here is the amount of data: sure, browsers can handle resizing images, but if you're considering load times and amount of data users have to download to use your site, you absolutely want to resize images before they hit the visitors' browsers. When you're asking if this behaviour should be disabled to "reduce additional http requests (if the user resizes viewport)", it kind of sounds like you've implemented srcset on your site – otherwise there shouldn't be a additional requests when the viewport is resized due to images. Even then if you start with a larger viewport and then resize it to smaller size, browser shouldn't load the smaller sizes. Only case generating additional requests is when you go the other way, from small to large – otherwise tiny images would likely look pretty awful scaled to a larger size. Short answer is: no, it shouldn't be disabled. That being said, you don't have to create any additional variations if you don't want to – but be considerate of the user and don't make them download more data than they actually need ?1 point
-
Thanks, @dragan, somehow expected a shorter answer like: The switch takes the first case matching the evaluated value... ? ...and: don't use goto... [ducking away] ?1 point
-
Relative to the last dev branch version (3.0.127) version 3.0.128 contains 40 commits, mostly specific to resolving older GitHub issue reports. If you are interested, here is the commit log: https://github.com/processwire/processwire/commits/dev — version 3.0.128 covers commits between March 2nd and today. We're down to about 77 remaining issue reports, mostly older stuff that didn't get covered in the past for one reason or another, but we're making good progress. Similar updates will be continuing next week, and I've also got several ProMailer updates coming out next week too. Hope you all have a great weekend!1 point
-
Maybe I don't understand your problem correctly, but if you don't want to use a package manager, can't you just inject the css file for the theme directly as well? There's a CDN link on the themes page: https://unpkg.com/tippy.js@4/themes/light-border.css If you want to bundle all those files into a single dependency, I recommend Parcel, it's much simpler than webpack and you basically need no configuration for a basic compilation of JS/CSS dependencies into bundle files. I have just tried it out for a project I'm working on; this NPM script is all the config I needed: parcel build js/main.js --target browser --out-dir public/site/js --out-file bundle This will parse all code/imports in the main.js file and bundle them into a bundle.js file. It will also create a bundle.css file if you import any css.1 point
-
Another way via a hook in /site/ready.php: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { // Only for main "Find" lister if($event->wire('page')->name !== 'lister') return; $lister = $event->object; $lister->allowSystem = true; }); This (and @adrian's suggestion) will only work for superusers because non-superusers are not allowed to view user pages.1 point
-
1 point
-
The following seems to work: In $defaults (below line 46) add 'template' => '', Below line 265 (now 266) add $template = !empty($settings['template']) ? $this->templates->get($settings['template']) : null; $template_id = $template ? '&template_id=' . $template->id : ''; Amend line 267 (now 270) to $editUrl = $this->wire('config')->urls->admin . 'page/add/?parent_id=' . $parent . $lang . $fields . $template_id;1 point
-
All this issue is still muddy (as ususal....): https://www.i-programmer.info/news/81-web-general/12643-eu-copyright-directive-approved.html "This has been picked up by Florian Mueller on his Foss Patents site. In a post with the title, Even after today's EU Parliament vote, we can still kill Article 13 through pressure on German government to prevent formal adoption by EU Council,..." also: "As we've previously pointed out these concessions are very much open to interpretation leading to uncertainly that will undermine the Internet."1 point
-
It is worth noting that in the music industry only the most popular artists gain money (and a lot), anyone else is left in the dust as no one cares when their creative work is "stolen". Probably the same mechanism will be put in practice in this case too. Copyright fee on blank CDs, tapes and such? These guys work hard to rip us off.1 point
-
@ryan Right now the view that shows translation files "Setup > Languages > German" is not very intuitive and confuses users and translators, because they are confronted with cryptic names (Textdomains) instead of clear to read names. How can we make it better? Add clear to read labels like the module name from modules and the filename without the path from other files (.php). The path information has to be more subtle, as it is not that important for most users Take a look at the first two entries compared to the lower two. This can be done very quickly by adding some styles. Either flexbox or floats would do the job. Here is what I did (just quick and dirty and not the best way) Changed order of the file path to last. Added CSS to InputfieldFileLanguageFilename description: <span class="InputfieldFileLanguageFilename description" style=" position: absolute; right: 0; padding-right: 10px; font-size: 13px; color: #ccc; ">/site/templates/main.php</span> What you think of that?1 point