Commit 52f4632d by Kyle Fiedler

merge with default

--HG--
branch : close_sidebar
parents a89de961 95e7c2b4
...@@ -69,9 +69,11 @@ ...@@ -69,9 +69,11 @@
</div> </div>
<div id="calculator_div" class="leanModal_box"> <div id="calculator_div" class="leanModal_box">
<form id="calculator">
<input type="text" id="calculator_input"> <input type="text" id="calculator_input">
<input id="calculator_button" type=button value="=&gt;"> <input id="calculator_button" type="submit" value="=&gt;">
<input type="text" id="calculator_output" readonly> <input type="text" id="calculator_output" readonly>
</form>
<table> <tr><td align="right">Suffixes</td><td>&nbsp;:&nbsp;</td><td align="left"> %kMGTcmunp</td></tr> <table> <tr><td align="right">Suffixes</td><td>&nbsp;:&nbsp;</td><td align="left"> %kMGTcmunp</td></tr>
<tr><td align="right">Operations</td><td>&nbsp;:&nbsp;</td><td align="left"> ^ * / + - ()</td></tr> <tr><td align="right">Operations</td><td>&nbsp;:&nbsp;</td><td align="left"> ^ * / + - ()</td></tr>
...@@ -103,7 +105,8 @@ $(function() { ...@@ -103,7 +105,8 @@ $(function() {
// Calculator // Calculator
$(function() { $(function() {
$("#calculator_button").click(function(){ $("form#calculator").submit(function(e){
e.preventDefault();
$.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")}, $.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")},
function(data){ function(data){
$("#calculator_output").attr("value",data.result); $("#calculator_output").attr("value",data.result);
......
...@@ -1086,78 +1086,78 @@ ul { ...@@ -1086,78 +1086,78 @@ ul {
color: #707070; color: #707070;
font-size: 13px; } font-size: 13px; }
#fmanswer input.submit, .ask-page input.submit, .edit-question-page input.submit { // #fmanswer input.submit, .ask-page input.submit, .edit-question-page input.submit {
float: left; // float: left;
background: url(../images/medium-button.png) top repeat-x; // background: url(../images/medium-button.png) top repeat-x;
height: 34px; // height: 34px;
border: 0; // border: 0;
font-family: 'Yanone Kaffeesatz',sans-serif; // font-family: 'Yanone Kaffeesatz',sans-serif;
color: #4a757f; // color: #4a757f;
font-weight: normal; // font-weight: normal;
font-size: 21px; // font-size: 21px;
margin-top: 3px; // margin-top: 3px;
border-radius: 4px; // border-radius: 4px;
-ms-border-radius: 4px; // -ms-border-radius: 4px;
-moz-border-radius: 4px; // -moz-border-radius: 4px;
-webkit-border-radius: 4px; // -webkit-border-radius: 4px;
-khtml-border-radius: 4px; // -khtml-border-radius: 4px;
-webkit-box-shadow: 1px 1px 2px #636363; // -webkit-box-shadow: 1px 1px 2px #636363;
-moz-box-shadow: 1px 1px 2px #636363; // -moz-box-shadow: 1px 1px 2px #636363;
box-shadow: 1px 1px 2px #636363; // box-shadow: 1px 1px 2px #636363;
margin-right: 7px; } // margin-right: 7px; }
#fmanswer input.submit:hover, .ask-page input.submit:hover, .edit-question-page input.submit:hover { // #fmanswer input.submit:hover, .ask-page input.submit:hover, .edit-question-page input.submit:hover {
text-decoration: none; // text-decoration: none;
background: url(../images/medium-button.png) bottom repeat-x; // background: url(../images/medium-button.png) bottom repeat-x;
text-shadow: 0px 1px 0px #c6d9dd; // text-shadow: 0px 1px 0px #c6d9dd;
-moz-text-shadow: 0px 1px 0px #c6d9dd; // -moz-text-shadow: 0px 1px 0px #c6d9dd;
-webkit-text-shadow: 0px 1px 0px #c6d9dd; } // -webkit-text-shadow: 0px 1px 0px #c6d9dd; }
#editor { // #editor {
font-size: 100%; // font-size: 100%;
min-height: 200px; // min-height: 200px;
line-height: 18px; // line-height: 18px;
margin: 0; // margin: 0;
border-left: #cce6ec 3px solid; // border-left: #cce6ec 3px solid;
border-bottom: #cce6ec 3px solid; // border-bottom: #cce6ec 3px solid;
border-right: #cce6ec 3px solid; // border-right: #cce6ec 3px solid;
border-top: 0; // border-top: 0;
padding: 10px; // padding: 10px;
margin-bottom: 10px; // margin-bottom: 10px;
width: 710px; } // width: 710px; }
#id_title { #id_title {
width: 100%; } width: 100%; }
.wmd-preview { // .wmd-preview {
margin: 3px 0 5px 0; // margin: 3px 0 5px 0;
padding: 6px; // padding: 6px;
background-color: #F5F5F5; // background-color: #F5F5F5;
min-height: 20px; // min-height: 20px;
overflow: auto; // overflow: auto;
font-size: 13px; // font-size: 13px;
font-family: Arial; // font-family: Arial;
p { // p {
margin-bottom: 14px; // margin-bottom: 14px;
line-height: 1.4; // line-height: 1.4;
font-size: 14px; } // font-size: 14px; }
pre { // pre {
background-color: #E7F1F8; } // background-color: #E7F1F8; }
blockquote { // blockquote {
background-color: #eee; } // background-color: #eee; }
IMG { // IMG {
max-width: 600px; } } // max-width: 600px; } }
.preview-toggle {
width: 100%;
color: #b6a475;
text-align: left;
span:hover {
cursor: pointer; } }
.after-editor { // .preview-toggle {
margin-top: 15px; // width: 100%;
margin-bottom: 15px; } // color: #b6a475;
// text-align: left;
// span:hover {
// cursor: pointer; } }
// .after-editor {
// margin-top: 15px;
// margin-bottom: 15px; }
.checkbox { .checkbox {
margin-left: 5px; margin-left: 5px;
...@@ -1719,32 +1719,32 @@ ul { ...@@ -1719,32 +1719,32 @@ ul {
width: 395px; width: 395px;
font-size: 14px; } font-size: 14px; }
.openid-signin input.submit, .meta input.submit, .users-page input.submit, .user-profile-edit-page input.submit, .user-profile-page input.submit { // .openid-signin input.submit, .meta input.submit, .users-page input.submit, .user-profile-edit-page input.submit, .user-profile-page input.submit {
background: url(../images/small-button-blue.png) repeat-x top; // background: url(../images/small-button-blue.png) repeat-x top;
border: 0; // border: 0;
color: #4a757f; // color: #4a757f;
font-weight: bold; // font-weight: bold;
font-size: 13px; // font-size: 13px;
font-family: Arial; // font-family: Arial;
height: 26px; // height: 26px;
margin: 5px 0px; // margin: 5px 0px;
width: 100px; // width: 100px;
cursor: pointer; // cursor: pointer;
border-radius: 4px; // border-radius: 4px;
-ms-border-radius: 4px; // -ms-border-radius: 4px;
-moz-border-radius: 4px; // -moz-border-radius: 4px;
-webkit-border-radius: 4px; // -webkit-border-radius: 4px;
-khtml-border-radius: 4px; // -khtml-border-radius: 4px;
text-shadow: 0px 1px 0px #e6f6fa; // text-shadow: 0px 1px 0px #e6f6fa;
-moz-text-shadow: 0px 1px 0px #e6f6fa; // -moz-text-shadow: 0px 1px 0px #e6f6fa;
-webkit-text-shadow: 0px 1px 0px #e6f6fa; // -webkit-text-shadow: 0px 1px 0px #e6f6fa;
-webkit-box-shadow: 1px 1px 2px #808080; // -webkit-box-shadow: 1px 1px 2px #808080;
-moz-box-shadow: 1px 1px 2px #808080; // -moz-box-shadow: 1px 1px 2px #808080;
box-shadow: 1px 1px 2px #808080; } // box-shadow: 1px 1px 2px #808080; }
.openid-signin input.submit:hover, .meta input.submit:hover, .users-page input.submit:hover, .user-profile-edit-page input.submit:hover, .user-profile-page input.submit:hover { // .openid-signin input.submit:hover, .meta input.submit:hover, .users-page input.submit:hover, .user-profile-edit-page input.submit:hover, .user-profile-page input.submit:hover {
background: url(../images/small-button-blue.png) repeat-x bottom; // background: url(../images/small-button-blue.png) repeat-x bottom;
text-decoration: none; } // text-decoration: none; }
.openid-signin .cancel, .meta .cancel, .users-page .cancel, .user-profile-edit-page .cancel, .user-profile-page .cancel { .openid-signin .cancel, .meta .cancel, .users-page .cancel, .user-profile-edit-page .cancel, .user-profile-page .cancel {
background: url(../images/small-button-cancel.png) repeat-x top !important; background: url(../images/small-button-cancel.png) repeat-x top !important;
...@@ -1905,49 +1905,49 @@ a { ...@@ -1905,49 +1905,49 @@ a {
p { p {
font-size: 13px; } } font-size: 13px; } }
.follow-toggle, .submit { // .follow-toggle, .submit {
border: 0 !important; // border: 0 !important;
color: #4a757f; // color: #4a757f;
font-weight: bold; // font-weight: bold;
font-size: 12px; // font-size: 12px;
height: 26px; // height: 26px;
line-height: 26px; // line-height: 26px;
margin-top: -2px; // margin-top: -2px;
font-size: 15px; // font-size: 15px;
cursor: pointer; // cursor: pointer;
font-family: 'Yanone Kaffeesatz',sans-serif; // font-family: 'Yanone Kaffeesatz',sans-serif;
background: url(../images/small-button-blue.png) repeat-x top; // background: url(../images/small-button-blue.png) repeat-x top;
border-radius: 4px; // border-radius: 4px;
-ms-border-radius: 4px; // -ms-border-radius: 4px;
-moz-border-radius: 4px; // -moz-border-radius: 4px;
-webkit-border-radius: 4px; // -webkit-border-radius: 4px;
-khtml-border-radius: 4px; // -khtml-border-radius: 4px;
text-shadow: 0px 1px 0px #e6f6fa; // text-shadow: 0px 1px 0px #e6f6fa;
-moz-text-shadow: 0px 1px 0px #e6f6fa; // -moz-text-shadow: 0px 1px 0px #e6f6fa;
-webkit-text-shadow: 0px 1px 0px #e6f6fa; // -webkit-text-shadow: 0px 1px 0px #e6f6fa;
-webkit-box-shadow: 1px 1px 2px #808080; // -webkit-box-shadow: 1px 1px 2px #808080;
-moz-box-shadow: 1px 1px 2px #808080; // -moz-box-shadow: 1px 1px 2px #808080;
box-shadow: 1px 1px 2px #808080; } // box-shadow: 1px 1px 2px #808080; }
.follow-toggle:hover, .submit:hover { // .follow-toggle:hover, .submit:hover {
background: url(../images/small-button-blue.png) repeat-x bottom; // background: url(../images/small-button-blue.png) repeat-x bottom;
text-decoration: none !important; } // text-decoration: none !important; }
.follow-toggle { // .follow-toggle {
.follow { // .follow {
font-color: #000; // font-color: #000;
font-style: normal; } // font-style: normal; }
.unfollow { // .unfollow {
div.unfollow-red { // div.unfollow-red {
display: none; } // display: none; }
&:hover div { // &:hover div {
&.unfollow-red { // &.unfollow-red {
display: inline; // display: inline;
color: #fff; // color: #fff;
font-weight: bold; // font-weight: bold;
color: #A05736; } // color: #A05736; }
&.unfollow-green { // &.unfollow-green {
display: none; } } } } // display: none; } } } }
.count { .count {
font-family: 'Yanone Kaffeesatz',sans-serif; font-family: 'Yanone Kaffeesatz',sans-serif;
...@@ -2363,23 +2363,23 @@ button::-moz-focus-inner { ...@@ -2363,23 +2363,23 @@ button::-moz-focus-inner {
padding: 0; padding: 0;
border: none; } border: none; }
.submit { // .submit {
cursor: pointer; // cursor: pointer;
background-color: #D4D0C8; // background-color: #D4D0C8;
height: 30px; // height: 30px;
border: 1px solid #777777; // border: 1px solid #777777;
font-weight: bold; // font-weight: bold;
font-size: 120%; // font-size: 120%;
&:hover { // &:hover {
text-decoration: underline; } // text-decoration: underline; }
&.small { // &.small {
margin-right: 5px; // margin-right: 5px;
height: 20px; // height: 20px;
font-weight: normal; // font-weight: normal;
font-size: 12px; // font-size: 12px;
padding: 1px 5px; // padding: 1px 5px;
&:hover { // &:hover {
text-decoration: none; } } } // text-decoration: none; } } }
.question-page a.submit { .question-page a.submit {
display: -moz-inline-stack; display: -moz-inline-stack;
......
div.answer-controls { div.answer-controls {
@include box-sizing(border-box);
@extend div.question-controls; @extend div.question-controls;
display: inline-block; display: inline-block;
margin-top: 20px; margin: 20px 0;
margin-bottom: 0; padding-left: flex-grid(1.1);
div.answer-sort { div.answer-sort {
@extend div.question-sort; @extend div.question-sort;
...@@ -18,7 +19,6 @@ div.answer-block { ...@@ -18,7 +19,6 @@ div.answer-block {
border-top: #ddd 1px solid; border-top: #ddd 1px solid;
display: inline-block; display: inline-block;
float: left; float: left;
margin: 20px 0;
padding-top: 20px; padding-top: 20px;
width: 100%; width: 100%;
...@@ -42,4 +42,15 @@ div.answer-block { ...@@ -42,4 +42,15 @@ div.answer-block {
@extend div.question-actions; @extend div.question-actions;
} }
} }
div.answered-by-owner {
color: darken($mit-red, 10%);
}
}
div.answer-own {
border-top: 1px solid #eee;
overflow:hidden;
padding-left: flex-grid(1.2);
padding-top: 10px;
} }
form.answer-form {
@include box-sizing(border-box);
border-top: 1px solid #ddd;
overflow: hidden;
padding-left: flex-grid(1.1);
// padding-top: 20px;
textarea {
@include box-sizing(border-box);
margin-top: 15px;
resize: vertical;
width: 99%;
}
span.form-error {
display: block;
font-weight: bold;
padding: 10px 0;
}
div.preview-toggle{
padding: 15px 0;
width: auto;
a {
@extend .light-button;
}
}
.wmd-preview {
margin: 3px 0 15px 0;
padding: 10px;
background-color: #F5F5F5;
min-height: 20px;
overflow: auto;
font-size: 13px;
font-family: Arial;
p {
margin-bottom: 14px;
line-height: 1.4;
font-size: 14px;
}
pre {
background-color: #E7F1F8;
}
blockquote {
background-color: #eee;
}
}
}
input.after-editor {
margin-bottom: 20px;
margin-right: 10px;
}
...@@ -10,7 +10,7 @@ div.question-controls { ...@@ -10,7 +10,7 @@ div.question-controls {
div.question-count { div.question-count {
margin-right: flex-gutter(); margin-right: flex-gutter();
width: flex-grid(5,9); width: flex-grid(4,9);
h1 { h1 {
margin-top: 0; margin-top: 0;
...@@ -19,7 +19,7 @@ div.question-controls { ...@@ -19,7 +19,7 @@ div.question-controls {
div.question-sort { div.question-sort {
vertical-align: bottom; vertical-align: bottom;
width: flex-grid(4,9); width: flex-grid(5,9);
nav { nav {
@include border-radius(35px); @include border-radius(35px);
......
// Base extends (Merge with main stylesheet later)
.light-button {
@include box-shadow(inset 0 1px 0 #fff);
@include linear-gradient(#fff, lighten(#888, 40%));
@include border-radius(3px);
border: 1px solid #ccc;
padding: 4px 8px;
color: #666;
font: normal $body-font-size $body-font-family;
text-decoration: none;
cursor: pointer;
-webkit-font-smoothing: antialiased;
&:hover, &:focus {
@include linear-gradient(#fff, lighten(#888, 30%));
border: 1px solid #ccc;
text-decoration: none;
}
}
// Layout
body.askbot { body.askbot {
.secondary-nav { .secondary-nav {
margin: 0; margin: 0;
......
.wmd-panel
{
}
#wmd-button-bar {
background: url(static/images/askbot/editor-toolbar-background.png) repeat-x bottom;
border: 1px solid #ddd;
height:36px;
float:left;
width:99%;
}
#wmd-input {
height: 500px;
background-color: Gainsboro;
border: 1px solid DarkGray;
margin-top: -20px;
}
#wmd-preview {
background-color: LightSkyBlue;
}
#wmd-output {
background-color: Pink;
}
#wmd-button-row {
position: relative;
margin-left: 5px;
margin-right: 5px;
margin-bottom: 0px;
margin-top: 10px;
padding: 0px;
height: 20px;
}
.wmd-spacer {
width: 1px;
height: 20px;
margin-left: 14px;
position: absolute;
background-color: Silver;
display: inline-block;
list-style: none;
}
.wmd-button {
width: 20px;
height: 20px;
margin-left: 5px;
margin-right: 5px;
position: absolute;
background-image: url(/static/images/askbot/wmd-buttons.png);
background-repeat: no-repeat;
background-position: 0px 0px;
display: inline-block;
list-style: none;
}
.wmd-button > a {
width: 20px;
height: 20px;
margin-left: 5px;
margin-right: 5px;
position: absolute;
display: inline-block;
}
/* sprite button slicing style information */
#wmd-bold-button {left: 0px; background-position: 0px 0;}
#wmd-italic-button {left: 25px; background-position: -20px 0;}
#wmd-spacer1 {left: 50px;}
#wmd-link-button {left: 75px; background-position: -40px 0;}
#wmd-quote-button {left: 100px; background-position: -60px 0;}
#wmd-code-button {left: 125px; background-position: -80px 0;}
#wmd-image-button {left: 150px; background-position: -100px 0;}
#wmd-attachment-button {left: 175px; background-position: -120px 0;}
#wmd-spacer2 {left: 200px;}
#wmd-olist-button {left: 225px; background-position: -140px 0;}
#wmd-ulist-button {left: 250px; background-position: -160px 0;}
#wmd-heading-button {left: 275px; background-position: -180px 0;}
#wmd-hr-button {left: 300px; background-position: -200px 0;}
#wmd-spacer3 {left: 325px;}
#wmd-undo-button {left: 350px; background-position: -220px 0;}
#wmd-redo-button {left: 375px; background-position: -240px 0;}
#wmd-help-button {right: 0px; background-position: -260px 0;}
.wmd-prompt-background
{
background-color: Black;
}
.wmd-prompt-dialog
{
border: 1px solid #999999;
background-color: #F5F5F5;
}
.wmd-prompt-dialog > div {
font-size: 1em;
font-family: arial, helvetica, sans-serif;
}
.wmd-prompt-dialog > form > input[type="text"] {
border: 1px solid #999999;
color: black;
}
.wmd-prompt-dialog > form > input[type="button"]{
border: 1px solid #888888;
font-family: trebuchet MS, helvetica, sans-serif;
font-size: 1em;
font-weight: bold;
}
...@@ -157,31 +157,32 @@ div.question-header { ...@@ -157,31 +157,32 @@ div.question-header {
div.comments-container { div.comments-container {
@include box-sizing(border-box); @include box-sizing(border-box);
background: lighten(#efefef, 3%); // background: lighten(#efefef, 3%);
padding: 3%; padding: 3%;
display: inline-block; display: inline-block;
margin: 15px 0 0; // margin: 15px 0 0;
padding: 3%; padding: 3%;
width: 100%; width: 100%;
div.comments-content { div.comments-content {
font-size: 13px; font-size: 13px;
background: lighten(#efefef, 4%);
.block { div.block {
border-bottom: 1px solid #ddd; border-top: 1px solid #ddd;
border-top: 1px solid #fff; padding: 15px;
padding: 15px 0;
display: block; display: block;
&:first-child { &:first-child {
border-top: 0; border-top: 0;
} }
// &:only-of-type { // &:last-child {
// border: 0; // border-bottom: 1px solid #ddd;
// } // }
} }
form.post-comments { form.post-comments {
padding: 15px;
} }
div.comment { div.comment {
...@@ -260,12 +261,6 @@ div.question-header { ...@@ -260,12 +261,6 @@ div.question-header {
@extend .button; @extend .button;
font-size: 12px; font-size: 12px;
padding: 2px 10px; padding: 2px 10px;
// @include border-radius(2px);
// background: #eee;
// color: #555;
// cursor: pointer;
// padding: 1px 10px;
// text-decoration: none;
} }
} }
} }
...@@ -285,6 +280,17 @@ div.question-header { ...@@ -285,6 +280,17 @@ div.question-header {
margin-top: 5px; margin-top: 5px;
text-align: right; text-align: right;
} }
div.controls {
// padding: 15px 0;
background: lighten(#eeeeee, 4%);
text-align: right;
a {
display: inline-block;
font-size: 12px;
margin: 10px 10px 10px 0;
}
}
} }
} }
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
@import "wiki-basic-html", "wiki-create", "wiki"; @import "wiki-basic-html", "wiki-create", "wiki";
@import "activation"; @import "activation";
@import "help"; @import "help";
@import "askbot-original", "discussion", "discussion-questions", "discussion-tags", "question-view" , "discussion-answers"; @import "askbot-original", "discussion", "discussion-questions", "discussion-tags", "question-view" , "discussion-answers", "discussion-forms", "form-wmd-toolbar";
// left over // left over
// @import "theme"; // @import "theme";
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
<%inherit file="main.html"/> <%inherit file="main.html"/>
<%block name="title"><title>${"wiki_title"}</title></%block>
<%block name="headextra"> <%block name="headextra">
<!-- <link rel="stylesheet" media="screen,print" href="/static/simplewiki/css/base.css" /> --> <!-- <link rel="stylesheet" media="screen,print" href="/static/simplewiki/css/base.css" /> -->
<!-- <link rel="stylesheet" media="print" href="/static/simplewiki/css/base_print.css" /> --> <!-- <link rel="stylesheet" media="print" href="/static/simplewiki/css/base_print.css" /> -->
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>Create Article - MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
Create article Create article
</%block> </%block>
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>${"Edit " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
${ wiki_article.title } ${ wiki_article.title }
</%block> </%block>
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
%> %>
<%block name="title"><title>Oops... - MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
Oops... Oops...
</%block> </%block>
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>${"Revision history of " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITX 6.002 Wiki</title></%block>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
%> %>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<p class="markdown-example">circuit:basic</p> <p class="markdown-example">circuit:basic</p>
<p class="markdown-example"><span>$</span>LaTeX Math Expression<span>$</span></p> <p class="markdown-example"><span>$</span>LaTeX Math Expression<span>$</span></p>
To create a new wiki article, create a link to it. Clicking the link gives you the creation page. To create a new wiki article, create a link to it. Clicking the link gives you the creation page.
<p class="markdown-example">[Article](/wiki/view/Article/)</p> <p class="markdown-example">[Article Name](wiki:ArticleName)</p>
Other useful examples:<br> Other useful examples:<br>
<p class="markdown-example">[Link](http://google.com)</p> <p class="markdown-example">[Link](http://google.com)</p>
<p class="markdown-example">Huge Header <p class="markdown-example">Huge Header
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>Search Results - MITX 6.002 Wiki</title></%block>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
%> %>
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>${wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''} ${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''}
</%block> </%block>
......
% if name != None: % if name is not UNDEFINED and name != None:
<h1> ${name} </h1> <h1> ${name} </h1>
% endif % endif
<div class="video-wrapper"> <div class="video-wrapper">
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
<section> <section>
<ul class="vcr"> <ul class="vcr">
<li><a class="play" onclick="play();">Play</a></li> <li><a id="video_control" class="pause">Pause</a></li>
<li><a class="pause" onclick="pause();">Pause</a></li>
</ul> </ul>
<div id="vidtime">0:00/0:00</div> <div id="vidtime">0:00/0:00</div>
......
...@@ -34,7 +34,7 @@ loadNewVideo(streams["1.0"], ${ position }); ...@@ -34,7 +34,7 @@ loadNewVideo(streams["1.0"], ${ position });
function add_speed(key, stream) { function add_speed(key, stream) {
var id = 'speed_' + stream; var id = 'speed_' + stream;
$("#video_speeds").append(' <span id="'+id+'">'+key+'X</span>'); $("#video_speeds").append(' <span id="'+id+'">'+key+'x</span>');
$("#"+id).click(function(){ $("#"+id).click(function(){
change_video_speed(key, stream); change_video_speed(key, stream);
}); });
...@@ -57,3 +57,16 @@ l.sort(sort_by_value); ...@@ -57,3 +57,16 @@ l.sort(sort_by_value);
for(var i=0; i<l.length; i++) { for(var i=0; i<l.length; i++) {
add_speed(l[i], streams[l[i]]) add_speed(l[i], streams[l[i]])
} }
//toggle video play/pause. the HTML assumes video is always autoplayed
//initially since it starts with class "pause". may want to set that in
//javascript
$("#video_control").click(function(){
if ($(this).hasClass("play")){
play();
$(this).removeClass().addClass("pause");
} else {
pause();
$(this).removeClass().addClass("play");
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment