This commit is contained in:
leiyong
2024-01-26 05:33:54 +00:00
parent 9a1f021492
commit 4a2e901657
6 changed files with 40 additions and 14 deletions
+18 -2
View File
@@ -190,11 +190,19 @@ class datatable extends control
* @param string $module
* @param string $method
* @param int $system
* @param string $confirm
* @access public
* @return void
*/
public function ajaxReset(string $module, string $method, int $system = 0)
public function ajaxReset(string $module, string $method, int $system = 0, string $confirm = 'no')
{
if($confirm != 'yes')
{
$confirmURL = $this->createLink('datatable', 'ajaxreset', "module={$module}&method={$method}&system={$system}&confirm=yes");
$tip = (int)$system ? $this->lang->datatable->confirmGlobalReset : $this->lang->datatable->confirmReset;
return $this->send(array('result' => 'fail', 'callback' => "zui.Modal.confirm({message: '{$tip}', icon: 'icon-exclamation-sign', iconClass: 'warning-pale rounded-full icon-2x'}).then((res) => {if(res) $.ajaxSubmit({url: '$confirmURL'});});"));
}
$account = !$system ? $this->app->user->account : 'system';
$target = $module . ucfirst($method);
@@ -218,11 +226,19 @@ class datatable extends control
* @param string $module
* @param string $method
* @param string $extra
* @param string $confirm
* @access public
* @return void
*/
public function ajaxSaveGlobal(string $module, string $method, string $extra = '')
public function ajaxSaveGlobal(string $module, string $method, string $extra = '', string $confirm = 'no')
{
if($confirm != 'yes')
{
$confirmURL = $this->createLink('datatable', 'ajaxsaveglobal', "module={$module}&method={$method}&extra={$extra}&confirm=yes");
$tip = $this->lang->datatable->confirmSetGlobal;
return $this->send(array('result' => 'fail', 'callback' => "zui.Modal.confirm({message: '{$tip}', icon: 'icon-exclamation-sign', iconClass: 'warning-pale rounded-full icon-2x'}).then((res) => {if(res) $.ajaxSubmit({url: '$confirmURL'});});"));
}
$target = $module . ucfirst($method);
if(strpos(',product-browse,execution-story,', ",$module-$method,") !== false && strpos(',story,requirement', ",$extra,") !== false) $target .= ucfirst($extra);
+3 -1
View File
@@ -11,9 +11,11 @@ $lang->datatable->customTip = 'Prüfe Spalten zur Anzeige, Verschieben
$lang->datatable->switchToTable = 'Zur Standard Tabelle wechseln';
$lang->datatable->switchToDatatable = 'Zur Erweiterten Tabelle wechseln';
$lang->datatable->required = 'Pflicht';
$lang->datatable->confirmReset = 'Möchten Sie die Einstellungen zurücksetzen?';
$lang->datatable->confirmReset = 'Restoring to default will clear the relevant settings of the list. Are you sure you want to restore to default?';
$lang->datatable->setGlobal = 'Global';
$lang->datatable->resetGlobal = 'Globalen Standard zurücksetzen';
$lang->datatable->confirmSetGlobal = 'After applying it globally, the list of all individuals in the system will default to this rule for display. Are you sure you want to apply it globally?';
$lang->datatable->confirmGlobalReset = 'After restoring to default globally, all individual list settings in the system will be cleared. Are you sure you want to restore to default?';
$lang->datatable->branch = 'Branch';
$lang->datatable->platform = 'Platform';
+3 -1
View File
@@ -11,9 +11,11 @@ $lang->datatable->customTip = 'Check columns to display and drag column
$lang->datatable->switchToTable = 'Common Table';
$lang->datatable->switchToDatatable = 'Advanced Table';
$lang->datatable->required = 'Required';
$lang->datatable->confirmReset = 'Do you want to restore the default settings?';
$lang->datatable->confirmReset = 'Restoring to default will clear the relevant settings of the list. Are you sure you want to restore to default?';
$lang->datatable->setGlobal = 'Set Global';
$lang->datatable->resetGlobal = 'Global Reset';
$lang->datatable->confirmSetGlobal = 'After applying it globally, the list of all individuals in the system will default to this rule for display. Are you sure you want to apply it globally?';
$lang->datatable->confirmGlobalReset = 'After restoring to default globally, all individual list settings in the system will be cleared. Are you sure you want to restore to default?';
$lang->datatable->branch = 'Branch';
$lang->datatable->platform = 'Platform';
+3 -1
View File
@@ -11,9 +11,11 @@ $lang->datatable->customTip = "Cochez les colonnes à afficher et dépl
$lang->datatable->switchToTable = 'Basculer vers le Tableau Commun';
$lang->datatable->switchToDatatable = 'Basculer vers le Tableau Avancé';
$lang->datatable->required = 'Obligatoire';
$lang->datatable->confirmReset = 'Voulez-vous restaurer les paramétres par défaut ?';
$lang->datatable->confirmReset = 'Restoring to default will clear the relevant settings of the list. Are you sure you want to restore to default?';
$lang->datatable->setGlobal = 'Paramétrage Global';
$lang->datatable->resetGlobal = 'Réinitialisation Globale';
$lang->datatable->confirmSetGlobal = 'After applying it globally, the list of all individuals in the system will default to this rule for display. Are you sure you want to apply it globally?';
$lang->datatable->confirmGlobalReset = 'After restoring to default globally, all individual list settings in the system will be cleared. Are you sure you want to restore to default?';
$lang->datatable->branch = 'Branche';
$lang->datatable->platform = 'Plateforme';
+3 -1
View File
@@ -11,9 +11,11 @@ $lang->datatable->customTip = 'Kiểm tra cột để hiển thị và
$lang->datatable->switchToTable = 'Chuyển sang bảng chung';
$lang->datatable->switchToDatatable = 'Chuyển sang bảng nâng cao';
$lang->datatable->required = 'Bắt buộc';
$lang->datatable->confirmReset = 'Bạn có muốn khôi phục lại thiết lập mặc định?';
$lang->datatable->confirmReset = 'Restoring to default will clear the relevant settings of the list. Are you sure you want to restore to default?';
$lang->datatable->setGlobal = 'Thiết lập toàn cục';
$lang->datatable->resetGlobal = 'Thiết lập lại toàn cục';
$lang->datatable->confirmSetGlobal = 'After applying it globally, the list of all individuals in the system will default to this rule for display. Are you sure you want to apply it globally?';
$lang->datatable->confirmGlobalReset = 'After restoring to default globally, all individual list settings in the system will be cleared. Are you sure you want to restore to default?';
$lang->datatable->branch = 'Nhánh';
$lang->datatable->platform = 'Platform';
+10 -8
View File
@@ -6,14 +6,16 @@ $lang->datatable->show = '显示';
$lang->datatable->hide = '隐藏';
$lang->datatable->reset = '恢复默认';
$lang->datatable->custom = '自定义列';
$lang->datatable->customTip = '勾选需要显示的列,拖动列名进行排序。';
$lang->datatable->switchToTable = '切换到简单表格';
$lang->datatable->switchToDatatable = '切换到高级表格';
$lang->datatable->required = '必选';
$lang->datatable->confirmReset = '是否恢复默认设置?';
$lang->datatable->setGlobal = '应用到全局';
$lang->datatable->resetGlobal = '全局恢复默认';
$lang->datatable->custom = '自定义列';
$lang->datatable->customTip = '勾选需要显示的列,拖动列名进行排序。';
$lang->datatable->switchToTable = '切换到简单表格';
$lang->datatable->switchToDatatable = '切换到高级表格';
$lang->datatable->required = '必选';
$lang->datatable->confirmReset = '恢复默认后,列表的相关设置将被清空,您确定要恢复默认吗?';
$lang->datatable->setGlobal = '应用到全局';
$lang->datatable->resetGlobal = '全局恢复默认';
$lang->datatable->confirmSetGlobal = '应用到全局后,系统内所有人的列表将默认按该规则进行显示,您确定要应用到全局吗?';
$lang->datatable->confirmGlobalReset = '全局恢复默认后,系统内所有人的列表设置将被清空,您确定要恢复默认吗?';
$lang->datatable->branch = '分支';
$lang->datatable->platform = '平台';