Commit 86b59510 authored by cygnet's avatar cygnet

changes for show and hiiden on user page

parent 8652f11c
...@@ -24,7 +24,6 @@ yarn-error.log ...@@ -24,7 +24,6 @@ yarn-error.log
phpunit.txt phpunit.txt
public/css public/css
public/js/*.js public/js/*.js
public/js/plugins public/js/plugins
public/js/skins public/js/skins
public/js/themes public/js/themes
......
$(function() { window.onload = function () {
$(".show-permissions").click(function(e) { document.querySelectorAll(".show-permissions").forEach(function(element){
e.preventDefault(); element.onclick = function(event){
var $this = $(this); event.preventDefault();
var role = $this.data('role'); var $this = this;
var permissions = $(".permission-list[data-role='"+role+"']"); var role = $this.getAttribute("data-role");
var hideText = $this.find('.hide-text');
var showText = $this.find('.show-text'); var permissions = document.querySelector(".permission-list[data-role='"+role+"']");
// console.log(permissions); // for debugging var hideText = $this.querySelector('.hide-text');
var showText = $this.querySelector('.show-text');
// show permission list
permissions.toggleClass('hidden'); // show permission list
Backend.Utils.toggleClass(permissions,'hidden');
// toggle the text Show/Hide for the link
hideText.toggleClass('hidden'); // toggle the text Show/Hide for the link
showText.toggleClass('hidden'); Backend.Utils.toggleClass(hideText,'hidden');
Backend.Utils.toggleClass(showText,'hidden');
};
}); });
});
};
This diff is collapsed.
...@@ -43,8 +43,7 @@ mix.sass('resources/assets/sass/frontend/app.scss', 'public/css/frontend.css') ...@@ -43,8 +43,7 @@ mix.sass('resources/assets/sass/frontend/app.scss', 'public/css/frontend.css')
"public/js/bootstrap-datetimepicker.min.js", "public/js/bootstrap-datetimepicker.min.js",
"public/js/backend/custom-file-input.js", "public/js/backend/custom-file-input.js",
"public/js/backend/notification.js", "public/js/backend/notification.js",
//"public/js/backend/admin.js" "public/js/backend/admin.js"
"public/js/backend/mainbackend.js"
], 'public/js/backend-custom.js') ], 'public/js/backend-custom.js')
//Datatable js //Datatable js
.scripts([ .scripts([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment