)]}'
{"horizon/static/framework/widgets/action-list/button-tooltip-table.service.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"93feb12c0c176a6f251653f13021d0cc08a3fba6","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.framework.widgets.action-list\u0027)"},{"line_number":22,"context_line":"    .factory(\u0027horizon.framework.widgets.action-list.button-tooltip-table.service\u0027, tooltip);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  tooltip.$inject \u003d ["},{"line_number":25,"context_line":"    \u0027$timeout\u0027,"}],"source_content_type":"text/javascript","patch_set":15,"id":"fa1b9901_c6ea2e74","line":22,"updated":"2015-08-20 04:49:26.000000000","message":"Name length is rough... and I\u0027m going to slightly complain about the actual name.  Is the .service on the end necessary?  We seem to not do that consistently (rest services don\u0027t have it, toast service does).\n\nThe service name itself I think is supposed to be camel case according to style guide:  https://github.com/johnpapa/angular-styleguide#style-y125\n\nMixing camel case is going to be ugly though (with action-list).\n\nThat said, this is really a warning service (name is so long already, it hurts to say this), but we may get a number of others.\n\nWhat about one of the following:\n\nbutton-tooltip.row-warning.service\n\nrow-action-warning.service\nbutton-row-warning.service\ntooltip-row-warning.service\n\nor something like the above that conveys a bit more meaning in the name?","commit_id":"0dbd945d2a8bb06bfe5d47d3394a5343348fb348"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"f8ea3d549f40da826d02d19522b194583139c95c","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.framework.widgets.action-list\u0027)"},{"line_number":22,"context_line":"    .factory(\u0027horizon.framework.widgets.action-list.button-tooltip-table.service\u0027, tooltip);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  tooltip.$inject \u003d ["},{"line_number":25,"context_line":"    \u0027$timeout\u0027,"}],"source_content_type":"text/javascript","patch_set":15,"id":"fa1b9901_e642a0ad","line":22,"in_reply_to":"fa1b9901_6692104e","updated":"2015-08-20 22:15:58.000000000","message":"actually i prefer button-tooltip.row-warning.service more.","commit_id":"0dbd945d2a8bb06bfe5d47d3394a5343348fb348"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"2187651021d01463ba03f728eefe928123e41a23","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  angular"},{"line_number":21,"context_line":"    .module(\u0027horizon.framework.widgets.action-list\u0027)"},{"line_number":22,"context_line":"    .factory(\u0027horizon.framework.widgets.action-list.button-tooltip-table.service\u0027, tooltip);"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  tooltip.$inject \u003d ["},{"line_number":25,"context_line":"    \u0027$timeout\u0027,"}],"source_content_type":"text/javascript","patch_set":15,"id":"fa1b9901_6692104e","line":22,"in_reply_to":"fa1b9901_c6ea2e74","updated":"2015-08-20 22:12:18.000000000","message":"Yeah... name is getting ridiculously long. I\u0027m ok with tooltip-row-warning.service","commit_id":"0dbd945d2a8bb06bfe5d47d3394a5343348fb348"}],"horizon/static/framework/widgets/action-list/button-tooltip.directive.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"62094d4e00513ec81dc9db5f0dc31ba5f18fe77f","unresolved":false,"context_lines":[{"line_number":90,"context_line":"          expandDetail: expandDetail"},{"line_number":91,"context_line":"        }"},{"line_number":92,"context_line":"      };"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"      var tooltip \u003d scope.btModel || defaultModel;"},{"line_number":95,"context_line":"      var template \u003d tooltip.template || tooltipConfig.defaultTemplate;"},{"line_number":96,"context_line":"      if (tooltip.templateUrl) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_40e890e2","line":93,"updated":"2015-08-11 04:44:28.000000000","message":"Thai, I\u0027m not so sure about this particular change.  I will look a bit tomorrow, but I don\u0027t think I like that the action list now has built in default knowledge of where it might be contained (an expandable row).  Actions may appear on table header or even page or tab headers in the details pages.  So this seems a little odd to me.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"867895017bce099aadaa7dd5b1974ca567960954","unresolved":false,"context_lines":[{"line_number":90,"context_line":"          expandDetail: expandDetail"},{"line_number":91,"context_line":"        }"},{"line_number":92,"context_line":"      };"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"      var tooltip \u003d scope.btModel || defaultModel;"},{"line_number":95,"context_line":"      var template \u003d tooltip.template || tooltipConfig.defaultTemplate;"},{"line_number":96,"context_line":"      if (tooltip.templateUrl) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_fd8d95d3","line":93,"in_reply_to":"1a4dcd0f_40e890e2","updated":"2015-08-11 17:43:59.000000000","message":"Yes, but this defaultModel is a default for action tooltip, it clearly does not belong in the transfer-table controller. If you do a search, you\u0027ll see that in all cases, the defaultModel was used. If we want to override this behavior, we can add a mechanism here for it but not in the transfer-table.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"b6e98c3a21b8a8dd19f671d2332f0efdbe048e95","unresolved":false,"context_lines":[{"line_number":90,"context_line":"          expandDetail: expandDetail"},{"line_number":91,"context_line":"        }"},{"line_number":92,"context_line":"      };"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"      var tooltip \u003d scope.btModel || defaultModel;"},{"line_number":95,"context_line":"      var template \u003d tooltip.template || tooltipConfig.defaultTemplate;"},{"line_number":96,"context_line":"      if (tooltip.templateUrl) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_dea3aa41","line":93,"in_reply_to":"1a4dcd0f_4907fd17","updated":"2015-08-13 01:21:47.000000000","message":"What I described above also allows passing in your own model, but I don\u0027t like what I said above very much. It isn\u0027t quite right. But this feels like a violation of encapsulation.\n\nI\u0027m still cringing on putting knowledge of the table into the tooltip directive.  This still feels like the default for tables belongs as a service in the table widgets and anybody who wants to use it would inject that service and set the tool tip. \n\nWhy do you feel it makes more sense to put that model in here than in the the transfer table?\n\nThat warning-tooltip.html seems like it should be more like it shows the clickAction if a clickAction is defined.  I think the fact that the function is called \"expandDetail\" is just poor naming.  Otherwise, the html makes sense here.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"1db6a411ed010117ddf073b3f68a96402a5d4ac6","unresolved":false,"context_lines":[{"line_number":90,"context_line":"          expandDetail: expandDetail"},{"line_number":91,"context_line":"        }"},{"line_number":92,"context_line":"      };"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"      var tooltip \u003d scope.btModel || defaultModel;"},{"line_number":95,"context_line":"      var template \u003d tooltip.template || tooltipConfig.defaultTemplate;"},{"line_number":96,"context_line":"      if (tooltip.templateUrl) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_c95500c3","line":93,"in_reply_to":"1a4dcd0f_689df8ba","updated":"2015-08-13 21:16:41.000000000","message":"Something simple.... Maybe it should just stay in the transfer table controller for now unless that is problematic for the clone feature.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"17f55c18d5cf477568024088c11bd5029dabef81","unresolved":false,"context_lines":[{"line_number":90,"context_line":"          expandDetail: expandDetail"},{"line_number":91,"context_line":"        }"},{"line_number":92,"context_line":"      };"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"      var tooltip \u003d scope.btModel || defaultModel;"},{"line_number":95,"context_line":"      var template \u003d tooltip.template || tooltipConfig.defaultTemplate;"},{"line_number":96,"context_line":"      if (tooltip.templateUrl) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_71628cda","line":93,"in_reply_to":"1a4dcd0f_c95500c3","updated":"2015-08-17 17:00:31.000000000","message":"It\u0027s not problematic, but I would argue that it belongs more here than it does in transfer table. The model is a tooltip model, not a transfer table one. I\u0027ll move this logic into a service and have the users table.controller set the scope to this model.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"6e29c5485780827e3d31f814c5bfb711df42ae87","unresolved":false,"context_lines":[{"line_number":90,"context_line":"          expandDetail: expandDetail"},{"line_number":91,"context_line":"        }"},{"line_number":92,"context_line":"      };"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"      var tooltip \u003d scope.btModel || defaultModel;"},{"line_number":95,"context_line":"      var template \u003d tooltip.template || tooltipConfig.defaultTemplate;"},{"line_number":96,"context_line":"      if (tooltip.templateUrl) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_4907fd17","line":93,"in_reply_to":"1a4dcd0f_cbbc86bd","updated":"2015-08-12 15:12:07.000000000","message":"The way it works now is better I think. You can pass in your own model via your own controller. You could define a service for it, but I think that is over engineering it. We really don\u0027t know at this point whether how people are going to use it - whether there are common patterns to take away from. At the moment, we\u0027re using only the default. I think we should leave it as is and come back and create a service out of it when the need for it arises.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"ec826ea6e0bc97d18a6d00c2f9a20ee883eed81c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"          expandDetail: expandDetail"},{"line_number":91,"context_line":"        }"},{"line_number":92,"context_line":"      };"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"      var tooltip \u003d scope.btModel || defaultModel;"},{"line_number":95,"context_line":"      var template \u003d tooltip.template || tooltipConfig.defaultTemplate;"},{"line_number":96,"context_line":"      if (tooltip.templateUrl) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_689df8ba","line":93,"in_reply_to":"1a4dcd0f_dea3aa41","updated":"2015-08-13 03:58:33.000000000","message":"Hm... now that I took a closer look at expandDetail, I see what you mean, it does reference \u003ctr\u003e which isn\u0027t very generic. I\u0027ll think on this some more and come up with something.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"b770a4797050e8b45974b90508bba15ff964f51d","unresolved":false,"context_lines":[{"line_number":90,"context_line":"          expandDetail: expandDetail"},{"line_number":91,"context_line":"        }"},{"line_number":92,"context_line":"      };"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"      var tooltip \u003d scope.btModel || defaultModel;"},{"line_number":95,"context_line":"      var template \u003d tooltip.template || tooltipConfig.defaultTemplate;"},{"line_number":96,"context_line":"      if (tooltip.templateUrl) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_cbbc86bd","line":93,"in_reply_to":"1a4dcd0f_fd8d95d3","updated":"2015-08-12 01:00:05.000000000","message":"Ok, I looked through this a bit more and your patch really doesn\u0027t seem to make things much worse on this front since the tooltip html is already dependent on that function being in scope... actually rather shocking that this got in in the first place.  \n\nIdeally, I\u0027d say this warning tooltip html, defaultModel, and expandFunction actually would make sense as its own service or value or something like that with a listing of all predefined models.  This would would be something like table-action-not-allowed. These could be injected and if no model is specified, it would use this as the default model.  The btModel could check to see if the btmodel is a string, an object, or undefined.  If string, it uses the tooltip by name from the available tooltips.  otherwise logic is just like the below.\n\nbtModels \u003d {\n  \"table-action-not-allowed\": { \"default\": true, ... this model },\n  \"WTF model\": {...}\n}","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"}],"horizon/static/framework/widgets/action-list/button-tooltip.row-warning.service.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"594f9cbf4f6d76b5a329ffaf446fd964d97de364","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  /**"},{"line_number":30,"context_line":"   * @ngdoc factory"},{"line_number":31,"context_line":"   * @name horizon.framework.widgets.action-list.button-tooltip.row-warning.service"},{"line_number":32,"context_line":"   * @description The default model for button-tooltip for tables."},{"line_number":33,"context_line":"   */"},{"line_number":34,"context_line":"  function tooltip($timeout, path) {"},{"line_number":35,"context_line":""}],"source_content_type":"text/javascript","patch_set":16,"id":"fa1b9901_8d971839","line":32,"updated":"2015-08-21 15:13:07.000000000","message":"Hey Thai, is this description right?  This isn\u0027t really the \"default model for button tooltip for tables\".  It provides the default model for buttons that can\u0027t be clicked because there are errors with data in the row.\"","commit_id":"3705c9f37517491e2a240dd8415e0d234ee88023"},{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"99943bb0f586174b9ec594e5670e28b20892ab48","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    var service \u003d {"},{"line_number":39,"context_line":"      templateUrl: path + \u0027action-list/warning-tooltip.html\u0027,"},{"line_number":40,"context_line":"      data: {"},{"line_number":41,"context_line":"        clickMessage: gettext(\u0027Click here to expand the row and view the errors.\u0027),"},{"line_number":42,"context_line":"        expandDetail: expandDetail"},{"line_number":43,"context_line":"      }"},{"line_number":44,"context_line":"    };"}],"source_content_type":"text/javascript","patch_set":17,"id":"fa1b9901_656da231","line":41,"updated":"2015-08-26 21:08:46.000000000","message":"can we move this into the warning-tooltip.html?","commit_id":"b68758740a1c8d0419a41fc94b74556fa647b3f6"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"e9b9d39833b8f9ab6cafb9cc64ddb73e0510c07b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    var service \u003d {"},{"line_number":39,"context_line":"      templateUrl: path + \u0027action-list/warning-tooltip.html\u0027,"},{"line_number":40,"context_line":"      data: {"},{"line_number":41,"context_line":"        clickMessage: gettext(\u0027Click here to expand the row and view the errors.\u0027),"},{"line_number":42,"context_line":"        expandDetail: expandDetail"},{"line_number":43,"context_line":"      }"},{"line_number":44,"context_line":"    };"}],"source_content_type":"text/javascript","patch_set":17,"id":"da20952f_1b2b2ded","line":41,"in_reply_to":"fa1b9901_656da231","updated":"2015-08-26 23:21:26.000000000","message":"Not sure if it make sense to, the idea is that this message is specific to just tooltip for rows. It is possible to have tooltip for other things in the future, like graphs, etc...","commit_id":"b68758740a1c8d0419a41fc94b74556fa647b3f6"}],"horizon/static/framework/widgets/transfer-table/transfer-table.controller.js":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"a26b84a2996e9df4081bd5e4ba9b261942cb3b27","unresolved":false,"context_lines":[{"line_number":144,"context_line":"          }"},{"line_number":145,"context_line":"          else if (allocationLimit \u003d\u003d\u003d 1) {"},{"line_number":146,"context_line":"            $timeout(function(){"},{"line_number":147,"context_line":"              // we need to shift after push to retain reference"},{"line_number":148,"context_line":"              model.allocatedItems.pop();"},{"line_number":149,"context_line":"              Array.prototype.push.apply(model.allocatedItems, [item]);"},{"line_number":150,"context_line":"            });"}],"source_content_type":"text/javascript","patch_set":2,"id":"1a4dcd0f_094a7e55","line":147,"updated":"2015-08-05 21:24:39.000000000","message":"Currently, swapping items via array splicing doesn\u0027t work. We need to swap items via extend instead. https://github.com/lorenzofox3/Smart-Table/issues/205\n\n  var clone \u003d angular.copy($scope.allocated[0]);\n  angular.extend($scope.allocated[0], item);\n  angular.extend($scope.available[index], clone);","commit_id":"6fe69cf5e0f35e46edad1c297aa43944d8be532f"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"b6e98c3a21b8a8dd19f671d2332f0efdbe048e95","unresolved":false,"context_lines":[{"line_number":120,"context_line":"      if (ctrl.limits.maxAllocation \u003c 0 ||"},{"line_number":121,"context_line":"          ctrl.limits.maxAllocation \u003e ctrl.allocated.sourceItems.length) {"},{"line_number":122,"context_line":"        ctrl.allocated.sourceItems.push(item);"},{"line_number":123,"context_line":"        ctrl.allocatedIds[item.id] \u003d true;"},{"line_number":124,"context_line":"      }"},{"line_number":125,"context_line":"      // Swap out items if only one allocation allowed"},{"line_number":126,"context_line":"      else if (ctrl.limits.maxAllocation \u003d\u003d\u003d 1) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_9ea682bf","line":123,"updated":"2015-08-13 01:21:47.000000000","message":"There is no final else block to catch other cases. Seems like ideally this should be blocked by html as invalid, but I\u0027m wondering if there should be any alerting or console logging here?  Just discussion point as that matches current functionality.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"17f55c18d5cf477568024088c11bd5029dabef81","unresolved":false,"context_lines":[{"line_number":120,"context_line":"      if (ctrl.limits.maxAllocation \u003c 0 ||"},{"line_number":121,"context_line":"          ctrl.limits.maxAllocation \u003e ctrl.allocated.sourceItems.length) {"},{"line_number":122,"context_line":"        ctrl.allocated.sourceItems.push(item);"},{"line_number":123,"context_line":"        ctrl.allocatedIds[item.id] \u003d true;"},{"line_number":124,"context_line":"      }"},{"line_number":125,"context_line":"      // Swap out items if only one allocation allowed"},{"line_number":126,"context_line":"      else if (ctrl.limits.maxAllocation \u003d\u003d\u003d 1) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_d1da7878","line":123,"in_reply_to":"1a4dcd0f_093528a7","updated":"2015-08-17 17:00:31.000000000","message":"I see what you\u0027re saying. are you saying that it becomes less visually obvious that you can\u0027t allocate as the size of the thing increases? yeah, not within scope of this patch or the next. if you have to allocate 20 items, not sure the table is even the ideal widget to use...","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"1db6a411ed010117ddf073b3f68a96402a5d4ac6","unresolved":false,"context_lines":[{"line_number":120,"context_line":"      if (ctrl.limits.maxAllocation \u003c 0 ||"},{"line_number":121,"context_line":"          ctrl.limits.maxAllocation \u003e ctrl.allocated.sourceItems.length) {"},{"line_number":122,"context_line":"        ctrl.allocated.sourceItems.push(item);"},{"line_number":123,"context_line":"        ctrl.allocatedIds[item.id] \u003d true;"},{"line_number":124,"context_line":"      }"},{"line_number":125,"context_line":"      // Swap out items if only one allocation allowed"},{"line_number":126,"context_line":"      else if (ctrl.limits.maxAllocation \u003d\u003d\u003d 1) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_093528a7","line":123,"in_reply_to":"1a4dcd0f_28cff029","updated":"2015-08-13 21:16:41.000000000","message":"Hey, so, what I\u0027m saying is that if I can allocate 20 items, when I get 20 items allocated and click to allocate another (the 21st item) the function just won\u0027t do anything.  Would make for a kind of confusing user experience, keep clicking and nothing happens, but don\u0027t notice that I\u0027m not actually allocating them anymore.\n\nAlso, yes, this does match current functionality, so I don\u0027t think this patch has to change that.  That would be a separate bug I think.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"ec826ea6e0bc97d18a6d00c2f9a20ee883eed81c","unresolved":false,"context_lines":[{"line_number":120,"context_line":"      if (ctrl.limits.maxAllocation \u003c 0 ||"},{"line_number":121,"context_line":"          ctrl.limits.maxAllocation \u003e ctrl.allocated.sourceItems.length) {"},{"line_number":122,"context_line":"        ctrl.allocated.sourceItems.push(item);"},{"line_number":123,"context_line":"        ctrl.allocatedIds[item.id] \u003d true;"},{"line_number":124,"context_line":"      }"},{"line_number":125,"context_line":"      // Swap out items if only one allocation allowed"},{"line_number":126,"context_line":"      else if (ctrl.limits.maxAllocation \u003d\u003d\u003d 1) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"1a4dcd0f_28cff029","line":123,"in_reply_to":"1a4dcd0f_9ea682bf","updated":"2015-08-13 03:58:33.000000000","message":"The old allocate does not have a final else block either. If you think about it, maxAllocation can be negative, zero, one, or greater than zero (including floats).\n\nWhen it is negative, we allow users to allocate as long as there are items, which is control by the visibility of the ng-repeat. When it is one, we simply swap out the item, this is a special case.\n\nWhen it is greater than one, the number of maxAllocation can be greater than number of available items or less than it, it does not matter. We simply check whether we hit the maxAllocation or not.\n\nI think these two if blocks pretty much cover all cases except when maxAllocation is zero, which does not make much sense. It would defeat the purpose of a transfer table if you are unable to allocate items.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"34c1396764297432c8f660e31cb2c79b711bdcae","unresolved":false,"context_lines":[{"line_number":120,"context_line":"      if (ctrl.limits.maxAllocation \u003c 0 ||"},{"line_number":121,"context_line":"          ctrl.limits.maxAllocation \u003e ctrl.allocated.sourceItems.length) {"},{"line_number":122,"context_line":"        ctrl.allocated.sourceItems.push(item);"},{"line_number":123,"context_line":"        ctrl.allocatedIds[item.id] \u003d true;"},{"line_number":124,"context_line":"      }"},{"line_number":125,"context_line":"      // Swap out items if only one allocation allowed"},{"line_number":126,"context_line":"      else if (ctrl.limits.maxAllocation \u003d\u003d\u003d 1) {"}],"source_content_type":"text/javascript","patch_set":11,"id":"fa1b9901_0696e63e","line":123,"in_reply_to":"fa1b9901_d1da7878","updated":"2015-08-20 04:48:07.000000000","message":"Actually, same comment applies with 3 items or two items.  This function just doesn\u0027t do anything in that event.  It acts as thought it wasn\u0027t called.","commit_id":"2db324e6761fbe0a8588fa9499abe1eb40c7893a"}]}
