Chore: Replaced jQuery.focus() with a focus-on directive
This commit is contained in:
1 parent
e27424c41e
commit
e0d3887fa9
70 files changed
+98
-260
No files matched your search
@@ -9,8 +9,6 @@
|
||||
<meta name="author" content="Tanshu">
|
||||
|
||||
<!-- Le styles -->
|
||||
<!-- <link rel="stylesheet" type="text/css" media="screen" href="/css/style.css"/> -->
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/bootstrap.min.css"/>
|
||||
<!-- <link rel="stylesheet" type="text/css" media="screen" href="/css/bootstrap-theme.min.css"/> -->
|
||||
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/*!
|
||||
* My Custom Stylesheet for
|
||||
* Bootstrap v2.0.3
|
||||
*
|
||||
*/
|
||||
|
||||
.thumbnails.small {
|
||||
margin-left: -50px;
|
||||
}
|
||||
|
||||
.thumbnails.small > li {
|
||||
float: left;
|
||||
margin-bottom: 3px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.thumbnails.small > li > .thumbnail > a {
|
||||
height: 75px;
|
||||
width: 75px;
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.thumbnails.small > li > .thumbnail > button {
|
||||
height: 75px;
|
||||
width: 75px;
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.my-markdown {
|
||||
padding: 3px;
|
||||
background: #EEE;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.md-title {
|
||||
font-size: 16px;
|
||||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
padding: 10px 10px;
|
||||
color: #555;
|
||||
text-shadow: 1px solid #CACACA;
|
||||
border-bottom: 0 none;
|
||||
background-color: #eaeaea;
|
||||
background-image: linear-gradient(#fafafa, #eaeaea);
|
||||
background-repeat: repeat-x;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.md-body {
|
||||
background-color: #fff;
|
||||
border: 1px solid #CACACA;
|
||||
padding: 30px;
|
||||
font-size: 15px;
|
||||
line-height: 1.7;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.widget-box {
|
||||
background: none repeat scroll 0 0 #F9F9F9;
|
||||
border-top: 1px solid #CDCDCD;
|
||||
border-left: 1px solid #CDCDCD;
|
||||
border-right: 1px solid #CDCDCD;
|
||||
clear: both;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* widgets from unicorn theme from http://wbpreview.com/previews/WB0F35928/widgets.html */
|
||||
.widget-title, .modal-header, .table th, div.dataTables_wrapper .ui-widget-header, .ui-dialog .ui-dialog-titlebar {
|
||||
background-color: #efefef;
|
||||
background-image: -webkit-gradient(linear, 0 0%, 0 100%, from(#fdfdfd), to(#eaeaea));
|
||||
background-image: -webkit-linear-gradient(top, #fdfdfd 0%, #eaeaea 100%);
|
||||
border-bottom: 1px solid #CDCDCD;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.widget-title .nav-tabs {
|
||||
border-bottom: 0 none;
|
||||
}
|
||||
|
||||
.widget-title .nav-tabs li a {
|
||||
border-bottom: medium none !important;
|
||||
border-left: 1px solid #DDDDDD;
|
||||
border-radius: 0 0 0 0;
|
||||
border-right: 1px solid #DDDDDD;
|
||||
border-top: medium none;
|
||||
color: #999999;
|
||||
margin: 0;
|
||||
outline: medium none;
|
||||
padding: 9px 10px 8px;
|
||||
font-weight: bold;
|
||||
text-shadow: 0 1px 0 #FFFFFF;
|
||||
}
|
||||
|
||||
.widget-title .nav-tabs li:first-child a {
|
||||
border-left: medium none !important;
|
||||
}
|
||||
|
||||
.widget-title .nav-tabs li a:hover {
|
||||
background-color: transparent !important;
|
||||
border-color: #D6D6D6;
|
||||
border-width: 0 1px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.widget-title .nav-tabs li.active a {
|
||||
background-color: #F9F9F9 !important;
|
||||
color: #444444;
|
||||
}
|
||||
|
||||
.widget-title span.icon {
|
||||
border-right: 1px solid #cdcdcd;
|
||||
padding: 9px 10px 7px 11px;
|
||||
float: left;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.widget-title h5 {
|
||||
color: #666666;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding: 12px;
|
||||
line-height: 12px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.widget-title .buttons {
|
||||
float: right;
|
||||
margin: 8px 10px 0 0;
|
||||
}
|
||||
|
||||
.widget-title .label {
|
||||
padding: 3px 5px 2px;
|
||||
float: right;
|
||||
margin: 9px 15px 0 0;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) inset, 0 1px 0 #ffffff;
|
||||
}
|
||||
|
||||
.widget-content {
|
||||
padding: 12px 15px;
|
||||
border-bottom: 1px solid #cdcdcd;
|
||||
}
|
||||
|
||||
.widget-box.widget-plain .widget-content {
|
||||
padding: 12px 0 0;
|
||||
}
|
||||
|
||||
.widget-box.collapsible .collapse.in .widget-content {
|
||||
border-bottom: 1px solid #CDCDCD;
|
||||
}
|
||||
|
||||
.nopadding {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.nopadding .table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.nopadding .table-bordered {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
color: #666666;
|
||||
font-size: 11px;
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
<label for="txtName" class="col-md-2 control-label">Name</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="txtName" class="form-control" ng-model="account.Name"/>
|
||||
<input type="text" id="txtName" class="form-control" ng-model="account.Name" focus-on="foName"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="info.Date"/>
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="info.Date" focus-on="foDate" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="txtDate" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="info.Date"/>
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="info.Date" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtStartDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate"/>
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<label for="txtName" class="col-md-2 control-label">Name</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="txtName" class="form-control" ng-model="client.Name"/>
|
||||
<input type="text" id="txtName" class="form-control" ng-model="client.Name" focus-on="foName"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="txtDate" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="info.Date"/>
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="info.Date" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<label for="txtName" class="col-md-2 control-label">Name</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="txtName" class="form-control" ng-model="costCenter.Name"/>
|
||||
<input type="text" id="txtName" class="form-control" ng-model="costCenter.Name" focus-on="foName"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtStartDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate"/>
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="input-group">
|
||||
<input type="text" id="txtEmployee" class="form-control" ng-model="info.Employee"
|
||||
typeahead="employee as employee.Name for employee in employees($viewValue)"
|
||||
typeahead-editable="false" on-return="show()"/>
|
||||
typeahead-editable="false" on-return="show()" focus-on="foEmployee"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-info" ng-click="show()">Show <i class="glyphicon glyphicon-eye-open"></i>
|
||||
</button>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<label for="txtName" class="col-md-2 control-label">Name</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="txtName" class="form-control" ng-model="employee.Name"/>
|
||||
<input type="text" id="txtName" class="form-control" ng-model="employee.Name" focus-on="foName"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<label for="txtName" class="col-md-2 control-label">Name</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="txtName" class="form-control" ng-model="group.Name"/>
|
||||
<input type="text" id="txtName" class="form-control" ng-model="group.Name" focus-on="foName"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="col-md-5">
|
||||
<input type="text" id="txtBatch" class="form-control" ng-model="batch"
|
||||
typeahead="batch as batch.Name for batch in batches($viewValue)"
|
||||
typeahead-editable="false"/>
|
||||
typeahead-editable="false" focus-on="foBatch"/>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="input-group">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="voucher.Date"/>
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="voucher.Date" focus-on="foAccount"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="input-group">
|
||||
<input type="text" id="txtLedger" class="form-control" ng-model="info.Ledger"
|
||||
typeahead="account as account.Name for account in accounts($viewValue)"
|
||||
typeahead-editable="false" on-return="show()"/>
|
||||
typeahead-editable="false" on-return="show()" focus-on="foLedger"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-info" ng-click="show()">Show <i class="glyphicon glyphicon-eye-open"></i>
|
||||
</button>
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="gvGrid" class="table table-condensed table-bordered table-striped" keypress="shortcuts">
|
||||
<table class="table table-condensed table-bordered table-striped" keypress="shortcuts" focus-on="foGrid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control" ng-model="username" id="username" required placeholder="Username"
|
||||
autofocus/>
|
||||
autofocus focus-on="foUsername"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="txtTitle" class="form-control" ng-model="message.Title"
|
||||
ng-disabled="message.ThreadID"/>
|
||||
ng-disabled="message.ThreadID" focus-on="foTitle"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtStartDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate"/>
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="txtAccount" class="form-control" ng-model="account"
|
||||
typeahead="account as account.Name for account in accounts($viewValue)"
|
||||
typeahead-editable="false"/>
|
||||
typeahead-editable="false" focus-on="foAccount"/>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<label for="txtName" class="col-md-2 control-label">Name</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="txtName" class="form-control" ng-model="product.Name"/>
|
||||
<input type="text" id="txtName" class="form-control" ng-model="product.Name" focus-on="foName"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<label for="txtName" class="col-md-2 control-label">Name</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="txtName" class="form-control" ng-model="productGroup.Name"/>
|
||||
<input type="text" id="txtName" class="form-control" ng-model="productGroup.Name" focus-on="foName"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-5">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtStartDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate"/>
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate" focus-on="foProduct"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtStartDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate"/>
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtStartDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate"/>
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="txtBatch" class="form-control" ng-model="batch"
|
||||
typeahead="batch as batch.Name for batch in batches($viewValue)"
|
||||
typeahead-editable="false"/>
|
||||
typeahead-editable="false" focus-on="foBatch"/>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="col-md-4">
|
||||
<input type="text" id="txtProduct" class="form-control" ng-model="product"
|
||||
typeahead="product as product.Name for product in products($viewValue)"
|
||||
typeahead-editable="false" on-return="add()"/>
|
||||
typeahead-editable="false" on-return="add()" focus-on="foProduct"/>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="text" class="form-control" placeholder="Quantity" ng-model="quantity" on-return="add()"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtStartDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate"/>
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtStartDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate"/>
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="txtAccount" class="form-control" ng-model="account"
|
||||
typeahead="account as account.Name for account in accounts($viewValue)"
|
||||
typeahead-editable="false"/>
|
||||
typeahead-editable="false" focus-on="foAccount"/>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<label for="txtName" class="col-md-2 control-label">Name</label>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input type="text" id="txtName" class="form-control" ng-model="recipe.Name"/>
|
||||
<input type="text" id="txtName" class="form-control" ng-model="recipe.Name" focus-on="foName"/>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="text" class="form-control" ng-model="recipe.Quantity" placeholder="Quantity"/>
|
||||
@@ -56,7 +56,7 @@
|
||||
<div class="col-md-5">
|
||||
<input type="text" id="txtProduct" class="form-control" ng-model="product"
|
||||
typeahead="product as product.Name for product in products($viewValue)"
|
||||
typeahead-editable="false" on-return="add()"/>
|
||||
typeahead-editable="false" on-return="add()" focus-on="foProduct"/>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="input-group">
|
||||
<input type="text" id="txtLedger" class="form-control" ng-model="info.Account"
|
||||
typeahead="account as account.Name for account in accounts($viewValue)"
|
||||
typeahead-editable="false" on-return="show()" typeahead-min-length="0"/>
|
||||
typeahead-editable="false" on-return="show()" typeahead-min-length="0" focus-on="foLedger"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-info" ng-click="show()">Show <i class="glyphicon glyphicon-eye-open"></i>
|
||||
</button>
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="gvGrid" class="table table-condensed table-bordered table-striped">
|
||||
<table class="table table-condensed table-bordered table-striped" focus-on="foGrid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="col-md-5">
|
||||
<input type="text" id="txtEmployee" class="form-control" ng-model="employee"
|
||||
typeahead="employee as employee.Name for employee in employees($viewValue)"
|
||||
typeahead-editable="false"/>
|
||||
typeahead-editable="false" focus-on="foEmployee"/>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="text" class="form-control" placeholder="Gross Salary" ng-model="grossSalary"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtStartDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate"/>
|
||||
is-open="sdOpen" ng-focus="sdOpen = true" ng-model="info.StartDate" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="txtDate" type="text" datepicker-popup="dd-MMM-yyyy"
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="info.Date"/>
|
||||
is-open="dOpen" ng-focus="dOpen = true" ng-model="info.Date" focus-on="foDate"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
</span>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<label for="txtName" class="col-md-2 control-label">Name</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="txtName" class="form-control" ng-model="user.Name"/>
|
||||
<input type="text" id="txtName" class="form-control" ng-model="user.Name" focus-on="foName"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ var AccountController = ['$scope', '$location', '$modal', 'account', 'accountTyp
|
||||
$scope.delete();
|
||||
});
|
||||
};
|
||||
$('#txtName').focus();
|
||||
$scope.foName = true;
|
||||
}];
|
||||
|
||||
AccountController.resolve = {
|
||||
|
||||
+21
-2
@@ -153,7 +153,7 @@ overlordDirective.directive('onReturn', ['$parse', function ($parse) {
|
||||
|
||||
|
||||
overlordDirective.directive('tanSse', ['$parse', function ($parse) {
|
||||
return{
|
||||
return {
|
||||
restrict: 'EM',
|
||||
link: function ($scope, element, attrs) {
|
||||
var url = attrs.url,
|
||||
@@ -371,9 +371,28 @@ overlordDirective.directive('fileUpload', function () {
|
||||
//iterate files since 'multiple' may be specified on the element
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
//emit event upward
|
||||
scope.$emit("fileSelected", { file: files[i] });
|
||||
scope.$emit("fileSelected", {file: files[i]});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
overlordDirective.directive('focusOn', ['$timeout', function ($timeout) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
scope: {
|
||||
focusOn: '='
|
||||
},
|
||||
link: function (scope, element, attrs) {
|
||||
scope.$watch('focusOn', function (value) {
|
||||
if (value === true) {
|
||||
//$timeout(function () {
|
||||
element[0].focus();
|
||||
scope.focusOn = false;
|
||||
//});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}]);
|
||||
@@ -15,7 +15,7 @@ var AttendanceController = ['$scope', '$location', 'asDateFilter', 'Attendance',
|
||||
$scope.toasts.push({Type: 'Danger', Message: data.data});
|
||||
});
|
||||
};
|
||||
$('#txtDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
|
||||
var AttendanceSubController = ['$scope', function ($scope) {
|
||||
|
||||
@@ -6,7 +6,7 @@ var BalanceSheetController = ['$scope', '$location', 'asDateFilter', 'info', fun
|
||||
var date = asDate($scope.info.Date);
|
||||
$location.path('/BalanceSheet/' + date);
|
||||
};
|
||||
$('#txtStartDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
|
||||
BalanceSheetController.resolve = {
|
||||
|
||||
@@ -7,7 +7,7 @@ var CashFlowController = ['$scope', '$routeParams', '$location', 'asDateFilter',
|
||||
finishDate = asDate($scope.info.FinishDate);
|
||||
$location.path('/CashFlow').search({StartDate: startDate, FinishDate: finishDate});
|
||||
};
|
||||
$('#txtStartDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
CashFlowController.resolve = {
|
||||
cashFlow: ['$route', 'CashFlow', function ($route, CashFlow) {
|
||||
|
||||
@@ -51,7 +51,7 @@ var ClientController = ['$scope', '$location', '$modal', 'client', function ($sc
|
||||
$scope.delete();
|
||||
});
|
||||
};
|
||||
$('#txtName').focus();
|
||||
$scope.foName = true;
|
||||
}];
|
||||
|
||||
ClientController.resolve = {
|
||||
|
||||
@@ -6,7 +6,7 @@ var ClosingStockController = ['$scope', '$location', 'asDateFilter', 'info', fun
|
||||
var date = asDate($scope.info.Date);
|
||||
$location.path('/ClosingStock/' + date);
|
||||
};
|
||||
$('#txtDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
|
||||
ClosingStockController.resolve = {
|
||||
|
||||
@@ -30,7 +30,7 @@ var CostCenterController = ['$scope', '$routeParams', '$location', 'costCenter',
|
||||
$scope.toasts.push({Type: 'Danger', Message: data.data});
|
||||
});
|
||||
};
|
||||
$('#txtName').focus();
|
||||
$scope.foName = true;
|
||||
}];
|
||||
|
||||
CostCenterController.resolve = {
|
||||
|
||||
@@ -7,7 +7,7 @@ var DaybookController = ['$scope', '$location', 'asDateFilter', 'info', function
|
||||
finishDate = asDate($scope.info.FinishDate);
|
||||
$location.path('/Daybook').search({StartDate: startDate, FinishDate: finishDate});
|
||||
};
|
||||
$('#txtStartDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
DaybookController.resolve = {
|
||||
info: ['$route', 'Daybook', function ($route, Daybook) {
|
||||
|
||||
@@ -28,7 +28,7 @@ var EmployeeAttendanceController = ['$scope', '$location', '$routeParams', 'asDa
|
||||
$scope.toasts.push({Type: 'Danger', Message: data.data});
|
||||
});
|
||||
};
|
||||
$('#txtEmployee').focus();
|
||||
$scope.foEmployee = true;
|
||||
}];
|
||||
|
||||
var EmployeeAttendanceSubController = ['$scope', function ($scope) {
|
||||
|
||||
@@ -124,8 +124,7 @@ var EmployeeController = ['$scope', '$routeParams', '$location', 'asDateFilter',
|
||||
$scope.delete();
|
||||
});
|
||||
};
|
||||
|
||||
$('#txtName').focus();
|
||||
$scope.foName = true;
|
||||
}];
|
||||
|
||||
EmployeeController.resolve = {
|
||||
|
||||
@@ -30,7 +30,7 @@ var GroupController = ['$scope', '$location', 'group', function ($scope, $locati
|
||||
$scope.toasts.push({Type: 'Danger', Message: data.data});
|
||||
});
|
||||
};
|
||||
$('#txtName').focus();
|
||||
$scope.foName = true;
|
||||
}];
|
||||
|
||||
GroupController.resolve = {
|
||||
|
||||
@@ -33,7 +33,7 @@ var IssueController = ['$scope', '$routeParams', '$location', 'asDateFilter', 'v
|
||||
oldInventory.Quantity += quantity;
|
||||
delete $scope.batch;
|
||||
delete $scope.quantity;
|
||||
$('#txtBatch').focus();
|
||||
$scope.foBatch = true;
|
||||
}
|
||||
|
||||
if (angular.isUndefined(oldInventory) && (!consumption || quantity <= $scope.batch.QuantityRemaining)) {
|
||||
@@ -49,7 +49,7 @@ var IssueController = ['$scope', '$routeParams', '$location', 'asDateFilter', 'v
|
||||
});
|
||||
delete $scope.batch;
|
||||
delete $scope.quantity;
|
||||
$('#txtBatch').focus();
|
||||
$scope.foBatch = true;
|
||||
}
|
||||
};
|
||||
$scope.removeInventory = function (inventory) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var JournalController = ['$scope', '$location', 'asDateFilter', '$modal', 'uploadedImageResizer', 'voucher', 'Account', function ($scope, $location, asDate, $modal, uploadedImageResizer, voucher, Account) {
|
||||
$('#txtAccount').focus();
|
||||
$scope.foAccount = true;
|
||||
|
||||
$scope.voucher = voucher;
|
||||
$scope.debit = 1;
|
||||
@@ -53,7 +53,7 @@ var JournalController = ['$scope', '$location', 'asDateFilter', '$modal', 'uploa
|
||||
}
|
||||
delete $scope.account;
|
||||
delete $scope.amount;
|
||||
$('#txtAccount').focus();
|
||||
$scope.foAccount = true;
|
||||
};
|
||||
|
||||
$scope.removeJournal = function (journal) {
|
||||
|
||||
@@ -25,9 +25,9 @@ var LedgerController = ['$scope', '$routeParams', '$location', 'asDateFilter', '
|
||||
};
|
||||
|
||||
if ($routeParams.id) {
|
||||
$('#gvGrid').focus();
|
||||
$scope.foGrid = true;
|
||||
} else {
|
||||
$('#txtLedger').focus();
|
||||
$scope.foLedger = true;
|
||||
}
|
||||
|
||||
$scope.selected = -1;
|
||||
|
||||
@@ -29,7 +29,7 @@ var LoginController = ['$scope', '$http', '$location', '$routeParams', '$cookieS
|
||||
$scope.toasts.push({Type: 'Danger', Message: data});
|
||||
});
|
||||
};
|
||||
$('#username').focus();
|
||||
$scope.foUsername = true;
|
||||
}];
|
||||
|
||||
var LogoutController = ['$scope', '$http', '$location', function ($scope, $http, $location) {
|
||||
|
||||
@@ -33,7 +33,7 @@ var MessageController = ['$scope', '$location', 'asDateFilter', 'message', 'tags
|
||||
$scope.toasts.push({Type: 'Danger', Message: data.data});
|
||||
});
|
||||
};
|
||||
$('#txtTitle').focus();
|
||||
$scope.foTitle = true;
|
||||
}];
|
||||
|
||||
MessageController.resolve = {
|
||||
|
||||
@@ -7,7 +7,7 @@ var NetTransactionsController = ['$scope', '$location', 'asDateFilter', 'netTran
|
||||
finishDate = asDate($scope.info.FinishDate);
|
||||
$location.path('/NetTransactions').search({StartDate: startDate, FinishDate: finishDate});
|
||||
};
|
||||
$('#txtStartDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
|
||||
NetTransactionsController.resolve = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var PaymentController = ['$scope', '$location', 'asDateFilter', '$modal', 'uploadedImageResizer', 'voucher', 'ledgers', 'Account', function ($scope, $location, asDate, $modal, uploadedImageResizer, voucher, ledgers, Account) {
|
||||
$('#txtAccount').focus();
|
||||
$scope.foAccount = true;
|
||||
|
||||
$scope.voucher = voucher;
|
||||
$scope.ledgers = ledgers;
|
||||
@@ -50,7 +50,7 @@ var PaymentController = ['$scope', '$location', 'asDateFilter', '$modal', 'uploa
|
||||
}
|
||||
delete $scope.account;
|
||||
delete $scope.amount;
|
||||
$('#txtAccount').focus();
|
||||
$scope.foAccount = true;
|
||||
};
|
||||
|
||||
$scope.removeJournal = function (journal) {
|
||||
|
||||
@@ -30,7 +30,7 @@ var ProductGroupController = ['$scope', '$location', 'productGroup', function ($
|
||||
$scope.toasts.push({Type: 'Danger', Message: data.data});
|
||||
});
|
||||
};
|
||||
$('#txtName').focus();
|
||||
$scope.foName = true;
|
||||
}];
|
||||
|
||||
ProductGroupController.resolve = {
|
||||
|
||||
@@ -24,8 +24,7 @@ var ProductLedgerController = ['$scope', '$routeParams', '$location', 'asDateFil
|
||||
$scope.products = function ($viewValue) {
|
||||
return Product.autocomplete({term: $viewValue, count: 20}).$promise;
|
||||
};
|
||||
|
||||
$('#txtProduct').focus();
|
||||
$scope.foProduct = true;
|
||||
}];
|
||||
ProductLedgerController.resolve = {
|
||||
productLedger: ['$route', 'ProductLedger', function ($route, ProductLedger) {
|
||||
|
||||
@@ -128,8 +128,7 @@ var ProductController = ['$scope', '$location', '$window', '$modal', 'product',
|
||||
$scope.delete();
|
||||
});
|
||||
};
|
||||
|
||||
$('#txtName').focus();
|
||||
$scope.foName = true;
|
||||
}];
|
||||
|
||||
ProductController.resolve = {
|
||||
|
||||
@@ -7,7 +7,7 @@ var ProfitLossController = ['$scope', '$location', 'asDateFilter', 'profit_loss'
|
||||
finishDate = asDate($scope.info.FinishDate);
|
||||
$location.path('/ProfitLoss').search({StartDate: startDate, FinishDate: finishDate});
|
||||
};
|
||||
$('#txtStartDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
|
||||
ProfitLossController.resolve = {
|
||||
|
||||
@@ -8,7 +8,7 @@ var PurchaseEntriesController = ['$scope', '$location', 'asDateFilter', 'purchas
|
||||
finishDate = asDate($scope.info.FinishDate);
|
||||
$location.path('/PurchaseEntries').search({StartDate: startDate, FinishDate: finishDate});
|
||||
};
|
||||
$('#txtStartDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
|
||||
PurchaseEntriesController.resolve = {
|
||||
|
||||
@@ -53,8 +53,7 @@ var PurchaseReturnController = ['$scope', '$location', 'asDateFilter', '$modal',
|
||||
});
|
||||
delete $scope.batch;
|
||||
delete $scope.quantity;
|
||||
$('#txtBatch').val('');
|
||||
$('#txtBatch').focus();
|
||||
$scope.foBatch = true;
|
||||
}
|
||||
};
|
||||
$scope.removeInventory = function (inventory) {
|
||||
|
||||
@@ -56,7 +56,7 @@ var PurchaseController = ['$scope', '$location', 'asDateFilter', '$modal', 'uplo
|
||||
delete $scope.quantity;
|
||||
delete $scope.tax;
|
||||
delete $scope.discount;
|
||||
$('#txtProduct').focus();
|
||||
$scope.foProduct = true;
|
||||
}
|
||||
};
|
||||
$scope.removeInventory = function (inventory) {
|
||||
|
||||
@@ -7,7 +7,7 @@ var RawMaterialCostController = ['$scope', '$location', 'asDateFilter', 'rawMate
|
||||
finishDate = asDate($scope.info.FinishDate);
|
||||
$location.path('/RawMaterialCost').search({StartDate: startDate, FinishDate: finishDate});
|
||||
};
|
||||
$('#txtStartDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
|
||||
RawMaterialCostController.resolve = {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var ReceiptController = ['$scope', '$routeParams', '$location', 'asDateFilter', '$modal', 'uploadedImageResizer', 'voucher', 'ledgers', 'Voucher', 'Account', function ($scope, $routeParams, $location, asDate, $modal, uploadedImageResizer, voucher, ledgers, Voucher, Account) {
|
||||
$('#txtAccount').focus();
|
||||
|
||||
$scope.foAccount = true;
|
||||
$scope.voucher = voucher;
|
||||
$scope.ledgers = ledgers;
|
||||
function getOld(ledgerID, journals) {
|
||||
@@ -50,7 +49,7 @@ var ReceiptController = ['$scope', '$routeParams', '$location', 'asDateFilter',
|
||||
}
|
||||
delete $scope.account;
|
||||
delete $scope.amount;
|
||||
$('#txtAccount').focus();
|
||||
$scope.foAccount = true;
|
||||
};
|
||||
|
||||
$scope.removeJournal = function (journal) {
|
||||
|
||||
@@ -69,7 +69,7 @@ var RecipeController = ['$scope', '$location', '$window', '$modal', 'asDateFilte
|
||||
}
|
||||
delete $scope.quantity;
|
||||
delete $scope.product;
|
||||
$('#txtProduct').focus();
|
||||
$scope.foProduct = true;
|
||||
};
|
||||
|
||||
$scope.removeItem = function (item) {
|
||||
@@ -155,7 +155,7 @@ var RecipeController = ['$scope', '$location', '$window', '$modal', 'asDateFilte
|
||||
$scope.delete();
|
||||
});
|
||||
};
|
||||
$('#txtName').focus();
|
||||
$scope.foName = true;
|
||||
|
||||
$scope.products = function ($viewValue) {
|
||||
return Product.autocomplete({term: $viewValue, count: 20, a: true, e: true, t: 'S'}).$promise;
|
||||
|
||||
@@ -36,9 +36,9 @@ var ReconcileController = ['$scope', '$routeParams', '$location', 'asDateFilter'
|
||||
};
|
||||
|
||||
if ($routeParams.id) {
|
||||
$('#gvGrid').focus();
|
||||
$scope.foGrid = true;
|
||||
} else {
|
||||
$('#txtLedger').focus();
|
||||
$scope.foLedger = true;
|
||||
}
|
||||
|
||||
$scope.selected = -1;
|
||||
|
||||
@@ -79,7 +79,7 @@ var SalaryDeductionController = ['$scope', '$location', 'asDateFilter', '$modal'
|
||||
delete $scope.employee;
|
||||
delete $scope.grossSalary;
|
||||
delete $scope.daysWorked;
|
||||
$('#txtEmployee').focus();
|
||||
$scope.foEmployee = true;
|
||||
};
|
||||
|
||||
$scope.remove = function (deduction) {
|
||||
|
||||
@@ -7,7 +7,7 @@ var StockMovementController = ['$scope', '$location', 'asDateFilter', 'stockMove
|
||||
finishDate = asDate($scope.info.FinishDate);
|
||||
$location.path('/StockMovement').search({StartDate: startDate, FinishDate: finishDate});
|
||||
};
|
||||
$('#txtStartDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
|
||||
StockMovementController.resolve = {
|
||||
|
||||
@@ -5,7 +5,7 @@ var TrialBalanceController = ['$scope', '$location', 'asDateFilter', 'trialBalan
|
||||
$scope.show = function () {
|
||||
$location.path('/TrialBalance/' + asDate($scope.info.Date));
|
||||
};
|
||||
$('#txtDate').focus();
|
||||
$scope.foDate = true;
|
||||
}];
|
||||
TrialBalanceController.resolve = {
|
||||
trialBalance: ['$route', 'TrialBalance', function ($route, TrialBalance) {
|
||||
|
||||
@@ -30,7 +30,7 @@ var UserController = ['$scope', '$location', 'user', function ($scope, $location
|
||||
$scope.toasts.push({Type: 'Danger', Message: data.data});
|
||||
});
|
||||
};
|
||||
$('#txtName').focus();
|
||||
$scope.foName = true;
|
||||
}];
|
||||
|
||||
UserController.resolve = {
|
||||
|
||||
Reference in new issue
Block a user