Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
7ea969f1
Commit
7ea969f1
authored
Aug 01, 2016
by
Son Nguyen
Committed by
Gerrit Code Review
Aug 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Bug 1605110: Raw theme table border style overrides user settings"
parents
fbe287b6
63f91a7e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
17 deletions
+25
-17
htdocs/js/tinymce/README.Mahara
htdocs/js/tinymce/README.Mahara
+1
-0
htdocs/js/tinymce/plugins/table/classes/Dialogs.js
htdocs/js/tinymce/plugins/table/classes/Dialogs.js
+10
-8
htdocs/js/tinymce/plugins/table/plugin.js
htdocs/js/tinymce/plugins/table/plugin.js
+10
-8
htdocs/lib/web.php
htdocs/lib/web.php
+1
-0
htdocs/theme/raw/sass/features/_user-pages.scss
htdocs/theme/raw/sass/features/_user-pages.scss
+3
-1
No files found.
htdocs/js/tinymce/README.Mahara
View file @
7ea969f1
...
...
@@ -15,3 +15,4 @@ Changes:
* Added code to spellchecker/spellchecker.rpc to use $CFG->spellcheckerengine
* Adjusted the charmap plugin to contain Māori macrons
* Adding the 'aria-hidden="true"' to presentation icons
* Bug 1605110: Modified the "table" plugin to style the table through CSS instead of HTML attributes
\ No newline at end of file
htdocs/js/tinymce/plugins/table/classes/Dialogs.js
View file @
7ea969f1
...
...
@@ -221,7 +221,7 @@ define("tinymce/tableplugin/Dialogs", [
if
(
editor
.
settings
.
table_style_by_css
)
{
stylesToMerge
=
[];
stylesToMerge
.
push
({
name
:
'
border
'
,
value
:
data
.
border
});
stylesToMerge
.
push
({
name
:
'
border
-width
'
,
value
:
addSizeSuffix
(
data
.
border
)
});
stylesToMerge
.
push
({
name
:
'
border-spacing
'
,
value
:
addSizeSuffix
(
data
.
cellspacing
)});
mergeStyles
(
dom
,
tableElm
,
stylesToMerge
);
dom
.
setAttribs
(
tableElm
,
{
...
...
@@ -231,7 +231,8 @@ define("tinymce/tableplugin/Dialogs", [
});
if
(
tableElm
.
children
)
{
for
(
var
i
=
0
;
i
<
tableElm
.
children
.
length
;
i
++
)
{
styleTDTH
(
tableElm
.
children
[
i
],
'
border
'
,
data
.
border
);
styleTDTH
(
tableElm
.
children
[
i
],
'
border-width
'
,
addSizeSuffix
(
data
.
border
));
styleTDTH
(
tableElm
.
children
[
i
],
'
border-color
'
,
data
.
borderColor
);
styleTDTH
(
tableElm
.
children
[
i
],
'
padding
'
,
addSizeSuffix
(
data
.
cellpadding
));
}
}
...
...
@@ -302,14 +303,15 @@ define("tinymce/tableplugin/Dialogs", [
if
(
tableElm
)
{
data
=
{
width
:
removePxSuffix
(
dom
.
getStyle
(
tableElm
,
'
width
'
)
||
dom
.
getAttrib
(
tableElm
,
'
width
'
)
)
,
height
:
removePxSuffix
(
dom
.
getStyle
(
tableElm
,
'
height
'
)
||
dom
.
getAttrib
(
tableElm
,
'
height
'
)
)
,
cellspacing
:
removePxSuffix
(
dom
.
getStyle
(
tableElm
,
'
border-spacing
'
)
||
dom
.
getAttrib
(
tableElm
,
'
cellspacing
'
)
)
,
width
:
dom
.
getStyle
(
tableElm
,
'
width
'
)
||
dom
.
getAttrib
(
tableElm
,
'
width
'
),
height
:
dom
.
getStyle
(
tableElm
,
'
height
'
)
||
dom
.
getAttrib
(
tableElm
,
'
height
'
),
cellspacing
:
dom
.
getStyle
(
tableElm
,
'
border-spacing
'
)
||
dom
.
getAttrib
(
tableElm
,
'
cellspacing
'
),
cellpadding
:
dom
.
getAttrib
(
tableElm
,
'
data-mce-cell-padding
'
)
||
dom
.
getAttrib
(
tableElm
,
'
cellpadding
'
)
||
getTDTHOverallStyle
(
tableElm
,
'
padding
'
),
border
:
dom
.
getAttrib
(
tableElm
,
'
data-mce-border
'
)
||
dom
.
getAttrib
(
tableElm
,
'
border
'
)
||
getTDTHOverallStyle
(
tableElm
,
'
border
'
),
border
:
dom
.
getStyle
(
tableElm
,
'
border-width
'
)
||
dom
.
getAttrib
(
tableElm
,
'
data-mce-border
'
)
||
dom
.
getAttrib
(
tableElm
,
'
border
'
)
||
getTDTHOverallStyle
(
tableElm
,
'
border
'
),
borderColor
:
dom
.
getAttrib
(
tableElm
,
'
data-mce-border-color
'
),
caption
:
!!
dom
.
select
(
'
caption
'
,
tableElm
)[
0
],
'
class
'
:
dom
.
getAttrib
(
tableElm
,
'
class
'
)
...
...
htdocs/js/tinymce/plugins/table/plugin.js
View file @
7ea969f1
...
...
@@ -80,7 +80,7 @@
target
[
fragments
[
fragments
.
length
-
1
]]
=
modules
[
id
];
}
// Expose private modules for unit tests
if
(
exports
.
AMDLC_TESTS
)
{
privateModules
=
exports
.
privateModules
||
{};
...
...
@@ -1846,7 +1846,7 @@ define("tinymce/tableplugin/Dialogs", [
if
(
editor
.
settings
.
table_style_by_css
)
{
stylesToMerge
=
[];
stylesToMerge
.
push
({
name
:
'
border
'
,
value
:
data
.
border
});
stylesToMerge
.
push
({
name
:
'
border
-width
'
,
value
:
addSizeSuffix
(
data
.
border
)
});
stylesToMerge
.
push
({
name
:
'
border-spacing
'
,
value
:
addSizeSuffix
(
data
.
cellspacing
)});
mergeStyles
(
dom
,
tableElm
,
stylesToMerge
);
dom
.
setAttribs
(
tableElm
,
{
...
...
@@ -1856,7 +1856,8 @@ define("tinymce/tableplugin/Dialogs", [
});
if
(
tableElm
.
children
)
{
for
(
var
i
=
0
;
i
<
tableElm
.
children
.
length
;
i
++
)
{
styleTDTH
(
tableElm
.
children
[
i
],
'
border
'
,
data
.
border
);
styleTDTH
(
tableElm
.
children
[
i
],
'
border-width
'
,
addSizeSuffix
(
data
.
border
));
styleTDTH
(
tableElm
.
children
[
i
],
'
border-color
'
,
data
.
borderColor
);
styleTDTH
(
tableElm
.
children
[
i
],
'
padding
'
,
addSizeSuffix
(
data
.
cellpadding
));
}
}
...
...
@@ -1927,13 +1928,14 @@ define("tinymce/tableplugin/Dialogs", [
if
(
tableElm
)
{
data
=
{
width
:
removePxSuffix
(
dom
.
getStyle
(
tableElm
,
'
width
'
)
||
dom
.
getAttrib
(
tableElm
,
'
width
'
)
)
,
height
:
removePxSuffix
(
dom
.
getStyle
(
tableElm
,
'
height
'
)
||
dom
.
getAttrib
(
tableElm
,
'
height
'
)
)
,
cellspacing
:
removePxSuffix
(
dom
.
getStyle
(
tableElm
,
'
border-spacing
'
)
||
dom
.
getAttrib
(
tableElm
,
'
cellspacing
'
)
)
,
width
:
dom
.
getStyle
(
tableElm
,
'
width
'
)
||
dom
.
getAttrib
(
tableElm
,
'
width
'
),
height
:
dom
.
getStyle
(
tableElm
,
'
height
'
)
||
dom
.
getAttrib
(
tableElm
,
'
height
'
),
cellspacing
:
dom
.
getStyle
(
tableElm
,
'
border-spacing
'
)
||
dom
.
getAttrib
(
tableElm
,
'
cellspacing
'
),
cellpadding
:
dom
.
getAttrib
(
tableElm
,
'
data-mce-cell-padding
'
)
||
dom
.
getAttrib
(
tableElm
,
'
cellpadding
'
)
||
getTDTHOverallStyle
(
tableElm
,
'
padding
'
),
border
:
dom
.
getAttrib
(
tableElm
,
'
data-mce-border
'
)
||
dom
.
getAttrib
(
tableElm
,
'
border
'
)
||
border
:
dom
.
getStyle
(
tableElm
,
'
border-width
'
)
||
dom
.
getAttrib
(
tableElm
,
'
data-mce-border
'
)
||
dom
.
getAttrib
(
tableElm
,
'
border
'
)
||
getTDTHOverallStyle
(
tableElm
,
'
border
'
),
borderColor
:
dom
.
getAttrib
(
tableElm
,
'
data-mce-border-color
'
),
caption
:
!!
dom
.
select
(
'
caption
'
,
tableElm
)[
0
],
...
...
htdocs/lib/web.php
View file @
7ea969f1
...
...
@@ -277,6 +277,7 @@ function smarty($javascript = array(), $headers = array(), $pagestrings = array(
menubar: false,
fix_list_elements: true,
image_advtab: true,
table_style_by_css: true,
{$spellchecker_config}
EOF;
}
...
...
htdocs/theme/raw/sass/features/_user-pages.scss
View file @
7ea969f1
...
...
@@ -61,11 +61,13 @@
table
{
border-spacing
:
0
;
border-color
:
$gray-light
;
border-width
:
1px
;
}
table
,
table
td
{
border
:
1px
solid
$gray-light
;
border
-style
:
solid
;
}
table
td
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment