forked from feincms/feincms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitem_editor.html
More file actions
93 lines (84 loc) · 3.52 KB
/
Copy pathitem_editor.html
File metadata and controls
93 lines (84 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{% extends "admin/change_form.html" %}
{% load feincms_compat_tags i18n admin_modify adminmedia %}
{% block extrahead %}{{ block.super }}
{% block feincms_jquery_ui %}
{% if FEINCMS_ADMIN_MEDIA_HOTLINKING %}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script>
{% else %}
<script type="text/javascript" src="{{ FEINCMS_ADMIN_MEDIA }}jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="{{ FEINCMS_ADMIN_MEDIA }}jquery-ui-1.8.7.custom.min.js"></script>
{% endif %}
{% endblock %}
<link rel="stylesheet" type="text/css" href="{{ FEINCMS_ADMIN_MEDIA }}style.css" />
<script type="text/javascript" src="{{ FEINCMS_ADMIN_MEDIA }}jquery.alerts.js"></script>
<script type="text/javascript">
var feincms = {
{% if FEINCMS_JQUERY_NO_CONFLICT %}
"jQuery": jQuery.noConflict(true)
{% else %}
"jQuery": jQuery
{% endif %}
};
</script>
<script type="text/javascript" src="{{ FEINCMS_ADMIN_MEDIA }}item_editor.js"></script>
{% include "admin/feincms/_messages_js.html" %}
{% include "admin/feincms/_regions_js.html" %}
{% for inc in model.feincms_item_editor_includes.head %}{% include inc %}{% endfor %}
<script type="text/javascript">
feincms.jQuery(document).ready(function($){
{% block extra-init-js %}{# /* do not use this block, use feincms_item_editor_includes instead */ #}{% endblock %}
/* handle Cmd-S and Cmd-Shift-S as save-and-continue and save respectively */
$(document.documentElement).keydown(function(event) {
if(event.which == 83 && event.metaKey) {
sel = event.shiftKey ? 'form:first input[name=_continue]' :
'form:first input[name=_save]';
$(sel).click();
return false;
}
});
});
</script>
{% endblock %}
{% block object-tools %}
{{ block.super }}
{% if change and not is_popup %}
<ul class="extra-object-tools">
{% if has_add_permission and has_parent_attribute %}<li><a href="../add/?parent={{ object_id }}" class="addchild">{% trans "Add child page" %}</a></li> {% endif %}
</ul>
<script type="text/javascript">{# DRY object-tools addition #}
feincms.jQuery(function($){
$(".extra-object-tools li").appendTo("ul.object-tools");
$(".extra-object-tools").remove();
});
</script>
{% endif %}
{% endblock %}
{% block form_top %}
{% with original.available_translations as translations %}
{% if translations %}
<div style="float: right;padding: 5px 0 0 0" id="available_translations">
{% trans "available translations" %}:
{% for translation in translations %}
<a href="../{{ translation.id }}/" title="{{ translation }}">{{ translation.language|upper }}</a>{% if not forloop.last %},{% endif %}
{% endfor %}
</div>
<script type="text/javascript">
feincms.jQuery(function($){
$('#id_language').parent().prepend($('#available_translations'));
});
</script>
{% endif %}
{% endwith %}
{% endblock %}
{% block after_related_objects %} {# as good a place as any... #}
{{ block.super }}
<div id="content-editor-fieldset" style="display: none">
{% include "admin/feincms/content_editor.html" %}
</div>
<script type="text/javascript">
feincms.jQuery(function($){
$("h2:contains('{{ FEINCMS_CONTENT_FIELDSET_NAME }}')").parent().replaceWith($("#main_wrapper"));
});
</script>
{% endblock %}