New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dialog #366
Comments
функция addTouchEvents определена в metro-touch-handler.js ее надо включить в проект |
Действительно, не подумал. |
Без кода я не могу сказать, почему у Вас вылезает ошибка. К сожалению я читать мысли не умею :( |
how i can send information from ajax in a box dialog? |
Use $.Dialog.content() |
It`s maybe help $(document).ready(function(){
$(".keepDialog").on('click', function(){
$.Dialog({
overlay: true,
shadow: true,
flat: true,
icon: '<span class="icon-mail"></span>',
title: 'Contact',
content: $("#contactDialog").html(),
padding: 10,
onShow: function(_dialog){
$('.window input[type="submit"]').click(function() {
var name1 = $('.window input[name=name]').val();
var tel1 = $('.window input[name=tel]').val();
var email1 = $('.window input[name=email]').val();
var mess1 = $('.window textarea[name=mess]').val();
var data_html = '';
var error_text = '';
if (name1 == "") {
var n = $('.window input[name=name]');
n.parent('div.input-control').addClass('warning-state');
n.attr('placeholder','Input name');
}
if (mess1 == "") {
var m = $('.window textarea[name=mess]');
m.attr('placeholder','Input message').css('border-color', '#fa6800');
}
if (error_text != '') {
$('.window .alarm_no').show().html(error_text);
$('.window .alarm_no').fadeTo(500, 1);
} else {
data_html = $('.window form').serialize();
$.ajax({
type: 'POST',
url: '/contacts/',
data: data_html,
success: function(msg) {
if (msg == 'sent') {
$.Dialog.close();
$.Dialog({
overlay: true,
padding: 10,
width: 400,
flat: true,
content: '<div class="text-center"><h2>Sent</h2><button class="command-button"><i class="icon-cancel-2 on-left"></i>Close<small>Thank you!</small></button></div>',
onShow: function(_dialog1){
$('button.command-button').click(function() {
$.Dialog.close();
});
}
});
} else {
$('.window .alarm_no').show().html('Error. Again!');
$('.window .alarm_no').fadeTo(500, 1, function() {
$('.window .alarm_no').delay(500).fadeTo(500, 0, function() {
$('.window .alarm_no').hide();});
});
}
}
});
}
return false;
});
}
});
});
}); Еще один глупый вопрос, как сделать, чтобы при нажатии отправить, не происходило перезагрузки страницы, как это было раньше... Спасибо, стало вообще круто! |
вернуть false |
Правильнее будет, я думаю: element.on('click', function( e ) {
e.preventDefault();
/* code */
}); |
можно и так |
thank's so much guys i hope to learn more |
and as I can do to "modal false" in the popup window so it does not disappear? |
In 2.* version Dialog d’s not have non-modal state |
ok thanks |
Any idea on how to position Dialog? Because 'position' attribute seems to be obsolete, it doesn't work. Maybe something like this: onShow: function (_dialog) { also doesn't work. |
The position attribute hasn't been implemented yet and is unappropriated or obsolete. var dialog = $.Dialog({params}).css("top", '100px');
dialog.animate({top: 150}); You can use any jQuery methods on it. |
Thank you very much! This works great! |
Очень нравятся ваши работы!
Пытаюсь потестить, подскажите в чем проблема с dialog
выдает вот такою ошибку
Uncaught ReferenceError: addTouchEvents is not defined
...и если я правильно понимаю обработка форм и прочее можно размещать, здесь: onShow: function(_dialog){
Спасибо!
The text was updated successfully, but these errors were encountered: