forked from django-cms/django-filer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request django-cms#1 from Flight/feature/cms-643-improve-b…
…asic-code-styling Feature/cms 643 improve basic code styling
- Loading branch information
Showing
24 changed files
with
638 additions
and
545 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 |
---|---|---|
@@ -1,20 +1,23 @@ | ||
(function($) { | ||
var filer_clear = function(e){ | ||
(function ($) { | ||
var documentObject = $(document); | ||
var filer_clear = function (e) { | ||
var clearer = $(this), | ||
hidden_input = clearer.closest('.filerFile').find('input.vForeignKeyRawIdAdminField'), | ||
base_id = '#'+hidden_input.attr('id'), | ||
thumbnail = $(base_id+'_thumbnail_img'), | ||
description = $(base_id+'_description_txt'), | ||
base_id = '#' + hidden_input.attr('id'), | ||
thumbnail = $(base_id + '_thumbnail_img'), | ||
description = $(base_id + '_description_txt'), | ||
static_prefix = clearer.attr('src').replace('admin/img/icon_deletelink.gif', 'filer/'); | ||
clearer.hide(); | ||
hidden_input.removeAttr("value"); | ||
thumbnail.attr("src", static_prefix+"icons/nofile_48x48.png"); | ||
description.html(""); | ||
} | ||
hidden_input.removeAttr('value'); | ||
thumbnail.attr('src', static_prefix + 'icons/nofile_48x48.png'); | ||
description.empty(); | ||
}; | ||
|
||
$(document).ready(function(){ | ||
documentObject.ready(function () { | ||
$('.filerFile .vForeignKeyRawIdAdminField').attr('type', 'hidden'); | ||
//if this file is included multiple time, we ensure that filer_clear is attached only once. | ||
$(document).off('click.filer', '.filerFile .filerClearer', filer_clear).on('click.filer', '.filerFile .filerClearer', filer_clear); | ||
documentObject | ||
.off('click.filer', '.filerFile .filerClearer', filer_clear) | ||
.on('click.filer', '.filerFile .filerClearer', filer_clear); | ||
}); | ||
})(django.jQuery); |
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,16 +1,18 @@ | ||
{% load i18n %} | ||
<div class="actions"> | ||
{% for field in action_form %}{% if field.label %}<label>{{ field.label }} {% endif %}{{ field }}{% if field.label %}</label>{% endif %}{% endfor %} | ||
<button type="submit" class="button" title="{% trans "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">{% trans "Go" %}</button> | ||
<button type="submit" class="button" title="{% trans 'Run the selected action' %}" name="index" value="{{ action_index|default:0 }}">{% trans "Go" %}</button> | ||
{% if actions_selection_counter %} | ||
<script type="text/javascript">var _actions_icnt="{{ paginated_items.object_list|length|default:"0" }}";</script> | ||
<script type="text/javascript"> | ||
var _actions_icnt="{{ paginated_items.object_list|length|default:'0' }}"; | ||
</script> | ||
<span class="action-counter">{{ selection_note }}</span> | ||
{% if paginator.count != paginated_items.object_list|length %} | ||
<span class="all">{{ selection_note_all }}</span> | ||
<span class="question"> | ||
<a href="javascript:;" title="{% trans "Click here to select the objects across all pages" %}">{% blocktrans with paginator.count as total_count %}Select all {{ total_count }} files and/or folders{% endblocktrans %}</a> | ||
</span> | ||
<span class="clear"><a href="javascript:;">{% trans "Clear selection" %}</a></span> | ||
<span class="all">{{ selection_note_all }}</span> | ||
<span class="question"> | ||
<a href="javascript:;" title="{% trans 'Click here to select the objects across all pages' %}">{% blocktrans with paginator.count as total_count %}Select all {{ total_count }} files and/or folders{% endblocktrans %}</a> | ||
</span> | ||
<span class="clear"><a href="javascript:;">{% trans "Clear selection" %}</a></span> | ||
{% endif %} | ||
{% 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{% extends "admin/base_site.html" %} | ||
{% load i18n staticfiles %} | ||
|
||
{% block extrastyle %}{{ block.super }} | ||
<link rel="stylesheet" type="text/css" href="{% static "filer/css/admin_style.css" %}" /> | ||
{% block extrastyle %} | ||
{{ block.super }} | ||
<link rel="stylesheet" type="text/css" href="{% static 'filer/css/admin_style.css' %}" /> | ||
{% endblock %} |
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,15 +1,18 @@ | ||
{% load i18n %} | ||
|
||
<div class="breadcrumbs"> | ||
<a href="{% url 'admin:index' %}" title="{% trans "Go back to admin homepage" %}">{% trans "Home" %}</a> | ||
› <a href="{% url 'admin:app_list' app_label='filer' %}" title="{% trans "Go back to Filer app" %}"> {% trans "Filer" %}</a> | ||
{% if instance.is_root and not instance.is_smart_folder %}{%else %}› <a href="{% url 'admin:filer-directory_listing-root' %}" title="{% trans "Go back to root folder" %}">{% trans "root" %}</a>{% endif %} | ||
<a href="{% url 'admin:index' %}" title="{% trans 'Go back to admin homepage' %}">{% trans "Home" %}</a> | ||
› <a href="{% url 'admin:app_list' app_label='filer' %}" title="{% trans 'Go back to Filer app' %}"> {% trans "Filer" %}</a> | ||
{% if not instance.is_root and instance.is_smart_folder %} | ||
› <a href="{% url 'admin:filer-directory_listing-root' %}" title="{% trans 'Go back to root folder' %}">{% trans "root" %}</a> | ||
{% endif %} | ||
{% for ancestor_folder in instance.logical_path %} | ||
› <a href="{{ ancestor_folder.get_admin_directory_listing_url_path }}" title="{% blocktrans with ancestor_folder.name as folder_name %}Go back to '{{ folder_name }}' folder{% endblocktrans %}">{% if ancestor_folder.label %}{{ ancestor_folder.label }}{% else %}{{ ancestor_folder.name }}{% endif %}</a> | ||
› <a href="{{ ancestor_folder.get_admin_directory_listing_url_path }}" title="{% blocktrans with ancestor_folder.name as folder_name %}Go back to '{{ folder_name }}' folder{% endblocktrans %}">{% if ancestor_folder.label %}{{ ancestor_folder.label }}{% else %}{{ ancestor_folder.name }}{% endif %}</a> | ||
{% endfor %} | ||
{% if breadcrumbs_action %} | ||
› <a href="{{ instance.get_admin_directory_listing_url_path }}" title="{% blocktrans with instance.name as folder_name %}Go back to '{{ folder_name }}' folder{% endblocktrans %}">{% if instance.label %}{{ instance.label }}{% else %}{{ instance.name }}{% endif %}</a> | ||
› {{ breadcrumbs_action }} | ||
› <a href="{{ instance.get_admin_directory_listing_url_path }}" title="{% blocktrans with instance.name as folder_name %}Go back to '{{ folder_name }}' folder{% endblocktrans %}">{% if instance.label %}{{ instance.label }}{% else %}{{ instance.name }}{% endif %}</a> | ||
› {{ breadcrumbs_action }} | ||
{% else %} | ||
› {% if instance.label %}{{ instance.label }}{% else %}{{ instance.name }}{% endif %} | ||
› {% if instance.label %}{{ instance.label }}{% else %}{{ instance.name }}{% endif %} | ||
{% 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
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
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,8 +1,8 @@ | ||
{% extends "admin/filer/base_site.html" %} | ||
|
||
{% block extrahead %} | ||
{{ block.super }} | ||
<script type="text/javascript"> | ||
opener.dismissPopupAndReload(window); | ||
</script> | ||
{{ block.super }} | ||
<script type="text/javascript"> | ||
opener.dismissPopupAndReload(window); | ||
</script> | ||
{% endblock %} |
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
Oops, something went wrong.