CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Is there a way to open View or Edit for one member in a separate Tab or Window?
Pages: [1]

Author Topic: Is there a way to open View or Edit for one member in a separate Tab or Window?  (Read 3518 times)

Erich

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 1
Is there a way to open View or Edit for one member in a separate Tab or Window?
September 06, 2010, 08:29:48 pm
That would make navigation a lot easier and faster.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 07, 2010, 04:30:50 am
For many users, however, this would be very confusing. There are many users of CiviCRM who are not tech-savvy.

If you are looking at a search results table, however, you can certainly open a view or edit page in a separate tab using your browser itself. Does that not work for you?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 07, 2010, 05:58:37 am
I middle-click all the time to view records in a new tab. But I agree with Hershel -- we wouldn't want to formalize that in the interface as it would really confuse people. Best handled as a browser-training issue.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Erich

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 1
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 11, 2010, 08:59:35 pm
What is this "middle click" of which you speak?  :-)  Most of our users (myself included) only have two-button mice (i.e. most of our users are Windoze users).

That said, Ctrl-leftclick does open the record in a new tab.  I had forgotten about that.  Thanks for the reminder.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 12, 2010, 01:04:45 am
Quote from: Erich on September 11, 2010, 08:59:35 pm
What is this "middle click" of which you speak?  :-)  Most of our users (myself included) only have two-button mice (i.e. most of our users are Windoze users).

Windows has supported 3 button mice for years--you just need to buy one. :)

For that matter, Firefox in Windows even allows you to configure the behavior of middle click. Or possibly one of the Tabs add-ons does that--anyhow, it can be done. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Erich

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 1
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 13, 2010, 02:57:50 pm
Quote from: hershel on September 07, 2010, 04:30:50 am
If you are looking at a search results table, however, you can certainly open a view or edit page in a separate tab using your browser itself. Does that not work for you?

As I am writing this, I have a browser window open, with two tabs... one here and one to my CiviCRM installation.

If I right-click on one of the links in this tab, I get the standard browser choices of Open Link in New Window, Open Link in New Tab, Bookmark This Link, Save Link As..., Send Link..., Copy Link Location, and Properties.

If I right-click on one of the contact names in my CiviCRM search results (or the contact's corresponding View or Edit links on the right hand side) I do *not* get the standard browser choices.  Instead, I get CiviCRM-specific options to View Contact, Edit Contact, Delete Contact, Record Activity, Send an Email, Add to Group, or Tag. 

If I did something to change my CiviCRM's default rightclick behavior, I clearly don't remember either (a) doing so, or (b) how to undo ;-)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 14, 2010, 02:58:24 am
Quote from: Erich on September 13, 2010, 02:57:50 pm

If I did something to change my CiviCRM's default rightclick behavior, I clearly don't remember either (a) doing so, or (b) how to undo ;-)

No, you didn't do anything. CiviCRM indeed commandeers the default right click of the browser. To open in a new tab, in most browsers anyway, you can also hold down Ctrl and left-click. This is actually a faster way to open a link in a new tab.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Guy Iaccarino

  • I post occasionally
  • **
  • Posts: 92
  • Karma: 5
    • Greenleaf Advancement
  • CiviCRM version: 4.4.10, 4.5.4
  • CMS version: WordPress 4, Drupal 7, Drupal 6, Joomla 3
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 24, 2010, 05:58:36 am
Is there a way however to set up EXTERNAL links in the menus to open in new tabs or windows? I think it's confusing for users to click Help, go to the CiviCRM documentation, and lose their current instance of Civi.
Guy Iaccarino
www.greenleafadvancement.com

FrTommy

  • I post frequently
  • ***
  • Posts: 273
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.32
  • PHP version: 5.3
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 24, 2010, 12:03:43 pm
My CiviCRM doesn't commandeer the default right click behavior. Is there a setting somewhere that turns that on or off? I'm running 3.2.3.
I use the Right click Open in new tab all the time....but curious about this commandeering of the right click behavior.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 24, 2010, 12:55:03 pm
Quote from: FrTommy on September 24, 2010, 12:03:43 pm
My CiviCRM doesn't commandeer the default right click behavior. Is there a setting somewhere that turns that on or off? I'm running 3.2.3.
I use the Right click Open in new tab all the time....but curious about this commandeering of the right click behavior.
The behavior Hershel is referring to only happens on search result rows. So do a search, then right-click on one of the rows in the results (i.e. on of the contact records). As he mentions above you can still open a link from a search result in a new tab using Ctrl+click (Apple+click on Macs).

« Last Edit: September 24, 2010, 01:39:05 pm by Dave Greenberg »
Protect your investment in CiviCRM by  becoming a Member!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 24, 2010, 04:39:58 pm
Quote from: guyiac on September 24, 2010, 05:58:36 am
Is there a way however to set up EXTERNAL links in the menus to open in new tabs or windows? I think it's confusing for users to click Help, go to the CiviCRM documentation, and lose their current instance of Civi.

I don't think there's a way to modify the menu-building process to set target=_blank for that particular menu item  w/o hacking the PHP code :-( At some point, a "Target" property could be added to the navigation table and exposed when editing the menu items. If you're interested in tackling this, you can chat w/ us on IRC and we can help you get started.
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 26, 2010, 09:15:08 am
Quote from: guyiac on September 24, 2010, 05:58:36 am
Is there a way however to set up EXTERNAL links in the menus to open in new tabs or windows? I think it's confusing for users to click Help, go to the CiviCRM documentation, and lose their current instance of Civi.

I think it would be even more confusing to have the menu "randomly" opening in the same or a new window.

For a good explanation about why opening in an external window is bad usability practice (in the top 10):
http://www.useit.com/alertbox/990530.html

Quote
Opening up new browser windows is like a vacuum cleaner sales person who starts a visit by emptying an ash tray on the customer's carpet. Don't pollute my screen with any more windows, thanks (particularly since current operating systems have miserable window management). If I want a new window, I will open it myself!

Designers open new browser windows on the theory that it keeps users on their site. But even disregarding the user-hostile message implied in taking over the user's machine, the strategy is self-defeating since it disables the Back button which is the normal way users return to previous sites. Users often don't notice that a new window has opened, especially if they are using a small monitor where the windows are maximized to fill up the screen. So a user who tries to return to the origin will be confused by a grayed out Back button.

X+

P.S. Dave, instead of using target (that's been deprecated and isn't xhtml), add a rel="external" or a class and a bit of jquery in the head that check these links and add a click event that open on a new window (don't mix behaviour and layout usual bla bla).
« Last Edit: September 26, 2010, 09:19:31 am by xavier »
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
September 28, 2010, 10:12:31 am
Quote from: xavier on September 26, 2010, 09:15:08 am
P.S. Dave, instead of using target (that's been deprecated and isn't xhtml), add a rel="external" or a class and a bit of jquery in the head that check these links and add a click event that open on a new window (don't mix behaviour and layout usual bla bla).

Xavier - Thx for the reminder about the target attribute (I can always rely on you to keep me up to date on best practices :-) )! So a better way of adding built-in flexibility would probably be to add an optional "class" property which can be assigned to any menu item (and perhaps include a built-in class that implements the "open new tab" behavior).
Protect your investment in CiviCRM by  becoming a Member!

alanms

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: Is there a way to open View or Edit for one member in a separate Tab or Window?
October 06, 2010, 11:51:42 am
Hey,

Wow, I actually implemented this very feature a few months ago for the same reasons described here! Glad to hear other people are thinking along the same lines :) I was planning to publish it as part of a blog post alongside some other usability tweaks I've been working on but other projects got in the way. http://forum.civicrm.org/index.php/topic,14075.msg60076.html#msg60076

If the way I've done it matches what you're looking for I'll speed this up and release the code as soon as I can. Unfortunately this won't be for a few days at the earliest as I've got a major deadline looming - if you can't wait or want to roll your own, the main file to edit is templates\CRM\Contact\Form\Selector.tpl - then it's all just styling in CSS. (I don't remember where the appropriate equivalent of a  'controller' is for this if you want to follow Xavier's approach strictly - maybe CRM\Contact\Form\Selector.php but I've got a feeling it wasn't that simple). Annoyingly neither target="_blank" nor rel="external" worked (presumably because the links are being overriden by JS) so I had to use a Javascript window.open - this works, but see below for why this is a less desirable solution.

Screenshots of the menu in action are attached. It's designed to a) Complement in style the 'add new tab' button in popular browsers, which people have some familiarity with, b) Be minimal and not obstruct or distract from opening the link in the same tab, which people will want to do most of the time, c) Be intuitive and clearly get across what it does, d) Clearly discriminate between same and new tab clicks to avoid any unexpected behaviour, and e) support internationalisation to languages where 'tab' isn't conveniently just three characters!  

See image attachments (if they work):
1: The menu when CiviCRM is set to English (any English) with a 'same tab' link hoverred over.
2: The menu in English with a 'new tab' link hoverred over.
3: The menu in a non-English language with a 'same tab' link hoverred over (I just changed lang="en" to lang="jp" in Firebug, no Civi languages installed which is why the menu is still in English!)
4: The menu in a non-English language with a 'new tab' link hoverred over.

It works great, with one limitation: because javascript does the new tab action, when you open the new tab, the browser 'focuses' on the new tab rather than staying focussed on the old one. This is a mildly irritating inconvenience as you have to spend a second or so manually re-selecting your previous tab. Unfortunately the only way to change this would be to rewrite the menu link generating system to allow rel=external - seems it can't be done in javascipt because, as a security feature, modern browsers never open a new tab quietly in the background through Javascript, to stop web spammers quietly filling your browser with 10,000 tabs of online poker ads without you  noticing.
« Last Edit: October 06, 2010, 11:58:15 am by alanms »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Is there a way to open View or Edit for one member in a separate Tab or Window?

This forum was archived on 2017-11-26.