Working on edit view and fixing tag slug bug

master
Nick Sergeant 2012-03-10 23:36:44 -05:00
parent a5cc98d507
commit 4876e0dd7f
7 changed files with 43 additions and 5 deletions

View File

@ -930,6 +930,20 @@ body.editing article.editing div.container section.code div#editor {
body.editing article.editing div.container section.code div#editor .ace_print_margin {
display: none;
}
body.editing article.editing div.container header h1 {
margin-left: 9px;
margin-top: 5px;
margin-bottom: 6px;
}
body.editing article.editing div.container header h1 input {
color: #666;
font: bold 16px/20px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
margin: 0;
width: 811px;
}
body.editing article.editing div.container header h2 {
border: none;
}
body.editing article.editing div.container:after {
display: none;
}

View File

@ -1070,6 +1070,23 @@ body.editing {
}
}
}
header {
h1 {
margin-left: 9px;
margin-top: 5px;
margin-bottom: 6px;
input {
color: #666;
font: bold 16px/20px $Helvetica;
margin: 0;
width: 811px;
}
}
h2 {
border: none;
}
}
&:after {
display: none;
}

View File

@ -1,4 +1,3 @@
var snipt = {
module: function() {
var modules = {};

View File

@ -1,4 +1,3 @@
(function(Site) {
var Snipt = snipt.module('snipt');

View File

@ -1,4 +1,3 @@
(function(Snipt) {
Snipt.SniptModel = Backbone.Model.extend({

View File

@ -16,8 +16,10 @@
<div class="group">
<div class="container">
<header>
<h2><%= snipt.lexer_name %></h2>
<h1><input type="text" value="<%= snipt.title %>" /></h1>
<h2>&nbsp;</h2>
<h1>
<input type="text" value="<%= snipt.title %>" />
</h1>
</header>
<section class="code">
<div id="editor"><%= snipt.code %></div>
@ -27,6 +29,10 @@
</div>
<aside>
<div class="inner">
<label for="</label>">Type</label>
<select name="lexer" id="id_lexer">
<option value="0">test</option>
</select>
<label>
Public
<input type="checkbox" name="" value="" />

View File

@ -26,6 +26,8 @@ def list_public(request, tag_slug=None):
if tag_slug:
snipts = snipts.filter(tags__slug__in=[tag_slug])
tag = get_object_or_404(Tag, slug=tag_slug)
else:
tag = None
return {
'has_snipts': True,
@ -61,6 +63,8 @@ def list_user(request, username, tag_slug=None):
if tag_slug:
snipts = snipts.filter(tags__slug__in=[tag_slug])
tag = get_object_or_404(Tag, slug=tag_slug)
else:
tag = None
return {
'has_snipts': True,