Fix no-snipts-cant-add bug
parent
94e6008283
commit
da0a6e5b7b
|
@ -51,19 +51,17 @@
|
|||
this.keyboardShortcuts();
|
||||
this.inFieldLabels();
|
||||
|
||||
if (this.$snipts.length) {
|
||||
var SniptListView = Snipt.SniptListView;
|
||||
this.snipt_list = new SniptListView({ 'snipts': this.$snipts });
|
||||
var SniptListView = Snipt.SniptListView;
|
||||
this.snipt_list = new SniptListView({ 'snipts': this.$snipts });
|
||||
|
||||
this.$body.click(function() {
|
||||
if (!window.ui_halted && !window.from_modal && window.$selected) {
|
||||
window.$selected.trigger('deselect');
|
||||
}
|
||||
if (window.from_modal) {
|
||||
window.from_modal = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.$body.click(function() {
|
||||
if (!window.ui_halted && !window.from_modal && window.$selected) {
|
||||
window.$selected.trigger('deselect');
|
||||
}
|
||||
if (window.from_modal) {
|
||||
window.from_modal = false;
|
||||
}
|
||||
});
|
||||
|
||||
$search_query = this.$search_query;
|
||||
$search_query.focus(function() {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{% block page-title %}Page Not Found - {{ block.super }}{% endblock %}
|
||||
{% block body-class %}error{% endblock %}
|
||||
{% block inline-js %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
404: Page Not Found
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{% block page-title %}Server Error - {{ block.super }}{% endblock %}
|
||||
{% block body-class %}error{% endblock %}
|
||||
{% block inline-js %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
500: Server Error
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
{% block body-class %}{{ block.super }} api static api-contest{% endblock %}
|
||||
{% block sub-header %}{% endblock %}
|
||||
{% block inline-js %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="static-box">
|
||||
|
|
|
@ -36,9 +36,11 @@
|
|||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/ace/ace.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/ace/theme-tomorrow.js"></script>
|
||||
|
||||
{% block inline-js %}
|
||||
<script type="text/javascript">{% block js %}window.user = '{{ request.user.username }}';
|
||||
window.pub = {{ public|lower }};
|
||||
window.api_key = '{{ request.user.api_key.key }}';{% endblock %} </script>
|
||||
{% endblock %}
|
||||
|
||||
<!--[if IE]>
|
||||
<style type="text/css">
|
||||
|
@ -149,9 +151,7 @@
|
|||
<div class="left-y ruler"></div>
|
||||
<div class="right-y ruler"></div>
|
||||
</section>
|
||||
{% if has_snipts %}
|
||||
<section class="main group hidden" id="main-edit"></section>
|
||||
{% endif %}
|
||||
<section class="main group hidden" id="main-edit"></section>
|
||||
<div class="modal hide" id="keyboard-shortcuts">
|
||||
<div class="modal-header">
|
||||
<a href="#" class="close">×</a>
|
||||
|
@ -242,12 +242,10 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% if has_snipts %}
|
||||
<div class="hidden" id="templates">
|
||||
{% include 'snipts/snipt-js-template.html' %}
|
||||
{% include 'snipts/snipt-edit-js-template.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="hidden" id="templates">
|
||||
{% include 'snipts/snipt-js-template.html' %}
|
||||
{% include 'snipts/snipt-edit-js-template.html' %}
|
||||
</div>
|
||||
{% if not debug %}
|
||||
<script type="text/javascript">
|
||||
var _gauges = _gauges || [];
|
||||
|
|
Loading…
Reference in New Issue