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 | 35 | "angular-i18n": "^1.5.0", |
36 | 36 | "angular-load": "^0.4.1", |
37 | 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 | 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 | 46 | "overrides": { |
47 | 47 | "bootstrap-sass": { | ... | ... |
gulp/build.js
... | ... | @@ -80,6 +80,8 @@ gulp.task('html', ['inject', 'partials'], function () { |
80 | 80 | .pipe($.useref()) |
81 | 81 | .pipe($.revReplace({prefix: noosferoThemePrefix})) |
82 | 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 | 85 | .pipe($.minifyHtml({ |
84 | 86 | empty: true, |
85 | 87 | spare: true, |
... | ... | @@ -100,6 +102,10 @@ gulp.task('fonts', function () { |
100 | 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 | 109 | gulp.task('locale', function () { |
104 | 110 | return gulp.src([ |
105 | 111 | path.join("bower_components/angular-i18n", '*.js'), |
... | ... | @@ -147,4 +153,4 @@ gulp.task('noosfero', ['html'], function () { |
147 | 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 | 36 | * to inject css preprocessor deps and js files in karma |
37 | 37 | */ |
38 | 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 | 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 | 152 | it("add a css class to content wrapper element", () => { |
153 | 153 | let service = getService(); |
154 | 154 | |
155 | - let contentWrapperMock = jasmine.createSpyObj("contentWrapperMock", ["addClass", "removeClass"]) | |
155 | + let contentWrapperMock = jasmine.createSpyObj("contentWrapperMock", ["addClass", "removeClass"]); | |
156 | 156 | service["getContentWrapper"] = jasmine.createSpy("getContentWrapper").and.returnValue(contentWrapperMock); |
157 | 157 | service.addContentClass(true); |
158 | 158 | |
... | ... | @@ -162,7 +162,7 @@ describe("BodyStateClasses Service", () => { |
162 | 162 | it("remove a css class from content wrapper element", () => { |
163 | 163 | let service = getService(); |
164 | 164 | |
165 | - let contentWrapperMock = jasmine.createSpyObj("contentWrapperMock", ["addClass", "removeClass"]) | |
165 | + let contentWrapperMock = jasmine.createSpyObj("contentWrapperMock", ["addClass", "removeClass"]); | |
166 | 166 | service["getContentWrapper"] = jasmine.createSpy("getContentWrapper").and.returnValue(contentWrapperMock); |
167 | 167 | service.addContentClass(false); |
168 | 168 | ... | ... |
src/index.html
... | ... | @@ -27,6 +27,10 @@ |
27 | 27 | |
28 | 28 | <div ui-view></div> |
29 | 29 | |
30 | + <script> | |
31 | + CKEDITOR_BASEPATH='/bower_components/ng-ckeditor/libs/ckeditor/'; | |
32 | + </script> | |
33 | + | |
30 | 34 | <!-- build:js(src) scripts/vendor.js --> |
31 | 35 | <!-- bower:js --> |
32 | 36 | <!-- run `gulp inject` to automatically populate bower script dependencies --> |
... | ... | @@ -42,5 +46,7 @@ |
42 | 46 | <!-- endinject --> |
43 | 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 | 51 | </body> |
46 | 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 | 9 | export class CommentParagraphArticleContentHotspotComponent { |
10 | 10 | |
11 | 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 | 2 | <span class="description">{{"comment-paragraph-plugin.discussion.header" | translate}}</span> |
3 | 3 | <span class="start-date date" ng-if="ctrl.article.start_date"> |
4 | 4 | <span class="description">{{"comment-paragraph-plugin.discussion.editor.start_date.label" | translate}}</span> | ... | ... |