Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Ability to open a link as a popup window #38

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

drzraf
Copy link

@drzraf drzraf commented Aug 6, 2015

Ability to open a link as a popup window

The window dimensions are still hardcoded at the moment, but at least it gives
webmaster a place to modify these UI settings while getting the basic working feature
already implemented.

@@ -52,7 +52,7 @@ public function __construct()
{
$this->name = 'blocktopmenu';
$this->tab = 'front_office_features';
$this->version = '2.2.2';
$this->version = '2.3';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thank you for your PR. No need to uupdate version number in your PR, thank you.

Regards

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Fri, Aug 07, 2015 at 02:31:25AM -0700, Gregory Roussac wrote:

@@ -52,7 +52,7 @@ public function __construct()
{
$this->name = 'blocktopmenu';
$this->tab = 'front_office_features';

  •    $this->version = '2.2.2';
    
  •    $this->version = '2.3';
    

ok.

But how to name the update function then ? It should take the name of
the next version it will apply to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

The merger will adapt the file when he will create a new master version if necessary.

Regards

The window dimensions are hardcode at the moment, but at least it gives
webmaster a place to modify these settings while getting the basic working feature
already implemented.
@drzraf
Copy link
Author

drzraf commented Aug 7, 2015

updated ... using --amend + forced push
(don't know if it the advised way)

@drzraf
Copy link
Author

drzraf commented Aug 11, 2015

Could we discuss how to enhance the feature so that it get a chance to be pushed and everyone may enjoy it.

  • Would we need target=_blank ?
  • Would we need a specific popup size ?
  • Would we need a special class for some links only (open interesting possibilities) ?

Then one generic but still easy to implement option is optionnal sprintf()-style string input text where placerholders may be used to represent link anchor, link name, menu id, ...
Database would need a change, functions prototypes too.

comments?

@drzraf
Copy link
Author

drzraf commented Sep 6, 2015

On some of my links I needs, target="", an onclick on some others, and styling according to a class/id on some others.
I see only two solution:

  • using a custom template for this link if it exists (a la Drupal override):
    $this->display("blocktopmenu-link-{$id_link}.tpl"); or something related
  • using a new MySQL column which store a sprintf() custom string where placeholder are allowed:
    <a target="_{{id_link}}" href="{{url_link}}" class="...">Click on {{name_link}}</a>
    What would you prefer?
    We really need more flexibility over these blocktopmenu links!

@drzraf
Copy link
Author

drzraf commented Sep 22, 2015

pull request #43 is the way to go

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants