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