Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Mar 12, 2012
2 parents 36db79c + 0b67e88 commit 117bde1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions htdocs/core/js/editinplace.js
Expand Up @@ -48,8 +48,7 @@ $(document).ready(function() {
getResult(this, result);
},
onreset : function(result, settings) {
$('#editval_' + $('.editval_textarea').attr('id').substr(8)).hide();
$('#viewval_' + $('.editval_textarea').attr('id').substr(8)).show();
getDefault(settings);
}
});
$('.editkey_textarea').hover(
Expand Down Expand Up @@ -93,8 +92,7 @@ $(document).ready(function() {
getResult(this, result);
},
onreset : function(result, settings) {
$('#editval_' + $('.editval_ckeditor').attr('id').substr(8)).hide();
$('#viewval_' + $('.editval_ckeditor').attr('id').substr(8)).show();
getDefault(settings);
}
});
$('.editkey_ckeditor').hover(
Expand Down Expand Up @@ -134,8 +132,7 @@ $(document).ready(function() {
getResult(this, result);
},
onreset : function(result, settings) {
$('#editval_' + $('.editval_string').attr('id').substr(8)).hide();
$('#viewval_' + $('.editval_string').attr('id').substr(8)).show();
getDefault(settings);
}
});
$('.editkey_string').hover(
Expand Down Expand Up @@ -175,8 +172,7 @@ $(document).ready(function() {
getResult(this, result);
},
onreset : function(result, settings) {
$('#editval_' + $('.editval_numeric').attr('id').substr(8)).hide();
$('#viewval_' + $('.editval_numeric').attr('id').substr(8)).show();
getDefault(settings);
}
});
$('.editkey_numeric').hover(
Expand Down Expand Up @@ -216,8 +212,7 @@ $(document).ready(function() {
getResult(this, result);
},
onreset : function(result, settings) {
$('#editval_' + $('.editval_datepicker').attr('id').substr(8)).hide();
$('#viewval_' + $('.editval_datepicker').attr('id').substr(8)).show();
getDefault(settings);
}
});
$('.editkey_datepicker').hover(
Expand Down Expand Up @@ -260,8 +255,7 @@ $(document).ready(function() {
getResult(this, result);
},
onreset : function(result, settings) {
$('#editval_' + $('.editval_select').attr('id').substr(8)).hide();
$('#viewval_' + $('.editval_select').attr('id').substr(8)).show();
getDefault(settings);
}
});
$('.editkey_select').hover(
Expand Down Expand Up @@ -324,6 +318,12 @@ $(document).ready(function() {
}
}

function getDefault(settings) {
var htmlname = $(settings).attr('id').substr(8);
$('#editval_' + htmlname).hide();
$('#viewval_' + htmlname).show();
}

$('.edit_autocomplete').editable(urlSaveInPlace, {
type : 'autocomplete',
id : 'field',
Expand Down

0 comments on commit 117bde1

Please sign in to comment.