102. File Comparison Report

Produced on Mon May 12 13:04:49 2008 UTC. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

102.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\groups\orca\js BxAdmin.js Mon Jan 28 09:41:42 2008 UTC
2 Dolphin-v.6.1.0\groups\orca\js BxAdmin.js Wed Apr 9 17:44:56 2008 UTC

102.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 25 798
Changed 24 54
Inserted 1 24
Removed 0 0

102.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

102.4 Active regular expressions

No regular expressions were active.

102.5 Comparison detail

1   /**   1   /**
2    *                               Orca Inter active For um Script   2   *                              O rca Intera ctive Foru m Script
3    *                                 -------- -------   3   *                                 --------- ------
4    *     Sta rted           : Mon  Mar 23 200 6   4   *     Star ted              : Mo n Mar 23 2 006
5    *     Cop yright         : (C)  2007 BoonE x Group   5   *     Copy right            : (C ) 2007 Boo nEx Group
6    *     Web site           : http ://www.boo nex.com   6   *     Webs ite              : ht tp://www.b oonex.com
7    * This fi le is part  of Orca -  Interacti ve Forum S cript   7   * This fil e is part  of Orca -  Interactiv e Forum Sc ript
8    * GPL   8   * Creative  Commons A ttribution  3.0 Licen se
9   **/   9   **/
10     10  
11     11  
12   /**   12   /**
13    * admin f unctionali ty   13    * admin f unctionali ty
14    */   14    */
15     15  
16     16  
17   /**   17   /**
18    * constru ctor   18    * constru ctor
19    */   19    */
20   function A dmin (base , forum)   20   function A dmin (base , forum)
21   {      21   {   
22       this._ base = bas e;   22       this._ base = bas e;
23       this._ forum = fo rum;   23       this._ forum = fo rum;
24   }      24   }   
25     25  
26     26  
27     27  
28   /**   28   /**
29    * edit ca tegories a dmin page   29    * edit ca tegories a dmin page
30    */   30    */
31   Admin.prot otype.edit Categories  = functio n ()   31   Admin.prot otype.edit Categories  = functio n ()
32   {   32   {
33        this._foru m.loading   ('
LOADING
');
  33        this._foru m.loading   (' [L[ LOADING ]] ');
34     34  
35       var $t his = this ;   35       var $t his = this ;
36     36  
37       var h  = function  (r)   37       var h  = function  (r)
38       {           38       {        
39           va r m = docu ment.getEl ementById( 'orca_main ');          39           va r m = docu ment.getEl ementById( 'orca_main ');       
40     40  
41           m. innerHTML  = r;   41           m. innerHTML  = r;
42     42  
43           $t his._forum .stopLoadi ng ();   43           $t his._forum .stopLoadi ng ();
44     44  
45           $t his._forum .checkHeig ht ();   45           $t his._forum .checkHeig ht ();
46       }   46       }
47     47  
48       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ categories ", urlXsl  + "edit_ca tegories.x sl", h);   48       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ categories ", urlXsl  + "edit_ca tegories.x sl", h);
49     49  
50       docume nt.h.makeH ist('actio n=goto&edi t_cats=1') ;   50       docume nt.h.makeH ist('actio n=goto&edi t_cats=1') ;
51     51  
52       return  false;   52       return  false;
53   }   53   }
54     54  
55   /**   55   /**
56    * edit ca tegories a dmin page   56    * edit ca tegories a dmin page
57    */   57    */
58   Admin.prot otype.repo rtedPosts  = function  ()   58   Admin.prot otype.repo rtedPosts  = function  ()
59   {   59   {
60        this._foru m.loading   ('
LOADING
');
  60        this._foru m.loading   (' [L[ LOADING ]] ');
61     61  
62       var $t his = this ;   62       var $t his = this ;
63     63  
64       var h  = function  (r)   64       var h  = function  (r)
65       {           65       {        
66           va r m = docu ment.getEl ementById( 'orca_main ');          66           va r m = docu ment.getEl ementById( 'orca_main ');       
67     67  
68           m. innerHTML  = r;   68           m. innerHTML  = r;
69     69  
70           $t his._forum .stopLoadi ng ();   70           $t his._forum .stopLoadi ng ();
71     71  
72           $t his._forum .checkHeig ht ();   72           $t his._forum .checkHeig ht ();
73       }   73       }
74     74  
75       new Bx XslTransfo rm(this._b ase + "?ac tion=repor ted_posts" , urlXsl +  "forum_po sts.xsl",  h);   75       new Bx XslTransfo rm(this._b ase + "?ac tion=repor ted_posts" , urlXsl +  "forum_po sts.xsl",  h);
76     76  
77   //  docume nt.h.makeH ist('actio n=goto&edi t_cats=1') ;   77   //  docume nt.h.makeH ist('actio n=goto&edi t_cats=1') ;
78     78  
79       return  false;   79       return  false;
80   }   80   }
81     81  
82   /**   82   /**
83    * move ca tegory up  or down   83    * move ca tegory up  or down
84    *  @param  id   cate gory id   84    *  @param  id   cate gory id
85   *   @param  dir  dire ction (up| down)   85   *   @param  dir  dire ction (up| down)
86    */   86    */
87   Admin.prot otype.move Cat = func tion (cat_ id, dir)   87   Admin.prot otype.move Cat = func tion (cat_ id, dir)
88   {   88   {
89       var $t his = this ;   89       var $t his = this ;
90     90  
91       var h  = function  (r)   91       var h  = function  (r)
92       {           92       {        
93           va r o = new  BxXmlReque st('','',' ');             93           va r o = new  BxXmlReque st('','',' ');          
94           va r ret = o. getRetNode Value (r,  'ret');   94           va r ret = o. getRetNode Value (r,  'ret');
95           if  ('1' == r et)   95           if  ('1' == r et)
96           {               96           {            
97                $this.ed itCategori es();        97                $this.ed itCategori es();     
98           }           98           }        
99       }   99       }
100     100  
101       new Bx XmlRequest  (this._ba se + "?act ion=edit_c ategory_mo ve&cat_id= "+cat_id+" &dir="+dir , h, true) ;   101       new Bx XmlRequest  (this._ba se + "?act ion=edit_c ategory_mo ve&cat_id= "+cat_id+" &dir="+dir , h, true) ;
102     102  
103       return  true;   103       return  true;
104   }   104   }
105     105  
106   /**   106   /**
107    * delete  category   107    * delete  category
108    *  @param  id   cate gory id   108    *  @param  id   cate gory id
109    */   109    */
110   Admin.prot otype.delC at = funct ion (cat_i d)   110   Admin.prot otype.delC at = funct ion (cat_i d)
111   {   111   {
112        if   (!confirm   ('
Are   you   sure   to   delete   category   with   all   forums,   topics   and   post
'))   return   false;
  112        if   (!confirm   (' [L[ Are   you   sure   to   delete   category   with   all   forums,   topics   and   post ?]] '))   return   false;
113     113  
114       var $t his = this ;   114       var $t his = this ;
115     115  
116       var h  = function  (r)   116       var h  = function  (r)
117       {           117       {        
118           va r o = new  BxXmlReque st('','',' ');             118           va r o = new  BxXmlReque st('','',' ');          
119           va r ret = o. getRetNode Value (r,  'ret');   119           va r ret = o. getRetNode Value (r,  'ret');
120           if  ('1' == r et)   120           if  ('1' == r et)
121           {   121           {
122                 alert   ('
Category   has   been   successful ly   deleted
');
  122                 alert   (' [L[ Category   has   been   successful ly   deleted ]] ');
123                $this.ed itCategori es();   123                $this.ed itCategori es();
124                return;   124                return;
125           }   125           }
126     126  
127            alert   ('
Can   not   delete   category
');
  127            alert   (' [L[ Can   not   delete   category ]] ');
128       }   128       }
129     129  
130       new Bx XmlRequest  (this._ba se + "?act ion=edit_c ategory_de l&cat_id=" +cat_id, h , true);   130       new Bx XmlRequest  (this._ba se + "?act ion=edit_c ategory_de l&cat_id=" +cat_id, h , true);
131     131  
132       return  true;   132       return  true;
133   }   133   }
134     134  
135   /**   135   /**
136    * delete  forum   136    * delete  forum
137    *  @param  forum_id  forum id   137    *  @param  forum_id  forum id
138    */   138    */
139   Admin.prot otype.delF orum = fun ction (for um_id)   139   Admin.prot otype.delF orum = fun ction (for um_id)
140   {   140   {
141        if   (!confirm   ('
Are   you   sure   to   delete   forum   with   topics   and   posts
'))   return   false;
  141        if   (!confirm   (' [L[ Are   you   sure   to   delete   forum   with   topics   and   posts ]] '))   return   false;
142     142  
143       var $t his = this ;   143       var $t his = this ;
144     144  
145       var h  = function  (r)   145       var h  = function  (r)
146       {           146       {        
147           va r o = new  BxXmlReque st('','',' ');             147           va r o = new  BxXmlReque st('','',' ');          
148            var   re t  
=   o.getRetNo deValue   (r,   ' re t
');
  148            var   ca t _uri   =   o.getRetNo deValue   (r,   ' ca t _uri ');
149            if   ( re t  
>   0)
  149           va r cat_id =  o.getRetN odeValue ( r, 'cat_id ');
    150            if   ( ca t _id   >   0)
150           {   151           {
151                 alert   ('
Forum   has   been   successful ly   deleted
');           
  152                 alert   (' [L[ Forum   has   been   successful ly   deleted ]] ');          
152                 $this.sele ctCat( re t
,   'cat'+ re t
,   true,   true);
  153                 $this.sele ctCat( ca t _uri ,   'cat'+ ca t _id ,   true,   true);              
153                return;   154                return;
154           }   155           }
155     156            alert   (' [L[ Can   not   delete   forum ]] ');
156            alert   ('
Can   not   delete   forum
');
   
157       }   157       }
158     158  
159       new Bx XmlRequest  (this._ba se + "?act ion=edit_f orum_del&f orum_id="+ forum_id,  h, true);   159       new Bx XmlRequest  (this._ba se + "?act ion=edit_f orum_del&f orum_id="+ forum_id,  h, true);
160     160  
161       return  true;   161       return  true;
162   }   162   }
163     163  
164   /**   164   /**
165    * edit ca tegory   165    * edit ca tegory
166    *  @param  id   cate gory id   166    *  @param  id   cate gory id
167    */   167    */
168   Admin.prot otype.edit Cat = func tion (cat_ id)   168   Admin.prot otype.edit Cat = func tion (cat_ id)
169   {      169   {   
170       var $t his = this ;   170       var $t his = this ;
171     171  
172       var h  = function  (r)   172       var h  = function  (r)
173       {               173       {            
174           $t his._forum .showHTML  (r, 300, 2 00);   174           $t his._forum .showHTML  (r, 300, 2 00);
175       }   175       }
176     176  
177       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ category&c at_id="+ca t_id, urlX sl + "edit _cat_form. xsl", h);   177       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ category&c at_id="+ca t_id, urlX sl + "edit _cat_form. xsl", h);
178     178  
179       return  true;   179       return  true;
180   }   180   }
181     181  
182   /**   182   /**
183    * new gro up   183    * new gro up
184    */   184    */
185   Admin.prot otype.newC at = funct ion ()   185   Admin.prot otype.newC at = funct ion ()
186   {      186   {   
187       var $t his = this ;   187       var $t his = this ;
188     188  
189       var h  = function  (r)   189       var h  = function  (r)
190       {               190       {            
191           $t his._forum .showHTML  (r, 300, 2 00);   191           $t his._forum .showHTML  (r, 300, 2 00);
192       }   192       }
193     193  
194       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ category&c at_id="+0,  urlXsl +  "edit_cat_ form.xsl",  h);   194       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ category&c at_id="+0,  urlXsl +  "edit_cat_ form.xsl",  h);
195     195  
196       return  true;   196       return  true;
197   }   197   }
198     198  
199   /**   199   /**
200    * edit ca tegory   200    * edit ca tegory
201    *  @param  cat_name  new group  name   201    *  @param  cat_name  new group  name
202    *  @param  cat_id    category i   202    *  @param  cat_id    category i
203    */   203    */
204   Admin.prot otype.edit CatSubmit  = function  (cat_id,  cat_name)   204   Admin.prot otype.edit CatSubmit  = function  (cat_id,  cat_name)
205   {   205   {
206       var $t his = this ;   206       var $t his = this ;
207     207  
208       var h  = function  (r)   208       var h  = function  (r)
209       {           209       {        
210           va r o = new  BxXmlReque st('','',' ');             210           va r o = new  BxXmlReque st('','',' ');          
211           va r ret = o. getRetNode Value (r,  'ret');   211           va r ret = o. getRetNode Value (r,  'ret');
212           if  ('1' == r et)   212           if  ('1' == r et)
213           {   213           {
214                if (cat_ id > 0)   214                if (cat_ id > 0)
215                     alert   ('
Group   has   been   successful ly   modified
');
  215                     alert   (' [L[ Group   has   been   successful ly   modified ]] ');
216                else   216                else
217                     alert   ('
New   group   has   been   successful ly   added
');
  217                     alert   (' [L[ New   group   has   been   successful ly   added ]] ');
218                $this._f orum.hideH TML();   218                $this._f orum.hideH TML();
219                $this.ed itCategori es();   219                $this.ed itCategori es();
220                return f alse;   220                return f alse;
221           }   221           }
222     222  
223           if  (cat_id >  0)   223           if  (cat_id >  0)
224                 alert   ('
Can   not   modify   group
');
  224                 alert   (' [L[ Can   not   modify   group ]] ');
225           el se   225           el se
226                 alert   ('
Can   not   add   new   group
');
  226                 alert   (' [L[ Can   not   add   new   group ]] ');
227           re turn false ;   227           re turn false ;
228       }   228       }
229     229  
230       cat_na me = encod eURICompon ent (cat_n ame);    230       cat_na me = encod eURICompon ent (cat_n ame); 
231     231  
232       new Bx XmlRequest  (this._ba se + "?act ion=edit_c ategory_su bmit&cat_i d="+cat_id +"&cat_nam e="+cat_na me, h, tru e);   232       new Bx XmlRequest  (this._ba se + "?act ion=edit_c ategory_su bmit&cat_i d="+cat_id +"&cat_nam e="+cat_na me, h, tru e);
233     233  
234       return  false;   234       return  false;
235   }   235   }
236     236  
237     237  
238   /**   238   /**
239    * edit fo rum   239    * edit fo rum
240    *  @param  id   cate gory id   240    *  @param  id   cate gory id
241    */   241    */
242   Admin.prot otype.edit Forum = fu nction (fo rum_id)   242   Admin.prot otype.edit Forum = fu nction (fo rum_id)
243   {      243   {   
244       var $t his = this ;   244       var $t his = this ;
245     245  
246       var h  = function  (r)   246       var h  = function  (r)
247       {               247       {            
248           $t his._forum .showHTML  (r, 400, 2 00);   248           $t his._forum .showHTML  (r, 400, 2 00);
249       }   249       }
250     250  
251       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ forum&foru m_id="+for um_id, url Xsl + "edi t_forum_fo rm.xsl", h );   251       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ forum&foru m_id="+for um_id, url Xsl + "edi t_forum_fo rm.xsl", h );
252     252  
253       return  true;   253       return  true;
254   }   254   }
255     255  
256     256  
257   /**   257   /**
258    * new cat egory   258    * new cat egory
259    */   259    */
260   Admin.prot otype.newF orum = fun ction (cat _id)   260   Admin.prot otype.newF orum = fun ction (cat _id)
261   {      261   {   
262       var $t his = this ;   262       var $t his = this ;
263     263  
264       var h  = function  (r)   264       var h  = function  (r)
265       {               265       {            
266           $t his._forum .showHTML  (r, 400, 2 00);   266           $t his._forum .showHTML  (r, 400, 2 00);
267       }   267       }
268          268       
269       new Bx XslTransfo rm (this._ base + "?a ction=edit _forum&for um_id=0&ca t_id="+cat _id, urlXs l + "edit_ forum_form .xsl", h);   269       new Bx XslTransfo rm (this._ base + "?a ction=edit _forum&for um_id=0&ca t_id="+cat _id, urlXs l + "edit_ forum_form .xsl", h);
270     270  
271       return  true;   271       return  true;
272   }   272   }
273     273  
274     274  
275   /**   275   /**
276    * edit fo rum   276    * edit fo rum
277    *  @param  forum_id  forum id   277    *  @param  forum_id  forum id
278    *  @param  title     forum titl e   278    *  @param  title     forum titl e
279    *  @param  desc      forum desc ription   279    *  @param  desc      forum desc ription
280    *  @param  type      forum type   280    *  @param  type      forum type
281    */   281    */
282   Admin.prot otype.edit ForumSubmi t   =   function   (cat_id,  
forum_id,   title,   desc,   type)
  282   Admin.prot otype.edit ForumSubmi t   =   function   (cat_id,   cat_uri,   forum_id,   title,   desc,   type)
283   {   283   {
284       var $t his = this ;   284       var $t his = this ;
285     285  
286       var h  = function  (r)   286       var h  = function  (r)
287       {           287       {        
288           va r o = new  BxXmlReque st('','',' ');             288           va r o = new  BxXmlReque st('','',' ');          
289           va r ret = o. getRetNode Value (r,  'ret');   289           va r ret = o. getRetNode Value (r,  'ret');
290           if  ('1' == r et)   290           if  ('1' == r et)
291           {   291           {
292                if (foru m_id > 0)   292                if (foru m_id > 0)
293                     alert   ('
Forum   has   been   successful ly   modified
');
  293                     alert   (' [L[ Forum   has   been   successful ly   modified ]] ');
294                else   294                else
295                     alert   ('
New   forum   has   been   successful ly   added
');
  295                     alert   (' [L[ New   forum   has   been   successful ly   added ]] ');
296                $this._f orum.hideH TML();   296                $this._f orum.hideH TML();
297                 $this.sele ctCat   (cat_
i d ,   'cat'+cat_ id,   true,   true);          
  297                 $this.sele ctCat   (cat_ ur i
,   'cat'+cat_ id,   true,   true);              
298                return f alse;   298                return f alse;
299           }   299           }
300     300  
301           if  (forum_id  > 0)   301           if  (forum_id  > 0)
302                 alert   ('
Can   not   modify   forum
');
  302                 alert   (' [L[ Can   not   modify   forum ]] ');
303           el se   303           el se
304                 alert   ('
Can   not   add   new   forum
');
  304                 alert   (' [L[ Can   not   add   new   forum ]] ');
305           re turn false ;   305           re turn false ;
306       }   306       }
307     307  
308       title  = encodeUR IComponent (title);    308       title  = encodeUR IComponent (title); 
309       desc =  encodeURI Component( desc);    309       desc =  encodeURI Component( desc); 
310     310  
311       new Bx XmlRequest  (this._ba se + "?act ion=edit_f orum_submi t&cat_id=" +cat_id+"& forum_id=" +forum_id+ "&title="+ title+"&de sc="+desc+ "&type="+t ype, h, tr ue);   311       new Bx XmlRequest  (this._ba se + "?act ion=edit_f orum_submi t&cat_id=" +cat_id+"& forum_id=" +forum_id+ "&title="+ title+"&de sc="+desc+ "&type="+t ype, h, tr ue);
312     312  
313       return  false;   313       return  false;
314   }   314   }
315     315  
316     316  
317   /**   317   /**
318    * returns  new topic  page XML   318    * returns  new topic  page XML
319    */   319    */
320   Admin.prot otype.sele ctCat = fu nction (ca t, id, for ce_show, f orce_reloa d)   320   Admin.prot otype.sele ctCat = fu nction (ca t, id, for ce_show, f orce_reloa d)
321   {      321   {   
322       var e  = document .getElemen tById(id);   322       var e  = document .getElemen tById(id);
323     323  
324       if (!e   324       if (!e
325       {   325       {
326            new   BxError("
category   id   is   not   defined
",   "
please   set   category   ids
");
  326            new   BxError(" [L[ category   id   is   not   defined ]] ",   " [L[ please   set   category   ids ]] ");
327           re turn false ;   327           re turn false ;
328       }   328       }
329     329  
330       // det ermine nex t forum si bling    330       // det ermine nex t forum si bling 
331       var et  = e.nextS ibling;    331       var et  = e.nextS ibling; 
332       while  (et && !(e t.tagName  == 'DIV' | | et.tagNa me == 'UL' ))   332       while  (et && !(e t.tagName  == 'DIV' | | et.tagNa me == 'UL' ))
333           et  = et.next Sibling;   333           et  = et.next Sibling;
334       if (et  && et.tag Name != 'D IV') et =  null;   334       if (et  && et.tag Name != 'D IV') et =  null;
335     335  
336       // det ermine nex t cat sibl ing    336       // det ermine nex t cat sibl ing 
337       var en  = e.nextS ibling;    337       var en  = e.nextS ibling; 
338       while  (en && en. tagName !=  'UL' && e n.id && !e n.id.match (/^cat/))   338       while  (en && en. tagName !=  'UL' && e n.id && !e n.id.match (/^cat/))
339           en  = en.next Sibling;   339           en  = en.next Sibling;
340     340  
341       var ei  = e.getEl ementsByTa gName('div ')[0];   341       var ei  = e.getEl ementsByTa gName('div ')[0];
342     342  
343       if (et  && !force _show)   343       if (et  && !force _show)
344       {   344       {
345           ei .style.bac kgroundPos ition = '0 px 0px';   345           ei .style.bac kgroundPos ition = '0 px 0px';
346           e. parentNode .removeChi ld (et);   346           e. parentNode .removeChi ld (et);
347           if  (!force_r eload) ret urn false;   347           if  (!force_r eload) ret urn false;
348       }   348       }
349     349  
350        this._foru m.loading   ('
LOADING   FORUMS
');
  350        this._foru m.loading   (' [L[ LOADING   FORUMS ]] ');
351     351  
352       var $t his = this ;   352       var $t his = this ;
353     353  
354       this._ cat = cat;   354       this._ cat = cat;
355          355       
356       var h  = function  (r)   356       var h  = function  (r)
357       {      357       {   
358           va r d = docu ment.creat eElement(" div");          358           va r d = docu ment.creat eElement(" div");       
359           d. innerHTML  = r;   359           d. innerHTML  = r;
360     360  
361           if  (et)   361           if  (et)
362                e.parent Node.repla ceChild (d , et);   362                e.parent Node.repla ceChild (d , et);
363           el se   363           el se
364                e.parent Node.inser tBefore (d , en);          364                e.parent Node.inser tBefore (d , en);       
365     365  
366           ei .style.bac kgroundPos ition = '0 px -32px';   366           ei .style.bac kgroundPos ition = '0 px -32px';
367     367  
368           $t his._forum .stopLoadi ng ();   368           $t his._forum .stopLoadi ng ();
369     369  
370           $t his._forum .checkHeig ht ();   370           $t his._forum .checkHeig ht ();
371     371  
372           re turn false ;   372           re turn false ;
373       }   373       }
374     374  
375       new Bx XslTransfo rm(this._b ase + "?ac tion=list_ forums_adm in&cat=" +  cat, urlX sl + "edit _cat_forum s.xsl", h) ;   375       new Bx XslTransfo rm(this._b ase + "?ac tion=list_ forums_adm in&cat=" +  cat, urlX sl + "edit _cat_forum s.xsl", h) ;
376     376  
377       //docu ment.h.mak eHist('act ion=goto&c at_id=' +  cat);   377       //docu ment.h.mak eHist('act ion=goto&c at_id=' +  cat);
378     378  
379       return  false;   379       return  false;
380   }   380   }
381     381  
382   /*   382   /*
383    * lock/un lock   383    * lock/un lock
384    */   384    */
385   Admin.prot otype.lock  = functio n (topic_i d, locked)   385   Admin.prot otype.lock  = functio n (topic_i d, locked)
386   {                   386   {                
387       var $t his = this ;   387       var $t his = this ;
388     388  
389       var h  = function  (r)   389       var h  = function  (r)
390       {           390       {        
391           va r o = new  BxXmlReque st('','',' ');   391           va r o = new  BxXmlReque st('','',' ');
392           va r ret = o. getRetNode Value (r,  'ret');   392           va r ret = o. getRetNode Value (r,  'ret');
393           va r eImg = d ocument.ge tElementBy Id('btn_lo ck_topic') ;   393           va r eImg = d ocument.ge tElementBy Id('btn_lo ck_topic') ;
394           if  ('1' == r et)   394           if  ('1' == r et)
395           {                        395           {                     
396                 alert   ('
Topic   has   been   successful ly   locked
');              
  396                 alert   (' [L[ Topic   has   been   successful ly   locked ]] ');
397                if (eImg   397                if (eImg
398                {   398                {
399                    eImg .src = eIm g.src.repl ace(/unloc ked/,'lock ed');   399                    eImg .src = eIm g.src.repl ace(/unloc ked/,'lock ed');
400                    var  eB = eImg. nextSiblin g;   400                    var  eB = eImg. nextSiblin g;
401                    if ( eB.tagName  != 'B') e B = eB.nex tSibling;   401                    if ( eB.tagName  != 'B') e B = eB.nex tSibling;
402                    //if  (eB.tagNa me == 'B')  eB.innerH TML = eB.i nnerHTML.r eplace(/Lo ck/,'Unloc k');   402                    //if  (eB.tagNa me == 'B')  eB.innerH TML = eB.i nnerHTML.r eplace(/Lo ck/,'Unloc k');
403                }   403                }
404                return f alse;   404                return f alse;
405           }   405           }
406           if  ('-1' ==  ret)   406           if  ('-1' ==  ret)
407           {             407           {          
408                 alert   ('
Topic   has   been   successful ly   unlocked
');
  408                 alert   (' [L[ Topic   has   been   successful ly   unlocked ]] ');
409                if (eImg   409                if (eImg
410                {   410                {
411                    eImg .src = eIm g.src.repl ace(/locke d/,'unlock ed');   411                    eImg .src = eIm g.src.repl ace(/locke d/,'unlock ed');
412                    var  eB = eImg. nextSiblin g;   412                    var  eB = eImg. nextSiblin g;
413                    if ( eB.tagName  != 'B') e B = eB.nex tSibling;   413                    if ( eB.tagName  != 'B') e B = eB.nex tSibling;
414                    //if  (eB.tagNa me == 'B')  eB.innerH TML = eB.i nnerHTML.r eplace(/Un lock/,'Loc k');   414                    //if  (eB.tagNa me == 'B')  eB.innerH TML = eB.i nnerHTML.r eplace(/Un lock/,'Loc k');
415                }   415                }
416                return f alse;   416                return f alse;
417           }   417           }
418     418  
419           al ert ('Only  admin can  lock/unlo ck topics' );   419           al ert ('Only  admin can  lock/unlo ck topics' );
420           re turn false ;   420           re turn false ;
421       }   421       }
422     422  
423       new Bx XmlRequest  (this._ba se + "?act ion=lock_t opic&topic _id=" + to pic_id + " &ts=" + (n ew Date()) , h, true) ;   423       new Bx XmlRequest  (this._ba se + "?act ion=lock_t opic&topic _id=" + to pic_id + " &ts=" + (n ew Date()) , h, true) ;
424     424  
425       return  false;   425       return  false;
426   }   426   }
    427  
    428   /*
    429    * compile  language  files
    430    */
    431   Admin.prot otype.comp ileLangs =  function  (sLang)
    432   {
    433  
    434       var h  = function  (r)
    435       {        
    436           va r o = new  BxXmlReque st('','',' ');
    437           va r ret = o. getRetNode Value (r,  'ret');
    438           if  ('1' == r et)
    439           {                     
    440                alert (' [L[Languag e files ha ve been su ccessfully  compiled] ]');
    441           }
    442           el se
    443           {          
    444                alert (' [L[Languag e files co mpilation  have been  failed]]') ;
    445           }
    446           re turn false ;
    447       }
    448  
    449       new Bx XmlRequest  (this._ba se + "?act ion=compil e_langs&la ng=" + sLa ng + "&ts= " + (new D ate()), h,  true);
    450   }