Giter Club home page Giter Club logo

Comments (4)

jigarius avatar jigarius commented on July 30, 2024 2

I wrote a Sidr + Drupal integration. Things seem to be going fine for basic use cases. However, for complex things like forms, I'm afraid it might lead to problems for certain types of Drupal content, like forms, etc.

Besides, I see that the plugin currently clones the inner HTML of the source elements to the sidr panel, which pre-requires the HTML to have additional wrappers sometimes. For example, Drupal creates a site logo block like #block-site-branding. Now, if I set the source as #block-site-branding then the Sidr will end up having only an img tag, which is the content of the #block-site-branding. Hence, it will make things hard to style without a context like .sidr #block-site-branding img {}.

from sidr.

francesco-quagliati avatar francesco-quagliati commented on July 30, 2024 2

Same problem here, also for me in Drupal ( 8 ).
I've a form created from js of a third party booking agency, i need to put that form in a sidr in the mobile version of the website, but it only copy the html so the js events are not triggered anymore, is there a solution to this?
Thanks!

from sidr.

jigarius avatar jigarius commented on July 30, 2024 1

Hey francesco. I have added a configuration to the 8.x-2.x version of the sidr module for drupal to allow this (along with many accessibility fixes) . Please try it and let me know if it works for you. The contents lose their JavaScript events though, I will fix that later today or this weekend. I hope this answer helps.

from sidr.

artberri avatar artberri commented on July 30, 2024

We don't want to add more complexity to the library, in addition to this, it is very difficult to be able to position the original div as a side menu depending on the situation of that DIV in the DOM. The reason to clone the div is to be able to put it wherever we want in the DOM.

Why can't you just add the same JS events to the copied content? What are the other complex things?

from sidr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.