apollodec/Apollo/assets/views/sessionMaster.html
2018-09-08 10:54:00 +05:30

240 lines
13 KiB
HTML
Executable File

<style>
b.fa {
display: inline-block;
border-radius: 60px;
box-shadow: 0px 0px 2px #007AFF;
padding: 0.5em 0.6em;
}
</style>
<!-- start: PAGE TITLE -->
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle" translate="Session"></h1>
<span class="mainDescription">Add/View Session Details. </span>
</div>
<!-- <div ncy-breadcrumb></div>-->
</div>
</section>
<!-- end: PAGE TITLE -->
<!-- start: LIST GROUP -->
<div class="container-fluid container-fullw bg-white">
<div class="row" ng-controller="sessionMasterCtrl" data-ng-init="init()">
<tabset class="tabbable">
<tab heading="View Session" id="viewSession">
<div class="container-fluid container-fullw">
<div class="row">
<div ng-if="loader == ''" class="col-md-12" align="center">
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
<spinner name="html5spinner"> <div class="overlay"></div> <div class="spinner"> <div class="double-bounce1"></div> <div class="double-bounce2"></div> </div> <div class="please-wait">Please Wait...</div>
</spinner>
</div>
<div class="col-md-12" ng-if="emptyData == false && loader != ''" style="min-height: 281px;">
<p style="color: red;" align="center"><strong><h3 class="text-center">oops! No
records found... </h3></strong></p>
</div>
<div class="col-md-12" ng-if="emptyData == true">
<div class="row">
<div class="col-md-3">
<script>
$(function () {
$("#search").focus();
});
</script>
<input class="form-control" type="text" ng-model="search"
id="search" autofocus tabindex="1"
placeholder="Search"/><br><br>
</div>
</div>
<div class="table-responsive">
<fieldset>
<table class="table table-hover">
<thead>
<tr>
<th ng-click="sort('SessionName')">Session Name
<span class="glyphicon sort-icon" ng-show="sortKey=='SessionName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th>University</th>
<th>Status</th>
<th> Action</th>
</tr>
</thead>
<tbody dir-paginate="p in data|filter:search:strict|itemsPerPage:10">
<!-- <pre>p|json</pre> -->
<!--hide filter for latset record first
|orderBy:sortKey:reverse -->
<tr>
<td>{{p.SessionName}}</td>
<td>{{p.UniversityName}}</td>
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">In-Active</span></td>
<td>
<a class="text-azure" id="editRowBtn{{p.SessionID}}" ng-click="setEditId(p);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
</a>
</td>
</tr>
<tr ng-show="editId === p.SessionID" ng-if="editId === p.SessionID" >
<td colspan="6" ng-include src="'assets/views/editSessionMaster.html'"></td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</fieldset>
</div>
</div>
</div>
</div>
<!--
view tab end
-->
</tab>
<script>
$('#addSession').click(function () {
$('#sessionName').focus();
});
$('#viewSession').click(function () {
$('#search').focus();
});
</script>
<tab heading="Add Session" id="addSession">
<div>
<form name="Form" id="form" novalidate ng-submit="sessionForm.submit(Form, myModel, 'zoom-in')" method="post">
<div class="row">
<div class="col-md-12">
<fieldset>
<legend>
Add New Session Details
</legend>
<div class="row">
<div data-ng-controller="DatepickerDemoCtrl">
<div class="col-md-3 form-group" style="height:200px;"
ng-class="{'has-error':Form.date.$dirty && Form.date.$invalid, 'has-success':Form.date.$valid}">
<label>
Session Date <span
class="symbol required"></span>
</label>
<input type="text" tabindex="1"
class="form-control "
ng-click="startOpen = !startOpen"
datepicker-popup="dd-MM-yyyy"
ng-model="myModel.date"
is-open="startOpen"
ng-init="startOpen = false"
name="date"
datepicker-options="dateOptions"
placeholder="Select Date"
close-text="Close" ng-change="getDateFormat(myModel.date,'1');" required="required" ng-readonly="true"/>
<span class="error text-small block"
ng-if="Form.date.$dirty && Form.date.$error.required">Session date is required.</span>
<!--<span class="success text-small block"-->
<!--ng-if="Form.date.$valid ">Thank You</span>-->
</div>
</div>
<div class="col-md-4 form-group"
ng-class="{'has-error':Form.sessionName.$dirty && Form.sessionName.$invalid, 'has-success':Form.sessionName.$valid}">
<label>
Session Name <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Session Name"
tabindex="2" class="form-control" name="sessionName" id="sessionName"
ng-model="myModel.sessionName" ng-pattern="" required/>
<span class="error text-small block"
ng-if="Form.sessionName.$dirty && Form.sessionName.$error.required">Session name is required</span>
<span class="error text-small block"
ng-if="Form.sessionName.$dirty && Form.sessionName.$error.pattern">Invalid session name </span>
<!--<span class="success text-small"-->
<!--ng-if="Form.sessionName.$valid">Thank You!</span>-->
</div>
<div class="col-md-4 form-group"
ng-class="{'has-error':Form.university.$dirty && Form.university.$invalid && myModel.universityName.length==0, 'has-success':Form.university.$valid}">
<label>
University <span class="symbol required"></span>
</label>
<!-- <select class="form-control" name="university" tabindex="3" id="university"
ng-model="myModel.universityName"
ng-options="details.UniversityID as details.UniversityName for details in university"
required>
<option value=""> Select University</option>
</select>
<span class="error text-small block"
ng-if="Form.university.$dirty && Form.university.$invalid">University is required</span>-->
<!--<span class="success text-small" ng-if="Form.university.$valid">Thank You!</span>-->
<ui-select multiple ng-model="myModel.universityName" tabindex="3">
<ui-select-match placeholder="Select University">
{{$item.UniversityName}}
</ui-select-match>
<ui-select-choices
repeat="d in universityList | filter:$select.search">
{{d.UniversityName}}
</ui-select-choices>
</ui-select>
<input class="ng-hide" type="text" name="university"
ng-model="myModel.universityName"
required>
<span class="error text-small block"
ng-if="Form.university.$dirty && Form.university.$error.required && myModel.universityName.length==0">University is required.</span>
<!--<span class="success text-small block"-->
</div>
</div>
<div class="col-md-12">
<div class="pull-right">
<button type="submit" ladda="ldloading1.zoom_in" tabindex="4" class="btn btn-wide btn-success" data-style="zoom-in">
Add
</button>
<button type="reset" class="btn btn-warning btn-wide" tabindex="5"
ng-click="sessionForm.reset(Form)">
Reset
</button>
</div>
</div>
</fieldset>
</div>
</div>
</form>
</div>
</tab>
</tabset>
</div>
</div>
<!-- end: LIST GROUP -->