Commit 26b318ea authored by frank.xa.zhang's avatar frank.xa.zhang

fixed page issue -- frank

parent 79bd35d6
commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$log', 'ackUibModal', function ($scope, $log, ackUibModal) {
commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$log', 'ackUibModal', '$translate', function ($scope, $log, ackUibModal, $translate) {
'use strict';
$scope.isShow = false;
......@@ -10,24 +10,150 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
'edit-organization-director-modal.html',
'edit-organization-director-modal',
null, 'static', function () {
$scope.isShow = false;
$scope.isShowD = false;
ackMessageBox.close();
});
$scope.modalInstance.open();
},
close: function () {
$scope.isShow = false;
$scope.modalInstance.close();
},
cancel: function () {
$scope.isShow = false;
$scope.onClose();
$scope.modalInstance.cancel();
}
}
};
var now = new Date();
var initParams = function () {
$scope.editModel={};
$scope.dropdownDatasource = {
otherRolesTypeList: constant.organizationHK.OtherRoles,
executiveTypeList: constant.organizationHK.executiveType
};
$scope.textOptions = {
directorNameOption: {
bindingOptions: {
value: 'editModel.directorName'
},
maxLength: 100,
placeholder: $translate.instant('directorName'),
width: 300
},
residencyOption: {
bindingOptions: {
value: 'editModel.residency'
},
maxLength: 100,
placeholder: $translate.instant('residency'),
width: 300
},
dateOfAppointmentOption: {
bindingOptions: {
value: 'editModel.dateOfAppointment'
},
type: "date",
value: now,
width: 300
},
dateOfResignationOption: {
bindingOptions: {
value: 'editModel.dateOfResignation'
},
type: "date",
value: now,
width: 300
},
executiveOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.executiveTypeList',
value: 'editModel.executive'
},
onSelectionChanged: function (args) {
$scope.editModel.executive = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
otherRolesOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.otherRolesTypeList',
value: 'editModel.otherRoles'
},
onSelectionChanged: function (args) {
$scope.editModel.otherRoles = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
}
};
$scope.validateOption = {
directorNameOption: {
validationRules: [
{
type: "required",
message: $translate.instant('directorName')
}
]
},
residencyOption: {
validationRules: [
{
type: "required",
message: $translate.instant('residency')
}
]
},
dateOfAppointmentOption: {
validationRules: [
{
type: "required",
message: $translate.instant('dateOfAppointment')
}
]
},
dateOfResignationOption: {
validationRules: [
{
type: "required",
message: $translate.instant('dateOfResignation')
}
]
},
executiveOption: {
validationRules: [
{
type: "required",
message: $translate.instant('executive')
}
]
},
otherRolesOption: {
validationRules: [
{
type: "required",
message: $translate.instant('otherRoles')
}
]
}
};
};
var init = function () {
......
......@@ -4,7 +4,7 @@
<h4 class="modal-title" style="margin-top: 5px;" ng-if="isAdd">{{'addDirector' | translate}}</h4>
<h4 class="modal-title" style="margin-top: 5px;" ng-if="!isAdd">{{'editDirector' | translate}}</h4>
</div>
<div class="modal-body" id="modal-body" style="height:628px;">
<div class="modal-body" id="modal-body" style="height:335px;width:600px">
<!--add director-->
<div>
<form class="form-horizontal" id="orgControlForm" name="orgControlForm">
......@@ -12,69 +12,43 @@
<div class="bottom-row">
<!--directorName-->
<div class="form-group">
<label for="directorName" class="col-sm-3 control-label"><span class="must-input">*</span>{{'directorName' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.directorName.$invalid && (orgControlForm.directorName.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" id="directorName"
ng-model="editOrgModel.directorName" name="directorName"
placeholder="{{resources.directorName}}" ng-keyup="directorNameKeyUp()"
maxlength="100">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'directorName' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" style="margin-left: 20px" dx-text-box="textOptions.directorNameOption" dx-validator="validateOption.directorNameOption">
</div>
</div>
<!--residency-->
<div class="form-group">
<label for="residency" class="col-sm-3 control-label"><span class="must-input">*</span>{{'residency' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.residency.$invalid && (orgControlForm.residency.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" id="residency"
ng-model="editOrgModel.residency" name="residency"
placeholder="{{resources.residency}}" ng-keyup="residencyKeyUp()"
maxlength="100">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'residency' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" style="margin-left: 20px" dx-text-box="textOptions.residencyOption" dx-validator="validateOption.residencyOption">
</div>
</div>
<!--dateOfAppointment-->
<div class="form-group">
<label for="dateOfAppointment" class="col-sm-3 control-label"><span class="must-input">*</span>{{'dateOfAppointment' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.dateOfAppointment.$invalid && (orgControlForm.dateOfAppointment.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" id="dateOfAppointment"
ng-model="editOrgModel.dateOfAppointment" name="dateOfAppointment"
placeholder="{{resources.dateOfAppointment}}" ng-keyup="dateOfAppointmentKeyUp()"
maxlength="100">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'dateOfAppointment' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" style="margin-left: 20px" dx-date-box="textOptions.dateOfAppointmentOption" dx-validator="validateOption.dateOfAppointmentOption">
</div>
</div>
<!--dateOfResignation-->
<div class="form-group">
<label for="dateOfResignation" class="col-sm-3 control-label"><span class="must-input">*</span>{{'dateOfResignation' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.dateOfResignation.$invalid && (orgControlForm.dateOfResignation.$dirty || orgControlForm.$submitted)}">
<input class="form-control localRequired" id="dateOfResignation"
ng-model="editOrgModel.dateOfResignation" name="dateOfResignation"
placeholder="{{resources.dateOfResignation}}" ng-keyup="dateOfResignationKeyUp()"
maxlength="100">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'dateOfResignation' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" style="margin-left: 20px" dx-date-box="textOptions.dateOfResignationOption" dx-validator="validateOption.dateOfResignationOption">
</div>
</div>
<!--executive-->
<div class="form-group">
<label class="col-sm-3 control-label" for="executive"><span class="must-input">*</span>{{'executive' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.executive.$invalid && (orgControlForm.executive.$dirty || orgControlForm.$submitted)}">
<select class="form-control" id='executive'
name="executive" ng-model="editOrgModel.executive"
ng-options="item for item in executiveTypeList">
<option value="">{{resources.executive}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'executive' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" dx-select-box="textOptions.executiveOption" dx-validator="validateOption.executiveOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--otherRoles-->
<div class="form-group">
<label class="col-sm-3 control-label" for="otherRoles"><span class="must-input">*</span>{{'otherRoles' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':orgControlForm.otherRoles.$invalid && (orgControlForm.otherRoles.$dirty || orgControlForm.$submitted)}">
<select class="form-control" id='otherRoles'
name="otherRoles" ng-model="editOrgModel.otherRoles"
ng-options="item for item in otherRolesTypeList">
<option value="">{{resources.otherRoles}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'otherRoles' | translate}}:</label>
<div class="col-sm-9 form-control margin-left-20" dx-select-box="textOptions.otherRolesOption" dx-validator="validateOption.otherRolesOption" style="width: 300px;margin-left: 20px">
</div>
</div>
</div>
......
......@@ -9,7 +9,8 @@ commonModule.directive('editOrganizationDirectorModal', ['$log', function ($log)
scope: {
isShowD: '=?',
parentPage: '@',
editModel: '=?'
editModel: '=?',
onClose:'&'
},
link: function (scope, element) {
}
......
......@@ -19,10 +19,12 @@
}
.modal-dialog {
width: 80% !important;
width: 653px;
height: 409px;
.modal-body {
height: 100%;
width:100%;
.row {
height: 100%;
......@@ -54,6 +56,17 @@
.right-container {
}
.local{
.bottom-row{
.form-group{
.margin-left-20{
margin-left: 20px;
}
}
}
}
}
.modal-footer {
......
......@@ -72,7 +72,7 @@
}
input {
width: 250px;
//width: 250px;
height: 33px;
}
......@@ -104,7 +104,7 @@
form .col-sm-9 {
width: 65%;
margin-left: -20px;
//margin-left: -20px;
}
form input[type='radio'] {
......
commonModule.controller('editOrganizationShareholderModalController', ['$scope', '$log', 'ackUibModal', function ($scope, $log, ackUibModal) {
commonModule.controller('editOrganizationShareholderModalController', ['$scope', '$log', 'ackUibModal','$translate', function ($scope, $log, ackUibModal,$translate) {
'use strict';
$scope.isShow = false;
......@@ -10,23 +10,109 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
'edit-organization-shareholder-modal.html',
'edit-organization-shareholder-modal-wrapper',
null, 'static', function () {
$scope.isShow = false;
$scope.isShowS = false;
ackMessageBox.close();
});
$scope.modalInstance.open();
},
close: function () {
$scope.isShow = false;
$scope.modalInstance.close();
},
cancel: function () {
$scope.isShow = false;
$scope.onClose();
$scope.modalInstance.cancel();
}
}
};
var initParams = function () {
$scope.editOrgModel = {};
$scope.ownershipFormTypeList = constant.organizationHK.OwnershipForm;
$scope.commonOrPreferredTypeList = ['Commmon', 'Preferred'];
$scope.classOfSharesTypeList = ['A', 'B'];
$scope.dropdownDatasource = {
investmentEntityTypeList: [],
ownershipFormTypeList: constant.organizationHK.OwnershipForm,
commonOrPreferredTypeList: [{id: 1, name: 'Commmon'}, {id: 2, name: 'Preferred'}],
classOfSharesTypeList: [{id: 1, name: 'A'}, {id: 2, name: 'B'}]
};
$scope.textboxOption = {
investmentEntityOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.investmentEntityTypeList',
value: 'editModel.investmentEntity'
},
onSelectionChanged: function (args) {
$scope.editModel.investmentEntity = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
ownershipFormOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.ownershipFormTypeList',
value: 'editModel.ownershipForm'
},
onSelectionChanged: function (args) {
$scope.editModel.ownershipForm = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
commonOrPreferredOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.commonOrPreferredTypeList',
value: 'editModel.commonOrPreferred'
},
onSelectionChanged: function (args) {
$scope.editModel.commonOrPreferred = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
classOfSharesOption: {
bindingOptions: {
dataSource: 'dropdownDatasource.classOfSharesTypeList',
value: 'editModel.classOfShares'
},
onSelectionChanged: function (args) {
$scope.editModel.classOfShares = args.selectedItem.id;
},
itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name);
itemElement.append(span);
},
noDataText: $translate.instant('NoDataText'),
valueExpr: 'id',
displayExpr: 'name'
},
votingPercentageOption: {
bindingOptions: {
value: 'editModel.votingPercentage'
},
maxLength: 100,
placeholder: $translate.instant('votingPercentage'),
width: 300
}
}
};
......
......@@ -4,7 +4,7 @@
<h4 class="modal-title" style="margin-top: 5px;" ng-if="isAdd">{{'addShardholder' | translate}}</h4>
<h4 class="modal-title" style="margin-top: 5px;" ng-if="!isAdd">{{'editShardholder' | translate}}</h4>
</div>
<div class="modal-body" id="modal-body" style="height:628px;">
<div class="modal-body" id="modal-body" style="height:280px;width:641px">
<!--add director-->
<div>
<form class="form-horizontal" id="shareholderControlForm" name="shareholderControlForm">
......@@ -12,60 +12,36 @@
<div class="bottom-row">
<!--investmentEntity-->
<div class="form-group">
<label for="investmentEntity" class="col-sm-3 control-label"><span class="must-input">*</span>{{'investmentEntity' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.name.$invalid && (shareholderControlForm.name.$dirty || shareholderControlForm.$submitted)}">
<select class="form-control" id='investmentEntity'
name="investmentEntity" ng-model="editOrgModel.investmentEntity"
ng-options="item for item in investmentEntityTypeList">
<option value="">{{resources.investmentEntity}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'investmentEntity' | translate}}:</label>
<div class="col-sm-9" dx-select-box="textboxOption.investmentEntityOption" dx-validator="validateOption.investmentEntityOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--ownershipForm-->
<div class="form-group">
<label for="ownershipForm" class="col-sm-3 control-label"><span class="must-input">*</span>{{'ownershipForm' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.ownershipForm.$invalid && (shareholderControlForm.ownershipForm.$dirty || shareholderControlForm.$submitted)}">
<select class="form-control" id='ownershipForm'
name="ownershipForm" ng-model="editOrgModel.ownershipForm"
ng-options="item for item in ownershipFormTypeList">
<option value="">{{resources.ownershipForm}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'ownershipForm' | translate}}:</label>
<div class="col-sm-9 form-control" dx-select-box="textboxOption.ownershipFormOption" dx-validator="validateOption.ownershipFormOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--commonOrPreferred-->
<div class="form-group">
<label for="commonOrPreferred" class="col-sm-3 control-label"><span class="must-input">*</span>{{'commonOrPreferred' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.commonOrPreferred.$invalid && (shareholderControlForm.commonOrPreferred.$dirty || shareholderControlForm.$submitted)}">
<select class="form-control" id='commonOrPreferred'
name="commonOrPreferred" ng-model="editOrgModel.commonOrPreferred"
ng-options="item for item in commonOrPreferredTypeList">
<option value="">{{resources.commonOrPreferred}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'commonOrPreferred' | translate}}:</label>
<div class="col-sm-9 form-control" dx-select-box="textboxOption.commonOrPreferredOption" dx-validator="validateOption.commonOrPreferredOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--classOfShares-->
<div class="form-group">
<label for="classOfShares" class="col-sm-3 control-label"><span class="must-input">*</span>{{'classOfShares' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.classOfShares.$invalid && (shareholderControlForm.classOfShares.$dirty || shareholderControlForm.$submitted)}">
<select class="form-control" id='classOfShares'
name="classOfShares" ng-model="editOrgModel.classOfShares"
ng-options="item for item in classOfSharesTypeList">
<option value="">{{resources.classOfShares}}</option>
</select>
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'classOfShares' | translate}}:</label>
<div class="col-sm-9 form-control" dx-select-box="textboxOption.classOfSharesOption" dx-validator="validateOption.classOfSharesOption" style="width: 300px;margin-left: 20px">
</div>
</div>
<!--votingPercentage-->
<div class="form-group">
<label class="col-sm-3 control-label" for="votingPercentage"><span class="must-input">*</span>{{'votingPercentage' | translate}}:</label>
<div class="col-sm-9" ng-class="{'has-error':shareholderControlForm.votingPercentage.$invalid && (shareholderControlForm.votingPercentage.$dirty || shareholderControlForm.$submitted)}">
<input class="form-control localRequired" id="votingPercentage"
ng-model="editOrgModel.votingPercentage" name="votingPercentage"
placeholder="{{resources.votingPercentage}}" ng-keyup="votingPercentageKeyUp()"
maxlength="100" ng-pattern="/^[0-9]+$/">
<label class="col-sm-3 control-label"><span class="must-input">*</span>{{'votingPercentage' | translate}}:</label>
<div class="col-sm-9 form-control" dx-text-box="textboxOption.votingPercentageOption" dx-validator="validateOption.votingPercentageOption" style="margin-left: 20px">
</div>
</div>
</div>
......
......@@ -9,7 +9,8 @@ commonModule.directive('editOrganizationShareholderModal', ['$log', function ($l
scope: {
isShowS: '=?',
parentPage: '@',
editModel: '=?'
editModel: '=?',
onClose:'&'
},
link: function (scope, element) {
}
......
......@@ -18,11 +18,12 @@
}
.modal-dialog {
width: 50% !important;
width: 653px;
height: 409px;
.modal-body {
height: 100%;
width:100%;
.row {
height: 100%;
margin-bottom: 20px;
......
......@@ -1689,34 +1689,38 @@ constant.EnumTaxEventType = {
constant.organizationHK = {
legalFormTypeList: [
{code: 1, type: "Limited Partnership"},
{code: 2, type: "Limited Company"},
{code: 3, type: "Trustee"}
{id: 1, name: "Limited Partnership"},
{id: 2, name: "Limited Company"},
{id: 3, name: "Trustee"}
],
EntityLevel: [
{code: 1, type: "Investment Fund"},
{code: 2, type: "Investment Holding"},
{code: 3, type: "Portfolio Company"}
{id: 1, name: "Investment Fund"},
{id: 2, name: "Investment Holding"},
{id: 3, name: "Portfolio Company"}
],
JurisdictionOfFormation: [
{code: 1, type: "Hong Kong"},
{code: 2, type: "British Virgin Islands"},
{code: 3, type: "Cayman Islands"}
{id: 1, name: "Hong Kong"},
{id: 2, name: "British Virgin Islands"},
{id: 3, name: "Cayman Islands"}
],
OwnershipForm: [
{code: 1, type: "Ordinary Shares"},
{code: 2, type: "Preference Shares"}
{id: 1, name: "Ordinary Shares"},
{id: 2, name: "Preference Shares"}
],
BoardMeetingRequirement: [
{code: 1, type: "Annual"},
{code: 2, type: "Semi Qnnual"},
{code: 3, type: "Quarter"},
{code: 4, type: "Monthly"}
{id: 1, name: "Annual"},
{id: 2, name: "Semi Qnnual"},
{id: 3, name: "Quarter"},
{id: 4, name: "Monthly"}
],
OtherRoles: [
{code: 1, type: "CEO"},
{code: 2, type: "CFO"},
{code: 3, type: "NA"}
{id: 1, name: "CEO"},
{id: 2, name: "CFO"},
{id: 3, name: "NA"}
],
executiveType:[
{id: 1, name: "Y"},
{id: 2, name: "N"}
]
};
/************************************************cit constant end*************************************************/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment