Work on edit.

master
Nick Sergeant 2012-02-24 21:14:56 -05:00
parent ad8d0c1f82
commit 664d2efa53
3 changed files with 11 additions and 5 deletions

View File

@ -1007,3 +1007,11 @@ body.api-contest {
}
}
}
body.editing {
header.main, header.sub {
display: none;
}
article.editing {
margin-top: 50px;
}
}

View File

@ -66,7 +66,7 @@
snipt: this.model.toJSON()
});
window.site.$main.hide();
window.site.$el.addClass('detail');
window.site.$el.addClass('detail editing');
window.site.$main_edit.html(editPane).show();
window.scrollTo(0, 0);
}
@ -293,6 +293,7 @@
window.site.$el.removeClass('detail');
}
window.site.$main_edit.hide();
window.site.$el.removeClass('editing');
window.site.$main.show();
if (window.site.$snipts.index($selected) === 0) {
window.scrollTo(0, 0);

View File

@ -319,10 +319,7 @@
<h2><%= snipt.lexer_name %></h2>
<h1><a href="<%= snipt.get_absolute_url %>"><%= snipt.title %></a></h1>
</header>
<section class="code autumn">
<%= snipt.stylized %>
<div class="raw"><%= snipt.code %></div>
</section>
<textarea><%= snipt.code %></textarea>
<div class="ruler top-x"></div>
<div class="ruler bottom-x"></div>
</div>