Browse code

Use jquery no conflict setup for script part

Benjamin Roth authored on04/07/2018 10:36:19
Showing1 changed files
... ...
@@ -15,18 +15,19 @@
15 15
 </div>
16 16
 
17 17
 <script>
18
-	$(document).ready(function() {
19
-		$('.cp-dialog .cp-button').click(function(e) {
20
-			var dialog = $('.cp-dialog');
21
-			$.ajax({
22
-				url: '<?php echo $this->commitURL; ?>',
23
-				type: 'GET',
24
-				dataType: 'json',
25
-				success: function (data) {
26
-					dialog.addClass('cp-a-closing');
27
-				}
28
-			});
29
-		});
30
-	});
31
-
18
+  (function($) {
19
+    $(document).ready(function() {
20
+      $('.cp-dialog .cp-button').click(function(e) {
21
+        var dialog = $('.cp-dialog');
22
+        $.ajax({
23
+          url: '<?php echo $this->commitURL; ?>',
24
+          type: 'GET',
25
+          dataType: 'json',
26
+          success: function (data) {
27
+            dialog.addClass('cp-a-closing');
28
+          }
29
+        });
30
+      });
31
+    });
32
+  })(jQuery);
32 33
 </script>
33 34
\ No newline at end of file
Browse code

No longer use headline tag for heading

Benjamin Roth authored on04/07/2018 10:16:40
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 <div class="cp-content">
3 3
 <div class="cp-inside">
4 4
 	<form class="cp-dialog-form">
5
-		<div class="cp-header"><h1><?php echo $this->title; ?></h1></div>
5
+		<div class="cp-header"><span class="cp-headline"><?php echo $this->title; ?></span></div>
6 6
 		<div class="cp-dialog-message">
7 7
 			<?php echo $this->text; ?>
8 8
 		</div>
Browse code

Remove the vex dialog dependency

Benjamin Roth authored on23/09/2015 17:32:36
Showing1 changed files
... ...
@@ -1,26 +1,32 @@
1
-<?php
2
-$GLOBALS['TL_CSS']['COOKIE_POLICY'] = 'system/modules/eSM_cookiepolicy/assets/css/vex-theme-cp-bottom.css';
3
-?>
1
+<div class="cp-dialog">
2
+<div class="cp-content">
3
+<div class="cp-inside">
4
+	<form class="cp-dialog-form">
5
+		<div class="cp-header"><h1><?php echo $this->title; ?></h1></div>
6
+		<div class="cp-dialog-message">
7
+			<?php echo $this->text; ?>
8
+		</div>
9
+		<div class="cp-dialog-buttons">
10
+			<button type="button" class="cp-button"><?php echo $this->btn_confirm; ?></button>
11
+		</div>
12
+	</form>
13
+</div>
14
+</div>
15
+</div>
4 16
 
5 17
 <script>
6
-	var cookiePolicy = vex.dialog.open({
7
-		message: '<h1 class="vex-header"><?php echo $this->title; ?></h1>' +
8
-		'<?php echo $this->text; ?>',
9
-		overlayClosesOnClick: false,
10
-		escapeButtonCloses: false,
11
-		showCloseButton: false,
12
-		className: 'vex-theme-cp-bottom',
13
-		preventBodyClass: true,
14
-		buttons: [{text: '<?php echo $this->btn_confirm; ?>',type: 'button',className: 'vex-dialog-button-primary',click: function(vexContent, event) {
18
+	$(document).ready(function() {
19
+		$('.cp-dialog .cp-button').click(function(e) {
20
+			var dialog = $('.cp-dialog');
15 21
 			$.ajax({
16 22
 				url: '<?php echo $this->commitURL; ?>',
17 23
 				type: 'GET',
18 24
 				dataType: 'json',
19 25
 				success: function (data) {
20
-					return vex.close(vexContent.data().vex.id);
26
+					dialog.addClass('cp-a-closing');
21 27
 				}
22 28
 			});
23
-		}}]
29
+		});
24 30
 	});
25 31
 
26 32
 </script>
27 33
\ No newline at end of file
Browse code

Initial commit

Benjamin Roth authored on26/03/2015 15:51:42
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,26 @@
1
+<?php
2
+$GLOBALS['TL_CSS']['COOKIE_POLICY'] = 'system/modules/eSM_cookiepolicy/assets/css/vex-theme-cp-bottom.css';
3
+?>
4
+
5
+<script>
6
+	var cookiePolicy = vex.dialog.open({
7
+		message: '<h1 class="vex-header"><?php echo $this->title; ?></h1>' +
8
+		'<?php echo $this->text; ?>',
9
+		overlayClosesOnClick: false,
10
+		escapeButtonCloses: false,
11
+		showCloseButton: false,
12
+		className: 'vex-theme-cp-bottom',
13
+		preventBodyClass: true,
14
+		buttons: [{text: '<?php echo $this->btn_confirm; ?>',type: 'button',className: 'vex-dialog-button-primary',click: function(vexContent, event) {
15
+			$.ajax({
16
+				url: '<?php echo $this->commitURL; ?>',
17
+				type: 'GET',
18
+				dataType: 'json',
19
+				success: function (data) {
20
+					return vex.close(vexContent.data().vex.id);
21
+				}
22
+			});
23
+		}}]
24
+	});
25
+
26
+</script>
0 27
\ No newline at end of file