Zeile 1 | Zeile 1 |
---|
var inlineEditor = {
|
var inlineEditor = {
|
| timeouts: [],
|
init: function() {
|
init: function() {
|
$(document).ready(function()
| $(function()
|
{ inlineEditor.bindSubjects(); });
| { inlineEditor.bindSubjects(); });
|
Zeile 36 | Zeile 38 |
---|
{ $.each(values.errors, function(i, message) {
|
{ $.each(values.errors, function(i, message) {
|
$.jGrowl(lang.post_fetch_error + ' ' + message);
| $.jGrowl(lang.post_fetch_error + ' ' + message, {theme:'jgrowl_error'});
|
}); $(this).html($('#tid_' + tid + '_temp').html()); }
| }); $(this).html($('#tid_' + tid + '_temp').html()); }
|
Zeile 50 | Zeile 52 |
---|
$('#tid_' + tid + '_temp').remove(); }, data: function(value, settings)
|
$('#tid_' + tid + '_temp').remove(); }, data: function(value, settings)
|
{
| {
|
return $(value).text(); } });
// Hold event
|
return $(value).text(); } });
// Hold event
|
$(this).bind("mousedown", function(e)
| $(this).on("mousedown", function(e)
|
{ // Take tid out of the id attribute id = $(this).attr('id');
| { // Take tid out of the id attribute id = $(this).attr('id');
|
Zeile 64 | Zeile 66 |
---|
// We may click again in the textbox and we'd be adding a new (invalid) clone - we don't want that! if(!$('#tid_' + tid + '_temp').length)
|
// We may click again in the textbox and we'd be adding a new (invalid) clone - we don't want that! if(!$('#tid_' + tid + '_temp').length)
|
$(this).clone().attr('id','tid_' + tid + '_temp').css('display','none').appendTo("body"); setTimeout(inlineEditor.jeditableTimeout, 700, tid);
| $(this).clone().attr('id','tid_' + tid + '_temp').hide().appendTo("body");
inlineEditor.timeouts[tid] = setTimeout(inlineEditor.jeditableTimeout, 700, tid);
|
});
|
});
|
$(this).bind('mouseup mouseleave', function()
| $(this).on('mouseup mouseleave', function()
|
{
|
{
|
// Clear all time outs var wid = window.setTimeout(function() {}, 0);
while(wid--) { window.clearTimeout(wid); // will do nothing if no timeout with id is present }
| window.clearTimeout(inlineEditor.timeouts[tid]);
|
}); });
| }); });
|