add method printInlineEditOriginalName()

This commit is contained in:
Uwe Steinmann 2025-07-29 21:17:35 +02:00
parent 2e38c8fb92
commit f20f4d2ae2
2 changed files with 32 additions and 0 deletions

View File

@ -2567,6 +2567,22 @@ $(function() {
echo $text;
} /* }}} */
/**
* Wrap text in inline editing tags
*
* @param string text
*/
function printInlineEditOriginalName($text, $object){ /* {{{ */
if(!empty($this->params['settings']->_inlineEditing)) {
echo "<span class=\"editorigname editable\" contenteditable=\"true\"";
if($object->isType('documentcontent'))
echo " data-content=\"".$object->getId()."\" data-formtoken=\"".createFormKey('setoriginalname')."\"";
echo ">".$text;
echo "</span>\n";
} else
echo $text;
} /* }}} */
/**
* Print button with link for deleting a document
*

View File

@ -2593,6 +2593,22 @@ $(function() {
echo $text;
} /* }}} */
/**
* Wrap text in inline editing tags
*
* @param string text
*/
function printInlineEditOriginalName($text, $object){ /* {{{ */
if(!empty($this->params['settings']->_inlineEditing)) {
echo "<span class=\"editorigname editable\" contenteditable=\"true\"";
if($object->isType('documentcontent'))
echo " data-content=\"".$object->getId()."\" data-formtoken=\"".createFormKey('setoriginalname')."\"";
echo ">".$text;
echo "</span>\n";
} else
echo $text;
} /* }}} */
/**
* Print button with link for deleting a document
*