|
|
2010-01-27
, 12:39
|
|
|
Posts: 1,090 |
Thanked: 476 times |
Joined on Jan 2010
@ Ingolstadt, Germany
|
#82
|
/* shadow with edged shape - right 3px and below 2px */ text-shadow:black 3px 2px; /*shadow with round shape - same as above plus 4px cross-fade effect (the transition to background/second shadow looks smoother) */ text-shadow:black 3px 2px 4px; /* two shadows - 5px transition black in red shadow */ text-shadow:black 0 0 5px, red 5px 5px 3px;
Great work with the custmiisation- I also prefer the first config.
However, I havent seen any comments about the date and time order of the sms messages. I find it annoying that the most recent messages appear at the bottom of the screen.
I find that most email, text applications ( even bank statements ) have the most recent entry/message at the top of the screen.
Any ideas on changing the chronological order.. most recent on top?
/*
* Flushes the given amount of messages from the buffer to renderer
*/
function
MessagingWidgetsRenderer_flushBuffer (amount)
{
if (messagesBuffer.length > 0) {
if (amount < 0)
amount = messagesBuffer.length;
var fragment = document.createDocumentFragment();
for (var i = 0; i < amount; i++) {
if (messagesBuffer.length <= 0)
break;
var item = messagesBuffer.shift();
new_message = MessagingWidgetsRenderer_messageNode (item, true);
if (fragment.childNodes.length > 0)
fragment.insertBefore(new_message, fragment.firstChild);
else
fragment.appendChild(new_message);
}
/* Restore scroll position */
var savedScrollPos =
document.body.scrollHeight - window.pageYOffset;
document.body.insertBefore(fragment, document.body.firstChild);
window.sizeToContent();
window.scrollTo(0, (document.body.scrollHeight - savedScrollPos));
}
}
/* Scroll event handler to potentially add more past history */
function
MessagingWidgetsRenderer_onScroll ()
{
MessagingWidgetsRenderer_clearHighlight();
/* Buffer flushing if there isn't already one running. */
if (window.pageYOffset < 100 && messagesBuffer.length > 0) {
/* Add a page of messages (about 4 screen-full) to renderer */
MessagingWidgetsRenderer_flushBuffer(HISTORY_PAGE_SIZE);
}
/* If we run out of messages in buffer and history hasn't finished,
* request for more
*/
if (messagesBuffer.length == 0 &&
myBatchRequested == HISTORY_FETCHING_NOREQUEST &&
myBatchesAdded > 0)
{
myBatchRequested = HISTORY_BATCH_SIZE;
alert("history-request:" + HISTORY_BATCH_SIZE);
}
}
/**
* MessagingWidgetsRenderer_addMessage:
* @type: Type of the message (normal/action/notice/autoreply)
* @time_str: The time string to show in the screen
* @delivery_str: The delivery time string to possibly show in the screen
* @name_str: The name string to show in the screen
* @message_str: The actual message to show
* @self: TRUE if message is from self
* @id_str: The ID of the message for access
* @avatar: path(/url?) to avatar image
* @presence: presence icon of sender
* @business_icon: path to business card icon
* @status_icon: path to message status icon (pending/failed)
* @contact_info_str: Additional contact information
* @add_to_top: Add the new message to the top of the list
*
* Queues messages to buffer and triggers flush schedule. Also forces
* an immediate flush if there are 8 messages already in buffer for
* the first time. It's a screenful of messages shown to the user in
* first opportunity.
**/
function
MessagingWidgetsRenderer_addMessage (
type, time_str, delivery_str, name_str, message_str, self, id_str,
avatar, presence, business_icon, status_icon, contact_info_str, add_to_top)
{
var item =
new MessagingWidgetsRenderer_messageObject (type, time_str,
delivery_str,
name_str, message_str,
self, id_str, avatar,
presence, business_icon,
status_icon,
contact_info_str);
if (add_to_top) {
/* Queue the top (history) message in buffer. */
messagesBuffer[messagesBuffer.length] = item;
/* Force flush if there's already screenful of messages to show for
* the first time.
*/
if (firstFlush == true &&
messagesBuffer.length >= HISTORY_SCREENFULL_SIZE)
{
firstFlush = false;
MessagingWidgetsRenderer_flushBuffer(HISTORY_SCREENFULL_SIZE);
}
} else {
/* If the message is bottom, add it directly without queuing. */
var new_message =
MessagingWidgetsRenderer_messageNode (item, false);
var savedScrollPos =
document.body.scrollHeight - window.pageYOffset;
document.body.appendChild (new_message);
/* In case, we don't want to scroll down on new incoming messages:
/* window.scrollTo(0, (document.body.scrollHeight - savedScrollPos));
*/
/* In case, we want to only scroll down on incoming message when
* scrollbar is close by: if (savedScrollPos < 100) ...
*/
/* For now, scroll down anyways.*/
window.sizeToContent();
new_message.scrollIntoView (false);
}
}
/**
* MessagingWidgetsRenderer_batchAdded:
* @messages_fetched: Number of messages fetched from log. Note that all
* fetched messages are not necessarily added to the view.
*
* History batch has been added to renderer
**/
function MessagingWidgetsRenderer_batchAdded (messages_fetched)
{
myBatchesAdded++;
/* Force flush if there hasn't been anything shown yet.
* This happens because the first batch was smaller than
* HISTORY_SCREENFULL_SIZE.
*/
if (firstFlush == true && messagesBuffer.length >= 0) {
firstFlush = false;
MessagingWidgetsRenderer_flushBuffer(-1);
}
/* If there was no request made, then it's the first batch pushed.
* The subsequent batch is requested after a delay of 1s to allow
* first screenfull to be rendered properly.
*/
if (myBatchRequested == HISTORY_FETCHING_NOREQUEST) {
if (flushTimeout != 0)
clearTimeout(flushTimeout);
flushTimeout = setTimeout("MessagingWidgetsRenderer_onScroll();",
1000);
} else if (myBatchRequested > 0) {
/* If there was a request, check if we got everything.
* If fetched messages is the amount requested, we could
* continue fetching more, otherwise there is no more history
* to fetch.
*/
if (messages_fetched < myBatchRequested) {
myBatchRequested = HISTORY_FETCHING_DONE; /* No more history */
} else {
myBatchRequested = HISTORY_FETCHING_NOREQUEST; /* Batch delivered */
}
/* Check if anything needs to be rendered at this scroll position */
MessagingWidgetsRenderer_onScroll();
}
}
| The Following 2 Users Say Thank You to b666m For This Useful Post: | ||
|
|
2010-01-27
, 17:18
|
|
Posts: 5 |
Thanked: 0 times |
Joined on Jan 2010
|
#83
|
|
|
2010-01-27
, 17:30
|
|
|
Posts: 1,090 |
Thanked: 476 times |
Joined on Jan 2010
@ Ingolstadt, Germany
|
#84
|

|
|
2010-01-27
, 18:59
|
|
Posts: 5 |
Thanked: 0 times |
Joined on Jan 2010
|
#85
|
|
|
2010-01-27
, 22:49
|
|
|
Posts: 1,090 |
Thanked: 476 times |
Joined on Jan 2010
@ Ingolstadt, Germany
|
#86
|
I re-saved the.js file and created a new 'avatar.png' but still doesn't work. Did you modify line 420?
/* Creation of an avatar image */
if (item.self == false) {
if (item.avatar != "") {
avatar_img.style.backgroundImage = "url('"+item.avatar+"')";
avatar_img.onclick = MessagingWidgetsRenderer_avatarClicked;
}
}
else {
avatar_img.style.backgroundImage = "url('avatar.png')";
avatar_img.onclick = MessagingWidgetsRenderer_avatarClicked;
}


)
|
|
2010-01-28
, 07:44
|
|
Posts: 8 |
Thanked: 7 times |
Joined on Jan 2010
@ Russia, Moscow
|
#87
|
div.Self + div.Self img.MessageAvatar,
div.Other + div.Other img.MessageAvatar,
div.Other + div.Other .MessageNameField,
.Self .MessageNameField /* hidden your name all the time */
{
display: none;
}
|
|
2010-01-28
, 09:22
|
|
Posts: 5 |
Thanked: 0 times |
Joined on Jan 2010
|
#88
|
|
|
2010-01-29
, 11:13
|
|
Posts: 8 |
Thanked: 7 times |
Joined on Jan 2010
@ Russia, Moscow
|
#89
|


and messages grouping by sender

| The Following 5 Users Say Thank You to termi_uc For This Useful Post: | ||
|
|
2010-01-29
, 13:35
|
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#90
|
sorry if my post was too unclear.
i'll try to make it more precise:
best is to add these lines anywhere on top of the block.Code:/* shadow with edged shape - right 3px and below 2px */ text-shadow:black 3px 2px; /*shadow with round shape - same as above plus 4px cross-fade effect (the transition to background/second shadow looks smoother) */ text-shadow:black 3px 2px 4px; /* two shadows - 5px transition black in red shadow */ text-shadow:black 0 0 5px, red 5px 5px 3px;
if that doesn't work maybe your placement isn't that good, try some lines below. (don't know why but it seems to be a little bit *****y *g*)
if some css-command doesn't work at all after all. the function could not be available in the version rtcomm uses.

![]() |
| Tags |
| bada rox, his lunchbox |
| Thread Tools | |
|
However, I havent seen any comments about the date and time order of the sms messages. I find it annoying that the most recent messages appear at the bottom of the screen.
I find that most email, text applications ( even bank statements ) have the most recent entry/message at the top of the screen.
Any ideas on changing the chronological order.. most recent on top?