* fix setFormAction error in mac safari.
This commit is contained in:
@@ -65,7 +65,7 @@ js::set('browseType', $browseType);
|
||||
echo html::selectButton();
|
||||
|
||||
$actionLink = $this->createLink('task', 'batchEdit', "projectID=$projectID");
|
||||
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
|
||||
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink', '', '#projectTaskForm')\"" : "disabled='disabled'";
|
||||
|
||||
echo "<div class='btn-group dropup'>";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
@@ -73,11 +73,11 @@ js::set('browseType', $browseType);
|
||||
echo "<ul class='dropdown-menu' id='moreActionMenu'>";
|
||||
|
||||
$actionLink = $this->createLink('task', 'batchClose');
|
||||
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink','hiddenwin')\"" : "class='disabled'";
|
||||
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink','hiddenwin', '#projectTaskForm')\"" : "class='disabled'";
|
||||
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
|
||||
|
||||
$actionLink = $this->createLink('task', 'batchCancel');
|
||||
$misc = $canBatchCancel ? "onclick=\"setFormAction('$actionLink','hiddenwin')\"" : "class='disabled'";
|
||||
$misc = $canBatchCancel ? "onclick=\"setFormAction('$actionLink','hiddenwin', '#projectTaskForm')\"" : "class='disabled'";
|
||||
echo "<li>" . html::a('#', $lang->task->cancel, '', $misc) . "</li>";
|
||||
|
||||
if($canBatchChangeModule)
|
||||
@@ -90,7 +90,7 @@ js::set('browseType', $browseType);
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$actionLink = $this->createLink('task', 'batchChangeModule', "moduleID=$moduleId");
|
||||
echo "<li class='option' data-key='$moduleID'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "</li>";
|
||||
echo "<li class='option' data-key='$moduleID'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin', '#projectTaskForm')\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
@@ -114,7 +114,7 @@ js::set('browseType', $browseType);
|
||||
foreach ($memberPairs as $key => $value)
|
||||
{
|
||||
if(empty($key)) continue;
|
||||
echo "<li class='option' data-key='$key'>" . html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\")", $value, '', '') . '</li>';
|
||||
echo "<li class='option' data-key='$key'>" . html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", null, \"#projectTaskForm\")", $value, '', '') . '</li>';
|
||||
}
|
||||
echo "</ul>";
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
|
||||
+2
-1
@@ -547,7 +547,8 @@ function setFormAction(actionLink, hiddenwin, obj)
|
||||
$form.attr('action', actionLink);
|
||||
|
||||
// Check safari for bug #1000, see http://pms.zentao.net/bug-view-1000.html
|
||||
var isSafari = navigator.userAgent.indexOf('AppleWebKit') > -1;
|
||||
var userAgent = navigator.userAgent;
|
||||
var isSafari = userAgent.indexOf('AppleWebKit') > -1 && userAgent.indexOf('Safari') > -1 && userAgent.indexOf('Chrome') < 0;
|
||||
if(isSafari)
|
||||
{
|
||||
var idPreffix = 'checkbox-fix-' + $.zui.uuid();
|
||||
|
||||
Reference in New Issue
Block a user