rails_modular_admin 0.2.4 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/rails_modular_admin.js +1 -2
  3. data/app/assets/stylesheets/rails_modular_admin/application.scss +1 -1
  4. data/app/assets/stylesheets/rails_modular_admin.scss +1 -0
  5. data/config/initializers/assets.rb +34 -2
  6. data/lib/rails_modular_admin/version.rb +1 -1
  7. metadata +30 -30
  8. data/app/assets/javascripts/rails_modular_admin/_common/_helpers/code-helper.js +0 -36
  9. data/app/assets/javascripts/rails_modular_admin/_common/_helpers/for-helper.js +0 -8
  10. data/app/assets/javascripts/rails_modular_admin/_common/_helpers/is-helper.js +0 -98
  11. data/app/assets/javascripts/rails_modular_admin/_common/_helpers/times-helper.js +0 -11
  12. data/app/assets/javascripts/rails_modular_admin/_common/animations/animations.js +0 -14
  13. data/app/assets/javascripts/rails_modular_admin/_common/items-list/items-list.js +0 -19
  14. data/app/assets/javascripts/rails_modular_admin/_common/nprogress/nprogress.js +0 -9
  15. data/app/assets/javascripts/rails_modular_admin/_common/sameheight-items/sameheight-items.js +0 -44
  16. data/app/assets/javascripts/rails_modular_admin/app/_common/editor/editor-helper.js +0 -10
  17. data/app/assets/javascripts/rails_modular_admin/app/_common/editor/editor.js +0 -34
  18. data/app/assets/javascripts/rails_modular_admin/app/_common/header/nav/nav.js +0 -14
  19. data/app/assets/javascripts/rails_modular_admin/app/_common/modals/modal-media/modal-media.js +0 -23
  20. data/app/assets/javascripts/rails_modular_admin/app/_common/sidebar/customize/customize.js +0 -155
  21. data/app/assets/javascripts/rails_modular_admin/app/_common/sidebar/sidebar.js +0 -38
  22. data/app/assets/javascripts/rails_modular_admin/app/charts/charts-flot/charts-flot.js +0 -329
  23. data/app/assets/javascripts/rails_modular_admin/app/charts/charts-morris/charts-morris.js +0 -125
  24. data/app/assets/javascripts/rails_modular_admin/app/dashboard/history/history.js +0 -145
  25. data/app/assets/javascripts/rails_modular_admin/app/dashboard/items/items.js +0 -41
  26. data/app/assets/javascripts/rails_modular_admin/app/dashboard/sales-breakdown/sales-breakdown.js +0 -37
  27. data/app/assets/javascripts/rails_modular_admin/app/dashboard/sales-by-countries/sales-by-countries.js +0 -50
  28. data/app/assets/javascripts/rails_modular_admin/app/dashboard/tasks/tasks.js +0 -13
  29. data/app/assets/javascripts/rails_modular_admin/app/forms/input-groups/input-groups.js +0 -14
  30. data/app/assets/javascripts/rails_modular_admin/app/items/editor/item-editor.js +0 -34
  31. data/app/assets/javascripts/rails_modular_admin/app/items/list/items-list.js +0 -44
  32. data/app/assets/javascripts/rails_modular_admin/app/pages/error.js +0 -18
  33. data/app/assets/javascripts/rails_modular_admin/auth/login/login.js +0 -35
  34. data/app/assets/javascripts/rails_modular_admin/auth/reset/reset.js +0 -31
  35. data/app/assets/javascripts/rails_modular_admin/auth/signup/signup.js +0 -88
@@ -1,41 +0,0 @@
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
- });
@@ -1,37 +0,0 @@
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
- })
@@ -1,50 +0,0 @@
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
- });
@@ -1,13 +0,0 @@
1
- $(function() {
2
-
3
- $('.actions-list > li').on('click', '.check', function(e){
4
- e.preventDefault();
5
-
6
- $(this).parents('.tasks-item')
7
- .find('.checkbox')
8
- .prop("checked", true);
9
-
10
- removeActionList();
11
- });
12
-
13
- });
@@ -1,14 +0,0 @@
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
- });
@@ -1,34 +0,0 @@
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
- })
@@ -1,44 +0,0 @@
1
- $(function() {
2
-
3
- if (!$('#select-all-items').length) {
4
- return false;
5
- }
6
-
7
-
8
- $('#select-all-items').on('change', function() {
9
- var $this = $(this).children(':checkbox').get(0);
10
-
11
- $(this).parents('li')
12
- .siblings()
13
- .find(':checkbox')
14
- .prop('checked', $this.checked)
15
- .val($this.checked)
16
- .change();
17
- });
18
-
19
-
20
- function drawItemsListSparklines(){
21
- $(".items-list-page .sparkline").each(function() {
22
- var type = $(this).data('type');
23
-
24
- // Generate random data
25
- var data = [];
26
- for (var i = 0; i < 17; i++) {
27
- data.push(Math.round(100 * Math.random()));
28
- }
29
-
30
- $(this).sparkline(data, {
31
- barColor: config.chart.colorPrimary.toString(),
32
- height: $(this).height(),
33
- type: type
34
- });
35
- });
36
- }
37
-
38
- drawItemsListSparklines();
39
-
40
- $(document).on("themechange", function(){
41
- drawItemsListSparklines();
42
- });
43
-
44
- });
@@ -1,18 +0,0 @@
1
- $(function() {
2
- animate({
3
- name: 'flipInY',
4
- selector: '.error-card > .error-title-block'
5
- });
6
-
7
-
8
- setTimeout(function(){
9
- var $el = $('.error-card > .error-container');
10
-
11
- animate({
12
- name: 'fadeInUp',
13
- selector: $el
14
- });
15
-
16
- $el.addClass('visible');
17
- }, 1000);
18
- })
@@ -1,35 +0,0 @@
1
- //LoginForm validation
2
- $(function() {
3
- if (!$('#login-form').length) {
4
- return false;
5
- }
6
-
7
- var loginValidationSettings = {
8
- rules: {
9
- username: {
10
- required: true,
11
- email: true
12
- },
13
- password: "required",
14
- agree: "required"
15
- },
16
- messages: {
17
- username: {
18
- required: "Please enter username",
19
- email: "Please enter a valid email address"
20
- },
21
- password: "Please enter password",
22
- agree: "Please accept our policy"
23
- },
24
- invalidHandler: function() {
25
- animate({
26
- name: 'shake',
27
- selector: '.auth-container > .card'
28
- });
29
- }
30
- }
31
-
32
- $.extend(loginValidationSettings, config.validations);
33
-
34
- $('#login-form').validate(loginValidationSettings);
35
- })
@@ -1,31 +0,0 @@
1
- //ResetForm validation
2
- $(function() {
3
- if (!$('#reset-form').length) {
4
- return false;
5
- }
6
-
7
- var resetValidationSettings = {
8
- rules: {
9
- email1: {
10
- required: true,
11
- email: true
12
- }
13
- },
14
- messages: {
15
- email1: {
16
- required: "Please enter email address",
17
- email: "Please enter a valid email address"
18
- }
19
- },
20
- invalidHandler: function() {
21
- animate({
22
- name: 'shake',
23
- selector: '.auth-container > .card'
24
- });
25
- }
26
- }
27
-
28
- $.extend(resetValidationSettings, config.validations);
29
-
30
- $('#reset-form').validate(resetValidationSettings);
31
- })
@@ -1,88 +0,0 @@
1
- //SignupForm validation
2
- $(function() {
3
- if (!$('#signup-form').length) {
4
- return false;
5
- }
6
-
7
- var signupValidationSettings = {
8
- rules: {
9
- firstname: {
10
- required: true,
11
- },
12
- lastname: {
13
- required: true,
14
- },
15
- email: {
16
- required: true,
17
- email: true
18
- },
19
- password: {
20
- required: true,
21
- minlength: 8
22
- },
23
- retype_password: {
24
- required: true,
25
- minlength: 8,
26
- equalTo: "#password"
27
- },
28
- agree: {
29
- required: true,
30
- }
31
- },
32
- groups: {
33
- name: "firstname lastname",
34
- pass: "password retype_password",
35
- },
36
- errorPlacement: function(error, element) {
37
- if (
38
- element.attr("name") == "firstname" ||
39
- element.attr("name") == "lastname"
40
- ) {
41
- error.insertAfter($("#lastname").closest('.row'));
42
- element.parents("div.form-group")
43
- .addClass('has-error');
44
- }
45
- else if (
46
- element.attr("name") == "password" ||
47
- element.attr("name") == "retype_password"
48
- ) {
49
- error.insertAfter($("#retype_password").closest('.row'));
50
- element.parents("div.form-group")
51
- .addClass('has-error');
52
- }
53
- else if (element.attr("name") == "agree") {
54
- error.insertAfter("#agree-text");
55
- }
56
- else {
57
- error.insertAfter(element);
58
- }
59
- },
60
- messages: {
61
- firstname: "Please enter firstname and lastname",
62
- lastname: "Please enter firstname and lastname",
63
- email: {
64
- required: "Please enter email",
65
- email: "Please enter a valid email address"
66
- },
67
- password: {
68
- required: "Please enter password fields.",
69
- minlength: "Passwords should be at least 8 characters."
70
- },
71
- retype_password: {
72
- required: "Please enter password fields.",
73
- minlength: "Passwords should be at least 8 characters."
74
- },
75
- agree: "Please accept our policy"
76
- },
77
- invalidHandler: function() {
78
- animate({
79
- name: 'shake',
80
- selector: '.auth-container > .card'
81
- });
82
- }
83
- }
84
-
85
- $.extend(signupValidationSettings, config.validations);
86
-
87
- $('#signup-form').validate(signupValidationSettings);
88
- });