Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding visible new button to field, creating new embed mode for new form
- Loading branch information
Showing
8 changed files
with
105 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% load item_tags %}<!DOCTYPE html> | ||
<html lang="en-us" class="embed"> | ||
<head> | ||
<title>{% block title %}{% endblock %}</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta charset="utf-8"> | ||
<link href="{% media_url "css/deme.css" %}" rel="stylesheet"> | ||
<script type="text/javascript" src="{% media_url "javascripts/jquery-1.7.2.min.js" %}"></script> | ||
<script type="text/javascript" src="{% media_url "javascripts/respond.min.js" %}"></script> | ||
<script type="text/javascript" src="{% media_url "javascripts/jquery-1.7.2.min.js" %}"></script> | ||
<script type="text/javascript" src="{% media_url "javascripts/jquery.cookie.js" %}"></script> | ||
<script type="text/javascript" src="{% media_url "javascripts/jquery-ui-1.8.21.custom.min.js" %}"></script> | ||
<script type="text/javascript" src="{% media_url "javascripts/bootstrap.min.js" %}"></script> | ||
<link href="{% media_url "stylesheets/smoothness/jquery-ui-1.8.21.custom.css" %}" media="all" rel="Stylesheet" type="text/css" /> | ||
<script type="text/javascript" src="{% media_url "javascripts/grid.locale-en.js" %}"></script> | ||
<script type="text/javascript" src="{% media_url "javascripts/jquery.jqGrid.min.js" %}"></script> | ||
<link href="{% media_url "stylesheets/ui.jqgrid.css" %}" media="all" rel="Stylesheet" type="text/css" /> | ||
<script type="text/javascript" src="{% media_url "javascripts/deme/jqgrid-helpers.js" %}"></script> | ||
<script type="text/javascript" src="{% media_url "javascripts/deme/ajax-model-choice-widget.js" %}"></script> | ||
</head> | ||
<body> | ||
{% block content %}{% endblock %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,6 @@ | ||
{% extends layout %} | ||
{% load item_tags %} | ||
{% block content %} | ||
|
||
{% if is_html %} | ||
<script type="text/javascript" src="{% media_url "javascripts/tinymce/jscripts/tiny_mce/tiny_mce.js" %}"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function () { | ||
tinyMCE.init({ | ||
// General options | ||
mode: "exact", | ||
elements: "body", | ||
theme : "advanced", | ||
plugins : "table,advimage,advlink,media,paste,fullscreen,xhtmlxtras,searchreplace", | ||
|
||
// Theme options | ||
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect,|,search,replace", | ||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,blockquote,|,cite,abbr,acronym,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor", | ||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,|,sub,sup,|,charmap,media,|,fullscreen", | ||
theme_advanced_toolbar_location : "top", | ||
theme_advanced_toolbar_align : "left", | ||
theme_advanced_statusbar_location : "bottom", | ||
theme_advanced_resizing : true, | ||
convert_urls : false, | ||
}); | ||
}); | ||
</script> | ||
{% endif %} | ||
|
||
<div style="border: thin solid #aaa; background: #eee; padding: 10px; margin-bottom: 10px;"> | ||
{% for item_type in item_types %} | ||
<span>[ | ||
{% ifequal item_type.item_type accepted_item_type %} | ||
<b>New {{ item_type.name|capfirst }}</b> | ||
{% else %} | ||
<a href="{% url item_type_url viewer=item_type.viewer,action="new" %}?{{ query_string }}">New {{ item_type.name|capfirst }}</a> | ||
{% endifequal %} | ||
]</span> | ||
{% endfor %} | ||
</div> | ||
|
||
<div> | ||
{% if form %} | ||
<form method="post" enctype="multipart/form-data" action="{% url item_type_url viewer=viewer_name,action="create" %}?{% if add_to_collection %}add_to_collection={{ add_to_collection|urlencode }}&{% endif %}{% if redirect %}redirect={{ redirect|urlencode }}{% endif %}" class="item_form"> | ||
<table cellspacing="0"> | ||
{{ form.as_table }} | ||
</table> | ||
<div> | ||
<button type="button" onclick="$('#permission_editor').toggle();"><img src="{{ "permissions"|icon_url:16 }}" /> <span>Permissions</span></button> | ||
</div> | ||
<div id="permission_editor" style="display: none;"> | ||
{% new_item_permission_editor item %} | ||
</div> | ||
<button type="submit"><img src="{{ "checkbox"|icon_url:16 }}" /> <span>Create {{ accepted_item_type_name }}</span></button> | ||
</form> | ||
{% else %} | ||
You do not have permission to create {{ accepted_item_type_name_plural }}. | ||
{% endif %} | ||
</div> | ||
|
||
|
||
{% endblock content %} | ||
{% include "item/new_bare.html" %} | ||
|
||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{% load item_tags %} | ||
{% if is_html %} | ||
<script type="text/javascript" src="{% media_url "javascripts/tinymce/jscripts/tiny_mce/tiny_mce.js" %}"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function () { | ||
tinyMCE.init({ | ||
// General options | ||
mode: "exact", | ||
elements: "body", | ||
theme : "advanced", | ||
plugins : "table,advimage,advlink,media,paste,fullscreen,xhtmlxtras,searchreplace", | ||
|
||
// Theme options | ||
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect,|,search,replace", | ||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,blockquote,|,cite,abbr,acronym,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor", | ||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,|,sub,sup,|,charmap,media,|,fullscreen", | ||
theme_advanced_toolbar_location : "top", | ||
theme_advanced_toolbar_align : "left", | ||
theme_advanced_statusbar_location : "bottom", | ||
theme_advanced_resizing : true, | ||
convert_urls : false, | ||
}); | ||
}); | ||
</script> | ||
{% endif %} | ||
|
||
<div style="border: thin solid #aaa; background: #eee; padding: 10px; margin-bottom: 10px;"> | ||
{% for item_type in item_types %} | ||
<span>[ | ||
{% ifequal item_type.item_type accepted_item_type %} | ||
<b>New {{ item_type.name|capfirst }}</b> | ||
{% else %} | ||
<a href="{% url item_type_url viewer=item_type.viewer,action="new" %}?{{ query_string }}">New {{ item_type.name|capfirst }}</a> | ||
{% endifequal %} | ||
]</span> | ||
{% endfor %} | ||
</div> | ||
|
||
<div> | ||
{% if form %} | ||
<form method="post" enctype="multipart/form-data" action="{% url item_type_url viewer=viewer_name,action="create" %}?{% if add_to_collection %}add_to_collection={{ add_to_collection|urlencode }}&{% endif %}{% if redirect %}redirect={{ redirect|urlencode }}{% endif %}" class="item_form"> | ||
<table cellspacing="0"> | ||
{{ form.as_table }} | ||
</table> | ||
<div> | ||
<button type="button" onclick="$('#permission_editor').toggle();"><img src="{{ "permissions"|icon_url:16 }}" /> <span>Permissions</span></button> | ||
</div> | ||
<div id="permission_editor" style="display: none;"> | ||
{% new_item_permission_editor item %} | ||
</div> | ||
<button type="submit"><img src="{{ "checkbox"|icon_url:16 }}" /> <span>Create {{ accepted_item_type_name }}</span></button> | ||
</form> | ||
{% else %} | ||
You do not have permission to create {{ accepted_item_type_name_plural }}. | ||
{% endif %} | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% extends "embed.html" %} | ||
{% block title %}{{ action_title }}{% endblock %} | ||
{% block content %} | ||
{% include "item/new_bare.html" %} | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
deme_django/static/javascripts/deme/ajax-model-choice-widget-ck.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters