⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Read function



Robert

Robert
  • profile picture
  • Member

Posted 21 May 2014 - 06:21 AM

I wanted to ask if there is a way to remove the back to list confirmation since there is no need for it at the read .. nothing is modified.

Thanks for any help.


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 21 May 2014 - 07:31 AM

i can tell u to do this in flexigrid.. as i dont use the other theme but u might update the same ways in others too

well u need to tweek the code..

in the read.php  ----- at the bottom there is a variable declared - message_alert_edit_form

this - set its value to "" instead of whatever is set...

 

second.. in flexigrid-edit.js ... there at the bottom there's a cancel button click event code..

there u need to change is..

                       if(message_alert_edit_form != '') {
				if( confirm( message_alert_edit_form ) )
				{
					window.location = list_url;
				} else {
					window.location = list_url;
				}
			}

this way u will be able to eliminate the popup confirmation without disturbing the same in edit too :)

 

Happy GCing :)


Robert

Robert
  • profile picture
  • Member

Posted 21 May 2014 - 11:01 AM

So something like :

<script>
	var validation_url = '<?php echo $validation_url?>';
	var list_url = '<?php echo $list_url?>';

	var message_alert_edit_form = '';
	var message_update_error = "<?php echo $this->l('update_error')?>";
</script>

and 

		$('#cancel-button').click(function(){
            if(message_alert_edit_form != '') {
				if( confirm( message_alert_edit_form ) )
				{
					window.location = list_url;
				} else {
					window.location = list_url;
				}
			}

			return false;
		});

	}

im doing something wrong or ....


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 22 May 2014 - 13:37 PM

no it seems to be correct!!!


Robert

Robert
  • profile picture
  • Member

Posted 23 May 2014 - 08:49 AM

Dose not work .. when clicking back nothing happens ...