OpeneERP: How to create a button with no icon (only text on it) - button

I would like to create a button with no icon, only a text that i display.
I 've tried to not put 'icon' parameter but it doesn't work.
Here's the code i've wrote:
<button name="open_popup" string="Quantités produites" type="object"/>

i've known a possibility, but i think that was a listview bug in chrome or something.
maybe you should try class="oe_link" on your button, so it looks like a link.
<button name="open_popup" string="Quantités produites"
type="object" class="oe_link"/>

In version 7 you can use class="oe_link":
<button name="open_popup" string="Quantités produites" type="object" class="oe_link"/>

Related

Bootstrap4 Disabled button white instead of supposed color

I am using a bootstrap button on one of my page, that is disabled, and the styling seems to not be working properly
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
<button disabled class="btn btn-primary">suivant</button>
<button class="btn btn-primary disabled">suivant</button>
I tried these 2 ways and the result look like this for both approach: initial look || on Mouse over
EDIT: Important to mention that i only have bootstrap4, no personnal style sheet and no other themes
This is a react Project, className is used instead of class
https://codepen.io/jacobweyer/pen/ybqxBK
I've updated this codepen to show Bootstrap4 buttons with BS4 alpha 6. They look like they show up as intended in and outside of React.
<button class="btn btn-primary">suivant</button>
<button class="btn btn-primary" disabled>suivant disabled</button>
Another stylesheet was making conflict with bootstrap that i wasnt aware of
thanks to #MichaelCoker for making me search trough my project again

wcag compliance issue with play/pause button

As part of making our site WCAG compliance we are adding play/pause buttons for carousel.Here the screen reader is reading in different manner
<div id="imageCarouselPlayBtn" class="cblt-button imageCarouselPlayBtn" tabindex ="0">
►
</div>
<div id="imageCarouselPauseBtn" class="cblt-button imageCarouselPauseBtn" tabindex ="0">
‖
</div>`
in this case screen reader is reading pause button as double vertical line and group for play button.
if we use sprite image instead it is reading as group for both play/pause buttons.
Is there any good solution for this problem instead of using image tags for both ?
You could use WAI-ARIA’s aria-label attribute:
It provides the user with a recognizable name of the object.
Also: Is there a reason why you don’t use button/input instead of div for the play/pause buttons? With buttons, your markup could look like:
<button type="button" aria-label="Play">►</button>
<button type="button" aria-label="Pause">‖</button>

Radio buttons not toggling

I have radio buttons that are styled to look like bootstrap toggle buttons, as follows:
<h:panelGroup>
<div id="sortButtons" class="btn-group" data-toggle="buttons-radio">
<h:commandButton type="button" styleClass="btn btn-inverse active" value="Price"><f:ajax listener="#{searchResultsRoundtripBean.sortByPrice}"/></h:commandButton>
<h:commandButton type="button" styleClass="btn btn-inverse" value="Departure"><f:ajax listener="#{searchResultsRoundtripBean.sortByTime}"/></h:commandButton>
</div>
</h:panelGroup>
The styling looks fine, here's an image of it: http://imgur.com/W1ewjCA
The problem, however, is that clicking the buttons does not toggle them. The event hooked up to them fires, but they are not toggled. Am I doing something silly here, or is there some caveat that I'm not aware of?
You need to add the render attribute to your ajax tag. It defaults to 'none'. #this should probably fix your situation.
<f:ajax render="#this" listener="..." />
http://www.jsftoolbox.com/documentation/help/12-TagReference/core/f_ajax.html
edit:
#this is most likely not what your looking for, but instead #form or the container id where the list you sort is located.

What is -ms-clear equivalent in WebKit and Mozilla?

As shown here: http://msdn.microsoft.com/library/windows/apps/Hh465498
Do Mozilla and Webkit have equivalent options? The clear button on text inputs is good for touch screen apps. I don't want any JavaScript workarounds and an easy CSS fix would be very helpful.
I already know this is possible with JavaScript, but IE 10 has an inbuilt solution for displaying clear button, and I'm wondering if any other browsers have similar options?
The short answer is No.
There is no way to use CSS to generate a button that will clear the contents of an input without the use of JavaScript.
The clear button is built in functionality to IE10. -ms-clear is not what generates it, but simply a way to target it for styling.
I should mention though, that the <input type=search>​ field in Chrome will give you a clear button as well, but not on normal <input type=text>​ fields.
Was looking for same issue so I made a jQuery plugin (TextClear) to offer the same feature :
here is the download link
and about trick behind this:
set background image on input text field and position it to the right corner like
{
background-image: url('imagesUrl');
background-repeat: no-repeat;
background-position: right center;
background-size: 10% 90%;
padding-right: 1%;
}
And then handling click event on it by mapping its position (you can check the source code as well for detailed logic)
You cannot actually do this using css..
But you can user jQuery, and its simple. All you gotto do is this...
HTML code:
<form id="myform" method="post">
<input type.... />
<input type.... />
<input type.... />
<input type="button" id="clear" name="clear" />
</form>
jQuery Code:
$("#clear").click(function(){
$("#myform").reset();
});
And this will work.. But the form tag is necessary.
Y U NO like Javascript? Look how easy jQuery makes this process:
Markup
<form>
<input type="text">
<button>X</button>
</form>
jQuery
$("form").on("click", "button", function() {
$("input").val("");
return false;
});​​​​​
http://jsfiddle.net/QyE92/
With CSS, you can style the button and position it appropriately to mimic the "x" in the metro interface almost exactly.

align submit and cancel button with bootstrap

I am using bootstrap 2.0 within my rails app (using the bootstrap-sass gem) and am having trouble getting a submit button aligned with a cancel button.
Here's the code snippet from the form in the html.erb file:
<div class="span3">
<%= f.submit class: "btn btn-primary" %>
<button type="button" class="btn">Cancel</button>
</div>
Here's the HTML it produces:
<input class="btn btn-primary" type="submit" value="Add Person" name="commit">
<button class="btn" type="button">Cancel</button>
And here's what it looks like in firefox 14.0.1. When I look at the
Note: Adding input-append to the div gets me close (see pic below) but is still off a bit--note that cancel is still a bit lower and that the rounded corners on the right side of the add person button are cut off.
How can I get these two buttons to align properly?
Update
I am using Firefox 14.0.1. When I look at the jsfiddle created by #Vestride to duplicate this problem here's what I see:
I am happy with the first result, but when I add the exact same code to my site, I don't get the same result. Instead I get the messed up alignment above. I wonder what this means? Maybe that my CSS for bootstrap is messed up?
Update 7/27
In response to Vestride's latest suggestion, here are the buttons as they show in my Firefox from the fiddle Vestride put together. Note, there's no improvement with changing from input to submit.
I made a jsfiddle http://jsfiddle.net/Vestride/YT3sq but was unable to duplicate your problem. They align perfectly for me (Chrome 21). What browser are you using? In the second example I added a btn-group class to the container element. That might also solve your problem.
Edit:
Try making your <input /> a <button type="submit">. Worked in Firefox for me. I updated the fiddle too.
I know it's an old issue, but using Bootstrap 4 I had the same problem. What solved it for me is adding margin-bottom: 0 or mb-0 class using bootstrap classes on the submit button.

Resources