@@ -198,19 +198,11 @@ body { | |||||
margin: 0px; | margin: 0px; | ||||
padding: 0px; | padding: 0px; | ||||
width: 100%; | width: 100%; | ||||
height: 100%; | |||||
position: fixed; | |||||
top: 0px; | |||||
bottom: 0px; | |||||
left: 0px; | |||||
right: 0px; | |||||
overflow-y: auto; | |||||
background-color: #fff; | background-color: #fff; | ||||
} | } | ||||
.modal .modal-content { | .modal .modal-content { | ||||
border-radius: 0px; | border-radius: 0px; | ||||
border: none; | border: none; | ||||
box-shadow: none; | |||||
height: 100%; | height: 100%; | ||||
} | } | ||||
.modal .modal-body .form-layout { | .modal .modal-body .form-layout { | ||||
@@ -38,9 +38,6 @@ frappe.ui.Dialog = frappe.ui.FieldGroup.extend({ | |||||
var me = this; | var me = this; | ||||
this.$wrapper | this.$wrapper | ||||
.on("hide.bs.modal", function() { | .on("hide.bs.modal", function() { | ||||
if(me.body_hidden) { | |||||
$("#body_div").toggle(true); | |||||
} | |||||
me.display = false; | me.display = false; | ||||
if(frappe.ui.open_dialogs[frappe.ui.open_dialogs.length-1]===me) { | if(frappe.ui.open_dialogs[frappe.ui.open_dialogs.length-1]===me) { | ||||
frappe.ui.open_dialogs.pop(); | frappe.ui.open_dialogs.pop(); | ||||
@@ -54,10 +51,6 @@ frappe.ui.Dialog = frappe.ui.FieldGroup.extend({ | |||||
}) | }) | ||||
.on("shown.bs.modal", function() { | .on("shown.bs.modal", function() { | ||||
// focus on first input | // focus on first input | ||||
if(frappe.is_mobile()) { | |||||
$("#body_div").toggle(false); | |||||
me.body_hidden = true; | |||||
} | |||||
me.display = true; | me.display = true; | ||||
cur_dialog = me; | cur_dialog = me; | ||||
frappe.ui.open_dialogs.push(me); | frappe.ui.open_dialogs.push(me); | ||||
@@ -26,6 +26,14 @@ frappe.ui.toolbar.Toolbar = Class.extend({ | |||||
$("header .navbar .custom-menu").remove(); | $("header .navbar .custom-menu").remove(); | ||||
}); | }); | ||||
//focus search-modal on show in mobile view | |||||
$('#search-modal').on('shown.bs.modal', function () { | |||||
var search_modal = $(this); | |||||
setTimeout(function() { | |||||
search_modal.find('#modal-search').focus(); | |||||
}, 300); | |||||
}); | |||||
frappe.search.setup(); | frappe.search.setup(); | ||||
}, | }, | ||||
@@ -232,21 +232,12 @@ body { | |||||
margin: 0px; | margin: 0px; | ||||
padding: 0px; | padding: 0px; | ||||
width: 100%; | width: 100%; | ||||
height: 100%; | |||||
position: fixed; | |||||
top: 0px; | |||||
bottom: 0px; | |||||
left: 0px; | |||||
right: 0px; | |||||
overflow-y: auto; | |||||
background-color: #fff; | background-color: #fff; | ||||
} | } | ||||
.modal-content { | .modal-content { | ||||
border-radius: 0px; | border-radius: 0px; | ||||
border: none; | border: none; | ||||
box-shadow: none; | |||||
height: 100%; | height: 100%; | ||||
} | } | ||||