Skip to content

Commit

Permalink
Merge pull request #5 from ShanukaGIT/master
Browse files Browse the repository at this point in the history
Ajax Update - pe30
  • Loading branch information
ShanukaGIT authored Mar 16, 2020
2 parents 31d8cff + 0357d5c commit a046dff
Show file tree
Hide file tree
Showing 5 changed files with 353 additions and 55 deletions.
52 changes: 1 addition & 51 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,51 +1 @@
<p align="center"><img src="https://laravel.com/assets/img/components/logo-laravel.svg"></p>

<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" alt="License"></a>
</p>

## About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:

- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).

Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation give you tools you need to build any application with which you are tasked.

## Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of any modern web application framework. The [Laravel documentation](https://laravel.com/docs) is thorough, complete, and makes it a breeze to get started learning the framework.

If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 900 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library.

## Laravel Sponsors

We would like to extend our thanks to the following sponsors for helping fund on-going Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](http://patreon.com/taylorotwell):

- **[Vehikl](http://vehikl.com)**
- **[Tighten Co.](https://tighten.co)**
- **[British Software Development](https://www.britishsoftware.co)**
- **[Styde](https://styde.net)**
- [Fragrantica](https://www.fragrantica.com)
- [SOFTonSOFA](https://softonsofa.com/)

## Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions).

## Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.

## License

The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
Election Utils
9 changes: 5 additions & 4 deletions resources/views/pe30x1x2.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
@extends('layout')
@section('content')

@php
$selec=0;
@endphp

<div class="container">
<div class="row justify-content-md-center">
Expand Down Expand Up @@ -101,7 +98,7 @@
// -------------------------Get District----------------------------------
$("select[name='election']").change(function () {
$("#tblBellot tbody").empty();
var elec_id=$(this).val();
var op=" ";
Expand Down Expand Up @@ -156,6 +153,10 @@
});
// ---------------------------------------------------------------------
$("select[name='district']").change(function () {
$("#tblBellot tbody").empty();
});
// });
Expand Down
127 changes: 127 additions & 0 deletions storage/framework/views/8c0147d7e158cb2ab1a176a169f11d36ee64334f.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>Nomination Outputs</title>

<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom fonts for this template -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lora:400,400i,700,700i" rel="stylesheet">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

<!-- Custom styles for this template -->
<link href="css/business-casual.min.css" rel="stylesheet">

</head>

<body>

<h1 class="site-heading text-center text-white d-none d-lg-block">
<span class="site-heading-lower ">Nomination Outputs</span><br><br>
<span class="site-heading-upper text-primary mb-4">Election Commission of Sri lanka</span>

</h1>

<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark py-lg-2" id="mainNav">
<div class="container">
<a class="navbar-brand text-uppercase text-expanded font-weight-bold d-lg-none" href="#">Start Bootstrap</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav mx-auto">

<li class="nav-item active px-lg-4">
<a class="nav-link text-uppercase text-expanded" href="index">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item active px-lg-4">
<a class="nav-link text-uppercase text-expanded" href='pe9'>PE09
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item active px-lg-4">
<a class="nav-link text-uppercase text-expanded" href='pe10'>PE10
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item active px-lg-4">
<a class="nav-link text-uppercase text-expanded" href='pe10x1'>PE10 (1)
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item active px-lg-4">
<a class="nav-link text-uppercase text-expanded" href="pe11">PE11
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item active px-lg-4">
<a class="nav-link text-uppercase text-expanded" href="pe30x1x2">PE30(1)(2)
<span class="sr-only">(current)</span>
</a>
</li>


</ul>
</div>
</div>
</nav>
<br>






<!-- Nain Content -->

<?php echo $__env->yieldContent('content'); ?>


<!-- Main Content -->







<footer class="footer text-faded text-center py-5">
<div class="container">
<p class="m-0 small">Copyright &copy; Eletion Commission of Sri Lanka 2020</p>
</div>
</footer>

<?php echo $__env->yieldPushContent('scripts'); ?>


<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script>
function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;

document.body.innerHTML = printContents;

window.print();

document.body.innerHTML = originalContents;
}
</script>
</body>

</html>
172 changes: 172 additions & 0 deletions storage/framework/views/cc025b19a0aa99eaca5f228f80a2b79f6061c76a.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
<?php $__env->startSection('content'); ?>


<div class="container">
<div class="row justify-content-md-center">
<div class="col col-lg-3">
<form> <center>
<select class="custom-select custom-select-lg mb-3" class="election" name="election"onChange >
<option value="0" disabled="true" selected="true">Select Election</option>
<?php $__currentLoopData = $Fdata; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($data->id); ?>"><?php echo e($data->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
<div class="col col-lg-3">

<select class="custom-select custom-select-lg mb-3" class="district" name="district" >
<option value="0" disabled="true" selected="true">Select District</option>
</select>

</div>
</div> </div>
<center>
<Button type="button" class="btn btn-primary" id="bellot">Generate Report </Button>
</center>
</form>
</center>
</div>
<section class="page-section clearfix">
<div class="container" id="example">


<div class="intro-text left-0 text-center bg-faded p-5 rounded">

<h6 class="section-heading mb-10" align="left">
<span>30(1)(2) ආ වගන්තිය <br>
30(1)(2) ஆம் பிரிவு <br>
Section Under 30(1)(2) </span>

</h6>

<h2 class="section-heading mb-4">
<span>PARLIAMENTARY ELECTIONS 2020 <br>පාර්ලිමේන්තු මැතිවරණය 2020</span>

</h2>
<h5 class="section-heading mb-4">
<span>
බැලට් පේපර්<br> பாலோட் பேப்பர்<br>Ballot Paper<br>
</span>

</h5>
<p> Ballot Paper No:...............................................................................................................................................................................</p>
<table align="center" border="1" cellpadding="5" width="80%" id="tblBellot">
<thead>
<tr>
<th align="right"> Party Name</th>
<th align="left"> Symbol</th>
<th align="left"> No</th>
</tr>
</thead>
<tbody>

</tbody>

</table >
<table align="center" border="1" cellpadding="5" width="80%">
<tr>
<td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td>
</tr>
<tr>
<td>11</td><td>12</td><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td><td>19</td><td>20</td>
</tr>
<tr>
<td>21</td><td>22</td>
</tr>
</table>
<br>

<br><br>



</div>

</div>


</div><br>
<center> <input class="btn btn-primary" type="button" onclick="printDiv('example')" value="Print Data" /> </center>
</section>

<?php $__env->startPush('scripts'); ?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>

// $(document).ready(function(){

// -------------------------Get District----------------------------------
$("select[name='election']").change(function () {
$("#tblBellot tbody").empty();
var elec_id=$(this).val();
var op=" ";

$.ajax({
type:'GET',
url:'<?php echo URL::to('getDistrict'); ?>',
data:{'id':elec_id},
success:function(data){

op+='<option value="0" disabled="true" >Select District</option>';
for(var i=0;i<data.length;i++){
op+='<option value="'+data[i].id+'">'+data[i].name+'</option>';

}
$("select[name='district']").html("");
$("select[name='district']").append(op);

},
error:function(){

}
});
});

// -------------------------Get Bellot----------------------------------
$("#bellot").click(function () {
var elec_id = $("select[name='election']").val();
var dist_id = $("select[name='district']").val();
var op=" ";

$.ajax({
type:'GET',
url:'<?php echo URL::to('getBallot'); ?>',
data:{'elecid':elec_id,'disid':dist_id},
success:function(data){

for(var i=0;i<data.length;i++){

op+='<tr>';
op+='<td>'+data[i].id+'</td><td>'+data[i].name+'</td><td>'+data[i].username+'</td>';
op+='</tr>';

}
$("#tblBellot tbody").empty();
$("#tblBellot tbody").append(op);

},
error:function(){

}
});
});

// ---------------------------------------------------------------------
$("select[name='district']").change(function () {
$("#tblBellot tbody").empty();
});



// });

</script>



<?php $__env->stopPush(); ?>



<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Loading

0 comments on commit a046dff

Please sign in to comment.