college_admin 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/layouts/_head.html.erb +3 -3
- data/app/views/layouts/_inline_css.html.erb +6254 -0
- data/app/views/layouts/_js.html.erb +419 -3
- data/college_admin-0.1.1.gem +0 -0
- data/lib/college_admin/version.rb +1 -1
- metadata +4 -2
@@ -21,9 +21,425 @@
|
|
21
21
|
|
22
22
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery-Knob/1.2.13/jquery.knob.min.js"></script>
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
<script type="application/javascript">
|
25
|
+
//portlets
|
26
|
+
!function($) {
|
27
|
+
"use strict";
|
28
|
+
|
29
|
+
/**
|
30
|
+
Portlet Widget
|
31
|
+
*/
|
32
|
+
var Portlet = function() {
|
33
|
+
this.$body = $("body"),
|
34
|
+
this.$portletIdentifier = ".portlet",
|
35
|
+
this.$portletCloser = '.portlet a[data-toggle="remove"]',
|
36
|
+
this.$portletRefresher = '.portlet a[data-toggle="reload"]'
|
37
|
+
};
|
38
|
+
|
39
|
+
//on init
|
40
|
+
Portlet.prototype.init = function() {
|
41
|
+
// Panel closest
|
42
|
+
var $this = this;
|
43
|
+
$(document).on("click",this.$portletCloser, function (ev) {
|
44
|
+
ev.preventDefault();
|
45
|
+
var $portlet = $(this).closest($this.$portletIdentifier);
|
46
|
+
var $portlet_parent = $portlet.parent();
|
47
|
+
$portlet.remove();
|
48
|
+
if ($portlet_parent.children().length == 0) {
|
49
|
+
$portlet_parent.remove();
|
50
|
+
}
|
51
|
+
});
|
52
|
+
|
53
|
+
// Panel Reload
|
54
|
+
$(document).on("click",this.$portletRefresher, function (ev) {
|
55
|
+
ev.preventDefault();
|
56
|
+
var $portlet = $(this).closest($this.$portletIdentifier);
|
57
|
+
// This is just a simulation, nothing is going to be reloaded
|
58
|
+
$portlet.append('<div class="panel-disabled"><div class="loader-1"></div></div>');
|
59
|
+
var $pd = $portlet.find('.panel-disabled');
|
60
|
+
setTimeout(function () {
|
61
|
+
$pd.fadeOut('fast', function () {
|
62
|
+
$pd.remove();
|
63
|
+
});
|
64
|
+
}, 500 + 300 * (Math.random() * 5));
|
65
|
+
});
|
66
|
+
},
|
67
|
+
//
|
68
|
+
$.Portlet = new Portlet, $.Portlet.Constructor = Portlet
|
69
|
+
|
70
|
+
}(window.jQuery),
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Notifications
|
74
|
+
*/
|
75
|
+
function($) {
|
76
|
+
"use strict";
|
77
|
+
|
78
|
+
var Notification = function() {};
|
79
|
+
|
80
|
+
//simple notificaiton
|
81
|
+
Notification.prototype.notify = function(style,position, title, text) {
|
82
|
+
var icon = 'fa fa-adjust';
|
83
|
+
if(style == "error"){
|
84
|
+
icon = "fa fa-exclamation";
|
85
|
+
}else if(style == "warning"){
|
86
|
+
icon = "fa fa-warning";
|
87
|
+
}else if(style == "success"){
|
88
|
+
icon = "fa fa-check";
|
89
|
+
}else if(style == "custom"){
|
90
|
+
icon = "md md-album";
|
91
|
+
}else if(style == "info"){
|
92
|
+
icon = "fa fa-question";
|
93
|
+
}else{
|
94
|
+
icon = "fa fa-adjust";
|
95
|
+
}
|
96
|
+
$.notify({
|
97
|
+
title: title,
|
98
|
+
text: text,
|
99
|
+
image: "<i class='"+icon+"'></i>"
|
100
|
+
}, {
|
101
|
+
style: 'metro',
|
102
|
+
className: style,
|
103
|
+
globalPosition:position,
|
104
|
+
showAnimation: "show",
|
105
|
+
showDuration: 0,
|
106
|
+
hideDuration: 0,
|
107
|
+
autoHide: true,
|
108
|
+
clickToHide: true
|
109
|
+
});
|
110
|
+
},
|
111
|
+
|
112
|
+
//auto hide notification
|
113
|
+
Notification.prototype.autoHideNotify = function (style,position, title, text) {
|
114
|
+
var icon = "fa fa-adjust";
|
115
|
+
if(style == "error"){
|
116
|
+
icon = "fa fa-exclamation";
|
117
|
+
}else if(style == "warning"){
|
118
|
+
icon = "fa fa-warning";
|
119
|
+
}else if(style == "success"){
|
120
|
+
icon = "fa fa-check";
|
121
|
+
}else if(style == "custom"){
|
122
|
+
icon = "md md-album";
|
123
|
+
}else if(style == "info"){
|
124
|
+
icon = "fa fa-question";
|
125
|
+
}else{
|
126
|
+
icon = "fa fa-adjust";
|
127
|
+
}
|
128
|
+
$.notify({
|
129
|
+
title: title,
|
130
|
+
text: text,
|
131
|
+
image: "<i class='"+icon+"'></i>"
|
132
|
+
}, {
|
133
|
+
style: 'metro',
|
134
|
+
className: style,
|
135
|
+
globalPosition:position,
|
136
|
+
showAnimation: "show",
|
137
|
+
showDuration: 0,
|
138
|
+
hideDuration: 0,
|
139
|
+
autoHideDelay: 5000,
|
140
|
+
autoHide: true,
|
141
|
+
clickToHide: true
|
142
|
+
});
|
143
|
+
},
|
144
|
+
//confirmation notification
|
145
|
+
Notification.prototype.confirm = function(style,position, title) {
|
146
|
+
var icon = "fa fa-adjust";
|
147
|
+
if(style == "error"){
|
148
|
+
icon = "fa fa-exclamation";
|
149
|
+
}else if(style == "warning"){
|
150
|
+
icon = "fa fa-warning";
|
151
|
+
}else if(style == "success"){
|
152
|
+
icon = "fa fa-check";
|
153
|
+
}else if(style == "custom"){
|
154
|
+
icon = "md md-album";
|
155
|
+
}else if(style == "info"){
|
156
|
+
icon = "fa fa-question";
|
157
|
+
}else{
|
158
|
+
icon = "fa fa-adjust";
|
159
|
+
}
|
160
|
+
$.notify({
|
161
|
+
title: title,
|
162
|
+
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>',
|
163
|
+
image: "<i class='"+icon+"'></i>"
|
164
|
+
}, {
|
165
|
+
style: 'metro',
|
166
|
+
className: style,
|
167
|
+
globalPosition:position,
|
168
|
+
showAnimation: "show",
|
169
|
+
showDuration: 0,
|
170
|
+
hideDuration: 0,
|
171
|
+
autoHide: false,
|
172
|
+
clickToHide: false
|
173
|
+
});
|
174
|
+
//listen for click events from this style
|
175
|
+
$(document).on('click', '.notifyjs-metro-base .no', function() {
|
176
|
+
//programmatically trigger propogating hide event
|
177
|
+
$(this).trigger('notify-hide');
|
178
|
+
});
|
179
|
+
$(document).on('click', '.notifyjs-metro-base .yes', function() {
|
180
|
+
//show button text
|
181
|
+
alert($(this).text() + " clicked!");
|
182
|
+
//hide notification
|
183
|
+
$(this).trigger('notify-hide');
|
184
|
+
});
|
185
|
+
},
|
186
|
+
//init - examples
|
187
|
+
Notification.prototype.init = function() {
|
188
|
+
|
189
|
+
},
|
190
|
+
//init
|
191
|
+
$.Notification = new Notification, $.Notification.Constructor = Notification
|
192
|
+
}(window.jQuery),
|
193
|
+
|
194
|
+
/**
|
195
|
+
* Components
|
196
|
+
*/
|
197
|
+
function($) {
|
198
|
+
"use strict";
|
199
|
+
|
200
|
+
var Components = function() {};
|
201
|
+
|
202
|
+
//initializing tooltip
|
203
|
+
Components.prototype.initTooltipPlugin = function() {
|
204
|
+
$.fn.tooltip && $('[data-toggle="tooltip"]').tooltip()
|
205
|
+
},
|
206
|
+
|
207
|
+
//initializing popover
|
208
|
+
Components.prototype.initPopoverPlugin = function() {
|
209
|
+
$.fn.popover && $('[data-toggle="popover"]').popover()
|
210
|
+
},
|
211
|
+
|
212
|
+
//initializing custom modal
|
213
|
+
Components.prototype.initCustomModalPlugin = function() {
|
214
|
+
$('[data-plugin="custommodal"]').on('click', function(e) {
|
215
|
+
Custombox.open({
|
216
|
+
target: $(this).attr("href"),
|
217
|
+
effect: $(this).attr("data-animation"),
|
218
|
+
overlaySpeed: $(this).attr("data-overlaySpeed"),
|
219
|
+
overlayColor: $(this).attr("data-overlayColor")
|
220
|
+
});
|
221
|
+
e.preventDefault();
|
222
|
+
});
|
223
|
+
},
|
224
|
+
|
225
|
+
//initializing nicescroll
|
226
|
+
Components.prototype.initNiceScrollPlugin = function() {
|
227
|
+
//You can change the color of scroll bar here
|
228
|
+
$.fn.niceScroll && $(".nicescroll").niceScroll({ cursorcolor: '#98a6ad',cursorwidth:'6px', cursorborderradius: '5px'});
|
229
|
+
},
|
230
|
+
|
231
|
+
//range slider
|
232
|
+
Components.prototype.initRangeSlider = function() {
|
233
|
+
$.fn.slider && $('[data-plugin="range-slider"]').slider({});
|
234
|
+
},
|
235
|
+
|
236
|
+
/* -------------
|
237
|
+
* Form related controls
|
238
|
+
*/
|
239
|
+
//switch
|
240
|
+
Components.prototype.initSwitchery = function() {
|
241
|
+
$('[data-plugin="switchery"]').each(function (idx, obj) {
|
242
|
+
new Switchery($(this)[0], $(this).data());
|
243
|
+
});
|
244
|
+
},
|
245
|
+
//multiselect
|
246
|
+
Components.prototype.initMultiSelect = function() {
|
247
|
+
if($('[data-plugin="multiselect"]').length > 0)
|
248
|
+
$('[data-plugin="multiselect"]').multiSelect($(this).data());
|
249
|
+
},
|
250
|
+
|
251
|
+
/* -------------
|
252
|
+
* small charts related widgets
|
253
|
+
*/
|
254
|
+
//peity charts
|
255
|
+
Components.prototype.initPeityCharts = function() {
|
256
|
+
$('[data-plugin="peity-pie"]').each(function(idx, obj) {
|
257
|
+
var colors = $(this).attr('data-colors')?$(this).attr('data-colors').split(","):[];
|
258
|
+
var width = $(this).attr('data-width')?$(this).attr('data-width'):20; //default is 20
|
259
|
+
var height = $(this).attr('data-height')?$(this).attr('data-height'):20; //default is 20
|
260
|
+
$(this).peity("pie", {
|
261
|
+
fill: colors,
|
262
|
+
width: width,
|
263
|
+
height: height
|
264
|
+
});
|
265
|
+
});
|
266
|
+
//donut
|
267
|
+
$('[data-plugin="peity-donut"]').each(function(idx, obj) {
|
268
|
+
var colors = $(this).attr('data-colors')?$(this).attr('data-colors').split(","):[];
|
269
|
+
var width = $(this).attr('data-width')?$(this).attr('data-width'):20; //default is 20
|
270
|
+
var height = $(this).attr('data-height')?$(this).attr('data-height'):20; //default is 20
|
271
|
+
$(this).peity("donut", {
|
272
|
+
fill: colors,
|
273
|
+
width: width,
|
274
|
+
height: height
|
275
|
+
});
|
276
|
+
});
|
277
|
+
|
278
|
+
$('[data-plugin="peity-donut-alt"]').each(function(idx, obj) {
|
279
|
+
$(this).peity("donut");
|
280
|
+
});
|
281
|
+
|
282
|
+
// line
|
283
|
+
$('[data-plugin="peity-line"]').each(function(idx, obj) {
|
284
|
+
$(this).peity("line", $(this).data());
|
285
|
+
});
|
286
|
+
|
287
|
+
// bar
|
288
|
+
$('[data-plugin="peity-bar"]').each(function(idx, obj) {
|
289
|
+
var colors = $(this).attr('data-colors')?$(this).attr('data-colors').split(","):[];
|
290
|
+
var width = $(this).attr('data-width')?$(this).attr('data-width'):20; //default is 20
|
291
|
+
var height = $(this).attr('data-height')?$(this).attr('data-height'):20; //default is 20
|
292
|
+
$(this).peity("bar", {
|
293
|
+
fill: colors,
|
294
|
+
width: width,
|
295
|
+
height: height
|
296
|
+
});
|
297
|
+
});
|
298
|
+
},
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
//initilizing
|
303
|
+
Components.prototype.init = function() {
|
304
|
+
var $this = this;
|
305
|
+
this.initTooltipPlugin(),
|
306
|
+
this.initPopoverPlugin(),
|
307
|
+
this.initNiceScrollPlugin(),
|
308
|
+
this.initCustomModalPlugin(),
|
309
|
+
this.initRangeSlider(),
|
310
|
+
this.initSwitchery(),
|
311
|
+
this.initMultiSelect(),
|
312
|
+
this.initPeityCharts(),
|
313
|
+
//creating portles
|
314
|
+
$.Portlet.init();
|
315
|
+
},
|
316
|
+
|
317
|
+
$.Components = new Components, $.Components.Constructor = Components
|
318
|
+
|
319
|
+
}(window.jQuery),
|
320
|
+
//initializing main application module
|
321
|
+
function($) {
|
322
|
+
"use strict";
|
323
|
+
$.Components.init();
|
324
|
+
}(window.jQuery);
|
325
|
+
</script>
|
326
|
+
<script type="application/javascript">!function($) {
|
327
|
+
"use strict";
|
328
|
+
|
329
|
+
var Dashboard1 = function() {
|
330
|
+
this.$realData = []
|
331
|
+
};
|
332
|
+
|
333
|
+
//creates Stacked chart
|
334
|
+
Dashboard1.prototype.createStackedChart = function(element, data, xkey, ykeys, labels, lineColors) {
|
335
|
+
Morris.Bar({
|
336
|
+
element: element,
|
337
|
+
data: data,
|
338
|
+
xkey: xkey,
|
339
|
+
ykeys: ykeys,
|
340
|
+
stacked: true,
|
341
|
+
labels: labels,
|
342
|
+
hideHover: 'auto',
|
343
|
+
resize: true, //defaulted to true
|
344
|
+
gridLineColor: '#eeeeee',
|
345
|
+
barColors: lineColors
|
346
|
+
});
|
347
|
+
},
|
348
|
+
|
349
|
+
//creates area chart with dotted
|
350
|
+
Dashboard1.prototype.createAreaChartDotted = function(element, pointSize, lineWidth, data, xkey, ykeys, labels, Pfillcolor, Pstockcolor, lineColors) {
|
351
|
+
Morris.Area({
|
352
|
+
element: element,
|
353
|
+
pointSize: 0,
|
354
|
+
lineWidth: 0,
|
355
|
+
data: data,
|
356
|
+
xkey: xkey,
|
357
|
+
ykeys: ykeys,
|
358
|
+
labels: labels,
|
359
|
+
hideHover: 'auto',
|
360
|
+
pointFillColors: Pfillcolor,
|
361
|
+
pointStrokeColors: Pstockcolor,
|
362
|
+
resize: true,
|
363
|
+
gridLineColor: '#eef0f2',
|
364
|
+
lineColors: lineColors
|
365
|
+
});
|
366
|
+
|
367
|
+
},
|
368
|
+
|
369
|
+
|
370
|
+
Dashboard1.prototype.init = function() {
|
371
|
+
|
372
|
+
//creating Stacked chart
|
373
|
+
var $stckedData = [
|
374
|
+
{ y: '2005', a: 45, b: 180, c: 100 },
|
375
|
+
{ y: '2006', a: 75, b: 65, c: 80 },
|
376
|
+
{ y: '2007', a: 100, b: 90, c: 56 },
|
377
|
+
{ y: '2008', a: 75, b: 65, c: 89 },
|
378
|
+
{ y: '2009', a: 100, b: 90, c: 120 },
|
379
|
+
{ y: '2010', a: 75, b: 65, c: 110 },
|
380
|
+
{ y: '2011', a: 50, b: 40, c: 85 },
|
381
|
+
{ y: '2012', a: 75, b: 65, c: 52 },
|
382
|
+
{ y: '2013', a: 50, b: 40, c: 77 },
|
383
|
+
{ y: '2014', a: 75, b: 65, c: 90 },
|
384
|
+
{ y: '2015', a: 100, b: 90, c: 130 }
|
385
|
+
];
|
386
|
+
this.createStackedChart('morris-bar-stacked', $stckedData, 'y', ['a', 'b', 'c'], ['Desktops', 'Tablets', 'Mobiles'], ['#5fbeaa', '#5d9cec', '#ebeff2']);
|
387
|
+
|
388
|
+
//creating area chart
|
389
|
+
var $areaDotData = [
|
390
|
+
{ y: '2009', a: 10, b: 20, c:30 },
|
391
|
+
{ y: '2010', a: 75, b: 65, c:30 },
|
392
|
+
{ y: '2011', a: 50, b: 40, c:30 },
|
393
|
+
{ y: '2012', a: 75, b: 65, c:30 },
|
394
|
+
{ y: '2013', a: 50, b: 40, c:30 },
|
395
|
+
{ y: '2014', a: 75, b: 65, c:30 },
|
396
|
+
{ y: '2015', a: 90, b: 60, c:30 }
|
397
|
+
];
|
398
|
+
this.createAreaChartDotted('morris-area-with-dotted', 0, 0, $areaDotData, 'y', ['a', 'b', 'c'], ['Desktops ', 'Tablets ', 'Mobiles '],['#ffffff'],['#999999'], ['#5fbeaa', '#5d9cec','#ebeff2']);
|
399
|
+
|
400
|
+
},
|
401
|
+
//init
|
402
|
+
$.Dashboard1 = new Dashboard1, $.Dashboard1.Constructor = Dashboard1
|
403
|
+
}(window.jQuery),
|
404
|
+
|
405
|
+
//initializing
|
406
|
+
function($) {
|
407
|
+
"use strict";
|
408
|
+
$.Dashboard1.init();
|
409
|
+
}(window.jQuery);</script>
|
410
|
+
<script type="application/javascript">
|
411
|
+
(function($){
|
412
|
+
|
413
|
+
'use strict';
|
414
|
+
|
415
|
+
function initNavbar () {
|
416
|
+
|
417
|
+
$('.navbar-toggle').on('click', function(event) {
|
418
|
+
$(this).toggleClass('open');
|
419
|
+
$('#navigation').slideToggle(400);
|
420
|
+
$('.cart, .search').removeClass('open');
|
421
|
+
});
|
422
|
+
|
423
|
+
$('.navigation-menu>li').slice(-1).addClass('last-elements');
|
424
|
+
|
425
|
+
$('.navigation-menu li.has-submenu a[href="#"]').on('click', function(e) {
|
426
|
+
if ($(window).width() < 992) {
|
427
|
+
e.preventDefault();
|
428
|
+
$(this).parent('li').toggleClass('open').find('.submenu:first').toggleClass('open');
|
429
|
+
}
|
430
|
+
});
|
431
|
+
}
|
432
|
+
|
433
|
+
function init () {
|
434
|
+
initNavbar();
|
435
|
+
}
|
436
|
+
|
437
|
+
init();
|
438
|
+
|
439
|
+
})(jQuery)
|
440
|
+
|
441
|
+
|
442
|
+
</script>
|
27
443
|
|
28
444
|
<script type="text/javascript">
|
29
445
|
jQuery(document).ready(function ($) {
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: college_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hasan Mohammad Tanbir
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -92,10 +92,12 @@ files:
|
|
92
92
|
- app/assets/stylesheets/style.css
|
93
93
|
- app/views/layouts/_head.html.erb
|
94
94
|
- app/views/layouts/_header.html.erb
|
95
|
+
- app/views/layouts/_inline_css.html.erb
|
95
96
|
- app/views/layouts/_js.html.erb
|
96
97
|
- app/views/layouts/college_admin.erb
|
97
98
|
- bin/console
|
98
99
|
- bin/setup
|
100
|
+
- college_admin-0.1.1.gem
|
99
101
|
- college_admin.gemspec
|
100
102
|
- config/initializers/assets.rb
|
101
103
|
- lib/college_admin.rb
|