|
| 1 | +<script type="text/javascript" src="/js/angular/directives/wysiwyg.js"></script> |
1 | 2 | <script type="text/javascript">
|
2 |
| -angular.module('pencilblueApp', ['uploadPhoto', 'inlineMedia']) |
| 3 | +angular.module('pencilblueApp', ['wysiwygElement', 'uploadPhoto', 'inlineMedia']) |
3 | 4 | .controller('PencilBlueController', function($scope, $rootScope, $sce, $http) {
|
4 | 5 | ^angular_objects^
|
5 | 6 |
|
|
18 | 19 | }
|
19 | 20 | $scope.homePageSettings.page_media = media;
|
20 | 21 |
|
21 |
| - var wysId = $('.wysiwyg').attr('id').substring('wysiwg_'.length + 1); |
22 |
| - getWYSIWYGLayout(wysId, function(layout) { |
23 |
| - $scope.homePageSettings.page_layout = layout; |
| 22 | + $scope.homePageSettings.page_layout = $scope.layout; |
24 | 23 |
|
25 |
| - $scope.saving = true; |
| 24 | + $scope.saving = true; |
26 | 25 |
|
27 |
| - $http.post('/actions/admin/plugins/settings/portfolio/home_page', $scope.homePageSettings) |
28 |
| - .success(function(result) { |
29 |
| - $scope.successMessage = result.message; |
30 |
| - $scope.saving = false; |
31 |
| - }) |
32 |
| - .error(function(error, status) { |
33 |
| - $scope.errorMessage = error.message; |
34 |
| - $scope.saving = false; |
35 |
| - }); |
| 26 | + $http.post('/actions/admin/plugins/settings/portfolio/home_page', $scope.homePageSettings) |
| 27 | + .success(function(result) { |
| 28 | + $scope.successMessage = result.message; |
| 29 | + $scope.saving = false; |
| 30 | + }) |
| 31 | + .error(function(error, status) { |
| 32 | + $scope.errorMessage = error.message; |
| 33 | + $scope.saving = false; |
36 | 34 | });
|
37 | 35 | };
|
38 | 36 | });
|
|
0 commit comments