major updates to slice reservation page and plugins
[myslice.git] / plugins / queryupdater / static / js / queryupdater.js
1 /**
2  * MySlice QueryUpdater plugin
3  * Version: 0.1.0
4  * URL: http://www.myslice.info
5  * Description: display of selected resources
6  * Requires: 
7  * Author: The MySlice Team
8  * Copyright: Copyright 2012 UPMC Sorbonne Universités
9  * License: GPLv3
10  */
11
12 (function( $ ){
13
14     var debug=false;
15     debug=true;
16
17     // XXX record selected (multiple selection ?)
18     // XXX record disabled ?
19     // XXX out of sync plugin ?
20     // XXX out of date record ?
21     // record tags ???
22     //
23     // criticality of the absence of a handler in a plugin
24     // non-critical only can have switch case
25     // 
26     // Record state through the query cycle
27
28
29     var QueryUpdaterPlugin = Plugin.extend({
30
31         init: function(options, element) {
32                 this.classname="queryupdater";
33             this._super(options, element);
34
35             var self = this;
36
37             this.initial = Array();
38             this.selected_resources = Array();
39
40             this.table = this.elmt('table').dataTable({
41 // the original querytable layout was
42 //                sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t<'row'<'col-xs-5'i><'col-xs-7'p>>",
43 // however the bottom line with 'showing blabla...' and the navigation widget are not really helpful
44                 sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t>",
45 // so this does not matter anymore now that the pagination area is turned off
46 //                sPaginationType: 'bootstrap',
47                       bAutoWidth: true,
48 //                bJQueryUI      : true,
49 //                bRetrieve      : true,
50 //                sScrollX       : '100%',                 // Horizontal scrolling 
51 //                bSortClasses   : false,              // Disable style for the sorted column
52 //                aaSorting      : [[ 0, 'asc' ]],        // Default sorting on URN
53 //                fnDrawCallback: function() {      // Reassociate close click every time the table is redrawn
54 //                    /* Prevent to loop on click while redrawing table  */
55 //                    $('.ResourceSelectedClose').unbind('click');
56 //                    /* Handle clicks on close span */
57 //                    /* Reassociate close click every time the table is redrawn */
58 //                    $('.ResourceSelectedClose').bind('click', self, self._close_click);
59 //                }
60              });
61             
62             // XXX This should not be done at init...
63             this.elmt('update').click(this, this.do_checksla);
64             this.elmt('refresh').click(this, this.do_refresh);
65             this.elmt('reset').click(this, this.do_reset);
66             this.elmt('clear_annotations').click(this, this.do_clear_annotations);
67
68             this.listen_query(options.query_uuid);
69         },
70
71         /*************************** PLUGIN EVENTS ****************************/
72
73         /***************************** GUI EVENTS *****************************/
74
75         do_checksla: function(e) {
76             var username = e.data.options.username;
77             var urn = data.value;
78             var arrayselectedresources = data.selected_resources;
79
80             var accepted_sla = Array();
81             var count = 0;
82             var self = e.data;
83             // XXX check that the query is not disabled
84
85             console.log("DATA VALUE: " + data.value);
86             
87             //<p>SLA description</p>
88             //<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime</p>
89             //<p>SLA description</p>
90             //<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the WiLab2 resources during the sliver lifetime</p>
91             var promt = $('#modal-body');
92             
93             // id="myModalLabel"
94             var flagVW = false;
95             var  flagWi = false;
96
97             promt.append('<p>SLA description</p>');
98             
99             var wilabForm = "";
100             wilabForm += "<ul>";
101             for(var iter = 0; iter < arrayselectedresources.length; iter++){
102                 var list = '<li class="wi'+iter+'" name=wi"'+iter+'">'+arrayselectedresources[iter].toLowerCase()+'</li>';
103                 
104                 if (arrayselectedresources[iter].toLowerCase().indexOf("wilab2") >= 0){
105
106                     accepted_sla.push({"wilab2":false}); 
107                     wilabForm += list;   
108                     flagWi = true;             
109
110                 }
111
112             }
113             wilabForm += "</ul>";
114
115             //var wallmessage = '<p>SLA description</p><p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime</p>';
116
117             var wallForm = "";
118             wallForm += "<ul>";
119             for(var iter = 0; iter < arrayselectedresources.length; iter++){
120                 var list = '<li class="wall'+iter+'" name=wall"'+iter+'" >'+arrayselectedresources[iter].toLowerCase()+'</li>';
121                 
122                 if (arrayselectedresources[iter].toLowerCase().indexOf("wall2") >= 0){
123
124                     accepted_sla.push({"wall2":false});
125                     wallForm += list;
126                     flagVW = true;
127                     
128                 }
129
130             }
131             wallForm += "</ul>";
132             
133             var flagDouble = false;
134             if(flagWi)
135             {
136                 flagDouble = true;
137                 promt.append('<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the WiLab2 resources during the sliver lifetime</p>');
138                 promt.append(wilabForm);
139                 promt.append('<br />');
140             }
141             if(flagVW)
142             {
143                 //promt.append(wallmessage);
144                 flagDouble = true;
145                 promt.append('<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime</p>');
146                 promt.append(wallForm);
147                 promt.append('<br />');
148             }
149
150                         
151             // var wimessage = '<p>SLA description</p><p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime</p>'
152
153             if(flagWi || flagVW){
154                 $('#sla_dialog').show();
155
156                     $('#slamodal-wilab2').modal('show');
157             }
158             else
159             {
160                 
161
162                 var username = e.data.options.username;
163                 var urn = data.value;
164                 // XXX check that the query is not disabled
165
166                 self.spin();
167                 // XXX check that the query is not disabled
168                 manifold.raise_event(self.options.query_uuid, RUN_UPDATE);
169                 return;
170             }
171                     
172                         $("#accept_sla_wilab2").click(function(){
173                             console.log("SLA ACCEPTED");
174                             console.log("With username: " + username);
175
176                             // var promt = $('#modal-body');
177                             // var notchecked = true;
178                             // for (var i=0;i<50;i++)
179                             // {
180                             //     var wielement = $('#wi'+i);
181                             //     var wallElement = $('#wall'+i);
182                             //     if(wielement != null && !wielement.checked)
183                             //     {
184                             //         notchecked = false;
185                             //     }
186                             //     if(wallElement!= null && !wallElement.checked)
187                             //     {
188                             //         notchecked = false;
189                             //     }
190                             // }
191             
192                                                        
193                                 if(flagDouble)
194                                 {
195                                     $.post("/sla/agreements/simplecreate", 
196                                         { "template_id": "iMindsServiceWiLab2",
197                                           "user": username,
198                                           "expiration_time": new Date().toISOString()
199                                        });
200                                      $.post("/sla/agreements/simplecreate", 
201                                         { "template_id": "iMindsServiceVirtualwall",
202                                           "user": username,
203                                           "expiration_time": new Date().toISOString()
204                                        });
205                             
206                                     $('#slamodal-wilab2').modal('hide');
207                                 accepted_sla["wilab2"] = true;
208                             
209                                 manifold.raise_event(self.options.query_uuid, RUN_UPDATE);
210                             }
211                             $('#modal-body').empty();
212                         }); 
213                     
214                         $("#dismiss_sla_wilab2").click(function(){
215                             console.log("SLA NOT ACCEPTED");
216                             $('#slamodal-wilab2').modal('hide');
217                             $('#modal-body').empty();
218                         }); 
219                 
220             // } else {
221             //     this.do_update(e);
222             // }
223
224             // for(var iter = 0; iter < arrayselectedresources.length; iter++){
225             //     var list = '<input type="checkbox" name="'+iter+'" >'+arrayselectedresources[iter].toLowerCase()+'<br>';
226             //     promt.append(list);
227             //     if (arrayselectedresources[iter].toLowerCase().indexOf("wall2") >= 0){
228
229
230                     
231             //         accepted_sla.push({"wall2":false});
232
233             //         $('#sla_dialog').show();
234             //         $('#slamodal-virtualwall').modal('show');
235                     
236                     
237             //             $("#accept_sla_vwall").click(function(){
238             //                 console.log("SLA ACCEPTED");
239             //                 console.log("With username: " + username);
240                         
241             //                 $.post("/sla/agreements/simplecreate", 
242             //                     { "template_id": "iMindsServiceVirtualwall",
243             //                       "user": username,
244             //                       "expiration_time": new Date()
245             //                     });
246                         
247             //                 $('#slamodal-virtualwall').modal('hide');
248             //                 accepted_sla["wall2"] = true;
249             //             }); 
250
251             //             $("#dismiss_sla_vwall").click(function(){
252             //                 console.log("SLA NOT ACCEPTED");
253             //                 $('#slamodal-vir').modal('hide');
254             //             }); 
255                     
256             //     }
257
258             //     if (arrayselectedresources[iter].toLowerCase().indexOf("wilab2") >= 0){
259
260             //         accepted_sla.push({"wilab2":false});
261
262             //         $('#sla_dialog').show();
263             //         $('#slamodal-wilab2').modal('show');
264                     
265                     
266             //             $("#accept_sla_wilab2").click(function(){
267             //                 console.log("SLA ACCEPTED");
268             //                 console.log("With username: " + username);
269                         
270             //                 $.post("/sla/agreements/simplecreate", 
271             //                     { "template_id": "iMindsServiceWiLab2",
272             //                       "user": username,
273             //                       "expiration_time": new Date()
274             //                     });
275                         
276             //                 $('#slamodal-wilab2').modal('hide');
277             //                 accepted_sla["wilab2"] = true;
278             //             }); 
279                     
280             //             $("#dismiss_sla_wilab2").click(function(){
281             //                 console.log("SLA NOT ACCEPTED");
282             //                 $('#slamodal-wilab2').modal('hide');
283             //             }); 
284                     
285
286             //     }
287
288             // }
289
290             // for(var sla in accepted_sla){
291             //     if(accepted_sla[sla] == true){
292             //         count += 1;
293             //     }
294             // }
295
296             // if(count == accepted_sla.length){
297             //     this.do_update(e);
298             // }
299         },
300
301      
302         do_update: function(e) {
303             var self = e.data;
304
305             var username = e.data.options.username;
306             var urn = data.value;
307             // XXX check that the query is not disabled
308
309             self.spin();
310             console.log("do_update");
311             // XXX check that the query is not disabled
312             //manifold.raise_event(self.options.query_uuid, RUN_UPDATE);
313
314             // how to stop the spinning after the event? 
315             // this should be triggered by some on_updatequery_done ?
316
317         },
318
319         // related buttons are also disabled in the html template
320         do_refresh: function(e)
321         {
322             throw 'resource_selected.do_refresh Not implemented';
323         },
324
325         do_reset: function(e)
326         {
327             throw 'queryupdater.do_reset Not implemented';
328         },
329
330         do_clear_annotations: function(e)
331         {
332             throw 'queryupdater.do_clear_annotations Not implemented';
333         },
334         
335         /************************** GUI MANIPULATION **************************/
336
337         
338         set_button_state: function(name, state)
339         {
340             this.elmt(name).attr('disabled', state ? false : 'disabled');
341         },
342
343         clear: function()
344         {
345
346         },
347
348         find_row: function(key)
349         {
350             // key in third position, column id = 2
351             var KEY_POS = 2;
352
353             var cols = $.grep(this.table.fnSettings().aoData, function(col) {
354                 return (col._aData[KEY_POS] == key);
355             } );
356
357             if (cols.length == 0)
358                 return null;
359             if (cols.length > 1)
360                 throw "Too many same-key rows in ResourceSelected plugin";
361
362             return cols[0];
363         },
364
365         set_state: function(data)
366         {
367             var action;
368             var msg;
369             var button = '';
370
371             var row;
372             
373             // make sure the change is visible : toggle on the whole plugin
374             // this might have to be made an 'auto-toggle' option of this plugin..
375             // also it might be needed to be a little finer-grained here
376
377         // XXX we don't want to show automaticaly the pending when a checkbox is checked
378             //this.toggle_on();
379
380             switch (data.status) {
381                 case STATE_SET_IN_PENDING:
382                     action = 'ADD';
383                     msg   = 'PENDING';
384                     button = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='" + data.key + "'/>";
385                     break;
386                 case STATE_SET_OUT_PENDING:
387                     action = 'REMOVE';
388                     msg   = 'PENDING';
389                     button = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='" + data.key + "'/>";
390                     break;
391                 case STATE_SET_IN:
392                 case STATE_SET_OUT:
393                     // find line and delete it
394                     // XXX Naming is incorrect for badge-pending !!!!
395                     // XXX What is this badge ?
396                     row = this.find_row(data.value);
397                     if (row)
398                         this.table.fnDeleteRow(row.nTr);
399                         /* indent was wrong !!
400                         $("#badge-pending").data('number', $("#badge-pending").data('number') - 1 );
401                         $("#badge-pending").text($("#badge-pending").data('number'));
402                         */
403                     return;
404                     break;  
405                 case STATE_SET_IN_SUCCESS:
406                 case STATE_SET_OUT_SUCCESS:
407                     msg   = 'SUCCESS';
408                     break;
409                 case STATE_SET_IN_FAILURE:
410                 case STATE_SET_OUT_FAILURE:
411                     msg   = 'FAILURE';
412                     break;
413                 case STATE_CHANGE:
414                     action = 'UPDATE';
415                     break;
416                 
417             }
418
419             var status = msg + status;
420
421             // find line
422             // if no, create it, else replace it
423             // XXX it's not just about adding lines, but sometimes removing some
424             // XXX how do we handle status reset ?
425
426             // Jordan : I don't understand this. I added this test otherwise we have string = ""..."" double quoted twice.
427             if (typeof(data.value) !== "string")
428                 data.value = JSON.stringify(data.value);
429             data.selected_resources = this.selected_resources;
430             row = this.find_row(data.value);
431             newline = [
432                 action,
433                 data.key,
434                 data.value,
435                 msg,
436                 button
437             ];
438             if (!row) {
439                 // XXX second parameter refresh = false can improve performance. todo in querytable also
440                 this.table.fnAddData(newline);
441                 row = this.find_row(data.value);
442                 /*
443                 $("#badge-pending").data('number', $("#badge-pending").data('number') + 1 );
444                 $("#badge-pending").text($("#badge-pending").data('number'));
445                 */
446             } else {
447                 // Update row text...
448                 this.table.fnUpdate(newline, row.nTr);
449             }
450
451             // Change cell color according to status
452             if (row) {
453                 $(row.nTr).removeClass('add remove')
454                 var cls = action.toLowerCase();
455                 if (cls)
456                     $(row.nTr).addClass(cls);
457             }
458         },
459
460         /*************************** QUERY HANDLER ****************************/
461
462         // NONE
463
464         /*************************** RECORD HANDLER ***************************/
465
466         on_new_record: function(record)
467         {
468
469             // if (not and update) {
470
471                 // initial['resource'], initial['lease'] ?
472                 this.initial.push(record);
473
474             //this.set_record_state(record, RECORD_STATE_ATTACHED);
475                 // We simply add to the table
476             // } else {
477                 //                 \ this.initial_resources
478                 //                  \
479                 // this.             \
480                 // current_resources  \    YES    |   NO
481                 // --------------------+----------+---------
482                 //       YES           | attached | added
483                 //       NO            | removed  |   /
484                 // 
485
486             // }
487         },
488
489         // QUERY STATUS
490         //                                      +-----------------+--------------+
491         //                                      v        R        |              |
492         // +-------+  ?G    +-------+        +-------+        +---+---+          |
493         // |       | -----> |       |  !G    |       |        |       |    DA    |
494         // |  ND   |        |  PG   | -----> |   D   | -----> |  PC   | <------+ |
495         // |       | <----- |       |  ~G    |       |   C    |       |        | | 
496         // +-------+   GE   +-------+        +-------+        +-------+      +------+
497         //                                       ^              ^  |         |      |
498         //                                       | DA        UE |  | ?U      | PCA  |
499         //                                       |              |  v         |      |
500         //                                   +-------+        +-------+      +------+
501         //                                   |       |   !U   |       |         ^
502         //                                   |  AD   | <----- |  PU   | --------+
503         //                                   |       |        |       |   ~U     
504         //                                   +-------+        +-------+          
505         //                                                                       
506         //
507         // LEGEND:
508         // 
509         // Plugins (i) receive state information, (ii) perform actions
510         //
511         // States:                                  Actions:
512         // ND : No data                             ?G : Get query
513         // PG : Pending Get                         !G : Get reply  
514         //  D : Data present                        ~G : Get partial reply
515         // PC : Pending changes                     GE : Get error                            
516         // PU : Pending update                       C : Change request
517         // PCA: Pending change with annotation       R : Reset request
518         // AD : Annotated data                      ?U : Update query
519         //                                          !U : Update reply
520         //                                          ~U : Update partial reply
521         //                                          UE : Update error            
522         //                                          DA : Delete annotation request
523         // NOTE:
524         // - D -> PU directly if the user chooses 'dynamic update'
525         // - Be careful for updates if partial Get success
526
527         // ND: No data == initialization state
528         
529         // PG : Pending get
530         // - on_query_in_progress
531         // NOTE: cannot distinguish get and update here. Is it important ?
532
533         on_query_in_progress: function()
534         {
535                 messages.debug("queryupdater.on_query_in_progress");
536             this.spin();
537         },
538
539         // D : Data present
540         // - on_clear_records (Get)
541         // - on_new_record (shared with AD) XXX
542         // - on_query_done
543         // NOTE: cannot distinguish get and update here. Is it important ?
544         // NOTE: Would record key be sufficient for update ?
545
546         on_clear_records: function()
547         {
548             this.clear();
549         },
550
551         on_query_done: function()
552         {
553             this.unspin();
554         },
555
556         // PC : Pending changes
557         // NOTE: record_key could be sufficient 
558         on_added_record: function(record)
559         {
560             this.set_record_state(record, RECORD_STATE_ADDED);
561             // update pending number
562         },
563
564         on_removed_record: function(record_key)
565         {
566             this.set_record_state(RECORD_STATE_REMOVED);
567         },
568
569         // PU : Pending update
570         // - on_query_in_progress (already done)
571         
572         // PCA : Pending change with annotation
573         // NOTE: Manifold will inform the plugin about updates, and thus won't
574         // call new record, even if the same channel UUID is used...
575         // - TODO on_updated_record
576         // - Key and confirmation could be sufficient, or key and record state
577         // XXX move record state to the manifold plugin API
578
579         on_field_state_changed: function(result)
580         {
581             if(result.request == FIELD_REQUEST_ADD){
582                 this.selected_resources.push(result.value);
583             } else if(result.request == FIELD_REQUEST_REMOVE_RESET){
584                 var i = this.selected_resources.indexOf(result.value);
585                 if(i != -1){
586                     this.selected_resources.splice(i,1);
587                 }
588             }
589             messages.debug(result)
590
591             this.set_state(result);
592         },
593
594         // XXX we will have the requests for change
595         // XXX + the requests to move into the query cycle = the buttons aforementioned
596
597         // XXX what happens in case of updates ? not implemented yet
598         // XXX we want resources and leases
599         // listen for SET_ADD and SET_REMOVE for slice query
600
601         /************************** PRIVATE METHODS ***************************/
602
603         _close_click: function(e)
604         {
605             var self = e.data;
606
607             //jQuery.publish('selected', 'add/'+key_value);
608             // this.parentNode is <td> this.parentNode.parentNode is <tr> 
609             // this.parentNode.parentNode.firstChild is the first cell <td> of this line <tr>
610             // this.parentNode.parentNode.firstChild.firstChild is the text in that cell
611             //var firstCellVal=this.parentNode.parentNode.firstChild.firstChild.data;
612             var remove_urn = this.id; 
613             var current_resources = event.data.instance.current_resources;
614             var list_resources = $.grep(current_resources, function(x) {return x.urn != remove_urn});
615             //jQuery.publish('selected', 'cancel/'+this.id+'/'+unfold.get_value(firstCellVal));
616             $.publish('/update-set/' + event.data.instance.options.resource_query_uuid, [list_resources, true]);
617         },
618
619         /******************************** TODO ********************************/
620
621         update_resources: function(resources, change)
622         {
623             messages.debug("update_resources");
624             var my_oTable = this.table.dataTable();
625             var prev_resources = this.current_resources; 
626
627             /*
628              * The first time the query is advertised, don't do anything.  The
629              * component will learn nodes in the slice through the manifest
630              * received through the other subscription 
631              */
632              if (!change)
633                 return;
634              // ioi: Refubrished
635              var initial = this.initial;
636              //var r_removed  = []; //
637              /*-----------------------------------------------------------------------
638                 TODO: remove this dirty hack !!!
639              */
640              resources = jQuery.map(resources, function(x){
641                 if(!('timeslot' in x)){x.timeslot=0;}
642                 return x;
643              });
644              /*
645                 TODO: handle generic keys instead of specific stuff
646                       ex: urn
647                           urn-lease
648              */
649              var initial_urn = $.map(initial, function(x){return x.urn;});
650              var resources_urn = $.map(resources, function(x){return x.urn;});
651              var r_removed = $.grep(initial, function (x) { return $.inArray(x.urn, resources_urn) == -1 });
652              var r_attached = $.grep(initial, function (x) { return $.inArray(x.urn, resources_urn) > -1 });
653              var r_added = $.grep(resources, function (x) { return $.inArray(x.urn, initial_urn) == -1 });
654              exists = false; // ioi
655              /*-----------------------------------------------------------------------*/
656
657              my_oTable.fnClearTable();
658              /*
659                 TODO: factorization of this code !!!
660              */
661              $.each(r_added, function(i, r) { 
662                 //var type = (typeof initial == 'undefined' || r.node != initial.node) ? 'add' : 'attached';
663                 var type = 'add';  
664                 // Create the resource objects
665                 // ioi: refubrished
666                 var urn = r.urn;
667                 time = r.timeslot;
668                               
669                 var SPAN = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='"+urn+"'/>";
670                 var slot = "<span id='resource_"+urn+"'>" + time + "</span>"; //ioi
671                 // ioi
672                 var newline=Array();
673                 newline.push(type, urn, slot, SPAN); // ioi
674                 var line = my_oTable.fnAddData(newline);
675                 var nTr = my_oTable.fnSettings().aoData[ line[0] ].nTr;
676                 nTr.className = type;
677              });
678              $.each(r_attached, function(i, r) {  
679                 //var type = (typeof initial == 'undefined' || r.node != initial.node) ? 'add' : 'attached';
680                 var type = 'attached';
681                 // Create the resource objects
682                 // ioi: refubrished
683                 var node = r.urn;
684                 time = r.timeslot;
685
686                 var SPAN = "<span class='glyphicon glyphicon-renomve ResourceSelectedClose' id='"+node+"'/>";
687                 var slot = "<span id='resource_"+node+"'>" + time + "</span>"; //ioi
688                 // ioi
689                 var newline=Array();
690                 newline.push(type, node, slot, SPAN); // ioi
691                 var line = my_oTable.fnAddData(newline);
692                 var nTr = my_oTable.fnSettings().aoData[ line[0] ].nTr;
693                 nTr.className = type;
694              });
695              $.each(r_removed, function(i, r) { 
696                 // The list contains objects
697                 // ioi: refubrished
698                 var node = r.urn;
699                 var time = r.timeslot;
700                     
701                 var SPAN = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='"+node+"'/>";
702                 var slot = "<span id='resource_"+node+"'>" + time + "</span>";
703                 // ioi
704                 var newline=Array();
705                 newline.push('remove', node, slot, SPAN); // ioi
706                 var line = my_oTable.fnAddData(newline);
707                 var nTr = my_oTable.fnSettings().aoData[ line[0] ].nTr;
708                 nTr.className = 'remove';
709              });
710
711              this.current_resources = $.merge(r_attached,r_added);
712
713              /* Allow the user to update the slice */
714              //jQuery('#updateslice-' + data.ResourceSelected.plugin_uuid).prop('disabled', false);
715
716         }, // update_resources
717
718     });
719
720     $.plugin('QueryUpdaterPlugin', QueryUpdaterPlugin);
721
722 })(jQuery);