cms/corpus_module/corpus.module.tmpl
author ymh <ymh.work@gmail.com>
Wed, 19 Oct 2016 00:31:18 +0200
changeset 368 5f79f31ca9a2
parent 353 bf1bc6b08c46
child 394 48458e099b05
permissions -rw-r--r--
Add some doc. Improve auto documentation of build script
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;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
    $path = drupal_get_path('module', MODULE_NAME) . '/' . $app;
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,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
        "rootURL" => drupal_get_path('module', MODULE_NAME),
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."/",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
            "name" => "app-client",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
            "version" => CORPUS_APP_VERSION
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
        ),
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
        "exportApplicationGlobal" => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
    );
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
    if(CORPUS_ENV === 'development') {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
        $appEnvironment["ember-cli-mirage"] = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
            "usingProxy" => false,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
            "useDefaultPassthroughs" => true
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
        );
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
    $element = array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
        '#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
   134
        '#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
   135
            'name' => 'app-client/config/environment',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
            'content' => urlencode(json_encode($appEnvironment))
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
        ),
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
    drupal_add_html_head($element, 'ember_init');
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
    // drupal_add_css("{$path}/assets/vendor.css");
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
    // drupal_add_css("{$path}/assets/{$app}.css");
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
    drupal_add_js(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
        "if(typeof jQuery !== 'undefined') {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
            var jQueryOriginal = jQuery.noConflict(true);
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
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
        array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
            'type' => 'inline',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
            'scope' => 'footer',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
            'group' => JS_THEME+1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
            'weight' => 1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
            'every_page' => true,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   155
            'requires_jquery' => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
        )
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
    drupal_add_js(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   159
        "{$path}/assets/vendor.js",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   160
        array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   161
            'type' => 'file',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
            'scope' => 'footer',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   163
            'group' => JS_THEME+1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
            'weight' => 2,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
            'every_page' => true,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
            'requires_jquery' => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
        )
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
    drupal_add_js("{$path}/assets/{$app}.js",
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   170
        array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
            'type' => 'file',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
            'scope' => 'footer',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
            'group' => JS_THEME+1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
            'weight' => 3,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
            'every_page' => true,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
            'requires_jquery' => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   177
        )
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
    drupal_add_js(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
        "if(typeof jQueryOriginal !== 'undefined') {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
            $ = jQueryOriginal;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
            jQuery = jQueryOriginal;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
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
        array(
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   186
            'type' => 'inline',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   187
            'scope' => 'footer',
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   188
            'group' => JS_THEME+1,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
            'weight' => 4,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   190
            'every_page' => true,
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   191
            'requires_jquery' => false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   192
        )
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
    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
   196
}