Skip to content
Snippets Groups Projects
Commit dbe800a1 authored by Balaji M's avatar Balaji M
Browse files

vtiger web view mobile changes

parent 1bf1b380
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@
</md-tab>
<md-tab label="Related">
<div ng-if="relatedModules" style="height:75vh; overflow: scroll;">
<md-list-item ng-repeat="(module , value) in relatedModules">
<md-list-item ng-repeat="(module , value) in relatedModules" ng-click="showRelatedList(module)">
<p style="font-size: 13px;"><span style="font-size: 12px; color:#FF4068" class="vicon-{{module | lowercase | nospace}}"></span> &nbsp; {{module}}</p>
<p style="text-align:right; color:#0099FF">{{value}}</p>
<md-divider></md-divider>
......
......@@ -136,9 +136,9 @@
</md-input-container>
<!--*************Date Field UI***********************************-->
<md-input-container class="date-input-container" ng-switch-when="date" style="width: 100%;">
<md-input-container class="date-input-container" ng-switch-when="date">
<label>{{field.label}}</label>
<md-datepicker
<md-datepicker style="width: 100%;"
class="edit-date-picker"
name = "{{field.name}}"
ng-model="field.dateFieldValue"
......@@ -230,7 +230,6 @@
<!--*************Owner UI***********************************-->
<md-input-container ng-switch-when="owner">
{{field}}
<label class="edit-select-label">{{field.label}}</label>
<md-select ng-model="field.value" name="{{field.name}}" aria-label="{{field.name}}" ng-required="field.mandatory">
<md-optgroup label="Users" aria-label="Users">
......
......@@ -136,6 +136,9 @@ mobileapp.controller('VtigerDetailController', function ($scope, $api) {
$scope.isDeleteable = function() {
return ($scope.deleteable)? true : false;
};
$scope.showRelatedList = function(module){
window.location.href = "index.php?module="+module+"&view=List&app="+$scope.selectedApp;
};
});
......
......@@ -29,6 +29,7 @@ mobileapp.controller('VtigerEditController', function ($scope, $api, $mdToast, $
$api('describe', {module: $scope.module}, function (e, r) {
$scope.describeObject = r.describe;
$scope.fields = $scope.describeObject.fields;
console.log($scope.fields);
$scope.createable = $scope.describeObject.createable;
$scope.updateable = $scope.describeObject.updateable;
$scope.deleteable = $scope.describeObject.deleteable;
......@@ -66,8 +67,7 @@ mobileapp.controller('VtigerEditController', function ($scope, $api, $mdToast, $
};
$scope.loadFields = function () {
$api('fetchRecord', {module: $scope.module, record: $scope.record}, function (e, r) {
$api('fetchRecord', {module: $scope.module, record: $scope.record, view_mode:'web'}, function (e, r) {
var processedData = [];
for (var index in $scope.fields) {
var value = r.record[$scope.fields[index].name];
......
......@@ -26,6 +26,24 @@ class Mobile_WS_Describe extends Mobile_WS_Controller {
$field['headerfield'] = $fieldModel->get('headerfield');
$field['summaryfield'] = $fieldModel->get('summaryfield');
}
if($fieldModel && $fieldModel->getFieldDataType() == 'owner') {
$currentUser = Users_Record_Model::getCurrentUserModel();
$users = $currentUser->getAccessibleUsers();
$usersWSId = Mobile_WS_Utils::getEntityModuleWSId('Users');
foreach ($users as $id => $name) {
unset($users[$id]);
$users[$usersWSId.'x'.$id] = $name;
}
$groups = $currentUser->getAccessibleGroups();
$groupsWSId = Mobile_WS_Utils::getEntityModuleWSId('Groups');
foreach ($groups as $id => $name) {
unset($groups[$id]);
$groups[$groupsWSId.'x'.$id] = $name;
}
$field['type']['picklistValues']['users'] = $users;
$field['type']['picklistValues']['groups'] = $groups;
}
$newFields[] = $field;
}
$fields=null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment