Jump to content

Recommended Posts

Posted

Oh, sorry for that :-[ Well, switching theme I have AdminThemeDefault, but sticky header does not work for me either. That's "AdminTweaks -> Sticky header", right? Since installing AOS, I do not use the default theme anymore...

Posted
10 hours ago, gmclelland said:

I added that snippet to a template file, but it didn't output anything.  I also have Tracy debugger and tried using the php console, but it didn't output anything either.

Even if you re-save your profile? Then it could be something with your PW. Next would be trying to disable/uninstall other modules to see what may interfere. I don't have this issue on any on the sites I checked (different servers, different php versions).

  • Like 1
Posted

My mistake again... I was in haste in the morning, so... actually, the class AdminThemeDefault is added to <body> and not <html>.

Posted

Still no idea why you guys don't have this class.

Anyway, could you try replacing line #323 with this?:

$this->adminTheme = (isset($this->user->admin_theme) && $this->user->admin_theme !== "") ? $this->user->admin_theme : 'AdminThemeDefault';

 

  • Like 1
Posted
1 hour ago, tpr said:

Anyway, could you try replacing line #323 with this?:


$this->adminTheme = (isset($this->user->admin_theme) && $this->user->admin_theme !== "") ? $this->user->admin_theme : 'AdminThemeDefault';

 

This one works!

Posted

Ok, thanks. I'll try to rewrite the CSS to use body classes instead html. But first I'll make a clean PW install and see if I can duplicate the issue.

  • Like 1
Posted

I can send you my site in question. It is something I will use as the base of all my future PW sites and it will probably be released as a site profile too (which is still a long way away, though...). So, do you need it?

Posted

Thanks. The problem is with the default admin theme. I decided to make things simpler and add its class to the html instead to the body, but it seems some PW installations doesn't return the $user->admin_theme like on in my sites. I hope I can figure out why because there are some tweaks where I use need to check which theme is active.

  • Like 2
Posted

Yep, it should, but as @szabesz reported the Reno theme has issues. Anyway, I'll look into it, until stick with the non-sticky header :) 

  • Like 1
Posted

I was on the right track when I posted the snippet above. I suspected that $user->admin_theme is not available until there's only the default theme and apparently that was the case.  That's another question why my condition was always FALSE above but it's hard to bugtrack blindly :)

Try v057, it should detect the current admin theme correctly. If there isn't any then $config->defaultAdminTheme is used.

Btw, it was the first time I used grabpw.php to install PW (by Soma) which made things a lot easier. It downloads the 2.7.2 version so it's recommended to modify the "SOURCE_URL" to the latest PW version (otherwise you can use the module ProcessWireUpgrade to upgrade from the admin). TracyDebugger's Console panel was also of great help identifying the issue.

Otoh I'm not very satisfied with the current html classes solution and regexp implementation. I may rewrite this very part in the future using data- attributes.

  • Like 4
Posted

AdminLangSwitcher is coming!

This makes easier to see the admin in the selected language. Useful to check the page names and other stuff in other languages.

Implementation is quite easy, it just sets a cookie with JavaScript and then sets $user->language based on that.

aos_admin_lang_switcher.gif

  • Like 5
Posted

No I'm not :) But in the movies "Z-Index-Man vs TprOnSteroids" would be a blockbuster for sure :)

  • Like 3
Posted

Hello tpr,

z-index man is back :) with a new z-index issue concerning the date/time inputfield.

Screenshot_14.jpg

As you can see the date/time picker div will be overlapped by using the static header.

The CSS used for this inputfield:

.ui-datepicker {z-index: 100!important}

So you have to add this line of code also to your Stylesheet with a higher index than the static header divs and the important addition.

This is what it looks like with a much higher index:

Screenshot_15.jpg

Best regards the z-index man

  • Like 1
Posted

Thanks Z-I-M! :) Fixed.

v058 is available, containing the AdminLangSwitcher demoed earlier. I may add a setting to "Switch language title and name" to it later.

  • Like 2
Posted

Maybe the opportunity to select userroles which will see the language switcher would be a good addition. Its more important for admins or superuser than others.

Posted

I haven't got the need for this so I need to think about it a bit more. Are your "editors" responsible for only one language?

On "think more" I actually meant that it  would be better to create a module setting that is more general. For example a setting where you could enable/disable submodules for each role, eg. using asmSelects. It's just a quick idea but this would allow fine-tuning permissions for every submodule.

  • Like 1
Posted

The editors only translate text and therefore they dont need this feature, because I use language tabs for translations of fields. I use your language switcher fe to check if all the page labels were translated and so on. In general I use it to check if the admin section is understandable for non native speakers as well, because some editors have another mother language and this makes it (only for me as superuser) much easier.

  • Like 1

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