Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1386

Allow additional javascript feature directories e.g. in the extras folder

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-RC2
    • PHP
    • None

    Description

      Index: php/config/container.php
      ===================================================================
      117c117,120
      < 'features_path' => realpath(dirname(_FILE_) . '/../../features/src/main/javascript/features') . '/',

      > 'features_path' => array(
      > realpath(dirname(_FILE_) . '/../../features/src/main/javascript/features') . '/',
      > realpath(dirname(_FILE_) . '/../../extras/src/main/javascript/features-extras') . '/',
      > ),

      Index: php/src/gadgets/GadgetFeatureRegistry.php
      ===================================================================
      28,30c28,29
      < public $features;
      < private $coreDone = false;
      < private $coreFeaturs;

      > public $features = array();
      > private $coreFeatures;
      33a33,37
      > if (is_array($featurePath)) {
      > foreach ($featurePath as $path)

      { > $this->registerFeatures($path); > }

      > } else

      { 36a41,43 > $this->processFeatures(); > }

      >
      137d143
      < $this->features = array();
      151a158,163
      > }
      >
      > /**
      > * gets core features and sorts features
      > */
      > private function processFeatures() {

      Index: php/src/gadgets/GadgetContext.php
      ===================================================================
      120c120,121
      < if (! ($registry = $featureCache->get(md5(Config::get('features_path'))))) {

      > $key = md5(implode(',', Config::get('features_path')));
      > if (! ($registry = $featureCache->get($key))) {
      122c123
      < $featureCache->set(md5(Config::get('features_path')), $registry);

      > $featureCache->set($key, $registry);

      Also in the existing features-extras directory the features.txt has to wrong path to the feature.xml:

      Index: extras/src/main/javascript/features-extras/features.txt
      ===================================================================
      19c19
      < features/org.jquery.core-1.4.2/feature.xml

      > features-extras/org.jquery.core-1.4.2/feature.xml

      Attachments

        Activity

          People

            Unassigned Unassigned
            bhofmann Bastian Hofmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: