First React in Subscribers.

This commit is contained in:
marco
2015-08-20 20:13:12 +02:00
parent eda2188611
commit ec0c20a1c5
4 changed files with 2978 additions and 2982 deletions

View File

@ -0,0 +1,15 @@
define('subscribers', ['react'], function(React) {
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
Hello, world! I am a CommentBox.
</div>
);
}
});
React.render(
<CommentBox />,
document.getElementById('subscribers-container')
);
});

22
composer.lock generated
View File

@ -1211,16 +1211,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "4.8.4", "version": "4.8.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "55bf1d6092b0e13a1f26bd5eaffeef3d8ad85ea7" "reference": "9b7417edaf28059ea63d86be941e6004dbfcc0cc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/55bf1d6092b0e13a1f26bd5eaffeef3d8ad85ea7", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9b7417edaf28059ea63d86be941e6004dbfcc0cc",
"reference": "55bf1d6092b0e13a1f26bd5eaffeef3d8ad85ea7", "reference": "9b7417edaf28059ea63d86be941e6004dbfcc0cc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1279,24 +1279,24 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2015-08-15 04:21:23" "time": "2015-08-19 09:20:57"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
"version": "2.3.6", "version": "2.3.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "18dfbcb81d05e2296c0bcddd4db96cade75e6f42" "reference": "5e2645ad49d196e020b85598d7c97e482725786a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/18dfbcb81d05e2296c0bcddd4db96cade75e6f42", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5e2645ad49d196e020b85598d7c97e482725786a",
"reference": "18dfbcb81d05e2296c0bcddd4db96cade75e6f42", "reference": "5e2645ad49d196e020b85598d7c97e482725786a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/instantiator": "~1.0,>=1.0.2", "doctrine/instantiator": "^1.0.2",
"php": ">=5.3.3", "php": ">=5.3.3",
"phpunit/php-text-template": "~1.2", "phpunit/php-text-template": "~1.2",
"sebastian/exporter": "~1.2" "sebastian/exporter": "~1.2"
@ -1335,7 +1335,7 @@
"mock", "mock",
"xunit" "xunit"
], ],
"time": "2015-07-10 06:54:24" "time": "2015-08-19 09:14:08"
}, },
{ {
"name": "psr/http-message", "name": "psr/http-message",

View File

@ -2,25 +2,6 @@
<% block content %> <% block content %>
<h1><%= 'Subscribers' %></h1> <h1><%= 'Subscribers' %></h1>
<div id="subscribers-container">
<script type="text/javascript"> </div>
jQuery(function($) {
// dom loaded
$(function() {
MailPoet.Ajax.post({
endpoint: 'subscribers',
action: 'get',
data: {
first_name: 'John'
},
onSuccess: function(response) {
// console.log(response);
}
});
});
});
</script>
<% endblock %> <% endblock %>

View File

@ -34,7 +34,7 @@ config.push(_.extend({}, baseConfig, {
entry: { entry: {
vendor: ['handlebars', 'handlebars_helpers'], vendor: ['handlebars', 'handlebars_helpers'],
mailpoet: ['mailpoet', 'ajax', 'modal', 'notice'], mailpoet: ['mailpoet', 'ajax', 'modal', 'notice'],
admin: ['settings.jsx'] admin: ['settings.jsx', 'subscribers.jsx']
}, },
plugins: [ plugins: [
new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js'), new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js'),