Giter Site home page Giter Site logo

Comments (9)

nyroDev avatar nyroDev commented on September 2, 2024

It could be a good idea.
I'm pretty sure we can do that with a simple filter.
Basically you need to append and prepend some HTML values inside the content, right?

from nyromodal.

Taimar avatar Taimar commented on September 2, 2024

I’m not sure what do you mean by “need to append and prepend some HTML values inside the content”.

I think nyroModal could have following options (false and null by default):

nyroHeader: true,
nyroHeaderContent: '<h1>Title</h1> <p><a class="nyroModalClose" href="#">Close</a></p>',
nyroFooter: true,
nyroFooterContent: '<p class="action"><input type="submit" value="Save"> <input type="reset" value="Cancel"></p>'

…and/or:

nyroHeader: true,
nyroHeaderElement: '#modalwin1-header',
nyroFooter: true,
nyroFooterElement: '#modalwin1-footer'

…and/or:

nyroHeader: true,
nyroHeaderElement: this.find('.modal-header:eq(0)'),
nyroFooter: true,
nyroFooterElement: this.find('.modal-footer:eq(0)')

It would be great if we can enable/disable header and footer separately as show above.

Does it make sense?

from nyromodal.

nyroDev avatar nyroDev commented on September 2, 2024

Yes it makes sense.
As I said, this won't be included in the core. Instead, I'll do it in a filter so only person who need this feature will download and incldue it.

from nyromodal.

Taimar avatar Taimar commented on September 2, 2024

Great!

By the way, I think the logic behind second and third example is the best because:

  1. Developers can define header and footer elements by any jQuery selector and automatically for all similar nyroModal instances.
  2. All the HTML markup can be located in one place.

from nyromodal.

nyroDev avatar nyroDev commented on September 2, 2024

The developper will have to provide a HTML string OR a DOM element or anything he want. He will have to care about where it comes from.
I'll simply use the content of it with the function append and preprend on the content of the modal, just after the orgiinal content has been inserted.

from nyromodal.

Taimar avatar Taimar commented on September 2, 2024

Sounds good. I’m eager to try out. :)

from nyromodal.

nyroDev avatar nyroDev commented on September 2, 2024

Add imageRegex parameter in nmObject and use it in image filter. #Closed by 8f2a6a4
Fix CSS error. Closed by 8f2a6a4
Add header and footer parameter in nmObject. Closed by 8f2a6a4

from nyromodal.

Taimar avatar Taimar commented on September 2, 2024

Could you provide a demo on your site with header and footer enabled? I'm not sure it works in a way I intended it to work.

I'm getting this result (the whole nyromodal scrolls, footer is hidden):
http://i56.tinypic.com/2qbua8h.png

...but the desirable result is this one (only the content scrolls, header and footer are always visible): http://i52.tinypic.com/a47st3.png

Thanks.

from nyromodal.

nyroDev avatar nyroDev commented on September 2, 2024

@tainmar, you have to do so using CSS.
I don't have time for now to explain that, but use position absolute and relative might do the trick.

from nyromodal.

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.