-
-
Save knownasilya/50d39b99c95fa44bc1fd3b8284e94183 to your computer and use it in GitHub Desktop.
mobiledoc template fill in
This file contains 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({ | |
tagName: 'span', | |
classNames: ['template-tag'], | |
click() { | |
let tag = this.get('tag'); | |
let promise = this.get('onClick')(tag); | |
promise.then((tagVal) => { | |
tag.setProperties({ | |
tag: tagVal, | |
value: tagVal | |
}); | |
}); | |
} | |
}); |
This file contains 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({ | |
appName: 'Ember Twiddle', | |
tags: ['name', 'address', 'email'], | |
template: `Hi, I'm {name} and I live at {address}` | |
}); |
This file contains 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 eq([val1, val2]/*, hash*/) { | |
return val1 === val2; | |
} | |
export default Ember.Helper.helper(eq); |
This file contains 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 { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
/* required to keep event to working for outside click for dropdown */ | |
#root { | |
min-height: 100vh; | |
} | |
.template-tags-input { | |
background-color: #efefef; | |
line-height: 1.5; | |
} | |
.template-tag-value-invalid { | |
text-decoration: line-through; | |
} | |
.template-tag { | |
color: tomato; | |
cursor: pointer; | |
} | |
.template-tag:hover { | |
color: indianred; | |
} | |
.tag-select, | |
.ember-basic-dropdown-content { | |
background-color: transparent; | |
} | |
.ember-basic-dropdown-content { | |
margin-top: 12px; | |
margin-left: -6px; | |
} | |
.tag-select li { | |
list-style-type: none; | |
padding: 0.2em 0.4em; | |
margin-bottom: 0.25em; | |
background-color: #eee; | |
border-radius: 10px; | |
cursor: pointer; | |
} | |
.tag-select li:hover { | |
background-color: #ddd; | |
} | |
.tag-select ul { | |
background-color: transparent; | |
padding: 0; | |
margin: 0; | |
} |
This file contains 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.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0", | |
"mobiledoc-kit": "https://unpkg.com/[email protected]/dist/global/mobiledoc-kit.js" | |
}, | |
"addons": { | |
"ember-data": "2.12.1", | |
"ember-basic-dropdown": "0.31.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment