From 6ef8df9dafe593e03a77726f585216af3e3c2d37 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 1 Oct 2014 17:13:35 +0200 Subject: [PATCH] Use fontawesome icons. see #585 --- modoboa/core/templatetags/core_tags.py | 6 ++--- .../admin/templates/admin/searchform.html | 2 +- .../templates/amavis/main_action_bar.html | 4 ++-- .../amavis/templatetags/amavis_tags.py | 10 ++++---- .../radicale/templatetags/radicale_tags.py | 6 ++--- .../sievefilters/general_callbacks.py | 2 +- .../sievefilters/js/jquery.dynfields.js | 8 +++---- .../templatetags/sfilters_tags.py | 20 ++++++++-------- .../stats/templates/stats/index.html | 6 ++--- modoboa/static/js/jquery.sortable.js | 6 ++--- modoboa/static/js/listing.js | 2 +- modoboa/templates/common/pagination_bar.html | 24 +++++++++---------- .../templates/common/top_notifications.html | 2 +- modoboa/templates/nlayout.html | 10 ++++---- 14 files changed, 54 insertions(+), 54 deletions(-) diff --git a/modoboa/core/templatetags/core_tags.py b/modoboa/core/templatetags/core_tags.py index a0abf2dad..2e2a6667b 100644 --- a/modoboa/core/templatetags/core_tags.py +++ b/modoboa/core/templatetags/core_tags.py @@ -73,11 +73,11 @@ def admin_menu(selection, user): def user_menu(user, selection): entries = [ {"name": "user", - "img": "glyphicon glyphicon-user", + "img": "fa fa-user", "label": user.fullname, "menu": [ {"name": "settings", - "img": "glyphicon glyphicon-list", + "img": "fa fa-list", "label": _("Settings"), "url": reverse("core:user_index")} ]} @@ -88,7 +88,7 @@ def user_menu(user, selection): + [{"name": "logout", "url": reverse("core:logout"), "label": _("Logout"), - "img": "glyphicon glyphicon-off"}] + "img": "fa fa-off"}] return render_to_string("common/menulist.html", { "selection": selection, "entries": entries, "user": user diff --git a/modoboa/extensions/admin/templates/admin/searchform.html b/modoboa/extensions/admin/templates/admin/searchform.html index 2d681aef4..bac694e17 100644 --- a/modoboa/extensions/admin/templates/admin/searchform.html +++ b/modoboa/extensions/admin/templates/admin/searchform.html @@ -5,7 +5,7 @@ - + diff --git a/modoboa/extensions/amavis/templates/amavis/main_action_bar.html b/modoboa/extensions/amavis/templates/amavis/main_action_bar.html index 3927b12b6..bcc6af815 100644 --- a/modoboa/extensions/amavis/templates/amavis/main_action_bar.html +++ b/modoboa/extensions/amavis/templates/amavis/main_action_bar.html @@ -18,12 +18,12 @@
- {% trans "Release" %} + {% trans "Release" %}
- {% trans "Delete" %} + {% trans "Delete" %}
diff --git a/modoboa/extensions/amavis/templatetags/amavis_tags.py b/modoboa/extensions/amavis/templatetags/amavis_tags.py index dc37960ce..676c5ab0d 100644 --- a/modoboa/extensions/amavis/templatetags/amavis_tags.py +++ b/modoboa/extensions/amavis/templatetags/amavis_tags.py @@ -13,18 +13,18 @@ def viewm_menu(mail_id, rcpt): entries = [ {"name": "back", "url": "javascript:history.go(-2);", - "img": "glyphicon glyphicon-arrow-left", + "img": "fa fa-arrow-left", "class": "btn-primary", "label": _("Back")}, {"name": "release", - "img": "glyphicon glyphicon-ok", + "img": "fa fa-check", "class": "btn-success", "url": reverse('amavis:mail_release', args=[mail_id]) + ("?rcpt=%s" % rcpt if rcpt else ""), "label": _("Release")}, {"name": "delete", "class": "btn-danger", - "img": "glyphicon glyphicon-trash", + "img": "fa fa-trash", "url": reverse('amavis:mail_delete', args=[mail_id]) + ("?rcpt=%s" % rcpt if rcpt else ""), "label": _("Delete")}, @@ -52,14 +52,14 @@ def viewm_menu(mail_id, rcpt): def viewm_menu_simple(user, mail_id, rcpt, secret_id=""): entries = [ {"name": "release", - "img": "glyphicon glyphicon-ok", + "img": "fa fa-check", "class": "btn-success", "url": reverse('amavis:mail_release', args=[mail_id]) \ + ("?rcpt=%s" % rcpt \ + (("&secret_id=%s" % secret_id) if secret_id != "" else "")), "label": _("Release")}, {"name": "delete", - "img": "glyphicon glyphicon-trash", + "img": "fa fa-trash", "class": "btn-danger", "url": reverse('amavis:mail_delete', args=[mail_id]) \ + "?rcpt=%s" % rcpt \ diff --git a/modoboa/extensions/radicale/templatetags/radicale_tags.py b/modoboa/extensions/radicale/templatetags/radicale_tags.py index f9992e354..0b18285b8 100644 --- a/modoboa/extensions/radicale/templatetags/radicale_tags.py +++ b/modoboa/extensions/radicale/templatetags/radicale_tags.py @@ -22,7 +22,7 @@ def radicale_left_menu(user): entries = [ {"name": "newusercalendar", "label": _("Add calendar"), - "img": "glyphicon glyphicon-plus", + "img": "fa fa-plus", "modal": True, "modalcb": "radicale.add_calendar_cb", "url": reverse("radicale:user_calendar_add")}, @@ -31,7 +31,7 @@ def radicale_left_menu(user): entries += [ {"name": "newsharedcalendar", "label": _("Add shared calendar"), - "img": "glyphicon glyphicon-plus", + "img": "fa fa-plus", "modal": True, "modalcb": "radicale.shared_calendar_cb", "url": reverse("radicale:shared_calendar_add")}, @@ -67,7 +67,7 @@ def calendar_actions(calendar): actions = [{ "name": "delcalendar", "title": _("Delete %s?" % calendar), - "img": "glyphicon glyphicon-trash" + "img": "fa fa-trash" }] if calendar.__class__.__name__ == 'UserCalendar': actions[0]["url"] = reverse( diff --git a/modoboa/extensions/sievefilters/general_callbacks.py b/modoboa/extensions/sievefilters/general_callbacks.py index 7b1a41019..c09b73fc4 100644 --- a/modoboa/extensions/sievefilters/general_callbacks.py +++ b/modoboa/extensions/sievefilters/general_callbacks.py @@ -13,7 +13,7 @@ def menu(target, user): {"name": "sievefilters", "label": _("Message filters"), "url": reverse("sievefilters:index"), - "img": "glyphicon glyphicon-check"} + "img": "fa fa-filter"} ] diff --git a/modoboa/extensions/sievefilters/static/sievefilters/js/jquery.dynfields.js b/modoboa/extensions/sievefilters/static/sievefilters/js/jquery.dynfields.js index 015a1669a..1b6c8a253 100644 --- a/modoboa/extensions/sievefilters/static/sievefilters/js/jquery.dynfields.js +++ b/modoboa/extensions/sievefilters/static/sievefilters/js/jquery.dynfields.js @@ -8,7 +8,7 @@ var $addlink = $('', { href: '#', id: this.$element.attr("id") + '_rmbtn', - html: '' + html: '' }); $("select[name*=cond_target_]").change($.proxy(this.target_change, this)); $addlink.click($.proxy(this.addfields, this)); @@ -54,7 +54,7 @@ return $('', { href: '#', id: 'condition_' + this.nextid + '_rmbtn', - html: '' + html: '' }).click($.proxy(this.removefields, this)); }, @@ -160,7 +160,7 @@ var $addlink = $('', { href: '#', id: this.$element.attr("id") + '_rmbtn', - html: '' + html: '' }); $("select[name*=action_name_]").change($.proxy(this.name_change, this)); $addlink.click($.proxy(this.addfields, this)); @@ -257,7 +257,7 @@ return $('', { href: '#', id: 'action_' + this.nextid + '_rmbtn', - html: '' + html: '' }).click($.proxy(this.removefields, this)); }, diff --git a/modoboa/extensions/sievefilters/templatetags/sfilters_tags.py b/modoboa/extensions/sievefilters/templatetags/sfilters_tags.py index a08d7d3dd..0f977fee7 100644 --- a/modoboa/extensions/sievefilters/templatetags/sfilters_tags.py +++ b/modoboa/extensions/sievefilters/templatetags/sfilters_tags.py @@ -13,7 +13,7 @@ register = template.Library() def sfilters_menu(user): entries = [ {"name": "newfilterset", - "img": "glyphicon glyphicon-plus", + "img": "fa fa-plus", "label": _("New filters set"), "url": reverse("sievefilters:fs_add"), "modal": True, @@ -31,7 +31,7 @@ def fset_menu(mode, setname): if mode == "gui": entries += [ {"name": "newfilter", - "img": "glyphicon glyphicon-plus", + "img": "fa fa-plus", "label": _("New filter"), "url": reverse("sievefilters:filter_add", args=[setname]), @@ -42,7 +42,7 @@ def fset_menu(mode, setname): if mode == "raw": entries += [ {"name": "savefs", - "img": "glyphicon glyphicon-download-alt", + "img": "fa fa-download-alt", "label": _("Save filters set"), "url": reverse("sievefilters:fs_save", args=[setname])}, @@ -50,16 +50,16 @@ def fset_menu(mode, setname): entries += [ {"name": "activatefs", - "img": "glyphicon glyphicon-ok", + "img": "fa fa-check", "label": _("Activate filters set"), "url": reverse("sievefilters:fs_activate", args=[setname])}, {"name": "removefs", - "img": "glyphicon glyphicon-trash", + "img": "fa fa-trash", "label": _("Remove filters set"), "url": reverse("sievefilters:fs_delete", args=[setname])}, {"name": "downloadfs", - "img": "glyphicon glyphicon-download", + "img": "fa fa-download", "label": _("Download"), "url": reverse("sievefilters:fs_download", args=[setname])} ] @@ -74,7 +74,7 @@ def filter_actions(setname, f, position, islast): {"name": "editfilter", "url": reverse( "sievefilters:filter_change", args=[setname, f["name"]]), - "img": "glyphicon glyphicon-edit", + "img": "fa fa-edit", "title": _("Edit filter"), "modal": True, "autowidth": True, @@ -82,7 +82,7 @@ def filter_actions(setname, f, position, islast): {"name": "removefilter", "url": reverse( "sievefilters:filter_delete", args=[setname, f["name"]]), - "img": "glyphicon glyphicon-trash", + "img": "fa fa-trash", "title": _("Remove this filter")} ] if position != 1: @@ -90,7 +90,7 @@ def filter_actions(setname, f, position, islast): {"name": "movefilter_up", "url": reverse( "sievefilters:filter_move_up", args=[setname, f["name"]]), - "img": "glyphicon glyphicon-arrow-up", + "img": "fa fa-chevron-up", "title": _("Move this filter up")} ] if not islast: @@ -98,7 +98,7 @@ def filter_actions(setname, f, position, islast): {"name": "movefilter_down", "url": reverse( "sievefilters:filter_move_down", args=[setname, f["name"]]), - "img": "glyphicon glyphicon-arrow-down", + "img": "fa fa-chevron-down", "title": _("Move this filter down")}, ] return render_actions(actions) diff --git a/modoboa/extensions/stats/templates/stats/index.html b/modoboa/extensions/stats/templates/stats/index.html index 41b81fbf7..ba6426259 100644 --- a/modoboa/extensions/stats/templates/stats/index.html +++ b/modoboa/extensions/stats/templates/stats/index.html @@ -34,7 +34,7 @@ $(document).ready(function() {
- +
@@ -57,13 +57,13 @@ $(document).ready(function() {
-
+
-
+
diff --git a/modoboa/static/js/jquery.sortable.js b/modoboa/static/js/jquery.sortable.js index dfc3dbf06..3699b11d7 100644 --- a/modoboa/static/js/jquery.sortable.js +++ b/modoboa/static/js/jquery.sortable.js @@ -50,8 +50,8 @@ dir = "desc"; } } - this.$element.append($("", { - "class": "sort-selection glyphicon glyphicon-chevron-" + ((dir == 'asc') ? 'up' : 'down') + this.$element.append($("", { + "class": "sort-selection fa fa-chevron-" + ((dir == 'asc') ? 'up' : 'down') })); return dir; } @@ -78,4 +78,4 @@ $.fn.sortable.defaults = { onSortOrderChange: null }; -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/modoboa/static/js/listing.js b/modoboa/static/js/listing.js index 2c44a6bb9..d1019d1f4 100644 --- a/modoboa/static/js/listing.js +++ b/modoboa/static/js/listing.js @@ -136,7 +136,7 @@ Listing.prototype = { "html": text }); - $("", {"class" : "glyphicon glyphicon-remove"}).prependTo($tag); + $("", {"class" : "fa fa-remove"}).prependTo($tag); $tag.click($.proxy(this.remove_tag, this)); return $tag; }, diff --git a/modoboa/templates/common/pagination_bar.html b/modoboa/templates/common/pagination_bar.html index 054dfab91..6a72d2245 100644 --- a/modoboa/templates/common/pagination_bar.html +++ b/modoboa/templates/common/pagination_bar.html @@ -3,18 +3,18 @@ {% if page.has_previous %}
  • - +
  • {% else %}
  • - +
  • - +
  • {% endif %}
  • - +
  • - +
  • {% else %}
  • - +
  • - +
  • {% endif %} @@ -42,13 +42,13 @@
    {% if page.has_previous %} - + {% else %} - + {% endif %} {% if page.has_next %} - + {% else %} - + {% endif %}
    diff --git a/modoboa/templates/common/top_notifications.html b/modoboa/templates/common/top_notifications.html index 8145a292d..7592a3539 100644 --- a/modoboa/templates/common/top_notifications.html +++ b/modoboa/templates/common/top_notifications.html @@ -1,7 +1,7 @@
  • - +