cms/corpus_module/corpus.module.tmpl
author ymh <ymh.work@gmail.com>
Mon, 19 Dec 2016 21:58:29 +0100
changeset 478 b621657bb436
parent 452 85cf1c3a2fea
permissions -rw-r--r--
remove unnecessary comments
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
define('CORPUS_URL', 'corpus-app');
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
define('CORPUS_BACK_URL', '<%= corpus_back_url %>');
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
define('CORPUS_APP', 'app-client');
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
define('CORPUS_APP_VERSION', '<%= version %>');
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
define('CORPUS_ENV', '<%= environment %>');
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
define('MODULE_NAME', basename(__FILE__, '.module'));
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
/**
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
 * Implements hook_menu().
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
 */
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
function corpus_menu() {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
    $items[CORPUS_URL] = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
        'title'            => 'Recherche',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
        'description'      => t('Corpus de la parole'),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
        'weight'           => -1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
        'page callback'    => 'corpus_page',
353
bf1bc6b08c46 correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    19
        'access arguments' => array('access content'), // permission
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
        'type'             => MENU_NORMAL_ITEM,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
        'menu_name'        => 'main-menu',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
        'options'          => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
            'attributes' => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
                'class' => array('corpus-app-menu')
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
            )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    $items[CORPUS_URL.'#/langues'] = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
        'title'            => 'Langues',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
        'description'      => t('Corpus de la parole'),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
        'weight'           => 0,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
        'page callback'    => 'corpus_page',
353
bf1bc6b08c46 correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    33
        'access arguments' => array('access content'), // permission
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
        'type'             => MENU_NORMAL_ITEM,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
        'menu_name'        => 'main-menu',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
        'options'          => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
            'attributes' => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
                'class' => array('corpus-app-sub-menu')
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
            )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
    $items[CORPUS_URL.'#/cartographie'] = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
        'title'            => 'Cartographie',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
        'description'      => t('Corpus de la parole'),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
        'weight'           => 1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
        'page callback'    => 'corpus_page',
353
bf1bc6b08c46 correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    47
        'access arguments' => array('access content'), // permission
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
        'type'             => MENU_NORMAL_ITEM,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
        'menu_name'        => 'main-menu',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
        'options'          => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
            'attributes' => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
                'class' => array('corpus-app-sub-menu')
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
            )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
    $items[CORPUS_URL.'#/thematiques'] = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
        'title'            => 'Thematiques',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
        'description'      => t('Corpus de la parole'),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
        'weight'           => 2,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
        'page callback'    => 'corpus_page',
353
bf1bc6b08c46 correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    61
        'access arguments' => array('access content'), // permission
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
        'type'             => MENU_NORMAL_ITEM,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
        'menu_name'        => 'main-menu',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
        'options'          => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
            'attributes' => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
                'class' => array('corpus-app-sub-menu')
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
            )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
    $items[CORPUS_URL.'#/discours'] = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
        'title'            => 'Discours',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
        'description'      => t('Corpus de la parole'),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
        'weight'           => 3,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
        'page callback'    => 'corpus_page',
353
bf1bc6b08c46 correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    75
        'access arguments' => array('access content'), // permission
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
        'type'             => MENU_NORMAL_ITEM,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
        'menu_name'        => 'main-menu',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
        'options'          => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
            'attributes' => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
                'class' => array('corpus-app-sub-menu')
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
            )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
    $items[CORPUS_URL.'#/chronologie'] = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
        'title'            => 'Chronologie',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
        'description'      => t('Corpus de la parole'),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
        'weight'           => 4,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
        'page callback'    => 'corpus_page',
353
bf1bc6b08c46 correct provisioning to install drush and correct config files + module definition for menu access problem
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    89
        'access arguments' => array('access content'), // permission
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
        'type'             => MENU_NORMAL_ITEM,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
        'menu_name'        => 'main-menu',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
        'options'          => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
            'attributes' => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
                'class' => array('corpus-app-sub-menu')
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
            )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
    return $items;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
}
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
/**
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
 * The page callback function. Loads the Ember app
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
 */
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
function corpus_page() {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
    $app = CORPUS_APP;
452
85cf1c3a2fea correct rootUrl for module + css on FF 38
ymh <ymh.work@gmail.com>
parents: 395
diff changeset
   107
    $path = rtrim(drupal_get_path('module', MODULE_NAME), '/') . '/' . $app;
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
    $appEnvironment = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
        "rootElement" => "#corpus-app",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
        "modulePrefix" => CORPUS_APP,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
        "environment" => CORPUS_ENV,
452
85cf1c3a2fea correct rootUrl for module + css on FF 38
ymh <ymh.work@gmail.com>
parents: 395
diff changeset
   113
        "rootURL" => "$path/",
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
        "locationType" => "hash",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
        "EmberENV" => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
            "FEATURES" => array()
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
        "APP" => array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
            "backRootURL" => "/".CORPUS_BACK_URL."/",
395
b7d79db348e7 set version 0.0.6, correct class selector
ymh <ymh.work@gmail.com>
parents: 394
diff changeset
   120
            "navigationLinksSelector" => ".corpus-app-menu",
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
            "name" => "app-client",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
            "version" => CORPUS_APP_VERSION
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
        "exportApplicationGlobal" => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
    if(CORPUS_ENV === 'development') {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
        $appEnvironment["ember-cli-mirage"] = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
            "usingProxy" => false,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
            "useDefaultPassthroughs" => true
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
        );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
    }
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
    $element = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
        '#tag' => 'meta', // The #tag is the html tag - <link />
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
        '#attributes' => array( // Set up an array of attributes inside the tag
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
            'name' => 'app-client/config/environment',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
            'content' => urlencode(json_encode($appEnvironment))
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
    drupal_add_html_head($element, 'ember_init');
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
    // drupal_add_css("{$path}/assets/vendor.css");
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
    // drupal_add_css("{$path}/assets/{$app}.css");
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
    drupal_add_js(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
        "if(typeof jQuery !== 'undefined') {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
            var jQueryOriginal = jQuery.noConflict(true);
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
        }",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
        array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
            'type' => 'inline',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
            'scope' => 'footer',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
            'group' => JS_THEME+1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
            'weight' => 1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   155
            'every_page' => true,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
            'requires_jquery' => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   157
        )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   159
    drupal_add_js(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   160
        "{$path}/assets/vendor.js",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   161
        array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
            'type' => 'file',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   163
            'scope' => 'footer',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
            'group' => JS_THEME+1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
            'weight' => 2,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
            'every_page' => true,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
            'requires_jquery' => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
        )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   170
    drupal_add_js("{$path}/assets/{$app}.js",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
        array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
            'type' => 'file',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
            'scope' => 'footer',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
            'group' => JS_THEME+1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
            'weight' => 3,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
            'every_page' => true,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   177
            'requires_jquery' => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
        )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
    drupal_add_js(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
        "if(typeof jQueryOriginal !== 'undefined') {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
            $ = jQueryOriginal;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
            jQuery = jQueryOriginal;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   185
        }",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   186
        array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   187
            'type' => 'inline',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   188
            'scope' => 'footer',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
            'group' => JS_THEME+1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   190
            'weight' => 4,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   191
            'every_page' => true,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   192
            'requires_jquery' => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   193
        )
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   194
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   195
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   196
    return "<div id='corpus-app' class='corpus-app'></div>";
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   197
}