Changeset 42c6b7 in indico
- Timestamp:
- 10/04/10 17:17:57 (3 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
- Children:
- 843219
- Parents:
- 2d4003
- git-author:
- csvetelina.angelova@…> (03/25/10 14:11:27)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (10/04/10 17:17:57)
- Location:
- indico
- Files:
-
- 6 edited
-
MaKaC/services/implementation/reviewing.py (modified) (2 diffs)
-
MaKaC/webinterface/tpls/ConfModificationReviewingFrame.tpl (modified) (1 diff)
-
MaKaC/webinterface/tpls/ConfModificationReviewingFramePRM.tpl (modified) (3 diffs)
-
MaKaC/webinterface/tpls/ConfModificationReviewingSettings.tpl (modified) (1 diff)
-
MaKaC/webinterface/tpls/ConfReviewingAssignContributions.tpl (modified) (22 diffs)
-
htdocs/js/indico/Core/Dialogs/Popup.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/services/implementation/reviewing.py
rac1609 r42c6b7 430 430 431 431 432 class ConferenceReviewingContributionsAttributeList(ListModificationBase, ConferenceReviewingPRMRefereeBase): 433 #Note: don't change the order of the inheritance here! 434 """ Class to return all the tracks or sessions or types of the conference 435 """ 436 def _checkParams(self): 437 ConferenceReviewingPRMRefereeBase._checkParams(self) 438 self._attribute = self._params.get("attribute", None) 439 if self._attribute is None: 440 raise ServiceError("ERR-REV5",_("No type/session/track specified")) 441 442 def _handleGet(self): 443 attributes = [] 444 for c in self._conf.getContributionList(): 445 if self._attribute == 'type': 446 if c.getType() is not None and c.getType() not in attributes: 447 attributes.append(c.getType()) 448 elif self._attribute == 'track': 449 if c.getTrack() is not None and c.getTrack() not in attributes: 450 attributes.append(c.getTrack()) 451 elif self._attribute == 'session': 452 if c.getSession() is not None and c.getSession() not in attributes: 453 attributes.append(c.getSession()) 454 else: 455 raise ServiceError("ERR-REV5",_("No attribute specified")) 456 457 if self._attribute == 'type': 458 return [{"id": attribute.getId(), "title": attribute.getName()} 459 for attribute in attributes] 460 else: 461 return [{"id": attribute.getId(), "title": attribute.getTitle()} 462 for attribute in attributes] 463 464 class ConferenceReviewingContributionsPerSelectedAttributeList(ListModificationBase, ConferenceReviewingPRMRefereeBase): 465 #Note: don't change the order of the inheritance here! 466 """ Class to return all the contributions ids for the selected track/session/type of the conference 467 """ 468 def _checkParams(self): 469 ConferenceReviewingPRMRefereeBase._checkParams(self) 470 self._attribute = self._params.get("attribute", None) 471 if self._attribute is None: 472 raise ServiceError("ERR-REV5",_("No type/session/track specified")) 473 self._selectedAttribute = self._params.get("selectedAttributes", None) 474 if self._selectedAttribute is None: 475 raise ServiceError("ERR-REV5",_("No attribute specified")) 476 477 def _handleGet(self): 478 contributionsPerSelectedAttribute = [] 479 for c in self._conf.getContributionList(): 480 for att in self._selectedAttribute: 481 if self._attribute == 'type': 482 if c.getType() is not None and c.getId() not in contributionsPerSelectedAttribute: 483 if c.getType().getId() == att: 484 contributionsPerSelectedAttribute.append(c.getId()) 485 elif self._attribute == 'track': 486 if c.getTrack() is not None and c.getId() not in contributionsPerSelectedAttribute: 487 if c.getTrack().getId() == att: 488 contributionsPerSelectedAttribute.append(c.getId()) 489 elif self._attribute == 'session': 490 if c.getSession() is not None and c.getId() not in contributionsPerSelectedAttribute: 491 if c.getSession().getId() == att: 492 contributionsPerSelectedAttribute.append(c.getId()) 493 else: 494 raise ServiceError("ERR-REV5",_("No attribute specified")) 495 496 497 return contributionsPerSelectedAttribute 498 499 432 500 class ConferenceReviewingUserCompetenceList(ListModificationBase, ConferenceReviewingPRMRefereeBase): 433 501 #Note: don't change the order of the inheritance here! … … 849 917 "conference.changeAbstractReviewerDefaultDueDate" : ConferenceAbstractReviewingDefaultDueDateModification, 850 918 "conference.changeReviewableMaterials" : ConferenceReviewingReviewableMaterialsModification, 919 "conference.attributeList" : ConferenceReviewingContributionsAttributeList, 920 "conference.contributionsIdPerSelectedAttribute" : ConferenceReviewingContributionsPerSelectedAttributeList, 851 921 "conference.userCompetencesList": ConferenceReviewingUserCompetenceList, 852 922 -
indico/MaKaC/webinterface/tpls/ConfModificationReviewingFrame.tpl
r5b4690 r42c6b7 2 2 <% from MaKaC.common.PickleJar import DictPickler %> 3 3 4 <% if ConfReview.hasReviewing(): %> 4 5 5 <table width="85%%" align="center" border="0"> 6 <tr> 6 7 <td id="revControlRefereeEditorReviewerHelp" colspan="3" class="groupTitle" style="padding-top: 15px; padding-bottom: 15px;"> 7 8 <%= _("Step 2: Assign Reviewers")%> 8 9 </td> 9 10 </tr> 11 <% if not ConfReview.hasReviewing(): %> 12 <tr> 13 <td> 14 <p style="padding-left: 25px;"><font color="gray"><%= _("Type of reviewing has not been chosen yet.")%></font></p> 15 </td> 16 </tr> 17 <% end %> 18 <% else: %> 10 19 <tr> 11 20 <td> 12 21 <% if ConfReview.getEnableRefereeEmailNotif() or ConfReview.getEnableEditorEmailNotif() or ConfReview.getEnableReviewerEmailNotif(): %> 13 22 <div style="padding-top: 10px; padding-bottom: 15px;"> 14 <em><%=_("An automatically generated e-mail will be sen d to the Reviewers you will assign")%></em><br>15 <em><%= _("You can modify this from the Paper Reviewing Setup ")%></em>23 <em><%=_("An automatically generated e-mail will be sent to newly assigned Reviewers.")%></em><br> 24 <em><%= _("You can modify this from the Paper Reviewing Setup.")%></em> 16 25 </div> 17 26 <% end %> -
indico/MaKaC/webinterface/tpls/ConfModificationReviewingFramePRM.tpl
rac1609 r42c6b7 2 2 <% from MaKaC.common.PickleJar import DictPickler %> 3 3 4 <% if not ConfReview.hasReviewing(): %> 5 <p style="padding-left: 25px;"><font color="gray"><%= _("Type of reviewing has not been chosen yet")%></font></p> 6 <% end %> 7 <%else:%> 4 8 5 <br> 9 6 <table width="85%%" align="center" border="0"> … … 15 12 <% if ConfReview.getEnablePRMEmailNotif(): %> 16 13 <div style="padding-top: 10px; padding-bottom: 15px;"> 17 <em><%=_("An automatically generated e-mail will be sen d to the Paper Review Managers you will assign")%></em><br>18 <em><%= _("You can modify this from the Paper Reviewing Setup ")%></em>14 <em><%=_("An automatically generated e-mail will be sent to newly assigned Paper Review Managers.")%></em><br> 15 <em><%= _("You can modify this from the Paper Reviewing Setup.")%></em> 19 16 </div> 20 17 <% end %> … … 72 69 $E('PRMList').set(uf.draw()) 73 70 </script> 74 <% end %> -
indico/MaKaC/webinterface/tpls/ConfModificationReviewingSettings.tpl
rff41f72 r42c6b7 11 11 </td> 12 12 </tr> 13 <em><%= _("Please, follow the steps to set up the Paper Reviewing Module")%></em>13 <em><%= _("Please, follow these steps to set up the Paper Reviewing Module")%></em> 14 14 </table> 15 15 -
indico/MaKaC/webinterface/tpls/ConfReviewingAssignContributions.tpl
r2cc959 r42c6b7 111 111 <td><%= _("Referee")%>:</td> 112 112 <td id="assignRefereeHelp"> 113 <input id="assignRefereeButton_top" type="button" class="popUpButton" value="Assign"> 114 <input id="removeRefereeButton_top" type="button" class="popUpButton" value="Remove"> 113 <a id="assignRefereeButton_top" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign")%></a>| 114 <span id="assignMenu_referee_top" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"> 115 <a id="assignRefereePerTrackButton_top" class="dropDownMenu fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign per ...")%> 116 </a> 117 </span>| 118 <a id="removeRefereeButton_top" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Remove")%></a> 115 119 </td> 116 120 </tr> … … 120 124 <td><%= _("Layout Reviewer")%>:</td> 121 125 <td id="assignEditorHelp"> 122 <input id="assignEditorButton_top" type="button" class="popUpButton" value="Assign"> 123 <input id="removeEditorButton_top" type="button" class="popUpButton" value="Remove"> 126 <a id="assignEditorButton_top" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign")%></a>| 127 <span id="assignMenu_editor_top" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"> 128 <a id="assignEditorPerTrackButton_top" class="dropDownMenu fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign per ...")%> 129 </a> 130 </span>| 131 <a id="removeEditorButton_top" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Remove")%></a> 124 132 </td> 125 133 </tr> … … 129 137 <td><%= _("Content Reviewers")%>:</td> 130 138 <td id="assignReviewerHelp"> 131 <input id="addReviewerButton_top" type="button" class="popUpButton" value="Assign"> 132 <input id="removeReviewerButton_top" type="button" class="popUpButton" value="Remove"> 133 <input id="removeAllReviewersButton_top" type="button" class="popUpButton" value="Remove All"> 139 <a id="addReviewerButton_top" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign")%></a>| 140 <span id="assignMenu_reviewer_top" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"> 141 <a id="assignReviewerPerTrackButton_top" class="dropDownMenu fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign per ...")%> 142 </a> 143 </span>| 144 <a id="removeReviewerButton_top" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Remove")%></a>| 145 <a id="removeAllReviewersButton_top" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Remove All")%> 134 146 </td> 135 147 </tr> … … 284 296 <td><%= _("Referee")%>:</td> 285 297 <td id="assignRefereeHelp"> 286 <input id="assignRefereeButton_bottom" type="button" class="popUpButton" value="Assign"> 287 <input id="removeRefereeButton_bottom" type="button" class="popUpButton" value="Remove"> 298 <a id="assignRefereeButton_bottom" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign")%></a>| 299 <span id="assignMenu_referee_bottom" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"> 300 <a id="assignRefereePerTrackButton_top" class="dropDownMenu fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign per ...")%> 301 </a> 302 </span>| 303 <a id="removeRefereeButton_bottom" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Remove")%></a> 288 304 </td> 289 305 </tr> 290 306 <% end %> 291 <% if not (ConfReview.getChoice() == 2 or ConfReview.getChoice() == 1):%>307 <%if not (ConfReview.getChoice() == 2 or ConfReview.getChoice() == 1):%> 292 308 <tr> 293 309 <td><%= _("Layout Reviewer")%>:</td> 294 310 <td id="assignEditorHelp"> 295 <input id="assignEditorButton_bottom" type="button" class="popUpButton" value="Assign"> 296 <input id="removeEditorButton_bottom" type="button" class="popUpButton" value="Remove"> 311 <a id="assignEditorButton_bottom" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign")%></a>| 312 <span id="assignMenu_editor_bottom" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"> 313 <a id="assignEditorPerTrackButton_bottom" class="dropDownMenu fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign per ...")%> 314 </a> 315 </span>| 316 <a id="removeEditorButton_bottom" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Remove")%></a> 297 317 </td> 298 318 </tr> … … 302 322 <td><%= _("Content Reviewers")%>:</td> 303 323 <td id="assignReviewerHelp"> 304 <input id="addReviewerButton_bottom" type="button" class="popUpButton" value="Assign"> 305 <input id="removeReviewerButton_bottom" type="button" class="popUpButton" value="Remove"> 306 <input id="removeAllReviewersButton_bottom" type="button" class="popUpButton" value="Remove All"> 324 <a id="addReviewerButton_bottom" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign")%></a>| 325 <span id="assignMenu_reviewer_bottom" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"> 326 <a id="assignReviewerPerTrackButton_bottom" class="dropDownMenu fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Assign per ...")%> 327 </a> 328 </span>| 329 <a id="removeReviewerButton_bottom" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Remove")%></a>| 330 <a id="removeAllReviewersButton_bottom" class="fakeLink" style="margin-left: 15px; margin-right: 15px"><%= _("Remove All")%> 307 331 </td> 308 332 </tr> 309 <% end %>333 <% end %> 310 334 </table> 311 335 … … 320 344 321 345 <script type="text/javascript"> 346 var assignPerTrackMenus = function(role, place){ 347 var assignMenu = $E('assignMenu'+'_'+role+'_'+place); 348 var order = 'assign'; 349 if(role=='reviewer'){ 350 order = 'add'; 351 } 352 assignMenu.observeClick(function(e) { 353 var menuItems = {}; 354 355 menuItems[$T('Track')] = function(){ fetchUsersPerAttribute(order, role, 'track'); }; 356 menuItems[$T('Session')] = function(){ fetchUsersPerAttribute(order, role, 'session'); }; 357 menuItems[$T('Type')] = function(){ fetchUsersPerAttribute(order, role, 'type'); }; 358 359 var menu = new PopupMenu(menuItems, [assignMenu], "popupList"); 360 var pos = assignMenu.getAbsolutePosition(); 361 menu.open(pos.x, pos.y + 20); 362 return false; 363 }); 364 } 322 365 323 366 var contributions = $L(); // watchlist of contribution objects, pickled from Indico Contribution objects … … 390 433 */ 391 434 var backgroundColorOver = function() { 392 IndicoUI.Widgets.Generic.tooltip(this.style.backgroundColor='# ECECEC');435 IndicoUI.Widgets.Generic.tooltip(this.style.backgroundColor='#FFF6DF'); 393 436 } 394 437 … … 396 439 IndicoUI.Widgets.Generic.tooltip(this.style.backgroundColor='transparent'); 397 440 } 441 442 var backgroundColorOnClick = function() { 443 IndicoUI.Widgets.Generic.tooltip(this.style.backgroundColor='#CDEB8B'); 444 } 445 398 446 399 447 var contributionTemplate = function(contribution) { … … 423 471 var checkbox = Html.input('checkbox', {id: id, name:name}); 424 472 checkbox.dom.value = contribution.id; 425 cell1.set(checkbox);473 cell1.set(checkbox); 426 474 427 475 row.append(cell1); … … 659 707 * @param {Object} role 660 708 */ 661 var checkAllHaveReferee = function(contributions, order, role ) {709 var checkAllHaveReferee = function(contributions, order, role, assignPerAttribute) { 662 710 var contributionsWithoutReferee = [] 663 711 for (i in contributions) { … … 670 718 if (contributionsWithoutReferee.length == contributions.length) { 671 719 alert($T("None of the contributions you checked have a Referee.") + 672 $T("You can only add a n editor or areviewer if the contribution has a referee.")720 $T("You can only add a layout reviewer or a content reviewer if the contribution has a referee.") 673 721 ); 674 722 return false; … … 676 724 677 725 if (contributionsWithoutReferee.length > 0) { 726 727 if(assignPerAttribute){ 728 alert($T("Some of the contributions you checked have a Referee.") + 729 $T("You can only add a layout reviewer or a content reviewer if the contribution has a referee.")); 730 return false; 731 } else { 678 732 title =$T('Contributions without referee'); 679 733 … … 704 758 return false; 705 759 } 760 } 706 761 return true; 707 762 } … … 732 787 } 733 788 734 contributionsWithoutEditor = []789 /*contributionsWithoutEditor = [] 735 790 for (i in contributions) { 736 791 contributionId = contributions[i] … … 745 800 ); 746 801 return false; 747 } 802 } */ 748 803 749 804 if (contributionsWithoutReviewers.length > 0) { … … 874 929 * @param {Object} user The user that has been clicked. 875 930 */ 876 var userSelected = function(user ){931 var userSelected = function(user, contrPerAttribute){ 877 932 878 933 var checkedContributions = getCheckedContributions() 879 880 if (checkedContributions.length > 0) { 934 935 936 if (checkedContributions.length > 0){ 937 var params = {conference: '<%= Conference.getId() %>',contributions: checkedContributions, user: user.id} 938 } 939 881 940 882 var params = {conference: '<%= Conference.getId() %>',contributions: checkedContributions, user: user.id} 941 if(checkedContributions.length == 0 && contrPerAttribute.length > 0){ 942 var params = {conference: '<%= Conference.getId() %>',contributions: contrPerAttribute, user: user.id} 943 var checkedContributions = contrPerAttribute; 944 } 945 946 if (checkedContributions.length > 0 || (checkedContributions.length == 0 && contrPerAttribute.length > 0)) { 947 948 883 949 884 950 switch(action) { … … 1053 1119 if ((order == 'assign' && role == 'editor') || (order == 'add' && role == 'reviewer')) { 1054 1120 <% if not (ConfReview.getChoice() == 3 or ConfReview.getChoice() == 1): %> 1055 if (!checkAllHaveReferee(checkedContributions, order, role)) {1056 return;1057 }1058 <% end %>1121 if (!checkAllHaveReferee(checkedContributions, order, role, false)) { 1122 return; 1123 } 1124 <% end %> 1059 1125 } 1060 1126 … … 1149 1215 } 1150 1216 1217 var fetchUsersPerAttribute = function(order, role, attribute) { 1218 1219 var checkedContributions = getCheckedContributions(); 1220 if (checkedContributions.length > 0) { 1221 deselectAll('selectedContributions'); 1222 } 1223 1224 1225 indicoRequest( 1226 'reviewing.conference.userCompetencesList', 1227 {conference: '<%= Conference.getId() %>', role: role}, 1228 function(result,error) { 1229 if (!error) { 1230 1231 action = order + '_' + role; 1232 1233 var title = ''; 1234 if (role == 'editor') { 1235 title = $T('Follow the steps to ') + order + $T(' a layout reviewer:'); 1236 } 1237 if (role == 'reviewer') { 1238 title = $T('Follow the steps to ') + order + $T(' a content reviewer:'); 1239 } 1240 if (role == 'referee') { 1241 title = $T('Follow the steps to ') + order + ' a ' + role + ':'; 1242 } 1243 1244 var popup = new ExclusivePopup(title, function(){popup.close();}); 1245 1246 popup.draw = function(){ 1247 1248 var AttributeDiv = Html.div(); 1249 1250 var attributeList = function () { 1251 indicoRequest( 1252 'reviewing.conference.attributeList', 1253 {conference: '<%= Conference.getId()%>', attribute: attribute}, 1254 function(result, error){ 1255 if(!error){ 1256 var attributes = $L(); 1257 var attributeTemplate = function(att){ 1258 var li = Html.li({style:{listStyleType:"none", paddingBottom:'3px'}}); 1259 var id = (att.id); 1260 var name = ("selected"+attribute); 1261 var checkbox = Html.input('checkbox', {id: id, name: name}); 1262 var attributeName = Html.span({style:{marginLeft:'5px', fontSize: '13px'}}, att.title); 1263 1264 li.set(Widget.inline([checkbox, attributeName])); 1265 1266 return li; 1267 } 1268 var step1 = Html.span({style:{fontSize:'18px'}, className:'groupTitle groupTitleNoBorder'}, 'Step 1: Choose a '+ attribute); 1269 var attList = Html.ul(); 1270 bind.element(attList, attributes, attributeTemplate); 1271 for (i in result) { 1272 attributes.append(result[i]); 1273 } 1274 AttributeDiv.set(Widget.block([step1,attList])); 1275 } else { 1276 IndicoUtil.errorReport(error); 1277 } 1278 } 1279 ); 1280 } 1281 var getCheckedAttributes = function() { 1282 var checkBoxes = document.getElementsByName("selected"+attribute); 1283 var checkedAttributes = [] 1284 for (var i=0; i<checkBoxes.length; i++) { 1285 var cb = checkBoxes[i]; 1286 if (cb.checked) { 1287 checkedAttributes.push(cb.id) 1288 } 1289 } 1290 return checkedAttributes; 1291 } 1292 var assignButton = Html.button({style:{marginLeft:pixels(5)}}, $T("Assign")); 1293 1294 var users = $L(); 1295 var contrPerAttribute = []; 1296 1297 var contributionsIdList = function (user, chAtt){ 1298 indicoRequest( 1299 'reviewing.conference.contributionsIdPerSelectedAttribute', 1300 {conference: '<%= Conference.getId()%>', attribute: attribute, selectedAttributes:chAtt }, 1301 function(result, error){ 1302 if(!error){ 1303 for (i in result) { 1304 contrPerAttribute.push(result[i]); 1305 } 1306 if ((order == 'assign' && role == 'editor') || (order == 'add' && role == 'reviewer')) { 1307 <% if not (ConfReview.getChoice() == 3 or ConfReview.getChoice() == 1): %> 1308 if (!checkAllHaveReferee(contrPerAttribute, order, role, true)) { 1309 return; 1310 } 1311 <% end %> 1312 } 1313 userSelected(user, contrPerAttribute); 1314 } 1315 else { 1316 IndicoUtil.errorReport(error); 1317 } 1318 } 1319 ); 1320 } 1321 var userTemplate = function(user) { 1322 var li = Html.li({style:{listStyleType:"none", paddingBottom:'3px'}}); 1323 var name = ("radioBtn"); 1324 var radioButton = Html.input('radio', {id: user.id, name: name}); 1325 var userName = Html.label({style:{fontWeight: 'normal'}}, user.name); 1326 1327 var userCompetences = Html.span({style:{marginLeft:'5px', fontSize: '11px'}}, 1328 user.competences.length == 0 ? $T('(no competences defined)') : $T('(competences: ') + user.competences.join(', ') + ')' 1329 ); 1330 1331 li.set(Widget.inline([radioButton, userName, userCompetences])); 1332 return li; 1333 } 1334 var step2 = Html.span({style:{fontSize:'18px'}, className:'groupTitle groupTitleNoBorder'}, 'Step 2: Click on a user name to assign a '+ role); 1335 var userList = Html.ul(); 1336 bind.element(userList, users, userTemplate); 1337 1338 for (i in result) { 1339 users.append(result[i]); 1340 } 1341 1342 attributeList(); 1343 1344 assignButton.observeClick(function(){ 1345 var chAtt = getCheckedAttributes(); 1346 if(chAtt.length == 0){ 1347 alert($T('You must select at least one attribute.')); 1348 } else { 1349 var checkedBtn = function(){ 1350 var allBtn = document.getElementsByName('radioBtn'); 1351 for (var i=0; i<allBtn.length; i++) { 1352 var cb = allBtn[i]; 1353 if (cb.checked) { 1354 return cb.id 1355 } 1356 } 1357 } 1358 var checkedBtnId = checkedBtn(); 1359 if(checkedBtnId == null){ 1360 alert($T('You must select at least one user.')); 1361 } else { 1362 for (var i=0; i < users.length.get(); i++) { 1363 user = users.item(i); 1364 if (user.id == checkedBtnId) { 1365 contributionsIdList(user, chAtt); 1366 } 1367 } 1368 var killProgress = IndicoUI.Dialogs.Util.progress() 1369 popup.close(); 1370 killProgress(); 1371 } 1372 } 1373 }); 1374 1375 var cancelButton = Html.button({style:{marginLeft:pixels(5)}}, $T("Cancel")); 1376 cancelButton.observeClick(function(){ 1377 popup.close(); 1378 }); 1379 1380 return this.ExclusivePopup.prototype.draw.call(this, Html.div({style: {height: 'auto', width: 'auto'}},Widget.block([AttributeDiv, step2, userList, assignButton, cancelButton]))); 1381 }; 1382 popup.open(); 1383 1384 } else { 1385 IndicoUtil.errorReport(error); 1386 } 1387 } 1388 ); 1389 } 1390 1151 1391 /** 1152 1392 * Removes the referee, the editor, or all the reviewers from the contributions that are selected. … … 1252 1492 <% if not IsOnlyReferee and not (ConfReview.getChoice() == 3 or ConfReview.getChoice() == 1): %> 1253 1493 $E('assignRefereeButton_top').observeClick(function(){ fetchUsers('assign', 'referee'); }); 1494 assignPerTrackMenus('referee', 'top'); 1495 assignPerTrackMenus('referee', 'bottom'); 1254 1496 $E('assignRefereeButton_bottom').observeClick(function(){ fetchUsers('assign', 'referee'); }); 1255 1497 $E('removeRefereeButton_top').observeClick(function(){ removeUser('referee') }); … … 1259 1501 <% if not (ConfReview.getChoice() == 2 or ConfReview.getChoice() == 1): %> 1260 1502 $E('assignEditorButton_top').observeClick(function(){ fetchUsers('assign', 'editor'); }); 1503 assignPerTrackMenus('editor', 'top'); 1504 assignPerTrackMenus('editor', 'bottom'); 1261 1505 $E('assignEditorButton_bottom').observeClick(function(){ fetchUsers('assign', 'editor'); }); 1262 1506 $E('removeEditorButton_top').observeClick(function(){ removeUser('editor') }); … … 1266 1510 <% if not (ConfReview.getChoice() == 3 or ConfReview.getChoice() == 1): %> 1267 1511 $E('addReviewerButton_top').observeClick(function(){ fetchUsers('add', 'reviewer'); }); 1512 assignPerTrackMenus('reviewer', 'top'); 1513 assignPerTrackMenus('reviewer', 'bottom'); 1268 1514 $E('addReviewerButton_bottom').observeClick(function(){ fetchUsers('add', 'reviewer'); }); 1269 1515 $E('removeReviewerButton_top').observeClick(function(){ fetchUsers('remove', 'reviewer'); }); … … 1273 1519 <% end %> 1274 1520 1275 1276 1521 fetchContributions(); 1277 1522 -
indico/htdocs/js/indico/Core/Dialogs/Popup.js
r27b220 r42c6b7 162 162 // dialog is displayed. 163 163 var contentHeight = this._calculateContentHeight(); 164 this.contentWrapper.setStyle('height', pixels(contentHeight));164 //this.contentWrapper.setStyle('height', pixels(contentHeight)); 165 165 //this.contentWrapper.setStyle('marginTop', pixels((this.closeHandler && !this.title) ? 30 : 10)); 166 166 this.contentWrapper.setStyle('overflowY', 'auto');
Note: See TracChangeset
for help on using the changeset viewer.
