diff --git a/Gruntfile.js b/Gruntfile.js index d9bddce..6f66565 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,685 +1,686 @@ // Generated on 2015-06-18 using generator-angular-fullstack 2.0.13 'use strict'; module.exports = function (grunt) { var localConfig; try { localConfig = require('./server/config/local.env'); } catch(e) { localConfig = {}; } // Load grunt tasks automatically, when needed require('jit-grunt')(grunt, { express: 'grunt-express-server', useminPrepare: 'grunt-usemin', ngtemplates: 'grunt-angular-templates', protractor: 'grunt-protractor-runner', injector: 'grunt-asset-injector', buildcontrol: 'grunt-build-control' }); // Time how long tasks take. Can help when optimizing build times require('time-grunt')(grunt); // Define the configuration for all the tasks grunt.initConfig({ // Project settings pkg: grunt.file.readJSON('package.json'), yeoman: { // configurable paths client: require('./bower.json').appPath || 'client', dist: 'dist' }, express: { options: { port: process.env.PORT || 9000 }, dev: { options: { script: 'server/app.js', debug: true } }, prod: { options: { script: 'dist/server/app.js' } } }, open: { server: { url: 'http://localhost:<%= express.options.port %>' } }, watch: { injectJS: { files: [ '<%= yeoman.client %>/{app,components}/**/*.js', '!<%= yeoman.client %>/{app,components}/**/*.spec.js', '!<%= yeoman.client %>/{app,components}/**/*.mock.js', '!<%= yeoman.client %>/app/app.js'], tasks: ['injector:scripts'] }, injectCss: { files: [ '<%= yeoman.client %>/{app,components}/**/*.css' ], tasks: ['injector:css'] }, mochaTest: { files: ['server/**/*.spec.js'], tasks: ['env:test', 'mochaTest'] }, jsTest: { files: [ '<%= yeoman.client %>/{app,components}/**/*.spec.js', '<%= yeoman.client %>/{app,components}/**/*.mock.js' ], tasks: ['newer:jshint:all', 'karma'] }, injectStylus: { files: [ '<%= yeoman.client %>/{app,components}/**/*.styl'], tasks: ['injector:stylus'] }, stylus: { files: [ '<%= yeoman.client %>/{app,components}/**/*.styl'], tasks: ['stylus', 'autoprefixer'] }, jade: { files: [ '<%= yeoman.client %>/{app,components}/*', '<%= yeoman.client %>/{app,components}/**/*.jade'], tasks: ['jade'] }, gruntfile: { files: ['Gruntfile.js'] }, livereload: { files: [ '{.tmp,<%= yeoman.client %>}/{app,components}/**/*.css', '{.tmp,<%= yeoman.client %>}/{app,components}/**/*.html', '{.tmp,<%= yeoman.client %>}/{app,components}/**/*.js', '!{.tmp,<%= yeoman.client %>}{app,components}/**/*.spec.js', '!{.tmp,<%= yeoman.client %>}/{app,components}/**/*.mock.js', '<%= yeoman.client %>/assets/images/{,*//*}*.{png,jpg,jpeg,gif,webp,svg}' ], options: { livereload: true } }, express: { files: [ 'server/**/*.{js,json}' ], tasks: ['express:dev', 'wait'], options: { livereload: true, nospawn: true //Without this option specified express won't be reloaded } } }, // Make sure code styles are up to par and there are no obvious mistakes jshint: { options: { jshintrc: '<%= yeoman.client %>/.jshintrc', reporter: require('jshint-stylish') }, server: { options: { jshintrc: 'server/.jshintrc' }, src: [ 'server/**/*.js', '!server/**/*.spec.js' ] }, serverTest: { options: { jshintrc: 'server/.jshintrc-spec' }, src: ['server/**/*.spec.js'] }, all: [ '<%= yeoman.client %>/{app,components}/**/*.js', '!<%= yeoman.client %>/{app,components}/**/*.spec.js', '!<%= yeoman.client %>/{app,components}/**/*.mock.js' ], test: { src: [ '<%= yeoman.client %>/{app,components}/**/*.spec.js', '<%= yeoman.client %>/{app,components}/**/*.mock.js' ] } }, // Empties folders to start fresh clean: { dist: { files: [{ dot: true, src: [ '.tmp', '<%= yeoman.dist %>/*', '!<%= yeoman.dist %>/.git*', '!<%= yeoman.dist %>/.openshift', '!<%= yeoman.dist %>/Procfile' ] }] }, server: '.tmp' }, // Add vendor prefixed styles autoprefixer: { options: { browsers: ['last 1 version'] }, dist: { files: [{ expand: true, cwd: '.tmp/', src: '{,*/}*.css', dest: '.tmp/' }] } }, // Debugging with node inspector 'node-inspector': { custom: { options: { 'web-host': 'localhost' } } }, // Use nodemon to run server in debug mode with an initial breakpoint nodemon: { debug: { script: 'server/app.js', options: { nodeArgs: ['--debug-brk'], env: { PORT: process.env.PORT || 9000 }, callback: function (nodemon) { nodemon.on('log', function (event) { console.log(event.colour); }); // opens browser on initial server start nodemon.on('config:update', function () { setTimeout(function () { require('open')('http://localhost:8080/debug?port=5858'); }, 500); }); } } } }, // Automatically inject Bower components into the app wiredep: { target: { src: '<%= yeoman.client %>/index.html', ignorePath: '<%= yeoman.client %>/', exclude: [/bootstrap-sass-official/, /bootstrap.js/, '/json3/', '/es5-shim/', /bootstrap.css/, /font-awesome.css/ ] } }, // Renames files for browser caching purposes filerev: { dist: { src: [ '<%= yeoman.dist %>/public/{,*/}*.js', '<%= yeoman.dist %>/public/{,*/}*.css', '<%= yeoman.dist %>/public/assets/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}', '<%= yeoman.dist %>/public/assets/fonts/*' ] } }, // Reads HTML for usemin blocks to enable smart builds that automatically // concat, minify and revision files. Creates configurations in memory so // additional tasks can operate on them useminPrepare: { html: ['<%= yeoman.client %>/index.html'], options: { dest: '<%= yeoman.dist %>/public' } }, // Performs rewrites based on rev and the useminPrepare configuration usemin: { html: ['<%= yeoman.dist %>/public/{,*/}*.html'], css: ['<%= yeoman.dist %>/public/{,*/}*.css'], js: ['<%= yeoman.dist %>/public/{,*/}*.js'], options: { assetsDirs: [ '<%= yeoman.dist %>/public', '<%= yeoman.dist %>/public/assets/images' ], // This is so we update image references in our ng-templates patterns: { js: [ [/(assets\/images\/.*?\.(?:gif|jpeg|jpg|png|webp|svg))/gm, 'Update the JS to reference our revved images'] ] } } }, // The following *-min tasks produce minified files in the dist folder imagemin: { dist: { files: [{ expand: true, cwd: '<%= yeoman.client %>/assets/images', src: '{,*/}*.{png,jpg,jpeg,gif}', dest: '<%= yeoman.dist %>/public/assets/images' }] } }, svgmin: { dist: { files: [{ expand: true, cwd: '<%= yeoman.client %>/assets/images', src: '{,*/}*.svg', dest: '<%= yeoman.dist %>/public/assets/images' }] } }, // Allow the use of non-minsafe AngularJS files. Automatically makes it // minsafe compatible so Uglify does not destroy the ng references ngAnnotate: { dist: { files: [{ expand: true, cwd: '.tmp/concat', src: '*/**.js', dest: '.tmp/concat' }] } }, // Package all the html partials into a single javascript payload ngtemplates: { options: { // This should be the name of your apps angular module module: 'manticoreApp', htmlmin: { collapseBooleanAttributes: true, collapseWhitespace: true, removeAttributeQuotes: true, removeEmptyAttributes: true, removeRedundantAttributes: true, removeScriptTypeAttributes: true, removeStyleLinkTypeAttributes: true }, usemin: 'app/app.js' }, main: { cwd: '<%= yeoman.client %>', src: ['{app,components}/**/*.html'], dest: '.tmp/templates.js' }, tmp: { cwd: '.tmp', src: ['{app,components}/**/*.html'], dest: '.tmp/tmp-templates.js' } }, // Copies remaining files to places other tasks can use copy: { dist: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.client %>', dest: '<%= yeoman.dist %>/public', src: [ '*.{ico,png,txt}', '.htaccess', 'bower_components/**/*', 'assets/images/{,*/}*.{webp}', 'assets/fonts/**/*', + 'assets/bundled/**/*', 'index.html' ] }, { expand: true, cwd: '.tmp/images', dest: '<%= yeoman.dist %>/public/assets/images', src: ['generated/*'] }, { expand: true, dest: '<%= yeoman.dist %>', src: [ 'package.json', 'server/**/*' ] }] }, styles: { expand: true, cwd: '<%= yeoman.client %>', dest: '.tmp/', src: ['{app,components}/**/*.css'] } }, buildcontrol: { options: { dir: 'dist', commit: true, push: true, connectCommits: false, message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%' }, heroku: { options: { remote: 'heroku', branch: 'master' } }, openshift: { options: { remote: 'openshift', branch: 'master' } } }, // Run some tasks in parallel to speed up the build process concurrent: { server: [ 'jade', 'stylus', ], test: [ 'jade', 'stylus', ], debug: { tasks: [ 'nodemon', 'node-inspector' ], options: { logConcurrentOutput: true } }, dist: [ 'jade', 'stylus', 'imagemin', 'svgmin' ] }, // Test settings karma: { unit: { configFile: 'karma.conf.js', singleRun: true } }, mochaTest: { options: { reporter: 'spec' }, src: ['server/**/*.spec.js'] }, protractor: { options: { configFile: 'protractor.conf.js' }, chrome: { options: { args: { browser: 'chrome' } } } }, env: { test: { NODE_ENV: 'test' }, prod: { NODE_ENV: 'production' }, all: localConfig }, // Compiles Jade to html jade: { compile: { options: { data: { debug: false } }, files: [{ expand: true, cwd: '<%= yeoman.client %>', src: [ '{app,components}/**/*.jade' ], dest: '.tmp', ext: '.html' }] } }, // Compiles Stylus to CSS stylus: { server: { options: { paths: [ '<%= yeoman.client %>/bower_components', '<%= yeoman.client %>/app', '<%= yeoman.client %>/components' ], "include css": true }, files: { '.tmp/app/app.css' : '<%= yeoman.client %>/app/app.styl' } } }, injector: { options: { }, // Inject application script files into index.html (doesn't include bower) scripts: { options: { transform: function(filePath) { filePath = filePath.replace('/client/', ''); filePath = filePath.replace('/.tmp/', ''); return ''; }, starttag: '', endtag: '' }, files: { '<%= yeoman.client %>/index.html': [ ['{.tmp,<%= yeoman.client %>}/{app,components}/**/*.js', '!{.tmp,<%= yeoman.client %>}/app/app.js', '!{.tmp,<%= yeoman.client %>}/{app,components}/**/*.spec.js', '!{.tmp,<%= yeoman.client %>}/{app,components}/**/*.mock.js'] ] } }, // Inject component styl into app.styl stylus: { options: { transform: function(filePath) { filePath = filePath.replace('/client/app/', ''); filePath = filePath.replace('/client/components/', ''); return '@import \'' + filePath + '\';'; }, starttag: '// injector', endtag: '// endinjector' }, files: { '<%= yeoman.client %>/app/app.styl': [ '<%= yeoman.client %>/{app,components}/**/*.styl', '!<%= yeoman.client %>/app/app.styl' ] } }, // Inject component css into index.html css: { options: { transform: function(filePath) { filePath = filePath.replace('/client/', ''); filePath = filePath.replace('/.tmp/', ''); return ''; }, starttag: '', endtag: '' }, files: { '<%= yeoman.client %>/index.html': [ '<%= yeoman.client %>/{app,components}/**/*.css' ] } } }, }); // Used for delaying livereload until after server has restarted grunt.registerTask('wait', function () { grunt.log.ok('Waiting for server reload...'); var done = this.async(); setTimeout(function () { grunt.log.writeln('Done waiting!'); done(); }, 1500); }); grunt.registerTask('express-keepalive', 'Keep grunt running', function() { this.async(); }); grunt.registerTask('serve', function (target) { if (target === 'dist') { return grunt.task.run(['build', 'env:all', 'env:prod', 'express:prod', 'wait', 'open', 'express-keepalive']); } if (target === 'debug') { return grunt.task.run([ 'clean:server', 'env:all', 'injector:stylus', 'concurrent:server', 'injector', 'wiredep', 'autoprefixer', 'concurrent:debug' ]); } grunt.task.run([ 'clean:server', 'env:all', 'injector:stylus', 'concurrent:server', 'injector', 'wiredep', 'autoprefixer', 'express:dev', 'wait', 'open', 'watch' ]); }); grunt.registerTask('server', function () { grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.'); grunt.task.run(['serve']); }); grunt.registerTask('test', function(target) { if (target === 'server') { return grunt.task.run([ 'env:all', 'env:test', 'mochaTest' ]); } else if (target === 'client') { return grunt.task.run([ 'clean:server', 'env:all', 'injector:stylus', 'concurrent:test', 'injector', 'autoprefixer', 'karma' ]); } else if (target === 'e2e') { return grunt.task.run([ 'clean:server', 'env:all', 'env:test', 'injector:stylus', 'concurrent:test', 'injector', 'wiredep', 'autoprefixer', 'express:dev', 'protractor' ]); } else grunt.task.run([ 'test:server', 'test:client' ]); }); grunt.registerTask('build', [ 'clean:dist', 'injector:stylus', 'concurrent:dist', 'injector', 'wiredep', 'useminPrepare', 'autoprefixer', 'ngtemplates', 'concat', 'ngAnnotate', 'copy:dist', 'cssmin', 'uglify', 'filerev', 'usemin' ]); grunt.registerTask('default', [ 'newer:jshint', 'test', 'build' ]); }; diff --git a/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Bold.ttf b/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Bold.ttf new file mode 100644 index 0000000..985bd40 Binary files /dev/null and b/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Bold.ttf differ diff --git a/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-BoldItalic.ttf b/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-BoldItalic.ttf new file mode 100644 index 0000000..838f2d1 Binary files /dev/null and b/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-BoldItalic.ttf differ diff --git a/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Italic.ttf b/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Italic.ttf new file mode 100644 index 0000000..43505c1 Binary files /dev/null and b/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Italic.ttf differ diff --git a/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Regular.ttf b/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Regular.ttf new file mode 100644 index 0000000..06aafc0 Binary files /dev/null and b/client/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Regular.ttf differ diff --git a/client/assets/bundled/fonts/Anonymous_Pro/OFL.txt b/client/assets/bundled/fonts/Anonymous_Pro/OFL.txt new file mode 100644 index 0000000..5e8b738 --- /dev/null +++ b/client/assets/bundled/fonts/Anonymous_Pro/OFL.txt @@ -0,0 +1,93 @@ +Copyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), +with Reserved Font Name Anonymous Pro. +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/client/assets/bundled/fonts/Arvo/Arvo-Bold.ttf b/client/assets/bundled/fonts/Arvo/Arvo-Bold.ttf new file mode 100644 index 0000000..97b203e Binary files /dev/null and b/client/assets/bundled/fonts/Arvo/Arvo-Bold.ttf differ diff --git a/client/assets/bundled/fonts/Arvo/Arvo-BoldItalic.ttf b/client/assets/bundled/fonts/Arvo/Arvo-BoldItalic.ttf new file mode 100644 index 0000000..63f146a Binary files /dev/null and b/client/assets/bundled/fonts/Arvo/Arvo-BoldItalic.ttf differ diff --git a/client/assets/bundled/fonts/Arvo/Arvo-Italic.ttf b/client/assets/bundled/fonts/Arvo/Arvo-Italic.ttf new file mode 100644 index 0000000..506441f Binary files /dev/null and b/client/assets/bundled/fonts/Arvo/Arvo-Italic.ttf differ diff --git a/client/assets/bundled/fonts/Arvo/Arvo-Regular.ttf b/client/assets/bundled/fonts/Arvo/Arvo-Regular.ttf new file mode 100644 index 0000000..0f09ea5 Binary files /dev/null and b/client/assets/bundled/fonts/Arvo/Arvo-Regular.ttf differ diff --git a/client/assets/bundled/fonts/Arvo/OFL.txt b/client/assets/bundled/fonts/Arvo/OFL.txt new file mode 100644 index 0000000..a7b65f5 --- /dev/null +++ b/client/assets/bundled/fonts/Arvo/OFL.txt @@ -0,0 +1,93 @@ +Copyright (c) 2010, Anton Koovit (), +with Reserved Font Name Arvo. +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/client/assets/bundled/fonts/Dancing_Script/DancingScript-Bold.ttf b/client/assets/bundled/fonts/Dancing_Script/DancingScript-Bold.ttf new file mode 100644 index 0000000..d502ef8 Binary files /dev/null and b/client/assets/bundled/fonts/Dancing_Script/DancingScript-Bold.ttf differ diff --git a/client/assets/bundled/fonts/Dancing_Script/DancingScript-Regular.ttf b/client/assets/bundled/fonts/Dancing_Script/DancingScript-Regular.ttf new file mode 100644 index 0000000..3fa27af Binary files /dev/null and b/client/assets/bundled/fonts/Dancing_Script/DancingScript-Regular.ttf differ diff --git a/client/assets/bundled/fonts/Dancing_Script/OFL.txt b/client/assets/bundled/fonts/Dancing_Script/OFL.txt new file mode 100644 index 0000000..3a73b07 --- /dev/null +++ b/client/assets/bundled/fonts/Dancing_Script/OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2010, Pablo Impallari (www.impallari.com|impallari@gmail.com), +Copyright (c) 2010, Igino Marini. (www.ikern.com|mail@iginomarini.com), +with Reserved Font Name Dancing Script. +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/client/assets/bundled/fonts/Lato/Lato-Bold.ttf b/client/assets/bundled/fonts/Lato/Lato-Bold.ttf new file mode 100644 index 0000000..7434369 Binary files /dev/null and b/client/assets/bundled/fonts/Lato/Lato-Bold.ttf differ diff --git a/client/assets/bundled/fonts/Lato/Lato-BoldItalic.ttf b/client/assets/bundled/fonts/Lato/Lato-BoldItalic.ttf new file mode 100644 index 0000000..684aacf Binary files /dev/null and b/client/assets/bundled/fonts/Lato/Lato-BoldItalic.ttf differ diff --git a/client/assets/bundled/fonts/Lato/Lato-Italic.ttf b/client/assets/bundled/fonts/Lato/Lato-Italic.ttf new file mode 100644 index 0000000..3d3b7a2 Binary files /dev/null and b/client/assets/bundled/fonts/Lato/Lato-Italic.ttf differ diff --git a/client/assets/bundled/fonts/Lato/Lato-Regular.ttf b/client/assets/bundled/fonts/Lato/Lato-Regular.ttf new file mode 100644 index 0000000..04ea8ef Binary files /dev/null and b/client/assets/bundled/fonts/Lato/Lato-Regular.ttf differ diff --git a/client/assets/bundled/fonts/Lato/OFL.txt b/client/assets/bundled/fonts/Lato/OFL.txt new file mode 100644 index 0000000..2e91bb3 --- /dev/null +++ b/client/assets/bundled/fonts/Lato/OFL.txt @@ -0,0 +1,92 @@ +Copyright (c) 2010-2014 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato" +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/client/assets/bundled/fonts/Liberation/LiberationMono-Bold.ttf b/client/assets/bundled/fonts/Liberation/LiberationMono-Bold.ttf new file mode 100644 index 0000000..d21a817 Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationMono-Bold.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationMono-BoldItalic.ttf b/client/assets/bundled/fonts/Liberation/LiberationMono-BoldItalic.ttf new file mode 100644 index 0000000..cf08881 Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationMono-BoldItalic.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationMono-Italic.ttf b/client/assets/bundled/fonts/Liberation/LiberationMono-Italic.ttf new file mode 100644 index 0000000..c17a1a0 Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationMono-Italic.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationMono-Regular.ttf b/client/assets/bundled/fonts/Liberation/LiberationMono-Regular.ttf new file mode 100644 index 0000000..690e112 Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationMono-Regular.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationSans-Bold.ttf b/client/assets/bundled/fonts/Liberation/LiberationSans-Bold.ttf new file mode 100644 index 0000000..e465dfb Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationSans-Bold.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationSans-BoldItalic.ttf b/client/assets/bundled/fonts/Liberation/LiberationSans-BoldItalic.ttf new file mode 100644 index 0000000..137e5f6 Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationSans-BoldItalic.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationSans-Italic.ttf b/client/assets/bundled/fonts/Liberation/LiberationSans-Italic.ttf new file mode 100644 index 0000000..1350186 Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationSans-Italic.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationSans-Regular.ttf b/client/assets/bundled/fonts/Liberation/LiberationSans-Regular.ttf new file mode 100644 index 0000000..22d57dd Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationSans-Regular.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationSerif-Bold.ttf b/client/assets/bundled/fonts/Liberation/LiberationSerif-Bold.ttf new file mode 100644 index 0000000..7570c1f Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationSerif-Bold.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationSerif-BoldItalic.ttf b/client/assets/bundled/fonts/Liberation/LiberationSerif-BoldItalic.ttf new file mode 100644 index 0000000..0524d47 Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationSerif-BoldItalic.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationSerif-Italic.ttf b/client/assets/bundled/fonts/Liberation/LiberationSerif-Italic.ttf new file mode 100644 index 0000000..9fa5c74 Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationSerif-Italic.ttf differ diff --git a/client/assets/bundled/fonts/Liberation/LiberationSerif-Regular.ttf b/client/assets/bundled/fonts/Liberation/LiberationSerif-Regular.ttf new file mode 100644 index 0000000..af00570 Binary files /dev/null and b/client/assets/bundled/fonts/Liberation/LiberationSerif-Regular.ttf differ diff --git a/client/assets/bundled/fonts/fonts.css b/client/assets/bundled/fonts/fonts.css new file mode 100644 index 0000000..5ec185c --- /dev/null +++ b/client/assets/bundled/fonts/fonts.css @@ -0,0 +1,156 @@ +@font-face { + font-family: 'Anonymous Pro'; + font-style: normal; + font-weight: 400; + src: local('Anonymous Pro'), local('AnonymousPro'), url('/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Regular.ttf') format('truetype'); +} +@font-face { + font-family: 'Anonymous Pro'; + font-style: normal; + font-weight: 700; + src: local('Anonymous Pro Bold'), local('AnonymousPro-Bold'), url('/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Bold.ttf') format('truetype'); +} +@font-face { + font-family: 'Anonymous Pro'; + font-style: italic; + font-weight: 400; + src: local('Anonymous Pro Italic'), local('AnonymousPro-Italic'), url('/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-Italic.ttf') format('truetype'); +} +@font-face { + font-family: 'Anonymous Pro'; + font-style: italic; + font-weight: 700; + src: local('Anonymous Pro Bold Italic'), local('AnonymousPro-BoldItalic'), url('/assets/bundled/fonts/Anonymous_Pro/AnonymousPro-BoldItalic.ttf') format('truetype'); +} +@font-face { + font-family: 'Arvo'; + font-style: normal; + font-weight: 400; + src: local('Arvo'), url('/assets/bundled/fonts/Arvo/Arvo-Regular.ttf') format('truetype'); +} +@font-face { + font-family: 'Arvo'; + font-style: normal; + font-weight: 700; + src: local('Arvo Bold'), local('Arvo-Bold'), url('/assets/bundled/fonts/Arvo/Arvo-Bold.ttf') format('truetype'); +} +@font-face { + font-family: 'Arvo'; + font-style: italic; + font-weight: 400; + src: local('Arvo Italic'), local('Arvo-Italic'), url('/assets/bundled/fonts/Arvo/Arvo-Italic.ttf') format('truetype'); +} +@font-face { + font-family: 'Arvo'; + font-style: italic; + font-weight: 700; + src: local('Arvo Bold Italic'), local('Arvo-BoldItalic'), url('/assets/bundled/fonts/Arvo/Arvo-BoldItalic.ttf') format('truetype'); +} +@font-face { + font-family: 'Dancing Script'; + font-style: normal; + font-weight: 400; + src: local('Dancing Script'), local('DancingScript'), url('/assets/bundled/fonts/Dancing_Script/DancingScript-Regular.ttf') format('truetype'); +} +@font-face { + font-family: 'Dancing Script'; + font-style: normal; + font-weight: 700; + src: local('Dancing Script Bold'), local('DancingScript-Bold'), url('/assets/bundled/fonts/Dancing_Script/DancingScript-Bold.ttf') format('truetype'); +} +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 400; + src: local('Lato Regular'), local('Lato-Regular'), url('/assets/bundled/fonts/Lato/Lato-Regular.ttf') format('truetype'); +} +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 700; + src: local('Lato Bold'), local('Lato-Bold'), url('/assets/bundled/fonts/Lato/Lato-Bold.ttf') format('truetype'); +} +@font-face { + font-family: 'Lato'; + font-style: italic; + font-weight: 400; + src: local('Lato Italic'), local('Lato-Italic'), url('/assets/bundled/fonts/Lato/Lato-Italic.ttf') format('truetype'); +} +@font-face { + font-family: 'Lato'; + font-style: italic; + font-weight: 700; + src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url('/assets/bundled/fonts/Lato/Lato-BoldItalic.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Mono'; + font-style: normal; + font-weight: 400; + src: local('Liberation Mono'), local('LiberationMono-Regular'), url('/assets/bundled/fonts/Liberation/LiberationMono-Regular.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Mono'; + font-style: normal; + font-weight: 700; + src: local('Liberation Mono Bold'), local('LiberationMono-Bold'), url('/assets/bundled/fonts/Liberation/LiberationMono-Bold.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Mono'; + font-style: italic; + font-weight: 400; + src: local('Liberation Mono Italic'), local('LiberationMono-Italic'), url('/assets/bundled/fonts/Liberation/LiberationMono-Italic.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Mono'; + font-style: italic; + font-weight: 700; + src: local('Liberation Mono Bold Italic'), local('LiberationMono-BoldItalic'), url('/assets/bundled/fonts/Liberation/LiberationMono-BoldItalic.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Sans'; + font-style: normal; + font-weight: 400; + src: local('Liberation Sans'), local('LiberationSans-Regular'), url('/assets/bundled/fonts/Liberation/LiberationSans-Regular.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Sans'; + font-style: normal; + font-weight: 700; + src: local('Liberation Sans Bold'), local('LiberationSans-Bold'), url('/assets/bundled/fonts/Liberation/LiberationSans-Bold.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Sans'; + font-style: italic; + font-weight: 400; + src: local('Liberation Sans Italic'), local('LiberationSans-Italic'), url('/assets/bundled/fonts/Liberation/LiberationSans-Italic.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Sans'; + font-style: italic; + font-weight: 700; + src: local('Liberation Sans Bold Italic'), local('LiberationSans-BoldItalic'), url('/assets/bundled/fonts/Liberation/LiberationSans-BoldItalic.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Serif'; + font-style: normal; + font-weight: 400; + src: local('Liberation Serif'), local('LiberationSerif-Regular'), url('/assets/bundled/fonts/Liberation/LiberationSerif-Regular.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Serif'; + font-style: normal; + font-weight: 700; + src: local('Liberation Serif Bold'), local('LiberationSerif-Bold'), url('/assets/bundled/fonts/Liberation/LiberationSerif-Bold.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Serif'; + font-style: italic; + font-weight: 400; + src: local('Liberation Serif Italic'), local('LiberationSerif-Italic'), url('/assets/bundled/fonts/Liberation/LiberationSerif-Italic.ttf') format('truetype'); +} +@font-face { + font-family: 'Liberation Serif'; + font-style: italic; + font-weight: 700; + src: local('Liberation Serif Bold Italic'), local('LiberationSerif-BoldItalic'), url('/assets/bundled/fonts/Liberation/LiberationSerif-BoldItalic.ttf') format('truetype'); +} diff --git a/client/components/wodo/editor.directive.js b/client/components/wodo/editor.directive.js index 6fa60d7..c131007 100644 --- a/client/components/wodo/editor.directive.js +++ b/client/components/wodo/editor.directive.js @@ -1,101 +1,101 @@ 'use strict'; angular.module('manticoreApp') .directive('wodoEditor', function () { return { restrict: 'E', templateUrl: 'components/wodo/editor.html', controller: 'WodoCtrl', controllerAs: 'wodoCtrl', link: function (scope) { var wodoCtrl = scope.wodoCtrl; var usedLocale = 'C'; var wodoPrefix = '/bower_components/wodo/wodo'; var head = document.getElementsByTagName('head')[0], frag = document.createDocumentFragment(); if (navigator && navigator.language.match(/^(de)/)) { usedLocale = navigator.language.substr(0, 2); } window.dojoConfig = { locale: usedLocale, paths: { 'webodf/editor': wodoPrefix, 'dijit': wodoPrefix + '/dijit', 'dojox': wodoPrefix + '/dojox', 'dojo': wodoPrefix + '/dojo', - 'resources': wodoPrefix + '/resources' + 'resources': '/assets/bundled' } }; function loadDependencies(callback) { var link, script; // append two link and two script elements to the header link = document.createElement('link'); link.rel = 'stylesheet'; link.href = wodoPrefix + '/app/resources/app.css'; link.type = 'text/css'; link.async = false; frag.appendChild(link); link = document.createElement('link'); link.rel = 'stylesheet'; link.href = wodoPrefix + '/wodocollabpane.css'; link.type = 'text/css'; link.async = false; frag.appendChild(link); link = document.createElement('link'); link.rel = 'stylesheet'; link.href = wodoPrefix + '/wodotexteditor.css'; link.type = 'text/css'; link.async = false; frag.appendChild(link); script = document.createElement('script'); script.src = wodoPrefix + '/dojo-amalgamation.js'; script['data-dojo-config'] = 'async: true'; script.charset = 'utf-8'; script.type = 'text/javascript'; script.async = false; frag.appendChild(script); script = document.createElement('script'); script.src = wodoPrefix + '/webodf.js'; script.charset = 'utf-8'; script.type = 'text/javascript'; script.async = false; frag.appendChild(script); script = document.createElement('script'); script.src = wodoPrefix + '/wodocollabtexteditor.js'; script.charset = 'utf-8'; script.type = 'text/javascript'; script.async = false; script.onload = callback; frag.appendChild(script); _.each(frag.children, function (el) { el.setAttribute('wodo', true); }); head.appendChild(frag); } function cleanUp() { wodoCtrl.destroy(function () { _.each(head.children, function (el) { if (el && el.hasAttribute('wodo')) { head.removeChild(el); } }); }); } loadDependencies(function () { wodoCtrl.boot(); }); scope.$on('$destroy', cleanUp); } }; });