Skip to content

Commit

Permalink
fix some MIGX-grid width - issues and more
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno17 committed Dec 8, 2015
1 parent 3a58fdd commit 13eb297
Show file tree
Hide file tree
Showing 75 changed files with 640 additions and 1,776 deletions.
513 changes: 338 additions & 175 deletions _build/build.transport.php

Large diffs are not rendered by default.

52 changes: 51 additions & 1 deletion _build/config/categories.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
<?php

/*
$cats = array (
0 => 'MIGX',
0 => 'MIGX',
);
return $cats;
*/


//$packagepath = $modx->getOption('core_path') . 'components/' . $packageName . '/';

$element_types = 'snippets,chunks,plugins,templates';
$element_types = explode(',', $element_types);

$cats = array();

foreach ($element_types as $element_type) {
$elementspath = $packagepath . 'elements/' . $element_type . '/';

if (is_dir($elementspath)) {
if ($handle = opendir($elementspath)) {
while (false !== ($file = readdir($handle))) {
$exploded = explode('.', $file);
if (count($exploded) == 3 && $exploded[0] == $element_type && $exploded[2] == 'json') {
$elements = @file_get_contents($elementspath . $file);
$elements = $modx->fromJson($elements);
if (is_array($elements)) {
foreach ($elements as $element) {
$category_name = $modx->getOption('category_name', $element, '');
$element_name = $modx->getOption($nameField, $element, '');
$filename = $modx->getOption('filename', $element, '');

if (!isset($cats[$category_name])) {
$cats[$category_name] = array();
$cats[$category_name]['category'] = $category_name;
}

if (!isset($cats[$category_name][$element_type])) {
$cats[$category_name][$element_type] = array();
}
$element['content'] = @file_get_contents($elementspath . $filename);
$cats[$category_name][$element_type][] = $element;

}
}
}
}
closedir($handle);
}
}

}

return $cats;
8 changes: 8 additions & 0 deletions _build/config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id":1,
"package":"MIGX",
"packageDescription":"",
"version":"2.9.6",
"release":"pl",
"menus":"[{\"MIGX_id\":\"1\",\"text\":\"migx\",\"parent\":\"\",\"description\":\"\",\"icon\":\"\",\"menuindex\":\"\",\"params\":\"&configs=packagemanager||migxconfigs||setup\",\"handler\":\"\",\"permissions\":\"\",\"action.id\":\"\",\"action.namespace\":\"\",\"action.controller\":\"\",\"action.haslayout\":\"0\",\"action.lang_topics\":\"\",\"action.assets\":\"\"}]"
}
10 changes: 0 additions & 10 deletions _build/config/current.project.php

This file was deleted.

0 comments on commit 13eb297

Please sign in to comment.