Adding a separate callnumber column to the cart will allow it to be sorted by callnumber.
Created attachment 14779 [details] [review] Bug 9456 - Add callnumber column to the cart Test Plan: 1) Apply patch 2) Add items to the cart 3) View the cart, note the new column for callnumbers
Created attachment 14780 [details] [review] Bug 9456 - Add callnumber column to the cart Test Plan: 1) Apply patch 2) Add items to the cart 3) View the cart, note the new column for callnumbers
Created attachment 14782 [details] Screenshot of cart with multi-call-number title I question whether this is universally useful, given the fact that call number is item-level and each title can have any number of call numbers. This screenshot shows a made-up example. I don't know how divergent one system's call numbers might be, but if you test with this kind of data it's clear that the sort will be based on the first call number in the list of many. The same is true for location, of course.
Created attachment 14783 [details] Proposed alternate structure What about this instead? I didn't test the nested sorting with DataTables, but I think it is doable.
(In reply to comment #4) > Created attachment 14783 [details] > Proposed alternate structure > > What about this instead? I didn't test the nested sorting with DataTables, > but I think it is doable. If it can do nested sorting that would be perfect! Do you a patch you can upload?
Created attachment 14861 [details] [review] Bug 9456 [Alternate] Add callnumber column to the cart This patch adds call-number sorting to the staff client cart on a title-by-title basis. Item information (library, shelving location, and call number) is moved to a table nested in each row. Location and call number columns in this table are sortable. The patch converts table sorting to DataTables (in a race with Bug 9449). The patch does not attempt to make the larger table of titles sortable by call number. To test, add multiple titles to the staff client cart which have multiple items each. The table of titles should still be sortable by title and item type. The table of items in each row should be sortable by location and call number.
Unfortunately this just doesn't fit the bill. The outer table needs to be sorted by the all inner tables, or it just isn't even useful. I've tried alternate options such as using rowspans so each callnumber has a table row and all the bib level data is rowspan-ed together, but it breaks both datatables and tablesorter. One potential solution is the FakeRowSpan plugin ( http://datatables.net/plug-ins/api#fnFakeRowspan ), however, it requires server side processing apparently.
Created attachment 14903 [details] [review] Bug 9456 [Alternate] Add callnumber column to the cart - Followup - Sort by callnumbers This patch removes the sub-tables for callnumber/location, and simple surrounds them with a span tag. Sorting is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row.
Created attachment 14904 [details] [review] Bug 9456 [Alternate] Add callnumber column to the cart - Followup - Sort by callnumbers This patch removes the sub-tables for callnumber/location, and simply surrounds them with a span tag. Sorting is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row.
Owen, I think you may find this followup to your patch more acceptable than my original patch. This one looks more like my original patch, but the sorting is actually done using the best suited callnumber for each given row ( by using custom sorting filters for that table column ). When sorting by Items in ascending fashion, the filter uses the highest valued callnumber from each row for sorting. When sorting by Items descending, it uses the lowest valued callnumber from each row. Test plan: 1) Apply all the patches. 2) Create a record with two items, make one a very high callnumber ( e.g. '00000' ) and one a very low callnumber ( e.g. 'ZZZZZ' ). 3) Add this record and a number of other records to the cart. 4) View the cart and sort the Items in both ascending and descending fashion. 5) You should see that the item you created always stays on top because it contains both the highest valued and the lowest valued callnumbers in the list!
Patch tested with a sandbox, by Delaye Stephane <stephane.delaye@biblibre.com>
Created attachment 15542 [details] [review] Bug 9456 [Alternate] Add callnumber column to the cart - Followup - Sort by callnumbers This patch removes the sub-tables for callnumber/location, and simply surrounds them with a span tag. Sorting is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row. Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>
Created attachment 15544 [details] [review] Bug 9043: Syspref improvement: add new type "multiple" This patch adds a new type "multiple" for syspref. This new type allows to select several values for one syspref.
Comment on attachment 15544 [details] [review] Bug 9043: Syspref improvement: add new type "multiple" Sorry, wrong number
Please resubmit replacing "/intranet-tmpl/prog/en/" with [% themelang %] (in the first patch) Marked as Failed QA.
Created attachment 15727 [details] [review] Bug 9456 [Alternate] Add callnumber column to the cart This patch adds call-number sorting to the staff client cart on a title-by-title basis. Item information (library, shelving location, and call number) is moved to a table nested in each row. Location and call number columns in this table are sortable. The patch converts table sorting to DataTables (in a race with Bug 9449). The patch does not attempt to make the larger table of titles sortable by call number. To test, add multiple titles to the staff client cart which have multiple items each. The table of titles should still be sortable by title and item type. The table of items in each row should be sortable by location and call number. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 15728 [details] [review] Bug 9456 [Alternate] Add callnumber column to the cart - Followup - Sort by callnumbers This patch removes the sub-tables for callnumber/location, and simply surrounds them with a span tag. Sorting is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row. Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>
QA comment: Works great. I don't know if it is relevant to sort on the first value (if there are others one) but I don't have other idea. A followup could be to move javascript code into the datatable.js file. Marked as Passed QA.
Created attachment 15759 [details] [review] Bug 9456 [Alternate] Add callnumber column to the cart This patch adds call-number sorting to the staff client cart on a title-by-title basis. Item information (library, shelving location, and call number) is moved to a table nested in each row. Location and call number columns in this table are sortable. The patch converts table sorting to DataTables (in a race with Bug 9449). The patch does not attempt to make the larger table of titles sortable by call number. To test, add multiple titles to the staff client cart which have multiple items each. The table of titles should still be sortable by title and item type. The table of items in each row should be sortable by location and call number. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 15760 [details] [review] Bug 9456 [Alternate] Add callnumber column to the cart - Followup - Sort by callnumbers This patch removes the sub-tables for callnumber/location, and simply surrounds them with a span tag. Sorting is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row. Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
*** Bug 9449 has been marked as a duplicate of this bug. ***
I am a little bit doubtful about pushing this patch as-is. Although the sorting seems to work, it becomes hard to tell what item belongs to which library, and even where the call numbers begin and end: http://screencast.com/t/meDgCBj3Rwm Is there some way we can group information about each item together so that it's possible to follow?
Created attachment 15813 [details] [review] Bug 9456 [Alternate] Add callnumber column to the cart This patch adds call-number sorting to the staff client cart on a title-by-title basis. Item information (library, shelving location, and call number) is moved to a table nested in each row. Location and call number columns in this table are sortable. The patch converts table sorting to DataTables. The patch does not attempt to make the larger table of titles sortable by call number. To test, add multiple titles to the staff client cart which have multiple items each. The table of titles should still be sortable by title and item type. The table of items in each row should be sortable by location and call number. Rebased on current master.
I have attached a rebased copy of my patch because I think git was breaking something in it's auto-merge with the Bootstrap changes. Kyle I'm not sure why you created your patch as a follow-up to mine, since our approaches are so different. I think yours should be constructed as a separate patch and presented as an alternative rather than a follow-up to mine.
Owen, the entire point of having the callnumber as a column in the cart is to be able to sort all the results by callnumber. Your patch does not accomplish this. This is the reason I created and submitted this bug. (In reply to comment #24) > I have attached a rebased copy of my patch because I think git was breaking > something in it's auto-merge with the Bootstrap changes. Kyle I'm not sure > why you created your patch as a follow-up to mine, since our approaches are > so different. I think yours should be constructed as a separate patch and > presented as an alternative rather than a follow-up to mine.
(In reply to comment #25) > Owen, the entire point of having the callnumber as a column in the cart is > to be able to sort all the results by callnumber. Your patch does not > accomplish this. I realize this. My point was simply that submitting your patch as a follow-up to mine, rather than as a separate patch, doesn't make sense because your solution and my solution are completely different.
That's true. I'll make mine a standalone patch. Thanks for the clarification! (In reply to comment #26) > (In reply to comment #25) > > Owen, the entire point of having the callnumber as a column in the cart is > > to be able to sort all the results by callnumber. Your patch does not > > accomplish this. > > I realize this. My point was simply that submitting your patch as a > follow-up to mine, rather than as a separate patch, doesn't make sense > because your solution and my solution are completely different.
Created attachment 15844 [details] [review] Bug 9456 - Add callnumber column to the cart - Add monospacing and padding for callnumbers
Created attachment 15845 [details] [review] [SIGNED-OFF] Bug 9456 - Add callnumber column to the cart This patch adds call-number sorting to the staff client cart. Sortining is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row. Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 15846 [details] [review] Bug 9456 - Add callnumber column to the cart - QA Followup - Improve individual item presentation in the Items column
Created attachment 15847 [details] [review] Bug 9456 - Add callnumber column to the cart - Add monospacing and padding for callnumbers
Created attachment 15848 [details] [review] Bug 9456 - Add callnumber column to the cart - Improve individual item presentation in the Items column
(In reply to comment #22) > I am a little bit doubtful about pushing this patch as-is. Although the > sorting seems to work, it becomes hard to tell what item belongs to which > library, and even where the call numbers begin and end: > http://screencast.com/t/meDgCBj3Rwm > > Is there some way we can group information about each item together so that > it's possible to follow? This presentation-only follow addresses this issue. Each item is on a single line, with the callnumber, library and location given different emphases.
Kyle, The patch you uploaded is the one from Owen with sign-offs by Stephane and Jonathan. If Owen agrees that we should go with your patch, could you please attach the standalone version (you might as well squash the follow-up) and mark it Needs Signoff so that we can move it through the QA process?
Created attachment 15937 [details] [review] Bug 9456 - Add callnumber column to the cart This patch adds call-number sorting to the staff client cart. Sortining is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row.
Created attachment 15938 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip
(In reply to comment #34) > Kyle, > > The patch you uploaded is the one from Owen with sign-offs by Stephane and > Jonathan. If Owen agrees that we should go with your patch, could you please > attach the standalone version (you might as well squash the follow-up) and > mark it Needs Signoff so that we can move it through the QA process? Fixed! Seeing as I cannot let well enough alone, I've included another followup that adds a tooltip to the items sorting explaining it's behavior. If everyone thinks this is a good addition, I can squash it into the primary patch.
(In reply to comment #35) > Created attachment 15937 [details] [review] [review] This patch doesn't apply.
Created attachment 15941 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip
Created attachment 15943 [details] [review] Bug 9456 - Add callnumber column to the cart This patch adds call-number sorting to the staff client cart. Sortining is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row.
Created attachment 15944 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip
Fixed! I've also switched from using the Bootstrap tooltip to the Bootstrap popover as it is visually more pleasing ( though I suppose we could restyle the tooltip to look more pleasing as well ). (In reply to comment #38) > (In reply to comment #35) > > Created attachment 15937 [details] [review] [review] [review] > > This patch doesn't apply.
I'm still a bit confused about which patch you've decided to use, but either way it needs to be signed off.
(In reply to comment #43) > I'm still a bit confused about which patch you've decided to use, but either > way it needs to be signed off. Sorry, my bad! I still advocate for the patch I submitted as Owen's patch, while visually quite nice, lacks the functionality that is the entire point of this feature ( being able to sort the entire table by callnumber ). Owen, please give my latest patch a try and let me know what you think!
Kyle, > Sorry, my bad! I still advocate for the patch I submitted as Owen's patch, > while visually quite nice, lacks the functionality that is the entire point > of this feature ( being able to sort the entire table by callnumber ). In that case, please attach it to this bug. Owen's patch is the one you have been attaching to the bug.
Created attachment 15949 [details] [review] Bug 9456 - Add callnumber column to the cart This patch adds call-number sorting to the staff client cart. Sortining is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row.
Created attachment 15950 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip
second and third patch doesn't apply.
Created attachment 16630 [details] [review] Bug 9456 - Add callnumber column to the cart This patch adds call-number sorting to the staff client cart. Sortining is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row.
Created attachment 16631 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip
Patch tested with a sandbox, by Cedric Vita <cedric.vita@dracenie.com>
Created attachment 16734 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Could you export the 2 dataTable sorting functions into the datatables.js file please? Marked as Failed QA.
Created attachment 17994 [details] [review] Bug 9456 - Add callnumber column to the cart - Followup - Move sort filters to datatables.js Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 17995 [details] [review] Bug 9456 - Add callnumber column to the cart This patch adds call-number sorting to the staff client cart. Sortining is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row.
Created attachment 17996 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Created attachment 17997 [details] [review] Bug 9456 - Add callnumber column to the cart - Followup - Move sort filters to datatables.js Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle, Your first patch introduces some css. Since you don't use a table element, I think it is useless. Marked as Failed QA.
Created attachment 19123 [details] [review] Bug 9456 - Add callnumber column to the cart This patch adds call-number sorting to the staff client cart. Sortining is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row.
Created attachment 19124 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Created attachment 19125 [details] [review] Bug 9456 - Add callnumber column to the cart - Followup - Move sort filters to datatables.js Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 19126 [details] [review] Bug 9456 - Add callnumber column to the cart - QA Followup - Remove useless CSS
Created attachment 19146 [details] Odd sorting Hi Kyle, Could you explain how these 4 notices are sorted? I think there is an issue. On the left, sorting desc ; on the right, sorting asc.
I think I understand your confusion. Sorting by the "items" column does not sort the items within the table cell itself. It sorts the rows based on the highest/lowest callnumber within the the table cell. I believe the callnumbers are displayed in the same order the were created in the database. Example: Sorted by callnumber ascending: --- A E Z --- B C G --- D F V --- Sorted by callnumber descending: --- A E Z --- D F V --- B C G --- Note the order of the callnumbers within a cell does not change. Also note the A,E,Z set is always on top for sorting by callnumber is it contains both the highest and lowest callnumbers! (In reply to comment #63) > Created attachment 19146 [details] > Odd sorting > > Hi Kyle, > Could you explain how these 4 notices are sorted? > I think there is an issue. > On the left, sorting desc ; on the right, sorting asc.
(In reply to comment #64) > Note the order of the callnumbers within a cell does not change. Also note > the A,E,Z set is always on top for sorting by callnumber is it contains both > the highest and lowest callnumbers! Yes, It is what I understood :) But with my example: 1 = the notice with QC*, callnumber, callNUM, iop 2 = AAAA, ZZZZ, SSSS 3 = CALLNUMBER 4 = without callnumber I am expecting, for asc: 2, 1, 3, 4 (or 4, 2, 1, 3 if "without callnumber" is first) and for desc: 2, 1, 3, 4 too
I believe this is because the location is taken into account as part of the callnumber for sorting purposes. (In reply to comment #65) > (In reply to comment #64) > > Note the order of the callnumbers within a cell does not change. Also note > > the A,E,Z set is always on top for sorting by callnumber is it contains both > > the highest and lowest callnumbers! > > Yes, It is what I understood :) > But with my example: > 1 = the notice with QC*, callnumber, callNUM, iop > 2 = AAAA, ZZZZ, SSSS > 3 = CALLNUMBER > 4 = without callnumber > > I am expecting, for asc: > 2, 1, 3, 4 (or 4, 2, 1, 3 if "without callnumber" is first) > and for desc: > 2, 1, 3, 4 too
(In reply to comment #66) > I believe this is because the location is taken into account as part of the > callnumber for sorting purposes. Do you think it is simple to add a span or something else in order to sort only callnumbers?
Hi Kyle - there are some conflicts, can you please rebase and answer Jonathan's question? I wonder if we should offer an option to show only the items of one selected branch in the list of items? But couldn't take a look at how this effects the display of items.
Created attachment 19844 [details] [review] Bug 9456 - Add callnumber column to the cart This patch adds call-number sorting to the staff client cart. Sortining is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row.
Created attachment 19845 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Created attachment 19846 [details] [review] Bug 9456 - Add callnumber column to the cart - Followup - Move sort filters to datatables.js Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 19847 [details] [review] Bug 9456 - Add callnumber column to the cart - QA Followup - Remove useless CSS
Created attachment 19848 [details] [review] Bug 9456 - Add callnumber column to the cart - QA Followup 2 - Sort on callnumber only
Created attachment 19849 [details] [review] Bug 9456 - Add callnumber column to the cart - QA Followup 2 - Sort on callnumber only
(In reply to Katrin Fischer from comment #68) > Hi Kyle - there are some conflicts, can you please rebase and answer > Jonathan's question? Rebased and fixed! This latest followup parses the sorted strings down to callnumbers and only callnumbers. > I wonder if we should offer an option to show only the items of one selected > branch in the list of items? But couldn't take a look at how this effects > the display of items. That is an interesting idea, but I think it would belong in it's own separate bug.
I get a really weird js error when I click on the Items header: TypeError: y[(("string" + "-") + m[Q][1])] is not a function Marked as Failed QA.
Created attachment 20341 [details] [review] Bug 9456 - Add callnumber column to the cart - QA Followup 2 - Sort on callnumber only
Please check again to see if this error still occurs. (In reply to Jonathan Druart from comment #76) > I get a really weird js error when I click on the Items header: > TypeError: y[(("string" + "-") + m[Q][1])] is not a function > > Marked as Failed QA.
I just tested this and got an error at first because I didn't clear my browser cache. After a shift-reload it worked without errors.
Last followup fixes the js error, thanks Kyle. All work great now, marked as Passed QA.
Created attachment 20385 [details] [review] Bug 9456 - Add callnumber column to the cart This patch adds call-number sorting to the staff client cart. Sortining is enabled on the 'Items' column which uses a custom sorting routine to sort the callnumbers. If the sort is ascending, each column will be sorted by the highest ordered callnumber for that row. Likewise, if the sort is descending the table will be sorted by the lowest valued callnumber for that row. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 20386 [details] [review] Bug 9456 - Add callnumber column to the cart - add tooltip Signed-off-by: Cedric Vita <cedric.vita@dracenie.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 20387 [details] [review] Bug 9456 - Add callnumber column to the cart - Followup - Move sort filters to datatables.js Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 20388 [details] [review] Bug 9456 - Add callnumber column to the cart - QA Followup - Remove useless CSS Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 20389 [details] [review] Bug 9456 - Add callnumber column to the cart - QA Followup 2 - Sort on callnumber only Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 20390 [details] [review] Bug 9456: Remove whitespaces and tab Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Pushed to master. Thanks, Kyle!