Get rid of jQuery
This commit is contained in:
		
							parent
							
								
									c27ad86947
								
							
						
					
					
						commit
						bb0154638a
					
				
							
								
								
									
										3
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								Makefile
									
									
									
									
									
								
							@ -6,10 +6,9 @@ cloc:
 | 
			
		||||
 | 
			
		||||
static:
 | 
			
		||||
	$(UGLIFY) \
 | 
			
		||||
		app/bower_components/react/react.js \
 | 
			
		||||
		app/bower_components/react/react.min.js \
 | 
			
		||||
		app/bower_components/react-router/build/global/ReactRouter.js \
 | 
			
		||||
		app/bower_components/lodash/lodash.js \
 | 
			
		||||
		app/bower_components/jquery/dist/jquery.js \
 | 
			
		||||
		app/js/* \
 | 
			
		||||
		app/jsx/build/*/* \
 | 
			
		||||
		> build/app.js
 | 
			
		||||
 | 
			
		||||
@ -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"
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -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>
 | 
			
		||||
 | 
			
		||||
@ -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">
 | 
			
		||||
 | 
			
		||||
@ -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'
 | 
			
		||||
 | 
			
		||||
@ -8,9 +8,9 @@
 | 
			
		||||
        <link rel="apple-touch-icon" sizes="114x114" href="/images/favicon_128.png">
 | 
			
		||||
        <link rel="apple-touch-icon" sizes="72x72" href="/images/favicon_128.png">
 | 
			
		||||
        <link rel="apple-touch-icon" sizes="144x144" href="/images/favicon_128.png">
 | 
			
		||||
        <link rel="stylesheet" href="/empact.css">
 | 
			
		||||
        <link rel="stylesheet" href="/app.css">
 | 
			
		||||
        <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600">
 | 
			
		||||
    </head>
 | 
			
		||||
    <body></body>
 | 
			
		||||
    <script src="/empact.js"></script>
 | 
			
		||||
    <script src="/app.js"></script>
 | 
			
		||||
</html>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user