Fixes in admin

This commit is contained in:
Antonio de la Rosa 2017-12-27 01:22:25 +01:00
parent 714aab9e8f
commit e03b3f699e
3 changed files with 8 additions and 8 deletions

View file

@ -90,6 +90,8 @@ class HierarchyModelLinks:
def prepare(self): 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: with self.model.set_conditions('', []).select([self.model.name_field_id, self.field_name, self.field_parent]) as cur:
for arr_model in cur: for arr_model in cur:
if self.field_parent not in self.arr_parent: if self.field_parent not in self.arr_parent:
@ -97,6 +99,8 @@ class HierarchyModelLinks:
self.arr_parent[arr_model[self.model.name_field_id]]=[arr_model[self.field_name], arr_model[self.field_parent]] 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): def parents(self, son_id, url_func):
if son_id not in self.arr_parent or son_id==0: if son_id not in self.arr_parent or son_id==0:

View file

@ -7,13 +7,9 @@
tinymce.init({ tinymce.init({
selector: '#${form.name_field_id}', selector: '#${form.name_field_id}',
height: 500, height: 500,
menubar: false, menubar: true,
plugins: [ 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',
'advlist autolink lists link image charmap print preview anchor', toolbar: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat',
'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',
content_css: '//www.tinymce.com/css/codepen.min.css', content_css: '//www.tinymce.com/css/codepen.min.css',
setup: function (editor) { setup: function (editor) {
editor.on('change', function () { editor.on('change', function () {