* fix ajaxform not work.

This commit is contained in:
Catouse
2018-11-15 10:18:14 +08:00
parent e3efb2e5af
commit f724c7ddb6
5 changed files with 12 additions and 34 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<?php
js::import($jsRoot . 'jquery/form/min.js');
js::import($jsRoot . 'jquery/form/zentao.js');
// js::import($jsRoot . 'jquery/form/min.js');
// js::import($jsRoot . 'jquery/form/zentao.js');
// Now jquery.form is built in zui zentao edition, no need to include them.
?>
+3 -25
View File
@@ -135,35 +135,13 @@ $(function()
$('[data-toggle=tooltip]').tooltip();
/* First unbind ajaxForm for form.*/
$("form[data-type='ajax']").unbind('submit');
/* Bind ajaxForm for form again. */
$.ajaxForm("form[data-type='ajax']", function(response)
{
if(response.message) alert(response.message);
if(response.locate)
{
if(response.locate == 'reload' && response.target == 'parent')
{
parent.$.cookie('selfClose', 1);
parent.$.closeModal(null, 'this');
}
else
{
location.href = response.locate;
}
}
return false;
});
initSteps();
$('#pri').on('change', function()
{
{
var $select = $(this);
var $selector = $select.closest('.pri-selector');
var value = $select.val();
$selector.find('.pri-text').html('<span class="label-pri label-pri-' + value + '" title="' + value + '">' + value + '</span>');
$selector.find('.pri-text').html('<span class="label-pri label-pri-' + value + '" title="' + value + '">' + value + '</span>');
});
})
});
-1
View File
@@ -11,7 +11,6 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/form.html.php';?>
<?php js::set('lblDelete', $lang->testcase->deleteStep);?>
<?php js::set('lblBefore', $lang->testcase->insertBefore);?>
<?php js::set('lblAfter', $lang->testcase->insertAfter);?>
+3 -3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long