mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 23:43:12 +00:00
fix #499 l'appui sur la touche ENTER quand on est dans la zone de titre d'un envois pusch, recharge l'interface de prod.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
;(function(window){
|
;
|
||||||
|
(function(window){
|
||||||
|
|
||||||
var Feedback = function($container, context){
|
var Feedback = function($container, context){
|
||||||
this.container = $($container);
|
this.container = $($container);
|
||||||
@@ -186,6 +187,14 @@
|
|||||||
|
|
||||||
var $dialog = p4.Dialog.Create(options, 2);
|
var $dialog = p4.Dialog.Create(options, 2);
|
||||||
|
|
||||||
|
$dialog.getDomElement().bind("keypress", function(event){
|
||||||
|
if(event.which){
|
||||||
|
if(event.which==13){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var $FeedBackForm = $('form[name="FeedBackForm"]', $container);
|
var $FeedBackForm = $('form[name="FeedBackForm"]', $container);
|
||||||
|
|
||||||
var callback = function(rendered){
|
var callback = function(rendered){
|
||||||
@@ -195,9 +204,12 @@
|
|||||||
$('input[name="name"]', $dialog.getDomElement()).val($('input[name="name"]', $FeedBackForm).val());
|
$('input[name="name"]', $dialog.getDomElement()).val($('input[name="name"]', $FeedBackForm).val());
|
||||||
$('textarea[name="message"]', $dialog.getDomElement()).val($('textarea[name="message"]', $FeedBackForm).val());
|
$('textarea[name="message"]', $dialog.getDomElement()).val($('textarea[name="message"]', $FeedBackForm).val());
|
||||||
$('.' + $this.Context, $dialog.getDomElement()).show();
|
$('.' + $this.Context, $dialog.getDomElement()).show();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
p4.Mustache.Render('Feedback-SendForm', {language:language}, callback);
|
p4.Mustache.Render('Feedback-SendForm', {
|
||||||
|
language:language
|
||||||
|
}, callback);
|
||||||
}).button();
|
}).button();
|
||||||
|
|
||||||
$('.user_content .badges', this.container).disableSelection();
|
$('.user_content .badges', this.container).disableSelection();
|
||||||
@@ -235,7 +247,9 @@
|
|||||||
|
|
||||||
$('.user_content .badges .badge .deleter', this.container).live('click', function(event){
|
$('.user_content .badges .badge .deleter', this.container).live('click', function(event){
|
||||||
var $elem = $(this).closest('.badge');
|
var $elem = $(this).closest('.badge');
|
||||||
$elem.fadeOut(function(){$elem.remove();});
|
$elem.fadeOut(function(){
|
||||||
|
$elem.remove();
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -274,7 +288,10 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
p4.Lists.create($input.val(), function(list){$input.val('');list.addUsers(users);});
|
p4.Lists.create($input.val(), function(list){
|
||||||
|
$input.val('');
|
||||||
|
list.addUsers(users);
|
||||||
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@@ -365,7 +382,9 @@
|
|||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: '/prod/push/user/' + usr_id + '/',
|
url: '/prod/push/user/' + usr_id + '/',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {usr_id : usr_id},
|
data: {
|
||||||
|
usr_id : usr_id
|
||||||
|
},
|
||||||
success: function(data){
|
success: function(data){
|
||||||
if(typeof callback === 'function')
|
if(typeof callback === 'function')
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user