Changeset 6e2ea5 in indico


Ignore:
Timestamp:
06/08/10 11:33: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:
fa6855
Parents:
7a718e
git-author:
Pedro Ferreira <jose.pedro.ferreira@…> (06/01/10 12:27:42)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (06/08/10 11:33:35)
Message:

[FIX] Vidyo: Allow creation of only one booking

  • Error message otherwise;
  • Added entension point that allows pre-check before opening booking dialog;
Location:
indico
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/plugins/Collaboration/Vidyo/tpls/Main.js

    r9ea55a r6e2ea5  
    174174    }, 
    175175 
     176    beforeCreate: function(pluginName, conferenceId) { 
     177        var allowCreation = true; 
     178        each(bookings, function(booking) { 
     179            if (booking.type == 'Vidyo') { 
     180                allowCreation = false; 
     181            } 
     182        }); 
     183 
     184        if (!allowCreation) { 
     185            CSErrorPopup($T("Whoops..."), 
     186                         [Html.unescaped.div({}, 
     187                                   $T("There is already a Vidyo booking present. " + 
     188                                      "Right now it is only possible to create " + 
     189                                      "<strong>a single Vidyo booking per event</strong>. " + 
     190                                      "Please delete it if you want to create a new one."))]); 
     191        } 
     192 
     193        return allowCreation; 
     194    }, 
     195 
    176196    postCreate: function(booking) { 
    177197    }, 
  • indico/htdocs/css/Default.css

    r7494a5 r6e2ea5  
    38163816 
    38173817.errorList { 
    3818     color: #881122; 
     3818    width: 400px; 
    38193819} 
    38203820 
  • indico/htdocs/js/indico/Collaboration/Collaboration.js

    r476098 r6e2ea5  
    12231223 */ 
    12241224var createBooking = function(pluginName, conferenceId) { 
     1225    // Code that has to be executed before the dialog is presented 
     1226    if (pluginHasFunction(pluginName, "beforeCreate")) { 
     1227        // let the function define whether we're going to draw the 
     1228        // dialog or not 
     1229        if (!codes[pluginName].beforeCreate(pluginName, conferenceId)) { 
     1230            return false; 
     1231        } 
     1232    } 
    12251233 
    12261234    var popup = new BookingPopup('create', pluginName, null, conferenceId); 
    12271235    popup.open(); 
     1236 
    12281237    if (pluginHasFunction(pluginName, "onCreate")) { 
    12291238        codes[pluginName].onCreate(popup); 
    12301239    } 
    12311240    popup.postDraw(); 
     1241 
     1242    return true; 
    12321243} 
    12331244 
  • indico/htdocs/js/indico/Core/Dialogs/Popup.js

    r0009bb r6e2ea5  
    571571             var errorList = null; 
    572572             if (this.errors.length == 1) { 
    573                  errorList = Html.span({className:"errorList"}, this.errors[0]); 
     573                 errorList = Html.div({className:"errorList"}, this.errors[0]); 
    574574             }else{ 
    575575                 errorList = Html.ul("errorList"); 
Note: See TracChangeset for help on using the changeset viewer.