Working on edit view and fixing tag slug bug
parent
a5cc98d507
commit
4876e0dd7f
|
@ -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 {
|
body.editing article.editing div.container section.code div#editor .ace_print_margin {
|
||||||
display: none;
|
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 {
|
body.editing article.editing div.container:after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
&:after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
var snipt = {
|
var snipt = {
|
||||||
module: function() {
|
module: function() {
|
||||||
var modules = {};
|
var modules = {};
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(function(Site) {
|
(function(Site) {
|
||||||
|
|
||||||
var Snipt = snipt.module('snipt');
|
var Snipt = snipt.module('snipt');
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(function(Snipt) {
|
(function(Snipt) {
|
||||||
|
|
||||||
Snipt.SniptModel = Backbone.Model.extend({
|
Snipt.SniptModel = Backbone.Model.extend({
|
||||||
|
|
|
@ -16,8 +16,10 @@
|
||||||
<div class="group">
|
<div class="group">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<h2><%= snipt.lexer_name %></h2>
|
<h2> </h2>
|
||||||
<h1><input type="text" value="<%= snipt.title %>" /></h1>
|
<h1>
|
||||||
|
<input type="text" value="<%= snipt.title %>" />
|
||||||
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
<section class="code">
|
<section class="code">
|
||||||
<div id="editor"><%= snipt.code %></div>
|
<div id="editor"><%= snipt.code %></div>
|
||||||
|
@ -27,6 +29,10 @@
|
||||||
</div>
|
</div>
|
||||||
<aside>
|
<aside>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
<label for="</label>">Type</label>
|
||||||
|
<select name="lexer" id="id_lexer">
|
||||||
|
<option value="0">test</option>
|
||||||
|
</select>
|
||||||
<label>
|
<label>
|
||||||
Public
|
Public
|
||||||
<input type="checkbox" name="" value="" />
|
<input type="checkbox" name="" value="" />
|
||||||
|
|
|
@ -26,6 +26,8 @@ def list_public(request, tag_slug=None):
|
||||||
if tag_slug:
|
if tag_slug:
|
||||||
snipts = snipts.filter(tags__slug__in=[tag_slug])
|
snipts = snipts.filter(tags__slug__in=[tag_slug])
|
||||||
tag = get_object_or_404(Tag, slug=tag_slug)
|
tag = get_object_or_404(Tag, slug=tag_slug)
|
||||||
|
else:
|
||||||
|
tag = None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'has_snipts': True,
|
'has_snipts': True,
|
||||||
|
@ -61,6 +63,8 @@ def list_user(request, username, tag_slug=None):
|
||||||
if tag_slug:
|
if tag_slug:
|
||||||
snipts = snipts.filter(tags__slug__in=[tag_slug])
|
snipts = snipts.filter(tags__slug__in=[tag_slug])
|
||||||
tag = get_object_or_404(Tag, slug=tag_slug)
|
tag = get_object_or_404(Tag, slug=tag_slug)
|
||||||
|
else:
|
||||||
|
tag = None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'has_snipts': True,
|
'has_snipts': True,
|
||||||
|
|
Loading…
Reference in New Issue