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
/** | |
* Adds nb days to the specified date. | |
* @param {Date} the date. | |
* @param {Int} the number of days you want to add (or remove if negative). | |
* @return {Date} the shifted date. | |
*/ | |
var addDays = function(date, nb) { | |
// day duration in ms. | |
var DAY = 1000*60*60*24; | |
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
<!DOCTYPE html> | |
<html lang="fr-fr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ember App in an iframe</title> | |
<style> | |
body { | |
padding: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
function(value) { | |
if (Em.isNone(value)) { | |
return null; | |
} | |
var dur = moment.duration(value, 'seconds'); | |
var years = dur.years(); | |
var months = dur.months(); | |
var days = dur.days(); |
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({ | |
isCoco: false, | |
index: 0, | |
/* mouseEnter() { | |
this.set('isCoco', true); | |
return false; |
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', | |
field1: { | |
label: 'mon texte', | |
value: 'Coucou!', | |
isDirty: true | |
}, |
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', | |
field1: { | |
label: 'mon texte', | |
value: 'Coucou!', | |
isDirty: true | |
}, |
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', | |
field1: { | |
label: 'mon texte', | |
value: 'Coucou!', | |
isDirty: true | |
}, |
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' | |
}); |
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
export default { | |
CONTAINERS_COUNT: 1000, | |
PROPS_COUNT: 100 | |
} |
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 Em from 'ember' | |
export default Em.Object.extend({ | |
source: null, | |
context: Em.computed.alias('source.source'), | |
path: '', | |
data: Em.computed('context', 'path', { | |
get() { | |
console.log('definition de l\'objet data'); | |
var _data = this.get('_data'); |
OlderNewer