[Ivan Diaz] - Added images to langauge dropdown

This commit is contained in:
Ivan Diaz 2015-10-17 20:56:42 -03:00
parent 440d9bb469
commit b26edc3d8f
252 changed files with 28 additions and 13 deletions

View File

@ -10,7 +10,7 @@ import Checkbox from 'core-components/checkbox';
import Widget from 'core-components/widget'; import Widget from 'core-components/widget';
import DropDown from 'core-components/drop-down'; import DropDown from 'core-components/drop-down';
var dropDownItems = ['English', 'Spanish', 'German', 'Portuguese', 'Japanese']; var dropDownItems = [{content: 'English'}, {content: 'Spanish'}, {content: 'German'}, {content: 'Portuguese'}, {content: 'Japanese'}];
var DemoPage = React.createClass({ var DemoPage = React.createClass({

View File

@ -6,9 +6,15 @@ import CommonActions from 'actions/common-actions';
import Button from 'core-components/button'; import Button from 'core-components/button';
import DropDown from 'core-components/drop-down'; import DropDown from 'core-components/drop-down';
var MainLayoutHeader = React.createClass({ var languageList = ['English', 'Spanish', 'Portuguese', 'German'];
var codeLanguages = {
'English': 'en',
'Spanish': 'es',
'Portuguese': 'pt',
'German': 'de'
};
languageList: ['English', 'Spanish', 'Portuguese', 'German'], var MainLayoutHeader = React.createClass({
render() { render() {
return ( return (
@ -17,19 +23,25 @@ var MainLayoutHeader = React.createClass({
<Button type="clean" route={{to:'/app'}}>{i18n('LOG_IN')}</Button> <Button type="clean" route={{to:'/app'}}>{i18n('LOG_IN')}</Button>
<Button type="clean" route={{to:'/app/signup'}}>{i18n('SIGN_UP')}</Button> <Button type="clean" route={{to:'/app/signup'}}>{i18n('SIGN_UP')}</Button>
</div> </div>
<DropDown className="main-layout-header--languages" items={this.languageList} onChange={this.changeLanguage}/> <DropDown className="main-layout-header--languages" items={this.getLanguageList()} onChange={this.changeLanguage}/>
</div> </div>
); );
}, },
changeLanguage(event) { getLanguageList() {
var codeLanguages = { return languageList.map((item) => {
'English': 'en', return {
'Spanish': 'es', content: (
'Portuguese': 'pt', <span>
'German': 'de' <img src={`../images/icons/${codeLanguages[item]}.png`} />{item}
</span>
)
}; };
var language = this.languageList[event.index]; });
},
changeLanguage(event) {
var language = languageList[event.index];
CommonActions.changeLanguage(codeLanguages[language]); CommonActions.changeLanguage(codeLanguages[language]);
} }

BIN
src/assets/images/icons/ad.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

BIN
src/assets/images/icons/ae.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

BIN
src/assets/images/icons/af.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

BIN
src/assets/images/icons/ag.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

BIN
src/assets/images/icons/ai.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

BIN
src/assets/images/icons/al.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

BIN
src/assets/images/icons/am.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

BIN
src/assets/images/icons/an.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

BIN
src/assets/images/icons/ar.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

BIN
src/assets/images/icons/as.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

BIN
src/assets/images/icons/at.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

BIN
src/assets/images/icons/au.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
src/assets/images/icons/aw.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

BIN
src/assets/images/icons/ax.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

BIN
src/assets/images/icons/az.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
src/assets/images/icons/ba.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

BIN
src/assets/images/icons/bb.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

BIN
src/assets/images/icons/bd.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

BIN
src/assets/images/icons/be.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

BIN
src/assets/images/icons/bf.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

BIN
src/assets/images/icons/bg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

BIN
src/assets/images/icons/bh.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

BIN
src/assets/images/icons/bi.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

BIN
src/assets/images/icons/bj.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

BIN
src/assets/images/icons/bm.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

BIN
src/assets/images/icons/bn.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

BIN
src/assets/images/icons/bo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

BIN
src/assets/images/icons/br.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

BIN
src/assets/images/icons/bs.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

BIN
src/assets/images/icons/bt.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

BIN
src/assets/images/icons/bv.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

BIN
src/assets/images/icons/bw.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

BIN
src/assets/images/icons/by.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

BIN
src/assets/images/icons/bz.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

BIN
src/assets/images/icons/ca.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

BIN
src/assets/images/icons/cc.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

BIN
src/assets/images/icons/cf.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

BIN
src/assets/images/icons/cg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

BIN
src/assets/images/icons/ch.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

BIN
src/assets/images/icons/ci.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

BIN
src/assets/images/icons/ck.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

BIN
src/assets/images/icons/cl.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

BIN
src/assets/images/icons/cm.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

BIN
src/assets/images/icons/cn.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

BIN
src/assets/images/icons/co.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

BIN
src/assets/images/icons/cr.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

BIN
src/assets/images/icons/cs.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

BIN
src/assets/images/icons/cu.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

BIN
src/assets/images/icons/cv.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

BIN
src/assets/images/icons/cx.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

BIN
src/assets/images/icons/cy.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

BIN
src/assets/images/icons/cz.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

BIN
src/assets/images/icons/de.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

BIN
src/assets/images/icons/dj.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

BIN
src/assets/images/icons/dk.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

BIN
src/assets/images/icons/dm.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

BIN
src/assets/images/icons/do.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

BIN
src/assets/images/icons/dz.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

BIN
src/assets/images/icons/ec.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

BIN
src/assets/images/icons/ee.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

BIN
src/assets/images/icons/eg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

BIN
src/assets/images/icons/eh.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

BIN
src/assets/images/icons/en.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

BIN
src/assets/images/icons/er.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
src/assets/images/icons/es.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

BIN
src/assets/images/icons/et.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

BIN
src/assets/images/icons/fam.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

BIN
src/assets/images/icons/fi.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

BIN
src/assets/images/icons/fj.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

BIN
src/assets/images/icons/fk.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

BIN
src/assets/images/icons/fm.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

BIN
src/assets/images/icons/fo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

BIN
src/assets/images/icons/fr.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

BIN
src/assets/images/icons/ga.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

BIN
src/assets/images/icons/gd.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

BIN
src/assets/images/icons/ge.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

BIN
src/assets/images/icons/gf.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

BIN
src/assets/images/icons/gh.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

BIN
src/assets/images/icons/gi.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

BIN
src/assets/images/icons/gl.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

BIN
src/assets/images/icons/gm.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

BIN
src/assets/images/icons/gn.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

BIN
src/assets/images/icons/gp.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

BIN
src/assets/images/icons/gq.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

BIN
src/assets/images/icons/gr.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

BIN
src/assets/images/icons/gs.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

BIN
src/assets/images/icons/gt.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

BIN
src/assets/images/icons/gu.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

BIN
src/assets/images/icons/gw.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

BIN
src/assets/images/icons/gy.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

BIN
src/assets/images/icons/hk.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Some files were not shown because too many files have changed in this diff Show More