From e03b3f699e0f2c1701af4610e37fce8b0c50663b Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Wed, 27 Dec 2017 01:22:25 +0100 Subject: [PATCH] Fixes in admin --- paramecio/citoplasma/hierarchy_links.py | 4 ++++ .../citoplasma/templates/forms/texthtmlform.phtml | 10 +++------- paramecio/modules/admin/index.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/paramecio/citoplasma/hierarchy_links.py b/paramecio/citoplasma/hierarchy_links.py index 0e31887..569b2bb 100644 --- a/paramecio/citoplasma/hierarchy_links.py +++ b/paramecio/citoplasma/hierarchy_links.py @@ -89,6 +89,8 @@ class HierarchyModelLinks: self.first_element_title=first_element_title def prepare(self): + + conditions=self.model.conditions with self.model.set_conditions('', []).select([self.model.name_field_id, self.field_name, self.field_parent]) as cur: for arr_model in cur: @@ -96,6 +98,8 @@ class HierarchyModelLinks: self.arr_parent[arr_model[self.model.name_field_id]]=[] self.arr_parent[arr_model[self.model.name_field_id]]=[arr_model[self.field_name], arr_model[self.field_parent]] + + self.model.conditions=conditions def parents(self, son_id, url_func): diff --git a/paramecio/citoplasma/templates/forms/texthtmlform.phtml b/paramecio/citoplasma/templates/forms/texthtmlform.phtml index b7b3423..191cf75 100644 --- a/paramecio/citoplasma/templates/forms/texthtmlform.phtml +++ b/paramecio/citoplasma/templates/forms/texthtmlform.phtml @@ -7,13 +7,9 @@ tinymce.init({ selector: '#${form.name_field_id}', height: 500, - menubar: false, - plugins: [ - 'advlist autolink lists link image charmap print preview anchor', - 'searchreplace visualblocks code fullscreen', - 'insertdatetime media table contextmenu paste code' - ], - toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', + menubar: true, + plugins: 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists textcolor wordcount imagetools contextmenu colorpicker textpattern', + toolbar: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat', content_css: '//www.tinymce.com/css/codepen.min.css', setup: function (editor) { editor.on('change', function () { diff --git a/paramecio/modules/admin/index.py b/paramecio/modules/admin/index.py index be3c979..72d8b94 100644 --- a/paramecio/modules/admin/index.py +++ b/paramecio/modules/admin/index.py @@ -122,7 +122,7 @@ def home(module='', submodule=''): #print(t.env.directories) #if config.reloader: #reload(new_module) - + except ImportError: print("Exception in user code:")