Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #32

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b9cdd7e
Un-namespace jQuery in header
blanchardjeremy Jun 11, 2013
b478c2e
Moved 'bookmarks' menu item to after apps, before User icon
krimkus Jul 5, 2013
ef72a83
Added collapse.min.js because it shouldn't have gone away and the sou…
Jul 15, 2013
316cae3
Merge pull request #26 from auzigog/patch-6
krimkus Jul 17, 2013
4f35acc
Merge pull request #27 from auzigog/patch-7
krimkus Jul 17, 2013
d248f78
CA-22 – Memcached dashboard status widget no longer displays unless t…
Jul 17, 2013
4d096ec
CKEditor widget no longer has 9em left margin.
Jul 18, 2013
abe7dc6
CA-21: Imported advanced search styles from APN into client admin.
Jul 25, 2013
972d7d8
CA-1: Deleting parent list item now causes the style to appropriately…
Jul 29, 2013
9b9f1c1
CA-2: Deleting stacked inlines now collapses them, and keeps them col…
Aug 1, 2013
278c1d8
Revert "CA-2: Deleting stacked inlines now collapses them, and keeps …
Aug 1, 2013
19d5d87
Merge branch 'feature/CA-1' into develop
Aug 1, 2013
2c0b7d9
Merged branches caused some changes to be lost.
Aug 1, 2013
ab8c9be
CA-19: Long titles now have overflow:hidden so they stay inside dashb…
Oct 3, 2013
1812951
CA-24: Changed the advanced search styles in client admin change list…
Oct 4, 2013
bd5835b
CA-24: Fixed a mistake in resizing; added some documentation
Oct 4, 2013
83992ce
CA-18: Made overflow text in labels for textfields hidden. In order t…
Oct 4, 2013
ea63403
CA-18: Changed to word break
Oct 4, 2013
24b9908
Moved some js to client_admin.js where it belongs!
Oct 4, 2013
e000be9
CA-10: Client Admin changelist filter now actually displays all the o…
Oct 4, 2013
6908b72
CA-10: Also the sass file
Oct 4, 2013
048afe2
CA-16: CKEditor widget now no longer sits too far to the right; added…
Oct 4, 2013
4f40931
Cleaned up jQuery and added some documentation.
Oct 4, 2013
6e59f74
CA-20: body.delete_confirmation a tags have cursor:pointer even witho…
Oct 4, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions client_admin/dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
from django.utils.importlib import import_module
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from django.core.cache import get_cache
from django.contrib.contenttypes.models import ContentType
from django.conf import settings

from client_admin import modules
from client_admin.utils import uniquify
Expand Down Expand Up @@ -97,8 +99,18 @@ def init_with_context(self, context):
, css_classes=('activity',)
))

self.children.append(modules.MemcachedStatus())

# append a Memcached Status module only if there are any statuses to display
cache_display = False
for cache_backend_nm, cache_backend_attrs in settings.CACHES.iteritems():
try:
cache_backend = get_cache(cache_backend_nm)
this_backend_stats = cache_backend._cache.get_stats()
if this_backend_stats:
cache_display = True
except AttributeError: # this backend probably doesn't support that
continue
if cache_display:
self.children.append(modules.MemcachedStatus())

def get_id(self):
"""
Expand Down
4 changes: 2 additions & 2 deletions client_admin/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def init_with_context(self, context):

self.children += [
items.MenuItem(_('Dashboard'), reverse('admin:index')),
items.Bookmarks(),
items.AppList(
_('Content'),
exclude=('django.contrib.*',)
Expand All @@ -51,6 +50,7 @@ def init_with_context(self, context):
_('Administration'),
models=('django.contrib.*',)
),
items.Bookmarks(),
items.MenuItem(
_('Account'),
css_classes=('user-tools',),
Expand All @@ -62,4 +62,4 @@ def init_with_context(self, context):
),
]
for child in self.children:
child.init_with_context(context)
child.init_with_context(context)
1 change: 1 addition & 0 deletions client_admin/static/admin/js/collapse.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions client_admin/static/admin/js/jquery.init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* Puts the included jQuery into our own namespace using noConflict and passing
* it 'true'. This ensures that the included jQuery doesn't pollute the global
* namespace (i.e. this preserves pre-existing values for both window.$ and
* window.jQuery).
*/
var django = {
"jQuery": jQuery.noConflict(true)
};
jQuery = django.jQuery;
Loading