diff --git a/lib/editor/atto/plugins/table/lang/en/atto_table.php b/lib/editor/atto/plugins/table/lang/en/atto_table.php
index 3a8abc3573f..0daa66a8acb 100644
--- a/lib/editor/atto/plugins/table/lang/en/atto_table.php
+++ b/lib/editor/atto/plugins/table/lang/en/atto_table.php
@@ -26,17 +26,9 @@ $string['addcolumnafter'] = 'Insert column after';
$string['addrowafter'] = 'Insert row after';
$string['all'] = 'Around each cell';
$string['allowbackgroundcolour'] = 'Allow background colour';
-$string['allowbackgroundcolour_desc'] = 'Allow users to set the background colour for the table';
-$string['allowborder'] = 'Allow borders';
-$string['allowborder_desc'] = 'If enabled, table and cell borders can be customised. The default border is a solid, 1px, black line.';
-$string['allowborderstyle'] = 'Allow border styling';
-$string['allowborderstyle_desc'] = 'This setting has no effect unless \'Allow borders\' is enabled.';
-$string['allowbordersize'] = 'Allow border size control';
-$string['allowbordersize_desc'] = 'This setting has no effect unless \'Allow borders\' is enabled.';
-$string['allowbordercolour'] = 'Allow border colour';
-$string['allowbordercolour_desc'] = 'This setting has no effect unless \'Allow borders\' is enabled.';
+$string['allowborder'] = 'Allow border styling';
+$string['allowborder_desc'] = 'If enabled, table and cell borders can be customised.';
$string['allowwidth'] = 'Allow width';
-$string['allowwidth_desc'] = 'Allow users to set the width of the tables.';
$string['appearance'] = 'Appearance';
$string['backgroundcolour'] = 'Background colour';
$string['both'] = 'Both';
@@ -44,7 +36,6 @@ $string['bordercolour'] = 'Border colour';
$string['borders'] = 'Borders';
$string['bordersize'] = 'Size of borders';
$string['borderstyles'] = 'Style of borders';
-$string['borderstyles_desc'] = 'Allowed border styles, separated by commas';
$string['caption'] = 'Caption';
$string['captionposition'] = 'Caption position';
$string['columns'] = 'Columns';
@@ -53,14 +44,8 @@ $string['deletecolumn'] = 'Delete column';
$string['deleterow'] = 'Delete row';
$string['dashed'] = 'Dashed';
$string['dotted'] = 'Dotted';
-$string['double'] = 'Double';
$string['edittable'] = 'Edit table';
-$string['groove'] = 'Groove';
$string['headers'] = 'Define headers on';
-$string['hidden'] = 'Hidden';
-$string['inherit'] = 'Inherit';
-$string['initial'] = 'Initial';
-$string['inset'] = 'Inset';
$string['movecolumnleft'] = 'Move column left';
$string['movecolumnright'] = 'Move column right';
$string['moverowdown'] = 'Move row down';
@@ -70,14 +55,11 @@ $string['none'] = 'None';
$string['numberofcolumns'] = 'Number of columns';
$string['numberofrows'] = 'Number of rows';
$string['outer'] = 'Around table';
-$string['outset'] = 'Outset';
$string['pluginname'] = 'Table';
-$string['ridge'] = 'Ridge';
$string['rows'] = 'Rows';
$string['settings'] = 'Table settings';
$string['solid'] = 'Solid';
$string['themedefault'] = 'Theme default';
$string['transparent'] = 'Transparent';
-$string['unset'] = 'Unset';
$string['updatetable'] = 'Update table';
$string['width'] = 'Table width (in %)';
diff --git a/lib/editor/atto/plugins/table/lib.php b/lib/editor/atto/plugins/table/lib.php
index d729a2c4d20..4d177aee70d 100644
--- a/lib/editor/atto/plugins/table/lib.php
+++ b/lib/editor/atto/plugins/table/lib.php
@@ -60,19 +60,10 @@ function atto_table_strings_for_js() {
'width',
'outer',
'noborder',
- 'inherit',
'themedefault',
- 'initial',
- 'unset',
- 'hidden',
'dotted',
'dashed',
- 'solid',
- 'double',
- 'groove',
- 'ridge',
- 'inset',
- 'outset'),
+ 'solid'),
'atto_table');
$PAGE->requires->strings_for_js(array('top',
@@ -88,12 +79,7 @@ function atto_table_strings_for_js() {
*/
function atto_table_params_for_js($elementid, $options, $foptions) {
$params = array('allowBorders' => (bool) get_config('atto_table', 'allowborders'),
- 'allowBorderStyles' => (bool) get_config('atto_table', 'allowborderstyles'),
- 'borderStyles' => get_config('atto_table', 'borderstyles'),
- 'allowBorderSize' => (bool) get_config('atto_table', 'allowbordersize'),
- 'allowBorderColour' => (bool) get_config('atto_table', 'allowbordercolour'),
'allowWidth' => (bool) get_config('atto_table', 'allowwidth'),
- 'availableColors' => get_config('atto_table', 'availablecolors'),
'allowBackgroundColour' => (bool) get_config('atto_table', 'allowbackgroundcolour'));
return $params;
}
diff --git a/lib/editor/atto/plugins/table/settings.php b/lib/editor/atto/plugins/table/settings.php
index 3e7c181537d..df0448d3931 100644
--- a/lib/editor/atto/plugins/table/settings.php
+++ b/lib/editor/atto/plugins/table/settings.php
@@ -38,77 +38,21 @@ if ($ADMIN->fulltree) {
$default);
$settings->add($setting);
- $name = new lang_string('allowborderstyle', 'atto_table');
- $desc = new lang_string('allowborderstyle_desc', 'atto_table');
- $default = 0;
-
- $setting = new admin_setting_configcheckbox('atto_table/allowborderstyles',
- $name,
- $desc,
- $default);
- $settings->add($setting);
-
- $name = new lang_string('borderstyles', 'atto_table');
- $desc = new lang_string('borderstyles_desc', 'atto_table');
- $default = array(
- 'initial' => new lang_string('initial', 'atto_table'),
- 'unset' => new lang_string('unset', 'atto_table'),
- 'none' => new lang_string('none', 'atto_table'),
- 'hidden' => new lang_string('hidden', 'atto_table'),
- 'dotted' => new lang_string('dotted', 'atto_table'),
- 'dashed' => new lang_string('dashed', 'atto_table'),
- 'solid' => new lang_string('solid', 'atto_table'),
- 'double' => new lang_string('double', 'atto_table'),
- 'groove' => new lang_string('groove', 'atto_table'),
- 'ridge' => new lang_string('ridge', 'atto_table'),
- 'inset' => new lang_string('inset', 'atto_table'),
- 'outset' => new lang_string('outset', 'atto_table'),
- );
-
- $setting = new admin_setting_configmultiselect('atto_table/borderstyles',
- $name,
- $desc,
- array_keys($default),
- $default);
- $settings->add($setting);
-
- $name = new lang_string('allowbordersize', 'atto_table');
- $desc = new lang_string('allowbordersize_desc', 'atto_table');
- $default = 0;
-
- $setting = new admin_setting_configcheckbox('atto_table/allowbordersize',
- $name,
- $desc,
- $default);
- $settings->add($setting);
-
- $name = new lang_string('allowbordercolour', 'atto_table');
- $desc = new lang_string('allowbordercolour_desc', 'atto_table');
- $default = 0;
-
- $setting = new admin_setting_configcheckbox('atto_table/allowbordercolour',
- $name,
- $desc,
- $default);
- $settings->add($setting);
-
$name = new lang_string('allowbackgroundcolour', 'atto_table');
- $desc = new lang_string('allowbackgroundcolour_desc', 'atto_table');
$default = 0;
$setting = new admin_setting_configcheckbox('atto_table/allowbackgroundcolour',
$name,
- $desc,
+ '',
$default);
$settings->add($setting);
$name = new lang_string('allowwidth', 'atto_table');
- $desc = new lang_string('allowwidth_desc', 'atto_table');
$default = 0;
$setting = new admin_setting_configcheckbox('atto_table/allowwidth',
$name,
- $desc,
+ '',
$default);
$settings->add($setting);
}
diff --git a/lib/editor/atto/plugins/table/tests/behat/table.feature b/lib/editor/atto/plugins/table/tests/behat/table.feature
index 05be36378ba..1083781ea59 100644
--- a/lib/editor/atto/plugins/table/tests/behat/table.feature
+++ b/lib/editor/atto/plugins/table/tests/behat/table.feature
@@ -40,9 +40,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 1 | atto_table |
- | allowbordersize | 1 | atto_table |
- | allowbordercolour | 1 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -66,9 +63,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 1 | atto_table |
- | allowbordersize | 1 | atto_table |
- | allowbordercolour | 1 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -105,9 +99,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 0 | atto_table |
- | allowborderstyles | 0 | atto_table |
- | allowbordersize | 0 | atto_table |
- | allowbordercolour | 0 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -140,9 +131,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 0 | atto_table |
- | allowborderstyles | 0 | atto_table |
- | allowbordersize | 0 | atto_table |
- | allowbordercolour | 0 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -155,12 +143,6 @@ Feature: Atto tables
And I click on "Show more buttons" "button"
And I click on "Table" "button"
When I click on "Edit table" "link"
- Then ".moodle-dialogue-base .atto_form .borders" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .customwidth" "css_element" should exist
And I click on "#FFFFFF" "radio" in the ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element"
And I set the field "Table width (in %)" to "100"
And I press "Update table"
@@ -176,9 +158,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 0 | atto_table |
- | allowbordersize | 0 | atto_table |
- | allowbordercolour | 0 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -191,9 +170,9 @@ Feature: Atto tables
And I click on "Show more buttons" "button"
When I click on "Table" "button"
Then ".moodle-dialogue-base .atto_form .borders" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should not exist
+ Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should exist
+ Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should exist
+ Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should exist
Then ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element" should exist
Then ".moodle-dialogue-base .atto_form .customwidth" "css_element" should exist
And I click on "#FFFFFF" "radio" in the ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element"
@@ -212,9 +191,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 0 | atto_table |
- | allowbordersize | 0 | atto_table |
- | allowbordercolour | 0 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -227,12 +203,6 @@ Feature: Atto tables
And I click on "Show more buttons" "button"
And I click on "Table" "button"
When I click on "Edit table" "link"
- Then ".moodle-dialogue-base .atto_form .borders" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .customwidth" "css_element" should exist
And I click on "#FFFFFF" "radio" in the ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element"
And I set the field "Table width (in %)" to "100"
And I set the field "Borders" to "Around each cell"
@@ -249,9 +219,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 1 | atto_table |
- | allowbordersize | 0 | atto_table |
- | allowbordercolour | 0 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -263,12 +230,6 @@ Feature: Atto tables
And I select the text in the "Blog entry body" Atto editor
And I click on "Show more buttons" "button"
When I click on "Table" "button"
- Then ".moodle-dialogue-base .atto_form .borders" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .customwidth" "css_element" should exist
And I click on "#FFFFFF" "radio" in the ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element"
And I set the field "Table width (in %)" to "100"
And I set the field "Borders" to "Around table"
@@ -287,9 +248,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 1 | atto_table |
- | allowbordersize | 0 | atto_table |
- | allowbordercolour | 0 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -302,12 +260,6 @@ Feature: Atto tables
And I click on "Show more buttons" "button"
And I click on "Table" "button"
When I click on "Edit table" "link"
- Then ".moodle-dialogue-base .atto_form .borders" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .customwidth" "css_element" should exist
And I click on "#FFFFFF" "radio" in the ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element"
And I set the field "Table width (in %)" to "100"
And I set the field "Borders" to "Around table"
@@ -326,9 +278,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 1 | atto_table |
- | allowbordersize | 1 | atto_table |
- | allowbordercolour | 0 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -340,12 +289,6 @@ Feature: Atto tables
And I select the text in the "Blog entry body" Atto editor
And I click on "Show more buttons" "button"
When I click on "Table" "button"
- Then ".moodle-dialogue-base .atto_form .borders" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .customwidth" "css_element" should exist
And I click on "#FFFFFF" "radio" in the ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element"
And I set the field "Table width (in %)" to "100"
And I set the field "Borders" to "Around table"
@@ -366,9 +309,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 1 | atto_table |
- | allowbordersize | 1 | atto_table |
- | allowbordercolour | 0 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -381,12 +321,6 @@ Feature: Atto tables
And I click on "Show more buttons" "button"
And I click on "Table" "button"
When I click on "Edit table" "link"
- Then ".moodle-dialogue-base .atto_form .borders" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should not exist
- Then ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .customwidth" "css_element" should exist
And I click on "#FFFFFF" "radio" in the ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element"
And I set the field "Table width (in %)" to "100"
And I set the field "Borders" to "Around table"
@@ -407,9 +341,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 1 | atto_table |
- | allowbordersize | 1 | atto_table |
- | allowbordercolour | 1 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -421,12 +352,6 @@ Feature: Atto tables
And I select the text in the "Blog entry body" Atto editor
And I click on "Show more buttons" "button"
When I click on "Table" "button"
- Then ".moodle-dialogue-base .atto_form .borders" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .customwidth" "css_element" should exist
And I click on "#FFFFFF" "radio" in the ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element"
And I set the field "Table width (in %)" to "100"
And I set the field "Borders" to "Around table"
@@ -449,9 +374,6 @@ Feature: Atto tables
Given the following config values are set as admin:
| config | value | plugin |
| allowborders | 1 | atto_table |
- | allowborderstyles | 1 | atto_table |
- | allowbordersize | 1 | atto_table |
- | allowbordercolour | 1 | atto_table |
| allowbackgroundcolour | 1 | atto_table |
| allowwidth | 1 | atto_table |
And I log in as "admin"
@@ -464,12 +386,6 @@ Feature: Atto tables
And I click on "Show more buttons" "button"
And I click on "Table" "button"
When I click on "Edit table" "link"
- Then ".moodle-dialogue-base .atto_form .borders" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .borderstyle" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordersize" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .bordercolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element" should exist
- Then ".moodle-dialogue-base .atto_form .customwidth" "css_element" should exist
And I click on "FFFFFF" "radio" in the ".moodle-dialogue-base .atto_form .backgroundcolour" "css_element"
And I set the field "Table width (in %)" to "100"
And I set the field "Borders" to "Around table"
diff --git a/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js
index e56ea6650df..7bc7a43a219 100644
--- a/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js
+++ b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js
@@ -35,7 +35,7 @@ YUI.add('moodle-atto_table-button', function (Y, NAME) {
var COMPONENT = 'atto_table',
DEFAULT = {
- BORDERSTYLE: 'inherit',
+ BORDERSTYLE: 'none',
BORDERWIDTH: '1'
},
DIALOGUE = {
@@ -84,52 +84,45 @@ var COMPONENT = 'atto_table',
'' +
'' +
' ' +
- '{{#if allowBorderStyles}}' +
- '' +
- '' +
- ' ' +
- '{{/if}}' +
- '{{#if allowBorderSize}}' +
- '' +
- '' +
- '' +
- ' ' +
- '{{/if}}' +
- '{{#if allowBorderColour}}' +
- '' +
- '