12345678910111213141516171819202122232425262728 |
- (function () {
- var endpointSelector = new DevExpress.EndpointSelector(Partials.config.endpoints);
- var serviceConfig = $.extend(true, {}, Partials.config.services, {
- db: {
- url: endpointSelector.urlFor("db"),
- errorHandler: handleServiceError
- }
- });
- function handleServiceError(error) {
- if (window.WinJS) {
- try {
- new Windows.UI.Popups.MessageDialog(error.message).showAsync();
- } catch (e) {
- // Another dialog is shown
- }
- } else {
- alert(error.message);
- }
- }
- // Enable partial CORS support for IE < 10
- $.support.cors = true;
- Partials.db = new DevExpress.data.ODataContext(serviceConfig.db);
- }());
|