rolandtoth / adminonsteroids Goto Github PK
View Code? Open in Web Editor NEWVarious ProcessWire admin tweaks to boost productivity.
Home Page: https://processwire.com/talk/topic/13389-adminonsteroids/
License: GNU General Public License v2.0
Various ProcessWire admin tweaks to boost productivity.
Home Page: https://processwire.com/talk/topic/13389-adminonsteroids/
License: GNU General Public License v2.0
Just curious, when trying the CodeMirror plugin, does lineWrapping work for you?
Also do you notice how the closing paragraph tags wrap to another line. It doesn't show that way when using the Ckeditor view source.
Is there any way to make the source view dialog bigger/resizable? Maybe use 90% instead of 800px? Looks like it is defined in AdminOnSteroids/CKE/plugins/codemirror/plugin.js:67
Hey @rolandtoth,
What do you think about adding a "Copy" button to copy the field name in the field's tooltip?
The "Copy" button would copy the field name to clipboard for quick and easy pasting into templates.
Maybe you could use something like https://clipboardjs.com/ to help with the javascript.
Here is how Github does it https://github.com/blog/1365-a-more-transparent-clipboard-button.
There may be even more use cases that could use a copy button, but that is the first to come to mind. Maybe to also copy template names, roles, or permissions?
AdminOnSteroids/AdminOnSteroids.module
Line 706 in 88c884e
I noticed the new configs for CKEditor work on the backend but not the frontend in place editor.
Is there a way to control the frontend in place CKeditor as well?
I think it would be handy to always be able to open the Page Tree Panel from any page with a keyboard shortcut like Alt + O similar to how AOS has a shortcut to focus the search with Alt + D.
What do you think?
Continue from
processwire/processwire-requests#83 (comment)
@BitPoet
I've added your snippet but there's a minor issue. If it's disabled in AOS, the config option is still active in fields where the user has previously checked it. Probably it's not a big deal because one would set it once in AOS and then check/uncheck in individual fields, but still I think this can cause confusion.
Plus while it's a nice solution I think one would probably set this option globally on/off. I can't think of a situation where one would prefer disabling truncation in one field and allow in others. So I think AOS should provide a global toggle checkbox to turn truncation on/off:
$this->addHookBefore("InputfieldFile::render", $this, "disableFilenameTruncate");
public function disableFilenameTruncate(HookEvent $event) {
// do not mess with Image or other fields
if ($event->object->class !== 'FieldtypeFile') return;
$event->object->noShortName = 1;
}
The delete button is positioned right after the filename because the markup didn't allow other solution:
http://rolandtoth.hu/pic/aos-notruncate.png
It might also be helpful to add the filter boxes to the permissions when editing a role like admin/access/roles/edit/?id=38 and viewing the permissions list at admin/access/permissions/
Hi @rolandtoth,
in a site where I have customized page tree labels, the AOS adds multiple times the page id.
I changed one line in the module to bound it only to the span tag with class label_title.
$markup = str_replace("<span class='label_title'", "<span class='label_title' data-pid=" . $page->id . ' ', $markup);
Here's another idea.
I'm not sure if this is possible, but It would be nice if users could somehow customize the text/markup of the admin theme's search autocomplete results similar to how you did with customizing the page tree labels with "Allow markup tokens for "List of fields to display" in PageListTweaks.
That way people could include images, icons, page ids, or whatever in their autocomplete search results.
That could be also be helpful for those who are using the "image as a page" techniques. If you aren't familiar with the "Image as a page" technique, It is where you store only 1 image per page along with fields for that image's meta data like image attribution, image tags, etc... That technique is used when people want an image library to reuse already uploaded images.
When performing an autocomplete search for an image they could see their image thumbnail and that image's page title in the autocomplete search results.
In the Drupal world this reminds me of https://www.drupal.org/project/finder and https://www.drupal.org/project/search_autocomplete modules
Here is what a customized autocomplete could look like with images in the autocomplete search results.
Nothing happens, when it should focus the search input.
Hi Roland,
I think you might have missed commenting out line 1070 in AdminOnSteroids.module
https://github.com/rolandtoth/AdminOnSteroids/blob/master/AdminOnSteroids.module#L1070
What do you think about adding a hotkey to focus the search input while in the admin?
I come from a Drupal background where I'm used to using Alt+d which triggers the https://www.drupal.org/project/coffee module to search.
Just noticed when I hit alt+d when using the Reno it focuses the search input but doesn't show the input on the screen.
Hi tpr,
Just wanted to let you know that I tried the new move functionality in the page tree, but I seem to be having trouble moving a page directly under Home.
Do you experience this?
Also to get it to work I had to download the file from https://processwire.com/talk/applications/core/interface/file/attachment.php?id=8731 and rename it from ProcessPageList.js to ProcessPageList.min.js before it would start working. You may want to include that in your instructions in the forum or on the module's readme.txt if you want more testers.
Hope that helps
The Ctrl/Cmd + S hotkey works(it saves the page), but it doesn't show the overlay with the animation.
Hi tpr,
I just noticed the AOS Autosize Textareas options doesn't appear to be doing anything. I'm running the latest version 3.0.33 and the AOS commit if that helps.
I using CKeditor that comes with core Processwire.
Do I need to configure the text area field in a certain way to get this to work?
Hi @rolandtoth,
I'm not sure how it is done, but It would be cool if you included the ability to right click some text and choose "Link" in the CKEditor. I can't believe this isn't enabled by default in CKEditor. I guess it would need to pop up the Processwire Link Dialog instead of the native CKEditor Link Dialog?
The closest I could find is from https://www.drupal.org/project/ckeditor_context_link. I haven't tried it, but maybe this code would help http://cgit.drupalcode.org/ckeditor_context_link/tree/plugins/ckeditor_context_link/plugin.js?
Another good plugin to add might be http://ckeditor.com/addon/autolink to automatically hyperlink urls when pasted into textareas?
Just some thoughts... No worries, if you don't think it is a good idea.
Just wanted to report this...
I think this commit broke the sticky header from working on the default admin theme:
0db7c4c
The header no longer sticks.
Here are my html classes:
<html class="aos AdminThemeDefault headSticky HoverDropdown moduleModal" lang="en">
I think it might be because line 2451 in AdminOnSteroids.scss is nested under:
html.AdminThemeDefault { line 2433
body:not(.modal) { line 2435
&.headSticky:not(.modal) { line 2451
I think the sticky styles never apply because it is nested under the body. The .headSticky class is part of the html element which is above the body element.
Hope that helps..Let me know if you need any more information.
What do you think about adding a filter box to admin/module/?
Someone can just start typing the name of the module and it would filter the results.
Similar to https://github.com/rolandtoth/AdminOnSteroids#filefieldtweaks filter box.
I get an array to string conversion notice:
PHP Notice: Array to string conversion in ...\modules\AdminOnSteroids\AdminOnSteroids.module:1372
Dumping variable $url I get:
in ...\modules\AdminOnSteroids\AdminOnSteroids.module:1372 array (1)
0 => 0
AOS v0.8.1
I originally posted this issue at processwire/processwire-issues but have since traced it back to AdminOnSteroids. I can reproduce it on a clean PW 3.0.51 installation with no other modules installed besides AOS.
It's not clear to me how AOS could be causing this, and the issue occurs despite all submodules being disabled, and even when AOS is toggled to disabled using the footer button.
Non-superuser roles cannot upload images to an image field inside a Repeater (upload occurs but then thumbnail disappears and image is not retained on save).
Also, non-superuser roles cannot open a nested Repeater item inside a Repeater (endless spinner), and cannot create a new nested Repeater item inside a Repeater (clicking "Add New" has no effect).
If the Repeater system template is edited and the role is explicitly given access then the role may use the Repeater as expected.
Image and Repeater fields inside a Repeater should be accessible to roles that have edit access to the page the Repeater is on.
Note that if the Repeater system template is edited and the editor role is explicitly given access then the role may use the Repeater as expected. However, once this has been done the access issue cannot be reproduced even after reverting to the "No" option for "Do you want to manage view and edit access for pages using this template?". It's as if changing these settings once is enough to trigger the expected role access that should happen in the first place.
The JS error that comes with the endless spinner and failing "Add New" click:
Uncaught Error: Syntax error, unrecognized expression: {"error":false,"message":"The requested process does not exist"}
at Function.nt.error (JqueryCore.js?v=1485015048:2)
at ut (JqueryCore.js?v=1485015048:2)
at vt (JqueryCore.js?v=1485015048:2)
at vt (JqueryCore.js?v=1485015048:2)
at Function.nt [as find] (JqueryCore.js?v=1485015048:2)
at init.find (JqueryCore.js?v=1485015048:2)
at init (JqueryCore.js?v=1485015048:2)
at v (JqueryCore.js?v=1485015048:2)
at Object.success (InputfieldRepeater.js?v=106-1485015048:229)
at l (JqueryCore.js?v=1485015048:2)
I don't see any JS error for the images issue.
Just had an idea. I'm not sure it is possible, but how about adding a client-side language picker to each place these pickers are shown?
Maybe a dropdown select field for choosing the EN, ES, DE just like you did in the AdminOnSteriods configuration options?
Selecting a different language would only show/select pages in that specific language. The autocomplete page input, page tree picker, select child page picker, and select file picker would only show/select pages in that language.
I was thinking that after choosing a different language it would perform an ajax request to replace the field's contents.
This would allow a user to pick or browse pages in a language that is different from the user's language.
example:fieldtype-assisted-url
Here are some other examples where these pickers appear.
This issue originally opened in processwire/issues - moved here after tracing back to AdminOnSteroids.
When opening an inputfield that has its visibility set to 'Closed + Load only when opened (AJAX)' a 'reloaded' event is supposed to be triggered for the inputfield element. Inputfields that need some Javascript initialisation can do that when the 'reloaded' event is triggered.
This works as expected when an inputfield is in the template of the page being edited. But if the inputfield is inside a repeater item that is open when Page Edit loads then no 'reloaded' event is triggered.
$(document).on('reloaded', '.InputfieldAsmSelect', function(event, param1) {
console.log('Reloaded - param1: ' + param1);
});
Hi Tpr,
I was having trouble figuring out how to change the CKeditor Code Mirror theme and options.
As you can see, the editor is hard to read with the default theme.
Here is my configurations if it helps:
I also tried creating the cke.js file in /sites/templates/cke.js per https://github.com/rolandtoth/AdminOnSteroids#auto-loaded-files , but it didn't seem to work.
I also tried entering the path /sites/templates/cke.js in the CKEditor custom configuration script input, but still couldn't see any changes.
Here is the contents of that file:
config.extraPlugins = 'sourcedialog,codemirror';
config.codemirror = {
// Set this to the theme you wish to use (codemirror themes)
theme: 'default',
// Whether or not you want to show line numbers
lineNumbers: true,
// Whether or not you want to use line wrapping
lineWrapping: true,
// Whether or not you want to highlight matching braces
matchBrackets: true,
// Whether or not you want tags to automatically close themselves
autoCloseTags: true,
// Whether or not you want Brackets to automatically close themselves
autoCloseBrackets: true,
// Whether or not to enable search tools, CTRL+F (Find), CTRL+SHIFT+F (Replace), CTRL+SHIFT+R (Replace All), CTRL+G (Find Next), CTRL+SHIFT+G (Find Previous)
enableSearchTools: true,
// Whether or not you wish to enable code folding (requires 'lineNumbers' to be set to 'true')
enableCodeFolding: true,
// Whether or not to enable code formatting
enableCodeFormatting: true,
// Whether or not to automatically format code should be done when the editor is loaded
autoFormatOnStart: true,
// Whether or not to automatically format code should be done every time the source view is opened
autoFormatOnModeChange: true,
// Whether or not to automatically format code which has just been uncommented
autoFormatOnUncomment: true,
// Define the language specific mode 'htmlmixed' for html including (css, xml, javascript), 'application/x-httpd-php' for php mode including html, or 'text/javascript' for using java script only
mode: 'htmlmixed',
// Whether or not to show the search Code button on the toolbar
showSearchButton: true,
// Whether or not to show Trailing Spaces
showTrailingSpace: true,
// Whether or not to highlight all matches of current word/selection
highlightMatches: true,
// Whether or not to show the format button on the toolbar
showFormatButton: true,
// Whether or not to show the comment button on the toolbar
showCommentButton: true,
// Whether or not to show the uncomment button on the toolbar
showUncommentButton: true,
// Whether or not to show the showAutoCompleteButton button on the toolbar
showAutoCompleteButton: true,
// Whether or not to highlight the currently active line
styleActiveLine: true
};
Am I doing something wrong? I'm using the latest version of AOS.
Since upgrading to PW 3.0.41 the save buttons and dropdowns don’t look and work as expected when AOS is enabled.
Even with the option “Misc -> Show save dropdown on hover instead on click” disabled the dropdown of the save button at the bottom of the page opens when hovering over the arrow section of the button. The arrow section of the save button at the top of the page is not visible at all and thus no dropdown available here.
I know this may take a while to fix, but I thought I would start writing them down as I noticed them.
I noticed the sticky header doesn't stick when the module is enabled.
Is there any way you could add the ability to preview links that are internal in URL fields? like /about-this-page ?
I'm using https://github.com/marcostoll/processwire-fieldtype-assisted-url which allows you to select pages from the tree. It inserts links like /about-this-page into the URL field, but the InputfieldURLChecker module won't preview it because right now it only previews external links.
Just tested v61. If I switch to the ckeditor lightwire skin nothing seems to change. I have refreshed the page many times to try to clear the cache, but I also don't think I see it including the needed .css
Your doing a great job with all the updates!
Hi.
Just noticed some unexpected behavior:
I enabled Heading 1 tag to use in my CKEditor and AOS adds a link to edit template/page next to it.
I can see such link is hidden near the page's title at the top, but the css rules don't apply in WYSIWYG textarea. Also everytime I save the page - it always adds a new link, so it stacks on every save.
"Home" is the name of template. And it's a home page page :)
The link url is to edit the page (or I've seen to edit the template before deleting some earlier)
So I imagine you need a more precise selector to insert this link, to target specifically admin page title, but not H1 in textareas.
On a default installation the fieldtype-assisted-url button is on the left and InputfieldURLChecker is also on the left which shows an overlap.
Can you change the default InputfieldURLChecker button position to be on the right side of the field?
Continuing from https://processwire.com/talk/topic/13389-adminonsteroids/?do=findComment&comment=152217
I noticed when you hover over fields that are InputfieldCheckbox when using the Classic PW theme on Page Edit, the tooltip doesn't show until you hover the first checkbox. Normally you just have to hover the field's label. If I hover the field's label nothing happens.
Notice where my cursor is at in the screenshot?
Other fields work just fine.
Today I did a processwire (v3.0.42) internal module update. Previous version was AOS 1.1.5 - after running the updater I left the config page without any changes via [submit]. That process took away my superuser access – leaving a very basic TopMenu (admin default theme) without submenus. I could not reenter the module configuration page.
After a second failed try, (wipeout of all AOS settings, reverting to the prevoius version, update again, submit config)… I found out: disabling the module on the settings-page after updating first -> than submit and reopening the settings-page -> reenable the module-> submit … did the trick.
Anybody can confirm that issue?
When I edit a page and try to change the parent, the page tree doesn't load. All I see is the page id in the input field. If I disable AOS, it works fine.
I'm running the latest AOS and PW 3.035
When there are more than one image fields in one PageEdit page, all the image fields lose to their saved layout and size(set by the size bar at top right hand corner), except the first image field. All the image fields follows the same setting of the first image field. I tried disable the module and the issue gone. I also tried uncheck all options the issue gone too.
Hi @rolandtoth
I noticed when I visit the AOS settings page with the AdminThemeReno enabled, the options for RenoTweaks seemed to be reversed.
For instance:
Sticky Header is checked by default. When I uncheck it, I see the sticky header instantly.
Sticky Sidebar is checked by default. When I uncheck it, I see the sticky sidebar instantly.
Same for "Always show sidebar items (disable accordion)"
Same for Always show search bar
Same for Place header button next to the main title
Same for Show top nav item on hover instead of click
Inline sidebar items works correctly.
Hope that helps
Hi tpr,
I just upgraded to the latest AOS module on PW3.0.33. When I'm looking at the page tree on /admin/page/, I'm seeing these errors in the console. It keeps growing bigger:
Why is it referencing this domain: http://mosolygo.paqartdesign.com/admin/module/edit?name=AdminOnSteroids&getTemplateEditLink=search ?
Another idea...
When adding a new field to a bunch of templates you have to manually edit each select field.
Not sure if it is possible... but after selecting an option it would be nice if a "Apply to all" link appeared next to the select menu where you could apply the same configurations to all the other displayed select options.
I don't know how useful it would be, but I thought I would throw it out there. 😀
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.