Commit 6a66f44b539e2d7b53bbfe6f03977360cb87782a

Authored by Ábner Oliveira
2 parents dc8c43fd 63a0a102

Merge branch 'master' of softwarepublico.gov.br:noosfero-themes/angular-theme

@@ -46,9 +46,7 @@ @@ -46,9 +46,7 @@
46 "ng-ckeditor": { 46 "ng-ckeditor": {
47 "main": [ 47 "main": [
48 "ng-ckeditor.js", 48 "ng-ckeditor.js",
49 - "libs/ckeditor/lang",  
50 - "libs/ckeditor/ckeditor.js",  
51 - "libs/ckeditor/config.js" 49 + "libs/ckeditor/ckeditor.js"
52 ] 50 ]
53 }, 51 },
54 "bootstrap-sass": { 52 "bootstrap-sass": {
@@ -30,7 +30,8 @@ gulp.task('partials', function () { @@ -30,7 +30,8 @@ gulp.task('partials', function () {
30 quotes: true 30 quotes: true
31 })) 31 }))
32 .pipe($.angularTemplatecache('templateCacheHtml-'+partialPath+'.js', { 32 .pipe($.angularTemplatecache('templateCacheHtml-'+partialPath+'.js', {
33 - module: 'noosferoApp', 33 + module: 'noosfero.templates.' + partialPath,
  34 + standalone: true,
34 root: partialPath 35 root: partialPath
35 })) 36 }))
36 .pipe(gulp.dest(conf.paths.tmp + '/partials/'))); 37 .pipe(gulp.dest(conf.paths.tmp + '/partials/')));
@@ -81,7 +82,6 @@ gulp.task('html', ['inject', 'partials'], function () { @@ -81,7 +82,6 @@ gulp.task('html', ['inject', 'partials'], function () {
81 .pipe($.revReplace({prefix: noosferoThemePrefix})) 82 .pipe($.revReplace({prefix: noosferoThemePrefix}))
82 .pipe(htmlFilter) 83 .pipe(htmlFilter)
83 .pipe($.replace('/bower_components/ng-ckeditor/libs/ckeditor/', noosferoThemePrefix + 'ng-ckeditor/libs/ckeditor/')) 84 .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'))  
85 .pipe($.minifyHtml({ 85 .pipe($.minifyHtml({
86 empty: true, 86 empty: true,
87 spare: true, 87 spare: true,
@@ -103,7 +103,7 @@ gulp.task('fonts', function () { @@ -103,7 +103,7 @@ gulp.task('fonts', function () {
103 }); 103 });
104 104
105 gulp.task('ckeditor', function () { 105 gulp.task('ckeditor', function () {
106 - conf.wiredep.exclude.push(/ckeditor/); // exclude ckeditor from build to improve performance 106 + conf.wiredep.exclude.push(/bower_components\/ng-ckeditor\/libs\/ckeditor/); // exclude ckeditor from build to improve performance
107 return gulp.src(['bower_components/ng-ckeditor/**/*']).pipe(gulp.dest(path.join(conf.paths.dist, '/ng-ckeditor'))); 107 return gulp.src(['bower_components/ng-ckeditor/**/*']).pipe(gulp.dest(path.join(conf.paths.dist, '/ng-ckeditor')));
108 }); 108 });
109 109
src/app/index.ts
@@ -6,7 +6,19 @@ import {AuthEvents} from "./login/auth-events"; @@ -6,7 +6,19 @@ import {AuthEvents} from "./login/auth-events";
6 6
7 declare var moment: any; 7 declare var moment: any;
8 8
9 -angular.module('noosfero.init', []).config(noosferoModuleConfig). 9 +//FIXME see a better way to declare template modules for dev mode
  10 +try {
  11 + angular.module('noosfero.templates.app');
  12 +} catch (error) {
  13 + angular.module('noosfero.templates.app', []);
  14 +}
  15 +try {
  16 + angular.module('noosfero.templates.plugins');
  17 +} catch (error) {
  18 + angular.module('noosfero.templates.plugins', []);
  19 +}
  20 +angular.module('noosfero.init', ['noosfero.templates.app', 'noosfero.templates.plugins']).
  21 + config(noosferoModuleConfig).
10 run(noosferoAngularRunBlock). 22 run(noosferoAngularRunBlock).
11 constant("moment", moment). 23 constant("moment", moment).
12 constant("AuthEvents", AuthEvents); 24 constant("AuthEvents", AuthEvents);
src/index.html
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
30 <script> 30 <script>
31 CKEDITOR_BASEPATH='/bower_components/ng-ckeditor/libs/ckeditor/'; 31 CKEDITOR_BASEPATH='/bower_components/ng-ckeditor/libs/ckeditor/';
32 </script> 32 </script>
  33 + <script src="/bower_components/ng-ckeditor/libs/ckeditor/ckeditor.js"></script>
33 34
34 <!-- build:js(src) scripts/vendor.js --> 35 <!-- build:js(src) scripts/vendor.js -->
35 <!-- bower:js --> 36 <!-- bower:js -->
@@ -38,15 +39,12 @@ @@ -38,15 +39,12 @@
38 <!-- endbuild --> 39 <!-- endbuild -->
39 40
40 <!-- build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js --> 41 <!-- build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js -->
41 - <script src="commons.js"></script>  
42 - <script src="vendor.bundle.js"></script>  
43 - <script src="noosfero.js"></script>  
44 <!-- inject:partials --> 42 <!-- inject:partials -->
45 <!-- angular templates will be automatically converted in js and inserted here --> 43 <!-- angular templates will be automatically converted in js and inserted here -->
46 <!-- endinject --> 44 <!-- endinject -->
  45 + <script src="commons.js"></script>
  46 + <script src="vendor.bundle.js"></script>
  47 + <script src="noosfero.js"></script>
47 <!-- endbuild --> 48 <!-- endbuild -->
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>  
51 </body> 49 </body>
52 </html> 50 </html>