Skip to content

Instantly share code, notes, and snippets.

@rnjailamba
Created February 18, 2016 07:50
Show Gist options
  • Save rnjailamba/2e8e247261d61cc159ed to your computer and use it in GitHub Desktop.
Save rnjailamba/2e8e247261d61cc159ed to your computer and use it in GitHub Desktop.
Editing Create modal pop up from web page.
<li><a id='dialog_trigger_operations' data="/csportalNew/operations_view/<?php echo $order->order_id ?>" data-toggle="tooltipOperationsView" >View and edit Operation view</a> </li>
&lt;div id = 'dialog_operations'&gt;&lt;/div&gt;
&lt;script&gt;
  $(document).ready(function(){
      $("#dialog_operations").dialog({
   autoOpen: false,
   position: 'center' ,
   title: 'OPERATION VIEW',
   draggable: false,
   width : 950,
   height : 500, 
   resizable : true,
   modal : true,
   open: function() {
           jQuery('.ui-widget-overlay').bind('click', function() {
               jQuery('#dialog_operations').dialog('close');
           })
       },
       buttons: {
           "Cancel": function() {
               $( this ).dialog( "close" );
           }
       }
});
$("#dialog_trigger_operations").click( function() {
var url = $("#dialog_trigger_operations").attr("data");
// console.log(url);
   $("#dialog_operations").load(url+"?source='order_view'", function() {
       $("#dialog_operations").dialog("open");
   });
})
  });
&lt;/script&gt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment