INSERT INTO `cp_filehtml` (`id`,`modul`,`app`,`path`,`type`,`cat`,`file_name`,`content`) VALUES ('417','profile','1','u2/creator','0','js','profile-edit.js--','// --------------- Edit Profile images Page ---------------\r\n$(document).on(\\\\\\\'page:init\\\\\\\', \\\\\\\'.page[data-name=\\\\\\\"profile-edit-images\\\\\\\"]\\\\\\\', async function (e) {\r\n var view = app.views.current\r\n\r\n const user = await getSessionUser()\r\n\r\n if (!user) {\r\n view.router.navigate(\\\\\\\'/login\\\\\\\')\r\n return\r\n }\r\n\r\n // If a cover photo exists, use it as the background image of the upload label\r\n if (user.cover_image) {\r\n $(\\\\\\\'input[name=\\\\\\\"cover_image\\\\\\\"]\\\\\\\').closest(\\\\\\\'.custom-file-upload\\\\\\\').find(\\\\\\\'label\\\\\\\').css(\\\\\\\'background-image\\\\\\\', `url(\\\\\\\'${user.cover_image}\\\\\\\')`)\r\n $(\\\\\\\'input[name=\\\\\\\"cover_image\\\\\\\"]\\\\\\\').closest(\\\\\\\'.custom-file-upload\\\\\\\').find(\\\\\\\'label\\\\\\\').css(\\\\\\\'background-size\\\\\\\', \\\\\\\'cover\\\\\\\')\r\n }\r\n\r\n if (user.profile_image) {\r\n $(\\\\\\\'input[name=\\\\\\\"profile_image\\\\\\\"]\\\\\\\').closest(\\\\\\\'.custom-file-upload\\\\\\\').find(\\\\\\\'label\\\\\\\').css(\\\\\\\'background-image\\\\\\\', `url(\\\\\\\'${user.profile_image}\\\\\\\')`)\r\n $(\\\\\\\'input[name=\\\\\\\"profile_image\\\\\\\"]\\\\\\\').closest(\\\\\\\'.custom-file-upload\\\\\\\').find(\\\\\\\'label\\\\\\\').css(\\\\\\\'background-size\\\\\\\', \\\\\\\'contain\\\\\\\')\r\n $(\\\\\\\'input[name=\\\\\\\"profile_image\\\\\\\"]\\\\\\\').closest(\\\\\\\'.custom-file-upload\\\\\\\').find(\\\\\\\'label\\\\\\\').css(\\\\\\\'background-position\\\\\\\', \\\\\\\'center\\\\\\\')\r\n $(\\\\\\\'input[name=\\\\\\\"profile_image\\\\\\\"]\\\\\\\').closest(\\\\\\\'.custom-file-upload\\\\\\\').find(\\\\\\\'label\\\\\\\').css(\\\\\\\'background-repeat\\\\\\\', \\\\\\\'no-repeat\\\\\\\')\r\n }\r\n})');
Add JS Function Name
profile
pages/profile-edit-images.html
pages/profile-edit-images.html
- $(document).on('click', '#save-profile-images'
- $(document).on('page:init', '.page[data-name="profile-edit-images"]'
- $(document).on('click', '.user-follow-btn'
- $(document).on('infinite', '.profile-landing-page.infinite-scroll-content.view-page'
- $(document).on('page:beforein', '.page[data-name="profile-view"]'
- $(document).on('page:init', '.page[data-name="profile-view"]'
- $(document).on('ptr:refresh', '.profile-landing-page.view-page.ptr-content'
- async function renderProfileData(cachedData, userId)
- function populateUsersPosts(data)
- store.getters.getUserPathUpdated.onUpdated