Giter VIP home page Giter VIP logo

Comments (11)

thanegill avatar thanegill commented on August 19, 2024

Found what we want.

http://getbootstrap.com/components/#input-groups-buttons-dropdowns

from pfsense.

SjonHortensius avatar SjonHortensius commented on August 19, 2024

Looks good, but it has two downsides;

  • the 'select' prevents the keyboard from being used
  • it won't display the selected value

from pfsense.

thanegill avatar thanegill commented on August 19, 2024

What do you mean prevents keyboard from being used? Right now that dropdown is not a form but an action. So that would need to be ripped out. I was thinking something like this:

http://codepen.io/anon/pen/EadvjB

This is also a good example of where adding raw HTML to a Form_Group would be beneficial. as the span would need to be between the two. #27

from pfsense.

SjonHortensius avatar SjonHortensius commented on August 19, 2024

Ah, I thought you meant to leave it static html but the codepen looks good and prevents both issues.

As for raw HTML, I'd rather introduce a stricter wrapper for Input+Dropdown so the html can be reused instead of copy/pasted :)

from pfsense.

thanegill avatar thanegill commented on August 19, 2024

Sounds good. The one thing that I don't like about the codepen is the '/' separator. It seems a bit small and doesn't need to be on a blue background. I'll play around and throw some different css on it.

from pfsense.

thanegill avatar thanegill commented on August 19, 2024

Take a look at it now. Added some CSS to make it look a little better and more unified.

http://codepen.io/anon/pen/EadvjB

from pfsense.

SjonHortensius avatar SjonHortensius commented on August 19, 2024

LGTM, any comments from @SanderVanLeeuwen ?

from pfsense.

thanegill avatar thanegill commented on August 19, 2024

I'm assuming that we would implement this in PHP as a subclass. But of what? Group? Input?

My vote is for group as it is a group itself. But on the other hand it's treated like an input every other way.

On second thought Input would be the right choice.

from pfsense.

SanderVanLeeuwen avatar SanderVanLeeuwen commented on August 19, 2024

I would like to propose a slightly different approach @ http://codepen.io/anon/pen/VYgEdP .

This example uses the default input structure we use, and the existing bootstrap .input-group-addon (which is only applied when the input is actually in a group). I've added an .input-group-inbetween to remove the double border.

Unfortunately, it's not possible (or at least not cross-browser and platform) to remove the rounded border on the select, so it looks like this on my mac:

screenshot 2015-03-25 22 07 53

from pfsense.

SjonHortensius avatar SjonHortensius commented on August 19, 2024

I have added the relevant class+css; please comment. The setup allows for other functionality such as Form_IpAddress::setFamily(6) and Form_IpAddress::forceRange(127.0.0.1/24)

from pfsense.

SanderVanLeeuwen avatar SanderVanLeeuwen commented on August 19, 2024

No comment. Looks good :)

from pfsense.

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.