Hi,
today I have solved a few tasks:
1. Deep copy... hmmm it turns out more complicated than expected. I decided to solve this tasks later. Now I did only surface coping.
2. Some bugs were fixed. For example the numerating of nodes in parent node was wrong.
3. Finally I have fixed drop-down!
The tasks for tomorrow:
1. Do Move up and Move down
2. Insert before and insert after
Time spent: 4 hours.
Sunday, September 30, 2007
Saturday, September 29, 2007
Ugh!
A lot of work has been executed today. Here is a little list:
1.The "Expand all" button - implementation
2.The "Refresh node" button - implementation
3. Menu Add node
4. Edit node
5. Delete node
6. Cut node to clipboard
7. Insert as child
Of course, all the implementations were related with both sides: client and server.
Now my window with menu looks like:

1.The "Expand all" button - implementation
2.The "Refresh node" button - implementation
3. Menu Add node
4. Edit node
5. Delete node
6. Cut node to clipboard
7. Insert as child
Of course, all the implementations were related with both sides: client and server.
Now my window with menu looks like:

My nearest task is to omplement the deep copy.
Bye!
Thursday, September 27, 2007
Ajax problems & solutions
Big whoooops!!
It turned out that problem with prototype was not client's but server's. Server refuged to get data because it thought that they were dangerous.
Solution: ValidateRequest="false" on the page
But then was another bigger trouble - how to fill iframe by data from database? There were a few ways:
1. Load from page when ifram page is loading (through iframe's attributes or Javascript's var) - this way is very unreliable and doesn't work in most cases).
2. Load as XML from page and parse into DOM then. Alas! The content of iframe can have absolutely any structure so the using of XML is impossible.
3! Load using XMLHttpRequest into iframe directly immediately after loading of the page:
function GetData()
{
var url = 'NodeContentProcess.aspx';
var params = {nodeId:nodeId, action:'getxmlcontent'};
var request = new Ajax.Request(
url,
{
encoding: 'UTF-8',
method: 'post',
contentType: 'application/x-www-form-urlencoded',
parameters: params,
onSuccess: GetSuccess
});
}
function GetSuccess(request)
{
var xmlDoc = request.responseText;
if ($(editFrame).contentDocument)
$(editFrame).contentDocument.body.innerHTML = xmlDoc;
else
$(editFrame).contentWindow.document.body.innerHTML = xmlDoc;
}
This way is fast and elegant but has one significant defect - it requires one more request to the server. The solution I think is very simple: I will not load a separate page into iframe but have only div with iframe and load data into it after a clik on node.
TODO: I will do that later, really.
Time spent: 6 hours
It turned out that problem with prototype was not client's but server's. Server refuged to get data because it thought that they were dangerous.
Solution: ValidateRequest="false" on the page
But then was another bigger trouble - how to fill iframe by data from database? There were a few ways:
1. Load from page when ifram page is loading (through iframe's attributes or Javascript's var) - this way is very unreliable and doesn't work in most cases).
2. Load as XML from page and parse into DOM then. Alas! The content of iframe can have absolutely any structure so the using of XML is impossible.
3! Load using XMLHttpRequest into iframe directly immediately after loading of the page:
function GetData()
{
var url = 'NodeContentProcess.aspx';
var params = {nodeId:nodeId, action:'getxmlcontent'};
var request = new Ajax.Request(
url,
{
encoding: 'UTF-8',
method: 'post',
contentType: 'application/x-www-form-urlencoded',
parameters: params,
onSuccess: GetSuccess
});
}
function GetSuccess(request)
{
var xmlDoc = request.responseText;
if ($(editFrame).contentDocument)
$(editFrame).contentDocument.body.innerHTML = xmlDoc;
else
$(editFrame).contentWindow.document.body.innerHTML = xmlDoc;
}
This way is fast and elegant but has one significant defect - it requires one more request to the server. The solution I think is very simple: I will not load a separate page into iframe but have only div with iframe and load data into it after a clik on node.
TODO: I will do that later, really.
Time spent: 6 hours
Editor was added
Hi all,
today I have added the editor to my page and now when you click some node the information is loaded from database into editor. Then you click Save to save changes.
I was using the Prototype library for Javascript. Almost all the things were well but one... I can't send data from form if the text is formatted. For example, if I have AAA text, then I make it bold and use the escape function and have A%3CSTRONG%3EA%3C/STRONG%3EA. That's all, data is going to infinity not to the base. That's some mistery! Now I want to sleep maybe someone can help me tomorrow...
The screen today:
Bye !
Time spent: 6 hours
today I have added the editor to my page and now when you click some node the information is loaded from database into editor. Then you click Save to save changes.
I was using the Prototype library for Javascript. Almost all the things were well but one... I can't send data from form if the text is formatted. For example, if I have AAA text, then I make it bold and use the escape function and have A%3CSTRONG%3EA%3C/STRONG%3EA. That's all, data is going to infinity not to the base. That's some mistery! Now I want to sleep maybe someone can help me tomorrow...
The screen today:

Time spent: 6 hours
Wednesday, September 26, 2007
First tree built from database
Hi all,
what's a cool day!
I have done many useful things:
1. Created project for data layer
2. Created project for business layer
3. Loaded data from database, built the XML file, loaded tree with the data from this file!
The most important thing you should keep in your mind while creating the tree (using the AddObjects tree) is you should set attribute "exp" = "true" for the root node otherwise the tree is not expanded at all.
Not very nice but very smart page:

Time spent: 6 hours
what's a cool day!
I have done many useful things:
1. Created project for data layer
2. Created project for business layer
3. Loaded data from database, built the XML file, loaded tree with the data from this file!
The most important thing you should keep in your mind while creating the tree (using the AddObjects tree) is you should set attribute "exp" = "true" for the root node otherwise the tree is not expanded at all.
Not very nice but very smart page:

Time spent: 6 hours
Tuesday, September 25, 2007
Hard weekend
Hi all,
I have very loaded and hard weekends... loaded by vodka, beer etc. I had awful feelings after. And of cource, I didn't work. But today I have 2 hours to create the new prototype of the Control panel. Now ot looks a little better. But it has only 4 tabs: Content, Styles, Images, Settings and 2 buttons (Expand all and Refresh and these buttons are related to Content tab only). Too little to show, really.
Bye
Time spent: 2 hours
I have very loaded and hard weekends... loaded by vodka, beer etc. I had awful feelings after. And of cource, I didn't work. But today I have 2 hours to create the new prototype of the Control panel. Now ot looks a little better. But it has only 4 tabs: Content, Styles, Images, Settings and 2 buttons (Expand all and Refresh and these buttons are related to Content tab only). Too little to show, really.
Bye
Time spent: 2 hours
Friday, September 21, 2007
It was hard day...
Hi all,
it was very hard day and I had no time to work at my project. I have only read the documentation to AddObject's tree. It's interesting, really!
Good night... :-0
it was very hard day and I had no time to work at my project. I have only read the documentation to AddObject's tree. It's interesting, really!
Good night... :-0
Thursday, September 20, 2007
First purchase
Hi all,
today I have bought... tree for my page. It took about 1,5 hours to understand that I can't use the asp.net tree and find the proper control in Internet.
I have looked through dozen different trees and the best impression I took from AddObjects.
Theirs tree contains all the features I need.
Let's see what will turn out.
Time spent: 2 hours
Money spent: $39.95
today I have bought... tree for my page. It took about 1,5 hours to understand that I can't use the asp.net tree and find the proper control in Internet.
I have looked through dozen different trees and the best impression I took from AddObjects.
Theirs tree contains all the features I need.
Let's see what will turn out.
Time spent: 2 hours
Money spent: $39.95
Wednesday, September 19, 2007
First page - Editor
Hi all again!
I have created a first page. The left part is for the tree of objects, right one is for content.
Time spent: 1,5 hours.
Welcome
Hello all,
I'm starting my everyday's diary where I will tell you about the development of my new project.
It's web-based project, created with using of ASP.NET (C#), Ajax, JavaScript, some ORM technology.
Let's go!
I'm starting my everyday's diary where I will tell you about the development of my new project.
It's web-based project, created with using of ASP.NET (C#), Ajax, JavaScript, some ORM technology.
Let's go!
Subscribe to:
Posts (Atom)