Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018187Openbravo ERPB. User interfacepublic2011-08-03 20:112011-09-01 17:12
pjuvara 
dbaz 
normalmajoralways
closedopen 
5
3.0MP1 
3.0MP33.0MP3 
Core
No
0018187: Ability to copy to clipboard from grid and information bar
The Openbravo 3 grid is great and it is a fantastic productivity tool.

There is one thing missing: it is not possible to copy to clipboard information in the grid.

Imagine that you are reviewing a list of invoices and you want to send an email to a colleague about one of them. You need to reference the invoice number.

The natural thing to do would be to highlight it with the cursor, copy it and past it in your message.

However, the grid does not allow you to highlight its content so you cannot copy it.

The only option is to open the record in form view and copy the document number.

Now, imagine that you also want to copy the document status. In form view, you cannot highlight the content of the information bar (which supposedly is the most important information on the screen and the thing that you are most likely to want to reference) so you cannot do it.
See above.
Right clicking on a field in the grid should have an option "Copy to clipboard" similar to "Use as filter".

The information bar should allow highlighting.
No tags attached.
related to feature request 0018411 new dbaz Read only form fields can not be selected/highlighted using Firefox 
related to design defect 0022454 closed dbaz Status bar text cannot be selected with the mouse 
png 01-SELECT.png (58,817) 2011-08-09 16:38
https://issues.openbravo.com/file_download.php?file_id=4427&type=bug
png

png 02-POP.png (35,448) 2011-08-09 16:38
https://issues.openbravo.com/file_download.php?file_id=4428&type=bug
png

png Capture.PNG (47,507) 2011-08-19 16:09
https://issues.openbravo.com/file_download.php?file_id=4464&type=bug
png
Issue History
2011-08-03 20:11pjuvaraNew Issue
2011-08-03 20:11pjuvaraAssigned To => dbaz
2011-08-03 20:11pjuvaraModules => Core
2011-08-03 20:33pjuvaraNote Added: 0039847
2011-08-03 22:12dbazAssigned Todbaz => mtaal
2011-08-04 01:21mtaalNote Added: 0039850
2011-08-04 01:22mtaalAssigned Tomtaal => dbaz
2011-08-04 01:44pjuvaraNote Added: 0039852
2011-08-04 19:05iciordiaNote Added: 0039877
2011-08-04 20:24dbazNote Added: 0039878
2011-08-04 20:28hgbotCheckin
2011-08-04 20:28hgbotNote Added: 0039879
2011-08-04 20:28hgbotStatusnew => resolved
2011-08-04 20:28hgbotResolutionopen => fixed
2011-08-04 20:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b3084425e7d573d9442fad32f65b816d38fab4c9 [^]
2011-08-05 15:53shuehnerNote Added: 0039912
2011-08-05 15:53shuehnerStatusresolved => closed
2011-08-06 05:33hudsonbotCheckin
2011-08-06 05:33hudsonbotNote Added: 0039971
2011-08-09 14:59rgorisNote Added: 0040046
2011-08-09 14:59rgorisStatusclosed => new
2011-08-09 14:59rgorisResolutionfixed => open
2011-08-09 15:01rgorisStatusnew => scheduled
2011-08-09 15:01rgorisTarget Version => 3.0MP3
2011-08-09 15:34dbazNote Added: 0040047
2011-08-09 16:38rgorisFile Added: 01-SELECT.png
2011-08-09 16:38rgorisFile Added: 02-POP.png
2011-08-09 16:41rgorisNote Added: 0040050
2011-08-09 17:23iciordiaNote Added: 0040051
2011-08-09 17:36dbazNote Added: 0040053
2011-08-09 18:07rgorisNote Added: 0040055
2011-08-09 18:08rgorisNote Edited: 0040055bug_revision_view_page.php?bugnote_id=0040055#r2559
2011-08-09 18:52iciordiaNote Added: 0040057
2011-08-10 00:13hgbotCheckin
2011-08-10 00:13hgbotNote Added: 0040058
2011-08-10 11:49rgorisNote Added: 0040065
2011-08-10 11:49rgorisStatusscheduled => resolved
2011-08-10 11:49rgorisResolutionopen => fixed
2011-08-10 11:50rgorisStatusresolved => closed
2011-08-16 13:24hudsonbotCheckin
2011-08-16 13:24hudsonbotNote Added: 0040211
2011-08-19 16:09rgorisNote Added: 0040370
2011-08-19 16:09rgorisStatusclosed => new
2011-08-19 16:09rgorisResolutionfixed => open
2011-08-19 16:09rgorisFile Added: Capture.PNG
2011-08-19 16:10rgorisStatusnew => scheduled
2011-08-19 16:10rgorisfix_in_branch => pi
2011-09-01 16:57dbazTarget Version3.0MP3 => 3.0MP4
2011-09-01 16:57dbazfix_in_branchpi =>
2011-09-01 17:10dbazRelationship addedrelated to 0018411
2011-09-01 17:12dbazNote Added: 0040687
2011-09-01 17:12dbazStatusscheduled => resolved
2011-09-01 17:12dbazTarget Version3.0MP4 => 3.0MP3
2011-09-01 17:12dbazStatusresolved => closed
2011-09-01 17:12dbazFixed in Version => 3.0MP3
2012-12-04 16:22dmitry_mezentsevRelationship addedrelated to 0022454

Notes
(0039847)
pjuvara   
2011-08-03 20:33   
Please express your support for this feature request at:
http://openbravo.uservoice.com/forums/13955-openbravo/suggestions/2105801-ability-to-copy-to-clipboard-from-grid-and-informa [^]
(0039850)
mtaal   
2011-08-04 01:21   
Hi Paolo,
Afaik the grid does allow highlighting/selecting, it can be enabled quite easily (one-liner) for the status bar.

A technical tip for another developer, setting the canSelectText on the OBStatusBarTextLabel js class solves it:

isc.OBStatusBarTextLabel.addProperties( {
  // to allow setting the active view when clicking in the statusbar
    canFocus: true,
    canSelectText: true
  });

gr. Martin
(0039852)
pjuvara   
2011-08-04 01:44   
Hi Martin,

I confirm that I cannot select and copy from the grid (unless I put the record in Edit mode).
Please see the attached video that illustrates what I mean.

I reproduced this in Chrome and Firefox both in Ubuntu and Windows.

Paolo
(0039877)
iciordia   
2011-08-04 19:05   
David, please take this one.

Ismael
(0039878)
dbaz   
2011-08-04 20:24   
I can also highligh text in the grid, at least in current pi. Could you please try in the latest pi compilation of live builds?

Thanks & Regards.
(0039879)
hgbot   
2011-08-04 20:28   
Repository: erp/devel/pi
Changeset: b3084425e7d573d9442fad32f65b816d38fab4c9
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Thu Aug 04 20:28:43 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b3084425e7d573d9442fad32f65b816d38fab4c9 [^]

Fixed issue 18187: Status bar text now can be selected with the mouse

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-statusbar.js
---
(0039912)
shuehner   
2011-08-05 15:53   
Tested in pi (rev id: 7e1aea78244f). Testing copying content from Sales Order window both in grid mode (non-edit mode) + status-bar of form view. Working fine in linux/chromium12, winxp/IE8 and winxp/FF5.
(0039971)
hudsonbot   
2011-08-06 05:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5744448753e7 [^]

Maturity status: Test
(0040046)
rgoris   
2011-08-09 14:59   
I agree with request but do not agree with the implemented solution. A few months ago we had deliberately disabled selection of text because it interferes with the double click behavior on a grid row. Having text selection enabled makes it look dirty as parts of the row now get highlighted in blue.

A much cleaner solution is to add a context menu item with "Copy to clipboard". Because of the infrequency of this task, this should be swift enough.
(0040047)
dbaz   
2011-08-09 15:34   
Rob, if you double click in the grid, you see the "dirty" blue parts just for few milliseconds, because after the double click the form view is opened.

With a "Copy to clipboard" feature, you are limited to copy the content of just one cell, while now with the current implementation you can copy multiple rows/cells. (If you think in multiple row selectiom like Google Spreadsheets, this feature is notis not available in our current grid)

And even more "Copy to clipboard" feature can not be implemented using javascript implementable. Imagine that the browser javascript could have access to your clipboard... it would be a very serious security issue.
There are "flash technology" solutions
http://www.logiclabz.com/javascript/copy-to-clipboard-with-javascript-on-mozilla-firefox-and-ie.aspx [^]
but I think we have to avoid them at all cost.

With all this in place, my vote is for continue as we are now and close the issue again.
(0040050)
rgoris   
2011-08-09 16:41   
David, i see the Flash-related problem you´re pointing out. I was thinking maybe we can reuse a similar pattern as we used for the Direct Document Link. When having a row selected, the context menu item would launch a dialog with flat text that can be copied and pasted manually by the user.

Ideally, the cell value the mouse was pointing at at the time of invoking the dialogue would be pre-selected (blue).

For more extended copy requests across multiple rows, the currently available Export to Spreadsheet functionality will do.
(0040051)
iciordia   
2011-08-09 17:23   
Rob,

can you please be more specific about the problem. Up to now the problem is "it interferes with the double click behavior on a grid row. Having text selection enabled makes it look dirty as parts of the row now get highlighted in blue".

How it interferes? What do you mean by "look dirty"?

"Copy to Clipboard" is usually a painful (limited) feature. I would prefer to avoid it if possible. Let us undertand the issue with the current solution and lets try to solve that issue.

Ismael
(0040053)
dbaz   
2011-08-09 17:36   
Rob, maybe I have missunderstood your suggestion, but it seems like your last comment is a kind of reinventing the wheel. Now the user already can use right mouse button to "Edit in grid" and copy paste the desired text of the right-clicked cell. Where is the benefit/advantage of this new dialog you propose?

Even more, remember that the original feature request description is about "the natural way" (the standard way) of selecting text (in the grid and statusbar) and copy-paste, not about a new mechanism to allow the user select text.

Going back to my first reply: as it is now, if you double click in the grid, you see the "dirty" blue selection just for few milliseconds, because after the double click the form view is opened. Is that so painful or I am missing something?

Regards.
(0040055)
rgoris   
2011-08-09 18:07   
(edited on: 2011-08-09 18:08)
@iciordia: the "dirty behavior" is what occurs when you double click on a row (when your cursor happens to be on a cell with text/numerical value)..a blue selection highlight now appears. This is short but still, it draws attention. The same happens when doing shift-click selection of multiple rows. I would like to avoid this.

@dbaz: Maybe you´re right, it might be a bit of overkill. I´m totally fine with the "Edit-in-grid" solution, but it does not work at all times. When a record is not editable (e.g. a booked sales order) the select&copy does not work (not even in form view). However, this is solvable, isn´t it? If we can make sure that all values (read only or not, and also the status bar) can be selected and copied in form view, then i believe it is good enough. Or was this done because of security?

So my suggestion is: make everything selectable and copiable in form view and roll back the mouse selection in the grid.

Alternatively (and ideal): disable the blue-selecting on double click but do allow it on click-drag.

(0040057)
iciordia   
2011-08-09 18:52   
I've just tested the "dirty" behaviour and it not that dirty :-)

David is gonna try to get the ideal behaviour as described by Rob...
(0040058)
hgbot   
2011-08-10 00:13   
Repository: erp/devel/pi
Changeset: 16a68f64fdfa724977b5c4168c55e9da184556ab
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Aug 10 00:13:11 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/16a68f64fdfa724977b5c4168c55e9da184556ab [^]

Related to issue 18187: Decreased highlight impact when double-click a grid row

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0040065)
rgoris   
2011-08-10 11:49   
Ideal solution implemented (double click does not select text, single click + drag does), good job
(0040211)
hudsonbot   
2011-08-16 13:24   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c1dc221b8cb3 [^]

Maturity status: Test
(0040370)
rgoris   
2011-08-19 16:09   
David

In Firefox I noticed that there is still one situation where it does not work well to select texts: Read only form field values.

See attached image.

Can you still try to fix this?

Thanks

Rob
(0040687)
dbaz   
2011-09-01 17:12   
New issue opened to fix the read only fields

https://issues.openbravo.com/view.php?id=18411 [^]