Skip to content

Commit

Permalink
Builder bug when selecting search field in View form dialog fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jam-py committed Mar 4, 2022
1 parent 0821492 commit 81f89a6
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion jam/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = (5, 4, 116)
__version__ = (5, 4, 117)

def version():
return '%s.%s.%s' % __version__
Expand Down
18 changes: 9 additions & 9 deletions jam/admin/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'label_size': ['xSmall', 'Small', 'Medium', 'Large', 'xLarge'],
'group_type': consts.GROUP_TYPES
}

def get_value_list(str_list):
result = []
for i, s in enumerate(str_list):
Expand Down Expand Up @@ -65,17 +65,17 @@ def restore_caption_keys(task):
def restore_keys(item):
if hasattr(item, 'field_defs'):
for field_def in item.field_defs:
field_def[FIELD_CAPTION] = item.__caption_keys[field_def[FIELD_NAME]]
field_def[FIELD_CAPTION] = item.__caption_keys[field_def[FIELD_NAME]]

task.all(restore_keys)

def change_language(task):

def change_fields_lang(item):
if hasattr(item, 'field_defs'):
for field_def in item.field_defs:
field_def[FIELD_CAPTION] = item.task.language(field_def[FIELD_CAPTION])

restore_caption_keys(task)
consts.read_language()
task.all(change_fields_lang)
Expand Down Expand Up @@ -717,11 +717,11 @@ def server_save_edit(task, item_id, text, is_server):
def set_server_modified(task):
if task.item_name == 'admin':
task.app.server_modified = True

def set_client_modified(task):
if task.item_name == 'admin':
task.app.client_modified = True

def server_file_info(task, file_name):
result = {}
file_path = file_name
Expand Down Expand Up @@ -802,7 +802,7 @@ def server_can_delete_lookup_list(task, list_id):

def server_valid_field_accept_value(task, accept):
try:
get_ext_list(accept)
get_ext_list(accept)
return True
except:
return False
Expand Down Expand Up @@ -1169,7 +1169,7 @@ def upload_file(task, path, file_name, f):
os.makedirs(dir_path)
f.save(os.path.join(dir_path, file_name))
return path, file_name


###############################################################################
# sys_items #
Expand Down Expand Up @@ -1505,7 +1505,7 @@ def server_store_interface(item, id_value, info):
item.open(fields=['id', 'f_info'])
item._view_list = info['view_list']
item._edit_list = info['edit_list']
item._order_list = info['order_list']
item._order_list = info['order_list']
item._reports_list = info['reports_list']
item.store_interface()
set_server_modified(item.task)
Expand Down
32 changes: 17 additions & 15 deletions jam/js/jam.js
Original file line number Diff line number Diff line change
Expand Up @@ -11801,22 +11801,24 @@
field = this.item.field_by_name(td.data('field_name')),
$row = td.parent();
rec = this.record_by_row($row);
if (this.edit_mode && rec !== this.item.rec_no) {
if (!this.item.is_edited()) {
this.item.edit();
if (rec !== undefined) {
if (this.edit_mode && rec !== this.item.rec_no) {
if (!this.item.is_edited()) {
this.item.edit();
}
this.flush_editor();
this.item.post();
}
this.item.rec_no = rec;
if (!this.editing && !this.is_focused()) {
this.focus();
}
if (field) {
this.set_selected_field(field);
}
if (e.type === "dblclick") {
this.do_on_edit(field);
}
this.flush_editor();
this.item.post();
}
this.item.rec_no = rec;
if (!this.editing && !this.is_focused()) {
this.focus();
}
if (field) {
this.set_selected_field(field);
}
if (e.type === "dblclick") {
this.do_on_edit(field);
}
},

Expand Down
4 changes: 2 additions & 2 deletions jam/js/jam.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 81f89a6

Please sign in to comment.