Giter Club home page Giter Club logo

adminonsteroids's People

Contributors

bernhardbaumrock avatar gmclelland avatar jmartsch avatar rolandtoth avatar tobaco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adminonsteroids's Issues

Codemirror questions

Just curious, when trying the CodeMirror plugin, does lineWrapping work for you?
edit page about pw3 dev 2016-12-09 11-13-47

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

Add "copy to clipboard" button inside field tooltips

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.

edit page fall cleanups creeksidecleanup dev 2017-02-14 08-11-58

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?

Frontend In Place CKEditor Configs

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?

Add keyboard shortcut to open the page tree panel

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?

Edit modules in modal on long click

I'm not sure this is working for me in the default theme. Nothing happens when I long click on the module name on /admin/module/ using Chrome.

modules processwire pw3 dev 2016-11-08 11-13-39

Just thought I would let you know.

Disable filename truncation for InputfieldFile

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

addPageListIDs, got multiple times added

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);

capture_ 136
capture_ 137

Customize autocomplete search results

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.
image

New 'Move' function in Page Tree

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?

screencast 2016-09-27 15-16-48

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

Autosize Textareas not resizing

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?

CKEditor - Plugins

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.

Default admin theme head not sticking

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.

Array to string conversion in addIUCLink()

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

Repeater access problems for non-superusers

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.

Short description of the issue

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.

Expected behavior

Image and Repeater fields inside a Repeater should be accessible to roles that have edit access to the page the Repeater is on.

Steps to reproduce the issue

  1. Create a non-superuser role "editor" and give it page-edit permission.
  2. Edit the access tab for the "home" template and specify that edit access is not inherited by children (not sure if this is necessary but that is how my installation is configured).
  3. Create an Image field and a Repeater field.
  4. Create another Repeater field, and add the Image and Repeater fields from step 3 to it.
  5. Create a template and add the Repeater field from step 4. Give the editor role edit access to this template.
  6. Create a page that uses the template.
  7. Log in as a user with the editor role and test.

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.

Setup/Environment

  • ProcessWire version: 3.0.51
  • (Optional) PHP version: 7
  • AOS version: 1.2.3

Multilingual page pickers

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?
untitled 2016-11-02 15-42-44

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
untitled 2016-11-02 15-56-10

Here are some other examples where these pickers appear.

example: ckeditor-page-linker
image

example: parent page selector
image

example: AdminOnSteriods NavItems page picker
image

Reloaded event not triggered for inputfields inside a repeater

This issue originally opened in processwire/issues - moved here after tracing back to AdminOnSteroids.

Short description of the issue

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.

Steps to reproduce the issue

  1. Create a field that uses AsmSelect, such as a FieldtypeOptions field (using AsmSelect here as an example of an inputfield that requires some JS initialisation).
  2. Set the field's visibility to 'Closed + Load only when opened (AJAX)'.
  3. Add the field to a template, and also to a repeater field in that template. Set the repeater settings to "Items always open".
  4. Add the following to ProcessPageEdit (with AdminCustomFiles or whatever)...
$(document).on('reloaded', '.InputfieldAsmSelect', function(event, param1) {
    console.log('Reloaded - param1: ' + param1);
});
  1. Observe that the reloaded event is triggered for the field directly in the template, but is not triggered for the field inside the repeater. Also observe that the AsmSelect inside the repeater item does not initialise properly when the field is loaded.

Setup/Environment

  • ProcessWire version: 3.0.63

change Code Mirror theme

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.

image

Here is my configurations if it helps:
image

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.

Save dropdown problems in PW 3.0.41

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.

screenshot-save-dropdown

Line showing under the horizontal tabs

Here it is with AOS disabled:
good

Here it is after AOS is enabled:
bad

Notice the line under the "Content" tab?

Let me know if you need any more information.

v61 ckeditor lightwire skin not working

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!

Can't expand page actions on /processwire/page/lister/

When I visit /processwire/page/lister/, it will list the pages on my site. When click on the right arrow nothing happens. No errors in the console.

find processwire pwtwig dev 2017-01-08 14-16-10

If disable AOS temporarily via the link, everything starts working again.

Lister tweaks is disabled. Page List tweaks is disabled.

Template/edit link is inserted in CKE field too, next to H1

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.
screenshot_61
"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)
screenshot_62

So I imagine you need a more precise selector to insert this link, to target specifically admin page title, but not H1 in textareas.

AOS tooltip doesn't work correctly with InputfieldCheckbox

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.

Example:
edit page about us mansfieldtexasarts dev 2017-10-01 10-30-43

Notice where my cursor is at in the screenshot?

Other fields work just fine.

Loosing superuser permissions after update (v115 -> v141)

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?

edit template link when editing a page

When editing a page under the Settings tab, it would be nice if I could click an "edit" link or button to edit the template that the page is assigned to.

image

Image size and layout in PageEdit issue

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.

AOS Option previews are reversed for RenoTweaks

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

"Apply to all" link for field position in templates

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.

  • It would only do this if there was more than 1 select menu
  • It would only appear when selecting fields that are shared between the other templates displayed

fields processwire pwtwig dev 2017-01-10 15-05-18

I don't know how useful it would be, but I thought I would throw it out there. 😀

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.