$loadTextUrl = $this->_getUrl('EditNote', 'mnemo', array_merge($params, array('action' => 'load')));
$js = array();
- $js[] = "new InPlaceEditor('" . $this->_params['domid'] . "', '" . $url . "', {"
- . " callback: function(form, value) {"
- . " return 'value=' + encodeURIComponent(value);},"
- . " loadTextURL: '". $loadTextUrl . "',"
- . " rows: 4, "
- . " autoWidth: true,"
- . " emptyText: '" . _("Click to add text...") . "',"
- . " onComplete: function(ipe, opts) { ipe.checkEmpty() },"
- . " cancelText: '" . _("Cancel") . "',"
- . " okText: '" . _("Ok") . "',"
- . " cancelClassName: ''"
- . " });";
+ $js[] =
+ "new InPlaceEditor('" . $this->_params['domid'] . "', '" . $url . "', {"
+ . " callback: function(form, value) {"
+ . " return 'value=' + encodeURIComponent(value);},"
+ . " loadTextURL: '". $loadTextUrl . "',"
+ . " rows: " . (int)$this->_params['rows'] . ", "
+ . " autoWidth: true,"
+ . " emptyText: '" . _("Click to add text...") . "',"
+ . " onComplete: function(ipe, opts) { ipe.checkEmpty() },"
+ . " cancelText: '" . _("Cancel") . "',"
+ . " okText: '" . _("Ok") . "',"
+ . " cancelClassName: ''"
+ . " });";
Horde::addInlineScript($js, 'dom');
}
array('parselevel' => Horde_Text_Filter_Text2html::MICRO));
}
}
-
}
} catch (Horde_Exception_HookNotSet $e) {}
$html .= $body . '</div>';
$GLOBALS['injector']->getInstance('Horde_Ajax_Imple')->getImple(array('mnemo', 'EditNote'), array(
- 'domid' => "noteBody" . $memo['memo_id'],
- 'id' => $this->_params['note_uid']
+ 'domid' => 'noteBody' . $memo['memo_id'],
+ 'id' => $this->_params['note_uid'],
+ 'rows' => substr_count($memo['body'], "\n"),
));
return $html;
}