Skip to content

Commit

Permalink
[feature] implement apply and save buttons
Browse files Browse the repository at this point in the history
- add buttons to apply effects and save
- work on improving coverage update on coveralls
  • Loading branch information
collinmutembei committed Mar 2, 2016
1 parent 5277cce commit c357467
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
omit =
*virtualenv*
*envs*
*api/migrations/*
*/migrations/*
*/python?.?/*
*__init__*
*/tests/*
Expand Down
45 changes: 24 additions & 21 deletions app/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,23 @@
{% block content %}
<div class="navbar" role="navigation">
<div class="container">
<div class="navbar-header">
<div class="navbar-header col-xs-6 col-md-6">
<a href="#"><img src="{% static 'images/phedit.gif' %}" alt="logo" class="brand-logo"/></a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="profile">
{% if user.is_authenticated and user.socialaccount_set.all.0.get_avatar_url %}
<img class="img-circle" src="{{ user.socialaccount_set.all.0.get_avatar_url }}" />
{% else %}
<img class="img-circle" src="{% static 'images/profile.png' %}" />
{% endif %}
</a>
</li>
</ul>
<div class="col-xs-6 col-md-6">
<a href="profile" class="pull-right">
{% if user.is_authenticated and user.socialaccount_set.all.0.get_avatar_url %}
<img class="img-circle" src="{{ user.socialaccount_set.all.0.get_avatar_url }}" />
{% else %}
<img class="img-circle" src="{% static 'images/profile.png' %}" />
{% endif %}
</a>
</div>
</div>
</div>
<div class="container" ng-controller="MyCtrl">
<div id="content" class="container" ng-controller="MyCtrl">
<div class="row">
<div class="col-md-8">
<div class="col-md-8 col-xs-12">
<div class="panel panel-default" ng-class="images.length ? 'workspace' : 'fixed-workspace'">
<div class="panel-body">
{% verbatim %}
Expand All @@ -40,25 +36,32 @@
<div class="drop-placeholder" ng-repeat="image in images | orderBy: '-created_at'">
<form name="form">
<div ngf-pattern="'image/*'" ngf-drop="upload($file)" ngf-min-height="100" ngf-multiple="false">

<!-- listen on emit on file upload to display image -->
{% verbatim %}
<div class="user-images">
<div class="image" ng-if="$first">
<img ng-src="{{image.image}}"/>
<div ng-if="image.image">
<img ng-src="{{image.image}}"/>
<div class="image-options">
<button type="button" class="btn btn-primary">apply</button>
<button type="button" class="btn btn-primary">save</button>
</div>
</div>
</div>

</div>
<!-- <img ng-src="{{image.image}}"/> -->
{% endverbatim %}

</div>
<div ngf-no-file-drop>File Drag/Drop is not supported for this browser</div>
</form>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-xs-12">
<div class="panel panel-default featured-content">
<div class="panel-body">
</div>
</div>
</div>
</div>
</div>
{% endblock %}
54 changes: 46 additions & 8 deletions app/templates/static/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
width: 131px;
height: 88px;
margin-top: -10px;
margin-left: -27px;
}

.btn-signin {
Expand All @@ -42,10 +43,10 @@

.fixed-workspace {
width: 100%;
min-height: 600px;
min-height: 500px;
z-index: 2;
position: relative;
border: dashed 5px #777;
border: 1px solid #999999;
border-radius: 20px;
background-color: #ddd;
}
Expand All @@ -55,7 +56,7 @@
min-height: auto;
z-index: 2;
position: relative;
border: dashed 5px #777;
border: 1px solid #999999;
border-radius: 20px;
background-color: #ddd;
}
Expand All @@ -69,16 +70,13 @@
height: 40px;
border: 2px solid #292c2f;
background-color: transparent;
margin: 16px 0px 0px 0px;
}

a:hover {
background-color: transparent;
}

.profile {
display: inline-block;
}

.drop-placeholder {
vertical-align: middle;
text-align: center;
Expand All @@ -93,7 +91,7 @@ a:hover {
width: 100%;
font: bold 16px sans-serif;
text-align: left;

z-index: 3;
padding: 30px 30px 30px;
margin-top: 80px;
overflow: hidden;
Expand Down Expand Up @@ -248,3 +246,43 @@ button .fa {
-webkit-transition: .3s all ease .3s;
transition: .3s all ease .3s;
}

.featured-content {
min-height: 200px;
border: 1px solid #999999;
border-radius: 20px;
background-color: #ddd;
overflow: auto;
}

#content {
margin-bottom: 100px;
}

.col-md-8 .col-xs-12 {
padding-right: 22px;
padding-left: 10px;
}

.image-options {
position: absolute;
background-color: #000;
bottom: -8px;
left: 210px;
width: 260px;
height: 75px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
opacity: 0.6;
}

.image-options button {
width: 110px;
height: 50px;
border: 1px solid #999999;
/*background-color: #fff;*/
border-radius: 5px;
margin: 12px 7px 0px 8px;
opacity: 1.0;
font-size: 25px;
}
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ chardet==2.3.0
click==5.1
colorama==0.3.3
coverage==4.0.3
coveralls==1.1
cssselect==0.9.1
decorator==4.0.9
defusedxml==0.4.1
Expand Down Expand Up @@ -40,13 +39,16 @@ ptyprocess==0.5.1
Pygments==2.1.1
PyJWT==1.4.0
pyquery==1.2.11
python-coveralls==2.6.0
python-dateutil==2.4.2
python-mimeparse==1.5.1
python-ptrace==0.8.1
python3-openid==3.0.9
PyYAML==3.11
requests==2.7.0
requests-cache==0.4.10
requests-oauthlib==0.6.1
sh==1.11
simplegeneric==0.8.1
six==1.10.0
static3==0.6.1
Expand Down

0 comments on commit c357467

Please sign in to comment.