-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3 implementation of the generic settings tool
- Loading branch information
Showing
54 changed files
with
2,439 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
return [ | ||
'group' => [ | ||
'ht7-widgets/body-overlay' => [ | ||
['css', 'ht7-widgets/body-overlay'], | ||
['javascript', 'ht7-widgets/body-overlay'] | ||
], | ||
'ht7-tools/settings' => [ | ||
['css', 'ht7-tools/settings'], | ||
['javascript', 'ht7-tools/settings'] | ||
] | ||
], | ||
'single' => [ | ||
[ | ||
'css', | ||
'ht7-tools/settings', | ||
'css/ht7.tools.settings.css', | ||
['version' => '0.0.1', 'minify' => true, 'combine' => true] | ||
], | ||
[ | ||
'css', | ||
'ht7-widgets/status-toggle', | ||
'css/ht7.widgets.statustoggle.css', | ||
['version' => '0.0.1', 'minify' => true, 'combine' => true] | ||
], | ||
[ | ||
'css', | ||
'ht7-widgets/body-overlay', | ||
'css/ht7.widgets.bodyoverlay.css', | ||
['version' => '0.0.1', 'minify' => true, 'combine' => true], | ||
], | ||
[ | ||
'javascript', | ||
'ht7-extenders', | ||
'js/ht7.extenders.js', | ||
['version' => '0.0.1', 'minify' => true, 'combine' => true], | ||
], | ||
[ | ||
'javascript', | ||
'ht7-tools/settings', | ||
'js/ht7.tools.settings.js', | ||
['version' => '0.0.1', 'minify' => true, 'combine' => true] | ||
], | ||
[ | ||
'javascript', | ||
'ht7-widgets/body-overlay', | ||
'js/ht7.widgets.bodyoverlay.js', | ||
['version' => '0.0.1', 'minify' => true, 'combine' => true] | ||
], | ||
[ | ||
'javascript', | ||
'ht7-widgets/concrete5', | ||
'js/ht7.widgets.c5.js', | ||
['version' => '0.0.1', 'minify' => true, 'combine' => true], | ||
] | ||
] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?php | ||
|
||
return [ | ||
'settings' => [ | ||
// 'fieldsets' => [ | ||
// 'styles' => tc('ht7_c5_base', 'Styles'), | ||
// 'rows' => tc('ht7_c5_base', 'Row Appearance'), | ||
// ], | ||
// 'libraryFilePathBase' => [ | ||
// 'label' => tc('ht7_c5_library', 'File path base'), | ||
// 'title' => tc('ht7_c5_library', 'Base file path of the library books which will be prepend to the file specific path.'), | ||
// 'type' => 'text', | ||
// ], | ||
'saveByAjax' => [ | ||
'label' => tc('ht7_c5_library', 'Save these settings by AJAX request'), | ||
'nsValue' => 'settings.general', | ||
'tabId' => 'pane-general', | ||
'title' => tc('ht7_c5_library', 'If active the saving of these settings will be done by AJAX. This will probably not show the latest changes.'), | ||
'type' => 'boolean', | ||
], | ||
'showBsTooltips' => [ | ||
'label' => tc('ht7_c5_library', 'Show bootstrap tooltips'), | ||
'nsValue' => 'settings.general', | ||
'tabId' => 'pane-general', | ||
'title' => tc('ht7_c5_library', 'If active the tooltips will be displayed with the l&f of the bootstrap framework.'), | ||
'type' => 'boolean', | ||
], | ||
'tableStyleBordered' => [ | ||
// 'fieldset' => 'rows', | ||
'label' => tc('ht7_c5_library', 'Settings with bordered l&f'), | ||
'nsValue' => 'settings.styles', | ||
'tabId' => 'pane-styles', | ||
'title' => tc('ht7_c5_library', 'Display the settings with bordered look & feel.'), | ||
'type' => 'boolean', | ||
], | ||
'tableStyleStripped' => [ | ||
// 'fieldset' => 'rows', | ||
'label' => tc('ht7_c5_library', 'Settings with stripped l&f'), | ||
'nsValue' => 'settings.styles', | ||
'tabId' => 'pane-styles', | ||
'title' => tc('ht7_c5_library', 'Display the settings with stripped look & feel.'), | ||
'type' => 'boolean', | ||
], | ||
'tableRowHeightMin' => [ | ||
'attributes' => [ | ||
'max' => 50, | ||
'min' => 20, | ||
'step' => 1, | ||
], | ||
// 'fieldset' => 'styles', | ||
'label' => tc('ht7_c5_library', 'Min Height of these rows'), | ||
'nsValue' => 'settings.styles', | ||
'tabId' => 'pane-styles', | ||
'title' => tc('ht7_c5_library', 'This is the min height in pixels of these settings rows.'), | ||
'type' => 'number', | ||
], | ||
'tablePaddingTop' => [ | ||
'attributes' => [ | ||
'max' => 10, | ||
'min' => 0, | ||
'step' => 1, | ||
], | ||
// 'fieldset' => 'styles', | ||
'label' => tc('ht7_c5_library', 'Padding top of these rows'), | ||
'nsValue' => 'settings.styles', | ||
'tabId' => 'pane-styles', | ||
'title' => tc('ht7_c5_library', 'This is the padding top in pixels of these settings rows.'), | ||
'type' => 'number', | ||
], | ||
'tablePaddingBottom' => [ | ||
'attributes' => [ | ||
'max' => 10, | ||
'min' => 0, | ||
'step' => 1, | ||
], | ||
// 'fieldset' => 'styles', | ||
'label' => tc('ht7_c5_library', 'Padding bottom of these rows'), | ||
'nsValue' => 'settings.styles', | ||
'tabId' => 'pane-styles', | ||
'title' => tc('ht7_c5_library', 'This is the padding bottom in pixels of these settings rows.'), | ||
'type' => 'number', | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
return [ | ||
'settings' => [ | ||
[ | ||
'selector' => '.ht7-tools-settings .ht7-settings-list > li', | ||
'items' => [ | ||
'min-height' => ['settings.styles.tableRowHeightMin', 'px'], | ||
'padding-bottom' => ['settings.styles.tablePaddingBottom', 'px'], | ||
'padding-top' => ['settings.styles.tablePaddingTop', 'px'] | ||
] | ||
] | ||
] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
return [ | ||
'general' => [ | ||
'saveByAjax' => true, | ||
'showBsTooltips' => true, | ||
'libraryFilePathBase' => '', | ||
], | ||
'styles' => [ | ||
'tableStyleBordered' => true, | ||
'tableStyleStripped' => true, | ||
'tablePaddingBottom' => 5, | ||
'tablePaddingTop' => 5, | ||
'tableRowHeightMin' => 30, | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
return [ | ||
'settings' => [ | ||
'items' => [ | ||
[ | ||
'content' => [ | ||
'model_type' => 'settings-simple', | ||
'src' => 'settings.general', | ||
], | ||
'id' => 'pane-general', | ||
'name' => tc('ht7_c5_library', 'General'), | ||
], | ||
[ | ||
'content' => [ | ||
'model_type' => 'settings-simple', | ||
'src' => 'settings.styles', | ||
], | ||
'id' => 'pane-styles', | ||
'name' => tc('ht7_c5_library', 'Look&Feel'), | ||
'selected' => true, | ||
], | ||
], | ||
'markup' => [ | ||
'content' => [ | ||
'container' => [ | ||
'attributes' => [ | ||
'class' => 'ccm-tab-content', | ||
'id' => 'ccm-tab-content' | ||
], | ||
'tag' => 'article', | ||
] | ||
] | ||
] | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
return [ | ||
'general' => [ | ||
// 'messageTypeError' => 'alert', | ||
// 'messageTypeInfo' => 'notify', | ||
// 'messageTypeSuccess' => 'notify', | ||
// 'messageTypeWarning' => 'notify', | ||
'saveByAjax' => false, | ||
'showBsTooltips' => true, | ||
], | ||
'styles' => [ | ||
'tableStyleBordered' => true, | ||
'tableStyleStripped' => true, | ||
'tablePaddingBottom' => 5, | ||
'tablePaddingTop' => 5, | ||
'tableRowHeightMin' => 50, | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
return [ | ||
'settings' => [ | ||
'items' => [ | ||
[ | ||
'content' => 'settings.general', | ||
'id' => 'pane-general', | ||
'name' => tc('ht7_c5_library', 'General'), | ||
], | ||
[ | ||
'content' => 'settings.styles', | ||
'id' => 'pane-styles', | ||
'name' => tc('ht7_c5_library', 'Look&Feel'), | ||
'selected' => true, | ||
], | ||
], | ||
'markup' => [ | ||
'content' => [ | ||
'container' => [ | ||
'attributes' => [ | ||
'class' => 'ccm-tab-content', | ||
'id' => 'ccm-tab-content' | ||
], | ||
'tag' => 'article', | ||
] | ||
] | ||
] | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Concrete\Package\Ht7C5Base\Controller\SinglePage\Dashboard\Ht7; | ||
|
||
use \Concrete\Package\Ht7C5Base\Ht7Tools\Controllers\AbstractRedirectToFirstChild; | ||
|
||
defined('C5_EXECUTE') or die('Access Denied.'); | ||
|
||
class Tools extends AbstractRedirectToFirstChild | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace Concrete\Package\Ht7C5Base\Controller\SinglePage\Dashboard\Ht7\Tools; | ||
|
||
use \Concrete\Core\Page\Page; | ||
use \Concrete\Package\Ht7C5Base\Ht7Tools\Controllers\AbstractHt7ToolsSettings; | ||
use \Concrete\Package\Ht7C5Base\Ht7Tools\Settings\Elements\PageDefinitions; | ||
use \Concrete\Package\Ht7C5Base\Ht7Tools\Settings\PageDefinitionTypes; | ||
|
||
defined('C5_EXECUTE') or die('Access Denied.'); | ||
|
||
class Settings extends AbstractHt7ToolsSettings | ||
{ | ||
|
||
public function __construct(Page $c) | ||
{ | ||
parent::__construct($c); | ||
|
||
/* @var $pkgH \Concrete\Package\Ht7C5Base\Services\PackageBase */ | ||
$pkgH = $this->app->make('helper/ht7/package/base'); | ||
$pkgFileConfig = $pkgH->getPackageFileConfig($this); | ||
$pkgHandle = $pkgH->getPackageHandle($this); | ||
|
||
$this->definitions = new PageDefinitions( | ||
[ | ||
'definitions' => ['forms.settings', $pkgFileConfig], | ||
'elements' => [ | ||
'label' => ['tools/settings/label', $pkgHandle], | ||
'setting' => ['tools/settings/attributes', $pkgHandle] | ||
], | ||
'tabs' => ['ht7_tabs.settings', $pkgFileConfig], | ||
'urls' => [ | ||
'form_abort' => $this->action(), | ||
'form_save' => $this->action('save'), | ||
], | ||
'values' => ['settings', $pkgFileConfig], | ||
], | ||
PageDefinitionTypes::SIMPLE | ||
); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ccm-dashboard-page .ht7-dashboard.ht7-tools-settings.bordered-settings ul.ht7-settings-list li { | ||
border-bottom: 1px solid #ddd; | ||
} | ||
#ccm-dashboard-page .ht7-dashboard.ht7-tools-settings.stripped-settings ul.ht7-settings-list li:nth-child(even) { | ||
position: relative; | ||
} | ||
#ccm-dashboard-page .ht7-dashboard.ht7-tools-settings.stripped-settings ul.ht7-settings-list li:nth-child(even) .styler { | ||
background-color: #efefef; | ||
bottom: 0; | ||
left: 0; | ||
opacity: 0.5; | ||
position: absolute; | ||
right: 0; | ||
top: 0; | ||
} | ||
#ccm-dashboard-page .ht7-dashboard.ht7-tools-settings ul.ht7-settings-list { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
#ccm-dashboard-page .ht7-dashboard.ht7-tools-settings ul.ht7-settings-list li { | ||
/* .styler { | ||
}*/ | ||
} | ||
#ccm-dashboard-page .ht7-dashboard.ht7-tools-settings ul.ht7-settings-list li .control-label { | ||
margin-bottom: 0; | ||
} |
Oops, something went wrong.