mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW Add ALT+s to save a website page in edit mode
This commit is contained in:
parent
a365800967
commit
fd216d99ed
|
|
@ -3146,7 +3146,18 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
|
||||
if (in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesiteconfirm')) || in_array($mode, array('replacesite'))) {
|
||||
if ($action == 'editcss') {
|
||||
print '<input type="submit" id="savefileandstay" class="button buttonforacesave hideonsmartphone small" value="'.dol_escape_htmltag($langs->trans("SaveAndStay")).'" name="updateandstay">';
|
||||
// accesskey is for Windows or Linux: ALT + key for chrome, ALT + SHIFT + KEY for firefox
|
||||
// accesskey is for Mac: CTRL + key for all browsers
|
||||
$stringforfirstkey = $langs->trans("KeyboardShortcut");
|
||||
if ($conf->browser->name == 'chrome') {
|
||||
$stringforfirstkey .= ' ALT +';
|
||||
} elseif ($conf->browser->name == 'firefox') {
|
||||
$stringforfirstkey .= ' ALT + SHIFT +';
|
||||
} else {
|
||||
$stringforfirstkey .= ' CTL +';
|
||||
}
|
||||
|
||||
print '<input type="submit" accesskey="s" title="'.dol_escape_htmltag($stringforfirstkey.' s').'" id="savefileandstay" class="button buttonforacesave hideonsmartphone small" value="'.dol_escape_htmltag($langs->trans("SaveAndStay")).'" name="updateandstay">';
|
||||
}
|
||||
if (preg_match('/^create/', $action) && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') {
|
||||
print '<input type="submit" id="savefile" class="button buttonforacesave button-save small" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
||||
|
|
@ -3541,7 +3552,18 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
}
|
||||
if (!in_array($mode, array('replacesite')) && !in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesiteconfirm', 'createsite', 'createcontainer', 'createfromclone', 'createpagefromclone', 'deletesite'))) {
|
||||
if ($action == 'editsource' || $action == 'editmeta') {
|
||||
print '<input type="submit" id="savefileandstay" class="button buttonforacesave hideonsmartphone small" value="'.dol_escape_htmltag($langs->trans("SaveAndStay")).'" name="updateandstay">';
|
||||
// accesskey is for Windows or Linux: ALT + key for chrome, ALT + SHIFT + KEY for firefox
|
||||
// accesskey is for Mac: CTRL + key for all browsers
|
||||
$stringforfirstkey = $langs->trans("KeyboardShortcut");
|
||||
if ($conf->browser->name == 'chrome') {
|
||||
$stringforfirstkey .= ' ALT +';
|
||||
} elseif ($conf->browser->name == 'firefox') {
|
||||
$stringforfirstkey .= ' ALT + SHIFT +';
|
||||
} else {
|
||||
$stringforfirstkey .= ' CTL +';
|
||||
}
|
||||
|
||||
print '<input type="submit" accesskey="s" title="'.dol_escape_htmltag($stringforfirstkey.' s').'" id="savefileandstay" class="button buttonforacesave hideonsmartphone small" value="'.dol_escape_htmltag($langs->trans("SaveAndStay")).'" name="updateandstay">';
|
||||
}
|
||||
if (preg_match('/^create/', $action)) {
|
||||
print '<input type="submit" id="savefile" class="button buttonforacesave button-save small" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user