mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 06:27:15 +00:00
rename methode and class for inline editiing of document name
This commit is contained in:
parent
e069f784b4
commit
d377bd81ab
|
@ -2552,9 +2552,9 @@ $(function() {
|
|||
*
|
||||
* @param string text
|
||||
*/
|
||||
function printInlineEdit($text, $object){ /* {{{ */
|
||||
function printInlineEditDocumentName($text, $object){ /* {{{ */
|
||||
if(!empty($this->params['settings']->_inlineEditing)) {
|
||||
echo "<span class=\"editable\" contenteditable=\"true\"";
|
||||
echo "<span class=\"editdocname editable\" contenteditable=\"true\"";
|
||||
if($object->isType('document'))
|
||||
echo " data-document=\"".$object->getId()."\" data-formtoken=\"".createFormKey('setdocumentname')."\"";
|
||||
echo ">".$text;
|
||||
|
|
|
@ -413,7 +413,7 @@ $(document).ready( function() {
|
|||
?>
|
||||
<tr>
|
||||
<td><?php printMLText("name");?>:</td>
|
||||
<td><?php $this->printInlineEdit(htmlspecialchars($document->getName()), $document);?></td>
|
||||
<td><?php $this->printInlineEditDocumentName(htmlspecialchars($document->getName()), $document);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("owner");?>:</td>
|
||||
|
|
|
@ -721,8 +721,7 @@ $(document).ready( function() {
|
|||
window.history.back();
|
||||
}); /* }}} */
|
||||
|
||||
$("body").on("blur", "span.editable", function(e) { /* {{{ */
|
||||
console.log($(this).data('document'));
|
||||
$("body").on("blur", "span.editdocname", function(e) { /* {{{ */
|
||||
e.preventDefault();
|
||||
$.post(seeddms_webroot+"op/op.Ajax.php", { command: "setdocumentname", id: $(this).data('document'), formtoken: $(this).data('formtoken'), name: $(this).text() })
|
||||
.done(function( data ) {
|
||||
|
|
|
@ -2578,9 +2578,9 @@ $(function() {
|
|||
*
|
||||
* @param string text
|
||||
*/
|
||||
function printInlineEdit($text, $object){ /* {{{ */
|
||||
function printInlineEditDocumentName($text, $object){ /* {{{ */
|
||||
if(!empty($this->params['settings']->_inlineEditing)) {
|
||||
echo "<span class=\"editable\" contenteditable=\"true\"";
|
||||
echo "<span class=\"editdocname editable\" contenteditable=\"true\"";
|
||||
if($object->isType('document'))
|
||||
echo " data-document=\"".$object->getId()."\" data-formtoken=\"".createFormKey('setdocumentname')."\"";
|
||||
echo ">".$text;
|
||||
|
|
|
@ -769,8 +769,7 @@ $(document).ready( function() {
|
|||
window.history.back();
|
||||
}); /* }}} */
|
||||
|
||||
$("body").on("blur", "span.editable", function(e) { /* {{{ */
|
||||
console.log($(this).data('document'));
|
||||
$("body").on("blur", "span.editdocname", function(e) { /* {{{ */
|
||||
e.preventDefault();
|
||||
$.post(seeddms_webroot+"op/op.Ajax.php", { command: "setdocumentname", id: $(this).data('document'), formtoken: $(this).data('formtoken'), name: $(this).text() })
|
||||
.done(function( data ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user