Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
6ad63399
Commit
6ad63399
authored
Nov 01, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement change dashboard setting callback
parent
43bb1ed4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
abvw/js/dashboardSetting/dashboard-setting.js
+8
-1
No files found.
abvw/js/dashboardSetting/dashboard-setting.js
View file @
6ad63399
...
...
@@ -5,6 +5,8 @@
*/
var
DashboardSetting
=
{};
DashboardSetting
.
changeSettingCallback
=
function
()
{};
/**
* Html element array, map with json key from setting data API
*/
...
...
@@ -84,6 +86,9 @@ DashboardSetting.saveSetting = function () {
const
url
=
DashboardSetting
.
baseApiUrl
+
'saveSetting'
;
COMMON
.
cmsAjax
(
url
,
param
,
false
,
function
(
json
)
{
DashboardSetting
.
closeModal
();
if
(
DashboardSetting
.
changeSettingCallback
&&
typeof
DashboardSetting
.
changeSettingCallback
===
'function'
)
{
DashboardSetting
.
changeSettingCallback
();
}
},
function
()
{
console
.
log
(
'DashboardSetting.saveSetting error'
);
DashboardSetting
.
closeModal
();
...
...
@@ -110,12 +115,14 @@ DashboardSetting.bindToggleClick = function () {
/**
* init data, action when screen onload
* @param {function} changeCallback - callback when settings changed
*/
DashboardSetting
.
init
=
function
()
{
DashboardSetting
.
init
=
function
(
changeCallback
)
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
DashboardSetting
.
applySettings
(
settings
);
});
DashboardSetting
.
bindToggleClick
();
DashboardSetting
.
changeSettingCallback
=
changeCallback
;
};
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment