Files
Umbraco-CMS/components/editorControls/KeyValuePrevalueEditor.js

40 lines
843 B
JavaScript
Raw Normal View History


jQuery(document).ready(function () {
jQuery("#prevalues .text").editable(function (value, settings) { $(this).html(value); ResetValues(); }, { onblur: 'submit', tooltip: 'Click to edit', cssclass: 'inlineEditor' });
jQuery("#prevalues tbody").sortable({
items: "tr:not(.header)",
handle: '.handle',
update: function () {
ResetValues();
}
});
});
function ResetValues() {
var val = "";
jQuery("#prevalues .row").each(function () {
var text = jQuery(".text", this).html();
var value = jQuery(".value", this).html();
2012-04-24 09:59:16 -02:00
val += value + "|" + text + "¶";
});
jQuery(".valuesHiddenInput").val(val);
}
function ConfirmPrevalueDelete() {
return confirm("Are you sure you want to delete");
}