Last active
June 22, 2021 14:38
-
-
Save mohamedali-s-4725/248e604a8bc5a424061c60031b74bf70 to your computer and use it in GitHub Desktop.
Property dialog - POC
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({ | |
selected_comp_name: '' | |
}); |
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({ | |
}); |
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({ | |
}); |
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({ | |
willDestroyElement(){ | |
alert( 'Component destroyed!' ); | |
} | |
}); |
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({ | |
}); |
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({ | |
title: '', | |
tab_index: '', | |
custom_class:'', | |
custom_event: 'mouseMove' | |
}); |
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({ | |
}); |
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({ | |
tabs_and_content: [], | |
active_tab_index: 0, | |
active_obj: '', | |
didReceiveAttrs(){ | |
var tab_index = this.get( 'active_tab_index' ), | |
total_tabs = Object.keys( this.get( 'tabs_and_content' ) ).length; | |
tab_index = total_tabs >= tab_index && tab_index > 0 ? tab_index : 1 ; | |
this.send( 'changeTab', tab_index, tab_index - 1 ); | |
}, | |
actions:{ | |
changeTab( tab, index ){ | |
var tabs_and_content = this.get( 'tabs_and_content' ); | |
tab = typeof( tab ) === 'string' ? tab : tab - 1 ; | |
this.set( 'active_obj', typeof( tab ) === 'string' ? tabs_and_content.filterBy( 'tab_name', tab )[0] : tabs_and_content[ tab ] ); | |
this.set( 'active_tab_index', index ); | |
} | |
} | |
}); |
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', | |
tabs_and_content: [ | |
{ 'tab_name': 'Smileys', 'comp_name': 'tab-one', 'custom_class': '๐' }, | |
{ 'tab_name': 'Activity', 'comp_name': 'tab-two', 'custom_class': 'โฝ' }, | |
{ 'tab_name': 'Flags', 'comp_name': 'tab-three', 'custom_class': '๐' }, | |
{ 'tab_name': 'Travel', 'comp_name': 'tab-four', 'custom_class': '๐ ' }, | |
{ 'tab_name': 'Animals', 'comp_name': 'tab-five', 'custom_class': '๐ป' } | |
] | |
}); |
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'; | |
const eq = (params) => params[0] === params[1]; | |
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; | |
} | |
.wrapper{ | |
border: solid 1px; | |
padding: 10px; | |
} | |
.title{ | |
display: inline-block; | |
border: solid 1px; | |
cursor: pointer; | |
margin-bottom: 5px; | |
margin-top: 5px; | |
} | |
.title div{ | |
padding: 5px 10px; | |
} | |
.title:hover{ | |
color: green; | |
border: solid 2px; | |
margin-right: -2px; | |
margin-bottom: -2px; | |
margin-top: -2px; | |
} | |
.content{ | |
border: solid 1px; | |
padding: 25px; | |
text-align: center; | |
margin: 25px; | |
} | |
.active{ | |
color: green; | |
background: #DAF4EB; | |
} |
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.10.5", | |
"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.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