Fix: bug due to non complete removal of a buttonset.
Joris van Zundert [Tue, 2 Jul 2013 15:16:21 +0000 (17:16 +0200)]
root/js/relationship.js

index a6b1bed..39d8f50 100644 (file)
@@ -1053,22 +1053,20 @@ $(document).ready(function () {
       Detach: function ( evt ) { 
         $(evt.target).button("disable");
         var form_values = $('#detach_collated_form').serialize();
-      ncpath = getTextURL( 'duplicate' );
-      var jqjson = $.post( ncpath, form_values, function(data) {
+        ncpath = getTextURL( 'duplicate' );
+        var jqjson = $.post( ncpath, form_values, function(data) {
         detach_node( data );
         $(evt.target).button("enable");
+        $( this ).dialog( "close" );
       });
      }
-    },     create: function(event, ui) {
+    },
+    create: function(event, ui) {
         var buttonset = $(this).parent().find( '.ui-dialog-buttonset' ).css( 'width', '100%' );
         buttonset.find( "button:contains('Cancel')" ).css( 'float', 'right' );
     },
     open: function() {
         $( this ).dialog( "option", "width", 200 );
-        $( this ).dialog( "option", "buttons",
-            [{ text: "Button_1", click: multipleselect_buttonset['button1'] },
-             { text: "Button_2", click: multipleselect_buttonset['button2'] },
-             { text: "Cancel", click: multipleselect_buttonset['cancel'] }] );
         $(".ui-widget-overlay").css("background", "none");
         $('#multipleselect-form-status').empty();
         $("#dialog_overlay").show();