|
风大可以参照这个调整一下,看能不能实现这个功能' L M( E ^# h+ f# G
6 h& J0 E) l6 O. ^2 }% r; ^http://www.webos-internals.org/w ... 2_To_Create_Newline ' C$ l$ ]' H5 t' V0 b
+ V0 L* v+ K3 U, I/ R
1. Log in as root.
8 \+ Q! y7 ?+ _ 2. Mount the file system as RW.! w* o6 f c. |0 n. t
3. Enter the /usr/palm/applications/com.palm.app.messaging/app/controllers directory.' H: G4 [& f% f( h' W3 ]/ r
4. Change compose-assistant.js (line 87) and chatview-assistant.js (line 100) and set enterSubmits to be false./ k% f+ |" a8 ?( |1 i
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:- }! ?3 k* h1 e9 e; O8 L
this.considerForSend();/ Z% I/ \& K& @. A1 W
Event.stop(event);: h7 N! h; E# {) m1 q- L
6.To actually display newlines in the chatview: In chatview-assistant.js, in the ChatviewAssisant::preFormatChatList method (around line 1220), locate the lines:! d4 J& D2 ?% v* V u: H4 X
if(msg.messageText && !ChatFlags.isTransient(msg.flags)) { % |4 e; w# v! b- Y" K2 v! }
msg.messageText = msg.messageText.escapeHTML();( C: \. [) |, o5 l8 [ M
and add the following just after:/ |5 W# k5 i4 _% j: m6 g7 U
msg.messageText = msg.messageText.replace(/\n/g,"<br>");; }$ T" ?& u$ z
7.Mount the file system as RO.
% {3 H8 @* p+ s7 C 8.Reboot.1 {1 O5 o! p. c" G8 ` p7 n9 |1 j
* Q/ D9 L4 b& Y- @/ G% t3 m这个是为了输入回车,我在1.2中改了的,可行,其中替换回车那里看是否可替换空格 |
|