Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset Plugin Enhancements #1838

Merged
merged 5 commits into from Sep 12, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 14 additions & 12 deletions system/cms/plugins/asset.php
Expand Up @@ -25,9 +25,10 @@ class Plugin_Asset extends Plugin
public function css()
{
$file = $this->attribute('file');
$file_min = $this->attribute('file_min');
$group = $this->attribute('group');

return Asset::css($file, NULL, $group);
return Asset::css($file, $file_min, $group);
}

/**
Expand All @@ -45,7 +46,7 @@ public function css_url()
{
$file = $this->attribute('file');

return Asset::get_filepath_js($file, true);
return Asset::get_filepath_css($file, TRUE);
}

/**
Expand All @@ -55,15 +56,15 @@ public function css_url()
*
* Usage:
*
* {{ asset:css_path file="" module="" }}
* {{ asset:css_path file="" }}
*
* @return string Path to the CSS asset relative to web root
*/
public function css_path()
{
$file = $this->attribute('file');

return BASE_URI.Asset::get_filepath_js($file, FALSE);
return BASE_URI.Asset::get_filepath_css($file, FALSE);
}

/**
Expand Down Expand Up @@ -104,7 +105,7 @@ public function image_url()
{
$file = $this->attribute('file');

return Asset::get_filepath_img($file, true);
return Asset::get_filepath_img($file, TRUE);
}

/**
Expand All @@ -122,7 +123,7 @@ public function image_path()
{
$file = $this->attribute('file');

return BASE_URI.Asset::get_filepath_img($file, false);
return BASE_URI.Asset::get_filepath_img($file, FALSE);
}

/**
Expand All @@ -139,9 +140,10 @@ public function image_path()
public function js()
{
$file = $this->attribute('file');
$file_min = $this->attribute('file_min');
$group = $this->attribute('group');

return Asset::js($file, NULL, $group);
return Asset::js($file, $file_min, $group);
}

/**
Expand All @@ -159,7 +161,7 @@ public function js_url()
{
$file = $this->attribute('file');

return Asset::get_filepath_js($file, true);
return Asset::get_filepath_js($file, TRUE);
}

/**
Expand All @@ -177,7 +179,7 @@ public function js_path()
{
$file = $this->attribute('file');

return BASE_URI.Asset::get_filepath_js($file, false);
return BASE_URI.Asset::get_filepath_js($file, FALSE);
}

/**
Expand All @@ -193,7 +195,7 @@ public function js_path()
*/
public function render()
{
$group = $this->attribute('group', false);
$group = $this->attribute('group', FALSE);

return Asset::render($group);
}
Expand All @@ -211,7 +213,7 @@ public function render()
*/
public function render_css()
{
$group = $this->attribute('group', false);
$group = $this->attribute('group', FALSE);

return Asset::render_css($group);
}
Expand All @@ -229,7 +231,7 @@ public function render_css()
*/
public function render_js()
{
$group = $this->attribute('group', false);
$group = $this->attribute('group', FALSE);

return Asset::render_js($group);
}
Expand Down