Can you please also remove commented code (perform code cleanup?)

Thanks in advance

On Tue, Aug 21, 2012 at 9:30 PM, Ankur Ankan <[email protected]> wrote:
> I have attached the code to the issue.
>
> On Tue, Aug 21, 2012 at 10:05 AM, Maxim Solodovnik 
> <[email protected]>wrote:
>
>> Great!
>> that is what I thought about.
>> can you modify your code attached to the issue?
>>
>> On Tue, Aug 21, 2012 at 7:12 PM, Ankur Ankan <[email protected]> wrote:
>> > Hi Maxim,
>> >
>> > I have been able to improve the code (have removed the repetitive part).
>> I
>> > put all the objects in an array and used the index inside a loop to
>> create
>> > the dialog box and did the same thing for reading the values from the
>> input
>> > boxes. I think I can implement loops at more places in the code to reduce
>> > it (will commit the code to jira after that). I am still working on
>> > implementing multi-language support. Part of the code is below:
>> >
>> >
>> >
>> > var server_text = ["server1","server2","server3","server4","server5"];
>> > var server =
>> > [this.server1,this.server2,this.server3,this.server4,this.server5];
>> > var server_baseurl_text = [this.server1_baseurl_text,
>> >
>> this.server2_baseurl_text,this.server3_baseurl_text,this.server4_baseurl_text,this.server5_baseurl_text];
>> > var server_baseurl =
>> >
>> [this.server1_baseurl,this.server2_baseurl,this.server3_baseurl,this.server4_baseurl,this.server5_baseurl];
>> > var server_username_text =
>> >
>> [this.server1_username_text,this.server2_username_text,this.server3_username_text,this.server4_username_text,this.server5_username_text];
>> > var server_username =
>> >
>> [this.server1_username,this.server2_username,this.server3_username,this.server4_username,this.server5_username];
>> > var server_password_text =
>> >
>> [this.server1_password_text,this.server2_password_text,this.server3_password_text,this.server4_password_text,this.server5_password_text];
>> > var server_password =
>> >
>> [this.server1_password,this.server2_password,this.server3_password,this.server4_password,this.server5_password];
>> >
>> >
>> >
>> >
>> > for (i = 0;i<5;i++){
>> >     server[i] = new DwtText ({parent:this.pView, name:server_text[i],
>> > id:server_text[i]});
>> >     server[i].setText(server_text[i]);
>> >     server[i].setPosition(DwtControl.ABSOLUTE_STYLE);
>> >     server[i].setLocation(20,(35+j));
>> >
>> >
>> >     server_baseurl_text[i] = new DwtText({parent:this.pView,
>> > name:server_text[i] + "_baseurl_text",
>> id:server_text[i]+"_baseurl_text"});
>> >     server_baseurl_text[i].setText("URL");
>> >     server_baseurl_text[i].setPosition(DwtControl.ABSOLUTE_STYLE);
>> >     server_baseurl_text[i].setLocation(20,(50+j));
>> >     server_baseurl[i] = new DwtInputField ({parent:this.pView, name:
>> > server_text[i]+"_baseurl", id: server_text[i]+"_baseurl"});
>> >
>> >
>> server_baseurl[i].setValue(this.getUserProperty(server_text[i]+"_baseurl"));
>> >     server_baseurl[i].setPosition(DwtControl.ABSOLUTE_STYLE);
>> >     server_baseurl[i].setLocation(20,(65+j));
>> >
>> >     server_username_text[i] = new DwtText({parent:this.pView,
>> > name:server_text[i]+"username_text",id: server_text[i]+"username_text"});
>> >     server_username_text[i].setText("username");
>> >     server_username_text[i].setPosition(DwtControl.ABSOLUTE_STYLE);
>> >     server_username_text[i].setLocation(200,(50+j));
>> >     server_username[i] = new DwtInputField ({parent:this.pView, name:
>> > server_text[i]+"_username", id: server_text[i]+"_username"});
>> >
>> >
>> server_username[i].setValue(this.getUserProperty(server_text[i]+"_username"));
>> >     server_username[i].setPosition(DwtControl.ABSOLUTE_STYLE);
>> >     server_username[i].setLocation(200,(65+j));
>> >
>> >     server_password_text[i] = new DwtText ({parent:this.pView, name:
>> > server_text[i]+"_password_text", id:server_text[i]+"_password_text"});
>> >     server_password_text[i].setText("password");
>> >     server_password_text[i].setPosition(DwtControl.ABSOLUTE_STYLE);
>> >     server_password_text[i].setLocation(380,(50+j));
>> >     server_password[i] = new DwtInputField ({parent:this.pView, name:
>> > server_text[i]+"_password", id: server_text[i]+"_password"});
>> >
>> >
>> server_password[i].setValue(this.getUserProperty(server_text[i]+"_password"));
>> >     server_password[i].setPosition(DwtControl.ABSOLUTE_STYLE);
>> >     server_password[i].setLocation(380,(65+j));
>> >         j +=65;
>> >
>> >     }
>> >
>> > On Fri, Aug 17, 2012 at 8:42 PM, Ankur Ankan <[email protected]>
>> wrote:
>> >
>> >> Hi,
>> >> I won't be able to attend. Having problem with my internet connection.
>> >> I have updated the zimbra server, you can check the zimlet there.
>> >>
>> >>
>> >> On Fri, Aug 17, 2012 at 8:31 PM, Alexei Fedotov <
>> [email protected]>wrote:
>> >>
>> >>>
>> >>>
>> http://demo.dataved.ru/openmeetings/?invitationHash=724b4f451cafd0c1bd2302f5b675e034&language=9
>> >>>
>> >>> --
>> >>> With best regards / с наилучшими пожеланиями,
>> >>> Alexei Fedotov / Алексей Федотов,
>> >>> http://dataved.ru/
>> >>> +7 916 562 8095
>> >>>
>> >>>
>> >>>
>> >>> On Fri, Aug 17, 2012 at 6:59 PM, [email protected] <
>> >>> [email protected]> wrote:
>> >>>
>> >>> > what is the link for the meeting?
>> >>> >
>> >>> > 2012/8/16 Ankur Ankan <[email protected]>:
>> >>> > > I tried everything to get multilanguage to work, had even posted on
>> >>> the
>> >>> > > zimlet forums but could not get it working. And I could not yet
>> figure
>> >>> > out
>> >>> > > any way to remove the repetitive code. Other than that I have
>> replaced
>> >>> > the
>> >>> > > switch statement (month selector) with a dictionary.
>> >>> > >
>> >>> > > Actually presently I am a bit busy with my college cousework so I
>> am
>> >>> > unable
>> >>> > > to give much time to the project :(. Just need some time to improve
>> >>> the
>> >>> > > code.
>> >>> > > On Aug 16, 2012 3:36 PM, "Maxim Solodovnik" <[email protected]>
>> >>> > wrote:
>> >>> > >
>> >>> > >> Ankur, were you able to implement my last comments?
>> >>> > >>
>> >>> > >> On Thu, Aug 16, 2012 at 5:00 PM, Ankur Ankan <
>> [email protected]>
>> >>> > wrote:
>> >>> > >> > Sure. Is it ok just after the meeting?
>> >>> > >> > On Aug 16, 2012 3:19 PM, "Alexei Fedotov" <
>> >>> [email protected]>
>> >>> > >> wrote:
>> >>> > >> >
>> >>> > >> >> Ankur, would you show us demo?
>> >>> > >> >>
>> >>> > >> >> --
>> >>> > >> >> With best regards / с наилучшими пожеланиями,
>> >>> > >> >> Alexei Fedotov / Алексей Федотов,
>> >>> > >> >> http://dataved.ru/
>> >>> > >> >> +7 916 562 8095
>> >>> > >> >>
>> >>> > >> >>
>> >>> > >> >> On Thu, Aug 16, 2012 at 1:44 PM, Ankur Ankan <
>> >>> [email protected]>
>> >>> > >> wrote:
>> >>> > >> >> > I will also attend :)
>> >>> > >> >> > On Aug 16, 2012 3:10 PM, "Alexei Fedotov" <
>> >>> > [email protected]>
>> >>> > >> >> wrote:
>> >>> > >> >> >
>> >>> > >> >> >> I will attend
>> >>> > >> >> >> --
>> >>> > >> >> >> With best regards / с наилучшими пожеланиями,
>> >>> > >> >> >> Alexei Fedotov / Алексей Федотов,
>> >>> > >> >> >> http://dataved.ru/
>> >>> > >> >> >> +7 916 562 8095
>> >>> > >> >> >>
>> >>> > >> >> >>
>> >>> > >> >> >> On Thu, Aug 16, 2012 at 1:11 PM, [email protected]
>> >>> > >> >> >> <[email protected]> wrote:
>> >>> > >> >> >> > Hi there,
>> >>> > >> >> >> >
>> >>> > >> >> >> > will we organize a last summer of code live meeting
>> tomorrow?
>> >>> > >> >> >> > Who can attend?
>> >>> > >> >> >> >
>> >>> > >> >> >> > Sebastian
>> >>> > >> >> >> > --
>> >>> > >> >> >> > Sebastian Wagner
>> >>> > >> >> >> > https://twitter.com/#!/dead_lock
>> >>> > >> >> >> > http://www.webbase-design.de
>> >>> > >> >> >> > http://www.wagner-sebastian.com
>> >>> > >> >> >> > [email protected]
>> >>> > >> >> >>
>> >>> > >> >>
>> >>> > >>
>> >>> > >>
>> >>> > >>
>> >>> > >> --
>> >>> > >> WBR
>> >>> > >> Maxim aka solomax
>> >>> > >>
>> >>> >
>> >>> >
>> >>> >
>> >>> > --
>> >>> > Sebastian Wagner
>> >>> > https://twitter.com/#!/dead_lock
>> >>> > http://www.webbase-design.de
>> >>> > http://www.wagner-sebastian.com
>> >>> > [email protected]
>> >>> >
>> >>>
>> >>
>> >>
>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>>



-- 
WBR
Maxim aka solomax

Reply via email to