Skip to content

Commit c797a2f

Browse files
committed
Upgrade package functions added
1 parent 0e57c0d commit c797a2f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

BlogEngine/BlogEngine.NET/admin/app/custom/plugins/pluginController.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,18 @@
179179
});
180180
}
181181

182+
$scope.upgradePackage = function (pkgId) {
183+
spinOn();
184+
dataService.updateItem("/api/packages/uninstall/" + pkgId, pkgId)
185+
.success(function (data) {
186+
$scope.installPackage();
187+
})
188+
.error(function () {
189+
toastr.error($rootScope.lbl.failed);
190+
spinOff();
191+
});
192+
}
193+
182194
$scope.load();
183195

184196
$(document).ready(function () {

BlogEngine/BlogEngine.NET/admin/app/custom/themes/themeController.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,18 @@
159159
});
160160
}
161161

162+
$scope.upgradePackage = function (pkgId) {
163+
spinOn();
164+
dataService.updateItem("/api/packages/uninstall/" + pkgId, pkgId)
165+
.success(function (data) {
166+
$scope.installPackage(pkgId);
167+
})
168+
.error(function () {
169+
toastr.error($rootScope.lbl.failed);
170+
spinOff();
171+
});
172+
}
173+
162174
$scope.removeEmptyReviews = function () {
163175
if ($scope.package.Extra != null && $scope.package.Extra.Reviews != null) {
164176
var reviews = [];

0 commit comments

Comments
 (0)