Permalink
Browse files

Merge branch '3.0'

  • Loading branch information...
2 parents aa6f345 + 6114883 commit e4ab02e1c337fa2386a8ba48097036aa82b1272e @halkyon halkyon committed Sep 26, 2012
@@ -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");
}
@@ -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'));
});
}
});
@@ -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 ===
@@ -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
@@ -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
View
@@ -40,7 +40,7 @@ public function getContent() {
'/<\/body>(.*)/i',
),
'',
- $this->getDocument()->saveHTML()
+ urldecode($this->getDocument()->saveHTML())
)
);
}
@@ -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'));
}

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -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);
@@ -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
@@ -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');
}
@@ -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 == "")

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -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,
@@ -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

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -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) {
@@ -1307,7 +1310,7 @@
}
});
}
-
+ */
fixTableCaretPos();
ed.startContent = ed.getContent({format : 'raw'});

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -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);
@@ -167,7 +167,7 @@
theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
}, s);
}
-
+
// Default settings
t.settings = s = extend({
theme_advanced_path : true,
@@ -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')) {
@@ -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++) {
@@ -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"});
@@ -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;
@@ -1185,7 +1185,7 @@
return true;
});
}
-
+
if (s.theme_advanced_show_current_color) {
function updateColor(controlId, color) {
if (c = cm.get(controlId)) {

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit e4ab02e

Please sign in to comment.