college_admin 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +209 -0
- data/Rakefile +6 -0
- data/app/assets/images/.keep +0 -0
- data/app/assets/images/favicon_1.ico +0 -0
- data/app/assets/images/users/avatar-1.jpg +0 -0
- data/app/assets/javascripts/jquery.app.js +30 -0
- data/app/assets/javascripts/jquery.core.js +304 -0
- data/app/assets/javascripts/jquery.dashboard.js +84 -0
- data/app/assets/stylesheets/style.css +6251 -0
- data/app/views/layouts/_footer.html.erb +10 -0
- data/app/views/layouts/_head.html.erb +39 -0
- data/app/views/layouts/_header.html.erb +42 -0
- data/app/views/layouts/_js.html.erb +38 -0
- data/app/views/layouts/college_admin.erb +21 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/college_admin.gemspec +38 -0
- data/config/initializers/assets.rb +6 -0
- data/lib/college_admin/engine.rb +5 -0
- data/lib/college_admin/version.rb +3 -0
- data/lib/college_admin.rb +6 -0
- metadata +130 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 45e54fc4c532fe330d954c56b0a20a8730f88c37
|
4
|
+
data.tar.gz: 4b697dde5645764f010858dc0c7ad9a5094dd7d6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ff15683c1e5cfc4fe7626affd00dc4d757d46b9009b475acb1a203929a110da89186b65f5f755637e052dbfd2b309d4c372294e0fd38840dc2f4a2c0029309f9
|
7
|
+
data.tar.gz: 2a74eb53d1299e11207293c5b8c84b53d0369ff0bc3b22b5cb2fc2349566e0421d28485985254cc463d61a0db887ec4867ebf759d447ffc70d5881c52572961e
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at tanbir2025@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 hmtanbir
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,209 @@
|
|
1
|
+
# College Admin Theme Engine
|
2
|
+
|
3
|
+
Welcome to College Admin theme. It is theme engine for making rails. It renders an administrator theme in your project.
|
4
|
+
|
5
|
+
# Demo
|
6
|
+
Please visit this site to see it's [demo](https://ubold.herokuapp.com/)
|
7
|
+
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'college_admin'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install college_admin
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
From your controller just call this theme engine as:
|
27
|
+
`layout 'college_admin'`
|
28
|
+
|
29
|
+
<h5>Change jquery version:</h5>
|
30
|
+
This template engine needs jquery2 version. So, you have to change
|
31
|
+
jquery version.
|
32
|
+
|
33
|
+
Open `application.js` in `app-> assets -> javascripts` folder.
|
34
|
+
Then, use `require jquery2` instead of `require jquery`
|
35
|
+
and restart in your system
|
36
|
+
|
37
|
+
<h5>For adding logo:</h5>
|
38
|
+
|
39
|
+
Step 1:
|
40
|
+
|
41
|
+
Make a file named `_logo.html.erb` in your `app->views->shared` folder.
|
42
|
+
Write down this code in your `_logo.html.erb`:
|
43
|
+
|
44
|
+
```
|
45
|
+
<% content_for :logo do %>
|
46
|
+
<div class="logo">
|
47
|
+
<a href="#" class="logo"><span>C<i class="zmdi zmdi-album"></i>llege</span></a>
|
48
|
+
</div>
|
49
|
+
<% end %>
|
50
|
+
```
|
51
|
+
You can alter the logo name and path
|
52
|
+
|
53
|
+
Step 2:
|
54
|
+
|
55
|
+
Make file named `_extends_admin_layout.html.erb` in your `app->views->shared` folder.
|
56
|
+
Then, write down this code in your `_extends_admin_layout.html.erb`
|
57
|
+
|
58
|
+
```
|
59
|
+
<%= render partial: 'shared/logo' %>
|
60
|
+
```
|
61
|
+
|
62
|
+
Step 3:
|
63
|
+
|
64
|
+
Now, open in your all admin view files as example as `index.html.erb`, `edit.html.erb`, `show.html.erb` and `new.html.erb`, then write down
|
65
|
+
given bellow code:
|
66
|
+
|
67
|
+
```
|
68
|
+
<%= render 'shared/extends_admin_layout' %>
|
69
|
+
```
|
70
|
+
|
71
|
+
|
72
|
+
<h5>For adding user profile:</h5>
|
73
|
+
|
74
|
+
Step 1:
|
75
|
+
|
76
|
+
Make a file named `_profile.html.erb` in your `app->views->shared` folder.
|
77
|
+
Write down this code in your `_profile.html.erb`:
|
78
|
+
|
79
|
+
```
|
80
|
+
<% content_for :profile do %>
|
81
|
+
<li class="dropdown">
|
82
|
+
<a href="" class="dropdown-toggle waves-effect waves-light profile" data-toggle="dropdown" aria-expanded="true">
|
83
|
+
<%= image_tag 'users/avatar-1.jpg', class: 'img-circle' %>
|
84
|
+
</a>
|
85
|
+
<ul class="dropdown-menu">
|
86
|
+
<li><a href="#"><i class="ti-user m-r-5"></i> Profile</a></li>
|
87
|
+
<li><a href="#"><i class="ti-settings m-r-5"></i> Settings</a></li>
|
88
|
+
<li><a href="#"><i class="ti-lock m-r-5"></i> Lock screen</a></li>
|
89
|
+
<li><a href="#"><i class="ti-power-off m-r-5"></i> Logout</a></li>
|
90
|
+
</ul>
|
91
|
+
</li>
|
92
|
+
|
93
|
+
<% end %>
|
94
|
+
```
|
95
|
+
|
96
|
+
Step 2:
|
97
|
+
|
98
|
+
Make file named `_extends_admin_layout.html.erb` in your `app->views->shared` folder.
|
99
|
+
Then, write down this code in your `_extends_admin_layout.html.erb`
|
100
|
+
|
101
|
+
```
|
102
|
+
<%= render partial: 'shared/profile' %>
|
103
|
+
```
|
104
|
+
|
105
|
+
Step 3:
|
106
|
+
|
107
|
+
Now, open in your all admin view files as example as `index.html.erb`, `edit.html.erb`, `show.html.erb` and `new.html.erb`, then write down
|
108
|
+
given bellow code:
|
109
|
+
|
110
|
+
```
|
111
|
+
<%= render 'shared/extends_admin_layout' %>
|
112
|
+
```
|
113
|
+
|
114
|
+
<h5>For adding search:</h5>
|
115
|
+
|
116
|
+
Step 1:
|
117
|
+
|
118
|
+
Make a file named `_search.html.erb` in your `app->views->shared` folder.
|
119
|
+
Write down this code in your `_search.html.erb`:
|
120
|
+
|
121
|
+
```
|
122
|
+
<% content_for :search do %>
|
123
|
+
<li>
|
124
|
+
<form role="search" class="navbar-left app-search pull-left hidden-xs">
|
125
|
+
<input type="text" placeholder="Search..." class="form-control">
|
126
|
+
<a href=""><i class="fa fa-search"></i></a>
|
127
|
+
</form>
|
128
|
+
</li>
|
129
|
+
<% end %>
|
130
|
+
```
|
131
|
+
|
132
|
+
Step 2:
|
133
|
+
|
134
|
+
Make file named `_extends_admin_layout.html.erb` in your `app->views->shared` folder.
|
135
|
+
Then, write down this code in your `_extends_admin_layout.html.erb`
|
136
|
+
|
137
|
+
```
|
138
|
+
<%= render partial: 'shared/search' %>
|
139
|
+
```
|
140
|
+
|
141
|
+
Step 3:
|
142
|
+
|
143
|
+
Now, open in your all admin view files as example as `index.html.erb`, `edit.html.erb`, `show.html.erb` and `new.html.erb`, then write down
|
144
|
+
given bellow code:
|
145
|
+
|
146
|
+
```
|
147
|
+
<%= render 'shared/extends_admin_layout' %>
|
148
|
+
```
|
149
|
+
|
150
|
+
|
151
|
+
<h5>For adding navigation:</h5>
|
152
|
+
|
153
|
+
Step 1:
|
154
|
+
|
155
|
+
Make a file named `_nav.html.erb` in your `app->views->shared` folder.
|
156
|
+
Write down this code in your `_nav.html.erb`:
|
157
|
+
|
158
|
+
```
|
159
|
+
<% content_for :nav do %>
|
160
|
+
<!--For a single menu content-->
|
161
|
+
<li class="has-submenu active">
|
162
|
+
<a href="#"><i class="zmdi zmdi-view-dashboard"></i>Dashboard</a>
|
163
|
+
</li>
|
164
|
+
|
165
|
+
<!--For a normal menu content-->
|
166
|
+
<li class="has-submenu">
|
167
|
+
<a href="#"><i class="zmdi zmdi-palette"></i>UI Kit</a>
|
168
|
+
<ul class="submenu">
|
169
|
+
<li><a href="#">Portlets</a></li>
|
170
|
+
<li><a href="#">Checkboxs-Radios</a></li>
|
171
|
+
<li><a href="#">Tabs</a></li>
|
172
|
+
<li><a href="#">Modals</a></li>
|
173
|
+
</ul>
|
174
|
+
</li>
|
175
|
+
<% end %>
|
176
|
+
|
177
|
+
```
|
178
|
+
|
179
|
+
Step 2:
|
180
|
+
|
181
|
+
Make file named `_extends_admin_layout.html.erb` in your `app->views->shared` folder.
|
182
|
+
Then, write down this code in your `_extends_admin_layout.html.erb`
|
183
|
+
|
184
|
+
```
|
185
|
+
<%= render partial: 'shared/nav' %>
|
186
|
+
```
|
187
|
+
|
188
|
+
Step 3:
|
189
|
+
|
190
|
+
Now, open in your all admin view files as example as `index.html.erb`, `edit.html.erb`, `show.html.erb` and `new.html.erb`, then write down
|
191
|
+
given bellow code:
|
192
|
+
|
193
|
+
```
|
194
|
+
<%= render 'shared/extends_admin_layout' %>
|
195
|
+
```
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
## Contributing
|
202
|
+
|
203
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/BDMADE/college_admin).This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
204
|
+
|
205
|
+
|
206
|
+
## License
|
207
|
+
|
208
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
209
|
+
|
data/Rakefile
ADDED
File without changes
|
Binary file
|
Binary file
|
@@ -0,0 +1,30 @@
|
|
1
|
+
(function($){
|
2
|
+
|
3
|
+
'use strict';
|
4
|
+
|
5
|
+
function initNavbar () {
|
6
|
+
|
7
|
+
$('.navbar-toggle').on('click', function(event) {
|
8
|
+
$(this).toggleClass('open');
|
9
|
+
$('#navigation').slideToggle(400);
|
10
|
+
$('.cart, .search').removeClass('open');
|
11
|
+
});
|
12
|
+
|
13
|
+
$('.navigation-menu>li').slice(-1).addClass('last-elements');
|
14
|
+
|
15
|
+
$('.navigation-menu li.has-submenu a[href="#"]').on('click', function(e) {
|
16
|
+
if ($(window).width() < 992) {
|
17
|
+
e.preventDefault();
|
18
|
+
$(this).parent('li').toggleClass('open').find('.submenu:first').toggleClass('open');
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
function init () {
|
24
|
+
initNavbar();
|
25
|
+
}
|
26
|
+
|
27
|
+
init();
|
28
|
+
|
29
|
+
})(jQuery)
|
30
|
+
|
@@ -0,0 +1,304 @@
|
|
1
|
+
//portlets
|
2
|
+
!function($) {
|
3
|
+
"use strict";
|
4
|
+
|
5
|
+
/**
|
6
|
+
Portlet Widget
|
7
|
+
*/
|
8
|
+
var Portlet = function() {
|
9
|
+
this.$body = $("body"),
|
10
|
+
this.$portletIdentifier = ".portlet",
|
11
|
+
this.$portletCloser = '.portlet a[data-toggle="remove"]',
|
12
|
+
this.$portletRefresher = '.portlet a[data-toggle="reload"]'
|
13
|
+
};
|
14
|
+
|
15
|
+
//on init
|
16
|
+
Portlet.prototype.init = function() {
|
17
|
+
// Panel closest
|
18
|
+
var $this = this;
|
19
|
+
$(document).on("click",this.$portletCloser, function (ev) {
|
20
|
+
ev.preventDefault();
|
21
|
+
var $portlet = $(this).closest($this.$portletIdentifier);
|
22
|
+
var $portlet_parent = $portlet.parent();
|
23
|
+
$portlet.remove();
|
24
|
+
if ($portlet_parent.children().length == 0) {
|
25
|
+
$portlet_parent.remove();
|
26
|
+
}
|
27
|
+
});
|
28
|
+
|
29
|
+
// Panel Reload
|
30
|
+
$(document).on("click",this.$portletRefresher, function (ev) {
|
31
|
+
ev.preventDefault();
|
32
|
+
var $portlet = $(this).closest($this.$portletIdentifier);
|
33
|
+
// This is just a simulation, nothing is going to be reloaded
|
34
|
+
$portlet.append('<div class="panel-disabled"><div class="loader-1"></div></div>');
|
35
|
+
var $pd = $portlet.find('.panel-disabled');
|
36
|
+
setTimeout(function () {
|
37
|
+
$pd.fadeOut('fast', function () {
|
38
|
+
$pd.remove();
|
39
|
+
});
|
40
|
+
}, 500 + 300 * (Math.random() * 5));
|
41
|
+
});
|
42
|
+
},
|
43
|
+
//
|
44
|
+
$.Portlet = new Portlet, $.Portlet.Constructor = Portlet
|
45
|
+
|
46
|
+
}(window.jQuery),
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Notifications
|
50
|
+
*/
|
51
|
+
function($) {
|
52
|
+
"use strict";
|
53
|
+
|
54
|
+
var Notification = function() {};
|
55
|
+
|
56
|
+
//simple notificaiton
|
57
|
+
Notification.prototype.notify = function(style,position, title, text) {
|
58
|
+
var icon = 'fa fa-adjust';
|
59
|
+
if(style == "error"){
|
60
|
+
icon = "fa fa-exclamation";
|
61
|
+
}else if(style == "warning"){
|
62
|
+
icon = "fa fa-warning";
|
63
|
+
}else if(style == "success"){
|
64
|
+
icon = "fa fa-check";
|
65
|
+
}else if(style == "custom"){
|
66
|
+
icon = "md md-album";
|
67
|
+
}else if(style == "info"){
|
68
|
+
icon = "fa fa-question";
|
69
|
+
}else{
|
70
|
+
icon = "fa fa-adjust";
|
71
|
+
}
|
72
|
+
$.notify({
|
73
|
+
title: title,
|
74
|
+
text: text,
|
75
|
+
image: "<i class='"+icon+"'></i>"
|
76
|
+
}, {
|
77
|
+
style: 'metro',
|
78
|
+
className: style,
|
79
|
+
globalPosition:position,
|
80
|
+
showAnimation: "show",
|
81
|
+
showDuration: 0,
|
82
|
+
hideDuration: 0,
|
83
|
+
autoHide: true,
|
84
|
+
clickToHide: true
|
85
|
+
});
|
86
|
+
},
|
87
|
+
|
88
|
+
//auto hide notification
|
89
|
+
Notification.prototype.autoHideNotify = function (style,position, title, text) {
|
90
|
+
var icon = "fa fa-adjust";
|
91
|
+
if(style == "error"){
|
92
|
+
icon = "fa fa-exclamation";
|
93
|
+
}else if(style == "warning"){
|
94
|
+
icon = "fa fa-warning";
|
95
|
+
}else if(style == "success"){
|
96
|
+
icon = "fa fa-check";
|
97
|
+
}else if(style == "custom"){
|
98
|
+
icon = "md md-album";
|
99
|
+
}else if(style == "info"){
|
100
|
+
icon = "fa fa-question";
|
101
|
+
}else{
|
102
|
+
icon = "fa fa-adjust";
|
103
|
+
}
|
104
|
+
$.notify({
|
105
|
+
title: title,
|
106
|
+
text: text,
|
107
|
+
image: "<i class='"+icon+"'></i>"
|
108
|
+
}, {
|
109
|
+
style: 'metro',
|
110
|
+
className: style,
|
111
|
+
globalPosition:position,
|
112
|
+
showAnimation: "show",
|
113
|
+
showDuration: 0,
|
114
|
+
hideDuration: 0,
|
115
|
+
autoHideDelay: 5000,
|
116
|
+
autoHide: true,
|
117
|
+
clickToHide: true
|
118
|
+
});
|
119
|
+
},
|
120
|
+
//confirmation notification
|
121
|
+
Notification.prototype.confirm = function(style,position, title) {
|
122
|
+
var icon = "fa fa-adjust";
|
123
|
+
if(style == "error"){
|
124
|
+
icon = "fa fa-exclamation";
|
125
|
+
}else if(style == "warning"){
|
126
|
+
icon = "fa fa-warning";
|
127
|
+
}else if(style == "success"){
|
128
|
+
icon = "fa fa-check";
|
129
|
+
}else if(style == "custom"){
|
130
|
+
icon = "md md-album";
|
131
|
+
}else if(style == "info"){
|
132
|
+
icon = "fa fa-question";
|
133
|
+
}else{
|
134
|
+
icon = "fa fa-adjust";
|
135
|
+
}
|
136
|
+
$.notify({
|
137
|
+
title: title,
|
138
|
+
text: 'Are you sure you want to do nothing?<div class="clearfix"></div><br><a class="btn btn-sm btn-white yes">Yes</a> <a class="btn btn-sm btn-danger no">No</a>',
|
139
|
+
image: "<i class='"+icon+"'></i>"
|
140
|
+
}, {
|
141
|
+
style: 'metro',
|
142
|
+
className: style,
|
143
|
+
globalPosition:position,
|
144
|
+
showAnimation: "show",
|
145
|
+
showDuration: 0,
|
146
|
+
hideDuration: 0,
|
147
|
+
autoHide: false,
|
148
|
+
clickToHide: false
|
149
|
+
});
|
150
|
+
//listen for click events from this style
|
151
|
+
$(document).on('click', '.notifyjs-metro-base .no', function() {
|
152
|
+
//programmatically trigger propogating hide event
|
153
|
+
$(this).trigger('notify-hide');
|
154
|
+
});
|
155
|
+
$(document).on('click', '.notifyjs-metro-base .yes', function() {
|
156
|
+
//show button text
|
157
|
+
alert($(this).text() + " clicked!");
|
158
|
+
//hide notification
|
159
|
+
$(this).trigger('notify-hide');
|
160
|
+
});
|
161
|
+
},
|
162
|
+
//init - examples
|
163
|
+
Notification.prototype.init = function() {
|
164
|
+
|
165
|
+
},
|
166
|
+
//init
|
167
|
+
$.Notification = new Notification, $.Notification.Constructor = Notification
|
168
|
+
}(window.jQuery),
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Components
|
172
|
+
*/
|
173
|
+
function($) {
|
174
|
+
"use strict";
|
175
|
+
|
176
|
+
var Components = function() {};
|
177
|
+
|
178
|
+
//initializing tooltip
|
179
|
+
Components.prototype.initTooltipPlugin = function() {
|
180
|
+
$.fn.tooltip && $('[data-toggle="tooltip"]').tooltip()
|
181
|
+
},
|
182
|
+
|
183
|
+
//initializing popover
|
184
|
+
Components.prototype.initPopoverPlugin = function() {
|
185
|
+
$.fn.popover && $('[data-toggle="popover"]').popover()
|
186
|
+
},
|
187
|
+
|
188
|
+
//initializing custom modal
|
189
|
+
Components.prototype.initCustomModalPlugin = function() {
|
190
|
+
$('[data-plugin="custommodal"]').on('click', function(e) {
|
191
|
+
Custombox.open({
|
192
|
+
target: $(this).attr("href"),
|
193
|
+
effect: $(this).attr("data-animation"),
|
194
|
+
overlaySpeed: $(this).attr("data-overlaySpeed"),
|
195
|
+
overlayColor: $(this).attr("data-overlayColor")
|
196
|
+
});
|
197
|
+
e.preventDefault();
|
198
|
+
});
|
199
|
+
},
|
200
|
+
|
201
|
+
//initializing nicescroll
|
202
|
+
Components.prototype.initNiceScrollPlugin = function() {
|
203
|
+
//You can change the color of scroll bar here
|
204
|
+
$.fn.niceScroll && $(".nicescroll").niceScroll({ cursorcolor: '#98a6ad',cursorwidth:'6px', cursorborderradius: '5px'});
|
205
|
+
},
|
206
|
+
|
207
|
+
//range slider
|
208
|
+
Components.prototype.initRangeSlider = function() {
|
209
|
+
$.fn.slider && $('[data-plugin="range-slider"]').slider({});
|
210
|
+
},
|
211
|
+
|
212
|
+
/* -------------
|
213
|
+
* Form related controls
|
214
|
+
*/
|
215
|
+
//switch
|
216
|
+
Components.prototype.initSwitchery = function() {
|
217
|
+
$('[data-plugin="switchery"]').each(function (idx, obj) {
|
218
|
+
new Switchery($(this)[0], $(this).data());
|
219
|
+
});
|
220
|
+
},
|
221
|
+
//multiselect
|
222
|
+
Components.prototype.initMultiSelect = function() {
|
223
|
+
if($('[data-plugin="multiselect"]').length > 0)
|
224
|
+
$('[data-plugin="multiselect"]').multiSelect($(this).data());
|
225
|
+
},
|
226
|
+
|
227
|
+
/* -------------
|
228
|
+
* small charts related widgets
|
229
|
+
*/
|
230
|
+
//peity charts
|
231
|
+
Components.prototype.initPeityCharts = function() {
|
232
|
+
$('[data-plugin="peity-pie"]').each(function(idx, obj) {
|
233
|
+
var colors = $(this).attr('data-colors')?$(this).attr('data-colors').split(","):[];
|
234
|
+
var width = $(this).attr('data-width')?$(this).attr('data-width'):20; //default is 20
|
235
|
+
var height = $(this).attr('data-height')?$(this).attr('data-height'):20; //default is 20
|
236
|
+
$(this).peity("pie", {
|
237
|
+
fill: colors,
|
238
|
+
width: width,
|
239
|
+
height: height
|
240
|
+
});
|
241
|
+
});
|
242
|
+
//donut
|
243
|
+
$('[data-plugin="peity-donut"]').each(function(idx, obj) {
|
244
|
+
var colors = $(this).attr('data-colors')?$(this).attr('data-colors').split(","):[];
|
245
|
+
var width = $(this).attr('data-width')?$(this).attr('data-width'):20; //default is 20
|
246
|
+
var height = $(this).attr('data-height')?$(this).attr('data-height'):20; //default is 20
|
247
|
+
$(this).peity("donut", {
|
248
|
+
fill: colors,
|
249
|
+
width: width,
|
250
|
+
height: height
|
251
|
+
});
|
252
|
+
});
|
253
|
+
|
254
|
+
$('[data-plugin="peity-donut-alt"]').each(function(idx, obj) {
|
255
|
+
$(this).peity("donut");
|
256
|
+
});
|
257
|
+
|
258
|
+
// line
|
259
|
+
$('[data-plugin="peity-line"]').each(function(idx, obj) {
|
260
|
+
$(this).peity("line", $(this).data());
|
261
|
+
});
|
262
|
+
|
263
|
+
// bar
|
264
|
+
$('[data-plugin="peity-bar"]').each(function(idx, obj) {
|
265
|
+
var colors = $(this).attr('data-colors')?$(this).attr('data-colors').split(","):[];
|
266
|
+
var width = $(this).attr('data-width')?$(this).attr('data-width'):20; //default is 20
|
267
|
+
var height = $(this).attr('data-height')?$(this).attr('data-height'):20; //default is 20
|
268
|
+
$(this).peity("bar", {
|
269
|
+
fill: colors,
|
270
|
+
width: width,
|
271
|
+
height: height
|
272
|
+
});
|
273
|
+
});
|
274
|
+
},
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
//initilizing
|
279
|
+
Components.prototype.init = function() {
|
280
|
+
var $this = this;
|
281
|
+
this.initTooltipPlugin(),
|
282
|
+
this.initPopoverPlugin(),
|
283
|
+
this.initNiceScrollPlugin(),
|
284
|
+
this.initCustomModalPlugin(),
|
285
|
+
this.initRangeSlider(),
|
286
|
+
this.initSwitchery(),
|
287
|
+
this.initMultiSelect(),
|
288
|
+
this.initPeityCharts(),
|
289
|
+
//creating portles
|
290
|
+
$.Portlet.init();
|
291
|
+
},
|
292
|
+
|
293
|
+
$.Components = new Components, $.Components.Constructor = Components
|
294
|
+
|
295
|
+
}(window.jQuery),
|
296
|
+
//initializing main application module
|
297
|
+
function($) {
|
298
|
+
"use strict";
|
299
|
+
$.Components.init();
|
300
|
+
}(window.jQuery);
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|