Offers / Extend offers to use datetimes instead of dates for expiry #411

Closed
wants to merge 6 commits into from

2 participants

@codeinthehole

You might want an offer that only runs for lunchtime so you need to set the time as well as the date.

The UI of the dashboard will need to change to allow either a date or a datetime to be selected.

@codeinthehole codeinthehole was assigned Jan 3, 2013
codeinthehole added some commits Jan 3, 2013
@codeinthehole codeinthehole Add make target for generating CSS from LESS files
Seems nicer than the generate_css.sh script there before.
83083ff
@codeinthehole codeinthehole Convert offer dates to datetimes
* This gives more flexibility to offers in how they are used.
* Am using a jQuery datetimepicker from: http://trentrichardson.com/examples/timepicker/
3de93af
@codeinthehole codeinthehole Use jQuery UI styles to get slider CSS
This overrides the previous styles though which is undesirable.  Will
need some FED attention.
290d66a
@codeinthehole codeinthehole Fix a conditional logic bug in condition form template
Was showing a heading unnecessarily.
8e611c3
@codeinthehole codeinthehole Adjust JS for date(time) pickers to be configurable
This change should allow Oscar projects to configure the options that
get passed to the date widgets.
fa7da39
@codeinthehole codeinthehole Format datetimes to hide time if it is midnight
This simplifies the display of offer date ranges as you don't get all
the "00:00:00 +0000" gubbins with each datetime.
5643ade
@codeinthehole

This clobbers the existing date picker styles which I presume is not desirable. @informa - Would it be sensible to cherry-pick the slider styles into our own LESS files?

The datepicker now looks like this:

image

@informa

Well I downloaded a stripped version of jquery.ui http://jqueryui.com/download/ only selecting the datepicker. It does bring through quite a lot of stuff. In a way I would rather add this as a @import somewhere.

Adding it as an @import maybe works ok as we will probably need it in the Dash and the Front?
However these datepickers front and dash might look totally different.

  1. We could create a plugins.less file for the dashboard area - which would contain, datepicker, time picker, WYSIWYG etc

  2. We could just house this css in the JS associated folder and @import it into {% block extrastyles %} or convert to LESS and @import it into dashboard.less.

@codeinthehole

Those suggestions sound fine to me. Is that something you're able to do? I'm tempted to merge this in now and treat the styling of the date picker as a separate issue.

@codeinthehole

I've merged this now and created #521 for the jQuery UI work.

@codeinthehole codeinthehole deleted the issue/411/offer-datetimes branch Jan 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment