kendo.ui.progress not working as expected - kendo-ui

I'm using the free version of kendo UI web. I'm showing a progress indicator using the code:
kendo.ui.progress($('#loginform'), true);
where $('#loginform') is the div that I'd like to show the progress indicator over. I was under the impression the progress indicator would be contained and centered within the div that I provide to the function. However, it appears to be showing over the entire page instead. I've also tried:
kendo.ui.progress('#loginform', true);
and
kendo.ui.progress('loginform', true); (which caused an error).
I assume I'm not wrong about the way it's supposed to work, otherwise why would the function take the name of a div at all. Any ideas as to what I'm doing wrong?
As far as I can tell, I'm doing the same thing. Here is my HTML:
<form class="form-signin" id="loginform">
<h2 class="form-signin-heading" style="color:whitesmoke;">Please Sign In</h2>
<input type="text" id="username" class="input-block-level" placeholder="Username" />
<input type="password" id="password" class="input-block-level" placeholder="Password" />
<label class="checkbox" style="color:whitesmoke;">
<input type="checkbox" id="remember" value="remember-me" /> Remember me
</label>
<button type="button" id="login" class="btn btn-large btn-success">OK</button>
<button type="button" id="cancel" class="btn btn-large btn-danger">Cancel</button>
</form>
Sorry, I can't seem to figure out how to format it correctly.
I think the jsFiddle example only looks centered because that tab is the entire page in the example.

You need to define positioning for loginform either relative, absolute or fixed.
Try adding the following CSS definition:
#loginform {
position: relative;
}
You need this because the progress tries to completely cover the HTML element that contains it. To do that, it defineswidth and height as 100%. So, to constrain its size to the size of the container (and do not overflow it), you need to define the position as one of these.
It might also work if some of the ancestor have one of these positioning. In this case it will cover the 100% of this and not the 100% of the immediate ancestor.
Example: Define the following styles
#container1 {
position: fixed;
border: 1px solid red;
margin: 3px;
}
#container2 {
position: static;
border: 1px solid green;
margin: 30px;
}
and the HTML as:
<div id="container1">
<div id="container2">
<form class="form-signin" id="loginform">
<h2 class="form-signin-heading" style="color:whitesmoke;">Please Sign In</h2>
<input type="text" id="username" class="input-block-level" placeholder="Username"/>
<input type="password" id="password" class="input-block-level" placeholder="Password"/>
<label class="checkbox" style="color:whitesmoke;">
<input type="checkbox" id="remember" value="remember-me"/> Remember me </label>
<button type="button" id="login" class="btn btn-large btn-success">OK</button>
<button type="button" id="cancel" class="btn btn-large btn-danger">Cancel</button>
</form>
</div>
</div>
You will see that it covers 100% of container1 since this is fixed while container2 is static.

Related

How to catch Mailchimp validation error (mce-inline-error)

this is my email form
<form action="https://gmail.us11.list-manage.com/subscribe/post?u=XXXXXX" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll" style="display: flex;flex-direction: row;">
<div class="mc-field-group">
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
<span id="mce-EMAIL-HELPERTEXT" class="helper_text"></span>
</div>
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_fb16c0b54b243c41cf0ba431c_6cbe3da72c" tabindex="-1" value=""></div>
<div class="optionalParent">
<div class="clear foot">
<button type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="rehab-btn-secondary">Send</button>
</div>
</div>
</div>
</form>
however if I input "aaa" as email address which is wrong. I am getting this error
Which obviosly breaks our UI,
by checking on the HTML in dev tools, it creates a new div with id "mce-inline-error"
out of the blue, how can i control this error so i can style it properly in our UI?
This is getting annoying google cant give me answer.
If there are no answers, what type of work around can you guys suggest?

tailwind behaves differently on iphone

I have a form that contains an email input and a submit button. On Iphone, when I type something on email and delete it, button slide down a little bit. I use tailwind css and what causes this problem?
<form wire:submit.prevent="submit">
<span class="inline-grid">
<input type="text" name="email" wire:model.defer="email" class="form-control relative flex-auto desktop:rounded-lg below-desktop:rounded placeholder-gray-300 desktop:h-14 below-desktop:h-8 xl:w-72 small-desktop:w-60" placeholder="{{__('E-mail')}}" aria-label="Search" aria-describedby="button-addon2" style="border-radius: 4px;">
</span>
<button type="submit" class="bg-blue-400 text-base desktop:rounded-lg below-desktop:rounded text-white desktop:h-14 below-desktop:h-8 px-6 desktop:ml-2 xl:w-32 small-desktop:w-24" style="border-radius: 4px;">{{ __('Send') }}</button>
</form>

Kendo UI styling breaks form control layout

I am trying to build a form with a simple bootstrap row/column layout. Before I add the Kendo class styling the controls appear stacked as expected:
<div class="col-lg-3 form-group">
<label for="CaseName" class="form-label">Name</label>
<input type="text" class="form-control-sm" />
</div>
Once I add the Kendo class for styling the layout becomes horizontal:
<div class="col-lg-3 form-group">
<label for="CaseName" class="form-label">Name</label>
<input type="text" class="form-control k-textbox" />
</div>
Anyone know how to override whatever is happening in the k-textbox class?
Thanks.
As per Kendu Guide on Bootstrap here: Using form-control Bootstrap CSS Class, we have to use custom styling to ensure the form-label and form-control behaves as expected:
<style>
.form-control.k-widget
{
padding: 0;
width: 100%;
height: auto;
}
.form-control.k-widget:not(.k-autocomplete)
{
border-width: 0;
}
</style>

Trying to create a text input with an attached button

I'm trying to create a textbox with an attached button that looks similar to a Kendo DatePicker or NumericTextBox. This is close, but it doesn't quite line up. Any help straightening this up would be appreciated.
<style>
.unselectable
{
-moz-user-select: -moz-none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
<span class="k-widget k-datepicker k-header" style="width: 136px">
<span class="k-picker-wrap k-state-default">
<input class="k-input" type="text" name="searchParam" id="searchParam" placeholder="Name ..." />
<span class="unselectable k-button k-select">
<img class="unselectable" src="~/Images/search_flashlight_16.png" />
</span>
</span>
</span>
Everything you should need is this:
See jsFiddle DEMO
<span class="k-textbox k-button k-space-right">
<input value="This is the value" />
<a class="k-icon k-filter"></a>
</span>
Also see the "documentation" (Look at the source for the example) for this here.
EDIT:
Since the asker really wanted it to behave as a button (i.e. the click-effect), just add the k-button class to the outter span.
I know that this is an old question, but I felt like Shion's answer wasn't quite what I was looking for. So after a bit of experimenting I came up with this which doesn't give you the flicker of the button:
<span class="k-picker-wrap k-state-default">
<input style="width: 100%;" type="text" class="k-input">
<span unselectable="on" class="k-select" aria-label="select" role="button">
<span class="k-icon k-i-filter"></span>
</span>
</span>
Live Example: Dojo

in zurb foundation, can i insert one form inside "reveal" popup?

and how can I trasmit data between popup and page that have called popup?
I would like to do a ajax form for user registration inside popup "reveal" in zurb foundation.
Do you think is possible?
This answer might be a little late, but you can absolutely put a form into the reveal popup. For instance, if you wanted a login dialog to show up when they click a login button:
At the bottom of your HTML (after all the rows), create the content for the popup:
<div id="login-modal" class="reveal-modal" style="width: 400px; background: black; color: white;">
<h2>Login</h2>
<form id="login-form" class="six">
<div class="row">
<label for="username">Username</label>
<input type="text" name="username" />
<label for="password">Password</label>
<input type="password" name="password" />
</div>
<div class="row">
<div class="right" style="margin-top: 20px;">
<button type="reset" class="button radius alert">Reset</button>
<button type="submit" class="button radius">Login</button>
</div>
</div>
</form>
<a class="close-reveal-modal">×</a>
</div>
Then you can display it using one of their methods. The new foundation 3.0 let you display it super easy like:
<a href="#"
data-reveal-id="login-modal"
data-animation="fadeAndPop"
data-animationspeed="300"
data-closeonbackgroundclick="true"
data-dismissmodalclass="close-reveal-modal">Login</a>
Hope that helps!
try this in app.js.
Then use reveal class on any anchor
$('a.reveal').click(function(event) {
event.preventDefault();
var $div = $('<div>').addClass('reveal-modal').appendTo('body'),
$this = $(this);
$div.empty().html('<p align="center"><img src="application/public/loading.gif" /></p>').append('<a class="close-reveal-modal">×</a>').reveal();
$.get($this.attr('href'), function(data) {
return $div.empty().html(data).append('<a class="close-reveal-modal">×</a>').reveal();
});
});

Resources