-
Posts
10,898 -
Joined
-
Last visited
-
Days Won
348
Everything posted by adrian
-
Hey @Robin S - it didn't, but now it does ? I have also implemented this for the User Bar Page Versions feature and the Template Path panel. These three things do almost the same thing, but for different users in different scenarios. I am going to PM you a copy of this new version to take a look at. I have some other things I am working on and I want to commit altogether.
-
There are many ways to do this. You could use the API to loop through pages found via a selector, or perhaps you could use the AdminActions module's Page Manipulator action, or if the pages are all under the one parent you could use the BatchChildEditor module.
-
New version fixes a few bugs in the last release, especially regarding the keyboard shortcuts on Windows. Along these lines, I have also changed the shortcuts for the History Stack - they are now ALT+PageUp and ALT+PageDown. This means there is no longer the need to use the meta key (CMD or WIN key) for this which was conflicting on some systems. If you're on a Macbook without PU and PD keys, just use: fn + ALT + PageUp/Down A big thanks to @Robin S for helping with all the Windows testing on this! I think this is really starting to work really nicely now - I almost want to use it over my code editor ? Anyway, please let me know if you find any issues.
-
Awesome - thank you!
- 79 replies
-
- breadcrumbs
- admin
-
(and 2 more)
Tagged with:
-
[SOLVED] Generate copy of Title Field (with content) for multiple pages?
adrian replied to j00st's topic in Getting Started
This basically does the same as kongondo's script, but has a nice GUI if you prefer. This is one the actions in the AdmimActions module.- 8 replies
-
- 4
-
- generate fields
- copy
-
(and 2 more)
Tagged with:
-
Yep, there must be more - just backspace until the ; is removed on each line and type it again - that will clear everything up.
-
@hollyvalero - you have a strange hidden character at the end of this line: $parent = wire('pages')->get("/assessments/"); that is causing the problem - just remove that and it will be fine. I would like to know what BCE was timing out for you and your own script isn't. Usually the easiest option is to up execution and php memory and these scripts will run until completed without any problems.* * yes I should probably build in some chunking to prevent the need to do this for large imports/exports, but I haven't gotten around to it yet ?
-
The new Console panel fullscreen mode now has keyboard shortcuts to collapse the code or results panes quickly. Here you can see me toggling all code, all results, and the split of both. Shortcuts are: CTRL+SHFT+ Up arrow - collapses code pane Down arrow - collapses results pane Left arrow - to restore split to what it was before you initiated any pane collapses. Hopefully you'll find this a really quick way to get to the view you need.
-
New version committed that adds a Maximize button to the Console panel as a whole which results in a fullscreen editing and review experience. Thanks to @tpr for his usual tweaks to my styling :) I also added the regular fullscreen/halfscreen buttons to the Dumps and Dumps Recorder panels. These buttons are on several panels where the content can be quite large - they should have been on these panels all the time really. Let me know if you have any issues with any of this - hopefully it should make things easier to work with.
-
Hey @bernhard - I like this, but I am thinking of maybe applying it to the entire results windows, rather than a specific dump result, so it would look like this. This way you would still have fullscreen, but it makes it easier to inspect the different dumps without needing to exit fullscreen and then initiate it on another dump. Does this seem ok to you?
-
[SOLVED] Bootstrapping PW gets Class 'WireUpload' not found
adrian replied to Xonox's topic in API & Templates
Probably a namespace issue - try new \ProcessWire\WireUpload -
One more update to handle when you're close to the end of the siblings. There might be a better way to do this - this was just what came to mind quickly ?
- 79 replies
-
- 1
-
- breadcrumbs
- admin
-
(and 2 more)
Tagged with:
-
Sorry, just updated above to make sure $start is not less than 0
- 79 replies
-
- breadcrumbs
- admin
-
(and 2 more)
Tagged with:
-
Just had another thought ? For pages with more than 25 siblings, I wonder if it would be worth putting the current page in the middle of the list of options, with 12 before and 12 after. At the moment, if the page being edited is beyond the first 25 it doesn't show in the list and so there is no way to access pages on either side of the current one. I think this is fairly efficient: public function ___getSiblings($page) { $numSiblings = $page->parent->numChildren(); $start = $numSiblings > 25 ? ($page->index - 12 > 0 ? $page->index - 12 : 0) : 0; while($numSiblings - $start < 25) $start--; $siblings = $page->siblings("start=$start, limit=25, include=all"); $siblings->filter("listable=1"); return $siblings; } Instead of this where you can't see page "27" in the list: you now get this with it right in the middle: You probably need to do some more testing to make sure there are no issues with sorting. Maybe the selector needs: sort=sort Did some testing here and it seems to be working great.
- 79 replies
-
- 4
-
- breadcrumbs
- admin
-
(and 2 more)
Tagged with:
-
Thanks @Robin S - new version looks great!
- 79 replies
-
- 1
-
- breadcrumbs
- admin
-
(and 2 more)
Tagged with:
-
@simonsays - not sure exactly what is going on, but I just noticed that with this module running it's sometimes possible to upload more than one image to a single image field in a repeater - I think this might be the cause of the issue. I just commented out line 160 of this module: $editedPage->of(false); and it seems to be behaving better but I am not sure of other ramifications just yet. Would you mind doing a quick test at your end though and let me know if that solves things please? Be sure to return the image field to automatic and any other things you may have tweaked.
-
It should be pretty simple to figure out - if you're using jquery, then the only reason I think it wouldn't work is if you're not bootstrapping PW in the called php file. Anyway, good luck getting it sorted out.
-
Not really an answer to your question, but perhaps this module does what you need already: It doesn't currently support repeater fields, but might be worth using this as a base and extending it to support repeaters. There are lots of other posts that describe how to populate repeaters. https://www.google.com/search?q=site%3Aprocesswire.com%2Ftalk%2F repeaters api
-
It can be handled by the new stuff I set up recently. Have a read here: It allows you to set Tracy settings in config.php or config-dev.php (so it's local only). I think this is probably the best solution. Let me know how you find it and if you have any suggestions for improvements. PS - there is some further discussion about the instigation of this feature starting around here: https://processwire.com/talk/topic/5693-new-module-type-wiremail/?do=findComment&comment=172371
-
I am testing this on localhost. Actually, I think the issue is probably the contents of the php file (in my example /data/testajax.php) that is being called via ajax. I forgot to provide that to you. It needs to bootstrap PW so that Tracy is also loaded, eg: <?php include '../index.php'; Hopefully if you do that, it should work as expected.
-
Can you try this simple example in your template file: <script src="//code.jquery.com/jquery-2.1.1.min.js"></script> <script> $( document ).ready(function() { $("#ajaxButton").click(function(e) { e.preventDefault(); $.ajax({ type: "POST", url: "/data/testajax.php?test=1", data: { id: $(this).val() }, success: function(result) { console.log('ok'); }, error: function(result) { console.log('error'); } }); }); }); </script> <input id="ajaxButton" type="submit" name="testAjax" value="Test Ajax" /> This is how it looks for me:
-
Are you using a JS framework? You need to make sure the X-Requested-With header is sent so that PHP (and therefore Tracy) can recognize it as an AJAX call. jQuery does this by default, but other frameworks may not, eg Angular. In pure/vanilla JS, you can do: xmlhttp.setRequestHeader("X-Requested-With", "XMLHttpRequest"); In Angular you can do: $http.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";
-
The AJAX bar displays automatically when there has been an AJAX request - you can see this behavior when viewing the Page Tree in the PW admin, or triggering sub items from any of the admin menus, or any AJAX calls you make on the frontend. You should also see "Redirect" bars when there has been a redirect call. Do you not see any of these?
-
Sure - just check out the RequestInfo panel on the AJAX bar and open up the Input POST section. Does that get you what you want?
-
Hey @Robin S - any reason why the find siblings method doesn't use "include=all" ? I am assuming it was just an oversight, but it would be nice to have please. Thanks!
- 79 replies
-
- 1
-
- breadcrumbs
- admin
-
(and 2 more)
Tagged with: