Display modify hint as title
This commit is contained in:
parent
dea324f2c7
commit
5050de574f
|
@ -106,6 +106,9 @@ if ($_POST && !$error) {
|
||||||
queries_redirect(remove_from_uri("page"), lang('%d item(s) have been affected.', $affected), $result);
|
queries_redirect(remove_from_uri("page"), lang('%d item(s) have been affected.', $affected), $result);
|
||||||
//! display edit page in case of an error
|
//! display edit page in case of an error
|
||||||
} elseif (!$_POST["import"]) { // modify
|
} elseif (!$_POST["import"]) { // modify
|
||||||
|
if (!$_POST["val"]) {
|
||||||
|
$error = lang('Double click on a value to modify it.');
|
||||||
|
} else {
|
||||||
$result = true;
|
$result = true;
|
||||||
$affected = 0;
|
$affected = 0;
|
||||||
foreach ($_POST["val"] as $unique_idf => $row) {
|
foreach ($_POST["val"] as $unique_idf => $row) {
|
||||||
|
@ -121,6 +124,7 @@ if ($_POST && !$error) {
|
||||||
$affected += $connection->affected_rows;
|
$affected += $connection->affected_rows;
|
||||||
}
|
}
|
||||||
queries_redirect(remove_from_uri(), lang('%d item(s) have been affected.', $affected), $result);
|
queries_redirect(remove_from_uri(), lang('%d item(s) have been affected.', $affected), $result);
|
||||||
|
}
|
||||||
} elseif (is_string($file = get_file("csv_file", true))) {
|
} elseif (is_string($file = get_file("csv_file", true))) {
|
||||||
$file = preg_replace("~^\xEF\xBB\xBF~", '', $file); //! character set
|
$file = preg_replace("~^\xEF\xBB\xBF~", '', $file); //! character set
|
||||||
$result = true;
|
$result = true;
|
||||||
|
@ -361,7 +365,7 @@ if (!$columns) {
|
||||||
if (!information_schema(DB)) {
|
if (!information_schema(DB)) {
|
||||||
?>
|
?>
|
||||||
<fieldset><legend><?php echo lang('Edit'); ?></legend><div>
|
<fieldset><legend><?php echo lang('Edit'); ?></legend><div>
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>"<?php if (!$_GET["modify"] && !$_POST["val"]) { ?> onclick="if (!selectDblClicked) { alert('<?php echo lang('Double click on a value to modify it.'); ?>'); return false; };"<?php } ?>>
|
<input type="submit" value="<?php echo lang('Save'); ?>" title="<?php echo lang('Double click on a value to modify it.'); ?>">
|
||||||
<input type="submit" name="edit" value="<?php echo lang('Edit'); ?>">
|
<input type="submit" name="edit" value="<?php echo lang('Edit'); ?>">
|
||||||
<input type="submit" name="clone" value="<?php echo lang('Clone'); ?>">
|
<input type="submit" name="clone" value="<?php echo lang('Clone'); ?>">
|
||||||
<input type="submit" name="delete" value="<?php echo lang('Delete'); ?>" onclick="return confirm('<?php echo lang('Are you sure?'); ?> (' + (this.form['all'].checked ? <?php echo $found_rows; ?> : formChecked(this, /check/)) + ')');">
|
<input type="submit" name="delete" value="<?php echo lang('Delete'); ?>" onclick="return confirm('<?php echo lang('Are you sure?'); ?> (' + (this.form['all'].checked ? <?php echo $found_rows; ?> : formChecked(this, /check/)) + ')');">
|
||||||
|
|
|
@ -123,15 +123,12 @@ function selectAddRow(field) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var selectDblClicked = false;
|
|
||||||
|
|
||||||
/** Display edit field
|
/** Display edit field
|
||||||
* @param HTMLElement
|
* @param HTMLElement
|
||||||
* @param MouseEvent
|
* @param MouseEvent
|
||||||
* @param boolean display textarea instead of input
|
* @param boolean display textarea instead of input
|
||||||
*/
|
*/
|
||||||
function selectDblClick(td, event, text) {
|
function selectDblClick(td, event, text) {
|
||||||
selectDblClicked = true;
|
|
||||||
var pos = event.rangeOffset;
|
var pos = event.rangeOffset;
|
||||||
var value = (td.firstChild.firstChild ? td.firstChild.firstChild.data : td.firstChild.data);
|
var value = (td.firstChild.firstChild ? td.firstChild.firstChild.data : td.firstChild.data);
|
||||||
var input = document.createElement(text ? 'textarea' : 'input');
|
var input = document.createElement(text ? 'textarea' : 'input');
|
||||||
|
|
Loading…
Reference in a new issue