Hi James,
On 07/04/2011 11:11 AM, 许凌志(Jamesxu) wrote:
Hi, thanks for Marius' help ,last week, I have
done the following work:
(1). Implemented the function that logs a message in the firebug console
whenever the caret is after [[
(2). Implement the function that requests the list of wiki pages
matching some prefix user input. BUT, don't actually query the database,
instead simply return a dummy list from the wiki page.
(3). Implement the function that displays the list of wiki pages where
the caret is, and integrated it with the SuggestionBox I have already
implemented.
Here is the plan for next week:
I will focus on fixing bugs and improving what I have and to make suer
by the end of the week the link suggest should work very good. Include
(1). Display the suggestion box in right place and at the right time.
(2). Close suggestion box in custom, and also when some other keys typed
like "esc" "right" and "left"
(3). Test to make sure the prototype for link suggestion runs very well.
I tested your prototype and here are some of the issues I've found:
* A JavaScript exception is thrown when you type if the suggest box has
not been displayed at least once
* The close icon is useless, remove it.
* The suggestion box doesn't update its position. If you trigger the
suggest box and then write a long text (try multiple lines) the suggest
box doesn't move.
* left/right keys should keep the suggest box open and filter the list
of suggestions
* Ctrl+Space doesn't work after you close the suggest box by clicking
outside of it.
* Trigger the suggest box, move the mouse over it then type the Tab key
multiple times. The text area looses the focus but the suggest box is
not closed.
* The suggest box is triggered by the Delete key.
* The suggest box is not closed by typing ]].
* The suggest box is not closed by deleting [[.
* Ctrl+Space should be ignored if the suggest box is already displayed
* You don't take into account Undo/Redo operations nor the paste event.
* The suggest box should be displayed were there is space. If the caret
is close to the bottom of the window and the suggest box doesn't fit
below the caret then it should be displayed above. Same with left/right.
For the next week I think you should:
(1) retrieve real suggestions using REST
(2) generate the link syntax when a suggestion is selected
(3) fix some of the issues I've listed above
Thanks,
Marius
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University