GithubHelp home page GithubHelp logo

Comments (5)

justinhunt avatar justinhunt commented on August 22, 2024

Thanks for the observation Mark.

Actually the ability to create dropdown lists is quite recent, so the long, long string is a new thing. Until now it was just width=400,height=300 kind of properties. Let me put your suggestion in the "to do" basket. It is probably best not to allow commas AND new lines as delimiters. So it might be that in the settings we offer up the option to choose/specify the delimiter.

(Note you should be able to enclose default values in double quotes now too. Not sure if that helps ...)

from moodle-atto_generico.

whanrott avatar whanrott commented on August 22, 2024

Hi Justin,
May I also suggest that you allow key-value pairs so that we can provide user friendly identifiers. I'm adding fontawesome icons so I don't have control over the inserted values.
Thanks, Will

from moodle-atto_generico.

justinhunt avatar justinhunt commented on August 22, 2024

from moodle-atto_generico.

whanrott avatar whanrott commented on August 22, 2024

I am extending your fontawesome bundle. The fontawesome icon names are obscure so I wanted to present a user friendly name in the select option which is part of the modal Enter Preferences dialog box. For example fa-user-md would be displayed as "Clinical Relevance" for users in the modal box.

from moodle-atto_generico.

justinhunt avatar justinhunt commented on August 22, 2024

You can do this but it might get a bit complicated. The values from the dropdown are inserted into the filter string that appears in the html editor text area. Those are just loaded as-is into the html string we put on the page. If you want to use "clinical relevance" you will need to intervene with javascript to run some sort of switch case statement that inserts fa-user-md when it sees "clinical relevance".

In PoodLL/ Generico I don't have any plan to add a dropdown list "labels" feature for this sort of case. If a lot of people wanted it though, its possible. Generico is already a lot more complicated than I wanted it to be. And all the fields are a bit confusing for template authors.

One solution to your current problem would be to have a separate Generico template for each font awesome icon that you had the need to use. Then the user could just choose the appropriate button from the popup dialog.

Or you could add instructions in the instructions area explaining what each selection means.

It might even be possible to be sneaky and make the choices you specify in the defaults area include a label, like this:
icon="fa-user-md (Clinical Relevance)|fa-cog (Settings)"
But I have not tried that

from moodle-atto_generico.

Related Issues (6)

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.