Forked from Gaurav0/controllers.application.js
Last active
December 15, 2020 01:58
Revisions
-
jacobq revised this gist
Jun 19, 2017 . 7 changed files with 57 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,9 +13,11 @@ body { */ /* Hack #2 -- works but quite fragile (depends on liquid-fire explode ordering, etc.) */ /* .ember-modal-overlay ~ .ember-modal-dialog { display: none !important; } */ /* Taken from ember-modal-structure.scss, adapted for compatibility */ .ember-modal-dialog { 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 charactersOriginal file line number Diff line number Diff line change @@ -5,15 +5,20 @@ show: {{show}}<br> {{#modal-dialog onClose='toggle' translucentOverlay=true overlayPosition='sibling' animatable=true }}<p>Oh hai there!</p> <a href="#" class="close-button" {{action 'toggle'}}>Close</a> {{/modal-dialog}} {{/liquid-if}} <br> Thanks <a href="https://github.com/yapplabs/ember-modal-dialog/issues/199#issuecomment-309583342">billdami</a> for suggesting: <pre>overlayPosition='sibling'</pre> <!-- <br><br> Working around problem using CSS to hide "ghost" modal: <pre> .ember-modal-overlay ~ .ember-modal-dialog { display: none !important; } </pre> --> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ import Ember from 'ember'; export default function destroyApp(application) { Ember.run(application, 'destroy'); } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ import Resolver from '../../resolver'; import config from '../../config/environment'; const resolver = Resolver.create(); resolver.namespace = { modulePrefix: config.modulePrefix, podModulePrefix: config.podModulePrefix }; export default resolver; 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ import Ember from 'ember'; import Application from '../../app'; import config from '../../config/environment'; const { run } = Ember; const assign = Ember.assign || Ember.merge; export default function startApp(attrs) { let application; let attributes = assign({rootElement: "#test-root"}, config.APP); attributes = assign(attributes, attrs); // use defaults, but you can override; run(() => { application = Application.create(attributes); application.setupForTesting(); application.injectTestHelpers(); }); return application; } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ import resolver from './helpers/resolver'; import { setResolver } from 'ember-qunit'; setResolver(resolver); 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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ { "version": "0.12.1", "ENV": { "ember-modal-dialog": { "hasLiquidWormhole": "2.0.5", "hasLiquidTether": "2.0.4", "hasEmberTether": "1.0.0-beta.0" } }, "EmberENV": { "FEATURES": {} @@ -16,7 +16,7 @@ }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js", "ember": "2.12.0", "ember-modal-dialog": "2.2.0", "ember-tether": "1.0.0-beta.0", "liquid-fire": "0.27.3", -
jacobq revised this gist
Jun 13, 2017 . 3 changed files with 12 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ // Problem happens regardless of duration, but unless using // the `.velocity-animating` CSS hack it is easier to see with longer durations. const options = {duration: 1000, easing: 'easeInOutQuad'}; export default function(){ this.transition( @@ -9,10 +9,10 @@ export default function(){ // this has a glitch; can see second copy/ghost of modal in top left when closing this.use('explode', { pick: '.ember-modal-dialog', use: ['fade', options] }, { pick: '.ember-modal-overlay', use: ['fade', options] }) ); 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 charactersOriginal file line number Diff line number Diff line change @@ -5,10 +5,17 @@ body { border: 0; } /* Hack #1 -- almost does the trick but still flashes briefly */ /* .ember-modal-overlay.velocity-animating .ember-modal-dialog { display: none !important; } */ /* Hack #2 -- works but quite fragile (depends on liquid-fire explode ordering, etc.) */ .ember-modal-overlay ~ .ember-modal-dialog { display: none !important; } /* Taken from ember-modal-structure.scss, adapted for compatibility */ .ember-modal-dialog { 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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ show: {{show}}<br> <br><br> Working around problem using CSS to hide "ghost" modal: <pre> .ember-modal-overlay ~ .ember-modal-dialog { display: none !important; } </pre> -
jacobq revised this gist
Jun 13, 2017 . 2 changed files with 19 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,16 @@ /* Avoid scrollbars */ body { margin: 0; padding: 0; border: 0; } /* Hack to try to fix -- almost does the trick but still flashes briefly */ .ember-modal-overlay.velocity-animating .ember-modal-dialog { display: none !important; } /* Taken from ember-modal-structure.scss, adapted for compatibility */ .ember-modal-dialog { z-index: 51; position: fixed; @@ -20,7 +27,9 @@ } .ember-modal-wrapper.emd-animatable.emd-wrapper-target-attachment-center { width: 100%; width: 100vw; height: 100%; height: 100vh; position: fixed; top: 0; @@ -41,7 +50,9 @@ } .ember-modal-overlay { width: 100%; width: 100vw; height: 100%; height: 100vh; position: fixed; top: 0; @@ -50,13 +61,15 @@ } /* Taken from ember-modal-appearance.scss and adapted for compatibility */ .ember-modal-dialog { border-radius: 8px; background-color: #fff; box-shadow: 0 0 10px #222; padding: 10px; } .ember-modal-overlay.translucent { background-color: grey; background-color: rgba(127, 127, 127, 0.77); background-color: rgba(#808080, .77); } 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 charactersOriginal file line number Diff line number Diff line change @@ -10,10 +10,10 @@ show: {{show}}<br> <a href="#" class="close-button" {{action 'toggle'}}>Close</a> {{/modal-dialog}} {{/liquid-if}} <br><br> Working around problem using CSS to hide "ghost" modal: <pre> .ember-modal-overlay.velocity-animating .ember-modal-dialog { display: none !important; } </pre> -
jacobq revised this gist
Jun 13, 2017 . 3 changed files with 19 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,14 @@ // Problem happens regardless of duration, but unless using // the `.velocity-animating` CSS hack it is easier to see with longer durations. const options = {duration: 200, easing: 'easeInOutQuad'}; export default function(){ this.transition( // this works //this.use('fade') // this has a glitch; can see second copy/ghost of modal in top left when closing this.use('explode', { pick: '.ember-modal-overlay', use: ['fade', options] }, { 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ /* Hack to try to fix -- almost does the trick but still flashes briefly */ .ember-modal-overlay.velocity-animating .ember-modal-dialog { display: none !important; } /* Taken from ember-modal-structure.scss */ .ember-modal-dialog { z-index: 51; 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 charactersOriginal file line number Diff line number Diff line change @@ -10,3 +10,10 @@ show: {{show}}<br> <a href="#" class="close-button" {{action 'toggle'}}>Close</a> {{/modal-dialog}} {{/liquid-if}} <br> <p>Using CSS to hide "ghost" modal:</p> <pre> .ember-modal-overlay.velocity-animating .ember-modal-dialog { display: none !important; } </pre> -
jacobq revised this gist
Jun 13, 2017 . 1 changed file with 5 additions and 14 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -45,22 +45,13 @@ } /* Taken from ember-modal-appearance.scss */ .ember-modal-dialog { border-radius: 8px; background-color: #fff; box-shadow: 0 0 10px #222; padding: 10px; } .ember-modal-overlay.translucent { background-color: rgba(#808080, .77); } -
jacobq revised this gist
Jun 13, 2017 . 1 changed file with 16 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ const options = {duration: 2000, easing: 'easeInOutQuad'}; export default function(){ this.transition( //this.use('fade') // this works // this has a glitch; can see second copy/ghost of modal in top left when closing this.use('explode', { pick: '.ember-modal-overlay', use: ['fade', options] }, { pick: '.ember-modal-dialog', use: ['fade', options] }) ); }; -
jacobq revised this gist
Jun 13, 2017 . 3 changed files with 76 additions and 25 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,33 +1,66 @@ /* Taken from ember-modal-structure.scss */ .ember-modal-dialog { z-index: 51; position: fixed; } .ember-modal-dialog.emd-in-place { position: static; } .ember-modal-wrapper.emd-static.emd-wrapper-target-attachment-center .ember-modal-dialog { top: 50%; left: 50%; transform: translate(-50%, -50%); } .ember-modal-wrapper.emd-animatable.emd-wrapper-target-attachment-center { width: 100vw; height: 100vh; position: fixed; top: 0; left: 0; z-index: 50; display: flex; align-items: center; justify-content: center; } .ember-modal-wrapper.emd-animatable.emd-wrapper-target-attachment-center .ember-modal-overlay { display: flex; align-items: center; justify-content: center; } .ember-modal-wrapper.emd-animatable .ember-modal-dialog { position: relative; } .ember-modal-overlay { width: 100vw; height: 100vh; position: fixed; top: 0; left: 0; z-index: 50; } /* Custom */ .ember-modal-dialog { min-width: 80%; min-height: 25%; /* border: 1px solid black; */ border-radius: 8px; padding: 20px; background-color: white; box-shadow: 0 0 10px #222; } .close-button { } .ember-modal-overlay.translucent { background-color: grey; background-color: rgba(127, 127, 127, 0.75); } 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,12 @@ <h1>Welcome to {{appName}}</h1> show: {{show}}<br> <a href="#" {{action 'toggle'}}>Toggle</a> {{#liquid-if show}} {{#modal-dialog onClose='toggle' translucentOverlay=true animatable=true }}<p>Oh hai there!</p> <a href="#" class="close-button" {{action 'toggle'}}>Close</a> {{/modal-dialog}} {{/liquid-if}} 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,12 @@ { "version": "0.12.1", "ENV": { "ember-modal-dialog": { "hasLiquidWormhole": "2.0.5", "hasLiquidTether": "2.0.4", "hasEmberTether": "1.0.0-beta.0" } }, "EmberENV": { "FEATURES": {} }, @@ -8,14 +15,19 @@ "enable-testing": false }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js", "ember": "2.12.0", "ember-modal-dialog": "2.2.0", "ember-tether": "1.0.0-beta.0", "liquid-fire": "0.27.3", "liquid-tether": "2.0.4", "liquid-wormhole": "2.0.5" }, "addons": { "liquid-fire": "0.27.3", "liquid-tether": "2.0.4", "liquid-wormhole": "2.0.5", "ember-tether": "1.0.0-beta.0", "ember-modal-dialog": "2.2.0" } } -
jacobq revised this gist
Jun 12, 2017 . 3 changed files with 17 additions and 9 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,11 @@ import Ember from 'ember'; export default Ember.Controller.extend({ appName: 'ember-modal-dialog test', show: false, actions: { toggle() { this.toggleProperty('show'); } } }); 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ <h1>Welcome to {{appName}}</h1> show: {{show}}<br> <a href='' {{action 'toggle'}}>Toggle</a> {{#liquid-if show}} {{#modal-dialog onClose='toggle'}}Oh hai there!{{/modal-dialog}} {{/liquid-if}} 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ { "version": "0.9.0", "EmberENV": { "FEATURES": {} }, @@ -11,9 +11,11 @@ "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", "ember": "2.9.0", "ember-data": "2.8.0", "ember-template-compiler": "2.9.0", "liquid-fire": "0.27.3", "liquid-wormhole": "2.0.5" }, "addons": { "ember-modal-dialog": "2.2.0" } } -
Gaurav0 revised this gist
Oct 18, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,9 +9,9 @@ }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", "ember": "2.9.0", "ember-data": "2.8.0", "ember-template-compiler": "2.9.0" }, "addons": { "ember-modal-dialog": "0.9.0" -
Gaurav0 revised this gist
Oct 13, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,11 +9,11 @@ }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", "ember": "2.9.0-beta.4", "ember-data": "2.8.0", "ember-template-compiler": "2.9.0-beta.4" }, "addons": { "ember-modal-dialog": "0.9.0" } } -
Gaurav0 revised this gist
Oct 13, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", "ember": "2.8.0", "ember-data": "2.8.0", "ember-template-compiler": "2.8.0" }, "addons": { -
Gaurav0 revised this gist
Oct 13, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,9 +9,9 @@ }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", "ember": "2.8.0", "ember-data": "2.7.0", "ember-template-compiler": "2.8.0" }, "addons": { "ember-modal-dialog": "0.8.3" -
Gaurav0 revised this gist
Jul 29, 2016 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,11 +9,11 @@ }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", "ember": "2.7.0", "ember-data": "2.7.0", "ember-template-compiler": "2.7.0" }, "addons": { "ember-modal-dialog": "0.8.3" } } -
Gaurav0 revised this gist
Apr 13, 2016 . No changes.There are no files selected for viewing
-
Gaurav0 revised this gist
Apr 13, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ body { font-size: 12pt; } // Have to copy this from addon due to no support for scss .ember-modal-overlay { height: 100%; left: 0; -
Gaurav0 revised this gist
Apr 13, 2016 . 2 changed files with 33 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ body { margin: 12px 16px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12pt; } .ember-modal-overlay { height: 100%; left: 0; position: fixed; right: 0; top: 0; z-index: 50; } .ember-modal-dialog { z-index: 50; position: fixed; &.ember-modal-dialog-in-place { position: relative; } } .ember-modal-dialog { border-radius: 8px; background-color: #fff; box-shadow: 0 0 10px #222; padding: 10px; } .ember-modal-overlay.translucent { background-color: rgba(#808080, .77); } 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ <h1>Welcome to {{appName}}</h1> <br> <br> {{#modal-dialog}}Oh hai there!{{/modal-dialog}} <br> <br> -
Gaurav0 created this gist
Apr 13, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ import Ember from 'ember'; export default Ember.Controller.extend({ appName: 'Ember Twiddle' }); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ <h1>Welcome to {{appName}}</h1> <br> <br> {{#modal-dialog}}hi{{/modal-dialog}} <br> <br> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ { "version": "0.7.2", "EmberENV": { "FEATURES": {} }, "options": { "use_pods": false, "enable-testing": false }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", "ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.4.4/ember.debug.js", "ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.4.3/ember-data.js", "ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.4.4/ember-template-compiler.js" }, "addons": { "ember-modal-dialog": "0.8.3" } }