5b41abfc6e290f0551a0c207a4a3925ba29952d4.svn-base 788 B

12345678910111213141516171819202122232425262728
  1. (function () {
  2. var endpointSelector = new DevExpress.EndpointSelector(Partials.config.endpoints);
  3. var serviceConfig = $.extend(true, {}, Partials.config.services, {
  4. odata: {
  5. url: endpointSelector.urlFor("odata"),
  6. errorHandler: handleServiceError
  7. }
  8. });
  9. function handleServiceError(error) {
  10. if (window.WinJS) {
  11. try {
  12. new Windows.UI.Popups.MessageDialog(error.message).showAsync();
  13. } catch (e) {
  14. // Another dialog is shown
  15. }
  16. } else {
  17. alert(error.message);
  18. }
  19. }
  20. // Enable partial CORS support for IE < 10
  21. $.support.cors = true;
  22. Partials.odata = new DevExpress.data.ODataContext(serviceConfig.odata);
  23. }());