Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Configure time position #519

Merged
merged 33 commits into from
Feb 5, 2017

Conversation

dylanwatsonsoftware
Copy link
Contributor

@dylanwatsonsoftware dylanwatsonsoftware commented Jan 9, 2017

Add a timePosition calendar attribute
Options: side, default or hidden

This new attribute allows configuring where the time should be positioned on the 'day view'.

side: on the side, outside of the calendar
hidden: kept out of sight; concealed ;)
default: on the inside of the calendar (any missing or unknown value will be interpreted as this option)

@codecov-io
Copy link

codecov-io commented Jan 9, 2017

Codecov Report

Merging #519 into master will increase coverage by 0.01%.

@@            Coverage Diff             @@
##           master     #519      +/-   ##
==========================================
+ Coverage   95.82%   95.83%   +0.01%     
==========================================
  Files          26       26              
  Lines         695      697       +2     
==========================================
+ Hits          666      668       +2     
  Misses         29       29
Impacted Files Coverage Δ
src/directives/mwlCalendar.js 92.59% <ø> (ø)
src/directives/mwlCalendarDay.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 403e004...03e379f. Read the comment docs.

Copy link
Owner

@mattlewis92 mattlewis92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fantastic, thank you! Will check it out locally tomorrow when I'm at a computer.

The only things I can spot off the top of my head are, can you remove the dist files from the commit as these get auto generated on release. Could you also undo the eslint configuration changes and fix any errors they highlight.

@dylanwatsonsoftware
Copy link
Contributor Author

Ah yep, I wondered about the dist stuff.
I'll sort it out.

This is done by the build when angular-bootstrap-calendar is released
@@ -105,7 +109,8 @@ angular
dayViewEventWidth: '=',
customTemplateUrls: '=?',
cellModifier: '=',
templateScope: '='
templateScope: '=',
timePosition: '='
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis is failing because of a trailing space at the end of this line, can you fix it please?

@mattlewis92
Copy link
Owner

The dist files are still changed, I think if you sync your fork with this repos master and then just copy the dist files across it should fix it.

@dylanwatsonsoftware
Copy link
Contributor Author

How's that @mattlewis92?

@mattlewis92
Copy link
Owner

mattlewis92 commented Jan 18, 2017 via email

@@ -8,6 +8,10 @@ angular

var vm = this;

vm.timePosition = vm.timePosition ? vm.timePosition : 'default';
vm.timeHidden = vm.timePosition === 'hidden';
vm.timePositionOffset = vm.timePosition !== 'default' ? 0 : 60;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order for this to work it needs to be inside the refreshView() function, as with ng 1.6+ these inputs wont be initialised on the components construction.

@mattlewis92
Copy link
Owner

Tried to fix the dist files myself through githubs UI but it keeps adding new lines to the end of the files

@dylanwatsonsoftware
Copy link
Contributor Author

Thought I'd reverted the dist... I'll have to take another look.

I'll take a look at that refreshView() issue. Haven't upgraded to 1.6 yet.

@mattlewis92
Copy link
Owner

I think it's because the git history on the dist files changed, there's probably a fancy way of fixing it via git but a quick and dirty fix would just be to download the dist files from the master repo and copy them into your branch, then git should detect that there are no changes.

If you sync from the master branch where angular has been updated to 1.6, you'll see your demo doesn't work properly due to the upgrade.

@mattlewis92 mattlewis92 merged commit 5940de5 into mattlewis92:master Feb 5, 2017
@mattlewis92
Copy link
Owner

Released as 0.28.0, thanks for the contribution! :octocat:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants