- |
+ |
@@ -73,13 +72,8 @@
diff --git a/chrome/content/zotero/tinymce/themes/advanced/img/icons.gif b/chrome/content/zotero/tinymce/themes/advanced/img/icons.gif
index ccac36f54..e46de5333 100755
Binary files a/chrome/content/zotero/tinymce/themes/advanced/img/icons.gif and b/chrome/content/zotero/tinymce/themes/advanced/img/icons.gif differ
diff --git a/chrome/content/zotero/tinymce/themes/advanced/js/anchor.js b/chrome/content/zotero/tinymce/themes/advanced/js/anchor.js
index b5efd1ec9..7fe781055 100755
--- a/chrome/content/zotero/tinymce/themes/advanced/js/anchor.js
+++ b/chrome/content/zotero/tinymce/themes/advanced/js/anchor.js
@@ -5,7 +5,7 @@ var AnchorDialog = {
var action, elm, f = document.forms[0];
this.editor = ed;
- elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG');
+ elm = ed.dom.getParent(ed.selection.getNode(), 'A');
v = ed.dom.getAttrib(elm, 'name');
if (v) {
@@ -17,18 +17,18 @@ var AnchorDialog = {
},
update : function() {
- var ed = this.editor;
-
+ var ed = this.editor, elm, name = document.forms[0].anchorName.value;
+
tinyMCEPopup.restoreSelection();
if (this.action != 'update')
ed.selection.collapse(1);
- // Webkit acts weird if empty inline element is inserted so we need to use a image instead
- if (tinymce.isWebKit)
- ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('img', {mce_name : 'a', name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}));
+ elm = ed.dom.getParent(ed.selection.getNode(), 'A');
+ if (elm)
+ elm.name = name;
else
- ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}, ''));
+ ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, ''));
tinyMCEPopup.close();
}
diff --git a/chrome/content/zotero/tinymce/themes/advanced/js/charmap.js b/chrome/content/zotero/tinymce/themes/advanced/js/charmap.js
index 8467ef603..8c5aea172 100755
--- a/chrome/content/zotero/tinymce/themes/advanced/js/charmap.js
+++ b/chrome/content/zotero/tinymce/themes/advanced/js/charmap.js
@@ -1,3 +1,13 @@
+/**
+ * charmap.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
tinyMCEPopup.requireLangPack();
var charmap = [
diff --git a/chrome/content/zotero/tinymce/themes/advanced/js/image.js b/chrome/content/zotero/tinymce/themes/advanced/js/image.js
index 4982ce0c8..6423d9080 100755
--- a/chrome/content/zotero/tinymce/themes/advanced/js/image.js
+++ b/chrome/content/zotero/tinymce/themes/advanced/js/image.js
@@ -151,8 +151,8 @@ var ImageDialog = {
}
// Merge
- st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st));
- this.styleVal = dom.serializeStyle(st);
+ st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
+ this.styleVal = dom.serializeStyle(st, 'img');
}
},
diff --git a/chrome/content/zotero/tinymce/themes/advanced/js/link.js b/chrome/content/zotero/tinymce/themes/advanced/js/link.js
index 2974878e1..f67a5bc82 100755
--- a/chrome/content/zotero/tinymce/themes/advanced/js/link.js
+++ b/chrome/content/zotero/tinymce/themes/advanced/js/link.js
@@ -53,6 +53,7 @@ var LinkDialog = {
// Create new anchor elements
if (e == null) {
+ ed.getDoc().execCommand("unlink", false, null);
tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
tinymce.each(ed.dom.select("a"), function(n) {
@@ -62,8 +63,8 @@ var LinkDialog = {
ed.dom.setAttribs(e, {
href : f.href.value,
title : f.linktitle.value,
- target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null,
- 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null
+ target : f.target_list ? getSelectValue(f, "target_list") : null,
+ 'class' : f.class_list ? getSelectValue(f, "class_list") : null
});
}
});
@@ -71,8 +72,8 @@ var LinkDialog = {
ed.dom.setAttribs(e, {
href : f.href.value,
title : f.linktitle.value,
- target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null,
- 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null
+ target : f.target_list ? getSelectValue(f, "target_list") : null,
+ 'class' : f.class_list ? getSelectValue(f, "class_list") : null
});
}
@@ -92,7 +93,7 @@ var LinkDialog = {
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
n.value = 'mailto:' + n.value;
- if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
+ if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
n.value = 'http://' + n.value;
},
diff --git a/chrome/content/zotero/tinymce/themes/advanced/js/source_editor.js b/chrome/content/zotero/tinymce/themes/advanced/js/source_editor.js
index af2231cad..aca38bd88 100755
--- a/chrome/content/zotero/tinymce/themes/advanced/js/source_editor.js
+++ b/chrome/content/zotero/tinymce/themes/advanced/js/source_editor.js
@@ -2,7 +2,7 @@ tinyMCEPopup.requireLangPack();
tinyMCEPopup.onInit.add(onLoadInit);
function saveContent() {
- tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value);
+ tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
tinyMCEPopup.close();
}
@@ -13,7 +13,7 @@ function onLoadInit() {
if (tinymce.isGecko)
document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
- document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent();
+ document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
setWrap('soft');
@@ -44,19 +44,13 @@ function toggleWordWrap(elm) {
setWrap('off');
}
-var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
-
function resizeInputs() {
- var el = document.getElementById('htmlSource');
+ var vp = tinyMCEPopup.dom.getViewPort(window), el;
- if (!tinymce.isIE) {
- wHeight = self.innerHeight - 65;
- wWidth = self.innerWidth - 16;
- } else {
- wHeight = document.body.clientHeight - 70;
- wWidth = document.body.clientWidth - 16;
+ el = document.getElementById('htmlSource');
+
+ if (el) {
+ el.style.width = (vp.w - 20) + 'px';
+ el.style.height = (vp.h - 65) + 'px';
}
-
- el.style.height = Math.abs(wHeight) + 'px';
- el.style.width = Math.abs(wWidth) + 'px';
}
diff --git a/chrome/content/zotero/tinymce/themes/advanced/link.htm b/chrome/content/zotero/tinymce/themes/advanced/link.htm
index 286cc9247..7565b9ae8 100755
--- a/chrome/content/zotero/tinymce/themes/advanced/link.htm
+++ b/chrome/content/zotero/tinymce/themes/advanced/link.htm
@@ -7,7 +7,6 @@
-
|