Fixes in admin
This commit is contained in:
parent
714aab9e8f
commit
e03b3f699e
3 changed files with 8 additions and 8 deletions
|
|
@ -89,6 +89,8 @@ class HierarchyModelLinks:
|
||||||
self.first_element_title=first_element_title
|
self.first_element_title=first_element_title
|
||||||
|
|
||||||
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:
|
||||||
|
|
@ -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]]=[]
|
||||||
|
|
||||||
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):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 () {
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ def home(module='', submodule=''):
|
||||||
#print(t.env.directories)
|
#print(t.env.directories)
|
||||||
#if config.reloader:
|
#if config.reloader:
|
||||||
#reload(new_module)
|
#reload(new_module)
|
||||||
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
||||||
print("Exception in user code:")
|
print("Exception in user code:")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue