Fix a bunch of code style problems

(imported from commit 473ae8fdd64783f7a0989b17cae39826de42d30d)
This commit is contained in:
Keegan McAllister 2012-09-11 14:13:53 -04:00
parent c5238e4af5
commit 75c34a7f1b
3 changed files with 53 additions and 55 deletions

View File

@ -28,14 +28,14 @@
{% icanhazjs "zephyr" %} {% icanhazjs "zephyr" %}
{% autoescape off %} {% autoescape off %}
<link href="/static/third/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="/static/third/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/third/bootstrap/css/bootstrap-responsive.css" rel="stylesheet"> <link href="/static/third/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link href="/static/third/jquery/jquery-ui-1.8.23.custom.css" rel="stylesheet"> <link href="/static/third/jquery/jquery-ui-1.8.23.custom.css" rel="stylesheet">
{# We need to import jQuery before Bootstrap #} {# We need to import jQuery before Bootstrap #}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<script src="/static/third/bootstrap/js/bootstrap.min.js"></script> <script src="/static/third/bootstrap/js/bootstrap.min.js"></script>
<script src="/static/js/common.js"></script> <script src="/static/js/common.js"></script>
<script type="text/javascript" src="/static/third/jquery/jquery.form.js"></script> <script type="text/javascript" src="/static/third/jquery/jquery.form.js"></script>
<script type="text/javascript" src="/static/third/ich/ICanHaz.min.js"></script> <script type="text/javascript" src="/static/third/ich/ICanHaz.min.js"></script>
<script type="text/javascript" src="/static/js/zephyr.js"></script> <script type="text/javascript" src="/static/js/zephyr.js"></script>
@ -69,13 +69,13 @@ var people_list = {{ people }};
<div class="span9"> <div class="span9">
<div class="zephyr_list" id="main_div"> <div class="zephyr_list" id="main_div">
<br/><br/> <br/><br/>
<table class="zephyr_table" id="table"> <table class="zephyr_table" id="table">
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
<br/><br/> <br/><br/>
<div class="narrow"><span id="narrow_indicator"></span>. <button id="unhide" class="btn" disabled=disabled onclick="unhide()">Show all.</button> </div> <div class="narrow"><span id="narrow_indicator"></span>. <button id="unhide" class="btn" disabled=disabled onclick="unhide()">Show all.</button> </div>
</div> </div>
<div class="tabbable container zephyr_compose"> <div class="tabbable container zephyr_compose">
<ul class="nav nav-tabs" id="zephyr-type-tabs"> <ul class="nav nav-tabs" id="zephyr-type-tabs">
<li class="active"><a href="#class-message" data-toggle="tab">Class message</a></li> <li class="active"><a href="#class-message" data-toggle="tab">Class message</a></li>
@ -86,10 +86,10 @@ var people_list = {{ people }};
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="class-message"> <div class="tab-pane active" id="class-message">
<div class="zephyr_comp"> <div class="zephyr_comp">
<br/> <br/>
<table > <table>
<tbody> <tbody>
<tr> <tr>
<td class="pointer"><p></p></td> <td class="pointer"><p></p></td>
<form action="/zephyr/" method="post" class="zephyr"> <form action="/zephyr/" method="post" class="zephyr">
<input type="hidden" name="type" value="class" /> <input type="hidden" name="type" value="class" />
@ -97,34 +97,34 @@ var people_list = {{ people }};
</div> </div>
</div> </div>
<td class="zephyr_recipient"> <td class="zephyr_recipient">
<p> <p>
<span class="zephyr_label_clickable zephyr_class"> <span class="zephyr_label_clickable zephyr_class">
<input type="text" class="zephyr_recipient_box" name="class" id="class" value="" /> <input type="text" class="zephyr_recipient_box" name="class" id="class" value="" />
</span> </span>
<br/> <br/>
<span class="zephyr_label_clickable zephyr_instance"> <span class="zephyr_label_clickable zephyr_instance">
<input type="text" class="zephyr_recipient_box" name="instance" id="instance" value="" /> <input type="text" class="zephyr_recipient_box" name="instance" id="instance" value="" />
</span> </span>
</p> </p>
</td> </td>
<td class="messagebox compose"> <td class="messagebox compose">
<img class="profile_picture" src="http://www.gravatar.com/avatar/a?d=identicon"/> <img class="profile_picture" src="http://www.gravatar.com/avatar/a?d=identicon"/>
<p class="zephyr_text"> <p class="zephyr_text">
<textarea class="zephyr_message" name="new_zephyr" id="new_zephyr" value="" /></textarea> <textarea class="zephyr_message" name="new_zephyr" id="new_zephyr" value="" /></textarea>
<input type="submit" value="Zephyr" style="float:right" class="btn" /> <input type="submit" value="Zephyr" style="float:right" class="btn" />
</p> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td></td><td></td><td> <td></td><td></td><td>
</form> </form>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="tab-pane" id="personal-message"> <div class="tab-pane" id="personal-message">

View File

@ -280,7 +280,7 @@ function process_key_in_input(code) {
if (code === 27) { if (code === 27) {
// User hit Escape key // User hit Escape key
$('input, textarea, button').blur(); $('input, textarea, button').blur();
$('.zephyr_compose').slideToggle('fast'); $('.zephyr_compose').slideToggle('fast');
return process_hotkey; return process_hotkey;
} }
return false; return false;
@ -540,10 +540,8 @@ function get_updates_longpoll() {
$(function () { $(function () {
update_autocomplete(); update_autocomplete();
}); $('.button-slide').click(function () {
$(document).ready(function(){ $('.zephyr_compose').slideToggle('fast');
$(".button-slide").click(function(){ $('.button-slide').hide();
$(".zephyr_compose").slideToggle("fast"); });
$(".button-slide").hide();
});
}); });

View File

@ -33,6 +33,7 @@ div.zephyr_list {
bottom: 0; bottom: 0;
width: 640px; width: 640px;
} }
div.zephyr_comp { div.zephyr_comp {
background-color: #EEE; background-color: #EEE;
@ -177,17 +178,16 @@ input.zephyr_recipient_box {
} }
div.narrow { div.narrow {
position: fixed; position: fixed;
display: none; display: none;
padding: 2px; padding: 2px;
/* div.zephyr_list width + padding *2 */ /* div.zephyr_list width + padding *2 */
width: 664px; width: 664px;
margin: 0 auto; margin: 0 auto;
background-color: white; background-color: white;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
border: 1px solid gray; border: 1px solid gray;
top: 0px; top: 0px;
} }