Last active
October 6, 2016 21:32
-
-
Save zakmac/1ce9a81bf7db1edad1c6eff6af982843 to your computer and use it in GitHub Desktop.
Dashboard Nav Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
attributeBindings: ['href'], | |
href: '#', | |
tagName: 'a', | |
text: '', | |
click: function(e) { | |
var anchor = this.get('href'); | |
e.preventDefault(); | |
console.log('targeting', anchor, ('#'+ anchor), $('#'+ anchor).offset()); | |
$('html, body').animate({ | |
scrollTop: $('#'+ anchor).offset().top | |
}, 0); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
// properteez | |
classNameBindings: ['isHovering:hover'], | |
classNames: 'block-grid-item', | |
isHovering: false, | |
// actions | |
click: function() { | |
this.set('itemData.panel.isExpanded', true); | |
}, | |
mouseEnter: function() { | |
this.set('isHovering', true); | |
}, | |
mouseLeave: function() { | |
this.set('isHovering', false); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
classNames: 'panel panel-default', | |
isExpanded: Ember.computed.alias('itemData.panel.isExpanded'), | |
actions: { | |
togglePanel: function() { | |
this.toggleProperty('isExpanded'); | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
//import vis from 'visjs'; | |
export default Ember.Component.extend({ | |
graphData: [ | |
{ | |
id: 1, | |
content: '<i class="fa fa-hourglass-half" aria-hidden="true"></i>', | |
start: '2016-08-01', | |
group: 1 | |
}, { | |
id: 2, | |
content: '<i class="fa fa-hourglass-end" aria-hidden="true"></i>', | |
start: '2016-08-08', | |
group: 1 | |
}, { | |
id: 3, | |
content: '', | |
start: '2016-08-01', | |
end: '2016-08-20', | |
className: 'gray', | |
group: 2 | |
}, { | |
id: 4, | |
content: '', | |
start: '2016-08-20', | |
end: '2016-08-25', | |
className: 'orange', | |
group: 2 | |
}, { | |
id: 5, | |
content: '', | |
start: '2016-08-25', | |
end: '2016-09-25', | |
className: 'green', | |
group: 2 | |
}, { | |
id: 6, | |
content: '', | |
start: '2016-09-25', | |
end: '2016-09-28', | |
className: 'orange', | |
group: 2 | |
}, { | |
id: 7, | |
content: '<i class="fa fa-hourglass-end" aria-hidden="true"></i>', | |
start: '2016-10-05', | |
group: 1 | |
} | |
], | |
graphGroups: [ | |
{ | |
id: 1, | |
content: 'events' | |
},{ | |
id: 2, | |
content: 'work status' | |
} | |
], | |
graphOptions: { | |
height: 250, | |
width: '100%', | |
editable: false, /* this option means you can add or remove items by clicking on the timeline */ | |
margin: { | |
item : { | |
horizontal : 0, | |
vertical: 50 | |
} | |
} | |
}, | |
didInsertElement: function() { | |
this._super(); | |
var timeline = new vis.Timeline(this.get('element'), new vis.DataSet(this.get('graphData')), this.get('graphOptions')); | |
timeline.setGroups(this.get('graphGroups')); | |
this.set('timeline', timeline); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
panelGroups: Ember.computed('panels', function() { | |
var groupLimit = 4; | |
var panelGroups = []; | |
var panels = this.get('panels'); | |
panels.forEach(function(panel, z) { | |
let groupNum = Math.floor(z / groupLimit); | |
if (!panelGroups[groupNum]) { panelGroups[groupNum] = []; } | |
panelGroups[groupNum].push(panel); | |
}); | |
return panelGroups; | |
}), | |
panels: [{ | |
title: 'Work Status', | |
widget: { | |
valueText: 'Mod. Duty', | |
detailText: 'since 07/07/2016', | |
linkText: 'view or modify statuses' | |
}, | |
panel: { | |
canClose: false, | |
canToggle: true, | |
isExpanded: false | |
} | |
}, { | |
title: 'Work Restrictions', | |
widget: { | |
valueText: '0 Active', | |
detailText: '1 expired', | |
linkText: 'manage restrictions' | |
}, | |
panel: { | |
canClose: false, | |
canToggle: true, | |
isExpanded: false | |
} | |
}, { | |
title: 'Claim Duration', | |
widget: { | |
valueText: '95 Days', | |
detailText: '7 days until est. RTW', | |
linkText: 'more information' | |
}, | |
panel: { | |
canClose: false, | |
canToggle: true, | |
isExpanded: false | |
} | |
}, { | |
title: 'Appointments', | |
widget: { | |
valueText: '0 Upcoming', | |
detailText: '1 past', | |
linkText: 'view calendar' | |
}, | |
panel: { | |
canClose: false, | |
canToggle: true, | |
isExpanded: false | |
} | |
}, { | |
title: 'Employment Status', | |
widget: { | |
valueText: 'Full-time', | |
detailText: 'Starbucks / Seattle Airport', | |
linkText: 'modify status' | |
}, | |
panel: { | |
canClose: false, | |
canToggle: true, | |
isExpanded: false | |
} | |
}, { | |
title: 'Benefit Barriers', | |
widget: { | |
valueText: 'Dispute', | |
detailText: 'benefits not owed', | |
linkText: 'view or modify barriers' | |
}, | |
panel: { | |
canClose: false, | |
canToggle: true, | |
isExpanded: false | |
} | |
}, { | |
title: 'Body Parts', | |
widget: { | |
valueText: 'MULTIPLE', | |
detailText: 'no detail text yet', | |
linkText: 'view body parts' | |
}, | |
panel: { | |
canClose: false, | |
canToggle: true, | |
isExpanded: false | |
} | |
}, { | |
title: 'Outcome', | |
widget: { | |
valueText: 'Return to Full', | |
detailText: 'estimated 09/01/2016', | |
linkText: 'view or modify outcome' | |
}, | |
panel: { | |
canClose: false, | |
canToggle: true, | |
isExpanded: false | |
} | |
}] | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export function slugify(params/*, hash*/) { | |
var text = params[0] || 'SLUG_TEXT'; | |
return text.toString().toLowerCase().trim() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/&/g, '-and-') // Replace & with 'and' | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-'); // Replace multiple - with single - | |
} | |
export default Ember.Helper.helper(slugify); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body, | |
html { | |
background-color: #e6e7e7; | |
} | |
.row { | |
margin-bottom: 30px; | |
} | |
.panel { | |
margin: 0; | |
} | |
/* | |
* basic layout and srtucture | |
* * * * * * * * * * * * * * * * */ | |
.block-grid-item { | |
cursor: pointer; | |
} | |
/* | |
* colorization and theming | |
* * * * * * * * * * * * * * * * */ | |
.block-grid-item .content, | |
.block-grid-item .footer, | |
.block-grid-item .header { | |
padding: 0.5rem; | |
} | |
.block-grid-item .content, | |
.block-grid-item .header { | |
text-align: center; | |
} | |
.block-grid-item .header { | |
text-transform: uppercase; | |
} | |
.block-grid-item .content small, | |
.block-grid-item .content strong { | |
clear: both; | |
display: block; | |
} | |
.block-grid-item .content strong { | |
font-size: 2rem; | |
} | |
.block-grid-item, | |
.block-grid-item a { | |
color: #FFFFFF; | |
} | |
.block-grid-item .header { | |
background-color: #00A9F4; | |
} | |
.block-grid-item .footer { | |
background-color: #0086C1; | |
} | |
.block-grid-item .content { | |
background-color: #008EDD; | |
} | |
.block-grid-item.hover .header { | |
background-color: #FFA300; | |
} | |
.block-grid-item.hover .footer { | |
background-color: #E57D00; | |
} | |
.block-grid-item.hover .content { | |
background-color: #FF9100; | |
} | |
.panel .panel-heading { | |
cursor: pointer; | |
} | |
/* | |
* fontawesome | |
* * * * * * * * * * * * * * * * */ | |
.fa.inactive { | |
opacity: 0.5; | |
} | |
.vis-item.gray { | |
color: white; | |
background-color: gray; | |
border-color: darkgray; | |
} | |
/* | |
* visjs | |
* * * * * * * * * * * * * * * * */ | |
.vis-item.vis-range { | |
border-radius: 0; | |
} | |
.vis-item.orange { | |
color: white; | |
background-color: orange; | |
border-color: darkorange; | |
} | |
.vis-item.green { | |
color: white; | |
background-color: green; | |
border-color: darkgreen; | |
} | |
.vis-time-axis { | |
background: white; | |
} | |
.vis-item.vis-box { | |
background-color: transparent; | |
border-radius: 50px; | |
width: 2.5em; | |
height: 2.5em; | |
} | |
.vis-item.vis-box, | |
.vis-item.vis-dot, | |
.vis-item.vis-line { | |
border-color: #C400BB; | |
color: #C400BB; | |
} | |
/* | |
* junkyard | |
* * * * * * * * * * * * * * * * */ | |
.junk.junk-timeline .inner-wrap, .junk.junk-action-items .inner-wrap { | |
align-items: center; | |
background-color: #fff; | |
display: flex; | |
height: 250px; | |
justify-content: center; | |
} | |
.junk.junk-navbar { | |
margin: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.10.5", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"visjs": "https://visjs.org/dist/vis.min.js", | |
"visjs-css": "https://visjs.org/dist/vis.css", | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"bootstrap": "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css", | |
"bootstrap-js": "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js", | |
"font-awesome": "https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css", | |
"ember": "2.8.0", | |
"ember-data": "2.8.0", | |
"ember-template-compiler": "2.8.0", | |
"ember-testing": "2.8.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment