Resolved few issues with browser.js:
(dynamic menu generation, typo in error message) - Dynamic menu generation code was failing for some corner cases. - Removed trailing whitespaces. - Resolved a typo in the message - 'click_for_detailed_msg', which was resulting in '{}' message instead of actual error message.pull/3/head
parent
41e85fd631
commit
2d7a218792
|
@ -509,8 +509,8 @@ function(require, $, _, S, Bootstrap, pgAdmin, alertify, CodeMirror) {
|
||||||
// First - register the menus from the other
|
// First - register the menus from the other
|
||||||
// modules/extensions.
|
// modules/extensions.
|
||||||
if (counter.total == counter.loaded) {
|
if (counter.total == counter.loaded) {
|
||||||
{% set cnt = 1 %}
|
{% set hasMenus = None %}
|
||||||
obj.add_menus([{% for key in ('File', 'Edit', 'Object' 'Tools', 'Management', 'Help') %}{% for item in current_app.menu_items['%s_items' % key.lower()] %}{% if cnt != 1 %}, {% endif %} {
|
obj.add_menus([{% for key in ('File', 'Edit', 'Object' 'Tools', 'Management', 'Help') %}{% for item in current_app.menu_items['%s_items' % key.lower()] %}{% if hasMenus is not none %}, {% endif %} {
|
||||||
name: "{{ item.name }}",
|
name: "{{ item.name }}",
|
||||||
{% if item.module %}module: {{ item.module }},
|
{% if item.module %}module: {{ item.module }},
|
||||||
{% endif %}{% if item.url %}url: "{{ item.url }}",
|
{% endif %}{% if item.url %}url: "{{ item.url }}",
|
||||||
|
@ -521,7 +521,7 @@ function(require, $, _, S, Bootstrap, pgAdmin, alertify, CodeMirror) {
|
||||||
{% endif %}label: '{{ item.label }}', applies: ['{{ key.lower() }}'],
|
{% endif %}label: '{{ item.label }}', applies: ['{{ key.lower() }}'],
|
||||||
priority: {{ item.priority }},
|
priority: {{ item.priority }},
|
||||||
enable: '{{ item.enable }}'
|
enable: '{{ item.enable }}'
|
||||||
}{% set cnt = cnt + 1 %}{% endfor %}{% set cnt = cnt + 1 %}{% endfor %}]);
|
}{% set hasMenus = True %}{% endfor %}{% endfor %}]);
|
||||||
obj.create_menus();
|
obj.create_menus();
|
||||||
} else {
|
} else {
|
||||||
// recall after some time
|
// recall after some time
|
||||||
|
@ -629,7 +629,7 @@ function(require, $, _, S, Bootstrap, pgAdmin, alertify, CodeMirror) {
|
||||||
},
|
},
|
||||||
messages: {
|
messages: {
|
||||||
'server_lost': '{{ _('Connection to the server has been lost!') }}',
|
'server_lost': '{{ _('Connection to the server has been lost!') }}',
|
||||||
'click_for_detailed_msg': '{{ _('%s<br><br>click here for details!') }}',
|
'click_for_detailed_msg': '{{ _('%%s<br><br>click here for details!') }}',
|
||||||
'general_cateogty': '{{ _('General') }}',
|
'general_cateogty': '{{ _('General') }}',
|
||||||
'SQL_TAB': '{{ _('SQL') }}',
|
'SQL_TAB': '{{ _('SQL') }}',
|
||||||
'SQL_NO_CHANGE': '-- ' + '{{ _('Nothing changed') }}',
|
'SQL_NO_CHANGE': '-- ' + '{{ _('Nothing changed') }}',
|
||||||
|
|
Loading…
Reference in New Issue