How do correctly use the "value" parameter for modal popups? - popup

On www.purelocal.com.au
There are icons and text with the value="X" parameter to open it's respective JS popup.
However , according to HTML validation I cannot apply the value="X" parameter to images or plain text (only using certain tags like INPUT,OPTION etc.
Does anyone know about this? Wrapping the text and images around these tags in order to pass HTML validation seems like a weird thing to do.

Related

Is there any valid way to show an input without a border in SAPUI5?

I am working on a SAPUI5 app in which we do not want to add custom css to. Currently we are displaying text in a form which does not have the same height and styling as the inputs.
I'd prefer to change the text to an input with a pre-filled value so everything in the form has consistent styling but I need to differentiate that this should be treated as text.
The easiest way to do this is to remove the border but I cannot find away of doing this without creating custom css.
I tried borderDesign="None" but this does not affect inputs.

Angular UI Bootstrap typeahead does not extend past parent div border like a normal select dropdown

I'm using the Angular UI Bootstrap typeahead to display a customized list of suggestions as the user types into a text input form control. This form control exists inside a div using jQuery slimScroll in order to maintain a constant div size despite the size of its contents fluctuating. I really hoped the typeahead would display over everything like a regular html select dropdown, but unfortunately it does not, as can be seen in this plunker. I've tried futzing around with the z-index and adjusting the position and display properties; all fruitless endeavors.
Does anybody know how to get the typeahead popup to display over its parent border? If not, is there a way I could coerce the select tag to display HTML content so I can include glyphicons, emphasized text, etc. in the list of suggestions?
The problem is with the slim scroll - you are inside a div with relative position and overflow hidden (think of it as an iFrame). There is a small workaround...
You could, essentially set the position of the generated UL (.dropdown-menu) to fixed, set a height for it, then set an overflow:scroll...
It would work in some scenarios where the input field has a fixed position... otherwise you'd need to control where the input is and adjust the position of the auto-complete to follow, and a whole other bunch of nasty scripts.
Without looking at your application, I cannot understand why your have this particular architecture, but I can say that there must be cleaner options for handling autocomplete outside of slimscroll.
I just set typeahead-append-to-body="true" on the typeahead control and it worked. Not sure exactly why, but it's certainly a simple solution.

Non Editable element in TinyMCE (related to Mathjax)

I'm building an extended editor around TinyMCE and I have to implement a Math formula module. I've choosen Mathjax for formula rendering, using plain html/css. So far, I've managed to create a plugin that popup a panel with a textarea, you can enter your latex in, there's a preview in the panel.
Once you validate the formula, it's injected into tinymce content. This new content is A LOT of spans with inlined styles, and OF COURSE, I don't want tinymce to be able to edit that directly. (sidenote: we only store latex, not the rendered html output from mathjax)
Basically, I want that a piece of html inside Tinymce to be ignored totally, but displayed in place. I want my carret to be able to move before that piece of html, and after, but not inside.
The "non editable content" plugin seems to be close of what I'm looking for, but it has some limitation (you can't ADD no editable content on the fly, having nested html content inside an element flagged as "non editable" broke some things, etc.)
Is someone could help with that ? I started to tweak the non editable plugin, but it's really really hard to understand existing code. Has someone already did something like that, or is there another third party plugin ?
thanks

CQ5 - Widget for displaying sample HTML

I am trying to build a widget that has an area that will display sample of ~20 line HTML code. This sample code must be selectable so the user will be able to copy + paste it into their own text editor.
Currently I am using an xtype displayfield and using the fieldDescription to put my HTML code inside. I realized though that this fieldDescription does not allow me to format my code. I also tried using an xtype textarea and setting the emptyText as my HTML code, but clicking in the textarea would remove the HTML code.
The user story for this is that I have a textarea where the user will be populating a textarea with HTML code. This HTML code must be structured in a certain way so the CSS will format their code correctly. I want to include an example of how this HTML code should be structured.
EDIT - It will be great if I can apply the font-face Courier to this for ease of readability.
Try using value property of textarea.
Set ignoreData to true to avoid the value being populated from content.
To make sure it doesn't get saved back as a property - leave name empty, or just set a value that doesn't start with ./
To achieve different font face - play with CSS on a page. If you want to add specific CSS class to your widget, use overCls property.
Find more on the documentation

Struts 2 form customization

I use Struts 2 to create form in my application. I am struggling with a form customization.
I 've tried with theme simple, xhtml and css_xhtml but i am not able to find a solution.
Struts display the one input text by row, i want to display two or more input text by row. I join the image which explains want i'd like to do.
Thanks
With "simple" theme you can do whatever you want; there's nothing provided other than form value and input element. (You also don't get the automatic error reporting with the form element, but it looks like you wouldn't want that anyway.) If it's not working with "simple" then you're building your form wrong, or forgetting to include your own label, or something.
It might be easier to simply accept the layout Struts gives you and by assigning unique id's to your input fields take control the layout through a custom css file.
After many test, i've resolved my problem by using the simple theme. And adding custom css to format my form. Thanks –