newscoop/JS-Scoopwriter

View on GitHub
app/index.html

Summary

Maintainability
Test Coverage
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<!-- devcode: newscoop -->
<html class="no-js" lang="{{ localeFromCookie }}"  ng-app="authoringEnvironmentApp">
<!-- endcode -->
<!-- devcode: !newscoop -->
<html class="no-js" lang="en" ng-app="authoringEnvironmentApp">
<!-- endcode -->
<!--<![endif]-->
  <head>

    <!-- devcode: newscoop -->
    <base href="/bundles/newscoopeditor/">
    <link rel="stylesheet" href="css/plugin.css">
    <script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
    <script src="{{ path('fos_js_routing_js', {'callback': 'fos.Router.setData'}) }}"></script>
    <script src="{{ asset('bundles/bazingajstranslation/js/translator.min.js') }}"></script>
    <script src="{{ url('bazinga_jstranslation_js') }}?locales={{ localeFromCookie }},en"></script>
    <script type="text/javascript">
      var AES_SETTINGS = {{ userSettings|raw }};
    </script>
    <!-- endcode -->

    <!-- devcode: !newscoop -->
    <script src="scripts/routing/router.js"></script>
    <script src="scripts/routing/fos_js_routes.js"></script>
    <script src="scripts/localization/translator.min.js"></script>
    <script src="scripts/localization/translations.js"></script>
    <script type="text/javascript">
      var AES_SETTINGS = {
          articleInfo: {
            articleNumber: 2,
            language: 'en'
          },
          API: {
              rootURI: 'http://newscoop.aes.sourcefabric.net',
              endpoint: '/api',
              full: 'http://newscoop.aes.sourcefabric.net/api'
          },
          auth: {
              client_id: '7_6203opwgvx8g4skgskksgkws8cs44ks8s4cw4sc8cg4wsk8c40',
              redirect_uri: 'http://localhost:9000',
              server: 'http://newscoop.aes.sourcefabric.net/oauth/v2/auth',
              // token key name which is used to retrieve the token from session
              tokenKeyName: 'newscoop.aes.token'
          },
          image: {
              width: {
                 small: '30%',
                 medium: '50%',
                 big: '100%'
              },
              float: 'none'
          },
          image_size: 'small',
          // default text for empty article fields
          placeholder: '[please provide your content]',
          showSwitches: true,
          articleTypeFields: {
              news: {
                  title: {
                      name: 'title',
                      displayName: 'Title',
                      order: 2
                  }
              },
              page: {
                  title: {
                      name: 'title',
                      displayName: 'Title',
                      order: 1
                  }
              }
          }
      };
    </script>
    <!-- endcode -->

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title ng-bind="headerTitle"></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">
    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

        <link href='http://fonts.googleapis.com/css?family=Roboto:300,300italic,400,400italic,500,500italic,700,700italic' rel='stylesheet' type='text/css'>

        <link rel="stylesheet" href="bower_components/ng-aloha-editor/libs/alohaeditor-0.26.4/aloha/css/aloha.css">
        <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">

        <link href="bower_components/gc-angular-toaster/toaster.css" rel="stylesheet" />

        <!-- build:css(.tmp) styles/main.css -->
        <link rel="stylesheet" href="styles/main.css">
        <!-- endbuild -->

        <!-- custom content stylesheet -->
        <link rel="stylesheet" href="css/aes-custom-styles.css">
        <!-- devcode: newscoop -->
        <style rel="stylesheet">
            {{ custom_styles|raw }}
        </style>
        <!-- endcode -->

</head>
  <body>
    <!--[if lt IE 7]>
      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->

    <!--[if lt IE 9]>
      <script src="bower_components/es5-shim/es5-shim.js"></script>
      <script src="bower_components/json3/lib/json3.min.js"></script>
    <![endif]-->

    <!-- Add your site or application content here -->
    <div ng-view=""></div>

    <!-- devcode: dist -->
    <script src="bower_components/jquery/jquery.min.js"></script>
    <script src="bower_components/lodash/dist/lodash.min.js"></script>
    <script src="bower_components/angular/angular.min.js"></script>
    <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
    <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- endcode -->
    <!-- devcode: !dist -->
    <script src="bower_components/jquery/jquery.js"></script>
    <script src="bower_components/lodash/dist/lodash.js"></script>
    <script src="bower_components/angular/angular.js"></script>
    <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
    <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
    <!-- endcode -->

    <!-- select2 requirements (besides jquery and angular) -->
    <link rel="stylesheet" href="bower_components/select2/select2.css">
    <!-- devcode: dist -->
    <script type="text/javascript" src="bower_components/select2/select2.min.js"></script>
    <!-- endcode -->
    <!-- devcode: !dist -->
    <script type="text/javascript" src="bower_components/select2/select2.js"></script>
    <!-- endcode -->
    <script type="text/javascript"
            src="bower_components/angular-ui-select2/src/select2.js"></script>
    <!-- end select2 requirements -->

    <!-- *** ngTagsInput requirements (besides jquery and angular) *** -->
    <!-- devcode: dist -->
    <link rel="stylesheet" href="bower_components/ng-tags-input/ng-tags-input.min.css">
    <link rel="stylesheet" href="bower_components/ng-tags-input/ng-tags-input.bootstrap.min.css">
    <script type="text/javascript" src="bower_components/ng-tags-input/ng-tags-input.min.js"></script>
    <!-- endcode -->
    <!-- devcode: !dist -->
    <link rel="stylesheet" href="bower_components/ng-tags-input/ng-tags-input.css">
    <link rel="stylesheet" href="bower_components/ng-tags-input/ng-tags-input.bootstrap.css">
    <script type="text/javascript" src="bower_components/ng-tags-input/ng-tags-input.js"></script>
    <!-- endcode -->
    <!-- *** end ngTagsInput requirements *** -->

    <script src="bower_components/requirejs/require.js"></script>
    <script src="bower_components/ng-aloha-editor/libs/alohaeditor-0.26.4/aloha/lib/vendor/jquery-1.7.2.js"></script>
    <script src="bower_components/angular-symfony-translation/dist/angular-symfony-translation.js"></script>
    <script type="text/javascript">
    var Aloha = window.Aloha || ( window.Aloha = {} );
    // Load your Plugins here, can't be done after Aloha has loaded
    // block.defaults is required for undo/redo in order to re-create
    // custom blocks after undo/redo actions
    Aloha.settings = {
        plugins: {
            load: "common/ui, common/format, common/paste, common/block, common/list, common/table, common/contenthandler, aes/quotes, aes/snippet, aes/nsimage, aes/undo",
            block: {
                defaults: {
                    '.aloha-image-block': {
                        "aloha-block-type": "ImageBlock"
                    },
                    '.aloha-snippet-block': {
                        "aloha-block-type": "SnippetBlock"
                    }
                }
            }
        },
        bundles: {
            aes: '../../../../../../scripts/aloha/plugins/aes'
        },
        smartContentChange: {
            idle: 500,
            delay: 250
        },
        contentHandler: {
            insertHtml: [ 'sanitize' ],
            initEditable: [],
            getContents: [],
            handler: {
                sanitize: {
                    '.aloha-editable': { 
                        elements: ['strong', 'em', 'i', 'b', 'blockquote', 'br', 'cite',
                            'code', 'dd', 'div', 'dl', 'dt', 'em', 'i', 'li', 'ol', 'p',
                            'pre', 'q', 'small', 'strike', 'sub', 'sup', 'u', 'ul', 'h1',
                            'h2', 'h3', 'h4', 'h5', 'img', 'video', 'audio']
                    }
                }
            }
        }
    }
    // Restore the global $ and jQuery variables of your project's jQuery
    Aloha.settings.jQuery = window.jQuery.noConflict(true);
    </script>
    <script src="bower_components/ng-aloha-editor/libs/alohaeditor-0.26.4/aloha/lib/aloha.js"></script>

    <script>
    var ngAlohaEditorConfig = { baseUrl: 'bower_components/ng-aloha-editor/' };
    </script>

        <!-- build:js scripts/modules.js -->
        <script src="bower_components/angular-resource/angular-resource.js"></script>
        <script src="bower_components/angular-cookies/angular-cookies.js"></script>
        <script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
        <script src="bower_components/angular-route/angular-route.js"></script>
        <script src="bower_components/angular-animate/angular-animate.js"></script>
        <script src="bower_components/angular-mocks/angular-mocks.js"></script>

        <script src="bower_components/gc-angular-toaster/toaster.js"></script>

        <script src="bower_components/angular-strap/dist/modules/dimensions.js"></script>
        <script src="bower_components/angular-strap/dist/modules/tooltip.js"></script>
        <script src="bower_components/angular-strap/dist/modules/popover.js"></script>
        <script src="bower_components/angular-strap/dist/modules/button.js"></script>
        <script src="bower_components/ng-file-upload/angular-file-upload.js"></script>
        <script src="bower_components/ng-aloha-editor/ng-aloha-editor.js"></script>

        <script src="bower_components/xregexp/min/xregexp-all-min.js"></script>
        <!-- endbuild -->

        <!-- build:js({.tmp,app}) scripts/scripts.js -->
        <script src="scripts/app.js"></script>
        <script src="scripts/mutate.events.js"></script>
        <script src="scripts/mutate.js"></script>
        <script src="scripts/services/modalFactory.js"></script>
        <script src="scripts/httpBackendStub.js"></script>
        <script src="scripts/filters/availableRoles.js"></script>
        <script src="scripts/filters/allowedWfStatuses.js"></script>

        <script src="scripts/controllers/main.js"></script>
        <script src="scripts/services/userAuth.js"></script>

        <script src="scripts/controllers/redirectToArticle.js"></script>
        <script src="scripts/services/articleLoader.js"></script>
        <script src="scripts/services/Topic.js"></script>
        <script src="scripts/controllers/sf-panes.js"></script>
        <script src="scripts/controllers/pane-authors.js"></script>
        <script src="scripts/controllers/pane-info.js"></script>
        <script src="scripts/controllers/pane-topics.js"></script>
        <script src="scripts/controllers/pane-switches.js"></script>
        <script src="scripts/controllers/feedbackForm.js"></script>
        <script src="scripts/services/feedback.js"></script>
        <script src="scripts/services/panes.js"></script>
        <script src="scripts/controllers/panes-config.js"></script>
        <script src="scripts/controllers/article.js"></script>
        <script src="scripts/controllers/articleActions.js"></script>
        <script src="scripts/controllers/articlePreview.js"></script>
        <script src="scripts/controllers/renditionsEditor.js"></script>
        <script src="scripts/controllers/slideshowsEditor.js"></script>
        <script src="scripts/services/Slideshow.js"></script>
        <script src="scripts/filters/youtube-thumbnail.js"></script>
        <script src="scripts/controllers/pane-slideshows.js"></script>
        <script src="scripts/services/AlohaFormattingFactory.js"></script>
        <script src="scripts/directives/sf-aloha-format-generic.js"></script>
        <script src="scripts/directives/sf-aloha-format-link.js"></script>
        <script src="scripts/directives/sf-aloha-format-style.js"></script>
        <script src="scripts/directives/sf-iframe-login.js"></script>
        <script src="scripts/controllers/Toolbar.js"></script>
        <script src="scripts/services/article-service.js"></script>
        <script src="scripts/services/Article.js"></script>
        <script src="scripts/services/ArticleType.js"></script>
        <script src="scripts/directives/sf-droppable.js"></script>
        <script src="scripts/directives/sf-draggable.js"></script>
        <script src="scripts/directives/drag-sort.js"></script>
        <script src="scripts/services/dragData.js"></script>
        <script src="scripts/services/SnippetTemplate.js"></script>
        <script src="scripts/services/Snippet.js"></script>
        <script src="scripts/services/snippets.js"></script>
        <script src="scripts/controllers/pane-snippets.js"></script>
        <script src="scripts/controllers/dropped-snippet.js"></script>
        <script src="scripts/directives/dropped-snippet.js"></script>
        <script src="scripts/directives/auto-list-offset.js"></script>
        <script src="scripts/services/NcImage.js"></script>
        <script src="scripts/services/images.js"></script>
        <script src="scripts/services/modal.js"></script>
        <script src="scripts/controllers/modal.js"></script>
        <script src="scripts/controllers/ImagePane.js"></script>
        <script src="scripts/controllers/media-archive.js"></script>
        <script src="scripts/controllers/attach-image.js"></script>
        <script src="scripts/controllers/upload-from-comp.js"></script>
        <script src="scripts/services/page-tracker.js"></script>
        <script src="scripts/directives/dropped-images-container.js"></script>
        <script src="scripts/directives/dropped-image.js"></script>
        <script src="scripts/controllers/dropped-image.js"></script>
        <script src="scripts/directives/fixed-image-placeholder.js"></script>
        <script src="scripts/controllers/fixed-image-placeholder.js"></script>
        <script src="scripts/services/auth-interceptor.js"></script>
        <script src="scripts/services/add-to-url.js"></script>
        <script src="scripts/services/mode.js"></script>
        <script src="scripts/services/platform.js"></script>
        <script src="scripts/services/comments.js"></script>
        <script src="scripts/controllers/comments.js"></script>
        <script src="scripts/directives/comment.js"></script>
        <script src="scripts/services/transform.js"></script>
        <script src="scripts/services/circular-buffer-factory.js"></script>
        <script src="scripts/filters/sort-comments.js"></script>
        <script src="scripts/services/nested-sort.js"></script>
        <script src="scripts/services/current-time.js"></script>
        <script src="scripts/filters/nice-date.js"></script>
        <script src="scripts/filters/strip-html.js"></script>
        <script src="scripts/directives/drop-images.js"></script>
        <script src="scripts/directives/file-upload.js"></script>
        <script src="scripts/services/Author.js"></script>
        <script src="scripts/services/get-file-reader.js"></script>
        <script src="scripts/services/form-data-factory.js"></script>
        <script src="scripts/services/image-factory.js"></script>
        <script src="scripts/services/date-factory.js"></script>
        <script src="scripts/controllers/pane-related-articles.js"></script>
        <script src="scripts/services/Publication.js"></script>
        <script src="scripts/services/Issue.js"></script>
        <script src="scripts/services/Section.js"></script>
        <script src="scripts/directives/sf-aloha-command-button.js"></script>
        <script src="scripts/controllers/feedbackForm.js"></script>
        <script src="scripts/services/page-helper.js"></script>
        <script src="scripts/controllers/editorial-comments.js"></script>
        <script src="scripts/directives/editorial-comment.js"></script>
        <script src="scripts/services/editorial-comments.js"></script>
        <script src="scripts/services/ArticlesList.js"></script>
        <script src="scripts/controllers/pane-articles-lists.js"></script>
        <!-- endbuild -->
</body>
</html>