Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
laravel-adminpanel
Commits
86b59510
Commit
86b59510
authored
Feb 23, 2018
by
cygnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes for show and hiiden on user page
parent
8652f11c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
192 additions
and
114 deletions
+192
-114
.gitignore
.gitignore
+0
-1
script.js
public/js/backend/access/users/script.js
+21
-17
admin.js
public/js/backend/admin.js
+170
-94
webpack.mix.js
webpack.mix.js
+1
-2
No files found.
.gitignore
View file @
86b59510
...
...
@@ -24,7 +24,6 @@ yarn-error.log
phpunit.txt
public/css
public/js/*.js
public/js/plugins
public/js/skins
public/js/themes
...
...
public/js/backend/access/users/script.js
View file @
86b59510
$
(
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
'
);
};
});
});
};
public/js/backend/admin.js
View file @
86b59510
This diff is collapsed.
Click to expand it.
webpack.mix.js
View file @
86b59510
...
...
@@ -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
([
...
...
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