Commit 39a5fc2d631e68de1a4c276630aff3e4d197975a
Exists in
master
and in
26 other branches
Merge branch 'master' of softwarepublico.gov.br:noosfero-themes/angular-theme
Showing
7 changed files
with
26 additions
and
10 deletions
Show diff stats
bower.json
@@ -35,13 +35,13 @@ | @@ -35,13 +35,13 @@ | ||
35 | "angular-i18n": "^1.5.0", | 35 | "angular-i18n": "^1.5.0", |
36 | "angular-load": "^0.4.1", | 36 | "angular-load": "^0.4.1", |
37 | "angular-translate-interpolation-messageformat": "^2.10.0", | 37 | "angular-translate-interpolation-messageformat": "^2.10.0", |
38 | - "angular-bind-html-compile": "^1.2.1", | ||
39 | - "angular-click-outside": "^2.7.1", | ||
40 | - "ng-ckeditor": "^0.2.1", | ||
41 | - "ckeditor": "^4.5.8" | 38 | + "angular-bind-html-compile": "^1.2.1", |
39 | + "angular-click-outside": "^2.7.1" | ||
42 | }, | 40 | }, |
43 | "devDependencies": { | 41 | "devDependencies": { |
44 | - "angular-mocks": "~1.5.0" | 42 | + "angular-mocks": "~1.5.0", |
43 | + "ng-ckeditor": "^0.2.1", | ||
44 | + "ckeditor": "^4.5.8" | ||
45 | }, | 45 | }, |
46 | "overrides": { | 46 | "overrides": { |
47 | "bootstrap-sass": { | 47 | "bootstrap-sass": { |
gulp/build.js
@@ -80,6 +80,8 @@ gulp.task('html', ['inject', 'partials'], function () { | @@ -80,6 +80,8 @@ gulp.task('html', ['inject', 'partials'], function () { | ||
80 | .pipe($.useref()) | 80 | .pipe($.useref()) |
81 | .pipe($.revReplace({prefix: noosferoThemePrefix})) | 81 | .pipe($.revReplace({prefix: noosferoThemePrefix})) |
82 | .pipe(htmlFilter) | 82 | .pipe(htmlFilter) |
83 | + .pipe($.replace('/bower_components/ng-ckeditor/libs/ckeditor/', noosferoThemePrefix + 'ng-ckeditor/libs/ckeditor/')) | ||
84 | + .pipe($.replace('/bower_components/ng-ckeditor/ng-ckeditor.min.js', noosferoThemePrefix + 'ng-ckeditor/ng-ckeditor.min.js')) | ||
83 | .pipe($.minifyHtml({ | 85 | .pipe($.minifyHtml({ |
84 | empty: true, | 86 | empty: true, |
85 | spare: true, | 87 | spare: true, |
@@ -100,6 +102,10 @@ gulp.task('fonts', function () { | @@ -100,6 +102,10 @@ gulp.task('fonts', function () { | ||
100 | .pipe(gulp.dest(path.join(conf.paths.dist, '/fonts/'))); | 102 | .pipe(gulp.dest(path.join(conf.paths.dist, '/fonts/'))); |
101 | }); | 103 | }); |
102 | 104 | ||
105 | +gulp.task('ckeditor', function () { | ||
106 | + return gulp.src(['bower_components/ng-ckeditor/**/*']).pipe(gulp.dest(path.join(conf.paths.dist, '/ng-ckeditor'))); | ||
107 | +}); | ||
108 | + | ||
103 | gulp.task('locale', function () { | 109 | gulp.task('locale', function () { |
104 | return gulp.src([ | 110 | return gulp.src([ |
105 | path.join("bower_components/angular-i18n", '*.js'), | 111 | path.join("bower_components/angular-i18n", '*.js'), |
@@ -147,4 +153,4 @@ gulp.task('noosfero', ['html'], function () { | @@ -147,4 +153,4 @@ gulp.task('noosfero', ['html'], function () { | ||
147 | return merge(layouts, theme, index); | 153 | return merge(layouts, theme, index); |
148 | }); | 154 | }); |
149 | 155 | ||
150 | -gulp.task('build', ['html', 'fonts', 'other', 'locale', 'plugin-languages', 'noosfero']); | 156 | +gulp.task('build', ['html', 'fonts', 'other', 'locale', 'ckeditor', 'plugin-languages', 'noosfero']); |
gulp/conf.js
@@ -36,7 +36,7 @@ exports.configTheme(argv.theme); | @@ -36,7 +36,7 @@ exports.configTheme(argv.theme); | ||
36 | * to inject css preprocessor deps and js files in karma | 36 | * to inject css preprocessor deps and js files in karma |
37 | */ | 37 | */ |
38 | exports.wiredep = { | 38 | exports.wiredep = { |
39 | - exclude: [/jquery/, /\/bootstrap\.js$/, /\/bootstrap-sass\/.*\.js/, /\/bootstrap\.css/], | 39 | + exclude: [/jquery/, /\/bootstrap\.js$/, /\/bootstrap-sass\/.*\.js/, /\/bootstrap\.css/, /ckeditor/], |
40 | directory: 'bower_components' | 40 | directory: 'bower_components' |
41 | }; | 41 | }; |
42 | 42 |
src/app/layout/services/body-state-classes.service.spec.ts
@@ -152,7 +152,7 @@ describe("BodyStateClasses Service", () => { | @@ -152,7 +152,7 @@ describe("BodyStateClasses Service", () => { | ||
152 | it("add a css class to content wrapper element", () => { | 152 | it("add a css class to content wrapper element", () => { |
153 | let service = getService(); | 153 | let service = getService(); |
154 | 154 | ||
155 | - let contentWrapperMock = jasmine.createSpyObj("contentWrapperMock", ["addClass", "removeClass"]) | 155 | + let contentWrapperMock = jasmine.createSpyObj("contentWrapperMock", ["addClass", "removeClass"]); |
156 | service["getContentWrapper"] = jasmine.createSpy("getContentWrapper").and.returnValue(contentWrapperMock); | 156 | service["getContentWrapper"] = jasmine.createSpy("getContentWrapper").and.returnValue(contentWrapperMock); |
157 | service.addContentClass(true); | 157 | service.addContentClass(true); |
158 | 158 | ||
@@ -162,7 +162,7 @@ describe("BodyStateClasses Service", () => { | @@ -162,7 +162,7 @@ describe("BodyStateClasses Service", () => { | ||
162 | it("remove a css class from content wrapper element", () => { | 162 | it("remove a css class from content wrapper element", () => { |
163 | let service = getService(); | 163 | let service = getService(); |
164 | 164 | ||
165 | - let contentWrapperMock = jasmine.createSpyObj("contentWrapperMock", ["addClass", "removeClass"]) | 165 | + let contentWrapperMock = jasmine.createSpyObj("contentWrapperMock", ["addClass", "removeClass"]); |
166 | service["getContentWrapper"] = jasmine.createSpy("getContentWrapper").and.returnValue(contentWrapperMock); | 166 | service["getContentWrapper"] = jasmine.createSpy("getContentWrapper").and.returnValue(contentWrapperMock); |
167 | service.addContentClass(false); | 167 | service.addContentClass(false); |
168 | 168 |
src/index.html
@@ -27,6 +27,10 @@ | @@ -27,6 +27,10 @@ | ||
27 | 27 | ||
28 | <div ui-view></div> | 28 | <div ui-view></div> |
29 | 29 | ||
30 | + <script> | ||
31 | + CKEDITOR_BASEPATH='/bower_components/ng-ckeditor/libs/ckeditor/'; | ||
32 | + </script> | ||
33 | + | ||
30 | <!-- build:js(src) scripts/vendor.js --> | 34 | <!-- build:js(src) scripts/vendor.js --> |
31 | <!-- bower:js --> | 35 | <!-- bower:js --> |
32 | <!-- run `gulp inject` to automatically populate bower script dependencies --> | 36 | <!-- run `gulp inject` to automatically populate bower script dependencies --> |
@@ -42,5 +46,7 @@ | @@ -42,5 +46,7 @@ | ||
42 | <!-- endinject --> | 46 | <!-- endinject --> |
43 | <!-- endbuild --> | 47 | <!-- endbuild --> |
44 | 48 | ||
49 | + <script src="/bower_components/ng-ckeditor/libs/ckeditor/ckeditor.js"></script> | ||
50 | + <script src="/bower_components/ng-ckeditor/ng-ckeditor.min.js"></script> | ||
45 | </body> | 51 | </body> |
46 | </html> | 52 | </html> |
src/plugins/comment_paragraph/hotspot/article-content/article-content.component.ts
@@ -9,4 +9,8 @@ import {Hotspot} from "../../../../app/hotspot/hotspot.decorator"; | @@ -9,4 +9,8 @@ import {Hotspot} from "../../../../app/hotspot/hotspot.decorator"; | ||
9 | export class CommentParagraphArticleContentHotspotComponent { | 9 | export class CommentParagraphArticleContentHotspotComponent { |
10 | 10 | ||
11 | @Input() article: noosfero.Article; | 11 | @Input() article: noosfero.Article; |
12 | + | ||
13 | + isDiscussion() { | ||
14 | + return this.article.type === "CommentParagraphPlugin::Discussion"; | ||
15 | + } | ||
12 | } | 16 | } |
src/plugins/comment_paragraph/hotspot/article-content/article-content.html
1 | -<div class="discussion-header"> | 1 | +<div class="discussion-header" ng-if="ctrl.isDiscussion()"> |
2 | <span class="description">{{"comment-paragraph-plugin.discussion.header" | translate}}</span> | 2 | <span class="description">{{"comment-paragraph-plugin.discussion.header" | translate}}</span> |
3 | <span class="start-date date" ng-if="ctrl.article.start_date"> | 3 | <span class="start-date date" ng-if="ctrl.article.start_date"> |
4 | <span class="description">{{"comment-paragraph-plugin.discussion.editor.start_date.label" | translate}}</span> | 4 | <span class="description">{{"comment-paragraph-plugin.discussion.editor.start_date.label" | translate}}</span> |