Jump to content

tpr

Members
  • Posts

    2,321
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by tpr

  1. Does that mean a title equals Kitchen and Laundry at the same time? How would that be possible?
  2. It works with asmSelect type only (atm). Install AdminOnSteroids module, enable AsmTweaks at the top, then scroll down to its config section (or click the "cog" icon in the AsmTweaks block's bottom-right corner to jump there). Here check "Add limit to AsmSelect" and save AOS. Finally, in your field's Input tab set the max number in the "Max limit of items" input field . https://github.com/rolandtoth/AdminOnSteroids/wiki/AsmTweaks
  3. I've been searching for a CSS-only solution for a while to reveal a scroll-to-top link only after scrolling down the page, but no luck. Today I figured out that it's possible with position: sticky. The beauty of this is that you don't need to check the scroll position in a scroll event (+ in document ready, window resize), which makes it really lightweight. Update: added "html { scroll-behavior: smooth; }" and now there's animated scroll (Firefox 58+, Chrome 63+). It seems that Js is not required anymore to this feature. CodePen demo
  4. Yepp, the border is a bit thick now. I'm fine with v4 if you think panels doesn't merge too much with the rest of the site. One thing though: the icon positions need to be adjusted (before the title and the window/close icons too) + the newly added rollup state needs adjustments too.
  5. Not sure about adding to AOS, there is already ctrl+s there which is available every part of the screen As for the JS part of the code, I see that too much is happening on a scroll event (cloning, adding events, appending to dom). This may cause unnecssary cpu hickups so I would recommend solving it other ways. I would either clone the buttons on page load (outside the scroll event), or toggle a class on the body and position the buttons with CSS. As for the scroll event I would sure add debounce. And perhaps I would use localStorage instead cookies, and save it only on window.unload (or beforeunload) event only.
  6. Thanks, works fine here. The 47px vs 39px issue may come from a box-sizing border-box/content-box issue, perhaps my frontend CSS was interfering somehow. If so, .tracy-panels should get box-sizing: border-box in Tracy. Sticky table headers are working fine too, thanks. What do you think about making the panel headers a bit smaller? I feel they are a bit too large, a slightly slower font and less padding wouldn't hurt imho.
  7. Of course several unforseen issues came up but most of them are fixed: closing a rolled-up panel and re-activating it from the debug bar opened it in the rolled-up state. To fix, on closing a rolled-up panel "tracy-mode-rollup" class is removed so it opens up in normal state. setting width-height were tricky here and there but seems to be OK now with all the panels I've tried (Chrome only though). "ProcessWire Logs" panel has a link in h1, I've added pointer-events: none in rolled-up state to prevent accidental click on move resized panels were loaded cropped after page reload (if they were rolled up before reload). I've fixed it with a "beforeunload" event to allow Tracy save positions correctly keeping state after page reload: would be nice to have but I think this would be better handled in the core (Nette Tracy) Changes: style.css Lines at the bottom + added "user-select: none" on line 111 for h1 TracyDebugger.module Lines 823-867 - I haven't found a better place to add the JS part, I thought there's a js file that the module always loads but apparently there isn't. tracy-rollup.zip
  8. That Field Values panel is huge I guess it's available for a while but I haven't seen it (probably along with many others) Here is a small tweak that could make such large tables easier to read - sticky table headers: .tracy-panel th { position: sticky; top: -13px; } The value -13px is probably a margin issue, and the inverted TH colors are there for better separation. Of course these sticky headers could be enabled separately for the different panels but I think they won't do any harm when applied globally but maybe I'm wrong. And Now for Something Completely Different Rollup panel on double-click on their titles: This is only quick devtools implementation but if you're interested I can roll down a better one
  9. I wouldn't bother with that neither. Perhaps you could set up a js loader (eg. Require.js) that would load all the js files but I think that's also unnecessary.
  10. I guess there's nothing more in the logs that you already wrote. Was it a ML site btw, and if yes, how any languages? Php version?
  11. No problems here on PW 3.97 and 3.98, AOS 1.8.9 and 1.9.0. There was a related PHP warning that was fixed in AOS 1.8.7 but that's below your version. Did you get that error right after saving AOS or happened elsewhere?
  12. I see, forgot about that config setting in Tracy. Setting z-index: 1 for #tracy-debug looks like fixing the issue for the sticky header vs menus in Uikit theme, but I guess that would still spoil the Tracy config setting. Edit: I've removed the #tracy-debug z-index rule, I think the safest is keeping the navbar above all.
  13. Thanks, these should be fixed in v1.9.0. @adrian Tracy panels are under one #tracy-debug div so I've added a high z-index to it - I guess nothing needs to be above them. This fix has been there for the individual panels for the Reno theme already though I'm not sure if it was effective. Now it seems to be OK in all the major admin themes.
  14. My guess is that you would need to supply full absolute paths instead relative ones.
  15. If nothing else helps you can get it from the first url segment I guess.
  16. There are two new macros in v058: ifstatus and ifloggedin. The former allows checking page status easily and it's quite powerful: {ifstatus $servicesPage, array('!hidden', '!locked')} <p>The services page is not hidden nor locked.</p> {else} <p>The services page is locked or hidden.</p> {/ifstatus} ($servicesPage is a Page object but it would work with only supplying its ID) Sometimes I need such checks but it was inconvenient to do such checks in the view file, eg like this: {if !$servicesPage->is(\ProcessWire\Page::statusUnpublished)} Macro ifloggedin doesn't need too much explanation I guess
  17. Sorry @Mike Rockett I completely missed your post. Was your goal to use another syntax instead of "{}"? If so, latte supports syntax switching but I guess you already know that: https://latte.nette.org/en/macros#toc-syntax-switching So you can simply add this: <script n:syntax="double"> var obj = {var: 123}; </script> Their docs says there are "asp", "python" syntaxes but those were removed long ago (just found out myself too though I've noticed it earlier that didn't work). However there's a trick: leave spaces between the delimiters and you're good to go. So in Vue use "{{ myVar|myFilter }}".
  18. Everything looks fine to me in v1.8.9, thanks everyone for the help. It was new to me that template level sort order takes only the parent page into account, I thought the child pages' templates are also involved somehow.
  19. Are you sure that the template level sort order is taken from the parent page, and not from children pages? That would make things easier, I'll check tomorrow.
  20. That wouldn't solve the template level sort issue when having pages with multiple templates under the same parent. I'm sure the answer lies somewhere in the core but I will leave it there for a while ?
  21. Actually @adrian's idea works better, even with template-level sort order too, but only if children are of the same template, or their template sort settings are identical.
  22. That would probably work too, will check both later, thanks. Btw "sort" could have been empty before todays update so this I guess would not worked (not sure if sort="-" is valid).
  23. Extend the list with those characters here: /module/edit?name=InputfieldPageName
  24. Sure, thanks for the help. I've managed to get the first children by using $parent->find('...., limit=1')->first(), so that it doesn't load all pages. For the last child I plan to use $parent->find('..., start=$numSiblings-1, limit=1')->first() which should not load all pages (haven't had the chance to try yet). I think these will be fine but if you know a simpler approach, please tell.
  25. Use only one translation per line.
×
×
  • Create New...