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
phpunit.txt
public/css
public/js/*.js
public/js/plugins
public/js/skins
public/js/themes
......
$(function() {
$(".show-permissions").click(function(e) {
e.preventDefault();
var $this = $(this);
var role = $this.data('role');
var permissions = $(".permission-list[data-role='"+role+"']");
var hideText = $this.find('.hide-text');
var showText = $this.find('.show-text');
// console.log(permissions); // for debugging
// show permission list
permissions.toggleClass('hidden');
// toggle the text Show/Hide for the link
hideText.toggleClass('hidden');
showText.toggleClass('hidden');
window.onload = function () {
document.querySelectorAll(".show-permissions").forEach(function(element){
element.onclick = function(event){
event.preventDefault();
var $this = this;
var role = $this.getAttribute("data-role");
var permissions = document.querySelector(".permission-list[data-role='"+role+"']");
var hideText = $this.querySelector('.hide-text');
var showText = $this.querySelector('.show-text');
// show permission list
Backend.Utils.toggleClass(permissions,'hidden');
// toggle the text Show/Hide for the link
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')
"public/js/bootstrap-datetimepicker.min.js",
"public/js/backend/custom-file-input.js",
"public/js/backend/notification.js",
//"public/js/backend/admin.js"
"public/js/backend/mainbackend.js"
"public/js/backend/admin.js"
], 'public/js/backend-custom.js')
//Datatable js
.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