Last active
August 28, 2016 02:13
-
-
Save arthur5005/ae1863b1a9db22cc56c77021bea1dda7 to your computer and use it in GitHub Desktop.
Firefox Select Issue
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', | |
selectedVal: 3, | |
options: [ | |
{ value: 1, text: 'foo', disabled: false}, | |
{ value: 2, text: 'bar', disabled: false}, | |
{ value: 3, text: 'baz', disabled: false} | |
], | |
actions: { | |
getNewOptions() { | |
this.set('options', [ | |
{ value: 1, text: 'foo', disabled: false}, | |
{ value: 2, text: 'bar', disabled: true}, | |
{ value: 3, text: 'baz', disabled: 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 function ifCond(options) { | |
var v1 = options[0]; | |
var operator = options[1]; | |
var v2 = options[2]; | |
switch (operator) { | |
case '==': | |
return (v1 == v2); | |
case '===': | |
return (v1 === v2); | |
case '<': | |
return (v1 < v2); | |
case '<=': | |
return (v1 <= v2); | |
case '>': | |
return (v1 > v2); | |
case '>=': | |
return (v1 >= v2); | |
case '&&': | |
return (v1 && v2); | |
case '||': | |
return (v1 || v2); | |
default: | |
return false; | |
} | |
} | |
export default Ember.Helper.extend({ compute: ifCond }); | |
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.4", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "alpha", | |
"ember-data": "2.7.0", | |
"ember-template-compiler": "alpha" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment