Changeset 032d31 in indico


Ignore:
Timestamp:
08/12/10 14:06:35 (3 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, new-webex, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
de2a21
Parents:
90bdb9
git-author:
Leszek Syroka <leszek.marek.syroka@…> (07/15/10 16:37:02)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (08/12/10 14:06:35)
Message:

[FIX] Collaboration plugin adding rooms

  • there is a possibility to pass a callback function to indicoSource to enhance code synchronization
  • rooms in collaboration plugin can be now added
  • fix#475
Location:
indico
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/tpls/AdminPluginsOptionList.tpl

    r4ea0cf r032d31  
    7575                    <div id="roomAddButton"></div> 
    7676                    <script type="text/javascript"> 
     77                        var callback = function(){ 
     78                            $E('roomChooser').set(roomChooser.draw(),addRoomButton); 
     79                        } 
     80 
    7781                        var removeRoomHandler = function (roomToRemove,setResult){ 
    7882                            indicoRequest( 
     
    102106                        <% if rbActive: %> 
    103107 
    104                             var roomChooser = new SelectRemoteWidget('roomBooking.locationsAndRooms.list', {}) 
     108                            var roomChooser = new SelectRemoteWidget('roomBooking.locationsAndRooms.list', {}, callback); 
    105109                            var addRoomButton = Html.input("button", {style:{marginRight: pixels(5)}}, $T('Add Room') ); 
    106110                            addRoomButton.observeClick( 
     
    121125                                    ); 
    122126                            }); 
    123                             $E('roomChooser').set(roomChooser.draw(),addRoomButton); 
    124127                            $E('roomAddButton').set(); 
    125128                        <% end %> 
  • indico/htdocs/js/indico/Core/Widgets/Inline.js

    r4ea0cf r032d31  
    6565      * server automatically? 
    6666      */ 
    67      function(method, attributes, loadOnStartup) { 
     67     function(method, attributes, loadOnStartup, callback) { 
    6868         loadOnStartup = exists(loadOnStartup)?loadOnStartup:true; 
    6969         this.ready = new WatchValue(); 
    7070         this.ready.set(false); 
    7171         this.loadOnStartup = loadOnStartup; 
    72          this.source = indicoSource(method, attributes, null, !loadOnStartup); 
     72         this.source = indicoSource(method, attributes, null, !loadOnStartup, callback); 
    7373     }); 
    7474 
     
    427427 
    428428     }, 
    429      function(method, args) { 
     429     function(method, args, callback) { 
    430430         this.options = new WatchObject(); 
    431431         this.select = Html.select({}); 
    432432         this.selected = new WatchValue(); 
    433433         // Load data source on startup 
    434          this.InlineRemoteWidget(method, args, true); 
     434         this.InlineRemoteWidget(method, args, true, callback); 
     435         this.loadOnStartup = false; 
    435436     }); 
    436437 
  • indico/htdocs/js/presentation/Data/Remote.js

    reb7c79 r032d31  
    113113 * @return {WatchAccessor} value 
    114114 */ 
    115 function jsonRpcValue(url, method, params, def, dontStart) { 
     115function jsonRpcValue(url, method, params, def, dontStart, callback) { 
    116116        // not an object for url... curry 
    117117        var self = new Source(); 
     
    132132                                error: null 
    133133                        }); 
     134 
     135                        if(callback) { 
     136                            callback(); 
     137                        } 
    134138                } 
    135139        } 
Note: See TracChangeset for help on using the changeset viewer.