Jump to content

AdminOnSteroids


tpr

Recommended Posts

v061 is up. I decided to add the toolbar buttons anyway, it doesn't make much sense to make it optional.

As stated in the readme, if you need custom settings for CKEditor then you should go with the manual route. I will try to add a configuration textarea in a next release, hopefully that will allow fine-tuning of the plugins.

  • Like 1
Link to comment
Share on other sites

Hello tpr,

I use the latest version of AOS and today I have discovered the same problem with long titles by templates (static header at the top, Reno Theme)

Screenshot_13.jpg

As you can see the long headline of the template edit screen floats below the save button.

It is the same problem as we have with headlines by articles in the past. You have solved this by limiting the characters of the headline.

Best regards Jürgen

  • Like 2
Link to comment
Share on other sites

Oops, looks like I forgot to wrap the title in a span. It's fixed, get the latest from GitHub.

There's also a fix for CKEaddons, config.js wasn't loaded the way it should. LightWire skin wasn't loaded at all, for example.

  • Like 2
Link to comment
Share on other sites

awesome update with ckeditor, thank you! would not have known about the theme without you and the justify installation via checkbox is also very welcome :)

is it intentional that in default admin there is only one column whereas in reno there are two?

2016-09-09 18_53_13-Modules • ProcessWire • mustangs.do2.baumrock.com.png2016-09-09 18_54_15-tmp.png

aos 061, pw 3.0.30

btw: i had some display glitches after update. i switched to reno to check, switched back to default, then everything (besides the issue mentioned above) seemed normal. maybe you can add version numbers to the css tweaks to prevent cache-issues automatically?

like here: https://github.com/BernhardBaumrock/TemplatePreviewImages/blob/master/TemplatePreviewImages.module#L54-L60 no necessity of course!

enough info? ;)

Link to comment
Share on other sites

Another approach, what works automatically everytime, and without additional support, (updating version numbers) can be:

$timestamp = filemtime($config->paths->templates . 'scripts/myJsFile.js');
$myJsFile = $config->urls->templates . "scripts/myJsFile.js?ts={$timestamp}";
$config->scripts->add($myJsFile);

I'm to lazy to add version numbers to all and everything. Also, last modified filetime is foolproof, not updated version number is not. :)

  • Like 5
Link to comment
Share on other sites

The default theme has a maximum width about 1100 or 1200px, if I make the module layout 2 columns then columns will be too narrow. Reno is full-width so that's why I've set it 2cols if page width is above 1900px. Of course I could widen the max-width of the main container (default theme) let me know if you think that's a good idea.

CSS/Js versioning is a good idea, that was on the todo list. Thanks for the snippet!

  • Like 1
Link to comment
Share on other sites

@szabesz haha actually the idea is not mine but it was easier to find the snippet in my github repo as there are only very few modules in it and other user's github would have taken me hours to search through ;)

@horst thats easier and better of course :)

@tpr ah i see, thanks for clarifying :) and thanks for adding it in the future

  • Like 1
Link to comment
Share on other sites

I just realized that with the module active (latest version) cke submodule unchecked and Reno Sticky CKE is off, an editor using reno cannot see the CKE toolbars of inline CKE. If I deactivate the module, the CKE toolbars re-appear. Switching from reno to default also makes the inline toolbars re-appear.

Link to comment
Share on other sites

Updated to v062 with the following changes:

  • support for inline CKE fields (CKEaddons)
  • fix LightWire skin missing context menu icons (CKEaddons)
  • added 'Find' and 'Maximize' plugins for CKEaddons
  • added 'Set wider main content' for (default) AdminTweaks
  • submodule options 2 columns layout for default theme above 1479px screen width
  • fix missing pagelist icon set in template (PageListThumbs)
  • several fixes for truncated long page titles
  • timestamp for main module CSS and JavaScript file to prevent caching issues

I wasn't able to duplicate @ceberlin's issue. Are you sure you don't have other custom config.js loaded? AOS sets the path for each CKE field's config.js to the AOS directory, so if you enter this to the console you should see a path to AOS (replace "body" with your field's name):

ProcessWire.config.InputfieldCKEditor_body.customConfig
-> "/site/modules/AdminOnSteroids/CKE/config.js"

Currently the regular and inline CKEditors are handled differently in AOS because inline editors behave differently. I'll see if this could be improved.

  • Like 2
Link to comment
Share on other sites

I'm experimenting with admin columns and so far so good!

I've used Admin Template Columns which served well for years but I always felt there should be an easier way to accomplish this. ATC uses two fieldsets so you have to drag 4 asm fields in your templates to set columns. Plus if you need custom column width then you'll need to percentages at two fieldsets' settings.

My current solution uses only one field (FieltypeText actually, but it doesn't matter) so to separate columns I only need to put this field in the list where I need a column break. Custom width can be set by editing the field's width and both column's widths will be calculated.

I'll need to polish a few things but I like it's simplicity (and that there's one less module to install).

aos-column-break.png

  • Like 5
Link to comment
Share on other sites

v063 is up!

Moved this new submodule named AdminColumns entirely to PHP instead the quick JS prototype. It works, though I'm not sure it's much better this way. Anyway, it was fun/challenge to get the things I needed from other modules (Admin Template Columns, Batch Child Editor, etc).

See the readme for how it works but there's no big news there. The field is not uninstalled when AOS is uninstalled, but it shouldn't show up in the page edit form even if you don't remove it manually. However, the field is installed on module install and on activating the submodule too.

  • Like 2
Link to comment
Share on other sites

Thanks!

Right, because you can't add 2 or more instances of the same field. Perhaps such feature wouldn't complicate things too much but let's see how the current implementation performs first :)

  • Like 1
Link to comment
Share on other sites

On 10.9.2016 at 2:55 PM, tpr said:

I wasn't able to duplicate @ceberlin's issue. Are you sure you don't have other custom config.js loaded? AOS sets the path for each CKE field's config.js to the AOS

I just detected that the bar are not missing, is is just totally misplaced (out of the visible area, at the top (only reneo, Safari) not default on admin theme.

If I scroll up it eventually appears (at the wrong spot at the very top of the page).

Adding position:relative to InputfieldCKEditorInline fixed it for me. Maybe this gives you a better hint of the issue. I have no clue yet why the position is correct when deactivating AOS (0.6.3).

Link to comment
Share on other sites

Thanks, I've added it to the CSS, I don't think it breaks anything. Until I upload a new version perhaps you could try 0.6.3, there were a few fixes to CKEaddons so there's some chance this is already fixed (though these were mainly JS-related).

Link to comment
Share on other sites

I see that if sticky header is on, #main is set to position: absolute and the inline CKE toolbar calculates the top position wrong because of this. I made it this way to scroll only the content below the header. Once you disable position:absolute the toolbar scrolls with the page.

Link to comment
Share on other sites

13 hours ago, Juergen said:

Great work @tpr

One thing to mention: It is possible to add 1 column break field to a template. But it is not possible to add it fe to tab1 and tab 2 if they are present, because only one field will be created, right?

Best regards

I wouldn't like to add 2 or more field to support multiple column breaks. I have an idea to enter field names to the existing field's label (title), and add breaks based on that. But I'm open to other ideas too.

  • Like 1
Link to comment
Share on other sites

3 hours ago, tpr said:

I have an idea to enter field names to the existing field's label (title), and add breaks based on that.

Sounds good, but what does "enter field names to the existing field's label (title)" exactly mean? How would that actually work?

Link to comment
Share on other sites

On each template you can set overrides to fields, eg. label, description, notes. In this case the "aos_column_break" field is only a placeholder and the actual title doesn't matter. So it could be a place where you could add additional settings. My idea is to enter something like

featured_image:60, seo_keywords:50

and AOS would search for fields featured_image and seo_keywords and add the left-right fieldsets (if they are under FieldsetTabs).

Of course this is more error-prone because if you rename a field then you need to rename these labels too.

This is just an idea that could work without without the need to add additional column break fields, at least in theory :)

aos_column_break_label.png

Or the same idea could be used directly on tab open fields too.

Link to comment
Share on other sites

10 minutes ago, tpr said:

featured_image:60, seo_keywords:50

It is a CSS/JSON like syntax, which is quite familiar to us, so it is easy to deal with in this regard. As you pointed out, the drawback is that solution is not flexible when refactoring field names, but if you want to keep it simple then it is something that is just good enough, I think. This way it will be recommended to setup the columns when the development of the site has reached the level when the field names are unlikely to change. Sooner or later we stop renaming the fields anyway :)

Link to comment
Share on other sites

I got this thing to work though I may change the syntax here and there. Currently it uses FieldsetTabOpen fields' notes where you can enter this syntax:

colbreak_seo_keywords:50

Here "seo_keywords" is the field name after which you would like to put the break, and 50 is the percentage. It's all JS but it's not visible at all.

I've probably found a PW inconsistency: emptying a field override (Notes) I would expect that the original value is used, but not, it's overrided with an empty string. The same thing is OK for example overriding the field Width (Input tab).

  • Like 1
Link to comment
Share on other sites

v064 is just uploaded:

  • possibility to set admin columns inside tabs using FieldsetTabOpen's Note field
  • AdminColumns: skip column generation if aos_column_break is put inside a tab
  • do not add module JS and JS config to login page

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...