Skip to content

Commit

Permalink
file uploader and loader
Browse files Browse the repository at this point in the history
  • Loading branch information
vietnogi committed Feb 2, 2016
1 parent 0da8081 commit c683e61
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ deploy:
env:
global:
# NPM_EMAIL
- secure: "XVgfIy4vm0kOX+saefkpE98aHSzvSk0S9OydHC2/TfNnnfJfrdySOPyuVhfgtap/pKd9R2VtofSCIAy1bRNeE3wsFOpXNv/V/wQQ40cyJGQRL6uCJDkc7yvYnhCh5ZD6Jh2kJzB2FcT8V18+u12Azftbxz+SM0/wk4tgw5akRtUGVEZ01PaivY4VIESJ2qBJZiXeKfMCtCDi/a3OnUMUA6b8tbP+n35zl6JZGJtJhwcYqliyxzgnIR5bCDqPcab32cHsdcb7E8+Q/Co8vYc2ZVI6aQ/Oe+Cd2ON+WyTHZoWfKlKnXuYJ3DUnUxaDRTgfz+AdFZHwvlwfuDLexoTOS5Lps/aNh5/4kt7LwJyj3N4kxW/XgoZzJvn6foIYCqd6RnvTp05PVTUWiLKQwiMN9QxTLPhVv0RBqo+N9sDflq4eORv9WlsRF3XawZIr8GSqLiu7WM8w9wzdn66V94j4qO+gHQH/U3ck4z4Bie+QeDeOc8oYckbH5PaUcoRc3vEnGy9YKMwZ0RwJKZHXLE+g4xbDzJfhovC6835Hb6Sj81muSz4E8WVAsnyEtLs+JaWHA90qpfwsNB11aZHB7YO0HrHnMKA9P1F6A8eRagj6Ynhbl5Ko4Agtz0bqHVhyWi9bcF1V8WneuJSreC9naoWVvLYoyKc4UY/Qt7j7mdynm7w="
- secure: "kmo0afPY5HwJ5SryNY0XRRRekxd1teBR6lSiw2jtjU64sOdpjN7ZhGWy9q0lReGk6hloPfXewXRlpCbcDRFoxvJUdAbQoAN8gq/BxrwGmWlBepgUew1O6WLkpvqXCMe6lUmPEznjil2anjLHfm/cKiqwaY1n8MI+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EvmRpEy8KDvc/VtdBEXRCx2MZ/SGT4Q0h3Q4bdbeFDaXz8slLqt9uKhzHI5e+1CU5csHwpzkXrnsX/JZWYZtCT+3QopMwZYuDUNYF0hIJNCps6NCODrU2MulokcbTxUDMSkA8GQlNriGgF/0="
- secure: "OoRE9rbEzfAomE1h+PRDHJb0SgcyManma54qs72nwlBA3N4D+hV2Swy0xAidnVqdNvBlA4p9QmcrE0km+ZGVacFEhvleUGFDn5weWde2bukzkkdHtbaYQjyhxbrqfLA9G9vzs1BlHjhrR7Arl2TQuT21XnfagFBQ/LCgCRRu9yHHkZ4TejhuYu/9Fgdq08wnBpLZn7wllUq0OtrDgEgjK7avZ+yv5ob6zccxr3NAAchbdPJ2yUo82VvD+YdQaWbLq9ac5cwa0I6f/RuQUiZcLZItk/H3NuQqg32746QdwIqKpw5dh9wzddbckIK3WVsoJmE+7WpGAOgUU/TxmPijH6j1YwQ9uqcBGsax8RUFR+mG7imlS4YpL67K438JPUG7NCPgnN19zN/c+4WkVoKlLYEncyPp0C3sBbmauR0uuuVBWWUJL/1xBCuPyhT9JGXaocms/Ldshxr+TYf1tfQQ3uzs6wO3cniw3wIgXbgMF6NBwQdQpgUlSh++XJKgIG2I228GI3qMq8zJu/N/1oEKVkKkO8Z9Y3Vd5uo2VMbkp0KJJEfXnE8GZBBaajD+F8jONRQqYEDhK8EMYuqKhsQZMw3RgPtvOZNG+bhcnbElNnMjhd8CTKioKXAslkTP6Esi4Ce2PS6YR4CskjZaO7IT9KRqHvVZN42vlIVbhb2J0RI="
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Install

```shell
npm install appirio-tech-file-uploader
npm install appirio-tech-react-components
```

## Developing
Expand Down
2 changes: 1 addition & 1 deletion components/FileUploader/FileUploader.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require './FileUploaderStyles'
React = require 'react'
UploadedFilesContainer = require '../UploadedFiles/UploadedFilesContainer'
Dropzone = require 'react-dropzone'
Loader = require 'appirio-tech-ng-ui-components/components/Loader/Loader.cjsx'
Loader = require '../Loader/Loader.cjsx'

FileUploader = ({ multiple, onChange, loading}) ->
<div className="FileUploader">
Expand Down
4 changes: 2 additions & 2 deletions components/FileUploader/FileUploaderExamples.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ FileUploaderExamples = ->

<FileUploader/>

<h1>multiple is true</h1>
<h1>loading is true</h1>

<FileUploader multiple={true} id={'123'} assetType={'work'} category={'development'}/>
<FileUploader loading={true} id={'123'} assetType={'work'} category={'development'}/>
</div>

module.exports = FileUploaderExamples
14 changes: 14 additions & 0 deletions components/Loader/Loader.cjsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict'

require './LoaderStyle.scss'

React = require 'react'

Loader = ->
<div className="Loader">
<div className="container">
<div className="loader"/>
</div>
</div>

module.exports = Loader
13 changes: 13 additions & 0 deletions components/Loader/LoaderExamples.cjsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict'

Loader = require './Loader'
React = require 'react'

LoaderExamples = ->
<div className="LoaderExamples flex column middle center">
<h1>Default</h1>

<Loader />
</div>

module.exports = LoaderExamples
61 changes: 61 additions & 0 deletions components/Loader/LoaderStyle.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@import "work/work-includes";

.Loader {
position : absolute;
display : flex;
top : 0;
left : 0;
width : 100%;
height : 100%;
justify-content: center;
align-items : center;

.container {
padding : 25px;
// background-color: $primary-color;
opacity : .98;
border-radius : 10px;
}

.loader {
width: 50px;
height: 50px;
border-top : 10px solid $grey-light;
border-right : 10px solid $grey-light;
border-bottom : 10px solid $grey-light;
border-left : 10px solid $grey-lighter ;
-webkit-transform: translateZ(0);
-ms-transform : translateZ(0);
transform : translateZ(0);
-webkit-animation: load8 .8s infinite linear;
animation : load8 .8s infinite linear;
}
.loader,
.loader:after {
border-radius: 50%;
}


}

@-webkit-keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}

@keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
"build": "webpack --config webpack.config.js; cp example/index.html dist/"
},
"dependencies": {
"appirio-styles": "0.x.x",
"appirio-tech-client-app-layer": "0.x.x",
"react-dropzone": "3.x.x",
"react-redux": "4.x.x"
"appirio-styles": "0.0.23",
"appirio-tech-api-schemas": "^5.0.69",
"classnames": "^2.2.3",
"react-dropzone": "^3.3.2",
"react-redux": "^4.2.1"
}
}

0 comments on commit c683e61

Please sign in to comment.