Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
f1nality committed Sep 7, 2015
2 parents bbd37db + d1eab17 commit 321ae7e
Show file tree
Hide file tree
Showing 78 changed files with 6,773 additions and 963 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
Changelog
=========

0.0.7
-----
* [Feature] Added Google Analytics visitors totals dashboard widget
* [Feature] Added Google Analytics visitors chart dashboard widget
* [Feature] Added Google Analytics period visitors dashboard widget
* [Feature] Added Yandex Metrika visitors totals dashboard widget
* [Feature] Added Yandex Metrika visitors chart dashboard widget
* [Feature] Added Yandex Metrika period visitors dashboard widget
* [Feature] Animated ajax loaded modules height on load
* [Feature] Added initial docs
* [Feature] Added ability to use custom checkboxes without labels styled
* [Feature] Added ability to specify optional modules urls
* [Feature] Added pop/update module settings methods
* [Feature] Added module contrast style
* [Feature] Added module custom style property
* [Feature] Pass module to module settings form
* [Feature] Set dashboard widgets minimum width
* [Feature] Added dashboard widgets class helpers
* [Fix] Fixed toggle all checkbox
* [Fix] Fixed 500 when module class cannot be loaded
* [Fix] Fixed datetime json encoder
* [Fix] Fixed double shadow for tables in dashboard modules
* [Fix] Fixed tables forced alignment
* [Fix] Fixed dashboard ul layout
* [Fix] Fixed language code formatting for js
* [Fix] Fixed 500 when adding module if no module type specified


0.0.6
-----

Expand Down
2 changes: 1 addition & 1 deletion jet/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '0.0.6'
VERSION = '0.0.7'
Empty file added jet/dashboard/__init__.py
Empty file.
27 changes: 21 additions & 6 deletions jet/dashboard.py → jet/dashboard/dashboard.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from importlib import import_module
from django.core.urlresolvers import resolve, reverse
from django.template.loader import render_to_string
from jet import modules
from jet.models import UserDashboardModule
from jet.dashboard import modules
from jet.dashboard.models import UserDashboardModule
from django.core.context_processors import csrf
from django.utils.translation import ugettext_lazy as _
from jet.ordered_set import OrderedSet
Expand Down Expand Up @@ -84,8 +84,9 @@ def load_modules(self):

for module_model in module_models:
module_cls = module_model.load_module()
module = module_cls(model=module_model, context=self.context)
loaded_modules.append(module)
if module_cls is not None:
module = module_cls(model=module_model, context=self.context)
loaded_modules.append(module)

self.modules = loaded_modules

Expand All @@ -98,7 +99,7 @@ def render(self):
})
context.update(csrf(context['request']))

return render_to_string('jet/dashboard/dashboard.html', context)
return render_to_string('jet.dashboard/dashboard.html', context)

def render_tools(self):
context = self.context
Expand All @@ -109,7 +110,7 @@ def render_tools(self):
})
context.update(csrf(context['request']))

return render_to_string('jet/dashboard/dashboard_tools.html', context)
return render_to_string('jet.dashboard/dashboard_tools.html', context)

def media(self):
unique_css = OrderedSet()
Expand Down Expand Up @@ -244,3 +245,17 @@ def init_with_context(self, context):
order=0
))


class DashboardUrls(object):
_urls = []

def get_urls(self):
return self._urls

def register_url(self, url):
self._urls.append(url)

def register_urls(self, urls):
self._urls.extend(urls)

urls = DashboardUrls()
Empty file.
Loading

0 comments on commit 321ae7e

Please sign in to comment.