2014-11-10 23:35:35 +01:00
|
|
|
define([
|
2014-12-03 10:45:31 +01:00
|
|
|
'react/addons',
|
2014-11-10 23:35:35 +01:00
|
|
|
'lodash'
|
|
|
|
], function (React, _) {
|
2014-11-11 10:27:59 +01:00
|
|
|
'use strict';
|
2014-11-11 17:19:00 +01:00
|
|
|
function onClick1(items, itemsIndex, evt) {
|
2014-11-10 23:35:35 +01:00
|
|
|
this.happend(evt);
|
|
|
|
return false;
|
|
|
|
}
|
2014-11-12 23:25:12 +01:00
|
|
|
function onMouseDown2(items, itemsIndex) {
|
|
|
|
this.happend();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
function repeatItems3(items, itemsIndex) {
|
2014-12-04 13:40:54 +01:00
|
|
|
return React.createElement('div', {}, React.createElement('span', {
|
2014-11-12 09:48:22 +01:00
|
|
|
'style': {
|
|
|
|
width: 'auto',
|
|
|
|
lineHeight: '5px'
|
|
|
|
},
|
2014-11-12 23:25:12 +01:00
|
|
|
'onClick': onClick1.bind(this, items, itemsIndex),
|
|
|
|
'onMouseDown': onMouseDown2.bind(this, items, itemsIndex)
|
2014-11-12 09:48:22 +01:00
|
|
|
}, 'Mock'));
|
2014-11-11 17:19:00 +01:00
|
|
|
}
|
2014-11-10 23:35:35 +01:00
|
|
|
return function () {
|
2014-12-04 13:40:54 +01:00
|
|
|
return React.createElement.apply(this, _.flatten([
|
|
|
|
'p',
|
2014-11-12 09:48:22 +01:00
|
|
|
{},
|
2014-11-12 23:25:12 +01:00
|
|
|
_.map(this.props.things, repeatItems3.bind(this))
|
2014-11-12 09:48:22 +01:00
|
|
|
]));
|
2014-11-10 23:35:35 +01:00
|
|
|
};
|
|
|
|
});
|