Changeset a0d701 in indico


Ignore:
Timestamp:
03/31/11 18:27:43 (2 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
9705e3
Parents:
e3b5ce
git-author:
Alexis Castilla Hernandez <alexis.castilla.hernandez@…> (03/23/11 14:17:54)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (03/31/11 18:27:43)
Message:

[FIX] Move contribution

  • Fixed unexpected exception trying to move a contribution with no sessions availables
Location:
indico/MaKaC/webinterface
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/rh/contribMod.py

    r933d9d ra0d701  
    15191519        RHContribModifBaseSpecialSesCoordRights._checkParams(self, params) 
    15201520        self._dest = params["Destination"] 
     1521        if self._dest == "--no-sessions--": 
     1522            raise MaKaCError( _("Undefined destination for the contribution.")) 
    15211523 
    15221524    def _process(self): 
  • indico/MaKaC/webinterface/tpls/ConfReviewingAssignContributions.tpl

    r5caf3d ra0d701  
    943943        switch(action) { 
    944944        case 'assign_referee': 
    945                 var killProgress = IndicoUI.Dialogs.Util.progress(); 
     945            var killProgress = IndicoUI.Dialogs.Util.progress(); 
    946946            indicoRequest( 
    947947                'reviewing.conference.assignReferee', 
     
    960960                        killProgress(); 
    961961                    } else { 
    962                         killProgress(); 
     962                        killProgress(); 
    963963                        IndicoUtil.errorReport(error); 
    964964                    } 
     
    968968 
    969969        case 'assign_editor': 
    970                 var killProgress = IndicoUI.Dialogs.Util.progress(); 
     970            var killProgress = IndicoUI.Dialogs.Util.progress(); 
    971971            indicoRequest( 
    972972                'reviewing.conference.assignEditor', 
     
    985985                        killProgress(); 
    986986                    } else { 
    987                         killProgress(); 
     987                        killProgress(); 
    988988                        IndicoUtil.errorReport(error); 
    989989                    } 
     
    993993 
    994994        case 'add_reviewer': 
    995                 var killProgress = IndicoUI.Dialogs.Util.progress(); 
     995            var killProgress = IndicoUI.Dialogs.Util.progress(); 
    996996            indicoRequest( 
    997997                'reviewing.conference.addReviewer', 
     
    10211021                        killProgress(); 
    10221022                    } else { 
    1023                         killProgress(); 
     1023                        killProgress(); 
    10241024                        IndicoUtil.errorReport(error); 
    10251025                    } 
     
    12311231                       } 
    12321232                       if (!result.length) 
    1233                            var content = Html.div({style:{textAlign:'center', paddingBottom:'10px'}}, $T("No ") + role + $T("s proposed for this conference. ")); 
     1233                           var content = Html.div({style:{textAlign:'center', paddingBottom:'10px'}}, $T("No ") + role + " " + $T("in the reviewing team yet. Please, assign them from the 'Team' tab.")); 
    12341234                       else 
    12351235                           var content = userList; 
     
    12861286                                    var attributes = $L(); 
    12871287                                    var attributeTemplate = function(att){ 
    1288                                                 var li = Html.li({style:{listStyleType:"none", paddingBottom:'3px'}}); 
    1289                                                 var id = (att.id); 
    1290                                                 var name = ("selected"+attribute); 
    1291                                                 var checkbox = Html.input('checkbox', {id: id, name: name}); 
    1292                                                 var attributeName = Html.span({style:{marginLeft:'5px', fontSize: '13px'}}, att.title); 
    1293  
    1294                                                 li.set(Widget.inline([checkbox, attributeName])); 
    1295  
    1296                                                 return li; 
     1288                                        var li = Html.li({style:{listStyleType:"none", paddingBottom:'3px'}}); 
     1289                                        var id = (att.id); 
     1290                                        var name = ("selected"+attribute); 
     1291                                        var checkbox = Html.input('checkbox', {id: id, name: name}); 
     1292                                        var attributeName = Html.span({style:{marginLeft:'5px', fontSize: '13px'}}, att.title); 
     1293 
     1294                                        li.set(Widget.inline([checkbox, attributeName])); 
     1295 
     1296                                        return li; 
    12971297                                    } 
    1298                                         var step1 = Html.span({style:{fontSize:'18px'}, className:'groupTitle groupTitleNoBorder'}, 'Step 1: Choose a '+ attribute); 
    1299                                         var attList = Html.ul(); 
    1300                                         bind.element(attList, attributes, attributeTemplate); 
     1298                                    var step1 = Html.span({style:{fontSize:'18px'}, className:'groupTitle groupTitleNoBorder'}, 'Step 1: Choose a '+ attribute); 
     1299                                    var attList = Html.ul(); 
     1300                                    bind.element(attList, attributes, attributeTemplate); 
    13011301                                    if(result.length==0) { 
    13021302                                        var killProgress = IndicoUI.Dialogs.Util.progress() 
     
    13051305                                        alert('There is no '+attribute+' define.'); 
    13061306                                    } 
    1307                                         for (i in result) { 
    1308                                         attributes.append(result[i]); 
    1309                                         } 
     1307                                    for (i in result) { 
     1308                                    attributes.append(result[i]); 
     1309                                    } 
    13101310 
    13111311                                    AttributeDiv.set(Widget.block([step1,attList])); 
     
    13431343                                                    } 
    13441344                                                    if ((order == 'assign' && role == 'editor') || (order == 'add' && role == 'reviewer')) { 
    1345                                                                                                                 <% if not (ConfReview.getChoice() == CPR.LAYOUT_REVIEWING or ConfReview.getChoice() == CPR.NO_REVIEWING): %> 
    1346                                                                                                                     if (!checkAllHaveReferee(contrPerAttribute, order, role, true)) { 
    1347                                                                                                                         return; 
    1348                                                                                                                     } 
    1349                                                                                                                 <% end %> 
    1350                                                                                                            } 
     1345                                                            <% if not (ConfReview.getChoice() == CPR.LAYOUT_REVIEWING or ConfReview.getChoice() == CPR.NO_REVIEWING): %> 
     1346                                                                if (!checkAllHaveReferee(contrPerAttribute, order, role, true)) { 
     1347                                                                    return; 
     1348                                                                } 
     1349                                                            <% end %> 
     1350                                                       } 
    13511351                                                    userSelected(user, contrPerAttribute); 
    13521352                                            } 
     
    13851385                                    alert($T('You must select at least one attribute.')); 
    13861386                                } else { 
    1387                                         var checkedBtn = function(){ 
    1388                                                 var allBtn = document.getElementsByName('radioBtn'); 
    1389                                                     for (var i=0; i<allBtn.length; i++) { 
    1390                                                         var cb = allBtn[i]; 
    1391                                                         if (cb.checked) { 
    1392                                                            return cb.id 
    1393                                                         } 
    1394                                                     } 
    1395                                            } 
    1396                                            var checkedBtnId = checkedBtn(); 
    1397                                            if(checkedBtnId == null){ 
    1398                                                alert($T('You must select at least one user.')); 
    1399                                            } else { 
    1400                                                                            for (var i=0; i < users.length.get(); i++) { 
    1401                                                                                user = users.item(i); 
    1402                                                                                if (user.id == checkedBtnId) { 
    1403                                                                                    contributionsIdList(user, chAtt); 
    1404                                                                                } 
    1405                                                                            } 
    1406                                                var killProgress = IndicoUI.Dialogs.Util.progress() 
    1407                                                popup.close(); 
    1408                                                killProgress(); 
    1409                                        } 
     1387                                    var checkedBtn = function(){ 
     1388                                        var allBtn = document.getElementsByName('radioBtn'); 
     1389                                        for (var i=0; i<allBtn.length; i++) { 
     1390                                            var cb = allBtn[i]; 
     1391                                            if (cb.checked) { 
     1392                                               return cb.id 
     1393                                            } 
     1394                                        } 
     1395                                   } 
     1396                                   var checkedBtnId = checkedBtn(); 
     1397                                   if(checkedBtnId == null){ 
     1398                                       alert($T('You must select at least one user.')); 
     1399                                   } else { 
     1400                                       for (var i=0; i < users.length.get(); i++) { 
     1401                                           user = users.item(i); 
     1402                                           if (user.id == checkedBtnId) { 
     1403                                               contributionsIdList(user, chAtt); 
     1404                                           } 
     1405                                       } 
     1406                                       var killProgress = IndicoUI.Dialogs.Util.progress() 
     1407                                       popup.close(); 
     1408                                       killProgress(); 
     1409                                   } 
    14101410                                } 
    14111411                            }); 
     
    14191419                     if (!result.length) { 
    14201420                         divButtons.append(cancelButton); 
    1421                          var content = Html.div({style:{textAlign:'center', paddingBottom:'10px'}}, $T("No ") + role + $T("s proposed for this conference. ")); 
     1421                         var content = Html.div({style:{textAlign:'center', paddingBottom:'10px'}}, $T("No ") + role + " " + $T("in the reviewing team yet. Please, assign them from the 'Team' tab.")); 
    14221422                         return this.ExclusivePopup.prototype.draw.call(this, Html.div({style: {height: 'auto', width: 'auto'}},Widget.block([content, divButtons]))); 
    14231423                     } 
     
    15471547 
    15481548$E('applyFilter').observeClick(function(){ 
    1549         $E('filteringTable').dom.style.display = 'none'; 
    1550         buildShowHideFiltering(); 
     1549    $E('filteringTable').dom.style.display = 'none'; 
     1550    buildShowHideFiltering(); 
    15511551    appliedFilter = true; 
    15521552    fetchContributions(); 
  • indico/MaKaC/webinterface/tpls/ContributionMove.tpl

    r9ac2af7 ra0d701  
    77            <table align="center" width="100%"> 
    88                <tr> 
    9                                         <form style="padding:0px;margin:0px;" action="<%= moveURL %>" method="POST"> 
     9                    <form style="padding:0px;margin:0px;" action="<%= moveURL %>" method="POST"> 
    1010                    <td align="center"> 
    1111                        <input name="confId" type="hidden" value="<%= confId %>"> 
     
    1313                        <%= _("Move this contribution to the")%> : 
    1414                        <select name="Destination" size="1" > 
    15                           <%= sessionList %> 
     15                          <% if sessionList == "": %> 
     16                            <option value="--no-sessions--"> <%= _("--no sessions--") %></option> 
     17                          <% end %> 
     18                          <% else: %> 
     19                            <%= sessionList %> 
     20                          <% end %> 
    1621                        </select> 
    1722                    </td> 
     
    1924                <tr> 
    2025                    <td align="left" width="100%"> 
    21                                                 <table align="left" valign="bottom" cellspacing="0" cellpadding="0"> 
    22                                                         <tr> 
    23                                                                 <td align="left" valign="bottom"> 
    24                                                                         <input type="submit" class="btn" value="<%= _("move")%>"> 
    25                                                                         </form> 
    26                                                                 </td> 
    27                                                                 <td align="left" valign="bottom"> 
    28                                                                         <form style="padding:0px;margin:0px;" action="<%= cancelURL %>" method="POST"> 
    29                                                                           <input type="submit" class="btn" value="<%= _("cancel")%>"> 
    30                                                                 </td> 
    31                                                         </tr> 
    32                                                 </table> 
     26                        <table align="left" valign="bottom" cellspacing="0" cellpadding="0"> 
     27                            <tr> 
     28                                <td align="left" valign="bottom"> 
     29                                    <input id="moveButton" type="submit" class="btn" value="<%= _("move")%>"> 
     30                                    </form> 
     31                                </td> 
     32                                <td align="left" valign="bottom"> 
     33                                    <form style="padding:0px;margin:0px;" action="<%= cancelURL %>" method="POST"> 
     34                                      <input type="submit" class="btn" value="<%= _("cancel")%>"> 
     35                                </td> 
     36                            </tr> 
     37                        </table> 
    3338                    </td> 
    34                                         </form> 
     39                    </form> 
    3540                </tr> 
    3641            </table> 
     
    3944</table> 
    4045<br> 
     46<script> 
     47$E("moveButton").dom.disabled = (sessionList == ""); 
     48</script> 
Note: See TracChangeset for help on using the changeset viewer.