Last active
June 28, 2016 14:39
-
-
Save HenryVonfire/337065d54cdf91a6e9f04dc6638247c7 to your computer and use it in GitHub Desktop.
ember-sidebar modal
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({ | |
| showUploader:false, | |
| actions:{ | |
| imageReady(){ | |
| console.log('image ready action'); | |
| this.send('toggleModal'); | |
| }, | |
| toggleModal(){ | |
| this.toggleProperty('showUploader'); | |
| } | |
| } | |
| }); |
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 { helper } from 'ember-helper'; | |
| import $ from 'jquery'; | |
| export default helper(function([selector, handler]) { | |
| return function(event) { | |
| if ($(event.target).is(selector) && handler) { | |
| return handler(event); | |
| } | |
| }; | |
| }); |
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 { | |
| margin: 12px 16px; | |
| font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| font-size: 12pt; | |
| } | |
| .modal-backdrop { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100vw; | |
| height: 100vh; | |
| background-color: black; | |
| opacity: 0.5; | |
| z-index: 12; | |
| } | |
| .modal-container { | |
| position: fixed; | |
| top: 0; | |
| width: 100vw; | |
| height: 100vh; | |
| z-index: 13; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .modal-dialog { | |
| background-color: white; | |
| border-radius: 4px; | |
| max-height: 100vh; | |
| overflow-y: auto; | |
| padding:10px; | |
| box-shadow: 0px 0px 5px #888888; | |
| } | |
| .modal-body { | |
| padding:20px; | |
| } | |
| .dropzone { | |
| border: 5px dotted green; | |
| color:green; | |
| border-radius: 5px; | |
| font: bold 24px/200px arial; | |
| height: 200px; | |
| width: 400px; | |
| margin: 30px auto; | |
| text-align: center; | |
| } |
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.9.3", | |
| "EmberENV": { | |
| "FEATURES": {} | |
| }, | |
| "addons":{ | |
| "ember-sidebars":"latest" | |
| }, | |
| "options": { | |
| "use_pods": false, | |
| "enable-testing": false | |
| }, | |
| "dependencies": { | |
| "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
| "ember": "2.6.0", | |
| "ember-data": "2.6.1", | |
| "ember-template-compiler": "2.6.0" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment