Skip to content

Commit

Permalink
Changed projects to use new CustOrderService
Browse files Browse the repository at this point in the history
  • Loading branch information
edselg committed Apr 13, 2017
1 parent b2b51f3 commit e3a3be8
Show file tree
Hide file tree
Showing 289 changed files with 43,243 additions and 182 deletions.
2 changes: 1 addition & 1 deletion hierarchical-grid/build-output/debug/data-providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"authenticationModel": "Anonymous",
"providerType": "Progress Data Service",
"catalogUris": [
"http://oemobiledemo.progress.com/CustOrderService/static/mobile/CustOrderService.json"
"http://oemobiledemo.progress.com/CustOrderService/static/CustOrderSubService.json"
],
"generateChildTables": true,
"verb": "GET",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
(function(angular, kendo){

'use strict';




angular.module('views')
.controller('HierarchicalGridHierarchicalGridCtrl', ['$scope', '$injector', 'onInit',function ($scope, $injector, onInit) {
$scope._$ds = {};
$scope._$viewModels = {};
$scope.factory = $injector.get('hierarchicalGridHierarchicalGrid');
$scope._$domReady = false;

$scope._$customSections = {
top: 'extensions/html/hierarchical-grid-hierarchical-grid/topSection.html'
};

$scope.$on('$includeContentLoaded', function() {
$scope._$domReady = true;
});

$scope.$on('$includeContentError', function() {
$scope._$domReady = true;
console.info('Error loading custom section', $scope._$customSections.top);
});


(function(angular, kendo){

'use strict';




angular.module('views')
.controller('HierarchicalGridHierarchicalGridCtrl', ['$scope', '$injector', 'onInit',function ($scope, $injector, onInit) {
$scope._$ds = {};
$scope._$viewModels = {};
$scope.factory = $injector.get('hierarchicalGridHierarchicalGrid');
$scope._$domReady = false;

$scope._$customSections = {
top: 'extensions/html/hierarchical-grid-hierarchical-grid/topSection.html'
};

$scope.$on('$includeContentLoaded', function() {
$scope._$domReady = true;
});

$scope.$on('$includeContentError', function() {
$scope._$domReady = true;
console.info('Error loading custom section', $scope._$customSections.top);
});


$scope._$ds['customer'] = new kendo.data.DataSource({
"type": "jsdo",
"transport": {
"jsdo": "CustOrder",
"jsdo": "CustOrderNSub",
"tableRef": "eCustomer"
},
"pageSize": 30
}
);
$scope._$ds['customer'].bind('error', errorHandler);

);
$scope._$ds['customer'].bind('error', errorHandler);

$scope._$ds['order'] = new kendo.data.DataSource({
"type": "jsdo",
"transport": {
"jsdo": "CustOrder",
"jsdo": "CustOrderNSub",
"tableRef": "eOrder"
},
"pageSize": 10
}
);
$scope._$ds['order'].bind('error', errorHandler);


function errorHandler(e) {
var transport = e.sender.transport;
var tableRef = transport.tableRef;
var jsdo = transport.jsdo;
var table = tableRef ? jsdo[tableRef] : jsdo;
var errors = table.getErrors();
var message = e.errorThrown.message;

message += "<ul>";

for (var i = 0; i < errors.length; i++) {
message += '<li>' + errors[i].error + '</li>';
}

message += "</ul>";

$scope.$emit('notification', { type: 'error', message: message});
}


$scope._$viewModels['customerModel'] = $injector.get('dsService').createPristineModel($scope._$ds['customer']);

$scope._$viewModels['orderModel'] = $injector.get('dsService').createPristineModel($scope._$ds['order']);



$scope.$on('$viewContentLoaded', function(e) {
$scope.factory['onShow'](e.currentScope, onInit);
});



);
$scope._$ds['order'].bind('error', errorHandler);


function errorHandler(e) {
var transport = e.sender.transport;
var tableRef = transport.tableRef;
var jsdo = transport.jsdo;
var table = tableRef ? jsdo[tableRef] : jsdo;
var errors = table.getErrors();
var message = e.errorThrown.message;

message += "<ul>";

for (var i = 0; i < errors.length; i++) {
message += '<li>' + errors[i].error + '</li>';
}

message += "</ul>";

$scope.$emit('notification', { type: 'error', message: message});
}


$scope._$viewModels['customerModel'] = $injector.get('dsService').createPristineModel($scope._$ds['customer']);

$scope._$viewModels['orderModel'] = $injector.get('dsService').createPristineModel($scope._$ds['order']);



$scope.$on('$viewContentLoaded', function(e) {
$scope.factory['onShow'](e.currentScope, onInit);
});



$scope['grid'] = {
widget: null,
options: {
Expand Down Expand Up @@ -157,15 +157,15 @@

}
}
};


};


$scope.$on('$destroy', function() {

$scope._$ds['customer'].unbind('error', errorHandler);

$scope._$ds['order'].unbind('error', errorHandler);

});
}]);
})(angular, kendo);
$scope._$ds['customer'].unbind('error', errorHandler);

$scope._$ds['order'].unbind('error', errorHandler);

});
}]);
})(angular, kendo);
14 changes: 7 additions & 7 deletions hierarchical-grid/meta/dataProviders/CustOrderService.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"providerType": "Progress Data Service",
"serviceUri": "http://oemobiledemo.progress.com/CustOrderService",
"catalogUris": [
"http://oemobiledemo.progress.com/CustOrderService/static/mobile/CustOrderService.json"
"http://oemobiledemo.progress.com/CustOrderService/static/CustOrderSubService.json"
],
"generateChildTables": true,
"verb": "GET",
Expand All @@ -16,10 +16,10 @@
"type": "data-source",
"schemaVersion": "1.0",
"uniqueID": "11c9f102-43e3-41bb-9862-63d1f355f4ba",
"name": "CustOrder.eCustomer",
"name": "CustOrderNSub.eCustomer",
"serviceName": "CustOrderService",
"resourceName": "CustOrder",
"tableName": "CustOrder.eCustomer",
"resourceName": "CustOrderNSub",
"tableName": "CustOrderNSub.eCustomer",
"clientSideProcessing": true,
"countFnName": "",
"fields": [
Expand Down Expand Up @@ -98,10 +98,10 @@
"type": "data-source",
"schemaVersion": "1.0",
"uniqueID": "11c9f102-43e3-41bb-9862-63d1f355f4ba",
"name": "CustOrder.eOrder",
"name": "CustOrderNSub.eOrder",
"serviceName": "CustOrderService",
"resourceName": "CustOrder",
"tableName": "CustOrder.eOrder",
"resourceName": "CustOrderNSub",
"tableName": "CustOrderNSub.eOrder",
"clientSideProcessing": true,
"countFnName": "",
"fields": [
Expand Down
4 changes: 2 additions & 2 deletions hierarchical-grid/meta/modules/hierarchical-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
{
"name": "customer",
"dataProviderName": "CustOrderService",
"dataSourceName": "CustOrder.eCustomer",
"dataSourceName": "CustOrderNSub.eCustomer",
"pageSize": 30,
"uniqueID": "e8bc2de8-7b5d-4723-8b47-601fb04e264d"
},
{
"name": "order",
"dataProviderName": "CustOrderService",
"dataSourceName": "CustOrder.eOrder",
"dataSourceName": "CustOrderNSub.eOrder",
"pageSize": 10,
"uniqueID": "3fcd3326-961f-47b4-9534-52177b92d5df"
}
Expand Down
2 changes: 1 addition & 1 deletion master-detail-grids/build-output/debug/data-providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"authenticationModel": "Anonymous",
"providerType": "Progress Data Service",
"catalogUris": [
"http://oemobiledemo.progress.com/CustOrderService/static/mobile/CustOrderService.json"
"http://oemobiledemo.progress.com/CustOrderService/static/CustOrderSubService.json"
],
"autoGenerateDataSources": true,
"generateChildTables": true,
Expand Down
18 changes: 18 additions & 0 deletions master-detail-grids/build-output/debug/http.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*jslint nomen: true */
/*globals require, console, __dirname */
var express = require("express");
var app = express();

app.get("/", function (req, res) {
console.log("Request: [" + req.headers.host + "]: /index.html");
res.sendFile(__dirname + "/index.html");
});

/* servers all the static files */
app.get(/^(.+)$/, function (req, res) {
console.log("Request: [" + req.headers.host + "]: " + req.params[0]);
res.sendFile(__dirname + req.params[0]);
});

console.log("HTTP server is ready.");
app.listen(8080);
Loading

0 comments on commit e3a3be8

Please sign in to comment.