Date: Monday, December 12, 2016 @ 07:38:44 Author: felixonmars Revision: 198911
upgpkg: deepin-manual 1.0.5-1 Added: deepin-manual/trunk/angular.patch ---------------+ angular.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) Added: angular.patch =================================================================== --- angular.patch (rev 0) +++ angular.patch 2016-12-12 07:38:44 UTC (rev 198911) @@ -0,0 +1,45 @@ +commit 3ae465ea1274ddef845683bc7d9a0425f8171f88 +Author: Felix Yan <felixonm...@archlinux.org> +Date: Mon Dec 12 15:25:03 2016 +0800 + + Adapt to new angular $http syntax + + Change-Id: I6ae4cbd2a1532d32c2aa22e842a3ee73d9ac424a + +diff --git a/PageRoot/www/jssrc/services/InputService.js b/PageRoot/www/jssrc/services/InputService.js +index 98cf677..a344a4c 100644 +--- a/PageRoot/www/jssrc/services/InputService.js ++++ b/PageRoot/www/jssrc/services/InputService.js +@@ -10,21 +10,21 @@ angular.module("General") + switch (parsed.protocol) { + case "http:": + case "https:": { +- return $http.get(url) +- .success(function(data) { +- resolve(data); +- }) +- .error(function(_, status) { +- reject(`Failed to load with status ${status}`); ++ return $http.get(url).then( ++ function(response) { ++ resolve(response.data); ++ }, ++ function(response) { ++ reject(`Failed to load with status ${response.status}`); + }); + } + case "file:": { + if (typeof XMLHttpRequest !== "undefined") { +- return $http.get(url) +- .success(function(data) { +- resolve(data); +- }) +- .error(function() { ++ return $http.get(url).then( ++ function(response) { ++ resolve(response.data); ++ }, ++ function(response) { + reject("Failed to load local file."); + }); + } else {