[fix] missing modules POS and Learn
This commit is contained in:
parent
1ec7631971
commit
4aa2f441d5
5 changed files with 14 additions and 8 deletions
|
|
@ -70,7 +70,7 @@ def get_bootinfo():
|
|||
def load_conf_settings(bootinfo):
|
||||
from frappe import conf
|
||||
bootinfo.max_file_size = conf.get('max_file_size') or 10485760
|
||||
for key in ['developer_mode']:
|
||||
for key in ('developer_mode', 'socketio_port'):
|
||||
if key in conf: bootinfo[key] = conf.get(key)
|
||||
|
||||
def load_desktop_icons(bootinfo):
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ def get_data():
|
|||
"type": "doctype",
|
||||
"name": "Event",
|
||||
"label": _("Calendar"),
|
||||
"view": "Calendar",
|
||||
"link": "Calendar/Event",
|
||||
"description": _("Event and other calendars."),
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -368,15 +368,20 @@ frappe.get_desktop_icons = function(show_hidden) {
|
|||
if(m.type==="page") {
|
||||
out = m.link in frappe.boot.page_info;
|
||||
}
|
||||
if(m._doctype) {
|
||||
else if(m._doctype) {
|
||||
out = frappe.model.can_read(m._doctype);
|
||||
} else {
|
||||
out = frappe.boot.user.allow_modules.indexOf(m.module_name) !== -1
|
||||
if(m.module_name==='Learn') {
|
||||
// no permissions necessary for learn
|
||||
out = true;
|
||||
} else {
|
||||
out = frappe.boot.user.allow_modules.indexOf(m.module_name) !== -1
|
||||
}
|
||||
}
|
||||
if(out && !show_hidden) {
|
||||
if(m.hidden) out = false;
|
||||
}
|
||||
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,11 +77,12 @@ frappe.socket = {
|
|||
get_host: function() {
|
||||
var host = window.location.origin;
|
||||
if(window.dev_server) {
|
||||
parts = host.split(":");
|
||||
var parts = host.split(":");
|
||||
var port = frappe.boot.socketio_port || '3000';
|
||||
if(parts.length > 2) {
|
||||
host = parts[0] + ":" + parts[1];
|
||||
}
|
||||
host = host + ":3000";
|
||||
host = host + ":" + port;
|
||||
}
|
||||
return host;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ function get_conf() {
|
|||
var read_config = function(path) {
|
||||
if(fs.existsSync(path)){
|
||||
var bench_config = JSON.parse(fs.readFileSync(path));
|
||||
for (var key in conf) {
|
||||
for (var key in bench_config) {
|
||||
if (bench_config[key]) {
|
||||
conf[key] = bench_config[key];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue