Skip to content

Commit

Permalink
we only remove and readd a favorite entry to a user favorite list in
Browse files Browse the repository at this point in the history
case it is initially added or removed. This should fix the problem that
upon editing a favorite it will always be added to the very end of the
user favorite list. This refs #706.
  • Loading branch information
jens-maus committed Sep 25, 2019
1 parent da633aa commit 04fe5c4
Show file tree
Hide file tree
Showing 5 changed files with 1,938 additions and 0 deletions.
20 changes: 20 additions & 0 deletions buildroot-external/patches/occu/0062-WebUI-FavoriteSorting.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
--- occu/WebUI/www/rega/esp/favorites.fn.orig
+++ occu/WebUI/www/rega/esp/favorites.fn
@@ -244,7 +244,7 @@
oU = dom.CreateObject( OT_FAVORITE, "_USER"#s );
oFavorites.Add( oU );
}
- else
+ elseif( system.GetVar("sargs").Contains(s) == false )
{
oU.Remove( iOrigID );
Write( "|rem "#iOrigID#" from "#oU.ID()#"|" );
@@ -257,7 +257,7 @@
foreach(s,system.GetVar("sargs"))
{
object oU = oFavorites.Get( "_USER"#s );
- if( oU )
+ if( oU && (oU.Get(iOrigID) != null) )
{
oU.Add( iOrigID );
Write( "|add "#iOrigID#" to "#oU.ID()#"|" );
--- occu/WebUI/www/rega/pages/tabs/user/favOverview.htm.orig
+++ occu/WebUI/www/rega/pages/tabs/user/favOverview.htm
@@ -27,10 +27,17 @@
Expand Down
Loading

0 comments on commit 04fe5c4

Please sign in to comment.