2010-11-18 14:56:47 +00:00
jQuery ( document ). ready ( function () {
2011-04-26 10:00:41 -02:00
jQuery ( "#prevalues .text" ). editable ( function ( value , settings ) { $ ( this ). html ( value ); ResetValues (); }, { onblur : 'submit' , tooltip : 'Click to edit' , cssclass : 'inlineEditor' });
2010-11-18 14:56:47 +00:00
jQuery ( "#prevalues tbody" ). sortable ({
2010-11-19 09:24:28 +00:00
items : "tr:not(.header)" ,
2010-11-18 14:56:47 +00:00
handle : '.handle' ,
update : function () {
ResetValues ();
}
});
2010-11-19 09:24:28 +00:00
2010-11-18 14:56:47 +00:00
});
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 + "¶" ;
2010-11-18 14:56:47 +00:00
});
jQuery ( ".valuesHiddenInput" ). val ( val );
}
2011-08-03 07:49:08 -02:00
function ConfirmPrevalueDelete () {
return confirm ( "Are you sure you want to delete" );
}