Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Harvey committed Sep 26, 2012
2 parents aa6f345 + 6114883 commit e4ab02e
Show file tree
Hide file tree
Showing 17 changed files with 222 additions and 69 deletions.
6 changes: 4 additions & 2 deletions admin/javascript/LeftAndMain.FieldHelp.js
Expand Up @@ -6,15 +6,17 @@
*/
$(".cms form .field .middleColumn > [title]").entwine({
onmatch: function() {

var title = this.prop("title");
var field = this.closest(".field");

if(title && title.length) {
if(title && title.length && field.has('.help').length == 0) {
var span = $("<span></span>", {
"class": "help",
"text": title
});

this.closest(".field").append(span);
field.append(span);
this.removeProp("title");
}

Expand Down
4 changes: 2 additions & 2 deletions admin/javascript/LeftAndMain.js
Expand Up @@ -945,8 +945,8 @@ jQuery.noConflict();
*/
rewriteHashlinks: function() {
$(this).find('ul a').each(function() {
var href = $(this).attr('href').replace(/.*(#.*)/, '$1');
if(href) $(this).attr('href', href);
var href = $(this).attr('href');
if(href) $(this).attr('href', href.replace(/.*(#.*)/, '$1'));
});
}
});
Expand Down
3 changes: 2 additions & 1 deletion docs/en/reference/image.md
Expand Up @@ -29,7 +29,7 @@ your tmp folder.
$image->resize(width,height); // Basic resize, just skews the image
$image->resizeRatio(width,height) // Resizes an image with max width and height
$image->paddedResize(width,height) // Adds padding after resizing to width or height.
$image->croppedResize(width,height) // Crops the image from the centre, to given values.
$image->croppedImage(width,height) // Crops the image from the centre, to given values.
$image->resizeByHeight(height) // Maximum height the image resizes to, keeps proportion
$image->resizeByWidth(width) // Maximum width the image resizes to, keeps proportion
$image->greyscale(r,g,b) // alters image channels ===
Expand Down Expand Up @@ -96,6 +96,7 @@ For output of an image tag with the image automatically resized to 80px width, y
$Image.SetHeight(80) // returns a image 80px tall, ration kept the same
$Image.SetSize(80,80) // returns a 80x80px padded image
$Image.SetRatioSize(80,80) // Returns an image scaled proportional, with its greatest diameter scaled to 80px
$Image.CroppedImage(80,80) // Returns an 80x80 image cropped from the center.
$Image.PaddedImage(80, 80) // Returns an 80x80 image. Unused space is padded white. No crop. No stretching
$Image.Width // returns width of image
$Image.Height // returns height of image
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/templates.md
Expand Up @@ -294,7 +294,7 @@ the scope back to the previous level. Take the following example:
With a page structure (Blog -> Blog entry -> Child blog entry) the
above will produce:

:::sss
:::ss
Blog
--
Blog entry
Expand Down
2 changes: 1 addition & 1 deletion model/HTMLValue.php
Expand Up @@ -40,7 +40,7 @@ public function getContent() {
'/<\/body>(.*)/i',
),
'',
$this->getDocument()->saveHTML()
urldecode($this->getDocument()->saveHTML())
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/search/FulltextSearchableTest.php
Expand Up @@ -32,7 +32,7 @@ public function testEnableWithCustomClasses() {
$this->assertTrue(Object::has_extension('File', 'FulltextSearchable'));

// TODO This shouldn't need all arguments included
Object::remove_extension('File', 'FulltextSearchable(\'"Filename","Title","Content"\')');
Object::remove_extension('File', 'FulltextSearchable(\'"Title","Filename","Content"\')');

$this->assertFalse(Object::has_extension('File', 'FulltextSearchable'));
}
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/tinymce/langs/hu.js

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions thirdparty/tinymce/plugins/advlink/js/advlink.js
Expand Up @@ -64,13 +64,14 @@ function init() {
if (elm != null && elm.nodeName == "A")
action = "update";

formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);

setPopupControlsDisabled(true);

if (action == "update") {
var href = inst.dom.getAttrib(elm, 'href');
var onclick = inst.dom.getAttrib(elm, 'onclick');
var linkTarget = inst.dom.getAttrib(elm, 'target') ? inst.dom.getAttrib(elm, 'target') : "_self";

// Setup form data
setFormValue('href', href);
Expand Down Expand Up @@ -98,7 +99,7 @@ function init() {
setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
setFormValue('target', inst.dom.getAttrib(elm, 'target'));
setFormValue('target', linkTarget);
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));

// Parse onclick data
Expand All @@ -119,7 +120,7 @@ function init() {
addClassesToList('classlist', 'advlink_styles');

selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
selectByValue(formObj, 'targetlist', linkTarget, true);
} else
addClassesToList('classlist', 'advlink_styles');
}
Expand Down Expand Up @@ -377,6 +378,9 @@ function getAnchorListHTML(id, target) {
for (i=0, len=nodes.length; i<len; i++) {
if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
html += '<option value="#' + name + '">' + name + '</option>';

if ((name = nodes[i].id) != "" && !nodes[i].href)
html += '<option value="#' + name + '">' + name + '</option>';
}

if (html == "")
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/tinymce/plugins/paste/editor_plugin.js

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions thirdparty/tinymce/plugins/paste/editor_plugin_src.js
Expand Up @@ -23,6 +23,7 @@
paste_convert_headers_to_strong : false,
paste_dialog_width : "450",
paste_dialog_height : "400",
paste_max_consecutive_linebreaks: 2,
paste_text_use_dialog : false,
paste_text_sticky : false,
paste_text_sticky_default : false,
Expand Down Expand Up @@ -790,10 +791,23 @@
[/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
/<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
[/&nbsp;/gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"],// Cool little RegExp deletes whitespace around linebreak chars.
[/\n{3,}/g, "\n\n"] // Max. 2 consecutive linebreaks
[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"] // Cool little RegExp deletes whitespace around linebreak chars.
]);

var maxLinebreaks = Number(getParam(ed, "paste_max_consecutive_linebreaks"));
if (maxLinebreaks > -1) {
var maxLinebreaksRegex = new RegExp("\n{" + (maxLinebreaks + 1) + ",}", "g");
var linebreakReplacement = "";

while (linebreakReplacement.length < maxLinebreaks) {
linebreakReplacement += "\n";
}

process([
[maxLinebreaksRegex, linebreakReplacement] // Limit max consecutive linebreaks
]);
}

content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content));

// Perform default or custom replacements
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/tinymce/plugins/table/editor_plugin.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion thirdparty/tinymce/plugins/table/editor_plugin_src.js
Expand Up @@ -1294,7 +1294,10 @@

/**
* Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
*
* Removed: Since the new enter logic seems to fix this one.
*/
/*
if (tinymce.isGecko) {
ed.onKeyDown.add(function(ed, e) {
if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
Expand All @@ -1307,7 +1310,7 @@
}
});
}

*/

fixTableCaretPos();
ed.startContent = ed.getContent({format : 'raw'});
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/tinymce/themes/advanced/editor_template.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions thirdparty/tinymce/themes/advanced/editor_template_src.js
Expand Up @@ -150,7 +150,7 @@

init : function(ed, url) {
var t = this, s, v, o;

t.editor = ed;
t.url = url;
t.onResolveName = new tinymce.util.Dispatcher(this);
Expand All @@ -167,7 +167,7 @@
theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
}, s);
}

// Default settings
t.settings = s = extend({
theme_advanced_path : true,
Expand Down Expand Up @@ -678,7 +678,7 @@
if (DOM.get(ed.id + '_path_row')) {
Event.add(ed.id + '_tbl', 'mouseover', function(e) {
var re;
e = e.target;
if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
Expand Down Expand Up @@ -956,7 +956,7 @@
a = s.theme_advanced_toolbar_align.toLowerCase();
a = 'mce' + t._ufirst(a);

n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"});
n = DOM.add(DOM.add(c, 'tr', {role: 'toolbar'}), 'td', {'class' : 'mceToolbar ' + a, "role":"toolbar"});

// Create toolbar and add the controls
for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
Expand Down Expand Up @@ -986,15 +986,15 @@
var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;

n = DOM.add(tb, 'tr');
n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
if (s.theme_advanced_path) {
DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
DOM.add(n, 'span', {}, ': ');
} else {
DOM.add(n, 'span', {}, '&#160;');
}


if (s.theme_advanced_resizing) {
DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"});
Expand Down Expand Up @@ -1154,7 +1154,7 @@

if (!fn && n.style.fontFamily)
fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();

if (!fc && n.style.color)
fc = n.style.color;

Expand Down Expand Up @@ -1185,7 +1185,7 @@
return true;
});
}

if (s.theme_advanced_show_current_color) {
function updateColor(controlId, color) {
if (c = cm.get(controlId)) {
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/tinymce/themes/advanced/langs/cy_dlg.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion thirdparty/tinymce/tiny_mce.js

Large diffs are not rendered by default.

0 comments on commit e4ab02e

Please sign in to comment.