Skip to content

Commit

Permalink
[#705 state:resolved] Updating to latest version of Config Assistant.…
Browse files Browse the repository at this point in the history
… This fixes an issue where plugin options of type 'colorpicker' configured by Config Assistant would not work because the proper colorpicker.css, jquery.colorpicker.js files and what not were not being included in the page. They were being included in the Theme Options, but not the cfg_plugins mode.
  • Loading branch information
byrnereese authored and jayallen committed Feb 3, 2011
1 parent 5261e05 commit 8722da5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion addons/ConfigAssistant.pack/config.yaml
Expand Up @@ -4,7 +4,7 @@ key: ConfigAssistant
author_link: http://openmelody.org/
author_name: "Byrne Reese, Open Melody Software Group"
description: This plugin provides a simple YAML based framework for creating plugin and theme configuration options.
version: 2.1.15
version: 2.1.16
static_version: 7
schema_version: 3

Expand Down
3 changes: 3 additions & 0 deletions addons/ConfigAssistant.pack/lib/ConfigAssistant/Plugin.pm
Expand Up @@ -1462,8 +1462,11 @@ END_TMPL
my $slug2 = <<END_TMPL;
<mt:setvarblock name="html_head" append="1">
<link rel="stylesheet" href="<mt:PluginStaticWebPath component="configassistant">css/app.css" type="text/css" />
<link rel="stylesheet" href="<mt:PluginStaticWebPath component="configassistant">colorpicker/css/colorpicker.css" type="text/css" />
<script src="<mt:StaticWebPath>jquery/jquery.js" type="text/javascript"></script>
<script src="<mt:PluginStaticWebPath component="configassistant">js/options.js" type="text/javascript"></script>
<script src="<mt:PluginStaticWebPath component="configassistant">colorpicker/js/colorpicker.js" type="text/javascript"></script>
<script src="<mt:PluginStaticWebPath component="configassistant">js/jquery.json-2.2.min.js" type="text/javascript"></script>
</mt:setvarblock>
END_TMPL

Expand Down
17 changes: 12 additions & 5 deletions addons/ConfigAssistant.pack/lib/ConfigAssistant/Util.pm
Expand Up @@ -61,9 +61,9 @@ sub process_file_upload {
my $has_overwrite = $q->param('overwrite_yes')
|| $q->param('overwrite_no');
my %param = (
middle_path => $q->param('middle_path'),
site_path => $q->param('site_path'),
extra_path => $q->param('extra_path'),
middle_path => $q->param('middle_path') || '',
site_path => $q->param('site_path') || '',
extra_path => $q->param('extra_path') || '',
upload_mode => $app->mode,
);
return {
Expand Down Expand Up @@ -308,7 +308,15 @@ sub process_file_upload {
$asset->image_width($w);
$asset->image_height($h);
}
$asset->save;
$asset->save
or return {
status => ERROR(),
message =>
$app->translate(
"Error saving asset: [_1]",
$asset->errstr
)
};
$app->run_callbacks( 'cms_post_save.asset', $app, $asset, $original );

if ($is_image) {
Expand Down Expand Up @@ -366,7 +374,6 @@ sub process_file_upload {
blog => $blog
);
}

return {
status => SUCCESS(),
asset => { id => $asset->id, url => $asset->url, object => $asset },
Expand Down

0 comments on commit 8722da5

Please sign in to comment.