From 6ffe7f1a999091654fe13cecca539fc9a1026a2c Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Sat, 30 Nov 2019 03:27:38 +0800 Subject: [PATCH 1/2] Set width and enable wrapping for tooltips --- app/assets/stylesheets/admin/components/tooltip.css.scss | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 app/assets/stylesheets/admin/components/tooltip.css.scss diff --git a/app/assets/stylesheets/admin/components/tooltip.css.scss b/app/assets/stylesheets/admin/components/tooltip.css.scss new file mode 100644 index 0000000000..7611f2a8ef --- /dev/null +++ b/app/assets/stylesheets/admin/components/tooltip.css.scss @@ -0,0 +1,4 @@ +#powerTip { + max-width: 240px; + white-space: normal; +} From 2673a6efee502f440882d6f2bc19d8e04c9cdab6 Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Sat, 30 Nov 2019 03:29:09 +0800 Subject: [PATCH 2/2] Fix Angular tracking of row in orders list The tooltip content for the order in index n in page x was being used for the order in index n in page y. This was because ng-repeat was tracking the items/rows by index. As far as ng-repeat is aware, rows with the same index in any page were the same items/rows, so it didn't bother relinking the ofn-with-tip directive. --- app/views/spree/admin/orders/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/orders/index.html.haml b/app/views/spree/admin/orders/index.html.haml index b98963513c..b693582db0 100644 --- a/app/views/spree/admin/orders/index.html.haml +++ b/app/views/spree/admin/orders/index.html.haml @@ -47,7 +47,7 @@ %th.actions %tbody - %tr{ng: {repeat: 'order in orders track by $index', class: {even: "'even'", odd: "'odd'"}}, 'ng-class' => "'state-{{order.state}}'"} + %tr{ng: {repeat: 'order in orders track by order.id', class: {even: "'even'", odd: "'odd'"}}, 'ng-class' => "'state-{{order.state}}'"} %td.align-center %input{type: 'checkbox', 'ng-model' => 'checkboxes[order.id]', 'ng-change' => 'toggleSelection(order.id)'} %td.align-center