Browse code

Initial commit

Benjamin Roth authored on16/03/2023 20:22:35
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,146 @@
1
+$(function () {
2
+
3
+    $('p.back > a:not(.btn), .widget-submit > button').each(function (index) {
4
+        $(this).addClass("btn btn-primary");
5
+    });
6
+
7
+    $('.submit_container > input.button').each(function (index) {
8
+        $(this).addClass("btn btn-lg");
9
+
10
+
11
+        if ($(this).hasClass("next")) {
12
+            $(this).addClass("btn-primary");
13
+        }
14
+
15
+        if ($(this).hasClass("previous")) {
16
+            $(this).addClass("btn-outline-primary");
17
+        }
18
+
19
+        if ($(this).hasClass("confirm")) {
20
+            $(this).addClass("btn-success");
21
+        }
22
+    });
23
+
24
+    $('.submit_container  button:not(.btn)').each(function (index) {
25
+        $(this).addClass("btn");
26
+
27
+        if ($(this).hasClass("button_update") || $(this).hasClass("button_checkout")) {
28
+            $(this).addClass("btn-outline-primary");
29
+        }
30
+    });
31
+
32
+    $('.actions_container .submit').each(function (index) {
33
+        $(this).addClass("btn btn-primary");
34
+    });
35
+
36
+    $('.filter-toggle-control').each(function (index) {
37
+        $(this).addClass("btn btn-primary");
38
+    });
39
+
40
+    $('.mod_iso_orderhistory td.link > a').each(function (index) {
41
+        $(this).addClass("btn btn-sm");
42
+    });
43
+
44
+    $('.mod_iso_orderhistory td.link > a:first-child').each(function (index) {
45
+        $(this).addClass("btn-primary");
46
+    });
47
+
48
+    $('.mod_iso_orderhistory td.link > a:last-child').each(function (index) {
49
+        $(this).addClass("btn-secondary");
50
+    });
51
+
52
+    $('.mod_iso_addressbook a.add').each(function (index) {
53
+        $(this).addClass("btn btn-outline-primary");
54
+    });
55
+
56
+
57
+    $('#footerNav ul').each(function (index) {
58
+        $(this).addClass("list-inline");
59
+    });
60
+
61
+    $('#footerNav ul > li ').each(function (index) {
62
+        $(this).addClass("list-inline-item");
63
+    });
64
+
65
+
66
+    /* ALERTS */
67
+    $('p.empty:not(.message)').each(function (index) {
68
+        $(this).addClass("alert alert-primary");
69
+    });
70
+
71
+    $('p.error:not(.message)').each(function (index) {
72
+        $(this).addClass("alert alert-danger");
73
+    });
74
+
75
+    $('.tl_confirm:not(.message)').each(function (index) {
76
+        $(this).addClass("alert alert-success");
77
+    });
78
+
79
+    $('.widget-radio span.note').each(function (index) {
80
+        $(this).addClass("alert alert-primary");
81
+    });
82
+
83
+
84
+    $('.message').each(function (index) {
85
+        $(this).addClass("alert");
86
+
87
+        if ($(this).hasClass("success")) {
88
+            $(this).addClass("alert-success");
89
+        }
90
+
91
+        if ($(this).hasClass("empty")) {
92
+            $(this).addClass("alert-primary");
93
+        }
94
+
95
+        if ($(this).hasClass("error")) {
96
+            $(this).addClass("alert-danger");
97
+        }
98
+    });
99
+    /* ALERTS ENDE */
100
+
101
+
102
+    $('#main .mod_article > *:not(.content--element):not(.container):not(.ce_html):not(.mod_catalogMasterView):not(.mod_iso_productreader):not(.mod_catalogUniversalView):not(.mod_pageimage)').each(function (index) {
103
+        $(this).wrapInner("<div class='container'></div>");
104
+    });
105
+
106
+    $('#main > .inside > div[class^="mod_"]:not(.mod_article):not(.mod_iso_productreader):not(.mod_pageimage):not(.container)').each(function (index) {
107
+        $(this).wrapInner("<div class='container'></div>");
108
+    });
109
+
110
+
111
+    $('form:not(#iso_mod_checkout_review) > .formbody:not(.row):not(.no-row)').each(function (index) {
112
+        $(this).addClass("row");
113
+    });
114
+
115
+    $('form .formbody > .fields > *').unwrap();
116
+    $('form .formbody .address_new').addClass("row");
117
+    $('form .formbody  p.alert ').addClass("mt-0").wrap('<div class="col-12"></div>');
118
+
119
+
120
+    $('form .widget.form-control').each(function (index) {
121
+        $(this).removeClass("form-control");
122
+    });
123
+
124
+    $('form >  .formbody > fieldset:not([class*="col"])').each(function (index) {
125
+        $(this).addClass("row");
126
+    });
127
+
128
+
129
+    if ($(".modal").length) {
130
+        $(".modal").appendTo("body");
131
+    }
132
+
133
+
134
+    /* Transform tables in Elements to Bootstrap Tables (styled) */
135
+    if ($("#main .ce_text table").length) {
136
+        $("#main table").each(function (index) {
137
+            $(this).wrap('<div class="table-responsive"></div>');
138
+            $(this)
139
+                .addClass("table")
140
+                .addClass("table-striped")
141
+                .addClass("table-hover");
142
+        });
143
+    }
144
+    /* END */
145
+
146
+});