Procházet zdrojové kódy

Merge branch 'dev'

Denis K před 9 roky
rodič
revize
5caaa17dc6
26 změnil soubory, kde provedl 125 přidání a 41 odebrání
  1. 12 0
      CHANGELOG.rst
  2. 27 7
      README.rst
  3. 54 8
      docs/config_file.rst
  4. 26 6
      docs/install.rst
  5. 6 0
      jet/static/jet/js/main.js
  6. 0 0
      jet/static/jet/js/main.min.js
  7. 0 0
      jet/static/jet/vendor/jquery-ui-timepicker/include/jquery-1.9.0.min.js
  8. 0 4
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/jquery.ui.core.min.js
  9. 0 4
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/jquery.ui.position.min.js
  10. 0 4
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/jquery.ui.tabs.min.js
  11. 0 4
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/jquery.ui.widget.min.js
  12. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  13. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
  14. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
  15. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
  16. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
  17. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
  18. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
  19. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  20. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  21. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_222222_256x240.png
  22. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_228ef1_256x240.png
  23. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_ef8c08_256x240.png
  24. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_ffd27a_256x240.png
  25. binární
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_ffffff_256x240.png
  26. 0 4
      jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/jquery-ui-1.10.0.custom.min.css

+ 12 - 0
CHANGELOG.rst

@@ -1,6 +1,18 @@
 Changelog
 =========
 
+0.1.3
+-----
+* [Feature] Add theme choosing ability
+* [Feature] New color themes
+* [Fix] Refactor themes
+* [Fix] Rename JET_THEME configuration option to JET_DEFAULT_OPTION
+* [Fix] Fixed scrolling to top when side menu opens
+* [Fix] Fixed read only fields paddings
+* [Fix] Issue-18: Remove unused resources which may brake static processing (thanks to DheerendraRathor for the report)
+* [Fix] Issue-19: Fixed datetime today button (thanks to carlosfvieira for the report)
+
+
 0.1.2
 -----
 * [Fix] Issue-14: Fixed ajax fields choices being rendered in page (thanks to dnmellen for the report)

+ 27 - 7
README.rst

@@ -73,15 +73,35 @@ Installation
         'django.contrib.admin',
     )
         
-* Make sure 'django.core.context_processors.request' context processor is enabled in settings.py:
+* Make sure ``django.template.context_processors.request`` context processor is enabled in settings.py (Django 1.8+ way):
 
 .. code:: python
-        
-    from django.conf import global_settings
-    
-    TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
-        'django.core.context_processors.request',
-    )
+
+    TEMPLATES = [
+        {
+            'BACKEND': 'django.template.backends.django.DjangoTemplates',
+            'DIRS': [],
+            'APP_DIRS': True,
+            'OPTIONS': {
+                'context_processors': [
+                    ...
+                    'django.template.context_processors.request',
+                    ...
+                ],
+            },
+        },
+    ]
+
+.. warning::
+    Before Django 1.8 you should specify context processors different way. Also use ``django.core.context_processors.request`` instead of ``django.template.context_processors.request``.
+
+    .. code:: python
+
+        from django.conf import global_settings
+
+        TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
+            'django.core.context_processors.request',
+        )
 
 * Add URL-pattern to the urlpatterns of your Django project urls.py file (they are needed for related–lookups and autocompletes):
 

+ 54 - 8
docs/config_file.rst

@@ -3,8 +3,8 @@ Config file
 
 Options available in settings.py:
 
-JET_THEME
----------
+JET_DEFAULT_THEME
+-----------------
 
 Django JET allows you to change default theme. This feature is mainly used for customizing color schemes rather than
 making absolutely different themes. This option in fact make Django load different css styles.
@@ -13,22 +13,68 @@ Possible built-in themes are:
 
 * default
 * green
-
-.. note::
-    More themes are incoming in future.
+* light-violet
+* light-green
+* light-blue
+* light-gray
 
 To change theme use parameter:
 
 .. code:: python
 
-    JET_DEFAULT_THEME = 'default'
+    JET_DEFAULT_THEME = 'light-gray'
+
+JET_THEMES
+----------
+
+You can allow your users to change admin panel color scheme. This option will add color scheme chooser to the user dropdown menu. Make ``JET_THEMES`` an empty list to disable this feature.
+
+.. code:: python
+
+    JET_THEMES = [
+        {
+            'theme': 'default', # theme folder name
+            'color': '#47bac1', # color of the theme's button in user menu
+            'title': 'Default' # theme title
+        },
+        {
+            'theme': 'violet',
+            'color': '#a464c4',
+            'title': 'Violet'
+        },
+        {
+            'theme': 'green',
+            'color': '#44b78b',
+            'title': 'Green'
+        },
+        {
+            'theme': 'light-green',
+            'color': '#2faa60',
+            'title': 'Light Green'
+        },
+        {
+            'theme': 'light-violet',
+            'color': '#a464c4',
+            'title': 'Light Violet'
+        },
+        {
+            'theme': 'light-blue',
+            'color': '#5EADDE',
+            'title': 'Light Blue'
+        },
+        {
+            'theme': 'light-gray',
+            'color': '#222',
+            'title': 'Light Gray'
+        }
+    ]
 
 CUSTOM JET_THEME
 ----------------
 
 You are free to add your own color schemes by adding new folder to **/static/jet/css/themes/**.
-You can use **/jet/static/jet/css/themes/green/** folder as an example (available in Django JET repository).
-_variables.scss contains **all** used colors. You'll have to compile all .scss files in theme directory
+You can use **/jet/static/jet/css/themes/light-violet/** folder as an example (available in Django JET repository).
+_variables.scss contains **all** customizable variables. You'll have to compile all .scss files in theme directory
 to start using your own theme.
 
 

+ 26 - 6
docs/install.rst

@@ -26,15 +26,35 @@ Installation
         ...
     )
 
-* Make sure 'django.core.context_processors.request' context processor is enabled in settings.py:
+* Make sure ``django.template.context_processors.request`` context processor is enabled in settings.py (Django 1.8+ way):
 
 .. code:: python
 
-    from django.conf import global_settings
-
-    TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
-        'django.core.context_processors.request',
-    )
+    TEMPLATES = [
+        {
+            'BACKEND': 'django.template.backends.django.DjangoTemplates',
+            'DIRS': [],
+            'APP_DIRS': True,
+            'OPTIONS': {
+                'context_processors': [
+                    ...
+                    'django.template.context_processors.request',
+                    ...
+                ],
+            },
+        },
+    ]
+
+.. warning::
+    Before Django 1.8 you should specify context processors different way. Also use ``django.core.context_processors.request`` instead of ``django.template.context_processors.request``.
+
+    .. code:: python
+
+        from django.conf import global_settings
+
+        TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
+            'django.core.context_processors.request',
+        )
 
 * Add URL-pattern to the urlpatterns of your Django project urls.py file (they are needed for related–lookups and autocompletes):
 

+ 6 - 0
jet/static/jet/js/main.js

@@ -494,6 +494,12 @@
                         e.preventDefault();
                     });
                 });
+
+                var old_goToToday = $.datepicker._gotoToday;
+                $.datepicker._gotoToday = function(id) {
+                    old_goToToday.call(this,id);
+                    this._selectDate(id);
+                };
             };
 
             var initTimeWidget = function() {

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
jet/static/jet/js/main.min.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
jet/static/jet/vendor/jquery-ui-timepicker/include/jquery-1.9.0.min.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 4
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/jquery.ui.core.min.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 4
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/jquery.ui.position.min.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 4
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/jquery.ui.tabs.min.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 4
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/jquery.ui.widget.min.js


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_flat_10_000000_40x100.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_222222_256x240.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_228ef1_256x240.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_ef8c08_256x240.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_ffd27a_256x240.png


binární
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/images/ui-icons_ffffff_256x240.png


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 4
jet/static/jet/vendor/jquery-ui-timepicker/include/ui-1.10.0/ui-lightness/jquery-ui-1.10.0.custom.min.css


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů