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