|
风大可以参照这个调整一下,看能不能实现这个功能3 x R1 d! `. {! g4 F
+ e- Y7 j9 ~$ Y& {9 F' b9 B6 Ihttp://www.webos-internals.org/w ... 2_To_Create_Newline 6 Z$ [' Y% |9 M( q' b: Y; g
8 g% u0 @ y$ p# m% P1. Log in as root.
" X+ E( A& J% I E/ x% u' K- o' b% Q 2. Mount the file system as RW.
* @% v7 d6 A" B6 ^- t: y4 F9 v! B4 d. N 3. Enter the /usr/palm/applications/com.palm.app.messaging/app/controllers directory.
* U# r( c! ^' Y, g/ { 4. Change compose-assistant.js (line 87) and chatview-assistant.js (line 100) and set enterSubmits to be false.1 B* Q& i$ F; E. \$ w
5. In the handleTextAreaKeyUp function in compose-assistant.js (lines 278 to 283) and chatview-assistant.js (lines 1678 to 1683), comment out the following lines:
8 F2 S+ I: ]1 b5 m6 {6 \" R this.considerForSend();+ j# @* C, {3 v0 r& ~% C( Q' A, _
Event.stop(event);
# _4 c- p8 l+ i5 [5 D5 Q# d3 B 6.To actually display newlines in the chatview: In chatview-assistant.js, in the ChatviewAssisant::preFormatChatList method (around line 1220), locate the lines:
9 _: g. v3 g* r9 C2 @; \+ Z if(msg.messageText && !ChatFlags.isTransient(msg.flags)) { 7 p# M$ J8 F- _; H2 n, i5 c" x
msg.messageText = msg.messageText.escapeHTML();! t/ N8 ?# W$ \) _8 A
and add the following just after:
9 h3 |8 m' E9 F5 }) R. r msg.messageText = msg.messageText.replace(/\n/g,"<br>");" {: {% P3 `* K1 o! _
7.Mount the file system as RO.- k. ^ o: N' _0 G3 S& ^9 | V
8.Reboot.; M9 c$ `* i, a: ] `
5 O% O5 W1 @% f8 w: Z
这个是为了输入回车,我在1.2中改了的,可行,其中替换回车那里看是否可替换空格 |
|