Fixing few issues with context menu icon missing.

Introduced a new ajax function to return the HTTP Status code 410 (GONE).
Changed the location of the javascript from each modules, it loads.

Added .swp, .swo files in the .gitignore file
This commit is contained in:
Ashesh Vashi 2015-12-04 14:47:18 +05:30
parent b36e264fd3
commit 537df154fe
4 changed files with 12 additions and 2 deletions

2
.gitignore vendored
View File

@ -16,3 +16,5 @@ runtime/ui_BrowserWindow.h
runtime/.qmake.stash
web/config_local.py
pgadmin4.log
*.swp
*.swo

View File

@ -407,7 +407,7 @@ OWNER TO helpdesk;\n';
_.sortBy(menus, function(m) { return m.priority; }),
function(m) {
if (m.category == 'create' && !m.disabled(d)) {
createMenu[m.module.type + '_' + m.name] = { name: m.label, icon: m.module.type };
createMenu[m.module.type + '_' + m.name] = { name: m.label, icon: m.icon || m.module.type };
}
});

View File

@ -312,7 +312,7 @@ class NodeView(with_metaclass(MethodViewType, View)):
"""
return flask.make_response(
flask.render_template(
"{0}/{0}.js".format(self.node_type)
"{0}/js/{0}.js".format(self.node_type)
),
200, {'Content-Type': 'application/x-javascript'}
)

View File

@ -92,3 +92,11 @@ def success_return(message=''):
success=1,
info=message
)
def gone(errormsg=''):
"""Create a response with HTTP status code 410 - GONE."""
return make_json_response(
status=410,
success=0,
errormsg=errormsg
)