szabesz Posted September 1, 2016 Posted September 1, 2016 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...
tpr Posted September 1, 2016 Author Posted September 1, 2016 Weird - are you sure you've cleared all caches?
tpr Posted September 1, 2016 Author Posted September 1, 2016 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). 1
szabesz Posted September 1, 2016 Posted September 1, 2016 My mistake again... I was in haste in the morning, so... actually, the class AdminThemeDefault is added to <body> and not <html>.
tpr Posted September 1, 2016 Author Posted September 1, 2016 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'; 1
szabesz Posted September 1, 2016 Posted September 1, 2016 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!
szabesz Posted September 1, 2016 Posted September 1, 2016 Just now, szabesz said: This one works! Except that it ruins the Reno header completely 1
tpr Posted September 1, 2016 Author Posted September 1, 2016 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. 1
szabesz Posted September 1, 2016 Posted September 1, 2016 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?
flydev Posted September 1, 2016 Posted September 1, 2016 I just tested on a fresh 3.0.32 install with Reno theme, I dont have any issue 1
tpr Posted September 1, 2016 Author Posted September 1, 2016 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. 2
flydev Posted September 1, 2016 Posted September 1, 2016 Yep I did a test on the défault theme too, i didnt noticed something wrong, weird
gmclelland Posted September 1, 2016 Posted September 1, 2016 Just reporting...I added the snippet you provided to the module file and now the default theme has a working sticky header. 1
tpr Posted September 1, 2016 Author Posted September 1, 2016 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 1
tpr Posted September 1, 2016 Author Posted September 1, 2016 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. 4
gmclelland Posted September 1, 2016 Posted September 1, 2016 Works with the default theme now. Thanks tpr! 1
tpr Posted September 2, 2016 Author Posted September 2, 2016 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. 5
Juergen Posted September 2, 2016 Posted September 2, 2016 Perfect! Maybe its on the time to rename the module as well: TprOnSteroids 3
tpr Posted September 2, 2016 Author Posted September 2, 2016 No I'm not But in the movies "Z-Index-Man vs TprOnSteroids" would be a blockbuster for sure 3
Juergen Posted September 2, 2016 Posted September 2, 2016 Hello tpr, z-index man is back with a new z-index issue concerning the date/time inputfield. 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: Best regards the z-index man 1
tpr Posted September 3, 2016 Author Posted September 3, 2016 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. 2
Juergen Posted September 3, 2016 Posted September 3, 2016 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.
tpr Posted September 3, 2016 Author Posted September 3, 2016 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. 1
Juergen Posted September 3, 2016 Posted September 3, 2016 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. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now