From df341bdd09208d2b0f84060454cc0000df19deba Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Sun, 13 Oct 2019 00:39:48 +0200 Subject: [PATCH 1/1] You will find only what you bring in. (Bootstrap editor design.) --- .gitignore | 3 +- requirements/requirements.txt | 1 + src/catalogue/forms.py | 2 +- src/catalogue/templates/catalogue/base.html | 35 +- .../templates/catalogue/book_list/book.html | 57 +- .../templates/catalogue/book_list/chunk.html | 44 +- .../templates/catalogue/document_list.html | 6 +- .../templates/catalogue/head_login.html | 24 - .../templates/catalogue/image_list.html | 6 +- .../templates/catalogue/image_short.html | 23 +- .../templates/catalogue/my_page.html | 6 +- src/cover/views.py | 2 +- src/redakcja/settings/__init__.py | 21 +- .../static/contextmenu/images/cut.png | Bin 648 -> 0 bytes .../static/contextmenu/images/door.png | Bin 412 -> 0 bytes .../contextmenu/images/page_white_copy.png | Bin 309 -> 0 bytes .../contextmenu/images/page_white_delete.png | Bin 536 -> 0 bytes .../contextmenu/images/page_white_edit.png | Bin 618 -> 0 bytes .../contextmenu/images/page_white_paste.png | Bin 620 -> 0 bytes src/redakcja/static/contextmenu/index.html | 200 - .../static/contextmenu/jquery.contextMenu.css | 134 - .../static/contextmenu/jquery.contextMenu.js | 1485 --- .../static/contextmenu/jquery.ui.position.js | 252 - .../static/contextmenu2/images/cut.png | Bin 648 -> 0 bytes .../static/contextmenu2/images/door.png | Bin 412 -> 0 bytes .../contextmenu2/images/page_white_copy.png | Bin 309 -> 0 bytes .../contextmenu2/images/page_white_delete.png | Bin 536 -> 0 bytes .../contextmenu2/images/page_white_edit.png | Bin 618 -> 0 bytes .../contextmenu2/images/page_white_paste.png | Bin 620 -> 0 bytes src/redakcja/static/contextmenu2/index.html | 200 - .../contextmenu2/jquery.contextMenu.css | 62 - .../static/contextmenu2/jquery.contextMenu.js | 211 - src/redakcja/static/css/gallery.css | 61 +- src/redakcja/static/css/history.css | 12 +- src/redakcja/static/css/html.css | 13 +- src/redakcja/static/css/master.css | 242 +- src/redakcja/static/css/toolbar.css | 83 +- src/redakcja/static/js/button_scripts.js | 2 +- .../js/lib/codemirror-0.8/codemirror.js | 538 - .../static/js/lib/codemirror-0.8/editor.js | 1514 --- .../static/js/lib/codemirror-0.8/parsexml.js | 286 - .../static/js/lib/codemirror-0.8/select.js | 672 -- .../js/lib/codemirror-0.8/stringstream.js | 140 - .../static/js/lib/codemirror-0.8/tokenize.js | 57 - .../static/js/lib/codemirror-0.8/undo.js | 410 - .../static/js/lib/codemirror-0.8/util.js | 130 - .../js/lib/codemirror-5.49.0/codemirror.css | 349 + .../js/lib/codemirror-5.49.0/codemirror.js | 9765 +++++++++++++++++ .../js/lib/codemirror-5.49.0/searchcursor.js | 293 + .../static/js/lib/codemirror-5.49.0/xml.js | 413 + .../static/js/lib/jquery-1.7.2.min.js | 4 - .../js/lib/jquery/jquery.autocomplete.js | 816 -- .../static/js/lib/jquery/jquery.blockui.js | 483 +- .../static/js/lib/jquery/jquery.elastic.js | 168 +- .../static/js/lib/jquery/jquery.xmlns.js | 273 +- src/redakcja/static/js/wiki/base.js | 43 +- src/redakcja/static/js/wiki/loader.js | 96 +- .../static/js/wiki/loader_readonly.js | 8 +- src/redakcja/static/js/wiki/toolbar.js | 6 +- .../static/js/wiki/view_annotations.js | 23 +- .../static/js/wiki/view_editor_source.js | 139 +- .../static/js/wiki/view_editor_wysiwyg.js | 21 +- src/redakcja/static/js/wiki/view_gallery.js | 12 +- src/redakcja/static/js/wiki/view_history.js | 6 +- src/redakcja/static/js/wiki/view_search.js | 30 +- src/redakcja/static/js/wiki/wikiapi.js | 6 +- src/redakcja/static/js/wiki/xslt.js | 26 +- src/redakcja/static/js/wiki_img/base.js | 40 +- src/redakcja/static/js/wiki_img/loader.js | 35 +- .../static/js/wiki_img/loader_readonly.js | 6 +- .../static/js/wiki_img/view_editor_motifs.js | 144 +- .../static/js/wiki_img/view_editor_objects.js | 100 +- src/redakcja/static/js/wiki_img/wikiapi.js | 25 - src/redakcja/templates/base.html | 15 +- .../templates/registration/head_login.html | 26 +- src/toolbar/admin.py | 2 +- src/toolbar/templates/toolbar/button.html | 6 +- src/toolbar/templates/toolbar/toolbar.html | 16 +- src/wiki/static/wiki/js/perspective.js | 65 + .../static/wiki/js/sidebar-perspective.js | 21 + src/wiki/static/wiki/js/themes.js | 73 + src/wiki/static/wiki/scss/splitter.scss | 50 + src/wiki/static/wiki/scss/visual.scss | 8 + src/wiki/templates/wiki/document_details.html | 15 +- .../templates/wiki/document_details_base.html | 83 +- .../wiki/document_details_readonly.html | 11 +- .../templates/wiki/tabs/annotations_view.html | 42 +- .../wiki/tabs/annotations_view_item.html | 4 +- .../templates/wiki/tabs/gallery_view.html | 29 +- .../wiki/tabs/gallery_view_item.html | 4 +- .../templates/wiki/tabs/history_view.html | 28 +- .../wiki/tabs/history_view_item.html | 4 +- src/wiki/templates/wiki/tabs/search_view.html | 49 +- .../templates/wiki/tabs/search_view_item.html | 4 +- .../wiki/tabs/source_editor_item.html | 6 +- .../templates/wiki/tabs/summary_view.html | 4 +- .../wiki/tabs/summary_view_item.html | 4 +- .../templates/wiki/tabs/wysiwyg_editor.html | 23 +- .../wiki/tabs/wysiwyg_editor_item.html | 4 +- .../templates/wiki_img/document_details.html | 19 +- .../wiki_img/document_details_base.html | 56 +- .../wiki_img/document_details_readonly.html | 13 +- .../templates/wiki_img/tabs/history_view.html | 29 +- .../wiki_img/tabs/motifs_editor.html | 23 +- .../wiki_img/tabs/motifs_editor_item.html | 4 +- .../wiki_img/tabs/objects_editor.html | 23 +- .../wiki_img/tabs/objects_editor_item.html | 4 +- .../wiki_img/tabs/source_editor_item.html | 6 +- 108 files changed, 12131 insertions(+), 8906 deletions(-) delete mode 100644 src/catalogue/templates/catalogue/head_login.html delete mode 100644 src/redakcja/static/contextmenu/images/cut.png delete mode 100644 src/redakcja/static/contextmenu/images/door.png delete mode 100644 src/redakcja/static/contextmenu/images/page_white_copy.png delete mode 100644 src/redakcja/static/contextmenu/images/page_white_delete.png delete mode 100644 src/redakcja/static/contextmenu/images/page_white_edit.png delete mode 100644 src/redakcja/static/contextmenu/images/page_white_paste.png delete mode 100644 src/redakcja/static/contextmenu/index.html delete mode 100644 src/redakcja/static/contextmenu/jquery.contextMenu.css delete mode 100644 src/redakcja/static/contextmenu/jquery.contextMenu.js delete mode 100644 src/redakcja/static/contextmenu/jquery.ui.position.js delete mode 100644 src/redakcja/static/contextmenu2/images/cut.png delete mode 100644 src/redakcja/static/contextmenu2/images/door.png delete mode 100644 src/redakcja/static/contextmenu2/images/page_white_copy.png delete mode 100644 src/redakcja/static/contextmenu2/images/page_white_delete.png delete mode 100644 src/redakcja/static/contextmenu2/images/page_white_edit.png delete mode 100644 src/redakcja/static/contextmenu2/images/page_white_paste.png delete mode 100644 src/redakcja/static/contextmenu2/index.html delete mode 100644 src/redakcja/static/contextmenu2/jquery.contextMenu.css delete mode 100644 src/redakcja/static/contextmenu2/jquery.contextMenu.js delete mode 100644 src/redakcja/static/js/lib/codemirror-0.8/codemirror.js delete mode 100644 src/redakcja/static/js/lib/codemirror-0.8/editor.js delete mode 100644 src/redakcja/static/js/lib/codemirror-0.8/parsexml.js delete mode 100644 src/redakcja/static/js/lib/codemirror-0.8/select.js delete mode 100644 src/redakcja/static/js/lib/codemirror-0.8/stringstream.js delete mode 100644 src/redakcja/static/js/lib/codemirror-0.8/tokenize.js delete mode 100644 src/redakcja/static/js/lib/codemirror-0.8/undo.js delete mode 100644 src/redakcja/static/js/lib/codemirror-0.8/util.js create mode 100644 src/redakcja/static/js/lib/codemirror-5.49.0/codemirror.css create mode 100644 src/redakcja/static/js/lib/codemirror-5.49.0/codemirror.js create mode 100644 src/redakcja/static/js/lib/codemirror-5.49.0/searchcursor.js create mode 100644 src/redakcja/static/js/lib/codemirror-5.49.0/xml.js delete mode 100644 src/redakcja/static/js/lib/jquery-1.7.2.min.js delete mode 100644 src/redakcja/static/js/lib/jquery/jquery.autocomplete.js create mode 100644 src/wiki/static/wiki/js/perspective.js create mode 100644 src/wiki/static/wiki/js/sidebar-perspective.js create mode 100644 src/wiki/static/wiki/js/themes.js create mode 100644 src/wiki/static/wiki/scss/splitter.scss create mode 100644 src/wiki/static/wiki/scss/visual.scss diff --git a/.gitignore b/.gitignore index ee2673ee..26943157 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,8 @@ localsettings.py dev.sqlite requirements.pybundle *~ -*.orig +*.swp +.*.orig /redakcja/media /static .sass-cache diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 1cc8830c..c90865e9 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -21,5 +21,6 @@ fnp-django-pagination==2.2.4 django-gravatar2==1.4.2 django-extensions==2.1.6 django-bootstrap4==1.0.1 +libsasscompiler==0.1.5 sentry-sdk==0.12.2 diff --git a/src/catalogue/forms.py b/src/catalogue/forms.py index 20709a52..e61a1b71 100644 --- a/src/catalogue/forms.py +++ b/src/catalogue/forms.py @@ -141,7 +141,7 @@ class BookForm(forms.ModelForm): orig_instance = Book.objects.get(pk=self.instance.pk) old_gallery = orig_instance.gallery new_gallery = self.cleaned_data['gallery'] - if new_gallery != old_gallery: + if new_gallery and old_gallery and new_gallery != old_gallery: import shutil import os.path from django.conf import settings diff --git a/src/catalogue/templates/catalogue/base.html b/src/catalogue/templates/catalogue/base.html index f819c96f..c35e5395 100644 --- a/src/catalogue/templates/catalogue/base.html +++ b/src/catalogue/templates/catalogue/base.html @@ -17,7 +17,7 @@ -