|
风大可以参照这个调整一下,看能不能实现这个功能6 A* o3 T, Y, g% J) L9 o% M
7 P6 r' @ _: Nhttp://www.webos-internals.org/w ... 2_To_Create_Newline
( Y' s$ \9 E9 a4 N5 K8 x, W/ i2 P, i8 y+ L0 O4 _- ^1 ]8 b: m
1. Log in as root.
( e' m* s$ @8 z 2. Mount the file system as RW.' J# G8 n- B; y E1 H4 Y" G
3. Enter the /usr/palm/applications/com.palm.app.messaging/app/controllers directory. S* W+ U d$ @" r; u( [
4. Change compose-assistant.js (line 87) and chatview-assistant.js (line 100) and set enterSubmits to be false.
9 J+ b8 z1 v4 h! B4 v( V 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:
& q" I8 |5 j. H: R0 F this.considerForSend();
- d9 C( A2 N1 W5 p i Event.stop(event);$ R0 a& `6 V1 H- z0 O
6.To actually display newlines in the chatview: In chatview-assistant.js, in the ChatviewAssisant::preFormatChatList method (around line 1220), locate the lines:
6 Q. x G# i* I: t# s- ^ if(msg.messageText && !ChatFlags.isTransient(msg.flags)) {
- t' W7 s: p0 B0 {! A msg.messageText = msg.messageText.escapeHTML();
1 m# ~" K: y* ^( s$ s and add the following just after:& {6 w# [. H0 u1 \( y
msg.messageText = msg.messageText.replace(/\n/g,"<br>");3 K5 i0 V; n9 O! ^
7.Mount the file system as RO.' P8 g! d& B4 K+ f& g, w* c1 f
8.Reboot.
& s6 Z6 y$ H3 r) Z' w+ B* `+ J3 [8 x' P8 x' r& L
这个是为了输入回车,我在1.2中改了的,可行,其中替换回车那里看是否可替换空格 |
|