Beluga Posted April 7, 2015 Share Posted April 7, 2015 On 4/6/2015 at 5:10 PM, Martijn Geerts said: When you name your file ProcessPageEditHide.css it will be loaded when ProcessPageEdit is active and selected in the settings. I needed to restrict the loading to a role, though. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted April 7, 2015 Author Share Posted April 7, 2015 What I would do in this instance: Add a class when the requirements are met. For example, I would add the class .hide-me and in the file: .hide-me { position: absolute; Margin-left: -9999em; height: 0; width: 0; } Link to comment Share on other sites More sharing options...
Martijn Geerts Posted April 15, 2015 Author Share Posted April 15, 2015 Refresh listerPro after closing/saving the modal: (You need to enable 'Additional javascript config data' in the settings) $(function () { if (config.AdminCustomFiles.process === 'ProcessPageListerPro') { $(document).on('dialogbeforeclose', '.pw-modal-window', function() { $("#_ProcessListerRefreshTab").click(); }); } }); 3 Link to comment Share on other sites More sharing options...
Macrura Posted June 20, 2015 Share Posted June 20, 2015 if you want to make icons searchable (when setting them on a template), you can use chosen select.. 1) add chosen min.css, min.js and sprites in AdminCustomFiles folder. 2) enable ProcessTemplate in the ACF module settings 3) add lines to load chosen assets (in the dependencies box) ProcessTemplate AdminCustomFiles/chosen.min.css ProcessTemplate AdminCustomFiles/chosen.jquery.min.js 4) create processTemplate.js, inside AdminCustomFiles folder $(document).ready(function(){ $("select#Inputfield_pageLabelIcon").chosen({ disable_search_threshold: 10, no_results_text: "Oops, nothing found!", width: "25%" }); }); this will probably end up being a module, so that it can also extend to fields; for now if you want to do it on fields you have to repeat the instructions for ProcessField and also change the jquery selector 3 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted September 1, 2015 Author Share Posted September 1, 2015 Added Macrura's Autocomplete Tags in Image Field to the drop-ins.Thanks Macrura ! 3 Link to comment Share on other sites More sharing options...
bernhard Posted October 15, 2015 Share Posted October 15, 2015 thanks for this module martijn! Link to comment Share on other sites More sharing options...
Macrura Posted November 24, 2015 Share Posted November 24, 2015 (edited) here's a quick way to change the slider increment for your date timepicker, (this would go in AdminCustomFiles/ProcessPageEdit.js): if(typeof $.timepicker != 'undefined') { $(function(){ $.timepicker.custom = { stepMinute: 15, }; $.timepicker.setDefaults($.timepicker.custom); }); } if you run the latest version of timepicker addon (1.6.1) you can use selects instead of sliders:(for example if you are on current dev/stable, you copy the inputfield to site/modules and tell the system to use that one; then upgrade to the latest timepicker, and copy the new css to the datetime css; if are on devns, word is that it will include the latest version of timepicker). if(typeof $.timepicker != 'undefined') { $(function(){ $.timepicker.custom = { stepMinute: 15, controlType: 'select', oneLine: true, }; $.timepicker.setDefaults($.timepicker.custom); }); } Edited November 25, 2015 by Macrura check for timepicker to prevent js error 4 Link to comment Share on other sites More sharing options...
mr-fan Posted December 25, 2015 Share Posted December 25, 2015 just a easy one...as a little christmas present. My clients sometimes have problems to find the view link... so here some example CSS for ProcessPageEdit.css in /templates/AdminCustomFiles/ #content .WireTabs #_ProcessPageEditView { color: #69b023; font-weight: bolder; } #content .WireTabs #_ProcessPageEditView:before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transform: translate(0, 0); content: "\f06e\00a0 "; } #content .WireTabs #_ProcessPageEditView:hover { background: none; text-decoration: underline; border-color: transparent; } using BernhardB 's famous giphy tool it looks like: (just a example with fontawesome and bold to get the idea) regards mr-fan 4 Link to comment Share on other sites More sharing options...
Christophe Posted January 19, 2016 Share Posted January 19, 2016 Can Admin Custom Files be a solution for my problem? Please see https://processwire.com/talk/topic/2074-module-page-edit-field-permission/?p=110990 Users with a restricted role now only can edit 2 fields of a repeater item. But they can remove or add repeater items. I need to hide both "functionalities" with css (or another solution), only for this page with a specific template and when a user with this role is logged-in. Thank you in advance Edit: in this particular case, as this role can only edit pages with this template (that is only for these pages) now, the condition could be only when this role is logged-in. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted January 19, 2016 Author Share Posted January 19, 2016 Yep, you could do. But I would recommend to use Javascript for that instead of CSS. When you check the javascript config checkbox, you can access the roles in your javascript file with: config.AdminCustomFiles.user.roles 1 Link to comment Share on other sites More sharing options...
Christophe Posted January 19, 2016 Share Posted January 19, 2016 Thank you Martijn for the information. I've had a solution starting here: https://processwire.com/talk/topic/2074-module-page-edit-field-permission/?p=111207 But now I have another problem :/. https://processwire.com/talk/topic/2074-module-page-edit-field-permission/?p=111223 ** All of a sudden another issue has appeared (I don't know if it's related in a way or not at all). Now when I log-in as the "manager" user (not the superuser), I don't have access anymore to the page(s) tree and to the users ("membres" role) that I could add or edit. When I click on the Users link I have the following message (translated): ProcessWire: You don't have permission to execute this module - ProcessPageLister I don't understand what has happened... ** I have added attached images. Edit: it's apparently due to Admin Restrict Branch. I have to find why, as it worked well before and I only restricted a Specified Branch Parent for the "Membres" role. Link to comment Share on other sites More sharing options...
adrian Posted January 21, 2016 Share Posted January 21, 2016 Quote Edit: it's apparently due to Admin Restrict Branch. I have to find why, as it worked well before and I only restricted a Specified Branch Parent for the "Membres" role. Just wanted to wrap this up and let folks know that the problem that @Christophe discovered with AdminRestrictBranch has been fixed. 2 Link to comment Share on other sites More sharing options...
bernhard Posted January 21, 2016 Share Posted January 21, 2016 On 9/15/2014 at 2:56 PM, adrian said: Taken from AdminThemeReno, but I think credit actually goes to Nico: .content .PageList .PageListItem:hover .PageListActions{display:inline;-webkit-transition-delay:.25s;transition-delay:.25s} .content .PageList .PageListItemOpen .PageListActions{display:none !important;} .content .PageList .PageListItemOpen:hover .PageListActions{display:inline !important;-webkit-transition-delay:.25s;transition-delay:.25s} I added the other two lines to hide links on an open parent hmmm... i thought there was an option for this in the core recently but can't find where. or have i been dreaming?! Link to comment Share on other sites More sharing options...
adrian Posted January 21, 2016 Share Posted January 21, 2016 Quote hmmm... i thought there was an option for this in the core recently but can't find where. or have i been dreaming?! Yep - hover links are now default in the core although it can be disabled with a config setting: https://processwire.com/blog/posts/processwire-core-updates-2.5.26/#pagelist-now-supports-hover-actions They do work a little differently in the core than with that custom css. In the core you have to mouseover the Title of the page, but with that CSS you can mouseover anywhere on the line which I actually prefer. 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 21, 2016 Share Posted January 21, 2016 thank you adrian - i know i wasn't dreaming! that's really strange because recently i discovered that i don't see some site elements that should be there. thats not related to processwire. don't know where this comes from, its only on my new laptop with touchscreen. i also do not see pagelistactions on hover... it only works on firefox, not on chrome and IE but thats offtopic here and i will investigate when i have more time... Link to comment Share on other sites More sharing options...
Christophe Posted January 22, 2016 Share Posted January 22, 2016 Just an idea. Perhaps you (simply) need (to) (add) :focus Link to comment Share on other sites More sharing options...
mr-fan Posted January 25, 2016 Share Posted January 25, 2016 Again and again i've to write how awesome this module works....thank you Martijn.. it's a kind of JS/CSS captain hook for the admin! Here a little example for a easy solved problem at least for me: Have a events page that works like a timeline - and the event template itself contains the data and provide a .ics format file on the URL of the "page" there is no kind of single view and the template works as iCal generator for the event itself. So the little big Problem is if a user/autor clicks in the backend on "View" he get the eventxyz.ics file and not to the frontend page for the events.... so i need one line in the PageProcessEdit.js that solves this issue with a breeze of jquery. $("a#_ProcessPageEditView[href*=events]").attr("href", "/event-overview-page/"); best regards mr-fan 1 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted January 25, 2016 Author Share Posted January 25, 2016 I also want to mention that you also can use a file name as PageProcessEditChangeView.js, it's a little more verbosity in the filename but it gives you the flexibility to separate different tasks in separate files. 1 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted December 16, 2016 Author Share Posted December 16, 2016 A brand new AdminCustomFiles! That's what I have, but it's NameSpaced, and I'm not keen to make it compatible with ProcessWire2.8 or lower. Essentially it looks like the same Module, but it's rewritten, nothing of the old have survived, although all features work foor 99% the same. I don't want to loose the name, but don't want the older version gets lost. So, now I'm in trouble I'm not sure how bring this version up to the public. What do you guys think... Should I zip the old and put it in to the Module, of create a new Name... 3 Link to comment Share on other sites More sharing options...
cstevensjr Posted December 16, 2016 Share Posted December 16, 2016 AdminCustomFilesPlus 1 Link to comment Share on other sites More sharing options...
tpr Posted December 16, 2016 Share Posted December 16, 2016 Keep the new only and offer a download link to the old one. 4 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted December 16, 2016 Author Share Posted December 16, 2016 Thanks Guys... I like @tpr's suggestion... 4 Link to comment Share on other sites More sharing options...
PWaddict Posted February 10, 2017 Share Posted February 10, 2017 I'm trying to hide the Crop button from the Croppable Image 3 module with no success. Has anyone managed to hide it? Link to comment Share on other sites More sharing options...
PWaddict Posted February 11, 2017 Share Posted February 11, 2017 The module injects broken links. My main localhost url is: http://localhost/mysite.com/ and the module injects the css link as: <link type='text/css' href='/site/templates/AdminCustomFiles/ProcessPageEdit.css' rel='stylesheet' /> where the correct one should be: <link type='text/css' href='/mysite.com/site/templates/AdminCustomFiles/ProcessPageEdit.css' rel='stylesheet' /> Link to comment Share on other sites More sharing options...
Martijn Geerts Posted February 12, 2017 Author Share Posted February 12, 2017 @PWaddict, do you use the dependencies or the default injection method? Link to comment Share on other sites More sharing options...
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