ソースを参照

Merge pull request #13247 from gavindsouza/doc-actions-mobile

version-14
Suraj Shetty 4年前
committed by GitHub
コミット
00af014cca
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
2個のファイルの変更17行の追加3行の削除
  1. +11
    -3
      frappe/public/js/frappe/form/form.js
  2. +6
    -0
      frappe/public/scss/desk/global.scss

+ 11
- 3
frappe/public/js/frappe/form/form.js ファイルの表示

@@ -1125,9 +1125,17 @@ frappe.ui.form.Form = class FrappeForm {


add_custom_button(label, fn, group) { add_custom_button(label, fn, group) {
// temp! old parameter used to be icon // temp! old parameter used to be icon
if(group && group.indexOf("fa fa-")!==-1) group = null;
var btn = this.page.add_inner_button(label, fn, group);
if(btn) {
if (group && group.indexOf("fa fa-") !== -1)
group = null;

let btn = this.page.add_inner_button(label, fn, group);

if (btn) {
// Add actions as menu item in Mobile View
let menu_item_label = group ? `${group} > ${label}` : label;
let menu_item = this.page.add_menu_item(menu_item_label, fn, false);
menu_item.parent().addClass("hidden-lg");

this.custom_buttons[label] = btn; this.custom_buttons[label] = btn;
} }
return btn; return btn;


+ 6
- 0
frappe/public/scss/desk/global.scss ファイルの表示

@@ -120,6 +120,12 @@ pre {
} }
} }


.hidden-lg {
@include media-breakpoint-up(md) {
display: none !important;
}
}

.visible-xs { .visible-xs {
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
display: none !important; display: none !important;


読み込み中…
キャンセル
保存