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
f38b5d08
Unverified
Commit
f38b5d08
authored
Mar 20, 2018
by
Viral Solani
Committed by
GitHub
Mar 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #189 from rmemon/develop
Flash message should be fade out after certain seconds
parents
7d0b9642
0f38a012
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
admin.js
public/js/backend/admin.js
+17
-11
No files found.
public/js/backend/admin.js
View file @
f38b5d08
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
var
Backend
=
{};
// common variable used in all the files of the backend
var
Backend
=
{};
// common variable used in all the files of the backend
(
function
(){
(
function
(){
Backend
=
{
Backend
=
{
Utils
:
{
Utils
:
{
...
@@ -149,7 +150,7 @@ var Backend = {}; // common variable used in all the files of the backend
...
@@ -149,7 +150,7 @@ var Backend = {}; // common variable used in all the files of the backend
Users
:
Users
:
{
{
selectors
:
{
selectors
:
{
select2
:
$
(
"
.select2
"
),
select2
:
jQuery
(
"
.select2
"
),
getPremissionURL
:
""
,
getPremissionURL
:
""
,
showPermission
:
document
.
querySelectorAll
(
"
.show-permissions
"
)
showPermission
:
document
.
querySelectorAll
(
"
.show-permissions
"
)
},
},
...
@@ -158,7 +159,7 @@ var Backend = {}; // common variable used in all the files of the backend
...
@@ -158,7 +159,7 @@ var Backend = {}; // common variable used in all the files of the backend
this
.
addHandlers
(
page
);
this
.
addHandlers
(
page
);
},
},
setSelectors
:
function
()
{
setSelectors
:
function
()
{
this
.
selectors
.
select2
=
$
(
"
.select2
"
);
this
.
selectors
.
select2
=
jQuery
(
"
.select2
"
);
this
.
selectors
.
getRoleForPermissions
=
document
.
querySelectorAll
(
"
.get-role-for-permissions
"
);
this
.
selectors
.
getRoleForPermissions
=
document
.
querySelectorAll
(
"
.get-role-for-permissions
"
);
this
.
selectors
.
getAvailabelPermissions
=
document
.
querySelector
(
"
.get-available-permissions
"
);
this
.
selectors
.
getAvailabelPermissions
=
document
.
querySelector
(
"
.get-available-permissions
"
);
this
.
selectors
.
Role3
=
document
.
getElementById
(
"
role-3
"
);
this
.
selectors
.
Role3
=
document
.
getElementById
(
"
role-3
"
);
...
@@ -441,7 +442,7 @@ var Backend = {}; // common variable used in all the files of the backend
...
@@ -441,7 +442,7 @@ var Backend = {}; // common variable used in all the files of the backend
// ! Backend.emailTemplate.addHandlers
// ! Backend.emailTemplate.addHandlers
addHandlers
:
function
()
{
addHandlers
:
function
()
{
$
(
"
.select2
"
).
select2
();
jQuery
(
"
.select2
"
).
select2
();
// to add placeholder in to active textarea
// to add placeholder in to active textarea
document
.
getElementById
(
"
addPlaceHolder
"
).
onclick
=
function
(
event
)
{
document
.
getElementById
(
"
addPlaceHolder
"
).
onclick
=
function
(
event
)
{
Backend
.
emailTemplate
.
addPlaceHolder
(
event
);
Backend
.
emailTemplate
.
addPlaceHolder
(
event
);
...
@@ -456,7 +457,7 @@ var Backend = {}; // common variable used in all the files of the backend
...
@@ -456,7 +457,7 @@ var Backend = {}; // common variable used in all the files of the backend
addPlaceHolder
:
function
(
event
)
{
addPlaceHolder
:
function
(
event
)
{
var
placeHolder
=
document
.
getElementById
(
'
placeHolder
'
).
value
;
var
placeHolder
=
document
.
getElementById
(
'
placeHolder
'
).
value
;
if
(
placeHolder
!=
''
)
{
if
(
placeHolder
!=
''
)
{
tinymce
.
activeEditor
.
execCommand
(
'
mceInsertContent
'
,
false
,
"
[
"
+
$
(
'
#placeHolder :selected
'
).
text
()
+
"
]
"
);
tinymce
.
activeEditor
.
execCommand
(
'
mceInsertContent
'
,
false
,
"
[
"
+
jQuery
(
'
#placeHolder :selected
'
).
text
()
+
"
]
"
);
}
}
},
},
...
@@ -464,7 +465,7 @@ var Backend = {}; // common variable used in all the files of the backend
...
@@ -464,7 +465,7 @@ var Backend = {}; // common variable used in all the files of the backend
showPreview
:
function
(
event
)
{
showPreview
:
function
(
event
)
{
document
.
querySelector
(
"
.modal-body
"
).
innerHTML
=
tinyMCE
.
get
(
'
txtBody
'
).
getContent
();
document
.
querySelector
(
"
.modal-body
"
).
innerHTML
=
tinyMCE
.
get
(
'
txtBody
'
).
getContent
();
//jQuery( ".modal-body" ).html(tinyMCE.get('txtBody').getContent());
//jQuery( ".modal-body" ).html(tinyMCE.get('txtBody').getContent());
$
(
"
.model-wrapper
"
).
modal
(
'
show
'
);
jQuery
(
"
.model-wrapper
"
).
modal
(
'
show
'
);
},
},
},
},
...
@@ -528,6 +529,9 @@ var Backend = {}; // common variable used in all the files of the backend
...
@@ -528,6 +529,9 @@ var Backend = {}; // common variable used in all the files of the backend
init
:
function
(
dataTable
)
{
init
:
function
(
dataTable
)
{
this
.
setSelectors
();
this
.
setSelectors
();
this
.
setSelectors
.
divAlerts
.
delay
(
2000
).
fadeOut
(
800
);
this
.
addHandlers
(
dataTable
);
this
.
addHandlers
(
dataTable
);
},
},
...
@@ -541,6 +545,7 @@ var Backend = {}; // common variable used in all the files of the backend
...
@@ -541,6 +545,7 @@ var Backend = {}; // common variable used in all the files of the backend
this
.
setSelectors
.
excelButton
=
document
.
getElementById
(
"
excelButton
"
);
this
.
setSelectors
.
excelButton
=
document
.
getElementById
(
"
excelButton
"
);
this
.
setSelectors
.
pdfButton
=
document
.
getElementById
(
"
pdfButton
"
);
this
.
setSelectors
.
pdfButton
=
document
.
getElementById
(
"
pdfButton
"
);
this
.
setSelectors
.
printButton
=
document
.
getElementById
(
"
printButton
"
);
this
.
setSelectors
.
printButton
=
document
.
getElementById
(
"
printButton
"
);
this
.
setSelectors
.
divAlerts
=
jQuery
(
'
div.alert
'
).
not
(
'
.alert-important
'
);
},
},
cloneElement
:
function
(
element
,
callback
)
{
cloneElement
:
function
(
element
,
callback
)
{
...
@@ -683,6 +688,7 @@ var Backend = {}; // common variable used in all the files of the backend
...
@@ -683,6 +688,7 @@ var Backend = {}; // common variable used in all the files of the backend
}
}
}
}
};
};
})();
})();
...
...
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