Permalink
Browse files

better styling for environment selecotr

  • Loading branch information...
1 parent 7df1c11 commit f331bdfe36e1e3a5a913dd0cf4b634c4886f43d2 @bshaffer committed Mar 25, 2013
Showing with 14 additions and 14 deletions.
  1. +8 −9 views/demo/_environment.twig
  2. +6 −5 web/css/shared.css
@@ -1,10 +1,9 @@
-<form method="post" action="{{ url('set_environment') }}" style="margin-top:5px">
-<div class="styled-select">
- <select name="environment">
- {% for env in app.environments %}
- <option{%if app.session.get('config_environment') == env%} selected{%endif%}>{{env}}</option>
- {% endfor %}
- </select>
-</div>
- <input type="submit" class="button" value="Submit" style="float:left"/>
+<form method="post" action="{{ url('set_environment') }}" style="margin-top:5px" id="environment-form">
+ <div class="styled-select">
+ <select name="environment" onchange="document.getElementById('environment-form').submit()">
+ {% for env in app.environments %}
+ <option{%if app.session.get('config_environment') == env%} selected{%endif%}>{{env}}</option>
+ {% endfor %}
+ </select>
+ </div>
</form>
View
@@ -40,21 +40,22 @@
.styled-select select {
background: transparent;
- width: 60px;
- padding: 5px;
+ width: 110px;
+ padding: 0px 5px;
font-size: 16px;
line-height: 1;
border: 0;
border-radius: 0;
- height: 24px;
+ height: 30px;
-webkit-appearance: none;
}
.styled-select {
- width: 60px;
- height: 24px;
+ width: 110px;
+ height: 30px;
overflow: hidden;
border: 1px solid #ccc;
float:left;
margin-right:5px;
+ background: url(../images/select-arrow.jpg) no-repeat right #ddd;
}

0 comments on commit f331bdf

Please sign in to comment.