Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6791 | Rev 6818 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
$notify = '';
3
$messages = $this->flashMessenger()->getInfoMessages();
6816 stevensc 4
 
3782 stevensc 5
foreach ($messages as $message) {
6
	$notify .= "$.fn.showInfo('$message')";
1 www 7
}
8
 
9
$messages = $this->flashMessenger()->getSuccessMessages();
3782 stevensc 10
foreach ($messages as $message) {
11
	$notify .= "$.fn.showSuccess('$message')";
1 www 12
}
13
 
14
$messages = $this->flashMessenger()->getWarningMessages();
3782 stevensc 15
foreach ($messages as $message) {
16
	$notify .= " $.fn.showWarning('$message')";
1 www 17
}
18
 
19
$messages = $this->flashMessenger()->getErrorMessages();
3782 stevensc 20
foreach ($messages as $message) {
21
	$notify .= " $.fn.showError('$message')";
1 www 22
}
23
 
3782 stevensc 24
if ($notify) {
25
	$this->inlineScript()->captureStart();
26
	echo " jQuery( document ).ready(function( $ ) { $notify }); ";
27
	$this->inlineScript()->captureEnd();
1 www 28
}
29
 
6816 stevensc 30
$js = <<<JS
31
let autoComplete;
1 www 32
 
6816 stevensc 33
function handleScriptLoad(updateQuery, autoCompleteRef, setAddresObject, setError) {
34
  autoComplete = new window.google.maps.places.Autocomplete(
35
    autoCompleteRef.current,
36
    { types: ["(cities)"]}
37
  );
38
  autoComplete.setFields(["address_components", "formatted_address", "geometry"]);
39
  autoComplete.addListener("place_changed", () =>
40
    handlePlaceSelect(updateQuery, setAddresObject, setError)
41
  );
42
}
43
 
44
async function handlePlaceSelect(updateQuery, setAddresObject, setError) {
45
  const addressObject = autoComplete.getPlace();
46
  // console.log(addressObject.geometry.location.lat());
47
  // console.log(addressObject.geometry.location.lng());
48
  const query = addressObject.formatted_address;
49
  if(query){
50
    setError("");
51
    updateQuery(query);
52
    setAddresObject({
53
      ...addressObject,
54
      address_components:[
55
        ...addressObject.address_components,
56
        {
57
          latitude: addressObject.geometry.location.lat(),
58
          longitude: addressObject.geometry.location.lng(),
59
          types:["geometry"]
60
        }
61
      ]
62
    });
63
  }else{
64
    setError("$error_msg");
65
  }
66
}
67
JS;
68
 
69
$this->inlineScript()->appendScript($js);
70
 
1 www 71
?>
72
<!DOCTYPE html>
73
<html>
74
 
3782 stevensc 75
<head>
76
	<?php
77
	echo $this->headTitle();
78
	?>
79
	<link rel="icon" href="<?php echo $this->networkFavicoHelper(); ?>">
80
	<?php
81
	echo $this->headMeta()->appendHttpEquiv('X-UA-Compatible', 'IE=edge')
82
		->appendHttpEquiv('expires', '0')
83
		->appendHttpEquiv('expires', 'Tue, 01 Jan 1980 1:00:00 GMT')
84
		->appendHttpEquiv('pragma', 'no-cache')
85
		->appendHttpEquiv('Cache-Control', 'no-store')
86
		->appendHttpEquiv('Cache-Control', 'max-age=0')
87
		->appendHttpEquiv('Cache-Control', 'no-cache')
88
		->appendHttpEquiv('charset', 'UTF-8')
89
		->appendName('viewport', 'width=device-width, initial-scale=1.0');
90
	?>
91
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/animate.css') ?>">
92
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/bootstrap.min.css') ?>">
93
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/line-awesome.css') ?>">
94
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/line-awesome-font-awesome.min.css') ?>">
95
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/fontawesome-free/css/all.min.css') ?>">
96
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/font-awesome.min.css') ?>">
97
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('lib/slick/slick.css') ?>">
98
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('lib/slick/slick-theme.css') ?>">
99
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('look-and-field/main.css') ?>" />
100
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('look-and-field/style-cesa.css') ?>" />
1 www 101
 
3782 stevensc 102
	<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/nprogress/nprogress.css') ?>">
3639 efrain 103
 
3782 stevensc 104
	<?php
105
	echo $this->headStyle();
106
	echo $this->networkStylesAndColorsHelper();
1 www 107
 
3782 stevensc 108
	echo $this->headLink();
109
	echo $this->headScript();
110
	?>
111
</head>
1 www 112
 
6507 stevensc 113
<body>
114
	<?php echo $this->content ?>
1 www 115
 
6508 stevensc 116
	<footer class="footy-sec container">
6507 stevensc 117
		<img class="fl-rgt" src="<?php echo $this->basePath('/images/LL-08.png') ?>" alt="">
118
		<?php echo $this->footerHelper() ?>
4908 stevensc 119
 
6507 stevensc 120
		<div class="d-flex align-items-center">
121
			<img src="<?php echo $this->basePath('images/copy-icon2.png') ?>" alt="">
122
			<p>CESA MS Copyright <?php echo date('Y') ?></p>
3782 stevensc 123
		</div>
6507 stevensc 124
	</footer>
3731 efrain 125
 
3782 stevensc 126
	<!-- jQuery -->
127
	<script type="text/javascript" src="<?php echo $this->basePath('vendors/jquery/jquery.min.js') ?>"></script>
128
	<!-- Bootstrap 4 -->
129
	<script type="text/javascript" src="<?php echo $this->basePath('vendors/bootstrap/js/bootstrap.bundle.min.js') ?>"></script>
130
	<!--  Aplicacion -->
131
	<script type="text/javascript" src="<?php echo $this->basePath('vendors/bootstrap-notify/bootstrap-notify.min.js') ?>"></script>
132
 
133
	<script type="text/javascript" src="<?php echo $this->basePath('js/app.js') ?>"></script>
134
 
135
	<?php
136
	echo $this->inlineScript();
137
	?>
138
</body>
139
 
1 www 140
</html>