Commit 0e7ce5c1 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic

Bug 1813987: removing static class in blocks

behatnotneeded

Change-Id: I137addd84013d4de46509cd83ce1e4eb376dd86c
parent 3ab2c912
......@@ -45,10 +45,6 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
return $view->get('group') == null;
}
public static function has_static_content() {
return false;
}
/**
* defines if the title should be shown if there is no content in the block
*
......
......@@ -278,8 +278,4 @@ class PluginBlocktypeBlog extends MaharaCoreBlocktype {
. $configdata['artefactid'] . '&view=' . $instance->get('view');
}
}
public static function has_static_content() {
return false;
}
}
......@@ -550,11 +550,6 @@ EOF;
public static function allowed_in_view(View $view) {
return $view->get('owner') != null;
}
public static function has_static_content() {
return false;
}
}
function translate_ids_to_tags(array $ids) {
......
......@@ -108,8 +108,4 @@ class PluginBlocktypeComment extends MaharaCoreBlocktype {
public static function get_artefacts(BlockInstance $instance) {
return array();
}
public static function has_static_content() {
return false;
}
}
......@@ -447,8 +447,4 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
public static function import_create_blockinstance_leap(array $biconfig, array $viewconfig) {
return PluginArtefactInternal::import_create_blockinstance_leap($biconfig, $viewconfig);
}
public static function has_static_content() {
return false;
}
}
......@@ -243,8 +243,4 @@ class PluginBlocktypeSocialprofile extends MaharaCoreBlocktype {
return PluginArtefactInternal::import_create_blockinstance_leap($biconfig, $viewconfig);
}
public static function has_static_content() {
return false;
}
}
......@@ -174,8 +174,4 @@ class PluginBlocktypePeerassessment extends MaharaCoreBlocktype {
$artefacts = get_records_sql_array($sql, $values);
return $artefacts;
}
public static function has_static_content() {
return false;
}
}
......@@ -234,8 +234,4 @@ class PluginBlocktypePlans extends MaharaCoreBlocktype {
}
return $artefacts;
}
public static function has_static_content() {
return false;
}
}
......@@ -173,8 +173,4 @@ class PluginBlocktypeEntireresume extends MaharaCoreBlocktype {
public static function allowed_in_view(View $view) {
return true;
}
public static function has_static_content() {
return false;
}
}
......@@ -636,8 +636,4 @@ class PluginBlocktypeExternalfeed extends MaharaCoreBlocktype {
public static function get_artefacts(BlockInstance $instance) {
return array();
}
public static function has_static_content() {
return false;
}
}
......@@ -475,8 +475,4 @@ class PluginBlocktypeGroupViews extends MaharaCoreBlocktype {
public static function get_artefacts(BlockInstance $instance) {
return array();
}
public static function has_static_content() {
return false;
}
}
......@@ -177,7 +177,4 @@ class PluginBlocktypeInbox extends MaharaCoreBlocktype {
return array();
}
public static function has_static_content() {
return false;
}
}
......@@ -777,10 +777,6 @@ EOF;
public static function display_for_roles($roles) {
return !(count($roles) == 1 && $roles[0] == 'peer');
}
public static function has_static_content() {
return true;
}
}
......@@ -1252,7 +1248,7 @@ class BlockInstance {
$smarty->assign('strremovetitletexttooltip', get_string('removeblock2', 'view'));
$smarty->assign('lockblocks', ($this->get_view()->get('lockblocks') && $this->get_view()->get('owner'))); // Only lock blocks for user's portfolio pages
if (!$configure && $title) {
if ( $title) {
$configdata = $this->get('configdata');
if (isset($configdata['retractable']) && $configdata['retractable']) {
$smarty->assign('retractable', true);
......
......@@ -178,8 +178,4 @@ class PluginBlocktypeMyfriends extends MaharaCoreBlocktype {
public static function get_artefacts(BlockInstance $instance) {
return array();
}
public static function has_static_content() {
return false;
}
}
......@@ -181,7 +181,4 @@ class PluginBlocktypeMyGroups extends MaharaCoreBlocktype {
return array();
}
public static function has_static_content() {
return false;
}
}
......@@ -148,8 +148,4 @@ class PluginBlocktypeMyviews extends MaharaCoreBlocktype {
public static function get_artefacts(BlockInstance $instance) {
return array();
}
public static function has_static_content() {
return false;
}
}
......@@ -98,7 +98,4 @@ class PluginBlocktypeNewViews extends MaharaCoreBlocktype {
return array();
}
public static function has_static_content() {
return false;
}
}
......@@ -240,8 +240,4 @@ class PluginBlocktypeRecentForumPosts extends MaharaCoreBlocktype {
public static function get_artefacts(BlockInstance $instance) {
return array();
}
public static function has_static_content() {
return false;
}
}
......@@ -345,10 +345,6 @@ EOF;
public static function get_artefacts(BlockInstance $instance) {
return array();
}
public static function has_static_content() {
return false;
}
}
class ActivityTypeBlocktypeWallWallpost extends ActivityTypePlugin {
......
......@@ -396,8 +396,4 @@ class PluginBlocktypeWatchlist extends MaharaCoreBlocktype {
return array($views, count($views));
}
public static function has_static_content() {
return false;
}
}
......@@ -185,24 +185,22 @@ function updateBlockSizes(grid) {
grid = $('.grid-stack');
}
$.each(grid.children(), function(index, element) {
// if (!$(element).hasClass('staticblock')) {
var width = $(element).attr('data-gs-width'),
prevHeight = $(element).attr('data-gs-height'),
height = Math.ceil(
(
$(element).find('.grid-stack-item-content .gridstackblock')[0].scrollHeight +
grid.data('gridstack').opts.verticalMargin
)
/
(
grid.data('gridstack').cellHeight() +
grid.data('gridstack').opts.verticalMargin
)
);
if (+prevHeight != height) {
grid.data('gridstack').resize(element, +width, height);
}
//}
var width = $(element).attr('data-gs-width'),
prevHeight = $(element).attr('data-gs-height'),
height = Math.ceil(
(
$(element).find('.grid-stack-item-content .gridstackblock')[0].scrollHeight +
grid.data('gridstack').opts.verticalMargin
)
/
(
grid.data('gridstack').cellHeight() +
grid.data('gridstack').opts.verticalMargin
)
);
if (+prevHeight != height) {
grid.data('gridstack').resize(element, +width, height);
}
});
}
......
......@@ -2089,9 +2089,6 @@ class View {
}
else {
$result = $blockinstance->render_viewing($exporting, $versioning);
if (call_static_method(generate_class_name('blocktype', $blockinstance->get('blocktype')), 'has_static_content') && !defined('BEHAT_TEST')) {
$block['class'] = 'staticblock';
}
}
$block['content'] = $result;
$block['width'] = $blockinstance->get('width');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment