Skip to content

Commit c62de06

Browse files
committed
Merge pull request #6 from pencilblue/0.4.1
upgrade to 0.4.1 wysiwyg
2 parents 0694957 + 4425bd5 commit c62de06

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

templates/admin/settings/home_page_settings.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
</div>
1919
<div class="form-group">
2020
<label>^loc_CONTENT^&nbsp;<span id="column_inches"></span></label>
21-
<div id="page_wysiwyg">
22-
^wysiwyg^
23-
</div>
21+
<wysiwyg layout="layout" media="homePageSettings.page_media"></wysiwyg>
2422
</div>
2523
</div>
2624
<div class="tab-pane" id="media">
@@ -37,5 +35,6 @@
3735

3836
</div>
3937
</div>
38+
^tmp_admin=elements=wysiwyg_scripts^
4039
^tmp_angular=admin=settings=home_page_settings^
4140
^tmp_admin=footer^

templates/angular/admin/settings/home_page_settings.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
<script type="text/javascript" src="/js/angular/directives/wysiwyg.js"></script>
12
<script type="text/javascript">
2-
angular.module('pencilblueApp', ['uploadPhoto', 'inlineMedia'])
3+
angular.module('pencilblueApp', ['wysiwygElement', 'uploadPhoto', 'inlineMedia'])
34
.controller('PencilBlueController', function($scope, $rootScope, $sce, $http) {
45
^angular_objects^
56

@@ -18,21 +19,18 @@
1819
}
1920
$scope.homePageSettings.page_media = media;
2021

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;
2423

25-
$scope.saving = true;
24+
$scope.saving = true;
2625

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;
3634
});
3735
};
3836
});

0 commit comments

Comments
 (0)