rails_modular_admin 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +71 -0
- data/Rakefile +34 -0
- data/app/assets/config/rails_modular_admin_manifest.js +2 -0
- data/app/assets/javascripts/index.js +87 -0
- data/app/assets/javascripts/rails_modular_admin.js +3 -0
- data/app/assets/javascripts/rails_modular_admin/_common/_helpers/code-helper.js +36 -0
- data/app/assets/javascripts/rails_modular_admin/_common/_helpers/for-helper.js +8 -0
- data/app/assets/javascripts/rails_modular_admin/_common/_helpers/is-helper.js +98 -0
- data/app/assets/javascripts/rails_modular_admin/_common/_helpers/times-helper.js +11 -0
- data/app/assets/javascripts/rails_modular_admin/_common/animations/animations.js +14 -0
- data/app/assets/javascripts/rails_modular_admin/_common/items-list/items-list.js +19 -0
- data/app/assets/javascripts/rails_modular_admin/_common/nprogress/nprogress.js +9 -0
- data/app/assets/javascripts/rails_modular_admin/_common/sameheight-items/sameheight-items.js +44 -0
- data/app/assets/javascripts/rails_modular_admin/app.js +1429 -0
- data/app/assets/javascripts/rails_modular_admin/app/_common/editor/editor-helper.js +10 -0
- data/app/assets/javascripts/rails_modular_admin/app/_common/editor/editor.js +34 -0
- data/app/assets/javascripts/rails_modular_admin/app/_common/header/nav/nav.js +14 -0
- data/app/assets/javascripts/rails_modular_admin/app/_common/modals/modal-media/modal-media.js +23 -0
- data/app/assets/javascripts/rails_modular_admin/app/_common/sidebar/customize/customize.js +155 -0
- data/app/assets/javascripts/rails_modular_admin/app/_common/sidebar/sidebar.js +38 -0
- data/app/assets/javascripts/rails_modular_admin/app/charts/charts-flot/charts-flot.js +329 -0
- data/app/assets/javascripts/rails_modular_admin/app/charts/charts-morris/charts-morris.js +125 -0
- data/app/assets/javascripts/rails_modular_admin/app/dashboard/history/history.js +145 -0
- data/app/assets/javascripts/rails_modular_admin/app/dashboard/items/items.js +41 -0
- data/app/assets/javascripts/rails_modular_admin/app/dashboard/sales-breakdown/sales-breakdown.js +37 -0
- data/app/assets/javascripts/rails_modular_admin/app/dashboard/sales-by-countries/sales-by-countries.js +50 -0
- data/app/assets/javascripts/rails_modular_admin/app/dashboard/tasks/tasks.js +13 -0
- data/app/assets/javascripts/rails_modular_admin/app/forms/input-groups/input-groups.js +14 -0
- data/app/assets/javascripts/rails_modular_admin/app/items/editor/item-editor.js +34 -0
- data/app/assets/javascripts/rails_modular_admin/app/items/list/items-list.js +44 -0
- data/app/assets/javascripts/rails_modular_admin/app/pages/error.js +18 -0
- data/app/assets/javascripts/rails_modular_admin/auth/login/login.js +35 -0
- data/app/assets/javascripts/rails_modular_admin/auth/reset/reset.js +31 -0
- data/app/assets/javascripts/rails_modular_admin/auth/signup/signup.js +88 -0
- data/app/assets/javascripts/rails_modular_admin/config.js +51 -0
- data/app/assets/javascripts/rails_modular_admin/main.js +16 -0
- data/app/assets/javascripts/rails_modular_admin/vendor.js +60485 -0
- data/app/assets/stylesheets/rails_modular_admin.scss +1 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/_styles/_mixins.scss +103 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/_styles/layout.scss +74 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/_styles/misc.scss +115 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/_styles/typography.scss +60 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/alert/alert.scss +27 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/animations/animations.scss +4 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/button/button.scss +117 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/card/card.scss +200 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/chart/chart.scss +9 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/dropdown/dropdown.scss +28 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/flex/flex.scss +14 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/form/form.scss +235 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/images-container/images-container.scss +129 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/items-list/items-list.scss +388 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/logo/logo.scss +46 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/modal/modal-tabs.scss +27 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/navigation/navigation.scss +114 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/nprogress/nprogress.scss +22 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/pagination/pagination.scss +20 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/sameheight-items/sameheight-items.scss +5 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/scrollbar/scrollbar.scss +24 -0
- data/app/assets/stylesheets/rails_modular_admin/_common/table/table.scss +12 -0
- data/app/assets/stylesheets/rails_modular_admin/_main.scss +41 -0
- data/app/assets/stylesheets/rails_modular_admin/_themes/blue-theme.scss +1 -0
- data/app/assets/stylesheets/rails_modular_admin/_themes/custom-theme.scss +0 -0
- data/app/assets/stylesheets/rails_modular_admin/_themes/green-theme.scss +10 -0
- data/app/assets/stylesheets/rails_modular_admin/_themes/orange-theme.scss +12 -0
- data/app/assets/stylesheets/rails_modular_admin/_themes/purple-theme.scss +6 -0
- data/app/assets/stylesheets/rails_modular_admin/_themes/red-theme.scss +11 -0
- data/app/assets/stylesheets/rails_modular_admin/_themes/seagreen-theme.scss +9 -0
- data/app/assets/stylesheets/rails_modular_admin/_variables.scss +109 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/editor/editor.scss +28 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/footer/footer.scss +68 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/header/buttons/buttons.scss +30 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/header/collapse/collapse.scss +23 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/header/header.scss +33 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/header/nav/nav.scss +64 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/header/nav/notifications/notifications.scss +126 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/header/nav/profile/profile.scss +93 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/header/search/search.scss +68 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/modals/modal-media/modal-media.scss +56 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/modals/modals.scss +19 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/sidebar/customize/customize.scss +157 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/sidebar/header/header.scss +14 -0
- data/app/assets/stylesheets/rails_modular_admin/app/_common/sidebar/sidebar.scss +240 -0
- data/app/assets/stylesheets/rails_modular_admin/app/app.scss +72 -0
- data/app/assets/stylesheets/rails_modular_admin/app/charts/charts-flot/charts-flot.scss +18 -0
- data/app/assets/stylesheets/rails_modular_admin/app/dashboard/dashboard.scss +7 -0
- data/app/assets/stylesheets/rails_modular_admin/app/dashboard/history/history.scss +6 -0
- data/app/assets/stylesheets/rails_modular_admin/app/dashboard/items/items-header.scss +81 -0
- data/app/assets/stylesheets/rails_modular_admin/app/dashboard/items/items-list.scss +102 -0
- data/app/assets/stylesheets/rails_modular_admin/app/dashboard/sales-breakdown/sales-breakdown.scss +7 -0
- data/app/assets/stylesheets/rails_modular_admin/app/dashboard/sales-by-countries/sales-by-countries.scss +14 -0
- data/app/assets/stylesheets/rails_modular_admin/app/dashboard/stats/stats.scss +70 -0
- data/app/assets/stylesheets/rails_modular_admin/app/dashboard/tasks/tasks.scss +47 -0
- data/app/assets/stylesheets/rails_modular_admin/app/items/editor/item-editor.scss +3 -0
- data/app/assets/stylesheets/rails_modular_admin/app/items/list/items-list.scss +330 -0
- data/app/assets/stylesheets/rails_modular_admin/app/pages/error.scss +73 -0
- data/app/assets/stylesheets/rails_modular_admin/app/pages/screenful/screenful.scss +101 -0
- data/app/assets/stylesheets/rails_modular_admin/app/tables/responsive-tables/responsive-tables.scss +77 -0
- data/app/assets/stylesheets/rails_modular_admin/application.scss +26 -0
- data/app/assets/stylesheets/rails_modular_admin/auth/auth.scss +72 -0
- data/app/controllers/rails_modular_admin/application_controller.rb +5 -0
- data/app/helpers/rails_modular_admin/application_helper.rb +4 -0
- data/app/jobs/rails_modular_admin/application_job.rb +4 -0
- data/app/mailers/rails_modular_admin/application_mailer.rb +6 -0
- data/app/models/rails_modular_admin/application_record.rb +5 -0
- data/app/views/layouts/rails_modular_admin/application.html.erb +16 -0
- data/config/initializers/assets.rb +1 -0
- data/config/routes.rb +2 -0
- data/lib/generators/rails_modular_admin/USAGE +8 -0
- data/lib/generators/rails_modular_admin/install_generator.rb +12 -0
- data/lib/generators/rails_modular_admin/templates/custom-theme.scss +14 -0
- data/lib/rails_modular_admin.rb +11 -0
- data/lib/rails_modular_admin/engine.rb +5 -0
- data/lib/rails_modular_admin/version.rb +3 -0
- data/lib/tasks/rails_modular_admin_tasks.rake +47 -0
- metadata +205 -0
@@ -0,0 +1,125 @@
|
|
1
|
+
$(function() {
|
2
|
+
|
3
|
+
if (!$('#morris-one-line-chart').length) {
|
4
|
+
return false;
|
5
|
+
}
|
6
|
+
|
7
|
+
function drawMorrisCharts() {
|
8
|
+
|
9
|
+
$('#morris-one-line-chart').empty();
|
10
|
+
|
11
|
+
Morris.Line({
|
12
|
+
element: 'morris-one-line-chart',
|
13
|
+
data: [
|
14
|
+
{ year: '2008', value: 5 },
|
15
|
+
{ year: '2009', value: 10 },
|
16
|
+
{ year: '2010', value: 8 },
|
17
|
+
{ year: '2011', value: 22 },
|
18
|
+
{ year: '2012', value: 8 },
|
19
|
+
{ year: '2014', value: 10 },
|
20
|
+
{ year: '2015', value: 5 }
|
21
|
+
],
|
22
|
+
xkey: 'year',
|
23
|
+
ykeys: ['value'],
|
24
|
+
resize: true,
|
25
|
+
lineWidth:4,
|
26
|
+
labels: ['Value'],
|
27
|
+
lineColors: [config.chart.colorPrimary.toString()],
|
28
|
+
pointSize:5,
|
29
|
+
});
|
30
|
+
|
31
|
+
$('#morris-area-chart').empty();
|
32
|
+
|
33
|
+
Morris.Area({
|
34
|
+
element: 'morris-area-chart',
|
35
|
+
data: [{ period: '2010 Q1', iphone: 2666, ipad: null, itouch: 2647 },
|
36
|
+
{ period: '2010 Q2', iphone: 2778, ipad: 2294, itouch: 2441 },
|
37
|
+
{ period: '2010 Q3', iphone: 4912, ipad: 1969, itouch: 2501 },
|
38
|
+
{ period: '2010 Q4', iphone: 3767, ipad: 3597, itouch: 5689 },
|
39
|
+
{ period: '2011 Q1', iphone: 6810, ipad: 1914, itouch: 2293 },
|
40
|
+
{ period: '2011 Q2', iphone: 5670, ipad: 4293, itouch: 1881 },
|
41
|
+
{ period: '2011 Q3', iphone: 4820, ipad: 3795, itouch: 1588 },
|
42
|
+
{ period: '2011 Q4', iphone: 15073, ipad: 5967, itouch: 5175 },
|
43
|
+
{ period: '2012 Q1', iphone: 10687, ipad: 4460, itouch: 2028 },
|
44
|
+
{ period: '2012 Q2', iphone: 8432, ipad: 5713, itouch: 1791 } ],
|
45
|
+
xkey: 'period',
|
46
|
+
ykeys: ['iphone', 'ipad', 'itouch'],
|
47
|
+
labels: ['iPhone', 'iPad', 'iPod Touch'],
|
48
|
+
pointSize: 2,
|
49
|
+
hideHover: 'auto',
|
50
|
+
resize: true,
|
51
|
+
lineColors: [
|
52
|
+
tinycolor(config.chart.colorPrimary.toString()).lighten(10).toString(),
|
53
|
+
tinycolor(config.chart.colorPrimary.toString()).darken(10).toString(),
|
54
|
+
config.chart.colorPrimary.toString()
|
55
|
+
],
|
56
|
+
lineWidth:2,
|
57
|
+
pointSize:1,
|
58
|
+
});
|
59
|
+
|
60
|
+
$('#morris-donut-chart').empty();
|
61
|
+
|
62
|
+
Morris.Donut({
|
63
|
+
element: 'morris-donut-chart',
|
64
|
+
data: [{ label: "Download Sales", value: 12 },
|
65
|
+
{ label: "In-Store Sales", value: 30 },
|
66
|
+
{ label: "Mail-Order Sales", value: 20 } ],
|
67
|
+
resize: true,
|
68
|
+
colors: [
|
69
|
+
tinycolor(config.chart.colorPrimary.toString()).lighten(10).toString(),
|
70
|
+
tinycolor(config.chart.colorPrimary.toString()).darken(10).toString(),
|
71
|
+
config.chart.colorPrimary.toString()
|
72
|
+
],
|
73
|
+
});
|
74
|
+
|
75
|
+
$('#morris-bar-chart').empty();
|
76
|
+
|
77
|
+
Morris.Bar({
|
78
|
+
element: 'morris-bar-chart',
|
79
|
+
data: [{ y: '2006', a: 60, b: 50 },
|
80
|
+
{ y: '2007', a: 75, b: 65 },
|
81
|
+
{ y: '2008', a: 50, b: 40 },
|
82
|
+
{ y: '2009', a: 75, b: 65 },
|
83
|
+
{ y: '2010', a: 50, b: 40 },
|
84
|
+
{ y: '2011', a: 75, b: 65 },
|
85
|
+
{ y: '2012', a: 100, b: 90 } ],
|
86
|
+
xkey: 'y',
|
87
|
+
ykeys: ['a', 'b'],
|
88
|
+
labels: ['Series A', 'Series B'],
|
89
|
+
hideHover: 'auto',
|
90
|
+
resize: true,
|
91
|
+
barColors: [
|
92
|
+
config.chart.colorPrimary.toString(),
|
93
|
+
tinycolor(config.chart.colorPrimary.toString()).darken(10).toString()
|
94
|
+
],
|
95
|
+
});
|
96
|
+
|
97
|
+
$('#morris-line-chart').empty();
|
98
|
+
|
99
|
+
Morris.Line({
|
100
|
+
element: 'morris-line-chart',
|
101
|
+
data: [{ y: '2006', a: 100, b: 90 },
|
102
|
+
{ y: '2007', a: 75, b: 65 },
|
103
|
+
{ y: '2008', a: 50, b: 40 },
|
104
|
+
{ y: '2009', a: 75, b: 65 },
|
105
|
+
{ y: '2010', a: 50, b: 40 },
|
106
|
+
{ y: '2011', a: 75, b: 65 },
|
107
|
+
{ y: '2012', a: 100, b: 90 } ],
|
108
|
+
xkey: 'y',
|
109
|
+
ykeys: ['a', 'b'],
|
110
|
+
labels: ['Series A', 'Series B'],
|
111
|
+
hideHover: 'auto',
|
112
|
+
resize: true,
|
113
|
+
lineColors: [
|
114
|
+
config.chart.colorPrimary.toString(),
|
115
|
+
tinycolor(config.chart.colorPrimary.toString()).darken(10).toString()
|
116
|
+
],
|
117
|
+
});
|
118
|
+
}
|
119
|
+
|
120
|
+
drawMorrisCharts();
|
121
|
+
|
122
|
+
$(document).on("themechange", function(){
|
123
|
+
drawMorrisCharts();
|
124
|
+
});
|
125
|
+
});
|
@@ -0,0 +1,145 @@
|
|
1
|
+
$(function() {
|
2
|
+
|
3
|
+
if (!$('#dashboard-visits-chart').length) {
|
4
|
+
return false;
|
5
|
+
}
|
6
|
+
|
7
|
+
// drawing visits chart
|
8
|
+
drawVisitsChart();
|
9
|
+
|
10
|
+
var el = null;
|
11
|
+
var item = 'visits';
|
12
|
+
|
13
|
+
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
14
|
+
|
15
|
+
el = e.target;
|
16
|
+
item = $(el).attr('href').replace('#', '');
|
17
|
+
switchHistoryCharts(item);
|
18
|
+
|
19
|
+
});
|
20
|
+
|
21
|
+
$(document).on("themechange", function(){
|
22
|
+
switchHistoryCharts(item);
|
23
|
+
});
|
24
|
+
|
25
|
+
function switchHistoryCharts(item){
|
26
|
+
var chartSelector = "#dashboard-" + item + "-chart";
|
27
|
+
|
28
|
+
if ($(chartSelector).has('svg').length) {
|
29
|
+
$(chartSelector).empty();
|
30
|
+
}
|
31
|
+
|
32
|
+
switch(item){
|
33
|
+
case 'visits':
|
34
|
+
drawVisitsChart();
|
35
|
+
break;
|
36
|
+
case 'downloads':
|
37
|
+
drawDownloadsChart();
|
38
|
+
break;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
function drawVisitsChart(){
|
43
|
+
var dataVisits = [
|
44
|
+
{ x: '2015-09-01', y: 70},
|
45
|
+
{ x: '2015-09-02', y: 75 },
|
46
|
+
{ x: '2015-09-03', y: 50},
|
47
|
+
{ x: '2015-09-04', y: 75 },
|
48
|
+
{ x: '2015-09-05', y: 50 },
|
49
|
+
{ x: '2015-09-06', y: 75 },
|
50
|
+
{ x: '2015-09-07', y: 86 }
|
51
|
+
];
|
52
|
+
|
53
|
+
|
54
|
+
Morris.Line({
|
55
|
+
element: 'dashboard-visits-chart',
|
56
|
+
data: dataVisits,
|
57
|
+
xkey: 'x',
|
58
|
+
ykeys: ['y'],
|
59
|
+
ymin: 'auto 40',
|
60
|
+
labels: ['Visits'],
|
61
|
+
xLabels: "day",
|
62
|
+
hideHover: 'auto',
|
63
|
+
yLabelFormat: function (y) {
|
64
|
+
// Only integers
|
65
|
+
if (y === parseInt(y, 10)) {
|
66
|
+
return y;
|
67
|
+
}
|
68
|
+
else {
|
69
|
+
return '';
|
70
|
+
}
|
71
|
+
},
|
72
|
+
resize: true,
|
73
|
+
lineColors: [
|
74
|
+
config.chart.colorSecondary.toString(),
|
75
|
+
],
|
76
|
+
pointFillColors: [
|
77
|
+
config.chart.colorPrimary.toString(),
|
78
|
+
]
|
79
|
+
});
|
80
|
+
}
|
81
|
+
|
82
|
+
function drawDownloadsChart(){
|
83
|
+
|
84
|
+
var dataDownloads = [
|
85
|
+
{
|
86
|
+
year: '2006',
|
87
|
+
downloads: 1300
|
88
|
+
},
|
89
|
+
{
|
90
|
+
year: '2007',
|
91
|
+
downloads: 1526
|
92
|
+
},
|
93
|
+
{
|
94
|
+
year: '2008',
|
95
|
+
downloads: 2000
|
96
|
+
},
|
97
|
+
{
|
98
|
+
year: '2009',
|
99
|
+
downloads: 1800
|
100
|
+
},
|
101
|
+
{
|
102
|
+
year: '2010',
|
103
|
+
downloads: 1650
|
104
|
+
},
|
105
|
+
{
|
106
|
+
year: '2011',
|
107
|
+
downloads: 620
|
108
|
+
},
|
109
|
+
{
|
110
|
+
year: '2012',
|
111
|
+
downloads: 1000
|
112
|
+
},
|
113
|
+
{
|
114
|
+
year: '2013',
|
115
|
+
downloads: 1896
|
116
|
+
},
|
117
|
+
{
|
118
|
+
year: '2014',
|
119
|
+
downloads: 850
|
120
|
+
},
|
121
|
+
{
|
122
|
+
year: '2015',
|
123
|
+
downloads: 1500
|
124
|
+
}
|
125
|
+
];
|
126
|
+
|
127
|
+
|
128
|
+
Morris.Bar({
|
129
|
+
element: 'dashboard-downloads-chart',
|
130
|
+
data: dataDownloads,
|
131
|
+
xkey: 'year',
|
132
|
+
ykeys: ['downloads'],
|
133
|
+
labels: ['Downloads'],
|
134
|
+
hideHover: 'auto',
|
135
|
+
resize: true,
|
136
|
+
barColors: [
|
137
|
+
config.chart.colorPrimary.toString(),
|
138
|
+
tinycolor(config.chart.colorPrimary.toString()).darken(10).toString()
|
139
|
+
],
|
140
|
+
});
|
141
|
+
}
|
142
|
+
});
|
143
|
+
|
144
|
+
|
145
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
$(function() {
|
2
|
+
|
3
|
+
|
4
|
+
function drawDashboardItemsListSparklines(){
|
5
|
+
$(".dashboard-page .items .sparkline").each(function() {
|
6
|
+
var type = $(this).data('type');
|
7
|
+
|
8
|
+
// There is predefined data
|
9
|
+
if ($(this).data('data')) {
|
10
|
+
var data = $(this).data('data').split(',').map(function(item) {
|
11
|
+
if (item.indexOf(":") > 0) {
|
12
|
+
return item.split(":");
|
13
|
+
}
|
14
|
+
else {
|
15
|
+
return item;
|
16
|
+
}
|
17
|
+
});
|
18
|
+
}
|
19
|
+
// Generate random data
|
20
|
+
else {
|
21
|
+
var data = [];
|
22
|
+
for (var i = 0; i < 17; i++) {
|
23
|
+
data.push(Math.round(100 * Math.random()));
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
$(this).sparkline(data, {
|
29
|
+
barColor: config.chart.colorPrimary.toString(),
|
30
|
+
height: $(this).height(),
|
31
|
+
type: type
|
32
|
+
});
|
33
|
+
});
|
34
|
+
}
|
35
|
+
|
36
|
+
drawDashboardItemsListSparklines();
|
37
|
+
|
38
|
+
$(document).on("themechange", function(){
|
39
|
+
drawDashboardItemsListSparklines();
|
40
|
+
});
|
41
|
+
});
|
data/app/assets/javascripts/rails_modular_admin/app/dashboard/sales-breakdown/sales-breakdown.js
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
$(function() {
|
2
|
+
|
3
|
+
var $dashboardSalesBreakdownChart = $('#dashboard-sales-breakdown-chart');
|
4
|
+
|
5
|
+
if (!$dashboardSalesBreakdownChart.length) {
|
6
|
+
return false;
|
7
|
+
}
|
8
|
+
|
9
|
+
function drawSalesChart(){
|
10
|
+
|
11
|
+
$dashboardSalesBreakdownChart.empty();
|
12
|
+
|
13
|
+
Morris.Donut({
|
14
|
+
element: 'dashboard-sales-breakdown-chart',
|
15
|
+
data: [{ label: "Download Sales", value: 12 },
|
16
|
+
{ label: "In-Store Sales", value: 30 },
|
17
|
+
{ label: "Mail-Order Sales", value: 20 } ],
|
18
|
+
resize: true,
|
19
|
+
colors: [
|
20
|
+
tinycolor(config.chart.colorPrimary.toString()).lighten(10).toString(),
|
21
|
+
tinycolor(config.chart.colorPrimary.toString()).darken(8).toString(),
|
22
|
+
config.chart.colorPrimary.toString()
|
23
|
+
],
|
24
|
+
});
|
25
|
+
|
26
|
+
var $sameheightContainer = $dashboardSalesBreakdownChart.closest(".sameheight-container");
|
27
|
+
|
28
|
+
setSameHeights($sameheightContainer);
|
29
|
+
}
|
30
|
+
|
31
|
+
drawSalesChart();
|
32
|
+
|
33
|
+
$(document).on("themechange", function(){
|
34
|
+
drawSalesChart();
|
35
|
+
});
|
36
|
+
|
37
|
+
})
|
@@ -0,0 +1,50 @@
|
|
1
|
+
$(function() {
|
2
|
+
|
3
|
+
var $dashboardSalesMap = $('#dashboard-sales-map');
|
4
|
+
|
5
|
+
if (!$dashboardSalesMap.length) {
|
6
|
+
return false;
|
7
|
+
}
|
8
|
+
|
9
|
+
function drawSalesMap() {
|
10
|
+
|
11
|
+
$dashboardSalesMap.empty();
|
12
|
+
|
13
|
+
var color = config.chart.colorPrimary.toHexString();
|
14
|
+
var darkColor = tinycolor(config.chart.colorPrimary.toString()).darken(40).toHexString();
|
15
|
+
var selectedColor = tinycolor(config.chart.colorPrimary.toString()).darken(10).toHexString();
|
16
|
+
|
17
|
+
var sales_data = {
|
18
|
+
us: 2000,
|
19
|
+
ru: 2000,
|
20
|
+
gb: 10000,
|
21
|
+
fr: 10000,
|
22
|
+
de: 10000,
|
23
|
+
cn: 10000,
|
24
|
+
in: 10000,
|
25
|
+
sa: 10000,
|
26
|
+
ca: 10000,
|
27
|
+
br: 5000,
|
28
|
+
au: 5000
|
29
|
+
};
|
30
|
+
|
31
|
+
$dashboardSalesMap.vectorMap({
|
32
|
+
map: 'world_en',
|
33
|
+
backgroundColor: 'transparent',
|
34
|
+
color: '#E5E3E5',
|
35
|
+
hoverOpacity: 0.7,
|
36
|
+
selectedColor: selectedColor,
|
37
|
+
enableZoom: true,
|
38
|
+
showTooltip: true,
|
39
|
+
values: sales_data,
|
40
|
+
scaleColors: [ color, darkColor],
|
41
|
+
normalizeFunction: 'linear'
|
42
|
+
});
|
43
|
+
}
|
44
|
+
|
45
|
+
drawSalesMap();
|
46
|
+
|
47
|
+
$(document).on("themechange", function(){
|
48
|
+
drawSalesMap();
|
49
|
+
});
|
50
|
+
});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
//LoginForm validation
|
2
|
+
$(function() {
|
3
|
+
if (!$('.form-control').length) {
|
4
|
+
return false;
|
5
|
+
}
|
6
|
+
|
7
|
+
$('.form-control').focus(function() {
|
8
|
+
$(this).siblings('.input-group-addon').addClass('focus');
|
9
|
+
});
|
10
|
+
|
11
|
+
$('.form-control').blur(function() {
|
12
|
+
$(this).siblings('.input-group-addon').removeClass('focus');
|
13
|
+
});
|
14
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
$(function(){
|
2
|
+
|
3
|
+
// set sortable options
|
4
|
+
var sortable = new Sortable($('.images-container').get(0), {
|
5
|
+
animation: 150,
|
6
|
+
handle: ".control-btn.move",
|
7
|
+
draggable: ".image-container",
|
8
|
+
onMove: function (evt) {
|
9
|
+
var $relatedElem = $(evt.related);
|
10
|
+
|
11
|
+
if ($relatedElem.hasClass('add-image')) {
|
12
|
+
return false;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
});
|
16
|
+
|
17
|
+
|
18
|
+
$controlsButtons = $('.controls');
|
19
|
+
|
20
|
+
$controlsButtonsStar = $controlsButtons.find('.star');
|
21
|
+
$controlsButtonsRemove = $controlsButtons.find('.remove');
|
22
|
+
|
23
|
+
$controlsButtonsStar.on('click',function(e){
|
24
|
+
e.preventDefault();
|
25
|
+
|
26
|
+
$controlsButtonsStar.removeClass('active');
|
27
|
+
$controlsButtonsStar.parents('.image-container').removeClass('main');
|
28
|
+
|
29
|
+
$(this).addClass('active');
|
30
|
+
|
31
|
+
$(this).parents('.image-container').addClass('main');
|
32
|
+
})
|
33
|
+
|
34
|
+
})
|