Fix #5724 - force ticket selection for branches...
[gitlive] / NewBranch.vala
1 static NewBranch  _NewBranch;
2
3 public class NewBranch : Object
4 {
5     public Gtk.Dialog el;
6     private NewBranch  _this;
7
8     public static NewBranch singleton()
9     {
10         if (_NewBranch == null) {
11             _NewBranch= new NewBranch();
12         }
13         return _NewBranch;
14     }
15     public Xcls_projectsel projectsel;
16     public Xcls_prcellrenderer prcellrenderer;
17     public Xcls_prmodel prmodel;
18     public Xcls_ticketsel ticketsel;
19     public Xcls_dbcellrenderer dbcellrenderer;
20     public Xcls_dbmodel dbmodel;
21     public Xcls_name name;
22     public Xcls_btn_not_me btn_not_me;
23     public Xcls_btn_closed btn_closed;
24     public Xcls_scrolled_window scrolled_window;
25     public Xcls_view view;
26
27         // my vars (def)
28     public GitRepo? repo;
29     public bool running;
30     public Gee.ArrayList<GitMonitorQueue> queue;
31
32     // ctor
33     public NewBranch()
34     {
35         _this = this;
36         this.el = new Gtk.Dialog();
37
38         // my vars (dec)
39         this.repo = null;
40         this.running = true;
41         this.queue = null;
42
43         // set gobject values
44         this.el.title = "Create a working branch ";
45         this.el.default_height = 500;
46         this.el.default_width = 500;
47         this.el.deletable = true;
48         this.el.modal = true;
49         var child_0 = new Xcls_Box2( _this );
50         child_0.ref();
51         this.el.get_content_area().add (  child_0.el  );
52
53         //listeners
54         this.el.delete_event.connect( (self, event) => {
55             this.el.hide();
56             return true; 
57             //test  
58         });
59         this.el.response.connect( (self, response_id) =>  { 
60           
61                 GLib.debug("got %d", (int) response_id);
62                 if (response_id < 1) {
63                     _this.el.hide();    
64                     this.running = false; 
65                         return;
66                 }
67                 
68                 
69                 
70                 
71                  
72                 // have they selected a ticket..
73                 // make that the current active ticket?
74                 // we really need to store locally what ticket is being worked on..
75                 // in theory we could be working on multiple project and not merging..
76                 // -- each repo would have their active ticket (only one per repo)
77                 // -- so we could just store that in there
78                 // -- initial load can check the contents of the ticket files on first scan.
79                 var ticket_id = _this.ticketsel.selectedTicketId();
80                 
81                 if (ticket_id == "") {
82                         _this.ticketsel.el.get_child().get_style_context().add_class("warning");
83                         return;
84                 }
85                 
86             if (this.repo != null) {
87                 var bn = _this.name.el.get_text();
88         
89                         var res = this.repo.setActiveTicket(                    
90                                  RooTicket.singleton().getById(ticket_id != "" ? ticket_id : "-1"), bn
91                          );
92                          if (res) {
93                                 // start the monitoring..
94                                  GitMonitor.gitmonitor.start();
95                                  
96                          }
97             }
98             
99         
100             this.running = false; 
101         
102                 this.el.hide();
103                  
104                  
105         
106                  
107         });
108     }
109
110     // user defined functions
111     public   void show ( GitRepo repo, Gee.ArrayList<GitMonitorQueue> queue, string tid = "" ) 
112     {
113          // this.el.set_gravity(Gdk.Gravity.NORTH);
114         if (this.running) { // should not happen!!
115                 GLib.error("new branch show called, when already being displayed?");
116         }
117         this.queue = queue;
118         
119         this.running  = true;
120         GitMonitor.gitmonitor.stop();
121         
122         this.repo = repo;
123         
124          
125         
126         this.el.move((Gdk.Screen.width() / 2)- 250 ,0);
127         this.el.set_default_size( 500,200); // not sure why it grows..
128         GLib.debug("Loading tickets"); 
129          
130     
131         this.el.show_all();
132         this.el.set_keep_above(true);
133        
134         
135         var curproj = RooProject.getProjectByRepo(this.repo);
136          _this.prmodel.loadProjects(curproj == null ? "" : curproj.id);
137         
138         _this.dbmodel.loadTickets(curproj == null ? "": curproj.id, tid);
139         _this.ticketsel.el.get_child().get_style_context().remove_class("warning");
140         if (tid != "") { 
141                 var name = RooTicket.singleton().usernameLocal();
142                 var ticket = RooTicket.singleton().getById(tid);
143                 _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
144         } else {
145                 _this.ticketsel.el.get_child().get_style_context().add_class("warning");
146         }
147         _this.view.loadTicket(tid);
148         this.el.run();
149     
150     }
151     public class Xcls_Box2 : Object
152     {
153         public Gtk.Box el;
154         private NewBranch  _this;
155
156
157             // my vars (def)
158
159         // ctor
160         public Xcls_Box2(NewBranch _owner )
161         {
162             _this = _owner;
163             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
164
165             // my vars (dec)
166
167             // set gobject values
168             var child_0 = new Xcls_Table3( _this );
169             child_0.ref();
170             this.el.pack_start (  child_0.el , false,false,0 );
171             var child_1 = new Xcls_scrolled_window( _this );
172             child_1.ref();
173             this.el.add (  child_1.el  );
174         }
175
176         // user defined functions
177     }
178     public class Xcls_Table3 : Object
179     {
180         public Gtk.Table el;
181         private NewBranch  _this;
182
183
184             // my vars (def)
185
186         // ctor
187         public Xcls_Table3(NewBranch _owner )
188         {
189             _this = _owner;
190             this.el = new Gtk.Table( 5, 5, true );
191
192             // my vars (dec)
193
194             // set gobject values
195             this.el.expand = false;
196             this.el.margin = 2;
197             this.el.column_spacing = 4;
198             this.el.vexpand = false;
199             var child_0 = new Xcls_Label4( _this );
200             child_0.ref();
201             this.el.attach_defaults (  child_0.el , 0,1,0,1 );
202             var child_1 = new Xcls_Label5( _this );
203             child_1.ref();
204             this.el.attach_defaults (  child_1.el , 1,2,0,1 );
205             var child_2 = new Xcls_projectsel( _this );
206             child_2.ref();
207             this.el.attach_defaults (  child_2.el , 0,1,1,2 );
208             var child_3 = new Xcls_ticketsel( _this );
209             child_3.ref();
210             this.el.attach_defaults (  child_3.el , 1,4,1,2 );
211             var child_4 = new Xcls_Button12( _this );
212             child_4.ref();
213             this.el.attach_defaults (  child_4.el , 4,5,1,2 );
214             var child_5 = new Xcls_Label13( _this );
215             child_5.ref();
216             this.el.attach_defaults (  child_5.el , 0,1,3,4 );
217             var child_6 = new Xcls_name( _this );
218             child_6.ref();
219             this.el.attach_defaults (  child_6.el , 0,4,4,5 );
220             var child_7 = new Xcls_Button15( _this );
221             child_7.ref();
222             this.el.attach_defaults (  child_7.el , 4,5,4,5 );
223             var child_8 = new Xcls_Box16( _this );
224             child_8.ref();
225             this.el.attach_defaults (  child_8.el , 0,5,2,3 );
226         }
227
228         // user defined functions
229     }
230     public class Xcls_Label4 : Object
231     {
232         public Gtk.Label el;
233         private NewBranch  _this;
234
235
236             // my vars (def)
237
238         // ctor
239         public Xcls_Label4(NewBranch _owner )
240         {
241             _this = _owner;
242             this.el = new Gtk.Label( "Project" );
243
244             // my vars (dec)
245
246             // set gobject values
247             this.el.halign = Gtk.Align.START;
248             this.el.justify = Gtk.Justification.RIGHT;
249             this.el.visible = true;
250         }
251
252         // user defined functions
253     }
254
255     public class Xcls_Label5 : Object
256     {
257         public Gtk.Label el;
258         private NewBranch  _this;
259
260
261             // my vars (def)
262
263         // ctor
264         public Xcls_Label5(NewBranch _owner )
265         {
266             _this = _owner;
267             this.el = new Gtk.Label( "Ticket" );
268
269             // my vars (dec)
270
271             // set gobject values
272             this.el.halign = Gtk.Align.START;
273             this.el.visible = true;
274         }
275
276         // user defined functions
277     }
278
279     public class Xcls_projectsel : Object
280     {
281         public Gtk.ComboBox el;
282         private NewBranch  _this;
283
284
285             // my vars (def)
286         public bool loading;
287
288         // ctor
289         public Xcls_projectsel(NewBranch _owner )
290         {
291             _this = _owner;
292             _this.projectsel = this;
293             this.el = new Gtk.ComboBox.with_entry();
294
295             // my vars (dec)
296             this.loading = false;
297
298             // set gobject values
299             var child_0 = new Xcls_prcellrenderer( _this );
300             child_0.ref();
301             this.el.pack_start (  child_0.el , true );
302             var child_1 = new Xcls_prmodel( _this );
303             child_1.ref();
304             this.el.set_model (  child_1.el  );
305
306             // init method
307
308             this.el.set_entry_text_column(1);
309
310             //listeners
311             this.el.changed.connect( () => {
312                 if (this.loading) {
313                         return;
314                 }
315                 var project_id = this.selectedProjectId();
316                 _this.dbmodel.loadTickets(project_id);
317                 
318                 
319                 /*if (this.loading) {
320                         return;
321                 }
322                 var ticket_id = this.selectedTicketId();
323                 
324                 var name = RooTicket.singleton().usernameLocal();
325                 
326                 if (ticket_id == "" || ticket_id == null) {
327                 
328                         var dt = new  DateTime.now_local();
329                         _this.name.el.set_text("wip_%s_%s".printf(name,dt.format("%Y_%b_%d")));
330                         return;
331                 }
332                 
333                 
334                 var ticket = RooTicket.singleton().getById(ticket_id);
335                
336                 _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
337                 
338                 //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
339                 */
340             });
341         }
342
343         // user defined functions
344         public string selectedProjectId () {
345                 Gtk.TreeIter iter;
346                 Value val1;
347          
348          
349                 this.el.get_active_iter (out iter);
350                 _this.prmodel.el.get_value (iter, 0, out val1);
351          
352         
353                 return  (string) val1;
354                 
355                 
356                 
357                 
358         }
359     }
360     public class Xcls_prcellrenderer : Object
361     {
362         public Gtk.CellRendererText el;
363         private NewBranch  _this;
364
365
366             // my vars (def)
367
368         // ctor
369         public Xcls_prcellrenderer(NewBranch _owner )
370         {
371             _this = _owner;
372             _this.prcellrenderer = this;
373             this.el = new Gtk.CellRendererText();
374
375             // my vars (dec)
376
377             // set gobject values
378         }
379
380         // user defined functions
381     }
382
383     public class Xcls_prmodel : Object
384     {
385         public Gtk.ListStore el;
386         private NewBranch  _this;
387
388
389             // my vars (def)
390
391         // ctor
392         public Xcls_prmodel(NewBranch _owner )
393         {
394             _this = _owner;
395             _this.prmodel = this;
396             this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
397
398             // my vars (dec)
399
400             // set gobject values
401         }
402
403         // user defined functions
404         public void loadProjects (string id) {
405         
406         
407             
408             _this.projectsel.loading = true;
409         
410             this.el.clear();                                    
411             Gtk.TreeIter iter;
412             var el = this.el;
413             
414             el.append(out iter);
415         
416             
417             el.set_value(iter, 0, "");
418             el.set_value(iter, 1, "-- select a project --");
419             if (id == "") {
420                     _this.projectsel.el.set_active_iter(iter);
421             }
422           
423             foreach(var project in RooProject.projects()) {
424             
425                 el.append(out iter);
426                 
427                 el.set_value(iter, 0, project.id);
428                 el.set_value(iter, 1,  project.name );
429                 if (id == project.id) {
430                            _this.projectsel.el.set_active_iter(iter);
431                     }   
432                 
433             }
434             
435             _this.projectsel.loading = false;
436              //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
437                                              
438         }
439     }
440
441
442     public class Xcls_ticketsel : Object
443     {
444         public Gtk.ComboBox el;
445         private NewBranch  _this;
446
447
448             // my vars (def)
449         public bool loading;
450
451         // ctor
452         public Xcls_ticketsel(NewBranch _owner )
453         {
454             _this = _owner;
455             _this.ticketsel = this;
456             this.el = new Gtk.ComboBox.with_entry();
457
458             // my vars (dec)
459             this.loading = false;
460
461             // set gobject values
462             var child_0 = new Xcls_dbcellrenderer( _this );
463             child_0.ref();
464             this.el.pack_start (  child_0.el , true );
465             var child_1 = new Xcls_dbmodel( _this );
466             child_1.ref();
467             this.el.set_model (  child_1.el  );
468
469             // init method
470
471             //this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
472             this.el.set_entry_text_column(1);
473             this.el.get_child().set_sensitive(false);
474
475             //listeners
476             this.el.changed.connect( () => {
477                 if (this.loading) {
478                         return;
479                 }
480                 var ticket_id = this.selectedTicketId();
481                 
482                 var name = RooTicket.singleton().usernameLocal();
483                 
484                 this.el.get_child().get_style_context().remove_class("warning");
485                 if (ticket_id == "" || ticket_id == null) {
486                 
487                         var dt = new  DateTime.now_local();
488                         _this.name.el.set_text("wip_%s_%s".printf(name,dt.format("%Y_%b_%d")));
489                         _this.view.loadTicket("");              
490                         
491                         this.el.get_child().get_style_context().add_class("warning");
492                         
493                         return;
494                 }
495                 
496                 
497                 var ticket = RooTicket.singleton().getById(ticket_id);
498                
499                 _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
500                 _this.scrolled_window.el.show();
501                  
502                 _this.view.loadTicket(ticket.id);
503                 //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
504             });
505         }
506
507         // user defined functions
508         public string selectedTicketId () {
509         Gtk.TreeIter iter;
510                 Value val1;
511          
512          
513                 this.el.get_active_iter (out iter);
514                 _this.dbmodel.el.get_value (iter, 0, out val1);
515          
516         
517                 return  (string) val1;
518                 
519                 
520                 
521                 
522         }
523     }
524     public class Xcls_dbcellrenderer : Object
525     {
526         public Gtk.CellRendererText el;
527         private NewBranch  _this;
528
529
530             // my vars (def)
531
532         // ctor
533         public Xcls_dbcellrenderer(NewBranch _owner )
534         {
535             _this = _owner;
536             _this.dbcellrenderer = this;
537             this.el = new Gtk.CellRendererText();
538
539             // my vars (dec)
540
541             // set gobject values
542         }
543
544         // user defined functions
545     }
546
547     public class Xcls_dbmodel : Object
548     {
549         public Gtk.ListStore el;
550         private NewBranch  _this;
551
552
553             // my vars (def)
554
555         // ctor
556         public Xcls_dbmodel(NewBranch _owner )
557         {
558             _this = _owner;
559             _this.dbmodel = this;
560             this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
561
562             // my vars (dec)
563
564             // set gobject values
565         }
566
567         // user defined functions
568         public void loadTickets (string project_id , string tid = "") {
569         
570         
571             
572             // fixme .. get project id from selection..
573             
574              RooTicket.singleton().loadTickets(
575                                 project_id,
576                                 _this.btn_not_me.el.active ? RooTicket.Who.ANYBODY :  RooTicket.Who.ME,
577                                  _this.btn_closed.el.active ? RooTicket.Status.ALL :  RooTicket.Status.ACTIVE
578                          );
579                 
580             _this.ticketsel.loading = true;
581         
582             this.el.clear();                                    
583             Gtk.TreeIter iter;
584             var el = this.el;
585             
586             el.append(out iter);
587         
588             
589             el.set_value(iter, 0, "");
590             el.set_value(iter, 1, "-- select a ticket --");
591             
592             _this.ticketsel.el.set_active_iter(iter);
593             var tickets = RooTicket.singleton().tickets;
594             foreach(var ticket in tickets) {
595             
596                 el.append(out iter);
597                 
598                 el.set_value(iter, 0, ticket.id);
599                 el.set_value(iter, 1, "#%s %s".printf( ticket.id, ticket.summary));
600                 
601                 if (ticket.id == tid) {
602                             _this.ticketsel.el.set_active_iter(iter);
603                 }
604                 
605             }
606             
607             _this.ticketsel.loading = false;
608              //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
609                                              
610         }
611     }
612
613
614     public class Xcls_Button12 : Object
615     {
616         public Gtk.Button el;
617         private NewBranch  _this;
618
619
620             // my vars (def)
621
622         // ctor
623         public Xcls_Button12(NewBranch _owner )
624         {
625             _this = _owner;
626             this.el = new Gtk.Button();
627
628             // my vars (dec)
629
630             // set gobject values
631             this.el.expand = false;
632             this.el.label = "New Ticket";
633
634             //listeners
635             this.el.clicked.connect( () => {
636                 _this.el.response(-1);
637                 Ticket.singleton().show(_this.repo);
638             
639             });
640         }
641
642         // user defined functions
643     }
644
645     public class Xcls_Label13 : Object
646     {
647         public Gtk.Label el;
648         private NewBranch  _this;
649
650
651             // my vars (def)
652
653         // ctor
654         public Xcls_Label13(NewBranch _owner )
655         {
656             _this = _owner;
657             this.el = new Gtk.Label( "Use this as branch name" );
658
659             // my vars (dec)
660
661             // set gobject values
662             this.el.halign = Gtk.Align.START;
663             this.el.justify = Gtk.Justification.RIGHT;
664             this.el.xalign = 0.900000f;
665         }
666
667         // user defined functions
668     }
669
670     public class Xcls_name : Object
671     {
672         public Gtk.Entry el;
673         private NewBranch  _this;
674
675
676             // my vars (def)
677
678         // ctor
679         public Xcls_name(NewBranch _owner )
680         {
681             _this = _owner;
682             _this.name = this;
683             this.el = new Gtk.Entry();
684
685             // my vars (dec)
686
687             // set gobject values
688             this.el.visible = true;
689         }
690
691         // user defined functions
692     }
693
694     public class Xcls_Button15 : Object
695     {
696         public Gtk.Button el;
697         private NewBranch  _this;
698
699
700             // my vars (def)
701
702         // ctor
703         public Xcls_Button15(NewBranch _owner )
704         {
705             _this = _owner;
706             this.el = new Gtk.Button();
707
708             // my vars (dec)
709
710             // set gobject values
711             this.el.label = "Create Branch";
712
713             // init method
714
715             {
716                this.el.get_style_context().add_class("suggested-action");
717             }
718
719             //listeners
720             this.el.clicked.connect( () => {
721                 GLib.debug("fire response = 1");
722                 _this.el.response(1);
723             });
724         }
725
726         // user defined functions
727     }
728
729     public class Xcls_Box16 : Object
730     {
731         public Gtk.Box el;
732         private NewBranch  _this;
733
734
735             // my vars (def)
736
737         // ctor
738         public Xcls_Box16(NewBranch _owner )
739         {
740             _this = _owner;
741             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
742
743             // my vars (dec)
744
745             // set gobject values
746             var child_0 = new Xcls_btn_not_me( _this );
747             child_0.ref();
748             this.el.add (  child_0.el  );
749             var child_1 = new Xcls_btn_closed( _this );
750             child_1.ref();
751             this.el.add (  child_1.el  );
752             var child_2 = new Xcls_Label19( _this );
753             child_2.ref();
754             this.el.add (  child_2.el  );
755         }
756
757         // user defined functions
758     }
759     public class Xcls_btn_not_me : Object
760     {
761         public Gtk.CheckButton el;
762         private NewBranch  _this;
763
764
765             // my vars (def)
766
767         // ctor
768         public Xcls_btn_not_me(NewBranch _owner )
769         {
770             _this = _owner;
771             _this.btn_not_me = this;
772             this.el = new Gtk.CheckButton();
773
774             // my vars (dec)
775
776             // set gobject values
777             this.el.label = "Show tickets not assigned to me";
778
779             //listeners
780             this.el.toggled.connect( () => {
781                 var project_id = _this.projectsel.selectedProjectId();
782                 _this.dbmodel.loadTickets(project_id);  
783             });
784         }
785
786         // user defined functions
787     }
788
789     public class Xcls_btn_closed : Object
790     {
791         public Gtk.CheckButton el;
792         private NewBranch  _this;
793
794
795             // my vars (def)
796
797         // ctor
798         public Xcls_btn_closed(NewBranch _owner )
799         {
800             _this = _owner;
801             _this.btn_closed = this;
802             this.el = new Gtk.CheckButton();
803
804             // my vars (dec)
805
806             // set gobject values
807             this.el.label = "Show closed Tickets";
808
809             //listeners
810             this.el.toggled.connect( () => {
811                 var project_id = _this.projectsel.selectedProjectId();
812                 _this.dbmodel.loadTickets(project_id);  
813                  
814             });
815         }
816
817         // user defined functions
818     }
819
820     public class Xcls_Label19 : Object
821     {
822         public Gtk.Label el;
823         private NewBranch  _this;
824
825
826             // my vars (def)
827
828         // ctor
829         public Xcls_Label19(NewBranch _owner )
830         {
831             _this = _owner;
832             this.el = new Gtk.Label( "<a href=\"refresh\">Refresh Ticket list</a>" );
833
834             // my vars (dec)
835
836             // set gobject values
837             this.el.halign = Gtk.Align.END;
838             this.el.hexpand = true;
839             this.el.use_markup = true;
840
841             //listeners
842             this.el.activate_link.connect( (uri) => {
843                 if (uri == "refresh") {
844                         RooProject.reload();
845                         var curproj = RooProject.getProjectByRepo(_this.repo);
846                          _this.prmodel.loadProjects(curproj == null ? "": curproj.id);
847             
848                         _this.dbmodel.loadTickets(curproj == null ? "": curproj.id);            
849                 }
850                 return true;
851             });
852         }
853
854         // user defined functions
855     }
856
857
858
859     public class Xcls_scrolled_window : Object
860     {
861         public Gtk.ScrolledWindow el;
862         private NewBranch  _this;
863
864
865             // my vars (def)
866
867         // ctor
868         public Xcls_scrolled_window(NewBranch _owner )
869         {
870             _this = _owner;
871             _this.scrolled_window = this;
872             this.el = new Gtk.ScrolledWindow( null, null );
873
874             // my vars (dec)
875
876             // set gobject values
877             this.el.height_request = 500;
878             this.el.vexpand = true;
879             var child_0 = new Xcls_view( _this );
880             child_0.ref();
881             this.el.add (  child_0.el  );
882
883             // init method
884
885             {
886                 this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
887             }
888         }
889
890         // user defined functions
891     }
892     public class Xcls_view : Object
893     {
894         public WebKit.WebView el;
895         private NewBranch  _this;
896
897
898             // my vars (def)
899
900         // ctor
901         public Xcls_view(NewBranch _owner )
902         {
903             _this = _owner;
904             _this.view = this;
905             this.el = new WebKit.WebView();
906
907             // my vars (dec)
908
909             // set gobject values
910         }
911
912         // user defined functions
913         public void loadTicket (string tid) {
914                 int h,w;
915                 _this.el.get_size(out w, out h);
916                 
917                 if (tid == "") {
918                         _this.scrolled_window.el.hide();
919                         _this.el.resize(w, 150);
920                 } else {
921                         _this.scrolled_window.el.show();
922                         _this.el.resize(w, 800);
923                 }
924                 
925                 var rs =  RooTicket.singleton();                
926                 var uri = new WebKit.URIRequest("https://roojs.com/admin.php/MTrack/View/" + tid);
927                 var hd = uri.get_http_headers();
928                 var authCode = Base64.encode ("%s:%s".printf(rs.username, rs.password).data);
929                 hd.append("Authorization", "Basic %s".printf(authCode));
930                 
931                  this.el.load_request(uri);
932         }
933     }
934
935
936
937 }