Get rid of jQuery

This commit is contained in:
2015-03-17 16:18:13 +07:00
parent c27ad86947
commit bb0154638a
6 changed files with 11 additions and 13 deletions
-1
View File
@@ -4,7 +4,6 @@
"dependencies": {
"react": "0.12.2",
"react-router": "0.12.4",
"jquery": "2.1.3",
"lodash": "3.5.0",
"normalize.css": "3.0.2"
}
+1 -1
View File
@@ -19,8 +19,8 @@
<script src="/bower_components/react/react.js"></script>
<script src="/bower_components/react-router/build/global/ReactRouter.js"></script>
<script src="/bower_components/lodash/lodash.js"></script>
<script src="/bower_components/jquery/dist/jquery.js"></script>
<script src="/js/date.js"></script>
<script src="/js/http.js"></script>
<script src="/js/colors.js"></script>
<script src="/js/svground.js"></script>
<script src="/jsx/build/charts/charts.js"></script>
+6 -6
View File
@@ -16,8 +16,8 @@ var App = React.createClass({
mixins: [Router.Navigation, Router.State],
orgsURL: '/api/orgs',
teamsURL: '/api/teams?org=',
usersURL: '/api/users?org=',
teamsURL: '/api/teams',
usersURL: '/api/users',
getInitialState: function() {
return {
@@ -35,7 +35,7 @@ var App = React.createClass({
},
loadOrgs: function() {
$.get(this.orgsURL, function(res){
getURL(this.orgsURL, {}, function(res) {
this.setState({orgs: res});
if (res !== null) {
for (var i = 0; i < res.length; i++) {
@@ -47,7 +47,7 @@ var App = React.createClass({
},
loadTeams: function() {
$.get(this.teamsURL + this.getParams().org, function(res){
getURL(this.teamsURL, {org: this.getParams().org}, function(res) {
this.setState({teams: res});
if (res !== null) {
for (var i = 0; i < res.length; i++) {
@@ -59,7 +59,7 @@ var App = React.createClass({
},
loadUsers: function() {
$.get(this.usersURL + this.getParams().org, function(res){
getURL(this.usersURL, {org: this.getParams().org}, function(res) {
this.setState({users: res});
if (res !== null) {
for (var i = 0; i < res.length; i++) {
@@ -70,7 +70,7 @@ var App = React.createClass({
}.bind(this));
},
render: function(){
render: function() {
return (
<div className="master">
<div className="app" id="app">
+1 -1
View File
@@ -37,7 +37,7 @@ var ChartDataMixin = {
currentParams: paramsHash,
state: 'loadingData'
}, function() {
$.get(this.props.api, this.apiParams(), function(res){
getURL(this.props.api, this.apiParams(), function(res){
this.setState({
rawData: res || [],
state: 'newData'