renobird Posted October 19, 2012 Share Posted October 19, 2012 I'm in the process of building a pretty intense calendar with PW. A lot of our events are recurring, usually on different days with different times, but otherwise they are exactly the same. For example, we may have performance in Theatre that happens on 10/18 @ 6pm 10/19 @ 8pm 10/20 @ 8pm 10/21 @ 4pm All other details of the event are the same. I'm dreaming of a version of the datepicker that would allow you to pick multiple dates/times for an event. Usage: Click on a day in the datepicker and set the time for that day, then click another date and set the time, etc... So it's just like the current date picker, except you can add more than one date/time. The values would be stored comma separated. I found this JQuery plugin for multiple date selection, but it doesn't do time as well. http://multidatespickr.sourceforge.net I have no idea if this is even feasible to implement, just throwing it out there. Link to comment Share on other sites More sharing options...
ryan Posted October 19, 2012 Share Posted October 19, 2012 Sounds like potentially a good use case for a date field in a repeater? Link to comment Share on other sites More sharing options...
renobird Posted October 19, 2012 Author Share Posted October 19, 2012 Hi Ryan, That's what I have now, but when I tested it today with a group of users, they were confused by it. They didn't understand that they needed to save before the next set of fields would show up. (I know it says that clearly — not sure why they didn't seem to get it.) Once I showed them that, they were still not thrilled. This was a group of interns who will be managing the calendar. I can see their point, if an event has like 15 dates that a scattered through the month. Just dreaming of other solutions. Link to comment Share on other sites More sharing options...
ryan Posted October 19, 2012 Share Posted October 19, 2012 They didn't understand that they needed to save before the next set of fields would show up. This is what the 'ready pages' setting is for. You may want to bump it up to 2, 3 or higher-- whatever typical repetition you would have. The only other way I can think of that you could do this would be to stuff a bunch of predefined date fields on the template. And this would be a fine way to go if you knew you were never going to have more than 4, or some other predefined amount. But for an unknown quantity, I think repeaters would be hard to beat here (at least, I can't think of anything else short of a custom Fieldtype/Inputfield). Link to comment Share on other sites More sharing options...
renobird Posted October 23, 2012 Author Share Posted October 23, 2012 Thanks Ryan, I managed to sort this out by sticking with the repeater option, but instead of using a repeater as a singular method for date entry, I used it for "additional dates". That way, the majority of events are entered with a typical start/end date, but events with more complicated schedules can use the repeater. I set the ready fields to 2, that seems like a good place to start. I think this will be less confusing to the people entering events — at least I hope. See attached. (note: tweaked the admin via FieldSet to create 2 columns for calendar entry, I love how flexible PW is.) 6 Link to comment Share on other sites More sharing options...
apeisa Posted October 24, 2012 Share Posted October 24, 2012 What is that admin theme sir? 1 Link to comment Share on other sites More sharing options...
renobird Posted October 24, 2012 Author Share Posted October 24, 2012 Hey Antti, Not a theme (yet) - just a few CSS tweaks I made. Nico has seen it and keeps encouraging me to make a theme out of it. 7 Link to comment Share on other sites More sharing options...
apeisa Posted October 24, 2012 Share Posted October 24, 2012 It looks great. I think it is does superb job to make admin feel little less "lot of boxes with borders". Hopefully you get it released at some point! 2 Link to comment Share on other sites More sharing options...
nikola Posted October 24, 2012 Share Posted October 24, 2012 It's very nice & clean, I like it. If you'll have time it would be a cool theme. 2 Link to comment Share on other sites More sharing options...
arjen Posted October 24, 2012 Share Posted October 24, 2012 Looks nice renobird! Could you point out how to start making columns? From there I can figure it out myself, but at the moment I haven't got any clue! Thanks! 1 Link to comment Share on other sites More sharing options...
Soma Posted October 24, 2012 Share Posted October 24, 2012 You just create fieldsets and use width column option. The trick then is to hide the fieldset label via css. Ive done it myself with teflon theme and will soon update it with same approach and also made the field labels white to remove cluttr. 6 Link to comment Share on other sites More sharing options...
renobird Posted October 24, 2012 Author Share Posted October 24, 2012 Just as Soma mentioned, use the FieldSet field type to create your columns, and then set their width so they float next to each other. In my case I made 3 FieldSet columns. (column_1, column_2, column_3) — although I only used 2 columns in the screenshot above. I didn't want to change how the admin looked anywhere other than within these columns, so the only thing I changed about the default theme was a few lines of CSS that are specific to these columns. You can grab the CSS here 5 Link to comment Share on other sites More sharing options...
ryan Posted October 24, 2012 Share Posted October 24, 2012 See attached. (note: tweaked the admin via FieldSet to create 2 columns for calendar entry, I love how flexible PW is.) Wow this needs to be made into an admin theme. I really like the look of this! 1 Link to comment Share on other sites More sharing options...
renobird Posted October 24, 2012 Author Share Posted October 24, 2012 Thanks Ryan, I wanted to stay true to the default theme, but just make some minor tweaks. I'll try to carve some time out soon to make this into a theme — should be pretty easy. Link to comment Share on other sites More sharing options...
Pete Posted October 26, 2012 Share Posted October 26, 2012 I really like this implementation of columns and am going to use it on a few sites soon I think to make better use ot the page - ryan, could there be an option in the fieldset options to hide the title rather than what's been done above (hidden by CSS)? Not that there's anything wrong with using field widths of course, but this way that had a combination of the two does look neater in my opinion, and certainly adds more options. I wonder if there's scope to include some things like this in the default site profile too - just to show some more possibilities out of the box? Only problem of course is that I can't think of any of the default templates that would use this fieldset-as-solumns layout. Link to comment Share on other sites More sharing options...
diogo Posted October 26, 2012 Share Posted October 26, 2012 +1 for the theme Link to comment Share on other sites More sharing options...
apeisa Posted November 5, 2012 Share Posted November 5, 2012 Reno: how does your tweaks look when there is repeater with file fields? I think that is scenario where current "boxes with borders" UI really falls apart and is always messy. Look at the attached screenshot: Link to comment Share on other sites More sharing options...
renobird Posted November 5, 2012 Author Share Posted November 5, 2012 Antti, Here is how I currently have them working (see additional dates is screenshot). I haven't given that scenario a lot of thought yet. 3 Link to comment Share on other sites More sharing options...
Michael Murphy Posted November 6, 2012 Share Posted November 6, 2012 Hey Antti, I also agree with you about the boxy feel. I have just been playing with the repeater element and tried to reduce the boxyness and make it similar to Renos style. Here is a screenshot This is not fully tested and will probably break other stuff, but here is the css I used so far .Inputfields > .InputfieldRepeater > .ui-widget-content { padding: 0; border:none; } .Inputfields > .InputfieldRepeater > .ui-widget-content .Inputfields > .Inputfield > .ui-widget-content { padding: 5px; border-color: #e6e6e6; } /*add a dropshadow to the repeater inputfields */ .Inputfields > .InputfieldRepeater > .ui-widget-content .Inputfields > .Inputfield > .ui-widget-content .Inputfield { -webkit-box-shadow: 1px 4px 5px -3px rgba(0, 0, 0, .1); box-shadow: 1px 4px 5px -3px rgba(0, 0, 0, .1); } .ui-widget-content { border-color: #e6e6e6; } .Inputfields .ui-widget-header { border-bottom:none; border-color: #e6e6e6; background: #ffffff; } .InputfieldStateCollapsed .ui-widget-header { border: 1px solid #e6e6e6; } /*this is the repeater element handle, changing it to a solid color */ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: none; background: #b3b3b3; } 2 Link to comment Share on other sites More sharing options...
apeisa Posted November 6, 2012 Share Posted November 6, 2012 Thanks for posting those screenshots guys! Definitely taking some inspiration from there. Link to comment Share on other sites More sharing options...
onjegolders Posted November 6, 2012 Share Posted November 6, 2012 +1 for a theme Reno! Link to comment Share on other sites More sharing options...
Pete Posted November 9, 2012 Share Posted November 9, 2012 Back to repeaters a minute - I think that a little AJAX would vastly improve the "flow" here. If it were altered to show a loading icon when you add a new item and then load it via AJAX without reloading the page then I think that that would be preferable if it's possible? I think the reloading can feel a bit clunky if you are using repeaters a lot, as can setting it to automatically set up X default repeater items when you're rarely sure how many you might need. 1 Link to comment Share on other sites More sharing options...
ryan Posted November 9, 2012 Share Posted November 9, 2012 Not possible, at least not in a way that would be compatible with all fieldtypes. Not all fieldtypes are ajax compatible. Take TinyMCE for instance, which would need a totally different approach to being dynamically instantiated on a page like that, if it's even possible. I wouldn't want to place this burden on Inputfield module developers. It would always be a question of "is this Inputfield repeater compatible?". For instance, any Inputfield that initializes with it's own $(document).ready() wouldn't be compatible. The whole idea of "ready pages" are a compromise to provide a way around this. 1 Link to comment Share on other sites More sharing options...
renobird Posted November 9, 2012 Author Share Posted November 9, 2012 Ryan, Thanks for that explanation. I kind of assumed there was a reason you hadn't gone the ajax route to begin with. The ready pages have proved to be a good compromise for my situation. Link to comment Share on other sites More sharing options...
Pete Posted November 9, 2012 Share Posted November 9, 2012 Every time I think about making it AJAX I forget the more complex inputfields - totally understand it when you take into account the other types. Thanks for the explanation ryan! 2 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