|
风大可以参照这个调整一下,看能不能实现这个功能6 ^, M1 Y e% u" c3 J: F
8 z" I4 Y4 c* y- z' ?* b. V8 e
http://www.webos-internals.org/w ... 2_To_Create_Newline
P8 C; O1 n" q- j1 D& `
8 b J1 V- q( B9 D( L) ]3 `1. Log in as root.
4 h0 O1 n6 v% p5 x 2. Mount the file system as RW.. x7 F0 X" R# V; L; O
3. Enter the /usr/palm/applications/com.palm.app.messaging/app/controllers directory.
# @2 n& Q7 O+ Q. j- E6 _) u$ e 4. Change compose-assistant.js (line 87) and chatview-assistant.js (line 100) and set enterSubmits to be false.' E+ Z2 ?2 c+ l: a. j. D1 t" N# m
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:
, u2 e0 B. q0 } this.considerForSend();5 j( }* F2 v c: z6 { E. e0 v
Event.stop(event);
) r. \5 f" N2 n5 C0 y 6.To actually display newlines in the chatview: In chatview-assistant.js, in the ChatviewAssisant::preFormatChatList method (around line 1220), locate the lines:
$ w9 W+ Y8 R3 p6 {# v3 n if(msg.messageText && !ChatFlags.isTransient(msg.flags)) { & {2 Y/ {+ ?! h t8 h4 c/ t
msg.messageText = msg.messageText.escapeHTML();
$ F( o3 ]: ~+ R7 a2 h( |% a6 ] and add the following just after: P2 a) K8 j$ j$ m y( ~6 O" ` M2 X
msg.messageText = msg.messageText.replace(/\n/g,"<br>");
* ~5 h: |- c( U7 k! E) f6 J1 k 7.Mount the file system as RO.
( ?( ?" ^% V/ ` D7 h 8.Reboot.8 V3 K2 f1 ~) Z+ K9 H1 c
- B, G/ l# C4 O; J- M- V
这个是为了输入回车,我在1.2中改了的,可行,其中替换回车那里看是否可替换空格 |
|