diff options
Diffstat (limited to 'wp-includes/js')
220 files changed, 9464 insertions, 3154 deletions
diff --git a/wp-includes/js/dbx.js b/wp-includes/js/dbx.js deleted file mode 100644 index 8e89c5a..0000000 --- a/wp-includes/js/dbx.js +++ /dev/null @@ -1,6 +0,0 @@ -// DBX2.05 :: Docking Boxes (dbx) -// ***************************************************** -// DOM scripting by brothercake -- http://www.brothercake.com/ -// GNU Lesser General Public License -- http://www.gnu.org/licenses/lgpl.html -//****************************************************** -var dbx;function dbxManager(sid){dbx = this;if(!/^[-_a-z0-9]+$/i.test(sid)) { alert('Error from dbxManager:\n"' + sid + '" is an invalid session ID'); return; }this.supported = !(document.getElementsByTagName('*').length == 0 || (navigator.vendor == 'KDE' && typeof window.sidebar == 'undefined'));if(!this.supported) { return; }this.etype = typeof document.addEventListener != 'undefined' ? 'addEventListener' : typeof document.attachEvent != 'undefined' ? 'attachEvent' : 'none';this.eprefix = (this.etype == 'attachEvent' ? 'on' : '');if(typeof window.opera != 'undefined' && parseFloat(navigator.userAgent.toLowerCase().split(/opera[\/ ]/)[1].split(' ')[0], 10) < 7.5){this.etype = 'none';}if(this.etype == 'none') { this.supported = false; return; }this.running = 0;this.sid = sid;this.savedata = {};this.cookiestate = this.getCookieState();};dbxManager.prototype.setCookieState = function(){var now = new Date();now.setTime(now.getTime() + (365*24*60*60*1000));var str = '';for(j in this.savedata){if(typeof this.savedata[j]!='function'){str += j + '=' + this.savedata[j] + '&'}}this.state = str.replace(/^(.+)&$/, '$1');this.cookiestring = this.state.replace(/,/g, '|');this.cookiestring = this.cookiestring.replace(/=/g, ':');if(typeof this.onstatechange == 'undefined' || this.onstatechange()){document.cookie = 'dbx-' + this.sid + '='+ this.cookiestring+ '; expires=' + now.toGMTString()+ '; path=/';}};dbxManager.prototype.getCookieState = function(){this.cookiestate = null;if(document.cookie){if(document.cookie.indexOf('dbx-' + this.sid)!=-1){this.cookie = document.cookie.split('dbx-' + this.sid + '=')[1].split(';')[0].split('&');for(var i in this.cookie){if(typeof this.cookie[i]!='function'){this.cookie[i] = this.cookie[i].replace(/\|/g, ',');this.cookie[i]= this.cookie[i].replace(/:/g, '=');this.cookie[i] = this.cookie[i].split('=');this.cookie[i][1] = this.cookie[i][1].split(',');}}this.cookiestate = {};for(i in this.cookie){if(typeof this.cookie[i]!='function'){this.cookiestate[this.cookie[i][0]] = this.cookie[i][1];}}}}return this.cookiestate;};dbxManager.prototype.addDataMember = function(gid, order){this.savedata[gid] = order;};dbxManager.prototype.createElement = function(tag){return typeof document.createElementNS != 'undefined' ? document.createElementNS('http://www.w3.org/1999/xhtml', tag) : document.createElement(tag);};dbxManager.prototype.getTarget = function(e, pattern, node){if(typeof node != 'undefined'){var target = node;}else{target = typeof e.target != 'undefined' ? e.target : e.srcElement;}var regex = new RegExp(pattern, '');while(!regex.test(target.className)){target = target.parentNode;}return target;};function dbxGroup(gid, dir, thresh, fix, ani, togs, def, open, close, move, toggle, kmove, ktoggle, syntax){if(!/^[-_a-z0-9]+$/i.test(gid)) { alert('Error from dbxGroup:\n"' + gid + '" is an invalid container ID'); return; }this.container = document.getElementById(gid);if(this.container == null || !dbx.supported) { return; }var self = this;this.gid = gid;this.dragok = false;this.box = null;this.vertical = dir == 'vertical';this.threshold = parseInt(thresh, 10);this.restrict = fix == 'yes';this.resolution = parseInt(ani, 10);this.toggles = togs == 'yes';this.defopen = def != 'closed';this.vocab = {'open' : open,'close' : close,'move' : move,'toggle' : toggle,'kmove' : kmove,'ktoggle' : ktoggle,'syntax' : syntax};this.container.style.position = 'relative';this.container.style.display = 'block';if(typeof window.opera != 'undefined'){this.container.style.display = 'run-in';}this.boxes = [];this.buttons = [];this.order = [];this.eles = this.container.getElementsByTagName('*');for(var i=0; i<this.eles.length; i++){if(/dbx\-box/i.test(this.eles[i].className) && !/dbx\-dummy/i.test(this.eles[i].className)){this.eles[i].style.position = 'relative';this.eles[i].style.display = 'block';this.boxes.push(this.eles[i]);this.eles[i].className += ' dbx-box-open';this.eles[i].className += ' dbxid' + this.order.length;this.order.push(this.order.length.toString() + '+');this.eles[i][dbx.etype](dbx.eprefix + 'mousedown', function(e){if(!e) { e = window.event; }self.mousedown(e, dbx.getTarget(e, 'dbx\-box'));}, false);}if(/dbx\-handle/i.test(this.eles[i].className)){this.eles[i].style.position = 'relative';this.eles[i].style.display = 'block';this.eles[i].className += ' dbx-handle-cursor';this.eles[i].setAttribute('title', this.eles[i].getAttribute('title') == null || this.eles[i].title == '' ? this.vocab.move : this.vocab.syntax.replace('%mytitle%', this.eles[i].title).replace('%dbxtitle%', this.vocab.move));if(this.toggles){this.buttons.push(this.addToggleBehavior(this.eles[i]));}else{this.eles[i][dbx.etype](dbx.eprefix + 'key' + (typeof document.uniqueID != 'undefined' || navigator.vendor == 'Apple Computer, Inc.' ? 'down' : 'press'), function(e){if(!e) { e = window.event; }return self.keypress(e, dbx.getTarget(e, 'dbx\-handle'));}, false);this.eles[i][dbx.etype](dbx.eprefix + 'focus', function(e){if(!e) { e = window.event; }self.createTooltip(null, dbx.getTarget(e, 'dbx\-handle'));}, false);this.eles[i][dbx.etype](dbx.eprefix + 'blur', function(){self.removeTooltip();}, false);}}}dbx.addDataMember(this.gid, this.order.join(','));var dummy = this.container.appendChild(dbx.createElement('span'));dummy.className = 'dbx-box dbx-dummy';dummy.style.display = 'block';dummy.style.width = '0';dummy.style.height = '0';dummy.style.overflow = 'hidden';if(this.vertical) { dummy.className += ' dbx-offdummy'; }this.boxes.push(dummy);if(dbx.cookiestate != null && typeof dbx.cookiestate[this.gid] != 'undefined'){var num = dbx.cookiestate[this.gid].length;if(num == this.boxes.length - 1){for(i=0; i<num; i++){var index = parseInt(dbx.cookiestate[this.gid][i], 10);this.container.insertBefore(this.boxes[index], dummy);if(this.toggles && /\-$/.test(dbx.cookiestate[this.gid][i])){this.toggleBoxState(this.buttons[index], false);}}this.getBoxOrder();}}else if(!this.defopen && this.toggles){var len = this.buttons.length;for(i=0; i<len; i++){this.toggleBoxState(this.buttons[i], true);}}document[dbx.etype](dbx.eprefix + 'mouseout', function(e){if(typeof e.target == 'undefined') { e = window.event; e.relatedTarget = e.toElement; }if(e.relatedTarget == null){self.mouseup(e);}}, false);document[dbx.etype](dbx.eprefix + 'mousemove', function(e){self.mousemove(e);return !self.dragok;}, false);document[dbx.etype](dbx.eprefix + 'mouseup', function(e){self.mouseup(e);}, false);this.keydown = false;document[dbx.etype](dbx.eprefix + 'keydown', function(){self.keydown = true;}, false);document[dbx.etype](dbx.eprefix + 'keyup', function(){self.keydown = false;}, false);};dbxGroup.prototype.addToggleBehavior = function(){var self = this;var button = arguments[0].appendChild(dbx.createElement('a'));button.appendChild(document.createTextNode('\u00a0'));button.style.cursor = 'pointer';button.href = 'javascript:void(null)';button.className = 'dbx-toggle dbx-toggle-open';button.setAttribute('title', this.vocab.toggle.replace('%toggle%', this.vocab.close));button.hasfocus = typeof window.opera != 'undefined' || navigator.vendor == 'Apple Computer, Inc.' ? null : false;this.tooltip = null;button.onclick = function(){if(this.hasfocus === true || this.hasfocus === null){self.removeTooltip();self.toggleBoxState(this, true);}};button['onkey' + (typeof document.uniqueID != 'undefined' || navigator.vendor == 'Apple Computer, Inc.' ? 'down' : 'press')] = function(e){if(!e) { e = window.event; }return self.keypress(e, this);};button.onfocus = function(){var len = self.buttons.length;for(var i=0; i<len; i++){self.buttons[i].className = self.buttons[i].className.replace(/[ ](dbx\-toggle\-hilite\-)(open|closed)/, '');}var isopen = (/dbx\-toggle\-open/.test(this.className));this.className += ' dbx-toggle-hilite-' + (isopen ? 'open' : 'closed');self.createTooltip(isopen, this);this.isactive = true;if(this.hasfocus !== null) { this.hasfocus = true; }};button.onblur = function(){this.className = this.className.replace(/[ ](dbx\-toggle\-hilite\-)(open|closed)/, '');self.removeTooltip();if(this.hasfocus !== null) { this.hasfocus = false; }};return button;};dbxGroup.prototype.toggleBoxState = function(button, regen){var isopen = (/dbx\-toggle\-open/.test(button.className));var parent = dbx.getTarget(null, 'dbx\-box', button);dbx.box = parent;dbx.toggle = button;if(typeof dbx.container == 'undefined'){dbx.group = dbx.getTarget(null, 'dbx\-group', parent);}else { dbx.group = dbx.container; }if((!isopen && (typeof dbx.onboxopen == 'undefined' || dbx.onboxopen()))||(isopen && (typeof dbx.onboxclose == 'undefined' || dbx.onboxclose()))){button.className = 'dbx-toggle dbx-toggle-' + (isopen ? 'closed' : 'open');button.title = this.vocab.toggle.replace('%toggle%', isopen ? this.vocab.open : this.vocab.close);if(typeof button.isactive != 'undefined'){button.className += ' dbx-toggle-hilite-' + (isopen ? 'closed' : 'open')}parent.className = parent.className.replace(/[ ](dbx-box-)(open|closed)/, ' $1' + (isopen ? 'closed' : 'open'));if(regen) { this.getBoxOrder(); }}};dbxGroup.prototype.shiftBoxPosition = function(e, anchor, positive){var parent = dbx.getTarget(null, 'dbx\-box', anchor);dbx.group = this.container;dbx.box = parent;dbx.event = e;if(typeof dbx.onboxdrag == 'undefined' || dbx.onboxdrag()){var positions = [];var len = this.boxes.length;for(var i=0; i<len; i++){positions[i] = [i, this.boxes[i][this.vertical ? 'offsetTop' : 'offsetLeft']];if(parent == this.boxes[i]) { this.idref = i; }}positions.sort(this.compare);for(i=0; i<len; i++){if(positions[i][0] == this.idref){if((positive && i < len - 2) || (!positive && i > 0)){var sibling = this.boxes[positions[i + (positive ? 1 : -1)][0]];if(this.resolution > 0){var visipos = { 'x' : parent.offsetLeft, 'y' : parent.offsetTop };var siblingpos = { 'x' : sibling.offsetLeft, 'y' : sibling.offsetTop };}var obj = { 'insert' : (positive ? sibling : parent), 'before' : (positive ? parent : sibling) };this.container.insertBefore(obj.insert, obj.before);if(this.resolution > 0){var animators ={'sibling' : new dbxAnimator(this, sibling, siblingpos, this.resolution, true, anchor),'parent' : new dbxAnimator(this, parent, visipos, this.resolution, true, anchor)};}else{anchor.focus();}break;}}}this.getBoxOrder();}};dbxGroup.prototype.compare = function(a, b){return a[1] - b[1];};dbxGroup.prototype.createTooltip = function(isopen, anchor){if(this.keydown){this.tooltip = this.container.appendChild(dbx.createElement('span'));this.tooltip.style.visibility = 'hidden';this.tooltip.className = 'dbx-tooltip';if(isopen != null){this.tooltip.appendChild(document.createTextNode(this.vocab.kmove + this.vocab.ktoggle.replace('%toggle%', isopen ? this.vocab.close : this.vocab.open)));}else{this.tooltip.appendChild(document.createTextNode(this.vocab.kmove));}var parent = dbx.getTarget(null, 'dbx\-box', anchor);this.tooltip.style.left = parent.offsetLeft + 'px';this.tooltip.style.top = parent.offsetTop + 'px';var tooltip = this.tooltip;window.setTimeout(function(){if(tooltip != null) { tooltip.style.visibility = 'visible'; }}, 500);}};dbxGroup.prototype.removeTooltip = function(){if(this.tooltip != null){this.tooltip.parentNode.removeChild(this.tooltip);this.tooltip = null;}};dbxGroup.prototype.mousedown = function(e, box){var node = typeof e.target != 'undefined' ? e.target : e.srcElement;if(node.nodeName == '#text') { node = node.parentNode; }if(!/dbx\-(toggle|box|group)/i.test(node.className)){while(!/dbx\-(handle|box|group)/i.test(node.className)){node = node.parentNode;}}if(/dbx\-handle/i.test(node.className)){this.removeTooltip();this.released = false;this.initial = { 'x' : e.clientX, 'y' : e.clientY };this.current = { 'x' : 0, 'y' : 0 };this.createCloneBox(box);if(typeof e.preventDefault != 'undefined' ) { e.preventDefault(); }if(typeof document.onselectstart != 'undefined'){document.onselectstart = function() { return false; }}}};dbxGroup.prototype.mousemove = function(e){if(this.dragok && this.box != null){this.positive = this.vertical ? (e.clientY > this.current.y ? true : false) : (e.clientX > this.current.x ? true : false);this.current = { 'x' : e.clientX, 'y' : e.clientY };var overall = { 'x' : this.current.x - this.initial.x, 'y' : this.current.y - this.initial.y };if(((overall.x >= 0 && overall.x <= this.threshold) || (overall.x <= 0 && overall.x >= 0 - this.threshold))&&((overall.y >= 0 && overall.y <= this.threshold) || (overall.y <= 0 && overall.y >= 0 - this.threshold))){this.current.x -= overall.x;this.current.y -= overall.y;}if(this.released || overall.x > this.threshold || overall.x < (0 - this.threshold) || overall.y > this.threshold || overall.y < (0 - this.threshold)){dbx.group = this.container;dbx.box = this.box;dbx.event = e;if(typeof dbx.onboxdrag == 'undefined' || dbx.onboxdrag()){this.released = true;if(!this.restrict || !this.vertical) { this.boxclone.style.left = (this.current.x - this.difference.x) + 'px'; }if(!this.restrict || this.vertical) { this.boxclone.style.top = (this.current.y - this.difference.y) + 'px'; }this.moveOriginalToPosition(this.current.x, this.current.y);if(typeof e.preventDefault != 'undefined' ) { e.preventDefault(); }}}}return true;};dbxGroup.prototype.mouseup = function(e){if(this.box != null){this.moveOriginalToPosition(e.clientX, e.clientY);this.removeCloneBox();this.getBoxOrder();if(typeof document.onselectstart != 'undefined'){document.onselectstart = function() { return true; }}}this.dragok = false;};dbxGroup.prototype.keypress = function(e, anchor){if(/^(3[7-9])|(40)$/.test(e.keyCode)){this.removeTooltip();if((this.vertical && /^(38|40)$/.test(e.keyCode)) || (!this.vertical && /^(37|39)$/.test(e.keyCode))){this.shiftBoxPosition(e, anchor, /^[3][78]$/.test(e.keyCode) ? false : true);if(typeof e.preventDefault != 'undefined') { e.preventDefault(); }else { return false; }typeof e.stopPropagation != 'undefined' ? e.stopPropagation() : e.cancelBubble = true;this.keydown = false;}}return true;};dbxGroup.prototype.getBoxOrder = function(){this.order = [];var len = this.eles.length;for(var j=0; j<len; j++){if(/dbx\-box/i.test(this.eles[j].className) && !/dbx\-(clone|dummy)/i.test(this.eles[j].className)){this.order.push(this.eles[j].className.split('dbxid')[1] + (/dbx\-box\-open/i.test(this.eles[j].className) ? '+' : '-'));}}dbx.savedata[this.gid] = this.order.join(',');dbx.setCookieState();};dbxGroup.prototype.createClone = function(){var clone = this.container.appendChild(arguments[0].cloneNode(true));clone.className += ' dbx-clone';clone.style.position = 'absolute';clone.style.visibility = 'hidden';clone.style.zIndex = arguments[1];clone.style.left = arguments[2].x + 'px';clone.style.top = arguments[2].y + 'px';clone.style.width = arguments[0].offsetWidth + 'px';clone.style.height = arguments[0].offsetHeight + 'px';return clone;};dbxGroup.prototype.createCloneBox = function(box){this.box = box;this.position = { 'x' : this.box.offsetLeft, 'y' : this.box.offsetTop };this.difference = { 'x' : (this.initial.x - this.position.x), 'y' : (this.initial.y - this.position.y) };this.boxclone = this.createClone(this.box, 30000, this.position);this.boxclone.style.cursor = 'move';this.dragok = true;};dbxGroup.prototype.removeCloneBox = function(){this.container.removeChild(this.boxclone);this.box.style.visibility = 'visible';this.box = null;};dbxGroup.prototype.moveOriginalToPosition = function(clientX, clientY){var cloneprops = {'xy' : this.vertical ? clientY - this.difference.y : clientX - this.difference.x,'wh' : this.vertical ? this.boxclone.offsetHeight : this.boxclone.offsetWidth};this.box.style.visibility = 'hidden';this.boxclone.style.visibility = 'visible';var len = this.boxes.length;for(var i=0; i<len; i++){var boxprops = {'xy' : this.vertical ? this.boxes[i].offsetTop : this.boxes[i].offsetLeft,'wh' : this.vertical ? this.boxes[i].offsetHeight : this.boxes[i].offsetWidth};if((this.positive && cloneprops.xy + cloneprops.wh > boxprops.xy && cloneprops.xy < boxprops.xy)||(!this.positive && cloneprops.xy < boxprops.xy && cloneprops.xy + cloneprops.wh > boxprops.xy)){if(this.boxes[i] == this.box) { return; }var sibling = this.box.nextSibling;while(sibling.className == null || !/dbx\-box/.test(sibling.className)){sibling = sibling.nextSibling;}if(this.boxes[i] == sibling) { return; }if(this.resolution > 0){if(this.box[this.vertical ? 'offsetTop' : 'offsetLeft'] < boxprops.xy){var visibox = this.boxes[i].previousSibling;while(visibox.className == null || !/dbx\-box/.test(visibox.className)){visibox = visibox.previousSibling;}}else{visibox = this.boxes[i];}var visipos = { 'x' : visibox.offsetLeft, 'y' : visibox.offsetTop };}var prepos = { 'x' : this.box.offsetLeft, 'y' : this.box.offsetTop };this.container.insertBefore(this.box, this.boxes[i]);this.initial.x += (this.box.offsetLeft - prepos.x);this.initial.y += (this.box.offsetTop - prepos.y);if(this.resolution > 0 && visibox != this.box){var animator = new dbxAnimator(this, visibox, visipos, this.resolution, false, null);}else{}break;}}};function dbxAnimator(caller, box, pos, res, kbd, anchor){this.caller = caller;this.box = box;this.timer = null;var before = pos[this.caller.vertical ? 'y' : 'x'];var after = this.box[this.caller.vertical ? 'offsetTop' : 'offsetLeft'];if(before != after){if(dbx.running > this.caller.boxes.length - 1) { return; }var clone = this.caller.createClone(this.box, 29999, arguments[2]);clone.style.visibility = 'visible';this.box.style.visibility = 'hidden';this.animateClone(clone,before,after > before ? after - before : 0 - (before - after),this.caller.vertical ? 'top' : 'left',res,kbd,anchor);}};dbxAnimator.prototype.animateClone = function(clone, current, change, dir, res, kbd, anchor){var self = this;var count = 0;dbx.running ++;this.timer = window.setInterval(function(){count ++;current += change / res;clone.style[dir] = current + 'px';if(count == res){window.clearTimeout(self.timer);self.timer = null;dbx.running --;self.caller.container.removeChild(clone);self.box.style.visibility = 'visible';if(kbd){if(anchor != null && anchor.parentNode.style.visibility != 'hidden'){anchor.focus();}else if(self.caller.toggles){var button = self.caller.buttons[parseInt(self.box.className.split('dbxid')[1],10)];if(button != null && typeof button.isactive != 'undefined'){button.focus();}}}}}, 20);};if(typeof window.attachEvent != 'undefined'){window.attachEvent('onunload', function(){var ev = ['mousedown', 'mousemove', 'mouseup', 'mouseout', 'click', 'keydown', 'keyup', 'focus', 'blur', 'selectstart', 'statechange', 'boxdrag', 'boxopen', 'boxclose'];var el = ev.length;var dl = document.all.length;for(var i=0; i<dl; i++){for(var j=0; j<el; j++){document.all[i]['on' + ev[j]] = null;}}});}
\ No newline at end of file diff --git a/wp-includes/js/fat.js b/wp-includes/js/fat.js deleted file mode 100644 index 01f1b42..0000000 --- a/wp-includes/js/fat.js +++ /dev/null @@ -1,90 +0,0 @@ -// @name The Fade Anything Technique -// @namespace http://www.axentric.com/aside/fat/ -// @version 1.0-RC1 -// @author Adam Michela - -var Fat = { - make_hex : function (r,g,b) - { - r = r.toString(16); if (r.length == 1) r = '0' + r; - g = g.toString(16); if (g.length == 1) g = '0' + g; - b = b.toString(16); if (b.length == 1) b = '0' + b; - return "#" + r + g + b; - }, - fade_all : function (dur) - { - var a = document.getElementsByTagName("*"); - for (var i = 0; i < a.length; i++) - { - var o = a[i]; - var r = /fade-?(\w{3,6})?/.exec(o.className); - if (r) - { - if (!r[1]) r[1] = ""; - if (o.id) Fat.fade_element(o.id,null,dur,"#"+r[1]); - } - } - }, - fade_element : function (id, fps, duration, from, to) - { - if (!fps) fps = 30; - if (!duration) duration = 3000; - if (!from || from=="#") from = "#FFFF33"; - if (!to) to = this.get_bgcolor(id); - - var frames = Math.round(fps * (duration / 1000)); - var interval = duration / frames; - var delay = interval; - var frame = 0; - - if (from.length < 7) from += from.substr(1,3); - if (to.length < 7) to += to.substr(1,3); - - var rf = parseInt(from.substr(1,2),16); - var gf = parseInt(from.substr(3,2),16); - var bf = parseInt(from.substr(5,2),16); - var rt = parseInt(to.substr(1,2),16); - var gt = parseInt(to.substr(3,2),16); - var bt = parseInt(to.substr(5,2),16); - - var r,g,b,h; - while (frame < frames) - { - r = Math.floor(rf * ((frames-frame)/frames) + rt * (frame/frames)); - g = Math.floor(gf * ((frames-frame)/frames) + gt * (frame/frames)); - b = Math.floor(bf * ((frames-frame)/frames) + bt * (frame/frames)); - h = this.make_hex(r,g,b); - - setTimeout("Fat.set_bgcolor('"+id+"','"+h+"')", delay); - - frame++; - delay = interval * frame; - } - setTimeout("Fat.set_bgcolor('"+id+"','"+to+"')", delay); - }, - set_bgcolor : function (id, c) - { - var o = document.getElementById(id); - o.style.backgroundColor = c; - }, - get_bgcolor : function (id) - { - var o = document.getElementById(id); - while(o) - { - var c; - if (window.getComputedStyle) c = window.getComputedStyle(o,null).getPropertyValue("background-color"); - if (o.currentStyle) c = o.currentStyle.backgroundColor; - if ((c != "" && c != "transparent") || o.tagName == "BODY") { break; } - o = o.parentNode; - } - if (c == undefined || c == "" || c == "transparent") c = "#FFFFFF"; - var rgb = c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/); - if (rgb) c = this.make_hex(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3])); - return c; - } -} - -addLoadEvent(function () { - Fat.fade_all(); -}); diff --git a/wp-includes/js/jquery/jquery.color.js b/wp-includes/js/jquery/jquery.color.js new file mode 100644 index 0000000..1dffbd5 --- /dev/null +++ b/wp-includes/js/jquery/jquery.color.js @@ -0,0 +1,128 @@ +/* + * jQuery Color Animations + * Copyright 2007 John Resig + * Released under the MIT and GPL licenses. + */ + +(function(jQuery){ + + // We override the animation for all of these color styles + jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){ + jQuery.fx.step[attr] = function(fx){ + if ( fx.state == 0 ) { + fx.start = getColor( fx.elem, attr ); + fx.end = getRGB( fx.end ); + } + + fx.elem.style[attr] = "rgb(" + [ + Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0), + Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0), + Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0) + ].join(",") + ")"; + } + }); + + // Color Conversion functions from highlightFade + // By Blair Mitchelmore + // http://jquery.offput.ca/highlightFade/ + + // Parse strings looking for color tuples [255,255,255] + function getRGB(color) { + var result; + + // Check if we're already dealing with an array of colors + if ( color && color.constructor == Array && color.length == 3 ) + return color; + + // Look for rgb(num,num,num) + if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) + return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])]; + + // Look for rgb(num%,num%,num%) + if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)) + return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55]; + + // Look for #a0b1c2 + if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) + return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)]; + + // Look for #fff + if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) + return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)]; + + // Look for rgba(0, 0, 0, 0) == transparent in Safari 3 + if (result = /rgba\(0, 0, 0, 0\)/.exec(color)) + return colors['transparent'] + + // Otherwise, we're most likely dealing with a named color + return colors[jQuery.trim(color).toLowerCase()]; + } + + function getColor(elem, attr) { + var color; + + do { + color = jQuery.curCSS(elem, attr); + + // Keep going until we find an element that has color, or we hit the body + if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") ) + break; + + attr = "backgroundColor"; + } while ( elem = elem.parentNode ); + + return getRGB(color); + }; + + // Some named colors to work with + // From Interface by Stefan Petre + // http://interface.eyecon.ro/ + + var colors = { + aqua:[0,255,255], + azure:[240,255,255], + beige:[245,245,220], + black:[0,0,0], + blue:[0,0,255], + brown:[165,42,42], + cyan:[0,255,255], + darkblue:[0,0,139], + darkcyan:[0,139,139], + darkgrey:[169,169,169], + darkgreen:[0,100,0], + darkkhaki:[189,183,107], + darkmagenta:[139,0,139], + darkolivegreen:[85,107,47], + darkorange:[255,140,0], + darkorchid:[153,50,204], + darkred:[139,0,0], + darksalmon:[233,150,122], + darkviolet:[148,0,211], + fuchsia:[255,0,255], + gold:[255,215,0], + green:[0,128,0], + indigo:[75,0,130], + khaki:[240,230,140], + lightblue:[173,216,230], + lightcyan:[224,255,255], + lightgreen:[144,238,144], + lightgrey:[211,211,211], + lightpink:[255,182,193], + lightyellow:[255,255,224], + lime:[0,255,0], + magenta:[255,0,255], + maroon:[128,0,0], + navy:[0,0,128], + olive:[128,128,0], + orange:[255,165,0], + pink:[255,192,203], + purple:[128,0,128], + violet:[128,0,128], + red:[255,0,0], + silver:[192,192,192], + white:[255,255,255], + yellow:[255,255,0], + transparent: [255,255,255] + }; + +})(jQuery); diff --git a/wp-includes/js/jquery/jquery.dimensions.min.js b/wp-includes/js/jquery/jquery.dimensions.min.js new file mode 100644 index 0000000..34c06de --- /dev/null +++ b/wp-includes/js/jquery/jquery.dimensions.min.js @@ -0,0 +1,12 @@ +/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $ + * $Rev: 4257 $ + * + * Version: 1.2 + * + * Requires: jQuery 1.2+ + */ +(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery);
\ No newline at end of file diff --git a/wp-includes/js/jquery/jquery.schedule.js b/wp-includes/js/jquery/jquery.schedule.js new file mode 100644 index 0000000..f00e7b3 --- /dev/null +++ b/wp-includes/js/jquery/jquery.schedule.js @@ -0,0 +1,36 @@ + +(function($){$.scheduler=function(){this.bucket={};return;};$.scheduler.prototype={schedule:function(){var ctx={"id":null,"time":1000,"repeat":false,"protect":false,"obj":null,"func":function(){},"args":[]};function _isfn(fn){return(!!fn&&typeof fn!="string"&&typeof fn[0]=="undefined"&&RegExp("function","i").test(fn+""));};var i=0;var override=false;if(typeof arguments[i]=="object"&&arguments.length>1){override=true;i++;} +if(typeof arguments[i]=="object"){for(var option in arguments[i]) +if(typeof ctx[option]!="undefined") +ctx[option]=arguments[i][option];i++;} +if(typeof arguments[i]=="number"||(typeof arguments[i]=="string"&&arguments[i].match(RegExp("^[0-9]+[smhdw]$")))) +ctx["time"]=arguments[i++];if(typeof arguments[i]=="boolean") +ctx["repeat"]=arguments[i++];if(typeof arguments[i]=="boolean") +ctx["protect"]=arguments[i++];if(typeof arguments[i]=="object"&&typeof arguments[i+1]=="string"&&_isfn(arguments[i][arguments[i+1]])){ctx["obj"]=arguments[i++];ctx["func"]=arguments[i++];} +else if(typeof arguments[i]!="undefined"&&(_isfn(arguments[i])||typeof arguments[i]=="string")) +ctx["func"]=arguments[i++];while(typeof arguments[i]!="undefined") +ctx["args"].push(arguments[i++]);if(override){if(typeof arguments[1]=="object"){for(var option in arguments[0]) +if(typeof ctx[option]!="undefined"&&typeof arguments[1][option]=="undefined") +ctx[option]=arguments[0][option];} +else{for(var option in arguments[0]) +if(typeof ctx[option]!="undefined") +ctx[option]=arguments[0][option];} +i++;} +ctx["_scheduler"]=this;ctx["_handle"]=null;var match=String(ctx["time"]).match(RegExp("^([0-9]+)([smhdw])$"));if(match&&match[0]!="undefined"&&match[1]!="undefined") +ctx["time"]=String(parseInt(match[1])*{s:1000,m:1000*60,h:1000*60*60,d:1000*60*60*24,w:1000*60*60*24*7}[match[2]]);if(ctx["id"]==null) +ctx["id"]=(String(ctx["repeat"])+":" ++String(ctx["protect"])+":" ++String(ctx["time"])+":" ++String(ctx["obj"])+":" ++String(ctx["func"])+":" ++String(ctx["args"]));if(ctx["protect"]) +if(typeof this.bucket[ctx["id"]]!="undefined") +return this.bucket[ctx["id"]];if(!_isfn(ctx["func"])){if(ctx["obj"]!=null&&typeof ctx["obj"]=="object"&&typeof ctx["func"]=="string"&&_isfn(ctx["obj"][ctx["func"]])) +ctx["func"]=ctx["obj"][ctx["func"]];else +ctx["func"]=eval("function () { "+ctx["func"]+" }");} +ctx["_handle"]=this._schedule(ctx);this.bucket[ctx["id"]]=ctx;return ctx;},reschedule:function(ctx){if(typeof ctx=="string") +ctx=this.bucket[ctx];ctx["_handle"]=this._schedule(ctx);return ctx;},_schedule:function(ctx){var trampoline=function(){var obj=(ctx["obj"]!=null?ctx["obj"]:ctx);(ctx["func"]).apply(obj,ctx["args"]);if(typeof(ctx["_scheduler"]).bucket[ctx["id"]]!="undefined"&&ctx["repeat"]) +(ctx["_scheduler"])._schedule(ctx);else +delete(ctx["_scheduler"]).bucket[ctx["id"]];};return setTimeout(trampoline,ctx["time"]);},cancel:function(ctx){if(typeof ctx=="string") +ctx=this.bucket[ctx];if(typeof ctx=="object"){clearTimeout(ctx["_handle"]);delete this.bucket[ctx["id"]];}}};$.extend({scheduler$:new $.scheduler(),schedule:function(){return $.scheduler$.schedule.apply($.scheduler$,arguments)},reschedule:function(){return $.scheduler$.reschedule.apply($.scheduler$,arguments)},cancel:function(){return $.scheduler$.cancel.apply($.scheduler$,arguments)}});$.fn.extend({schedule:function(){var a=[{}];for(var i=0;i<arguments.length;i++) +a.push(arguments[i]);return this.each(function(){a[0]={"id":this,"obj":this};return $.schedule.apply($,a);});}});})(jQuery);
\ No newline at end of file diff --git a/wp-includes/js/jquery/suggest.js b/wp-includes/js/jquery/suggest.js new file mode 100644 index 0000000..656e58b --- /dev/null +++ b/wp-includes/js/jquery/suggest.js @@ -0,0 +1,310 @@ +/* + * jquery.suggest 1.1 - 2007-08-06 + * + * Uses code and techniques from following libraries: + * 1. http://www.dyve.net/jquery/?autocomplete + * 2. http://dev.jquery.com/browser/trunk/plugins/interface/iautocompleter.js + * + * All the new stuff written by Peter Vulgaris (www.vulgarisoip.com) + * Feel free to do whatever you want with this file + * + */ + +(function($) { + + $.suggest = function(input, options) { + + var $input = $(input).attr("autocomplete", "off"); + var $results = $(document.createElement("ul")); + + var timeout = false; // hold timeout ID for suggestion results to appear + var prevLength = 0; // last recorded length of $input.val() + var cache = []; // cache MRU list + var cacheSize = 0; // size of cache in chars (bytes?) + + $results.addClass(options.resultsClass).appendTo('body'); + + + resetPosition(); + $(window) + .load(resetPosition) // just in case user is changing size of page while loading + .resize(resetPosition); + + $input.blur(function() { + setTimeout(function() { $results.hide() }, 200); + }); + + + // help IE users if possible + try { + $results.bgiframe(); + } catch(e) { } + + + // I really hate browser detection, but I don't see any other way + if ($.browser.mozilla) + $input.keypress(processKey); // onkeypress repeats arrow keys in Mozilla/Opera + else + $input.keydown(processKey); // onkeydown repeats arrow keys in IE/Safari + + + + + function resetPosition() { + // requires jquery.dimension plugin + var offset = $input.offset(); + $results.css({ + top: (offset.top + input.offsetHeight) + 'px', + left: offset.left + 'px' + }); + } + + + function processKey(e) { + + // handling up/down/escape requires results to be visible + // handling enter/tab requires that AND a result to be selected + if ((/27$|38$|40$/.test(e.keyCode) && $results.is(':visible')) || + (/^13$|^9$/.test(e.keyCode) && getCurrentResult())) { + + if (e.preventDefault) + e.preventDefault(); + if (e.stopPropagation) + e.stopPropagation(); + + e.cancelBubble = true; + e.returnValue = false; + + switch(e.keyCode) { + + case 38: // up + prevResult(); + break; + + case 40: // down + nextResult(); + break; + + case 9: // tab + case 13: // return + selectCurrentResult(); + break; + + case 27: // escape + $results.hide(); + break; + + } + + } else if ($input.val().length != prevLength) { + + if (timeout) + clearTimeout(timeout); + timeout = setTimeout(suggest, options.delay); + prevLength = $input.val().length; + + } + + + } + + + function suggest() { + + var q = $.trim($input.val()); + + if (q.length >= options.minchars) { + + cached = checkCache(q); + + if (cached) { + + displayItems(cached['items']); + + } else { + + $.get(options.source, {q: q}, function(txt) { + + $results.hide(); + + var items = parseTxt(txt, q); + + displayItems(items); + addToCache(q, items, txt.length); + + }); + + } + + } else { + + $results.hide(); + + } + + } + + + function checkCache(q) { + + for (var i = 0; i < cache.length; i++) + if (cache[i]['q'] == q) { + cache.unshift(cache.splice(i, 1)[0]); + return cache[0]; + } + + return false; + + } + + function addToCache(q, items, size) { + + while (cache.length && (cacheSize + size > options.maxCacheSize)) { + var cached = cache.pop(); + cacheSize -= cached['size']; + } + + cache.push({ + q: q, + size: size, + items: items + }); + + cacheSize += size; + + } + + function displayItems(items) { + + if (!items) + return; + + if (!items.length) { + $results.hide(); + return; + } + + var html = ''; + for (var i = 0; i < items.length; i++) + html += '<li>' + items[i] + '</li>'; + + $results.html(html).show(); + + $results + .children('li') + .mouseover(function() { + $results.children('li').removeClass(options.selectClass); + $(this).addClass(options.selectClass); + }) + .click(function(e) { + e.preventDefault(); + e.stopPropagation(); + selectCurrentResult(); + }); + + } + + function parseTxt(txt, q) { + + var items = []; + var tokens = txt.split(options.delimiter); + + // parse returned data for non-empty items + for (var i = 0; i < tokens.length; i++) { + var token = $.trim(tokens[i]); + if (token) { + token = token.replace( + new RegExp(q, 'ig'), + function(q) { return '<span class="' + options.matchClass + '">' + q + '</span>' } + ); + items[items.length] = token; + } + } + + return items; + } + + function getCurrentResult() { + + if (!$results.is(':visible')) + return false; + + var $currentResult = $results.children('li.' + options.selectClass); + + if (!$currentResult.length) + $currentResult = false; + + return $currentResult; + + } + + function selectCurrentResult() { + + $currentResult = getCurrentResult(); + + if ($currentResult) { + $input.val($currentResult.text()); + $results.hide(); + + if (options.onSelect) + options.onSelect.apply($input[0]); + + } + + } + + function nextResult() { + + $currentResult = getCurrentResult(); + + if ($currentResult) + $currentResult + .removeClass(options.selectClass) + .next() + .addClass(options.selectClass); + else + $results.children('li:first-child').addClass(options.selectClass); + + } + + function prevResult() { + + $currentResult = getCurrentResult(); + + if ($currentResult) + $currentResult + .removeClass(options.selectClass) + .prev() + .addClass(options.selectClass); + else + $results.children('li:last-child').addClass(options.selectClass); + + } + + } + + $.fn.suggest = function(source, options) { + + if (!source) + return; + + options = options || {}; + options.source = source; + options.delay = options.delay || 100; + options.resultsClass = options.resultsClass || 'ac_results'; + options.selectClass = options.selectClass || 'ac_over'; + options.matchClass = options.matchClass || 'ac_match'; + options.minchars = options.minchars || 2; + options.delimiter = options.delimiter || '\n'; + options.onSelect = options.onSelect || false; + options.maxCacheSize = options.maxCacheSize || 65536; + + this.each(function() { + new $.suggest(this, options); + }); + + return this; + + }; + +})(jQuery);
\ No newline at end of file diff --git a/wp-includes/js/jquery/ui.tabs.js b/wp-includes/js/jquery/ui.tabs.js new file mode 100644 index 0000000..8634b41 --- /dev/null +++ b/wp-includes/js/jquery/ui.tabs.js @@ -0,0 +1,529 @@ +/* + * Tabs 3 - New Wave Tabs + * + * Copyright (c) 2007 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + */ + +(function($) { + + // if the UI scope is not availalable, add it + $.ui = $.ui || {}; + + // tabs initialization + $.fn.tabs = function(initial, options) { + if (initial && initial.constructor == Object) { // shift arguments + options = initial; + initial = null; + } + options = options || {}; + + initial = initial && initial.constructor == Number && --initial || 0; + + return this.each(function() { + new $.ui.tabs(this, $.extend(options, { initial: initial })); + }); + }; + + // other chainable tabs methods + $.each(['Add', 'Remove', 'Enable', 'Disable', 'Click', 'Load', 'Href'], function(i, method) { + $.fn['tabs' + method] = function() { + var args = arguments; + return this.each(function() { + var instance = $.ui.tabs.getInstance(this); + instance[method.toLowerCase()].apply(instance, args); + }); + }; + }); + $.fn.tabsSelected = function() { + var selected = -1; + if (this[0]) { + var instance = $.ui.tabs.getInstance(this[0]), + $lis = $('li', this); + selected = $lis.index( $lis.filter('.' + instance.options.selectedClass)[0] ); + } + return selected >= 0 ? ++selected : -1; + }; + + // tabs class + $.ui.tabs = function(el, options) { + + this.source = el; + + this.options = $.extend({ + + // basic setup + initial: 0, + event: 'click', + disabled: [], + cookie: null, // pass options object as expected by cookie plugin: { expires: 7, path: '/', domain: 'jquery.com', secure: true } + // TODO bookmarkable: $.ajaxHistory ? true : false, + unselected: false, + unselect: options.unselected ? true : false, + + // Ajax + spinner: 'Loading…', + cache: false, + idPrefix: 'ui-tabs-', + ajaxOptions: {}, + + // animations + /*fxFade: null, + fxSlide: null, + fxShow: null, + fxHide: null,*/ + fxSpeed: 'normal', + /*fxShowSpeed: null, + fxHideSpeed: null,*/ + + // callbacks + add: function() {}, + remove: function() {}, + enable: function() {}, + disable: function() {}, + click: function() {}, + hide: function() {}, + show: function() {}, + load: function() {}, + + // templates + tabTemplate: '<li><a href="#{href}"><span>#{text}</span></a></li>', + panelTemplate: '<div></div>', + + // CSS classes + navClass: 'ui-tabs-nav', + selectedClass: 'ui-tabs-selected', + unselectClass: 'ui-tabs-unselect', + disabledClass: 'ui-tabs-disabled', + panelClass: 'ui-tabs-panel', + hideClass: 'ui-tabs-hide', + loadingClass: 'ui-tabs-loading' + + }, options); + + this.options.event += '.ui-tabs'; // namespace event + this.options.cookie = $.cookie && $.cookie.constructor == Function && this.options.cookie; + + // save instance for later + $.data(el, $.ui.tabs.INSTANCE_KEY, this); + + // create tabs + this.tabify(true); + }; + + // static + $.ui.tabs.INSTANCE_KEY = 'ui_tabs_instance'; + $.ui.tabs.getInstance = function(el) { + return $.data(el, $.ui.tabs.INSTANCE_KEY); + }; + + // instance methods + $.extend($.ui.tabs.prototype, { + tabId: function(a) { + return a.title ? a.title.replace(/\s/g, '_') + : this.options.idPrefix + $.data(a); + }, + tabify: function(init) { + + this.$lis = $('li:has(a[href])', this.source); + this.$tabs = this.$lis.map(function() { return $('a', this)[0] }); + this.$panels = $([]); + + var self = this, o = this.options; + + this.$tabs.each(function(i, a) { + // inline tab + if (a.hash && a.hash.replace('#', '')) { // Safari 2 reports '#' for an empty hash + self.$panels = self.$panels.add(a.hash); + } + // remote tab + else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#" + $.data(a, 'href', a.href); + var id = self.tabId(a); + a.href = '#' + id; + self.$panels = self.$panels.add( + $('#' + id)[0] || $(o.panelTemplate).attr('id', id).addClass(o.panelClass) + .insertAfter( self.$panels[i - 1] || self.source ) + ); + } + // invalid tab href + else { + o.disabled.push(i + 1); + } + }); + + if (init) { + + // attach necessary classes for styling if not present + $(this.source).hasClass(o.navClass) || $(this.source).addClass(o.navClass); + this.$panels.each(function() { + var $this = $(this); + $this.hasClass(o.panelClass) || $this.addClass(o.panelClass); + }); + + // disabled tabs + for (var i = 0, position; position = o.disabled[i]; i++) { + this.disable(position); + } + + // Try to retrieve initial tab: + // 1. from fragment identifier in url if present + // 2. from cookie + // 3. from selected class attribute on <li> + // 4. otherwise use given initial argument + // 5. check if tab is disabled + this.$tabs.each(function(i, a) { + if (location.hash) { + if (a.hash == location.hash) { + o.initial = i; + // prevent page scroll to fragment + //if (($.browser.msie || $.browser.opera) && !o.remote) { + if ($.browser.msie || $.browser.opera) { + var $toShow = $(location.hash), toShowId = $toShow.attr('id'); + $toShow.attr('id', ''); + setTimeout(function() { + $toShow.attr('id', toShowId); // restore id + }, 500); + } + scrollTo(0, 0); + return false; // break + } + } else if (o.cookie) { + o.initial = parseInt($.cookie( $.ui.tabs.INSTANCE_KEY + $.data(self.source) )) || 0; + return false; // break + } else if ( self.$lis.eq(i).hasClass(o.selectedClass) ) { + o.initial = i; + return false; // break + } + }); + var n = this.$lis.length; + while (this.$lis.eq(o.initial).hasClass(o.disabledClass) && n) { + o.initial = ++o.initial < this.$lis.length ? o.initial : 0; + n--; + } + if (!n) { // all tabs disabled, set option unselected to true + o.unselected = o.unselect = true; + } + + // highlight selected tab + this.$panels.addClass(o.hideClass); + this.$lis.removeClass(o.selectedClass); + if (!o.unselected) { + this.$panels.eq(o.initial).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before + this.$lis.eq(o.initial).addClass(o.selectedClass); + } + + // load if remote tab + var href = !o.unselected && $.data(this.$tabs[o.initial], 'href'); + if (href) { + this.load(o.initial + 1, href); + } + + // disable click if event is configured to something else + if (!/^click/.test(o.event)) { + this.$tabs.bind('click', function(e) { e.preventDefault(); }); + } + + } + + // setup animations + var showAnim = {}, showSpeed = o.fxShowSpeed || o.fxSpeed, + hideAnim = {}, hideSpeed = o.fxHideSpeed || o.fxSpeed; + if (o.fxSlide || o.fxFade) { + if (o.fxSlide) { + showAnim['height'] = 'show'; + hideAnim['height'] = 'hide'; + } + if (o.fxFade) { + showAnim['opacity'] = 'show'; + hideAnim['opacity'] = 'hide'; + } + } else { + if (o.fxShow) { + showAnim = o.fxShow; + } else { // use some kind of animation to prevent browser scrolling to the tab + showAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox + showSpeed = 1; // as little as 1 is sufficient + } + if (o.fxHide) { + hideAnim = o.fxHide; + } else { // use some kind of animation to prevent browser scrolling to the tab + hideAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox + hideSpeed = 1; // as little as 1 is sufficient + } + } + + // reset some styles to maintain print style sheets etc. + var resetCSS = { display: '', overflow: '', height: '' }; + if (!$.browser.msie) { // not in IE to prevent ClearType font issue + resetCSS['opacity'] = ''; + } + + // Hide a tab, animation prevents browser scrolling to fragment, + // $show is optional. + function hideTab(clicked, $hide, $show) { + $hide.animate(hideAnim, hideSpeed, function() { // + $hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc. + if ($.browser.msie && hideAnim['opacity']) { + $hide[0].style.filter = ''; + } + o.hide(clicked, $hide[0], $show && $show[0] || null); + if ($show) { + showTab(clicked, $show, $hide); + } + }); + } + + // Show a tab, animation prevents browser scrolling to fragment, + // $hide is optional + function showTab(clicked, $show, $hide) { + if (!(o.fxSlide || o.fxFade || o.fxShow)) { + $show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels + } + $show.animate(showAnim, showSpeed, function() { + $show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc. + if ($.browser.msie && showAnim['opacity']) { + $show[0].style.filter = ''; + } + o.show(clicked, $show[0], $hide && $hide[0] || null); + }); + } + + // switch a tab + function switchTab(clicked, $li, $hide, $show) { + /*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click + $.ajaxHistory.update(clicked.hash); + }*/ + $li.addClass(o.selectedClass) + .siblings().removeClass(o.selectedClass); + hideTab(clicked, $hide, $show); + } + + // attach tab event handler, unbind to avoid duplicates from former tabifying... + this.$tabs.unbind(o.event).bind(o.event, function() { + + //var trueClick = e.clientX; // add to history only if true click occured, not a triggered click + var $li = $(this).parents('li:eq(0)'), + $hide = self.$panels.filter(':visible'), + $show = $(this.hash); + + // If tab is already selected and not unselectable or tab disabled or click callback returns false stop here. + // Check if click handler returns false last so that it is not executed for a disabled tab! + if (($li.hasClass(o.selectedClass) && !o.unselect) || $li.hasClass(o.disabledClass) + || o.click(this, $show[0], $hide[0]) === false) { + this.blur(); + return false; + } + + if (o.cookie) { + $.cookie($.ui.tabs.INSTANCE_KEY + $.data(self.source), self.$tabs.index(this), o.cookie); + } + + // if tab may be closed + if (o.unselect) { + if ($li.hasClass(o.selectedClass)) { + $li.removeClass(o.selectedClass); + self.$panels.stop(); + hideTab(this, $hide); + this.blur(); + return false; + } else if (!$hide.length) { + self.$panels.stop(); + if ($.data(this, 'href')) { // remote tab + var a = this; + self.load(self.$tabs.index(this) + 1, $.data(this, 'href'), function() { + $li.addClass(o.selectedClass).addClass(o.unselectClass); + showTab(a, $show); + }); + } else { + $li.addClass(o.selectedClass).addClass(o.unselectClass); + showTab(this, $show); + } + this.blur(); + return false; + } + } + + // stop possibly running animations + self.$panels.stop(); + + // show new tab + if ($show.length) { + + // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled + /*if ($.browser.msie && o.bookmarkable) { + var showId = this.hash.replace('#', ''); + $show.attr('id', ''); + setTimeout(function() { + $show.attr('id', showId); // restore id + }, 0); + }*/ + + if ($.data(this, 'href')) { // remote tab + var a = this; + self.load(self.$tabs.index(this) + 1, $.data(this, 'href'), function() { + switchTab(a, $li, $hide, $show); + }); + } else { + switchTab(this, $li, $hide, $show); + } + + // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash + /*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0; + var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0; + setTimeout(function() { + scrollTo(scrollX, scrollY); + }, 0);*/ + + } else { + throw 'jQuery UI Tabs: Mismatching fragment identifier.'; + } + + // Prevent IE from keeping other link focussed when using the back button + // and remove dotted border from clicked link. This is controlled in modern + // browsers via CSS, also blur removes focus from address bar in Firefox + // which can become a usability and annoying problem with tabsRotate. + if ($.browser.msie) { + this.blur(); + } + + //return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE + return false; + + }); + + }, + add: function(url, text, position) { + if (url && text) { + position = position || this.$tabs.length; // append by default + + var o = this.options, + $li = $(o.tabTemplate.replace(/#\{href\}/, url).replace(/#\{text\}/, text)); + + var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] ); + + // try to find an existing element before creating a new one + var $panel = $('#' + id); + $panel = $panel.length && $panel + || $(o.panelTemplate).attr('id', id).addClass(o.panelClass).addClass(o.hideClass); + if (position >= this.$lis.length) { + $li.appendTo(this.source); + $panel.appendTo(this.source.parentNode); + } else { + $li.insertBefore(this.$lis[position - 1]); + $panel.insertBefore(this.$panels[position - 1]); + } + + this.tabify(); + + if (this.$tabs.length == 1) { + $li.addClass(o.selectedClass); + $panel.removeClass(o.hideClass); + var href = $.data(this.$tabs[0], 'href'); + if (href) { + this.load(position + 1, href); + } + } + o.add(this.$tabs[position], this.$panels[position]); // callback + } else { + throw 'jQuery UI Tabs: Not enough arguments to add tab.'; + } + }, + remove: function(position) { + if (position && position.constructor == Number) { + var o = this.options, $li = this.$lis.eq(position - 1).remove(), + $panel = this.$panels.eq(position - 1).remove(); + + // If selected tab was removed focus tab to the right or + // tab to the left if last tab was removed. + if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1) { + this.click(position + (position < this.$tabs.length ? 1 : -1)); + } + this.tabify(); + o.remove($li.end()[0], $panel[0]); // callback + } + }, + enable: function(position) { + var o = this.options, $li = this.$lis.eq(position - 1); + $li.removeClass(o.disabledClass); + if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2... + $li.css('display', 'inline-block'); + setTimeout(function() { + $li.css('display', 'block') + }, 0) + } + o.enable(this.$tabs[position - 1], this.$panels[position - 1]); // callback + }, + disable: function(position) { + var o = this.options; + this.$lis.eq(position - 1).addClass(o.disabledClass); + o.disable(this.$tabs[position - 1], this.$panels[position - 1]); // callback + }, + click: function(position) { + this.$tabs.eq(position - 1).trigger(this.options.event); + }, + load: function(position, url, callback) { + var self = this, o = this.options, + $a = this.$tabs.eq(position - 1), a = $a[0], $span = $('span', a); + + // shift arguments + if (url && url.constructor == Function) { + callback = url; + url = null; + } + + // set new URL or get existing + if (url) { + $.data(a, 'href', url); + } else { + url = $.data(a, 'href'); + } + + // load + if (o.spinner) { + $.data(a, 'title', $span.html()); + $span.html('<em>' + o.spinner + '</em>'); + } + var finish = function() { + self.$tabs.filter('.' + o.loadingClass).each(function() { + $(this).removeClass(o.loadingClass); + if (o.spinner) { + $('span', this).html( $.data(this, 'title') ); + } + }); + self.xhr = null; + }; + var ajaxOptions = $.extend(o.ajaxOptions, { + url: url, + success: function(r) { + $(a.hash).html(r); + finish(); + // This callback is required because the switch has to take + // place after loading has completed. + if (callback && callback.constructor == Function) { + callback(); + } + if (o.cache) { + $.removeData(a, 'href'); // if loaded once do not load them again + } + o.load(self.$tabs[position - 1], self.$panels[position - 1]); // callback + } + }); + if (this.xhr) { + // terminate pending requests from other tabs and restore title + this.xhr.abort(); + finish(); + } + $a.addClass(o.loadingClass); + setTimeout(function() { // timeout is again required in IE, "wait" for id being restored + self.xhr = $.ajax(ajaxOptions); + }, 0); + + }, + href: function(position, href) { + $.data(this.$tabs.eq(position - 1)[0], 'href', href); + } + }); + +})(jQuery); diff --git a/wp-includes/js/list-manipulation.js b/wp-includes/js/list-manipulation.js deleted file mode 100644 index e522709..0000000 --- a/wp-includes/js/list-manipulation.js +++ /dev/null @@ -1,295 +0,0 @@ -addLoadEvent( function() { - if ( 'undefined' != typeof listManL10n ) - Object.extend(listMan.prototype, listManL10n); - theList = new listMan(); -} ); - -function deleteSomething( what, id, message, obj ) { - if ( !obj ) - obj=theList; - if ( !message ) - message = obj.delText.replace(/%thing%/g, what); - if( confirm(message) ) - return obj.ajaxDelete( what, id ); - else return false; -} - -function dimSomething( what, id, dimClass, obj ) { - if ( !obj ) - obj = theList; - return obj.ajaxDimmer(what,id,dimClass); -} - -var listMan = Class.create(); -Object.extend(listMan.prototype, { - ajaxRespEl: 'ajax-response', - ajaxHandler: false, - inputData: '', - clearInputs: [], - showLink: true, - topAdder: false, - alt: 'alternate', - altOffset: 0, - addComplete: null, - delComplete: null, - dimComplete: null, - dataStore: null, - formStore: null, - - jumpText: '', // We get these from listManL10n - delText: '', - - initialize: function(theListId) { - this.theList = $(theListId ? theListId : 'the-list'); - if ( !this.theList ) - return false; - Element.cleanWhitespace(this.theList); - }, - - // sends add-what and fields contained in where - // recieves html with top element having an id like what-# - ajaxAdder: function( what, where, update ) { // Do NOT wrap TR in TABLE TBODY - var ajaxAdd = new WPAjax( this.ajaxHandler, this.ajaxRespEl ); - if ( ajaxAdd.notInitialized() ) - return true; - var action = ( update ? 'update-' : 'add-' ) + what; - ajaxAdd.options.parameters = $H(ajaxAdd.options.parameters).merge({action: action}).merge(this.inputData.toQueryParams()).merge(this.grabInputs( where, ajaxAdd ).toQueryParams()); - - var tempObj=this; - ajaxAdd.addOnComplete( function(transport) { - var newItems = $A(transport.responseXML.getElementsByTagName(what)); - if ( newItems ) { - var showLinkMessage = ''; - var m = ''; - newItems.each( function(i) { - var id = i.getAttribute('id'); - var exists = $(what+'-'+id); - if ( exists ) - tempObj.replaceListItem( exists, getNodeValue(i,'response_data'), update ); - else - tempObj.addListItem( getNodeValue(i, 'response_data') ); - m = getNodeValue(i, 'show-link'); - showLinkMessage += showLinkMessage ? "<br />\n" : ''; - if ( m ) - showLinkMessage += m; - else - showLinkMessage += "<a href='#" + what + '-' + id + "'>" + tempObj.jumpText + "</a>"; - }); - if ( tempObj.showLink && showLinkMessage ) - Element.update(ajaxAdd.myResponseElement,"<div id='jumplink' class='updated fade'><p>" + showLinkMessage + "</p></div>"); - } - if ( tempObj.addComplete && typeof tempObj.addComplete == 'function' ) - tempObj.addComplete( what, where, update, transport ); - tempObj.recolorList(); - ajaxAdd.restoreInputs = null; - }); - if ( !update ) - ajaxAdd.addOnWPError( function(transport) { tempObj.restoreForm(ajaxAdd.restoreInputs); }); - ajaxAdd.request(ajaxAdd.url); - if ( !update ) - this.clear(); - return false; - }, - - // sends update-what and fields contained in where - // recieves html with top element having an id like what-# - ajaxUpdater: function( what, where ) { return this.ajaxAdder( what, where, true ); }, - - // sends delete-what and id# - ajaxDelete: function( what, id ) { - var ajaxDel = new WPAjax( this.ajaxHandler, this.ajaxRespEl ); - if( ajaxDel.notInitialized() ) - return true; - var tempObj = this; - var action = 'delete-' + what; - var actionId = action + '&id=' + id; - var idName = what.replace('-as-spam','') + '-' + id; - ajaxDel.addOnComplete( function(transport) { - Element.update(ajaxDel.myResponseElement,''); - tempObj.destore(actionId); - if( tempObj.delComplete && typeof tempObj.delComplete == 'function' ) - tempObj.delComplete( what, id, transport ); - }); - ajaxDel.addOnWPError( function(transport) { tempObj.restore(actionId, true); }); - ajaxDel.options.parameters = $H(ajaxDel.options.parameters).merge({action: action, id: id}).merge(this.inputData.toQueryParams()); - ajaxDel.request(ajaxDel.url); - this.store(actionId, idName); - tempObj.removeListItem( idName ); - return false; - }, - - // Toggles class nomes - // sends dim-what and id# - ajaxDimmer: function( what, id, dimClass ) { - ajaxDim = new WPAjax( this.ajaxHandler, this.ajaxRespEl ); - if ( ajaxDim.notInitialized() ) - return true; - var tempObj = this; - var action = 'dim-' + what; - var actionId = action + '&id=' + id; - var idName = what + '-' + id; - ajaxDim.addOnComplete( function(transport) { - Element.update(ajaxDim.myResponseElement,''); - tempObj.destore(actionId); - if ( tempObj.dimComplete && typeof tempObj.dimComplete == 'function' ) - tempObj.dimComplete( what, id, dimClass, transport ); - }); - ajaxDim.addOnWPError( function(transport) { tempObj.restore(actionId, true); }); - ajaxDim.options.parameters = $H(ajaxDim.options.parameters).merge({action: action, id: id}).merge(this.inputData.toQueryParams()); - ajaxDim.request(ajaxDim.url); - this.store(actionId, idName); - this.dimItem( idName, dimClass ); - return false; - }, - - addListItem: function( h ) { - new Insertion[this.topAdder ? 'Top' : 'Bottom'](this.theList,h); - Element.cleanWhitespace(this.theList); - var id = this.topAdder ? this.theList.firstChild.id : this.theList.lastChild.id; - if ( this.alt ) - if ( ( this.theList.childNodes.length + this.altOffset ) % 2 ) - Element.addClassName($(id),this.alt); - Fat.fade_element(id); - }, - - // only hides the element sa it can be put back again if necessary - removeListItem: function( id, noFade ) { - id = $(id); - if ( !noFade ) { - Fat.fade_element(id.id,null,700,'#FF3333'); - var tempObj = this; - var func = function() { id.hide(); tempObj.recolorList(); } - setTimeout(func, 705); - } else { - id.hide(); - this.recolorList(); - } - }, - - replaceListItem: function( id, h, update ) { - id = $(id); - if ( !update ) { - Element.remove(id); - this.addListItem( h ); - return; - } - id.replace(h); - Fat.fade_element(id.id); - }, - - // toggles class - dimItem: function( id, dimClass, noFade ) { - id = $(id); - if ( Element.hasClassName(id,dimClass) ) { - if ( !noFade ) - Fat.fade_element(id.id,null,700,null); - Element.removeClassName(id,dimClass); - } else { - if ( !noFade ) - Fat.fade_element(id.id,null,700,'#FF3333'); - Element.addClassName(id,dimClass); - } - }, - - // store an element in case we need it later - store: function(action, id) { - if ( !this.dataStore ) - this.dataStore = $H(); - this.dataStore[action] = $(id).cloneNode(true); - }, - - // delete from store - destore: function(action) { delete(this.dataStore[action]); }, - - // restore element from store into existing (possibly hidden) element of same id - restore: function(action, error) { - var id = this.dataStore[action].id; - this.theList.replaceChild(this.dataStore[action], $(id)); - delete(this.dataStore[action]); - if ( error ) { - func = function() { Element.setStyle($(id),{backgroundColor:'#FF3333'}); } - func(); setTimeout(func, 705); // Hit it twice in case it's still fading. - } - }, - - // Like Form.serialize, but excludes action and sets up clearInputs - grabInputs: function( where, ajaxObj ) { - if ( ajaxObj ) - ajaxObj.restoreInputs = []; - var elements = Form.getElements($(where)); - var queryComponents = new Array(); - for (var i = 0; i < elements.length; i++) { - if ( 'action' == elements[i].name ) - continue; - if ( 'hidden' != elements[i].type && 'submit' != elements[i].type && 'button' != elements[i].type ) { - this.clearInputs.push(elements[i]); - if ( ajaxObj ) - ajaxObj.restoreInputs.push([elements[i], elements[i].value]); - } - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) { - queryComponents.push(queryComponent); - } - } - return queryComponents.join('&'); - }, - - // form.reset() can only do whole forms. This can do subsections. - clear: function() { - this.clearInputs.each( function(i) { - i = $(i); - if ( 'textarea' == i.tagName.toLowerCase() ) - i.value = ''; - else - switch ( i.type.toLowerCase() ) { - case 'password': case 'text': - i.value = ''; - break; - case 'checkbox': case 'radio': - i.checked = false; - break; - case 'select': case 'select-one': - i.selectedIndex = null; - break; - case 'select-multiple': - for (var o = 0; o < i.length; o++) i.options[o].selected = false; - break; - } - }); - this.clearInputs = []; - }, - - restoreForm: function(elements) { - elements.each( function(i) { - i[0].value = i[1]; - }); - }, - - recolorList: function() { - if ( !this.alt ) - return; - var alt = this.alt; - var offset = this.altOffset; - var listItems = $A(this.theList.childNodes).findAll( function(i) { return Element.visible(i) } ); - listItems.each( function(i,n) { - if ( ( n + offset ) % 2 ) - Element.removeClassName(i,alt); - else - Element.addClassName(i,alt); - }); - } -}); - -//No submit unless code returns true. -function killSubmit ( code, e ) { - e = e ? e : window.event; - if ( !e ) return; - var t = e.target ? e.target : e.srcElement; - if ( ( 'text' == t.type && e.keyCode == 13 ) || ( 'submit' == t.type && 'click' == e.type ) ) { - if ( ( 'string' == typeof code && !eval(code) ) || ( 'function' == typeof code && !code() ) ) { - e.returnValue = false; e.cancelBubble = true; return false; - } - } -} -//Generic but lame JS closure -function encloseFunc(f){var a=arguments[1];return function(){return f(a);}} diff --git a/wp-includes/js/swfupload/handlers.js b/wp-includes/js/swfupload/handlers.js new file mode 100644 index 0000000..c53edf1 --- /dev/null +++ b/wp-includes/js/swfupload/handlers.js @@ -0,0 +1,227 @@ +function uploadLoaded() { + jQuery("#html-upload-ui").remove(); + jQuery("#flash-upload-ui").show(); +} + +function fileDialogStart() { + jQuery("#media-upload-error").empty(); +} + +// progress and success handlers for media multi uploads +function fileQueued(fileObj) { + // Get rid of unused form + jQuery('.media-blank').remove(); + // Collapse a single item + if ( jQuery('.type-form #media-items>*').length == 1 && jQuery('#media-items .hidden').length > 0 ) { + jQuery('.toggle').toggle(); + jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden'); + } + // Create a progress bar containing the filename + jQuery('#media-items').append('<div id="media-item-' + fileObj.id + '" class="media-item child-of-' + post_id + '"><div class="filename original">' + fileObj.name + '</div><div class="progress"><div class="bar"></div></div></div>'); + + // Disable the submit button + jQuery('#insert-gallery').attr('disabled', 'disabled'); +} + +function uploadStart(fileObj) { return true; } + +function uploadProgress(fileObj, bytesDone, bytesTotal) { + // Lengthen the progress bar + jQuery('#media-item-' + fileObj.id + ' .bar').width(620*bytesDone/bytesTotal); + + if ( bytesDone== bytesTotal ) + jQuery('#media-item-' + fileObj.id + ' .bar').html('<strong style="display: block; padding-top: 9px; padding-left: 1em;">' + swfuploadL10n.crunching + '</strong>'); +} + +function prepareMediaItem(fileObj, serverData) { + // Move the progress bar to 100% + jQuery('#media-item-' + fileObj.id + ' .bar').remove(); + + // Append the HTML returned by the server -- thumbnail and form inputs + jQuery('#media-item-' + fileObj.id).append(serverData); + + // Clone the thumbnail as a "pinkynail" -- a tiny image to the left of the filename + jQuery('#media-item-' + fileObj.id + ' .thumbnail').clone().attr('className', 'pinkynail toggle').prependTo('#media-item-' + fileObj.id); + + // Replace the original filename with the new (unique) one assigned during upload + jQuery('#media-item-' + fileObj.id + ' .filename.original').replaceWith(jQuery('#media-item-' + fileObj.id + ' .filename.new')); + + // Bind toggle function to a new mask over the progress bar area + jQuery('#media-item-' + fileObj.id + ' .progress').clone().empty().addClass('clickmask').bind('click', function(){jQuery(this).siblings('.slidetoggle').slideToggle(150);jQuery(this).siblings('.toggle').toggle();}).appendTo('#media-item-' + fileObj.id); + + // Also bind toggle to the links + jQuery('#media-item-' + fileObj.id + ' a.toggle').bind('click', function(){jQuery(this).siblings('.slidetoggle').slideToggle(150);jQuery(this).parent().eq(0).children('.toggle').toggle();jQuery(this).siblings('a.toggle').focus();return false;}); + + // Bind AJAX to the new Delete button + jQuery('#media-item-' + fileObj.id + ' a.delete').bind('click',function(){ + // Tell the server to delete it. TODO: handle exceptions + jQuery.ajax({url:'admin-ajax.php',type:'post',success:deleteSuccess,error:deleteError,id:fileObj.id,data:{ + id : this.id.replace(/[^0-9]/g,''), + action : 'delete-post', + _ajax_nonce : this.href.replace(/^.*wpnonce=/,'')} + }); + return false; + }); + + // Open this item if it says to start open (e.g. to display an error) + jQuery('#media-item-' + fileObj.id + '.startopen') + .removeClass('startopen') + .slideToggle(500) + .parent().eq(0).children('.toggle').toggle(); +} + +function itemAjaxError(id, html) { + var error = jQuery('#media-item-error' + id); + + error.html('<div class="file-error"><button type="button" id="dismiss-'+id+'" class="button dismiss">'+swfuploadL10n.dismiss+'</button>'+html+'</div>'); + jQuery('#dismiss-'+id).click(function(){jQuery(this).parents('.file-error').slideUp(200, function(){jQuery(this).empty();})}); +} + +function deleteSuccess(data, textStatus) { + if ( data == '-1' ) + return itemAjaxError(this.id, 'You do not have permission. Has your session expired?'); + if ( data == '0' ) + return itemAjaxError(this.id, 'Could not be deleted. Has it been deleted already?'); + + var item = jQuery('#media-item-' + this.id); + + // Decrement the counters. + if ( type = jQuery('#type-of-' + this.id).val() ) + jQuery('#' + type + '-counter').text(jQuery('#' + type + '-counter').text()-1); + if ( item.hasClass('child-of-'+post_id) ) + jQuery('#attachments-count').text(jQuery('#attachments-count').text()-1); + + if ( jQuery('.type-form #media-items>*').length == 1 && jQuery('#media-items .hidden').length > 0 ) { + jQuery('.toggle').toggle(); + jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden'); + } + + jQuery('#media-item-' + this.id + ' .filename:empty').remove(); + jQuery('#media-item-' + this.id + ' .filename').append(' <span class="file-error">'+swfuploadL10n.deleted+'</span>').siblings('a.toggle').remove(); + jQuery('#media-item-' + this.id + ' .describe').slideUp(500, function(){jQuery(this).parents('.media-item').slideUp(1500,function(){jQuery(this).remove();updateMediaForm();})}).end.remove(); + + return; + // Vanish it. + item.slideToggle(300,function(){jQuery(this).remove();if(jQuery('.media-item').length==0)jQuery('.insert-gallery').hide();updateMediaForm();}); +} + +function deleteError(X, textStatus, errorThrown) { + // TODO +} + +function updateMediaForm() { + // Just one file, no need for collapsible part + if ( jQuery('.type-form #media-items>*').length == 1 ) { + jQuery('#media-items .slidetoggle').slideDown(500).parent().eq(0).children('.toggle').toggle(); + jQuery('.type-form .slidetoggle').siblings().addClass('hidden'); + } + + // Only show Save buttons when there is at least one file. + if ( jQuery('#media-items>*').not('.media-blank').length > 0 ) + jQuery('.savebutton').show(); + else + jQuery('.savebutton').hide(); + + // Only show Gallery button when there are at least two files. + if ( jQuery('#media-items>*').length > 1 ) + jQuery('.insert-gallery').show(); + else + jQuery('.insert-gallery').hide(); +} + +function uploadSuccess(fileObj, serverData) { + // if async-upload returned an error message, place it in the media item div and return + if ( serverData.match('media-upload-error') ) { + jQuery('#media-item-' + fileObj.id).html(serverData); + return; + } + + prepareMediaItem(fileObj, serverData); + updateMediaForm(); + + // Increment the counter. + if ( jQuery('#media-item-' + fileObj.id).hasClass('child-of-' + post_id) ) + jQuery('#attachments-count').text(1 * jQuery('#attachments-count').text() + 1); +} + +function uploadComplete(fileObj) { + // If no more uploads queued, enable the submit button + if ( swfu.getStats().files_queued == 0 ) + jQuery('#insert-gallery').attr('disabled', ''); +} + + +// wp-specific error handlers + +// generic message +function wpQueueError(message) { + jQuery('#media-upload-error').show().text(message); +} + +// file-specific message +function wpFileError(fileObj, message) { + jQuery('#media-item-' + fileObj.id + ' .filename').after('<div class="file-error"><button type="button" id="dismiss-' + fileObj.id + '" class="button dismiss">'+swfuploadL10n.dismiss+'</button>'+message+'</div>').siblings('.toggle').remove(); + jQuery('#dismiss-' + fileObj.id).click(function(){jQuery(this).parents('.media-item').slideUp(200, function(){jQuery(this).remove();})}); +} + +function fileQueueError(fileObj, error_code, message) { + // Handle this error separately because we don't want to create a FileProgress element for it. + if ( error_code == SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED ) { + wpQueueError(swfuploadL10n.queue_limit_exceeded); + } + else if ( error_code == SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT ) { + fileQueued(fileObj); + wpFileError(fileObj, swfuploadL10n.file_exceeds_size_limit); + } + else if ( error_code == SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE ) { + fileQueued(fileObj); + wpFileError(fileObj, swfuploadL10n.zero_byte_file); + } + else if ( error_code == SWFUpload.QUEUE_ERROR.INVALID_FILETYPE ) { + fileQueued(fileObj); + wpFileError(fileObj, swfuploadL10n.invalid_filetype); + } + else { + wpQueueError(swfuploadL10n.default_error); + } +} + +function fileDialogComplete(num_files_queued) { + try { + if (num_files_queued > 0) { + this.startUpload(); + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadError(fileObj, error_code, message) { + // first the file specific error + if ( error_code == SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL ) { + wpFileError(fileObj, swfuploadL10n.missing_upload_url); + } + else if ( error_code == SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED ) { + wpFileError(fileObj, swfuploadL10n.upload_limit_exceeded); + } + else { + wpFileError(fileObj, swfuploadL10n.default_error); + } + + // now the general upload status + if ( error_code == SWFUpload.UPLOAD_ERROR.HTTP_ERROR ) { + wpQueueError(swfuploadL10n.http_error); + } + else if ( error_code == SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED ) { + wpQueueError(swfuploadL10n.upload_failed); + } + else if ( error_code == SWFUpload.UPLOAD_ERROR.IO_ERROR ) { + wpQueueError(swfuploadL10n.io_error); + } + else if ( error_code == SWFUpload.UPLOAD_ERROR.SECURITY_ERROR ) { + wpQueueError(swfuploadL10n.security_error); + } + else if ( error_code == SWFUpload.UPLOAD_ERROR.FILE_CANCELLED ) { + wpQueueError(swfuploadL10n.security_error); + } +} diff --git a/wp-includes/js/swfupload/plugins/swfupload.cookies.js b/wp-includes/js/swfupload/plugins/swfupload.cookies.js new file mode 100644 index 0000000..4d41612 --- /dev/null +++ b/wp-includes/js/swfupload/plugins/swfupload.cookies.js @@ -0,0 +1,50 @@ +/* + Cookie Plug-in + + This plug in automatically gets all the cookies for this site and adds them to the post_params. + Cookies are loaded only on initialization. The refreshCookies function can be called to update the post_params. + The cookies will override any other post params with the same name. +*/ + +var SWFUpload; +if (typeof(SWFUpload) === "function") { + SWFUpload.prototype.initSettings = function (old_initSettings) { + return function (init_settings) { + if (typeof(old_initSettings) === "function") { + old_initSettings.call(this, init_settings); + } + + this.refreshCookies(false); // The false parameter must be sent since SWFUpload has not initialzed at this point + }; + }(SWFUpload.prototype.initSettings); + + // refreshes the post_params and updates SWFUpload. The send_to_flash parameters is optional and defaults to True + SWFUpload.prototype.refreshCookies = function (send_to_flash) { + if (send_to_flash !== false) send_to_flash = true; + + // Get the post_params object + var post_params = this.getSetting("post_params"); + + // Get the cookies + var i, cookie_array = document.cookie.split(';'), ca_length = cookie_array.length, c, eq_index, name, value; + for(i = 0; i < ca_length; i++) { + c = cookie_array[i]; + + // Left Trim spaces + while (c.charAt(0) == " ") { + c = c.substring(1, c.length); + } + eq_index = c.indexOf("="); + if (eq_index > 0) { + name = c.substring(0, eq_index); + value = c.substring(eq_index+1); + post_params[name] = value; + } + } + + if (send_to_flash) { + this.setPostParams(post_params); + } + }; + +} diff --git a/wp-includes/js/swfupload/plugins/swfupload.documentready.js b/wp-includes/js/swfupload/plugins/swfupload.documentready.js new file mode 100644 index 0000000..a95bac5 --- /dev/null +++ b/wp-includes/js/swfupload/plugins/swfupload.documentready.js @@ -0,0 +1,102 @@ +/* + DocumentReady Plug-in + + This plugin loads SWFUpload as soon as the document is ready. You should not load SWFUpload inside window.onload using this plugin. + You can also chain other functions by calling SWFUpload.DocumentReady(your function). + + Warning: Embedded Ads or other scripts that overwrite window.onload or use their own document ready functions may interfer with this plugin. You + should not set window.onload when using this plugin. + + Usage Example: + + var swfu = new SWFUpload(your settings object); + SWFUpload.DocumentReady(function () { alert('Document Ready!'; }); + +*/ + +var SWFUpload; +if (typeof(SWFUpload) === "function") { + // Override iniSWFUpload so SWFUpload gets inited when the document is ready rather than immediately + SWFUpload.prototype.initSWFUpload = function (old_initSWFUpload) { + return function (init_settings) { + var self = this; + if (typeof(old_initSWFUpload) === "function") { + SWFUpload.DocumentReady(function () { + old_initSWFUpload.call(self, init_settings); + }); + } + } + + }(SWFUpload.prototype.initSWFUpload); + + + // The DocumentReady function adds the passed in function to + // the functions that will be executed when the document is ready/loaded + SWFUpload.DocumentReady = function (fn) { + // Add the function to the chain + SWFUpload.DocumentReady.InternalOnloadChain = function (previous_link_fn) { + return function () { + if (typeof(previous_link_fn) === "function") { + previous_link_fn(); + } + fn(); + }; + }(SWFUpload.DocumentReady.InternalOnloadChain); + }; + SWFUpload.DocumentReady.InternalOnloadChain = null; + SWFUpload.DocumentReady.Onload = function () { + // Execute the onload function chain + if (typeof(SWFUpload.DocumentReady.InternalOnloadChain) === "function") { + SWFUpload.DocumentReady.InternalOnloadChain(); + } + }; + SWFUpload.DocumentReady.SetupComplete = false; + + + /* ******************************************** + This portion of the code gets executed as soon it is loaded. + It binds the proper event for executing JavaScript is + early as possible. This is a per browser function and so + some browser sniffing is used. + + This solution still has the "exposed" issue (See the Global Delegation section at http://peter.michaux.ca/article/553 ) + + Base solution from http://dean.edwards.name/weblog/2006/06/again/ and http://dean.edwards.name/weblog/2005/09/busted/ + ******************************************** */ + if (!SWFUpload.DocumentReady.SetupComplete) { + // for Internet Explorer (using conditional comments) + /*@cc_on @*/ + /*@if (@_win32) + document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>"); + var script = document.getElementById("__ie_onload"); + script.onreadystatechange = function() { + if (this.readyState == "complete") { + SWFUpload.DocumentReady.Onload(); // call the onload handler + } + }; + SWFUpload.DocumentReady.SetupComplete = true; + /*@end @*/ + } + + if (!SWFUpload.DocumentReady.SetupComplete && /WebKit/i.test(navigator.userAgent)) { // sniff + var _timer = setInterval(function() { + if (/loaded|complete/.test(document.readyState)) { + clearInterval(_timer); + SWFUpload.DocumentReady.Onload(); // call the onload handler + } + }, 10); + SWFUpload.DocumentReady.SetupComplete = true; + } + + /* for Mozilla */ + if (!SWFUpload.DocumentReady.SetupComplete && document.addEventListener) { + document.addEventListener("DOMContentLoaded", SWFUpload.DocumentReady.Onload, false); + SWFUpload.DocumentReady.SetupComplete = true; + } + + /* for other browsers */ + if (!SWFUpload.DocumentReady.SetupComplete) { + window.onload = SWFUpload.DocumentReady.Onload; + SWFUpload.DocumentReady.SetupComplete = true; + } +} diff --git a/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js b/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js new file mode 100644 index 0000000..16bf12e --- /dev/null +++ b/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js @@ -0,0 +1,63 @@ +/* + SWFUpload Graceful Degradation Plug-in + + This plugin allows SWFUpload to display only if it is loaded successfully. Otherwise a default form is left displayed. + + Usage: + + To use this plugin create two HTML containers. Each should have an ID defined. One container should hold the SWFUpload UI. The other should hold the degraded UI. + + The SWFUpload container should have its CSS "display" property set to "none". + + If SWFUpload loads successfully the SWFUpload container will be displayed ("display" set to "block") and the + degraded container will be hidden ("display" set to "none"). + + Use the settings "swfupload_element_id" and "degraded_element_id" to indicate your container IDs. The default values are "swfupload_container" and "degraded_container". + +*/ + +var SWFUpload; +if (typeof(SWFUpload) === "function") { + SWFUpload.gracefulDegradation = {}; + SWFUpload.prototype.initSettings = function (old_initSettings) { + return function (init_settings) { + if (typeof(old_initSettings) === "function") { + old_initSettings.call(this, init_settings); + } + + this.addSetting("swfupload_element_id", init_settings.swfupload_element_id, "swfupload_container"); + this.addSetting("degraded_element_id", init_settings.degraded_element_id, "degraded_container"); + this.addSetting("user_swfUploadLoaded_handler", init_settings.swfupload_loaded_handler, SWFUpload.swfUploadLoaded); + + this.swfUploadLoaded_handler = SWFUpload.gracefulDegradation.swfUploadLoaded; + }; + }(SWFUpload.prototype.initSettings); + + SWFUpload.gracefulDegradation.swfUploadLoaded = function () { + var swfupload_container_id, swfupload_container, degraded_container_id, degraded_container, user_swfUploadLoaded_handler; + try { + swfupload_element_id = this.getSetting("swfupload_element_id"); + degraded_element_id = this.getSetting("degraded_element_id"); + + // Show the UI container + swfupload_container = document.getElementById(swfupload_element_id); + if (swfupload_container !== null) { + swfupload_container.style.display = "block"; + + // Now take care of hiding the degraded UI + degraded_container = document.getElementById(degraded_element_id); + if (degraded_container !== null) { + degraded_container.style.display = "none"; + } + } + } catch (ex) { + this.debug(ex); + } + + user_swfUploadLoaded_handler = this.getSetting("user_swfUploadLoaded_handler"); + if (typeof(user_swfUploadLoaded_handler) === "function") { + user_swfUploadLoaded_handler.apply(this); + } + }; + +} diff --git a/wp-includes/js/swfupload/plugins/swfupload.queue.js b/wp-includes/js/swfupload/plugins/swfupload.queue.js new file mode 100644 index 0000000..9752e28 --- /dev/null +++ b/wp-includes/js/swfupload/plugins/swfupload.queue.js @@ -0,0 +1,58 @@ +/* + Queue Plug-in + + Features: + cancelQueue method for cancelling the entire queue. + All queued files are uploaded when startUpload() is called. + If false is returned from uploadComplete then the queue upload is stopped. If false is not returned (strict comparison) then the queue upload is continued. + + */ + +var SWFUpload; +if (typeof(SWFUpload) === "function") { + SWFUpload.queue = {}; + + SWFUpload.prototype.initSettings = function (old_initSettings) { + return function (init_settings) { + if (typeof(old_initSettings) === "function") { + old_initSettings.call(this, init_settings); + } + + this.customSettings.queue_cancelled_flag = false; + + this.addSetting("user_upload_complete_handler", init_settings.upload_complete_handler, SWFUpload.uploadComplete); + this.uploadComplete_handler = SWFUpload.queue.uploadComplete; + }; + }(SWFUpload.prototype.initSettings); + + SWFUpload.prototype.cancelQueue = function () { + var stats = this.getStats(); + this.customSettings.queue_cancelled_flag = false; + + if (stats.in_progress > 0) { + this.customSettings.queue_cancelled_flag = true; + } + + while(stats.files_queued > 0) { + this.cancelUpload(); + stats = this.getStats(); + } + }; + + SWFUpload.queue.uploadComplete = function (file) { + var user_upload_complete_handler = this.getSetting("user_upload_complete_handler"); + var continue_upload = true; + if (typeof(user_upload_complete_handler) === "function") { + continue_upload = (user_upload_complete_handler.call(this, file) === false) ? false : true; + } + + if (continue_upload) { + var stats = this.getStats(); + if (stats.files_queued > 0 && this.customSettings.queue_cancelled_flag === false) { + this.startUpload(); + } else { + this.customSettings.queue_cancelled_flag = false; + } + } + }; +} diff --git a/wp-includes/js/swfupload/swfupload.js b/wp-includes/js/swfupload/swfupload.js new file mode 100644 index 0000000..583876f --- /dev/null +++ b/wp-includes/js/swfupload/swfupload.js @@ -0,0 +1,1051 @@ +/** + * SWFUpload v2.0 by Jacob Roberts, Nov 2007, http://www.swfupload.org, http://linebyline.blogspot.com + * -------- -------- -------- -------- -------- -------- -------- -------- + * SWFUpload is (c) 2006 Lars Huring and Mammon Media and is released under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + * + * See Changelog.txt for version history + * + * Development Notes: + * * This version of SWFUpload requires Flash Player 9.0.28 and should autodetect the correct flash version. + * * In Linux Flash Player 9 setting the post file variable name does not work. It is always set to "Filedata". + * * There is a lot of repeated code that could be refactored to single functions. Feel free. + * * It's dangerous to do "circular calls" between Flash and JavaScript. I've taken steps to try to work around issues + * by having the event calls pipe through setTimeout. However you should still avoid calling in to Flash from + * within the event handler methods. Especially the "startUpload" event since it cannot use the setTimeout hack. + */ + + +/* *********** */ +/* Constructor */ +/* *********** */ + +var SWFUpload = function (init_settings) { + this.initSWFUpload(init_settings); +}; + +SWFUpload.prototype.initSWFUpload = function (init_settings) { + // Remove background flicker in IE (read this: http://misterpixel.blogspot.com/2006/09/forensic-analysis-of-ie6.html) + // This doesn't have anything to do with SWFUpload but can help your UI behave better in IE. + try { + document.execCommand('BackgroundImageCache', false, true); + } catch (ex1) { + } + + + try { + this.customSettings = {}; // A container where developers can place their own settings associated with this instance. + this.settings = {}; + this.eventQueue = []; + this.movieName = "SWFUpload_" + SWFUpload.movieCount++; + this.movieElement = null; + + // Setup global control tracking + SWFUpload.instances[this.movieName] = this; + + // Load the settings. Load the Flash movie. + this.initSettings(init_settings); + this.loadFlash(); + + this.displayDebugInfo(); + + } catch (ex2) { + this.debug(ex2); + } +} + +/* *************** */ +/* Static thingies */ +/* *************** */ +SWFUpload.instances = {}; +SWFUpload.movieCount = 0; +SWFUpload.QUEUE_ERROR = { + QUEUE_LIMIT_EXCEEDED : -100, + FILE_EXCEEDS_SIZE_LIMIT : -110, + ZERO_BYTE_FILE : -120, + INVALID_FILETYPE : -130 +}; +SWFUpload.UPLOAD_ERROR = { + HTTP_ERROR : -200, + MISSING_UPLOAD_URL : -210, + IO_ERROR : -220, + SECURITY_ERROR : -230, + UPLOAD_LIMIT_EXCEEDED : -240, + UPLOAD_FAILED : -250, + SPECIFIED_FILE_ID_NOT_FOUND : -260, + FILE_VALIDATION_FAILED : -270, + FILE_CANCELLED : -280, + UPLOAD_STOPPED : -290 +}; +SWFUpload.FILE_STATUS = { + QUEUED : -1, + IN_PROGRESS : -2, + ERROR : -3, + COMPLETE : -4, + CANCELLED : -5 +}; + + +/* ***************** */ +/* Instance Thingies */ +/* ***************** */ +// init is a private method that ensures that all the object settings are set, getting a default value if one was not assigned. + +SWFUpload.prototype.initSettings = function (init_settings) { + // Upload backend settings + this.addSetting("upload_url", init_settings.upload_url, ""); + this.addSetting("file_post_name", init_settings.file_post_name, "Filedata"); + this.addSetting("post_params", init_settings.post_params, {}); + + // File Settings + this.addSetting("file_types", init_settings.file_types, "*.*"); + this.addSetting("file_types_description", init_settings.file_types_description, "All Files"); + this.addSetting("file_size_limit", init_settings.file_size_limit, "1024"); + this.addSetting("file_upload_limit", init_settings.file_upload_limit, "0"); + this.addSetting("file_queue_limit", init_settings.file_queue_limit, "0"); + + // Flash Settings + this.addSetting("flash_url", init_settings.flash_url, "swfupload.swf"); + this.addSetting("flash_width", init_settings.flash_width, "1px"); + this.addSetting("flash_height", init_settings.flash_height, "1px"); + this.addSetting("flash_color", init_settings.flash_color, "#FFFFFF"); + + // Debug Settings + this.addSetting("debug_enabled", init_settings.debug, false); + + // Event Handlers + this.flashReady_handler = SWFUpload.flashReady; // This is a non-overrideable event handler + this.swfUploadLoaded_handler = this.retrieveSetting(init_settings.swfupload_loaded_handler, SWFUpload.swfUploadLoaded); + + this.fileDialogStart_handler = this.retrieveSetting(init_settings.file_dialog_start_handler, SWFUpload.fileDialogStart); + this.fileQueued_handler = this.retrieveSetting(init_settings.file_queued_handler, SWFUpload.fileQueued); + this.fileQueueError_handler = this.retrieveSetting(init_settings.file_queue_error_handler, SWFUpload.fileQueueError); + this.fileDialogComplete_handler = this.retrieveSetting(init_settings.file_dialog_complete_handler, SWFUpload.fileDialogComplete); + + this.uploadStart_handler = this.retrieveSetting(init_settings.upload_start_handler, SWFUpload.uploadStart); + this.uploadProgress_handler = this.retrieveSetting(init_settings.upload_progress_handler, SWFUpload.uploadProgress); + this.uploadError_handler = this.retrieveSetting(init_settings.upload_error_handler, SWFUpload.uploadError); + this.uploadSuccess_handler = this.retrieveSetting(init_settings.upload_success_handler, SWFUpload.uploadSuccess); + this.uploadComplete_handler = this.retrieveSetting(init_settings.upload_complete_handler, SWFUpload.uploadComplete); + + this.debug_handler = this.retrieveSetting(init_settings.debug_handler, SWFUpload.debug); + + // Other settings + this.customSettings = this.retrieveSetting(init_settings.custom_settings, {}); +}; + +// loadFlash is a private method that generates the HTML tag for the Flash +// It then adds the flash to the "target" or to the body and stores a +// reference to the flash element in "movieElement". +SWFUpload.prototype.loadFlash = function () { + var html, target_element, container; + + // Make sure an element with the ID we are going to use doesn't already exist + if (document.getElementById(this.movieName) !== null) { + return false; + } + + // Get the body tag where we will be adding the flash movie + try { + target_element = document.getElementsByTagName("body")[0]; + if (typeof(target_element) === "undefined" || target_element === null) { + this.debug('Could not find the BODY element. SWFUpload failed to load.'); + return false; + } + } catch (ex) { + return false; + } + + // Append the container and load the flash + container = document.createElement("div"); + container.style.width = this.getSetting("flash_width"); + container.style.height = this.getSetting("flash_height"); + + target_element.appendChild(container); + container.innerHTML = this.getFlashHTML(); // Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers) +}; + +// Generates the embed/object tags needed to embed the flash in to the document +SWFUpload.prototype.getFlashHTML = function () { + var html = ""; + + // Create Mozilla Embed HTML + if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { + // Build the basic embed html + html = '<embed type="application/x-shockwave-flash" src="' + this.getSetting("flash_url") + '" width="' + this.getSetting("flash_width") + '" height="' + this.getSetting("flash_height") + '"'; + html += ' id="' + this.movieName + '" name="' + this.movieName + '" '; + html += 'bgcolor="' + this.getSetting("flash_color") + '" quality="high" menu="false" flashvars="'; + + html += this.getFlashVars(); + + html += '" />'; + + // Create IE Object HTML + } else { + + // Build the basic Object tag + html = '<object id="' + this.movieName + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + this.getSetting("flash_width") + '" height="' + this.getSetting("flash_height") + '">'; + html += '<param name="movie" value="' + this.getSetting("flash_url") + '">'; + + html += '<param name="bgcolor" value="' + this.getSetting("flash_color") + '" />'; + html += '<param name="quality" value="high" />'; + html += '<param name="menu" value="false" />'; + + html += '<param name="flashvars" value="' + this.getFlashVars() + '" />'; + html += '</object>'; + } + + return html; +}; + +// This private method builds the parameter string that will be passed +// to flash. +SWFUpload.prototype.getFlashVars = function () { + // Build a string from the post param object + var param_string = this.buildParamString(); + + // Build the parameter string + var html = ""; + html += "movieName=" + encodeURIComponent(this.movieName); + html += "&uploadURL=" + encodeURIComponent(this.getSetting("upload_url")); + html += "¶ms=" + encodeURIComponent(param_string); + html += "&filePostName=" + encodeURIComponent(this.getSetting("file_post_name")); + html += "&fileTypes=" + encodeURIComponent(this.getSetting("file_types")); + html += "&fileTypesDescription=" + encodeURIComponent(this.getSetting("file_types_description")); + html += "&fileSizeLimit=" + encodeURIComponent(this.getSetting("file_size_limit")); + html += "&fileUploadLimit=" + encodeURIComponent(this.getSetting("file_upload_limit")); + html += "&fileQueueLimit=" + encodeURIComponent(this.getSetting("file_queue_limit")); + html += "&debugEnabled=" + encodeURIComponent(this.getSetting("debug_enabled")); + + return html; +}; + +SWFUpload.prototype.getMovieElement = function () { + if (typeof(this.movieElement) === "undefined" || this.movieElement === null) { + this.movieElement = document.getElementById(this.movieName); + + // Fix IEs "Flash can't callback when in a form" issue (http://www.extremefx.com.ar/blog/fixing-flash-external-interface-inside-form-on-internet-explorer) + // Removed because Revision 6 always adds the flash to the body (inside a containing div) + // If you insist on adding the Flash file inside a Form then in IE you have to make you wait until the DOM is ready + // and run this code to make the form's ID available from the window object so Flash and JavaScript can communicate. + //if (typeof(window[this.movieName]) === "undefined" || window[this.moveName] !== this.movieElement) { + // window[this.movieName] = this.movieElement; + //} + } + + return this.movieElement; +}; + +SWFUpload.prototype.buildParamString = function () { + var post_params = this.getSetting("post_params"); + var param_string_pairs = []; + var i, value, name; + + // Retrieve the user defined parameters + if (typeof(post_params) === "object") { + for (name in post_params) { + if (post_params.hasOwnProperty(name)) { + if (typeof(post_params[name]) === "string") { + param_string_pairs.push(encodeURIComponent(name) + "=" + encodeURIComponent(post_params[name])); + } + } + } + } + + return param_string_pairs.join("&"); +}; + +// Saves a setting. If the value given is undefined or null then the default_value is used. +SWFUpload.prototype.addSetting = function (name, value, default_value) { + if (typeof(value) === "undefined" || value === null) { + this.settings[name] = default_value; + } else { + this.settings[name] = value; + } + + return this.settings[name]; +}; + +// Gets a setting. Returns empty string if not found. +SWFUpload.prototype.getSetting = function (name) { + if (typeof(this.settings[name]) === "undefined") { + return ""; + } else { + return this.settings[name]; + } +}; + +// Gets a setting, if the setting is undefined then return the default value +// This does not affect or use the interal setting object. +SWFUpload.prototype.retrieveSetting = function (value, default_value) { + if (typeof(value) === "undefined" || value === null) { + return default_value; + } else { + return value; + } +}; + + +// It loops through all the settings and displays +// them in the debug Console. +SWFUpload.prototype.displayDebugInfo = function () { + var key, debug_message = ""; + + debug_message += "----- SWFUPLOAD SETTINGS ----\nID: " + this.moveName + "\n"; + + debug_message += this.outputObject(this.settings); + + debug_message += "----- SWFUPLOAD SETTINGS END ----\n"; + debug_message += "\n"; + + this.debug(debug_message); +}; +SWFUpload.prototype.outputObject = function (object, prefix) { + var output = "", key; + + if (typeof(prefix) !== "string") { + prefix = ""; + } + if (typeof(object) !== "object") { + return ""; + } + + for (key in object) { + if (object.hasOwnProperty(key)) { + if (typeof(object[key]) === "object") { + output += (prefix + key + ": { \n" + this.outputObject(object[key], "\t" + prefix) + prefix + "}" + "\n"); + } else { + output += (prefix + key + ": " + object[key] + "\n"); + } + } + } + + return output; +}; + +/* ***************************** + -- Flash control methods -- + Your UI should use these + to operate SWFUpload + ***************************** */ + +SWFUpload.prototype.selectFile = function () { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SelectFile) === "function") { + try { + movie_element.SelectFile(); + } + catch (ex) { + this.debug("Could not call SelectFile: " + ex); + } + } else { + this.debug("Could not find Flash element"); + } + +}; + +SWFUpload.prototype.selectFiles = function () { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SelectFiles) === "function") { + try { + movie_element.SelectFiles(); + } + catch (ex) { + this.debug("Could not call SelectFiles: " + ex); + } + } else { + this.debug("Could not find Flash element"); + } + +}; + + +/* Start the upload. If a file_id is specified that file is uploaded. Otherwise the first + * file in the queue is uploaded. If no files are in the queue then nothing happens. + * This call uses setTimeout since Flash will be calling back in to JavaScript + */ +SWFUpload.prototype.startUpload = function (file_id) { + var self = this; + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.StartUpload) === "function") { + setTimeout( + function () { + try { + movie_element.StartUpload(file_id); + } + catch (ex) { + self.debug("Could not call StartUpload: " + ex); + } + }, 0 + ); + } else { + this.debug("Could not find Flash element"); + } + +}; + +/* Cancels a the file upload. You must specify a file_id */ +SWFUpload.prototype.cancelUpload = function (file_id) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.CancelUpload) === "function") { + try { + movie_element.CancelUpload(file_id); + } + catch (ex) { + this.debug("Could not call CancelUpload: " + ex); + } + } else { + this.debug("Could not find Flash element"); + } + +}; + +// Stops the current upload. The file is re-queued. If nothing is currently uploading then nothing happens. +SWFUpload.prototype.stopUpload = function () { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.StopUpload) === "function") { + try { + movie_element.StopUpload(); + } + catch (ex) { + this.debug("Could not call StopUpload: " + ex); + } + } else { + this.debug("Could not find Flash element"); + } + +}; + +/* ************************ + * Settings methods + * These methods change the settings inside SWFUpload + * They shouldn't need to be called in a setTimeout since they + * should not call back from Flash to JavaScript (except perhaps in a Debug call) + * and some need to return data so setTimeout won't work. + */ + +/* Gets the file statistics object. It looks like this (where n = number): + { + files_queued: n, + complete_uploads: n, + upload_errors: n, + uploads_cancelled: n, + queue_errors: n + } +*/ +SWFUpload.prototype.getStats = function () { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.GetStats) === "function") { + try { + return movie_element.GetStats(); + } + catch (ex) { + this.debug("Could not call GetStats"); + } + } else { + this.debug("Could not find Flash element"); + } +}; +SWFUpload.prototype.setStats = function (stats_object) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetStats) === "function") { + try { + movie_element.SetStats(stats_object); + } + catch (ex) { + this.debug("Could not call SetStats"); + } + } else { + this.debug("Could not find Flash element"); + } +}; + +SWFUpload.prototype.setCredentials = function(name, password) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetCredentials) === "function") { + try { + return movie_element.SetCredentials(name, password); + } + catch (ex) { + this.debug("Could not call SetCredentials"); + } + } else { + this.debug("Could not find Flash element"); + } +}; + +SWFUpload.prototype.getFile = function (file_id) { + var movie_element = this.getMovieElement(); + if (typeof(file_id) === "number") { + if (movie_element !== null && typeof(movie_element.GetFileByIndex) === "function") { + try { + return movie_element.GetFileByIndex(file_id); + } + catch (ex) { + this.debug("Could not call GetFileByIndex"); + } + } else { + this.debug("Could not find Flash element"); + } + } else { + if (movie_element !== null && typeof(movie_element.GetFile) === "function") { + try { + return movie_element.GetFile(file_id); + } + catch (ex) { + this.debug("Could not call GetFile"); + } + } else { + this.debug("Could not find Flash element"); + } + } +}; + +SWFUpload.prototype.addFileParam = function (file_id, name, value) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.AddFileParam) === "function") { + try { + return movie_element.AddFileParam(file_id, name, value); + } + catch (ex) { + this.debug("Could not call AddFileParam"); + } + } else { + this.debug("Could not find Flash element"); + } +}; + +SWFUpload.prototype.removeFileParam = function (file_id, name) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.RemoveFileParam) === "function") { + try { + return movie_element.RemoveFileParam(file_id, name); + } + catch (ex) { + this.debug("Could not call AddFileParam"); + } + } else { + this.debug("Could not find Flash element"); + } + +}; + +SWFUpload.prototype.setUploadURL = function (url) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetUploadURL) === "function") { + try { + this.addSetting("upload_url", url); + movie_element.SetUploadURL(this.getSetting("upload_url")); + } + catch (ex) { + this.debug("Could not call SetUploadURL"); + } + } else { + this.debug("Could not find Flash element in setUploadURL"); + } +}; + +SWFUpload.prototype.setPostParams = function (param_object) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetPostParams) === "function") { + try { + this.addSetting("post_params", param_object); + movie_element.SetPostParams(this.getSetting("post_params")); + } + catch (ex) { + this.debug("Could not call SetPostParams"); + } + } else { + this.debug("Could not find Flash element in SetPostParams"); + } +}; + +SWFUpload.prototype.setFileTypes = function (types, description) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetFileTypes) === "function") { + try { + this.addSetting("file_types", types); + this.addSetting("file_types_description", description); + movie_element.SetFileTypes(this.getSetting("file_types"), this.getSetting("file_types_description")); + } + catch (ex) { + this.debug("Could not call SetFileTypes"); + } + } else { + this.debug("Could not find Flash element in SetFileTypes"); + } +}; + +SWFUpload.prototype.setFileSizeLimit = function (file_size_limit) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetFileSizeLimit) === "function") { + try { + this.addSetting("file_size_limit", file_size_limit); + movie_element.SetFileSizeLimit(this.getSetting("file_size_limit")); + } + catch (ex) { + this.debug("Could not call SetFileSizeLimit"); + } + } else { + this.debug("Could not find Flash element in SetFileSizeLimit"); + } +}; + +SWFUpload.prototype.setFileUploadLimit = function (file_upload_limit) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetFileUploadLimit) === "function") { + try { + this.addSetting("file_upload_limit", file_upload_limit); + movie_element.SetFileUploadLimit(this.getSetting("file_upload_limit")); + } + catch (ex) { + this.debug("Could not call SetFileUploadLimit"); + } + } else { + this.debug("Could not find Flash element in SetFileUploadLimit"); + } +}; + +SWFUpload.prototype.setFileQueueLimit = function (file_queue_limit) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetFileQueueLimit) === "function") { + try { + this.addSetting("file_queue_limit", file_queue_limit); + movie_element.SetFileQueueLimit(this.getSetting("file_queue_limit")); + } + catch (ex) { + this.debug("Could not call SetFileQueueLimit"); + } + } else { + this.debug("Could not find Flash element in SetFileQueueLimit"); + } +}; + +SWFUpload.prototype.setFilePostName = function (file_post_name) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetFilePostName) === "function") { + try { + this.addSetting("file_post_name", file_post_name); + movie_element.SetFilePostName(this.getSetting("file_post_name")); + } + catch (ex) { + this.debug("Could not call SetFilePostName"); + } + } else { + this.debug("Could not find Flash element in SetFilePostName"); + } +}; + +SWFUpload.prototype.setDebugEnabled = function (debug_enabled) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.SetDebugEnabled) === "function") { + try { + this.addSetting("debug_enabled", debug_enabled); + movie_element.SetDebugEnabled(this.getSetting("debug_enabled")); + } + catch (ex) { + this.debug("Could not call SetDebugEnabled"); + } + } else { + this.debug("Could not find Flash element in SetDebugEnabled"); + } +}; + +/* ******************************* + Internal Event Callers + Don't override these! These event callers ensure that your custom event handlers + are called safely and in order. +******************************* */ + +/* This is the callback method that the Flash movie will call when it has been loaded and is ready to go. + Calling this or showUI() "manually" will bypass the Flash Detection built in to SWFUpload. + Use a ui_function setting if you want to control the UI loading after the flash has loaded. +*/ +SWFUpload.prototype.flashReady = function () { + // Check that the movie element is loaded correctly with its ExternalInterface methods defined + var movie_element = this.getMovieElement(); + if (movie_element === null || typeof(movie_element.StartUpload) !== "function") { + this.debug("ExternalInterface methods failed to initialize."); + return; + } + + var self = this; + if (typeof(self.flashReady_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.flashReady_handler(); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("flashReady_handler event not defined"); + } +}; + +/* + Event Queue. Rather can call events directly from Flash they events are + are placed in a queue and then executed. This ensures that each event is + executed in the order it was called which is not guarenteed when calling + setTimeout. Out of order events was especially problematic in Safari. +*/ +SWFUpload.prototype.executeNextEvent = function () { + var f = this.eventQueue.shift(); + if (typeof(f) === "function") { + f(); + } +} + +/* This is a chance to do something before the browse window opens */ +SWFUpload.prototype.fileDialogStart = function () { + var self = this; + if (typeof(self.fileDialogStart_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.fileDialogStart_handler(); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("fileDialogStart event not defined"); + } +}; + + +/* Called when a file is successfully added to the queue. */ +SWFUpload.prototype.fileQueued = function (file) { + var self = this; + if (typeof(self.fileQueued_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.fileQueued_handler(file); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("fileQueued event not defined"); + } +}; + + +/* Handle errors that occur when an attempt to queue a file fails. */ +SWFUpload.prototype.fileQueueError = function (file, error_code, message) { + var self = this; + if (typeof(self.fileQueueError_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.fileQueueError_handler(file, error_code, message); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("fileQueueError event not defined"); + } +}; + +/* Called after the file dialog has closed and the selected files have been queued. + You could call startUpload here if you want the queued files to begin uploading immediately. */ +SWFUpload.prototype.fileDialogComplete = function (num_files_selected) { + var self = this; + if (typeof(self.fileDialogComplete_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.fileDialogComplete_handler(num_files_selected); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("fileDialogComplete event not defined"); + } +}; + +/* Gets called when a file upload is about to be started. Return true to continue the upload. Return false to stop the upload. + If you return false then uploadError and uploadComplete are called (like normal). + + This is a good place to do any file validation you need. + */ +SWFUpload.prototype.uploadStart = function (file) { + var self = this; + if (typeof(self.fileDialogComplete_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.returnUploadStart(self.uploadStart_handler(file)); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("uploadStart event not defined"); + } +}; + +/* Note: Internal use only. This function returns the result of uploadStart to + flash. Since returning values in the normal way can result in Flash/JS circular + call issues we split up the call in a Timeout. This is transparent from the API + point of view. +*/ +SWFUpload.prototype.returnUploadStart = function (return_value) { + var movie_element = this.getMovieElement(); + if (movie_element !== null && typeof(movie_element.ReturnUploadStart) === "function") { + try { + movie_element.ReturnUploadStart(return_value); + } + catch (ex) { + this.debug("Could not call ReturnUploadStart"); + } + } else { + this.debug("Could not find Flash element in returnUploadStart"); + } +}; + + + +/* Called during upload as the file progresses. Use this event to update your UI. */ +SWFUpload.prototype.uploadProgress = function (file, bytes_complete, bytes_total) { + var self = this; + if (typeof(self.uploadProgress_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.uploadProgress_handler(file, bytes_complete, bytes_total); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("uploadProgress event not defined"); + } +}; + +/* Called when an error occurs during an upload. Use error_code and the SWFUpload.UPLOAD_ERROR constants to determine + which error occurred. The uploadComplete event is called after an error code indicating that the next file is + ready for upload. For files cancelled out of order the uploadComplete event will not be called. */ +SWFUpload.prototype.uploadError = function (file, error_code, message) { + var self = this; + if (typeof(this.uploadError_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.uploadError_handler(file, error_code, message); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("uploadError event not defined"); + } +}; + +/* This gets called when a file finishes uploading and the server-side upload script has completed and returned a 200 +status code. Any text returned by the server is available in server_data. +**NOTE: The upload script MUST return some text or the uploadSuccess and uploadComplete events will not fire and the +upload will become 'stuck'. */ +SWFUpload.prototype.uploadSuccess = function (file, server_data) { + var self = this; + if (typeof(self.uploadSuccess_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.uploadSuccess_handler(file, server_data); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("uploadSuccess event not defined"); + } +}; + +/* uploadComplete is called when the file is uploaded or an error occurred and SWFUpload is ready to make the next upload. + If you want the next upload to start to automatically you can call startUpload() from this event. */ +SWFUpload.prototype.uploadComplete = function (file) { + var self = this; + if (typeof(self.uploadComplete_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.uploadComplete_handler(file); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.debug("uploadComplete event not defined"); + } +}; + +/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the + internal debug console. You can override this event and have messages written where you want. */ +SWFUpload.prototype.debug = function (message) { + var self = this; + if (typeof(self.debug_handler) === "function") { + this.eventQueue[this.eventQueue.length] = function() { self.debug_handler(message); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } else { + this.eventQueue[this.eventQueue.length] = function() { self.debugMessage(message); }; + setTimeout(function () { self.executeNextEvent();}, 0); + } +}; + + +/* ********************************** + Default Event Handlers. + These event handlers are used by default if an overriding handler is + not defined in the SWFUpload settings object. + + JS Note: even though these are defined on the SWFUpload object (rather than the prototype) they + are attached (read: copied) to a SWFUpload instance and 'this' is given the proper context. + ********************************** */ + +/* This is a special event handler that has no override in the settings. Flash calls this when it has + been loaded by the browser and is ready for interaction. You should not override it. If you need + to do something with SWFUpload has loaded then use the swfupload_loaded_handler setting. +*/ +SWFUpload.flashReady = function () { + try { + this.debug("Flash called back and is ready."); + + if (typeof(this.swfUploadLoaded_handler) === "function") { + this.swfUploadLoaded_handler(); + } + } catch (ex) { + this.debug(ex); + } +}; + +/* This is a chance to something immediately after SWFUpload has loaded. + Like, hide the default/degraded upload form and display the SWFUpload form. */ +SWFUpload.swfUploadLoaded = function () { +}; + +/* This is a chance to do something before the browse window opens */ +SWFUpload.fileDialogStart = function () { +}; + + +/* Called when a file is successfully added to the queue. */ +SWFUpload.fileQueued = function (file) { +}; + + +/* Handle errors that occur when an attempt to queue a file fails. */ +SWFUpload.fileQueueError = function (file, error_code, message) { + try { + switch (error_code) { + case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT: + this.debug("Error Code: File too big, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: + this.debug("Error Code: Zero Byte File, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED: + this.debug("Error Code: Upload limit reached, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE: + this.debug("Error Code: File extension is not allowed, Message: " + message); + break; + default: + this.debug("Error Code: Unhandled error occured. Errorcode: " + error_code); + } + } catch (ex) { + this.debug(ex); + } +}; + +/* Called after the file dialog has closed and the selected files have been queued. + You could call startUpload here if you want the queued files to begin uploading immediately. */ +SWFUpload.fileDialogComplete = function (num_files_selected) { +}; + +/* Gets called when a file upload is about to be started. Return true to continue the upload. Return false to stop the upload. + If you return false then the uploadError callback is called and then uploadComplete (like normal). + + This is a good place to do any file validation you need. + + This is the only function that cannot be called on a setTimeout because it must return a value to Flash. + You SHOULD NOT make any calls in to Flash (e.i, changing settings, getting stats, etc). Flash Player bugs prevent + calls in to Flash from working reliably. +*/ +SWFUpload.uploadStart = function (file) { + return true; +}; + +// Called during upload as the file progresses +SWFUpload.uploadProgress = function (file, bytes_complete, bytes_total) { + this.debug("File Progress: " + file.id + ", Bytes: " + bytes_complete + ". Total: " + bytes_total); +}; + +/* This gets called when a file finishes uploading and the upload script has completed and returned a 200 status code. Any text returned by the +server is available in server_data. The upload script must return some text or uploadSuccess will not fire (neither will uploadComplete). */ +SWFUpload.uploadSuccess = function (file, server_data) { + this.debug("Upload Success: " + file.id + ", Server: " + server_data); +}; + +/* This is called last. The file is uploaded or an error occurred and SWFUpload is ready to make the next upload. + If you want to automatically start the next file just call startUpload from here. +*/ +SWFUpload.uploadComplete = function (file) { + this.debug("Upload Complete: " + file.id); +}; + +// Called by SWFUpload JavaScript and Flash functions when debug is enabled. +// Override this method in your settings to call your own debug message handler +SWFUpload.debug = function (message) { + if (this.getSetting("debug_enabled")) { + this.debugMessage(message); + } +}; + +/* Called when an upload occurs during upload. For HTTP errors 'message' will contain the HTTP STATUS CODE */ +SWFUpload.uploadError = function (file, errcode, msg) { + try { + switch (errcode) { + case SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND: + this.debug("Error Code: File ID specified for upload was not found, Message: " + msg); + break; + case SWFUpload.UPLOAD_ERROR.HTTP_ERROR: + this.debug("Error Code: HTTP Error, File name: " + file.name + ", Message: " + msg); + break; + case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL: + this.debug("Error Code: No backend file, File name: " + file.name + ", Message: " + msg); + break; + case SWFUpload.UPLOAD_ERROR.IO_ERROR: + this.debug("Error Code: IO Error, File name: " + file.name + ", Message: " + msg); + break; + case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR: + this.debug("Error Code: Security Error, File name: " + file.name + ", Message: " + msg); + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED: + this.debug("Error Code: Upload limit reached, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg); + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED: + this.debug("Error Code: Upload Initialization exception, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg); + break; + case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED: + this.debug("Error Code: uploadStart callback returned false, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg); + break; + case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED: + this.debug("Error Code: The file upload was cancelled, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg); + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED: + this.debug("Error Code: The file upload was stopped, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg); + break; + default: + this.debug("Error Code: Unhandled error occured. Errorcode: " + errcode); + } + } catch (ex) { + this.debug(ex); + } +}; + + + +/* ********************************** + Debug Console + The debug console is a self contained, in page location + for debug message to be sent. The Debug Console adds + itself to the body if necessary. + + The console is automatically scrolled as messages appear. + + You can override this console (to use FireBug's console for instance) by setting the debug event method to your own function + that handles the debug message + ********************************** */ +SWFUpload.prototype.debugMessage = function (message) { + var exception_message, exception_values; + + if (typeof(message) === "object" && typeof(message.name) === "string" && typeof(message.message) === "string") { + exception_message = ""; + exception_values = []; + for (var key in message) { + exception_values.push(key + ": " + message[key]); + } + exception_message = exception_values.join("\n"); + exception_values = exception_message.split("\n"); + exception_message = "EXCEPTION: " + exception_values.join("\nEXCEPTION: "); + SWFUpload.Console.writeLine(exception_message); + } else { + SWFUpload.Console.writeLine(message); + } +}; + +SWFUpload.Console = {}; +SWFUpload.Console.writeLine = function (message) { + var console, documentForm; + + try { + console = document.getElementById("SWFUpload_Console"); + + if (!console) { + documentForm = document.createElement("form"); + document.getElementsByTagName("body")[0].appendChild(documentForm); + + console = document.createElement("textarea"); + console.id = "SWFUpload_Console"; + console.style.fontFamily = "monospace"; + console.setAttribute("wrap", "off"); + console.wrap = "off"; + console.style.overflow = "auto"; + console.style.width = "700px"; + console.style.height = "350px"; + console.style.margin = "5px"; + documentForm.appendChild(console); + } + + console.value += message + "\n"; + + console.scrollTop = console.scrollHeight - console.clientHeight; + } catch (ex) { + alert("Exception: " + ex.name + " Message: " + ex.message); + } +}; diff --git a/wp-includes/js/swfupload/swfupload_f9.swf b/wp-includes/js/swfupload/swfupload_f9.swf Binary files differnew file mode 100644 index 0000000..2aba003 --- /dev/null +++ b/wp-includes/js/swfupload/swfupload_f9.swf diff --git a/wp-includes/js/thickbox/loadingAnimation.gif b/wp-includes/js/thickbox/loadingAnimation.gif Binary files differnew file mode 100644 index 0000000..82290f4 --- /dev/null +++ b/wp-includes/js/thickbox/loadingAnimation.gif diff --git a/wp-includes/js/thickbox/tb-close.png b/wp-includes/js/thickbox/tb-close.png Binary files differnew file mode 100644 index 0000000..6a48f46 --- /dev/null +++ b/wp-includes/js/thickbox/tb-close.png diff --git a/wp-includes/js/thickbox/thickbox.css b/wp-includes/js/thickbox/thickbox.css new file mode 100644 index 0000000..0552cc5 --- /dev/null +++ b/wp-includes/js/thickbox/thickbox.css @@ -0,0 +1,159 @@ + +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +#TB_window { + font: 12px Arial, Helvetica, sans-serif; + color: #333333; +} + +#TB_secondLine { + font: 10px Arial, Helvetica, sans-serif; + color:#666666; +} + +#TB_window a:link {color: #666666;} +#TB_window a:visited {color: #666666;} +#TB_window a:hover {color: #000;} +#TB_window a:active {color: #666666;} +#TB_window a:focus{color: #666666;} + +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +#TB_overlay { + position: fixed; + z-index:100; + top: 0px; + left: 0px; + height:100%; + width:100%; +} + +.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;} +.TB_overlayBG { + background-color:#000; + filter:alpha(opacity=75); + -moz-opacity: 0.75; + opacity: 0.75; +} + +* html #TB_overlay { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_window { + position: fixed; + background: #ffffff; + z-index: 102; + color:#000000; + display:none; + border: 4px solid #525252; + text-align:left; + top:50%; + left:50%; +} + +* html #TB_window { /* ie6 hack */ +position: absolute; +margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_window img#TB_Image { + display:block; + margin: 15px 0 0 15px; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + border-top: 1px solid #666; + border-left: 1px solid #666; +} + +#TB_caption{ + height:25px; + padding:7px 30px 10px 25px; + float:left; +} + +#TB_closeWindow{ + height:25px; + padding:11px 25px 10px 0; + float:right; +} + +#TB_closeAjaxWindow{ + padding:7px 10px 5px 0; + margin-bottom:1px; + text-align:right; + float:right; +} + +#TB_ajaxWindowTitle{ + float:left; + padding:7px 0 5px 10px; + margin-bottom:1px; +} + +#TB_title{ + background-color:#e8e8e8; + height:27px; +} + +#TB_ajaxContent{ + clear:both; + padding:2px 15px 15px 15px; + overflow:auto; + text-align:left; + line-height:1.4em; +} + +#TB_ajaxContent.TB_modal{ + padding:15px; +} + +#TB_ajaxContent p{ + padding:5px 0px 5px 0px; +} + +#TB_load{ + position: fixed; + display:none; + height:13px; + width:208px; + z-index:103; + top: 50%; + left: 50%; + margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ +} + +* html #TB_load { /* ie6 hack */ +position: absolute; +margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_HideSelect{ + z-index:99; + position:fixed; + top: 0; + left: 0; + background-color:#fff; + border:none; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + height:100%; + width:100%; +} + +* html #TB_HideSelect { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_iframeContent{ + clear:both; + border:none; + margin-bottom:-1px; + margin-top:1px; + _margin-bottom:1px; +} diff --git a/wp-includes/js/thickbox/thickbox.js b/wp-includes/js/thickbox/thickbox.js new file mode 100644 index 0000000..f31d779 --- /dev/null +++ b/wp-includes/js/thickbox/thickbox.js @@ -0,0 +1,320 @@ +/* + * Thickbox 3.1 - One Box To Rule Them All. + * By Cody Lindley (http://www.codylindley.com) + * Copyright (c) 2007 cody lindley + * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php +*/ + +var tb_pathToImage = "../wp-includes/js/thickbox/loadingAnimation.gif"; +var tb_closeImage = "../wp-includes/js/thickbox/tb-close.png"; + +/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ + +//on page load call tb_init +addLoadEvent(function(){ + tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox + imgLoader = new Image();// preload image + imgLoader.src = tb_pathToImage; +}); + +//add thickbox to href & area elements that have a class of .thickbox +function tb_init(domChunk){ + jQuery(domChunk).click(function(){ + var t = this.title || this.name || null; + var a = this.href || this.alt; + var g = this.rel || false; + tb_show(t,a,g); + this.blur(); + return false; + }); +} + +function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link + + try { + if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 + jQuery("body","html").css({height: "100%", width: "100%"}); + jQuery("html").css("overflow","hidden"); + if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 + jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>"); + jQuery("#TB_overlay").click(tb_remove); + } + }else{//all others + if(document.getElementById("TB_overlay") === null){ + jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>"); + jQuery("#TB_overlay").click(tb_remove); + } + } + + if(tb_detectMacXFF()){ + jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash + }else{ + jQuery("#TB_overlay").addClass("TB_overlayBG");//use background and opacity + } + + if(caption===null){caption="";} + jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page + jQuery('#TB_load').show();//show loader + + var baseURL; + if(url.indexOf("?")!==-1){ //ff there is a query string involved + baseURL = url.substr(0, url.indexOf("?")); + }else{ + baseURL = url; + } + + var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; + var urlType = baseURL.toLowerCase().match(urlString); + + if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images + + TB_PrevCaption = ""; + TB_PrevURL = ""; + TB_PrevHTML = ""; + TB_NextCaption = ""; + TB_NextURL = ""; + TB_NextHTML = ""; + TB_imageCount = ""; + TB_FoundURL = false; + if(imageGroup){ + TB_TempArray = jQuery("a[@rel="+imageGroup+"]").get(); + for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { + var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); + if (!(TB_TempArray[TB_Counter].href == url)) { + if (TB_FoundURL) { + TB_NextCaption = TB_TempArray[TB_Counter].title; + TB_NextURL = TB_TempArray[TB_Counter].href; + TB_NextHTML = "<span id='TB_next'> <a href='#'>Next ></a></span>"; + } else { + TB_PrevCaption = TB_TempArray[TB_Counter].title; + TB_PrevURL = TB_TempArray[TB_Counter].href; + TB_PrevHTML = "<span id='TB_prev'> <a href='#'>< Prev</a></span>"; + } + } else { + TB_FoundURL = true; + TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); + } + } + } + + imgPreloader = new Image(); + imgPreloader.onload = function(){ + imgPreloader.onload = null; + + // Resizing large images - orginal by Christian Montoya edited by me. + var pagesize = tb_getPageSize(); + var x = pagesize[0] - 150; + var y = pagesize[1] - 150; + var imageWidth = imgPreloader.width; + var imageHeight = imgPreloader.height; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + } + } else if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + } + } + // End Resizing + + TB_WIDTH = imageWidth + 30; + TB_HEIGHT = imageHeight + 60; + jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='" + tb_closeImage + "' /></a></div>"); + + jQuery("#TB_closeWindowButton").click(tb_remove); + + if (!(TB_PrevHTML === "")) { + function goPrev(){ + if(jQuery(document).unbind("click",goPrev)){jQuery(document).unbind("click",goPrev);} + jQuery("#TB_window").remove(); + jQuery("body").append("<div id='TB_window'></div>"); + tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); + return false; + } + jQuery("#TB_prev").click(goPrev); + } + + if (!(TB_NextHTML === "")) { + function goNext(){ + jQuery("#TB_window").remove(); + jQuery("body").append("<div id='TB_window'></div>"); + tb_show(TB_NextCaption, TB_NextURL, imageGroup); + return false; + } + jQuery("#TB_next").click(goNext); + + } + + document.onkeydown = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } else if(keycode == 190){ // display previous image + if(!(TB_NextHTML == "")){ + document.onkeydown = ""; + goNext(); + } + } else if(keycode == 188){ // display next image + if(!(TB_PrevHTML == "")){ + document.onkeydown = ""; + goPrev(); + } + } + }; + + tb_position(); + jQuery("#TB_load").remove(); + jQuery("#TB_ImageOff").click(tb_remove); + jQuery("#TB_window").css({display:"block"}); //for safari using css instead of show + }; + + imgPreloader.src = url; + }else{//code to show html + + var queryString = url.replace(/^[^\?]+\??/,''); + var params = tb_parseQuery( queryString ); + + TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL + TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL + ajaxContentW = TB_WIDTH - 30; + ajaxContentH = TB_HEIGHT - 45; + + if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window + urlNoQuery = url.split('TB_'); + jQuery("#TB_iframeContent").remove(); + if(params['modal'] != "true"){//iframe no modal + jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='" + tb_closeImage + "' /></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>"); + }else{//iframe modal + jQuery("#TB_overlay").unbind(); + jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>"); + } + }else{// not an iframe, ajax + if(jQuery("#TB_window").css("display") != "block"){ + if(params['modal'] != "true"){//ajax no modal + jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src='" + tb_closeImage + "' /></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>"); + }else{//ajax modal + jQuery("#TB_overlay").unbind(); + jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>"); + } + }else{//this means the window is already up, we are just loading new content via ajax + jQuery("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; + jQuery("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; + jQuery("#TB_ajaxContent")[0].scrollTop = 0; + jQuery("#TB_ajaxWindowTitle").html(caption); + } + } + + jQuery("#TB_closeWindowButton").click(tb_remove); + + if(url.indexOf('TB_inline') != -1){ + jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children()); + jQuery("#TB_window").unload(function () { + jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished + }); + tb_position(); + jQuery("#TB_load").remove(); + jQuery("#TB_window").css({display:"block"}); + }else if(url.indexOf('TB_iframe') != -1){ + tb_position(); + if($.browser.safari){//safari needs help because it will not fire iframe onload + jQuery("#TB_load").remove(); + jQuery("#TB_window").css({display:"block"}); + } + }else{ + jQuery("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method + tb_position(); + jQuery("#TB_load").remove(); + tb_init("#TB_ajaxContent a.thickbox"); + jQuery("#TB_window").css({display:"block"}); + }); + } + + } + + if(!params['modal']){ + document.onkeyup = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } + }; + } + + } catch(e) { + //nothing here + } +} + +//helper functions below +function tb_showIframe(){ + jQuery("#TB_load").remove(); + jQuery("#TB_window").css({display:"block"}); +} + +function tb_remove() { + jQuery("#TB_imageOff").unbind("click"); + jQuery("#TB_closeWindowButton").unbind("click"); + jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); + jQuery("#TB_load").remove(); + if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 + jQuery("body","html").css({height: "auto", width: "auto"}); + jQuery("html").css("overflow",""); + } + document.onkeydown = ""; + document.onkeyup = ""; + return false; +} + +function tb_position() { +jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); + if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6 + jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); + } +} + +function tb_parseQuery ( query ) { + var Params = {}; + if ( ! query ) {return Params;}// return empty object + var Pairs = query.split(/[;&]/); + for ( var i = 0; i < Pairs.length; i++ ) { + var KeyVal = Pairs[i].split('='); + if ( ! KeyVal || KeyVal.length != 2 ) {continue;} + var key = unescape( KeyVal[0] ); + var val = unescape( KeyVal[1] ); + val = val.replace(/\+/g, ' '); + Params[key] = val; + } + return Params; +} + +function tb_getPageSize(){ + var de = document.documentElement; + var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; + var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; + arrayPageSize = [w,h]; + return arrayPageSize; +} + +function tb_detectMacXFF() { + var userAgent = navigator.userAgent.toLowerCase(); + if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { + return true; + } +} + + diff --git a/wp-includes/js/tinymce/langs/en.js b/wp-includes/js/tinymce/langs/en.js deleted file mode 100644 index c093eaf..0000000 --- a/wp-includes/js/tinymce/langs/en.js +++ /dev/null @@ -1,41 +0,0 @@ -// UK lang variables
-
-tinyMCE.addToLang('',{
-bold_desc : 'Bold (Ctrl+B)',
-italic_desc : 'Italic (Ctrl+I)',
-underline_desc : 'Underline (Ctrl+U)',
-striketrough_desc : 'Strikethrough',
-justifyleft_desc : 'Align left',
-justifycenter_desc : 'Align center',
-justifyright_desc : 'Align right',
-justifyfull_desc : 'Align full',
-bullist_desc : 'Unordered list',
-numlist_desc : 'Ordered list',
-outdent_desc : 'Outdent',
-indent_desc : 'Indent',
-undo_desc : 'Undo (Ctrl+Z)',
-redo_desc : 'Redo (Ctrl+Y)',
-link_desc : 'Insert/edit link',
-unlink_desc : 'Unlink',
-image_desc : 'Insert/edit image',
-cleanup_desc : 'Cleanup messy code',
-focus_alert : 'A editor instance must be focused before using this command.',
-edit_confirm : 'Do you want to use the WYSIWYG mode for this textarea?',
-insert_link_title : 'Insert/edit link',
-insert : 'Insert',
-update : 'Update',
-cancel : 'Cancel',
-insert_link_url : 'Link URL',
-insert_link_target : 'Target',
-insert_link_target_same : 'Open link in the same window',
-insert_link_target_blank : 'Open link in a new window',
-insert_image_title : 'Insert/edit image',
-insert_image_src : 'Image URL',
-insert_image_alt : 'Image description',
-help_desc : 'Help',
-bold_img : "bold.gif",
-italic_img : "italic.gif",
-underline_img : "underline.gif",
-clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?',
-popup_blocked : 'Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.'
-});
diff --git a/wp-includes/js/tinymce/langs/wp-langs.php b/wp-includes/js/tinymce/langs/wp-langs.php new file mode 100644 index 0000000..39d2e51 --- /dev/null +++ b/wp-includes/js/tinymce/langs/wp-langs.php @@ -0,0 +1,400 @@ +<?php + +// escape text only if it needs translating +function mce_escape($text) { + global $language; + + if ( 'en' == $language ) return $text; + else return js_escape($text); +} + +$strings = 'tinyMCE.addI18n({' . $language . ':{ +common:{ +edit_confirm:"' . mce_escape( __('Do you want to use the WYSIWYG mode for this textarea?') ) . '", +apply:"' . mce_escape( __('Apply') ) . '", +insert:"' . mce_escape( __('Insert') ) . '", +update:"' . mce_escape( __('Update') ) . '", +cancel:"' . mce_escape( __('Cancel') ) . '", +close:"' . mce_escape( __('Close') ) . '", +browse:"' . mce_escape( __('Browse') ) . '", +class_name:"' . mce_escape( __('Class') ) . '", +not_set:"' . mce_escape( __('-- Not set --') ) . '", +clipboard_msg:"' . mce_escape( __('Copy/Cut/Paste is not available in Mozilla and Firefox.') ) . '", +clipboard_no_support:"' . mce_escape( __('Currently not supported by your browser, use keyboard shortcuts instead.') ) . '", +popup_blocked:"' . mce_escape( __('Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.') ) . '", +invalid_data:"' . mce_escape( __('Error: Invalid values entered, these are marked in red.') ) . '", +more_colors:"' . mce_escape( __('More colors') ) . '" +}, +contextmenu:{ +align:"' . mce_escape( __('Alignment') ) . '", +left:"' . mce_escape( __('Left') ) . '", +center:"' . mce_escape( __('Center') ) . '", +right:"' . mce_escape( __('Right') ) . '", +full:"' . mce_escape( __('Full') ) . '" +}, +insertdatetime:{ +date_fmt:"' . mce_escape( __('%Y-%m-%d') ) . '", +time_fmt:"' . mce_escape( __('%H:%M:%S') ) . '", +insertdate_desc:"' . mce_escape( __('Insert date') ) . '", +inserttime_desc:"' . mce_escape( __('Insert time') ) . '", +months_long:"' . mce_escape( _c('January,February,March,April,May,June,July,August,September,October,November,December|Comma separated list of the months. No spaces between them.') ) . '", +months_short:"' . mce_escape( _c('Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec|Comma separated list of the abbreviated names of the months. No spaces between them.') ) . '", +day_long:"' . mce_escape( _c('Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday|Comma separated list of the days of the week. No spaces between them.') ) . '", +day_short:"' . mce_escape( _c('Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun|Comma separated list of the abbreviated names for the days of the week. No spaces between them.') ) . '" +}, +print:{ +print_desc:"' . mce_escape( __('Print') ) . '" +}, +preview:{ +preview_desc:"' . mce_escape( __('Preview') ) . '" +}, +directionality:{ +ltr_desc:"' . mce_escape( __('Direction left to right') ) . '", +rtl_desc:"' . mce_escape( __('Direction right to left') ) . '" +}, +layer:{ +insertlayer_desc:"' . mce_escape( __('Insert new layer') ) . '", +forward_desc:"' . mce_escape( __('Move forward') ) . '", +backward_desc:"' . mce_escape( __('Move backward') ) . '", +absolute_desc:"' . mce_escape( __('Toggle absolute positioning') ) . '", +content:"' . mce_escape( __('New layer...') ) . '" +}, +save:{ +save_desc:"' . mce_escape( __('Save') ) . '", +cancel_desc:"' . mce_escape( __('Cancel all changes') ) . '" +}, +nonbreaking:{ +nonbreaking_desc:"' . mce_escape( __('Insert non-breaking space character') ) . '" +}, +iespell:{ +iespell_desc:"' . mce_escape( __('Run spell checking') ) . '", +download:"' . mce_escape( __('ieSpell not detected. Do you want to install it now?') ) . '" +}, +advhr:{ +advhr_desc:"' . mce_escape( __('Horizontale rule') ) . '" +}, +emotions:{ +emotions_desc:"' . mce_escape( __('Emotions') ) . '" +}, +searchreplace:{ +search_desc:"' . mce_escape( __('Find') ) . '", +replace_desc:"' . mce_escape( __('Find/Replace') ) . '" +}, +advimage:{ +image_desc:"' . mce_escape( __('Insert/edit image') ) . '" +}, +advlink:{ +link_desc:"' . mce_escape( __('Insert/edit link') ) . '" +}, +xhtmlxtras:{ +cite_desc:"' . mce_escape( __('Citation') ) . '", +abbr_desc:"' . mce_escape( __('Abbreviation') ) . '", +acronym_desc:"' . mce_escape( __('Acronym') ) . '", +del_desc:"' . mce_escape( __('Deletion') ) . '", +ins_desc:"' . mce_escape( __('Insertion') ) . '", +attribs_desc:"' . mce_escape( __('Insert/Edit Attributes') ) . '" +}, +style:{ +desc:"' . mce_escape( __('Edit CSS Style') ) . '" +}, +paste:{ +paste_text_desc:"' . mce_escape( __('Paste as Plain Text') ) . '", +paste_word_desc:"' . mce_escape( __('Paste from Word') ) . '", +selectall_desc:"' . mce_escape( __('Select All') ) . '" +}, +paste_dlg:{ +text_title:"' . mce_escape( __('Use CTRL+V on your keyboard to paste the text into the window.') ) . '", +text_linebreaks:"' . mce_escape( __('Keep linebreaks') ) . '", +word_title:"' . mce_escape( __('Use CTRL+V on your keyboard to paste the text into the window.') ) . '" +}, +table:{ +desc:"' . mce_escape( __('Inserts a new table') ) . '", +row_before_desc:"' . mce_escape( __('Insert row before') ) . '", +row_after_desc:"' . mce_escape( __('Insert row after') ) . '", +delete_row_desc:"' . mce_escape( __('Delete row') ) . '", +col_before_desc:"' . mce_escape( __('Insert column before') ) . '", +col_after_desc:"' . mce_escape( __('Insert column after') ) . '", +delete_col_desc:"' . mce_escape( __('Remove column') ) . '", +split_cells_desc:"' . mce_escape( __('Split merged table cells') ) . '", +merge_cells_desc:"' . mce_escape( __('Merge table cells') ) . '", +row_desc:"' . mce_escape( __('Table row properties') ) . '", +cell_desc:"' . mce_escape( __('Table cell properties') ) . '", +props_desc:"' . mce_escape( __('Table properties') ) . '", +paste_row_before_desc:"' . mce_escape( __('Paste table row before') ) . '", +paste_row_after_desc:"' . mce_escape( __('Paste table row after') ) . '", +cut_row_desc:"' . mce_escape( __('Cut table row') ) . '", +copy_row_desc:"' . mce_escape( __('Copy table row') ) . '", +del:"' . mce_escape( __('Delete table') ) . '", +row:"' . mce_escape( __('Row') ) . '", +col:"' . mce_escape( __('Column') ) . '", +cell:"' . mce_escape( __('Cell') ) . '" +}, +autosave:{ +unload_msg:"' . mce_escape( __('The changes you made will be lost if you navigate away from this page.') ) . '" +}, +fullscreen:{ +desc:"' . mce_escape( __('Toggle fullscreen mode') ) . ' (Alt+Shift+G)" +}, +media:{ +desc:"' . mce_escape( __('Insert / edit embedded media') ) . '", +delta_width:"' . mce_escape( _c('0| Extra width for the media popup in pixels') ) . '", +delta_height:"' . mce_escape( _c('0| Extra height for the media popup in pixels') ) . '", +edit:"' . mce_escape( __('Edit embedded media') ) . '" +}, +fullpage:{ +desc:"' . mce_escape( __('Document properties') ) . '" +}, +template:{ +desc:"' . mce_escape( __('Insert predefined template content') ) . '" +}, +visualchars:{ +desc:"' . mce_escape( __('Visual control characters on/off.') ) . '" +}, +spellchecker:{ +desc:"' . mce_escape( __('Toggle spellchecker') ) . ' (Alt+Shift+N)", +menu:"' . mce_escape( __('Spellchecker settings') ) . '", +ignore_word:"' . mce_escape( __('Ignore word') ) . '", +ignore_words:"' . mce_escape( __('Ignore all') ) . '", +langs:"' . mce_escape( __('Languages') ) . '", +wait:"' . mce_escape( __('Please wait...') ) . '", +sug:"' . mce_escape( __('Suggestions') ) . '", +no_sug:"' . mce_escape( __('No suggestions') ) . '", +no_mpell:"' . mce_escape( __('No misspellings found.') ) . '" +}, +pagebreak:{ +desc:"' . mce_escape( __('Insert page break.') ) . '" +}}}); + +tinyMCE.addI18n("' . $language . '.advanced",{ +style_select:"' . mce_escape( __('Styles') ) . '", +font_size:"' . mce_escape( __('Font size') ) . '", +fontdefault:"' . mce_escape( __('Font family') ) . '", +block:"' . mce_escape( __('Format') ) . '", +paragraph:"' . mce_escape( __('Paragraph') ) . '", +div:"' . mce_escape( __('Div') ) . '", +address:"' . mce_escape( __('Address') ) . '", +pre:"' . mce_escape( __('Preformatted') ) . '", +h1:"' . mce_escape( __('Heading 1') ) . '", +h2:"' . mce_escape( __('Heading 2') ) . '", +h3:"' . mce_escape( __('Heading 3') ) . '", +h4:"' . mce_escape( __('Heading 4') ) . '", +h5:"' . mce_escape( __('Heading 5') ) . '", +h6:"' . mce_escape( __('Heading 6') ) . '", +blockquote:"' . mce_escape( __('Blockquote') ) . '", +code:"' . mce_escape( __('Code') ) . '", +samp:"' . mce_escape( __('Code sample') ) . '", +dt:"' . mce_escape( __('Definition term ') ) . '", +dd:"' . mce_escape( __('Definition description') ) . '", +bold_desc:"' . mce_escape( __('Bold') ) . ' (Ctrl / Alt+Shift + B)", +italic_desc:"' . mce_escape( __('Italic') ) . ' (Ctrl / Alt+Shift + I)", +underline_desc:"' . mce_escape( __('Underline') ) . '", +striketrough_desc:"' . mce_escape( __('Strikethrough') ) . ' (Alt+Shift+D)", +justifyleft_desc:"' . mce_escape( __('Align left') ) . ' (Alt+Shift+L)", +justifycenter_desc:"' . mce_escape( __('Align center') ) . ' (Alt+Shift+C)", +justifyright_desc:"' . mce_escape( __('Align right') ) . ' (Alt+Shift+R)", +justifyfull_desc:"' . mce_escape( __('Align full') ) . ' (Alt+Shift+J)", +bullist_desc:"' . mce_escape( __('Unordered list') ) . ' (Alt+Shift+U)", +numlist_desc:"' . mce_escape( __('Ordered list') ) . ' (Alt+Shift+O)", +outdent_desc:"' . mce_escape( __('Outdent') ) . '", +indent_desc:"' . mce_escape( __('Indent') ) . '", +undo_desc:"' . mce_escape( __('Undo') ) . ' (Ctrl+Z)", +redo_desc:"' . mce_escape( __('Redo') ) . ' (Ctrl+Y)", +link_desc:"' . mce_escape( __('Insert/edit link') ) . ' (Alt+Shift+A)", +link_delta_width:"' . mce_escape( _c('0| Extra width for the link popup in pixels') ) . '", +link_delta_height:"' . mce_escape( _c('0| Extra height for the link popup in pixels') ) . '", +unlink_desc:"' . mce_escape( __('Unlink') ) . ' (Alt+Shift+S)", +image_desc:"' . mce_escape( __('Insert/edit image') ) . ' (Alt+Shift+M)", +image_delta_width:"' . mce_escape( _c('0| Extra width for the image popup in pixels') ) . '", +image_delta_height:"' . mce_escape( _c('0| Extra height for the image popup in pixels') ) . '", +cleanup_desc:"' . mce_escape( __('Cleanup messy code') ) . '", +code_desc:"' . mce_escape( __('Edit HTML Source') ) . '", +sub_desc:"' . mce_escape( __('Subscript') ) . '", +sup_desc:"' . mce_escape( __('Superscript') ) . '", +hr_desc:"' . mce_escape( __('Insert horizontal ruler') ) . '", +removeformat_desc:"' . mce_escape( __('Remove formatting') ) . '", +forecolor_desc:"' . mce_escape( __('Select text color') ) . '", +backcolor_desc:"' . mce_escape( __('Select background color') ) . '", +charmap_desc:"' . mce_escape( __('Insert custom character') ) . '", +visualaid_desc:"' . mce_escape( __('Toggle guidelines/invisible elements') ) . '", +anchor_desc:"' . mce_escape( __('Insert/edit anchor') ) . '", +cut_desc:"' . mce_escape( __('Cut') ) . '", +copy_desc:"' . mce_escape( __('Copy') ) . '", +paste_desc:"' . mce_escape( __('Paste') ) . '", +image_props_desc:"' . mce_escape( __('Image properties') ) . '", +newdocument_desc:"' . mce_escape( __('New document') ) . '", +help_desc:"' . mce_escape( __('Help') ) . '", +blockquote_desc:"' . mce_escape( __('Blockquote') ) . ' (Alt+Shift+Q)", +clipboard_msg:"' . mce_escape( __('Copy/Cut/Paste is not available in Mozilla and Firefox.') ) . '", +path:"' . mce_escape( __('Path') ) . '", +newdocument:"' . mce_escape( __('Are you sure you want to clear all contents?') ) . '", +toolbar_focus:"' . mce_escape( __('Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X') ) . '", +more_colors:"' . mce_escape( __('More colors') ) . '", +colorpicker_delta_width:"' . mce_escape( _c('0| Extra width for the colorpicker popup in pixels') ) . '", +colorpicker_delta_height:"' . mce_escape( _c('0| Extra height for the colorpicker popup in pixels') ) . '" +}); + +tinyMCE.addI18n("' . $language . '.advanced_dlg",{ +about_title:"' . mce_escape( __('About TinyMCE') ) . '", +about_general:"' . mce_escape( __('About') ) . '", +about_help:"' . mce_escape( __('Help') ) . '", +about_license:"' . mce_escape( __('License') ) . '", +about_plugins:"' . mce_escape( __('Plugins') ) . '", +about_plugin:"' . mce_escape( __('Plugin') ) . '", +about_author:"' . mce_escape( __('Author') ) . '", +about_version:"' . mce_escape( __('Version') ) . '", +about_loaded:"' . mce_escape( __('Loaded plugins') ) . '", +anchor_title:"' . mce_escape( __('Insert/edit anchor') ) . '", +anchor_name:"' . mce_escape( __('Anchor name') ) . '", +code_title:"' . mce_escape( __('HTML Source Editor') ) . '", +code_wordwrap:"' . mce_escape( __('Word wrap') ) . '", +colorpicker_title:"' . mce_escape( __('Select a color') ) . '", +colorpicker_picker_tab:"' . mce_escape( __('Picker') ) . '", +colorpicker_picker_title:"' . mce_escape( __('Color picker') ) . '", +colorpicker_palette_tab:"' . mce_escape( __('Palette') ) . '", +colorpicker_palette_title:"' . mce_escape( __('Palette colors') ) . '", +colorpicker_named_tab:"' . mce_escape( __('Named') ) . '", +colorpicker_named_title:"' . mce_escape( __('Named colors') ) . '", +colorpicker_color:"' . mce_escape( __('Color:') ) . '", +colorpicker_name:"' . mce_escape( __('Name:') ) . '", +charmap_title:"' . mce_escape( __('Select custom character') ) . '", +image_title:"' . mce_escape( __('Insert/edit image') ) . '", +image_src:"' . mce_escape( __('Image URL') ) . '", +image_alt:"' . mce_escape( __('Image description') ) . '", +image_list:"' . mce_escape( __('Image list') ) . '", +image_border:"' . mce_escape( __('Border') ) . '", +image_dimensions:"' . mce_escape( __('Dimensions') ) . '", +image_vspace:"' . mce_escape( __('Vertical space') ) . '", +image_hspace:"' . mce_escape( __('Horizontal space') ) . '", +image_align:"' . mce_escape( __('Alignment') ) . '", +image_align_baseline:"' . mce_escape( __('Baseline') ) . '", +image_align_top:"' . mce_escape( __('Top') ) . '", +image_align_middle:"' . mce_escape( __('Middle') ) . '", +image_align_bottom:"' . mce_escape( __('Bottom') ) . '", +image_align_texttop:"' . mce_escape( __('Text top') ) . '", +image_align_textbottom:"' . mce_escape( __('Text bottom') ) . '", +image_align_left:"' . mce_escape( __('Left') ) . '", +image_align_right:"' . mce_escape( __('Right') ) . '", +link_title:"' . mce_escape( __('Insert/edit link') ) . '", +link_url:"' . mce_escape( __('Link URL') ) . '", +link_target:"' . mce_escape( __('Target') ) . '", +link_target_same:"' . mce_escape( __('Open link in the same window') ) . '", +link_target_blank:"' . mce_escape( __('Open link in a new window') ) . '", +link_titlefield:"' . mce_escape( __('Title') ) . '", +link_is_email:"' . mce_escape( __('The URL you entered seems to be an email address, do you want to add the required mailto: prefix?') ) . '", +link_is_external:"' . mce_escape( __('The URL you entered seems to external link, do you want to add the required http:// prefix?') ) . '", +link_list:"' . mce_escape( __('Link list') ) . '" +}); + +tinyMCE.addI18n("' . $language . '.media_dlg",{ +title:"' . mce_escape( __('Insert / edit embedded media') ) . '", +general:"' . mce_escape( __('General') ) . '", +advanced:"' . mce_escape( __('Advanced') ) . '", +file:"' . mce_escape( __('File/URL') ) . '", +list:"' . mce_escape( __('List') ) . '", +size:"' . mce_escape( __('Dimensions') ) . '", +preview:"' . mce_escape( __('Preview') ) . '", +constrain_proportions:"' . mce_escape( __('Constrain proportions') ) . '", +type:"' . mce_escape( __('Type') ) . '", +id:"' . mce_escape( __('Id') ) . '", +name:"' . mce_escape( __('Name') ) . '", +class_name:"' . mce_escape( __('Class') ) . '", +vspace:"' . mce_escape( __('V-Space') ) . '", +hspace:"' . mce_escape( __('H-Space') ) . '", +play:"' . mce_escape( __('Auto play') ) . '", +loop:"' . mce_escape( __('Loop') ) . '", +menu:"' . mce_escape( __('Show menu') ) . '", +quality:"' . mce_escape( __('Quality') ) . '", +scale:"' . mce_escape( __('Scale') ) . '", +align:"' . mce_escape( __('Align') ) . '", +salign:"' . mce_escape( __('SAlign') ) . '", +wmode:"' . mce_escape( __('WMode') ) . '", +bgcolor:"' . mce_escape( __('Background') ) . '", +base:"' . mce_escape( __('Base') ) . '", +flashvars:"' . mce_escape( __('Flashvars') ) . '", +liveconnect:"' . mce_escape( __('SWLiveConnect') ) . '", +autohref:"' . mce_escape( __('AutoHREF') ) . '", +cache:"' . mce_escape( __('Cache') ) . '", +hidden:"' . mce_escape( __('Hidden') ) . '", +controller:"' . mce_escape( __('Controller') ) . '", +kioskmode:"' . mce_escape( __('Kiosk mode') ) . '", +playeveryframe:"' . mce_escape( __('Play every frame') ) . '", +targetcache:"' . mce_escape( __('Target cache') ) . '", +correction:"' . mce_escape( __('No correction') ) . '", +enablejavascript:"' . mce_escape( __('Enable JavaScript') ) . '", +starttime:"' . mce_escape( __('Start time') ) . '", +endtime:"' . mce_escape( __('End time') ) . '", +href:"' . mce_escape( __('Href') ) . '", +qtsrcchokespeed:"' . mce_escape( __('Choke speed') ) . '", +target:"' . mce_escape( __('Target') ) . '", +volume:"' . mce_escape( __('Volume') ) . '", +autostart:"' . mce_escape( __('Auto start') ) . '", +enabled:"' . mce_escape( __('Enabled') ) . '", +fullscreen:"' . mce_escape( __('Fullscreen') ) . '", +invokeurls:"' . mce_escape( __('Invoke URLs') ) . '", +mute:"' . mce_escape( __('Mute') ) . '", +stretchtofit:"' . mce_escape( __('Stretch to fit') ) . '", +windowlessvideo:"' . mce_escape( __('Windowless video') ) . '", +balance:"' . mce_escape( __('Balance') ) . '", +baseurl:"' . mce_escape( __('Base URL') ) . '", +captioningid:"' . mce_escape( __('Captioning id') ) . '", +currentmarker:"' . mce_escape( __('Current marker') ) . '", +currentposition:"' . mce_escape( __('Current position') ) . '", +defaultframe:"' . mce_escape( __('Default frame') ) . '", +playcount:"' . mce_escape( __('Play count') ) . '", +rate:"' . mce_escape( __('Rate') ) . '", +uimode:"' . mce_escape( __('UI Mode') ) . '", +flash_options:"' . mce_escape( __('Flash options') ) . '", +qt_options:"' . mce_escape( __('Quicktime options') ) . '", +wmp_options:"' . mce_escape( __('Windows media player options') ) . '", +rmp_options:"' . mce_escape( __('Real media player options') ) . '", +shockwave_options:"' . mce_escape( __('Shockwave options') ) . '", +autogotourl:"' . mce_escape( __('Auto goto URL') ) . '", +center:"' . mce_escape( __('Center') ) . '", +imagestatus:"' . mce_escape( __('Image status') ) . '", +maintainaspect:"' . mce_escape( __('Maintain aspect') ) . '", +nojava:"' . mce_escape( __('No java') ) . '", +prefetch:"' . mce_escape( __('Prefetch') ) . '", +shuffle:"' . mce_escape( __('Shuffle') ) . '", +console:"' . mce_escape( __('Console') ) . '", +numloop:"' . mce_escape( __('Num loops') ) . '", +controls:"' . mce_escape( __('Controls') ) . '", +scriptcallbacks:"' . mce_escape( __('Script callbacks') ) . '", +swstretchstyle:"' . mce_escape( __('Stretch style') ) . '", +swstretchhalign:"' . mce_escape( __('Stretch H-Align') ) . '", +swstretchvalign:"' . mce_escape( __('Stretch V-Align') ) . '", +sound:"' . mce_escape( __('Sound') ) . '", +progress:"' . mce_escape( __('Progress') ) . '", +qtsrc:"' . mce_escape( __('QT Src') ) . '", +qt_stream_warn:"' . mce_escape( __('Streamed rtsp resources should be added to the QT Src field under the advanced tab.') ) . '", +align_top:"' . mce_escape( __('Top') ) . '", +align_right:"' . mce_escape( __('Right') ) . '", +align_bottom:"' . mce_escape( __('Bottom') ) . '", +align_left:"' . mce_escape( __('Left') ) . '", +align_center:"' . mce_escape( __('Center') ) . '", +align_top_left:"' . mce_escape( __('Top left') ) . '", +align_top_right:"' . mce_escape( __('Top right') ) . '", +align_bottom_left:"' . mce_escape( __('Bottom left') ) . '", +align_bottom_right:"' . mce_escape( __('Bottom right') ) . '", +flv_options:"' . mce_escape( __('Flash video options') ) . '", +flv_scalemode:"' . mce_escape( __('Scale mode') ) . '", +flv_buffer:"' . mce_escape( __('Buffer') ) . '", +flv_startimage:"' . mce_escape( __('Start image') ) . '", +flv_starttime:"' . mce_escape( __('Start time') ) . '", +flv_defaultvolume:"' . mce_escape( __('Default volume') ) . '", +flv_hiddengui:"' . mce_escape( __('Hidden GUI') ) . '", +flv_autostart:"' . mce_escape( __('Auto start') ) . '", +flv_loop:"' . mce_escape( __('Loop') ) . '", +flv_showscalemodes:"' . mce_escape( __('Show scale modes') ) . '", +flv_smoothvideo:"' . mce_escape( __('Smooth video') ) . '", +flv_jscallback:"' . mce_escape( __('JS Callback') ) . '" +}); + +tinyMCE.addI18n("' . $language . '.wordpress",{ +wp_adv_desc:"' . mce_escape( __('Show/Hide Kitchen Sink') ) . ' (Alt+Shift+Z)", +wp_more_desc:"' . mce_escape( __('Insert More tag') ) . ' (Alt+Shift+T)", +wp_page_desc:"' . mce_escape( __('Insert Page break') ) . ' (Alt+Shift+P)", +wp_help_desc:"' . mce_escape( __('Help') ) . ' (Alt+Shift+H)", +wp_more_alt:"' . mce_escape( __('More...') ) . '", +wp_page_alt:"' . mce_escape( __('Next page...') ) . '" +}); +'; ?> diff --git a/wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js deleted file mode 100644 index 102d69b..0000000 --- a/wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js +++ /dev/null @@ -1,30 +0,0 @@ -/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('autosave', 'en,sv,cs,he,no,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,fi,cy,es,is,pl');
-
-function TinyMCE_autosave_getInfo() {
- return {
- longname : 'Auto save',
- author : 'Moxiecode Systems',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
- version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
- };
-};
-
-function TinyMCE_autosave_beforeUnloadHandler() {
- var msg = tinyMCE.getLang("lang_autosave_unload_msg");
-
- var anyDirty = false;
- for (var n in tinyMCE.instances) {
- var inst = tinyMCE.instances[n];
- if (!tinyMCE.isInstance(inst))
- continue;
-
- if (inst.isDirty())
- return msg;
- }
-
- return;
-}
-
-window.onbeforeunload = TinyMCE_autosave_beforeUnloadHandler;
diff --git a/wp-includes/js/tinymce/plugins/autosave/langs/en.js b/wp-includes/js/tinymce/plugins/autosave/langs/en.js deleted file mode 100644 index 0195133..0000000 --- a/wp-includes/js/tinymce/plugins/autosave/langs/en.js +++ /dev/null @@ -1,5 +0,0 @@ -// EN lang variables
-
-tinyMCE.addToLang('',{
-autosave_unload_msg : 'The changes you made will be lost if you navigate away from this page.'
-});
diff --git a/wp-includes/js/tinymce/plugins/directionality/images/ltr.gif b/wp-includes/js/tinymce/plugins/directionality/images/ltr.gif Binary files differdeleted file mode 100644 index ac8f30c..0000000 --- a/wp-includes/js/tinymce/plugins/directionality/images/ltr.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif b/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif Binary files differdeleted file mode 100644 index 0348f99..0000000 --- a/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/directionality/langs/en.js b/wp-includes/js/tinymce/plugins/directionality/langs/en.js deleted file mode 100644 index 5b392fe..0000000 --- a/wp-includes/js/tinymce/plugins/directionality/langs/en.js +++ /dev/null @@ -1,6 +0,0 @@ -// UK lang variables
-
-tinyMCE.addToLang('',{
-directionality_ltr_desc : 'Direction left to right (Alt-.)',
-directionality_rtl_desc : 'Direction right to left (Alt-,)'
-});
diff --git a/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js b/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js new file mode 100644 index 0000000..6a21ea7 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js @@ -0,0 +1 @@ +(function(){var DOM=tinymce.DOM;tinymce.create('tinymce.plugins.FullScreenPlugin',{init:function(ed,url){var t=this,s={},vp;t.editor=ed;ed.addCommand('mceFullScreen',function(){var win,de=document.documentElement;if(ed.getParam('fullscreen_is_enabled')){if(ed.getParam('fullscreen_new_window'))closeFullscreen();else{window.setTimeout(function(){tinymce.dom.Event.remove(window,'resize',t.resizeFunc);tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent({format:'raw'}),{format:'raw'});tinyMCE.remove(ed);DOM.remove('mce_fullscreen_container');de.style.overflow=ed.getParam('fullscreen_html_overflow');DOM.setStyle(document.body,'overflow',ed.getParam('fullscreen_overflow'));window.scrollTo(ed.getParam('fullscreen_scrollx'),ed.getParam('fullscreen_scrolly'));tinyMCE.settings=tinyMCE.oldSettings;},10);}return;}if(ed.getParam('fullscreen_new_window')){win=window.open(url+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}else{tinyMCE.oldSettings=tinyMCE.settings;s.fullscreen_overflow=DOM.getStyle(document.body,'overflow',1)||'auto';s.fullscreen_html_overflow=DOM.getStyle(de,'overflow',1);vp=DOM.getViewPort();s.fullscreen_scrollx=vp.x;s.fullscreen_scrolly=vp.y;if(tinymce.isOpera&&s.fullscreen_overflow=='visible')s.fullscreen_overflow='auto';if(tinymce.isIE&&s.fullscreen_overflow=='scroll')s.fullscreen_overflow='auto';if(s.fullscreen_overflow=='0px')s.fullscreen_overflow='';DOM.setStyle(document.body,'overflow','hidden');de.style.overflow='hidden';vp=DOM.getViewPort();window.scrollTo(0,0);if(tinymce.isIE)vp.h-=1;n=DOM.add(document.body,'div',{id:'mce_fullscreen_container',style:'position:absolute;top:0;left:0;width:'+vp.w+'px;height:'+vp.h+'px;z-index:150;'});DOM.add(n,'div',{id:'mce_fullscreen'});tinymce.each(ed.settings,function(v,n){s[n]=v;});s.id='mce_fullscreen';s.width=n.clientWidth;s.height=n.clientHeight-15;s.fullscreen_is_enabled=true;s.fullscreen_editor_id=ed.id;s.theme_advanced_resizing=false;s.save_onsavecallback=function(){ed.setContent(tinyMCE.get(s.id).getContent({format:'raw'}),{format:'raw'});ed.execCommand('mceSave');};tinymce.each(ed.getParam('fullscreen_settings'),function(v,k){s[k]=v;});if(s.theme_advanced_toolbar_location==='external')s.theme_advanced_toolbar_location='top';t.fullscreenEditor=new tinymce.Editor('mce_fullscreen',s);t.fullscreenEditor.onInit.add(function(){t.fullscreenEditor.setContent(ed.getContent());});t.fullscreenEditor.render();tinyMCE.add(t.fullscreenEditor);t.fullscreenElement=new tinymce.dom.Element('mce_fullscreen_container');t.fullscreenElement.update();t.resizeFunc=tinymce.dom.Event.add(window,'resize',function(){var vp=tinymce.DOM.getViewPort();t.fullscreenEditor.theme.resizeTo(vp.w,vp.h);});}});ed.addButton('fullscreen',{title:'fullscreen.desc',cmd:'mceFullScreen'});ed.onNodeChange.add(function(ed,cm){cm.setActive('fullscreen',ed.getParam('fullscreen_is_enabled'));});},getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('fullscreen',tinymce.plugins.FullScreenPlugin);})();
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm b/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm new file mode 100644 index 0000000..c79ecd0 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm @@ -0,0 +1,111 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <script type="text/javascript" src="../../tiny_mce.js"></script> + <script type="text/javascript"> + function patchCallback(settings, key) { + if (settings[key]) + settings[key] = "window.opener." + settings[key]; + } + + var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings; + + // Clone array + for (var n in paSe) + settings[n] = paSe[n]; + + // Override options for fullscreen + for (var n in paSe.fullscreen_settings) + settings[n] = paSe.fullscreen_settings[n]; + + // Patch callbacks, make them point to window.opener + patchCallback(settings, 'urlconverter_callback'); + patchCallback(settings, 'insertlink_callback'); + patchCallback(settings, 'insertimage_callback'); + patchCallback(settings, 'setupcontent_callback'); + patchCallback(settings, 'save_callback'); + patchCallback(settings, 'onchange_callback'); + patchCallback(settings, 'init_instance_callback'); + patchCallback(settings, 'file_browser_callback'); + patchCallback(settings, 'cleanup_callback'); + patchCallback(settings, 'execcommand_callback'); + patchCallback(settings, 'oninit'); + + // Set options + delete settings.id; + settings['mode'] = 'exact'; + settings['elements'] = 'fullscreenarea'; + settings['add_unload_trigger'] = false; + settings['ask'] = false; + settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI(); + settings['fullscreen_is_enabled'] = true; + settings['fullscreen_editor_id'] = window.opener.tinyMCE.activeEditor.id; + settings['theme_advanced_resizing'] = false; + settings['strict_loading_mode'] = true; + + settings.save_onsavecallback = function() { + window.opener.tinyMCE.activeEditor.setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'}); + window.opener.tinyMCE.activeEditor.execCommand('mceSave'); + window.close(); + }; + + function unloadHandler(e) { + moveContent(); + } + + function moveContent() { + window.opener.tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent()); + } + + function closeFullscreen() { + moveContent(); + window.close(); + } + + function doParentSubmit() { + moveContent(); + + if (window.opener.tinyMCE.selectedInstance.formElement.form) + window.opener.tinyMCE.selectedInstance.formElement.form.submit(); + + window.close(); + + return false; + } + + function render() { + var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM; + + e.value = window.opener.tinyMCE.activeEditor.getContent(); + + vp = dom.getViewPort(); + settings.width = vp.w; + settings.height = vp.h - 15; + + tinymce.dom.Event.add(window, 'resize', function() { + var vp = dom.getViewPort(); + + tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h); + }); + + tinyMCE.init(settings); + } + + // Add onunload + tinymce.dom.Event.add(window, "beforeunload", unloadHandler); + </script> + <base target="_self" /> +</head> +<body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no"> +<form onsubmit="doParentSubmit();"> +<textarea id="fullscreenarea" style="width:100%; height:100%"></textarea> +</form> + +<script type="text/javascript"> + render(); +</script> + +</body> +</html> diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css b/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css deleted file mode 100644 index 43be823..0000000 --- a/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css +++ /dev/null @@ -1,69 +0,0 @@ -/* Window classes */
-
-.mceWindow {
- position: absolute;
- left: 0;
- top: 0;
- border: 1px solid black;
- background-color: #D4D0C8;
-}
-
-.mceWindowHead {
- background-color: #334F8D;
- width: 100%;
- height: 18px;
- cursor: move;
- overflow: hidden;
-}
-
-.mceWindowBody {
- clear: both;
- background-color: white;
-}
-
-.mceWindowStatusbar {
- background-color: #D4D0C8;
- height: 12px;
- border-top: 1px solid black;
-}
-
-.mceWindowTitle {
- float: left;
- font-family: "MS Sans Serif";
- font-size: 9pt;
- font-weight: bold;
- line-height: 18px;
- color: white;
- margin-left: 2px;
- overflow: hidden;
-}
-
-.mceWindowHeadTools {
- margin-right: 2px;
-}
-
-.mceWindowClose, .mceWindowMinimize, .mceWindowMaximize {
- display: block;
- float: right;
- overflow: hidden;
- margin-top: 2px;
-}
-
-.mceWindowClose {
- margin-left: 2px;
-}
-
-.mceWindowMinimize {
-}
-
-.mceWindowMaximize {
-}
-
-.mceWindowResize {
- display: block;
- float: right;
- overflow: hidden;
- cursor: se-resize;
- width: 12px;
- height: 12px;
-}
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/spacer.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/spacer.gif Binary files differdeleted file mode 100644 index fc25609..0000000 --- a/wp-includes/js/tinymce/plugins/inlinepopups/images/spacer.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gif Binary files differdeleted file mode 100644 index 3469e5a..0000000 --- a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gif Binary files differdeleted file mode 100644 index fcae73e..0000000 --- a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gif Binary files differdeleted file mode 100644 index 94f167a..0000000 --- a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gif b/wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gif Binary files differdeleted file mode 100644 index 6c402d0..0000000 --- a/wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js b/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js deleted file mode 100644 index 325d293..0000000 --- a/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js +++ /dev/null @@ -1,453 +0,0 @@ -/**
- * $Id: mcwindows.js 18 2006-06-29 14:11:23Z spocke $
- *
- * Moxiecode DHTML Windows script.
- *
- * @author Moxiecode
- * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
- */
-
-// Windows handler
-function MCWindows() {
- this.settings = new Array();
- this.windows = new Array();
- this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
- this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
- this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
- this.isMac = navigator.userAgent.indexOf('Mac') != -1;
- this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
- this.action = "none";
- this.selectedWindow = null;
- this.zindex = 100;
- this.mouseDownScreenX = 0;
- this.mouseDownScreenY = 0;
- this.mouseDownLayerX = 0;
- this.mouseDownLayerY = 0;
- this.mouseDownWidth = 0;
- this.mouseDownHeight = 0;
-};
-
-MCWindows.prototype.init = function(settings) {
- this.settings = settings;
-
- if (this.isMSIE)
- this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
- else
- this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
-
- this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
-};
-
-MCWindows.prototype.getParam = function(name, default_value) {
- var value = null;
-
- value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
-
- // Fix bool values
- if (value == "true" || value == "false")
- return (value == "true");
-
- return value;
-};
-
-MCWindows.prototype.eventDispatcher = function(e) {
- e = typeof(e) == "undefined" ? window.event : e;
-
- if (mcWindows.selectedWindow == null)
- return;
-
- // Switch focus
- if (mcWindows.isGecko && e.type == "mousedown") {
- var elm = e.currentTarget;
-
- for (var n in mcWindows.windows) {
- var win = mcWindows.windows[n];
- if (typeof(win) == 'function')
- continue;
-
- if (win.headElement == elm || win.resizeElement == elm) {
- win.focus();
- break;
- }
- }
- }
-
- switch (e.type) {
- case "mousemove":
- mcWindows.selectedWindow.onMouseMove(e);
- break;
-
- case "mouseup":
- mcWindows.selectedWindow.onMouseUp(e);
- break;
-
- case "mousedown":
- mcWindows.selectedWindow.onMouseDown(e);
- break;
-
- case "focus":
- mcWindows.selectedWindow.onFocus(e);
- break;
- }
-}
-
-MCWindows.prototype.addEvent = function(obj, name, handler) {
- if (this.isMSIE)
- obj.attachEvent("on" + name, handler);
- else
- obj.addEventListener(name, handler, true);
-};
-
-MCWindows.prototype.cancelEvent = function(e) {
- if (this.isMSIE) {
- e.returnValue = false;
- e.cancelBubble = true;
- } else
- e.preventDefault();
-};
-
-MCWindows.prototype.parseFeatures = function(opts) {
- // Cleanup the options
- opts = opts.toLowerCase();
- opts = opts.replace(/;/g, ",");
- opts = opts.replace(/[^0-9a-z=,]/g, "");
-
- var optionChunks = opts.split(',');
- var options = new Array();
-
- options['left'] = 10;
- options['top'] = 10;
- options['width'] = 300;
- options['height'] = 300;
- options['resizable'] = true;
- options['minimizable'] = true;
- options['maximizable'] = true;
- options['close'] = true;
- options['movable'] = true;
-
- if (opts == "")
- return options;
-
- for (var i=0; i<optionChunks.length; i++) {
- var parts = optionChunks[i].split('=');
-
- if (parts.length == 2)
- options[parts[0]] = parts[1];
- }
-
- return options;
-};
-
-MCWindows.prototype.open = function(url, name, features) {
- var win = new MCWindow();
- var winDiv, html = "", id;
-
- features = this.parseFeatures(features);
-
- // Create div
- id = "mcWindow_" + name;
-
- width = parseInt(features['width']);
- height = parseInt(features['height'])-12-19;
-
- if (this.isMSIE)
- width -= 2;
-
- // Setup first part of window
- win.id = id;
- win.url = url;
- win.name = name;
- win.features = features;
- this.windows[name] = win;
-
- iframeWidth = width;
- iframeHeight = height;
-
- // Create inner content
- html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
- html += '<html>';
- html += '<head>';
- html += '<title>Wrapper iframe</title>';
- html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
- html += '<link href="../jscripts/tiny_mce/themes/advanced/css/editor_ui.css" rel="stylesheet" type="text/css" />';
- html += '</head>';
- html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
-
- html += '<div id="' + id + '_container" class="mceWindow">';
- html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
- html += ' <div id="' + id + '_title" class="mceWindowTitle"';
- html += ' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;">No name window</div>';
- html += ' <div class="mceWindowHeadTools">';
- html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" onmousedown="return false;" class="mceWindowClose"><img border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_close.gif" /></a>';
-// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" onmousedown="return false;" class="mceWindowMaximize"></a>';
-// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" onmousedown="return false;" class="mceWindowMinimize"></a>';
- html += ' </div>';
- html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
- html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" onfocus="parent.mcWindows.windows[\'' + name + '\'].focus();" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe"></iframe></div>';
- html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
- html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_resize.gif" /></div>';
- html += '</div>';
- html += '</div>';
-
- html += '</body>';
- html += '</html>';
-
- // Create iframe
- this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
-};
-
-// Gets called when wrapper iframe is initialized
-MCWindows.prototype.onLoad = function(name) {
- var win = mcWindows.windows[name];
- var id = "mcWindow_" + name;
- var wrapperIframe = window.frames[id + "_iframe"].frames[0];
- var wrapperDoc = window.frames[id + "_iframe"].document;
- var doc = window.frames[id + "_iframe"].document;
- var winDiv = document.getElementById("mcWindow_" + name + "_div");
- var realIframe = window.frames[id + "_iframe"].frames[0];
-
- // Set window data
- win.id = "mcWindow_" + name + "_iframe";
- win.winElement = winDiv;
- win.bodyElement = doc.getElementById(id + '_body');
- win.iframeElement = doc.getElementById(id + '_iframe');
- win.headElement = doc.getElementById(id + '_head');
- win.titleElement = doc.getElementById(id + '_title');
- win.resizeElement = doc.getElementById(id + '_resize');
- win.containerElement = doc.getElementById(id + '_container');
- win.left = win.features['left'];
- win.top = win.features['top'];
- win.frame = window.frames[id + '_iframe'].frames[0];
- win.wrapperFrame = window.frames[id + '_iframe'];
- win.wrapperIFrameElement = document.getElementById(id + "_iframe");
-
- // Add event handlers
- mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
- mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
-
- if (mcWindows.isMSIE) {
- mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
- } else {
- mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
- mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
- }
-
- for (var i=0; i<window.frames.length; i++) {
- if (!window.frames[i]._hasMouseHandlers) {
- if (mcWindows.isMSIE) {
- mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
- } else {
- mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
- }
-
- window.frames[i]._hasMouseHandlers = true;
- }
- }
-
- if (mcWindows.isMSIE) {
- mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
- } else {
- mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
- mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
- mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
- }
-
- this.selectedWindow = win;
-};
-
-MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
- var iframe = document.createElement("iframe");
- var div = document.createElement("div");
-
- width = parseInt(width);
- height = parseInt(height)+1;
-
- // Create wrapper div
- div.setAttribute("id", id_prefix + "_div");
- div.setAttribute("width", width);
- div.setAttribute("height", (height));
- div.style.position = "absolute";
- div.style.left = left + "px";
- div.style.top = top + "px";
- div.style.width = width + "px";
- div.style.height = (height) + "px";
- div.style.backgroundColor = "white";
- div.style.display = "none";
-
- if (this.isGecko) {
- iframeWidth = width + 2;
- iframeHeight = height + 2;
- } else {
- iframeWidth = width;
- iframeHeight = height + 1;
- }
-
- // Create iframe
- iframe.setAttribute("id", id_prefix + "_iframe");
- iframe.setAttribute("name", id_prefix + "_iframe");
- iframe.setAttribute("border", "0");
- iframe.setAttribute("frameBorder", "0");
- iframe.setAttribute("marginWidth", "0");
- iframe.setAttribute("marginHeight", "0");
- iframe.setAttribute("leftMargin", "0");
- iframe.setAttribute("topMargin", "0");
- iframe.setAttribute("width", iframeWidth);
- iframe.setAttribute("height", iframeHeight);
-// iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
- // iframe.setAttribute("allowtransparency", "false");
- iframe.setAttribute("scrolling", "no");
- iframe.style.width = iframeWidth + "px";
- iframe.style.height = iframeHeight + "px";
- iframe.style.backgroundColor = "white";
- div.appendChild(iframe);
-
- document.body.appendChild(div);
-
- // Fixed MSIE 5.0 issue
- div.innerHTML = div.innerHTML;
-
- if (this.isSafari) {
- // Give Safari some time to setup
- window.setTimeout(function() {
- doc = window.frames[id_prefix + '_iframe'].document;
- doc.open();
- doc.write(html);
- doc.close();
- }, 10);
- } else {
- doc = window.frames[id_prefix + '_iframe'].window.document
- doc.open();
- doc.write(html);
- doc.close();
- }
-
- div.style.display = "block";
-
- return div;
-};
-
-// Window instance
-function MCWindow() {
-};
-
-MCWindow.prototype.focus = function() {
- this.winElement.style.zIndex = mcWindows.zindex++;
- mcWindows.selectedWindow = this;
-};
-
-MCWindow.prototype.minimize = function() {
-};
-
-MCWindow.prototype.maximize = function() {
-
-};
-
-MCWindow.prototype.startResize = function() {
- mcWindows.action = "resize";
-};
-
-MCWindow.prototype.startMove = function(e) {
- mcWindows.action = "move";
-};
-
-MCWindow.prototype.close = function() {
- document.body.removeChild(this.winElement);
- mcWindows.windows[this.name] = null;
-};
-
-MCWindow.prototype.onMouseMove = function(e) {
- var scrollX = 0;//this.doc.body.scrollLeft;
- var scrollY = 0;//this.doc.body.scrollTop;
-
- // Calculate real X, Y
- var dx = e.screenX - mcWindows.mouseDownScreenX;
- var dy = e.screenY - mcWindows.mouseDownScreenY;
-
- switch (mcWindows.action) {
- case "resize":
- width = mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX);
- height = mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY);
-
- width = width < 100 ? 100 : width;
- height = height < 100 ? 100 : height;
-
- this.wrapperIFrameElement.style.width = width+2;
- this.wrapperIFrameElement.style.height = height+2;
- this.wrapperIFrameElement.width = width+2;
- this.wrapperIFrameElement.height = height+2;
- this.winElement.style.width = width;
- this.winElement.style.height = height;
-
- height = height-12-19;
-
- this.containerElement.style.width = width;
-
- this.iframeElement.style.width = width;
- this.iframeElement.style.height = height;
- this.bodyElement.style.width = width;
- this.bodyElement.style.height = height;
- this.headElement.style.width = width;
- //this.statusElement.style.width = width;
-
- mcWindows.cancelEvent(e);
- break;
-
- case "move":
- this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
- this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
- this.winElement.style.left = this.left + "px";
- this.winElement.style.top = this.top + "px";
-
- mcWindows.cancelEvent(e);
- break;
- }
-};
-
-MCWindow.prototype.onMouseUp = function(e) {
- mcWindows.action = "none";
-};
-
-MCWindow.prototype.onFocus = function(e) {
- // Gecko only handler
- var winRef = e.currentTarget;
-
- for (var n in mcWindows.windows) {
- var win = mcWindows.windows[n];
- if (typeof(win) == 'function')
- continue;
-
- if (winRef.name == win.id) {
- win.focus();
- return;
- }
- }
-};
-
-MCWindow.prototype.onMouseDown = function(e) {
- var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
-
- var scrollX = 0;//this.doc.body.scrollLeft;
- var scrollY = 0;//this.doc.body.scrollTop;
-
- mcWindows.mouseDownScreenX = e.screenX;
- mcWindows.mouseDownScreenY = e.screenY;
- mcWindows.mouseDownLayerX = this.left;
- mcWindows.mouseDownLayerY = this.top;
- mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
- mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
-
- if (elm == this.resizeElement.firstChild)
- this.startResize(e);
- else
- this.startMove(e);
-
- mcWindows.cancelEvent(e);
-};
-
-// Global instance
-var mcWindows = new MCWindows();
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif Binary files differnew file mode 100644 index 0000000..94abd08 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif Binary files differnew file mode 100644 index 0000000..e671094 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif Binary files differnew file mode 100644 index 0000000..b408ae1 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif Binary files differnew file mode 100644 index 0000000..497307a --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif Binary files differnew file mode 100644 index 0000000..c894b2e --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif Binary files differnew file mode 100644 index 0000000..bf0a03e --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif Binary files differnew file mode 100644 index 0000000..c2a2ad4 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif Binary files differnew file mode 100644 index 0000000..43a735f --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css new file mode 100644 index 0000000..569ca80 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css @@ -0,0 +1,125 @@ +/* Clearlooks 2 */ +/* Reset */ +.clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block;} + +/* General */ +.clearlooks2 div, .clearlooks2 span, .clearlooks2 a {position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block;} +.clearlooks2 {position:absolute;} +.clearlooks2 .mceWrapper {position:static} +.mceEventBlocker {position:absolute; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%;} +.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; filter:alpha(opacity=50);} + +/* Top */ +.clearlooks2 .mceTop, +.clearlooks2 .mceTop div { + top:0; + width:100%; + height:23px +} +.clearlooks2 .mceTop .mceLeft { + width:55%; + background-image: none; + border-style: solid none none solid; + border-width: 1px; +} +.clearlooks2 .mceTop .mceCenter { +} +.clearlooks2 .mceTop .mceRight { + right:0; + width:55%; + height:23px; + background-image: none; + border-style: solid solid none none; + border-width: 1px; +} +.clearlooks2 .mceTop span { + width:100%; + font: 12px/20px bold "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif; + text-align:center; + vertical-align:middle; + line-height:23px; + font-weight:bold; +} +.clearlooks2 .mceFocus .mceTop .mceLeft { + background-image: none; + border-style: solid none none solid; + border-width: 1px; +} +.clearlooks2 .mceFocus .mceTop .mceCenter { +} +.clearlooks2 .mceFocus .mceTop .mceRight { + background-image: none; + border-style: solid solid none none; + border-width: 1px; +} +.clearlooks2 .mceFocus .mceTop span { +color:#FFF +} + +/* Middle */ +.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0;} +.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto);} +.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:#eaf3fa;border-left:1px solid #c6d9e9;} +.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF;} +.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:#eaf3fa;border-right:1px solid #c6d9e9;} + +/* Bottom */ +.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px;} +.clearlooks2 .mceBottom {left:0; bottom:0; width:100%;background:#eaf3fa;border-bottom:1px solid #c6d9e9;} +.clearlooks2 .mceBottom div {top:0;} +.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:#eaf3fa ;border-left:1px solid #c6d9e9;} +.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%;} +.clearlooks2 .mceBottom .mceRight {right:0; width:6px; background:#eaf3fa url(img/drag.gif) no-repeat;border-right:1px solid #c6d9e9;} +.clearlooks2 .mceBottom span {display:none;} +.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px;} +.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0;} +.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px;} +.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0;} +.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px;} + +/* Actions */ +.clearlooks2 a {width:29px; height:16px; top:3px;} +.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0;} +.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0;} +.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0;} +.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0;} +.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px;} +.clearlooks2 .mceMovable .mceMove {display:block;} +.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px;} +.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px;} +.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px;} +.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px;} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px;} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px;} +.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px;} +.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px;} +.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px;} + +/* Resize */ +.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px;} +.clearlooks2 .mceResizable .mceResize {display:block;} +.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none;} +.clearlooks2 .mceMinimizable .mceMin {display:block;} +.clearlooks2 .mceMaximizable .mceMax {display:block;} +.clearlooks2 .mceMaximized .mceMed {display:block;} +.clearlooks2 .mceMaximized .mceMax {display:none;} +.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize;} +.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize;} +.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize} +.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} +.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize;} +.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} +.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize;} +.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize;} + +/* Alert/Confirm */ +.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0;} +.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px;} +.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal;} +.clearlooks2 a:hover {font-weight:bold;} +.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#eaf3fa;} +.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px;} +.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif);} +.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px;} +.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto;} +.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif);} diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/template.htm b/wp-includes/js/tinymce/plugins/inlinepopups/template.htm new file mode 100644 index 0000000..c98fe41 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/inlinepopups/template.htm @@ -0,0 +1,387 @@ +<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> --> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Template for dialogs</title> +<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" /> +</head> +<body> + +<div class="mceEditor"> + <div class="clearlooks2" style="width:400px; height:100px; left:10px;"> + <div class="mceWrapper"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Blured</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span>Content</span> + <div class="mceRight"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar text.</span> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceMin" href="#"></a> + <a class="mceMax" href="#"></a> + <a class="mceMed" href="#"></a> + <a class="mceClose" href="#"></a> + <a class="mceResize mceResizeN" href="#"></a> + <a class="mceResize mceResizeS" href="#"></a> + <a class="mceResize mceResizeW" href="#"></a> + <a class="mceResize mceResizeE" href="#"></a> + <a class="mceResize mceResizeNW" href="#"></a> + <a class="mceResize mceResizeNE" href="#"></a> + <a class="mceResize mceResizeSW" href="#"></a> + <a class="mceResize mceResizeSE" href="#"></a> + </div> + </div> + + <div class="clearlooks2" style="width:400px; height:100px; left:420px;"> + <div class="mceWrapper mceMovable mceFocus"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Focused</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span>Content</span> + <div class="mceRight"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar text.</span> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceMin" href="#"></a> + <a class="mceMax" href="#"></a> + <a class="mceMed" href="#"></a> + <a class="mceClose" href="#"></a> + <a class="mceResize mceResizeN" href="#"></a> + <a class="mceResize mceResizeS" href="#"></a> + <a class="mceResize mceResizeW" href="#"></a> + <a class="mceResize mceResizeE" href="#"></a> + <a class="mceResize mceResizeNW" href="#"></a> + <a class="mceResize mceResizeNE" href="#"></a> + <a class="mceResize mceResizeSW" href="#"></a> + <a class="mceResize mceResizeSE" href="#"></a> + </div> + </div> + + <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;"> + <div class="mceWrapper mceMovable mceFocus mceStatusbar"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span>Content</span> + <div class="mceRight"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar text.</span> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceMin" href="#"></a> + <a class="mceMax" href="#"></a> + <a class="mceMed" href="#"></a> + <a class="mceClose" href="#"></a> + <a class="mceResize mceResizeN" href="#"></a> + <a class="mceResize mceResizeS" href="#"></a> + <a class="mceResize mceResizeW" href="#"></a> + <a class="mceResize mceResizeE" href="#"></a> + <a class="mceResize mceResizeNW" href="#"></a> + <a class="mceResize mceResizeNE" href="#"></a> + <a class="mceResize mceResizeSW" href="#"></a> + <a class="mceResize mceResizeSE" href="#"></a> + </div> + </div> + + <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;"> + <div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar, Resizable</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span>Content</span> + <div class="mceRight"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar text.</span> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceMin" href="#"></a> + <a class="mceMax" href="#"></a> + <a class="mceMed" href="#"></a> + <a class="mceClose" href="#"></a> + <a class="mceResize mceResizeN" href="#"></a> + <a class="mceResize mceResizeS" href="#"></a> + <a class="mceResize mceResizeW" href="#"></a> + <a class="mceResize mceResizeE" href="#"></a> + <a class="mceResize mceResizeNW" href="#"></a> + <a class="mceResize mceResizeNE" href="#"></a> + <a class="mceResize mceResizeSW" href="#"></a> + <a class="mceResize mceResizeSE" href="#"></a> + </div> + </div> + + <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;"> + <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Resizable, Maximizable</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span>Content</span> + <div class="mceRight"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar text.</span> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceMin" href="#"></a> + <a class="mceMax" href="#"></a> + <a class="mceMed" href="#"></a> + <a class="mceClose" href="#"></a> + <a class="mceResize mceResizeN" href="#"></a> + <a class="mceResize mceResizeS" href="#"></a> + <a class="mceResize mceResizeW" href="#"></a> + <a class="mceResize mceResizeE" href="#"></a> + <a class="mceResize mceResizeNW" href="#"></a> + <a class="mceResize mceResizeNE" href="#"></a> + <a class="mceResize mceResizeSW" href="#"></a> + <a class="mceResize mceResizeSE" href="#"></a> + </div> + </div> + + <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;"> + <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Blurred, Maximizable, Statusbar, Resizable</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span>Content</span> + <div class="mceRight"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar text.</span> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceMin" href="#"></a> + <a class="mceMax" href="#"></a> + <a class="mceMed" href="#"></a> + <a class="mceClose" href="#"></a> + <a class="mceResize mceResizeN" href="#"></a> + <a class="mceResize mceResizeS" href="#"></a> + <a class="mceResize mceResizeW" href="#"></a> + <a class="mceResize mceResizeE" href="#"></a> + <a class="mceResize mceResizeNW" href="#"></a> + <a class="mceResize mceResizeNE" href="#"></a> + <a class="mceResize mceResizeSW" href="#"></a> + <a class="mceResize mceResizeSE" href="#"></a> + </div> + </div> + + <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;"> + <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Maximized, Maximizable, Minimizable</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span>Content</span> + <div class="mceRight"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar text.</span> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceMin" href="#"></a> + <a class="mceMax" href="#"></a> + <a class="mceMed" href="#"></a> + <a class="mceClose" href="#"></a> + <a class="mceResize mceResizeN" href="#"></a> + <a class="mceResize mceResizeS" href="#"></a> + <a class="mceResize mceResizeW" href="#"></a> + <a class="mceResize mceResizeE" href="#"></a> + <a class="mceResize mceResizeNW" href="#"></a> + <a class="mceResize mceResizeNE" href="#"></a> + <a class="mceResize mceResizeSW" href="#"></a> + <a class="mceResize mceResizeSE" href="#"></a> + </div> + </div> + + <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;"> + <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Blured</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span>Content</span> + <div class="mceRight"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Statusbar text.</span> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceMin" href="#"></a> + <a class="mceMax" href="#"></a> + <a class="mceMed" href="#"></a> + <a class="mceClose" href="#"></a> + <a class="mceResize mceResizeN" href="#"></a> + <a class="mceResize mceResizeS" href="#"></a> + <a class="mceResize mceResizeW" href="#"></a> + <a class="mceResize mceResizeE" href="#"></a> + <a class="mceResize mceResizeNW" href="#"></a> + <a class="mceResize mceResizeNE" href="#"></a> + <a class="mceResize mceResizeSW" href="#"></a> + <a class="mceResize mceResizeSE" href="#"></a> + </div> + </div> + + <div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;"> + <div class="mceWrapper mceMovable mceFocus mceModal mceAlert"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Alert</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span> + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + </span> + <div class="mceRight"></div> + <div class="mceIcon"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceButton mceOk" href="#">Ok</a> + <a class="mceClose" href="#"></a> + </div> + </div> + + <div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;"> + <div class="mceWrapper mceMovable mceFocus mceModal mceConfirm"> + <div class="mceTop"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + <span>Confirm</span> + </div> + + <div class="mceMiddle"> + <div class="mceLeft"></div> + <span> + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + </span> + <div class="mceRight"></div> + <div class="mceIcon"></div> + </div> + + <div class="mceBottom"> + <div class="mceLeft"></div> + <div class="mceCenter"></div> + <div class="mceRight"></div> + </div> + + <a class="mceMove" href="#"></a> + <a class="mceButton mceOk" href="#">Ok</a> + <a class="mceButton mceCancel" href="#">Cancel</a> + <a class="mceClose" href="#"></a> + </div> + </div> +</div> + +</body> +</html> diff --git a/wp-includes/js/tinymce/plugins/media/css/content.css b/wp-includes/js/tinymce/plugins/media/css/content.css new file mode 100644 index 0000000..7739381 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/css/content.css @@ -0,0 +1,6 @@ +.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;} +.mceItemShockWave {background-image: url(../img/shockwave.gif);} +.mceItemFlash {background-image:url(../img/flash.gif);} +.mceItemQuickTime {background-image:url(../img/quicktime.gif);} +.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);} +.mceItemRealMedia {background-image:url(../img/realmedia.gif);} diff --git a/wp-includes/js/tinymce/plugins/media/css/media.css b/wp-includes/js/tinymce/plugins/media/css/media.css new file mode 100644 index 0000000..62d666a --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/css/media.css @@ -0,0 +1,68 @@ +#id, #name, #hspace, #vspace, #class_name, #align { + width: 100px; +} + +#hspace, #vspace { + width: 50px; +} + +#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { + width: 100px; +} + +#flash_base, #flash_flashvars { + width: 240px; +} + +#width, #height { + width: 40px; +} + +#src, #media_type { + width: 250px; +} + +#class { + width: 120px; +} + +#prev { + margin: 0; + border: 1px solid black; + width: 99%; + height: 230px; + overflow: auto; +} + +.panel_wrapper div.current { + height: 390px; + overflow: auto; +} + +#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { + display: none; +} + +.mceAddSelectValue { + background-color: #DDDDDD; +} + +#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { + width: 70px; +} + +#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { + width: 70px; +} + +#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { + width: 70px; +} + +#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { + width: 90px; +} + +#qt_qtsrc { + width: 200px; +} diff --git a/wp-includes/js/tinymce/plugins/media/editor_plugin.js b/wp-includes/js/tinymce/plugins/media/editor_plugin.js new file mode 100644 index 0000000..948db7c --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/editor_plugin.js @@ -0,0 +1 @@ +(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.MediaPlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;function isMediaElm(n){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);};ed.addCommand('mceMedia',function(){ed.windowManager.open({file:url+'/media.htm',width:430+parseInt(ed.getLang('media.delta_width',0)),height:470+parseInt(ed.getLang('media.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('media',{title:'media.desc',cmd:'mceMedia'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('media',n.nodeName=='IMG'&&isMediaElm(n));});ed.onInit.add(function(){var lo={mceItemFlash:'flash',mceItemShockWave:'shockwave',mceItemWindowsMedia:'windowsmedia',mceItemQuickTime:'quicktime',mceItemRealMedia:'realmedia'};ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.name=='img'){each(lo,function(v,k){if(ed.dom.hasClass(o.node,k)){o.name=v;o.title=ed.dom.getAttrib(o.node,'title');return false;}});}});}if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){if(e.nodeName=='IMG'&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)){m.add({title:'media.edit',icon:'media',cmd:'mceMedia'});}});}});ed.onBeforeSetContent.add(function(ed,o){var h=o.content;h=h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(a,b,c){var o=t._parse(c);return'<img class="mceItem'+b+'" title="'+ed.dom.encode(c)+'" src="'+url+'/img/trans.gif" width="'+o.width+'" height="'+o.height+'" />'});h=h.replace(/<object([^>]*)>/gi,'<span class="mceItemObject" $1>');h=h.replace(/<embed([^>]*)>/gi,'<span class="mceItemEmbed" $1>');h=h.replace(/<\/(object|embed)([^>]*)>/gi,'</span>');h=h.replace(/<param([^>]*)>/gi,function(a,b){return'<span '+b.replace(/value=/gi,'_value=')+' class="mceItemParam"></span>'});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam"></span>');o.content=h;});ed.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){t._spansToImgs(o.node);each(dom.select('IMG',o.node),function(n){var p;if(isMediaElm(n)){p=t._parse(n.title);dom.setAttrib(n,'width',dom.getAttrib(n,'width',p.width||100));dom.setAttrib(n,'height',dom.getAttrib(n,'height',p.height||100));}});}if(o.get){each(dom.select('IMG',o.node),function(n){var ci,cb,mt;if(ed.getParam('media_use_script')){if(isMediaElm(n))n.className=n.className.replace(/mceItem/g,'mceTemp');return;}switch(n.className){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166b1bca-3f9c-11cf-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=ed.getParam('media_wmp6_compatible')?'05589fa1-c356-11ce-bf01-00aa0055595a':'6bf52a52-394a-11d3-b153-00c04f79faa6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02bf25d5-8c17-4b23-bc80-d3488abddc6b';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='cfcdaa03-8be4-11cf-b84b-0020afbbccfa';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break;}if(ci){dom.replace(t._buildObj({classid:ci,codebase:cb,type:mt},n),n);}});}});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/_value=/g,'value=');});if(ed.getParam('media_use_script')){function getAttr(s,n){n=new RegExp(n+'=\"([^\"]+)\"','g').exec(s);return n?ed.dom.decode(n[1]):'';};ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<img[^>]+>/g,function(im){var cl=getAttr(im,'class');if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)){at=t._parse(getAttr(im,'title'));at.width=getAttr(im,'width');at.height=getAttr(im,'height');im='<script type="text/javascript">write'+cl.substring(7)+'({'+t._serialize(at)+'});</script>';}return im;});});}},getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title);p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});if(p.src)p.src=ed.convertURL(p.src,'src',n);each(p,function(v,k){if(!/^(width|height|codebase|classid)$/.test(k))dom.add(ob,'span',{mce_name:'param',name:k,'_value':v});});dom.add(ob,'span',tinymce.extend({mce_name:'embed',type:o.type},p));return ob;},_spansToImgs:function(p){var t=this,dom=t.editor.dom,im,ci;each(dom.select('span',p),function(n){if(dom.getAttrib(n,'class')=='mceItemObject'){ci=dom.getAttrib(n,"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':dom.replace(t._createImg('mceItemFlash',n),n);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}return;}if(dom.getAttrib(n,'class')=='mceItemEmbed'){switch(dom.getAttrib(n,'type')){case'application/x-shockwave-flash':dom.replace(t._createImg('mceItemFlash',n),n);break;case'application/x-director':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'application/x-mplayer2':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'video/quicktime':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'audio/x-pn-realaudio-plugin':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}}});},_createImg:function(cl,n){var im,dom=this.editor.dom,pa={},ti='';im=dom.create('img',{src:this.url+'/img/trans.gif',width:dom.getAttrib(n,'width')||100,height:dom.getAttrib(n,'height')||100,'class':cl});each(['id','name','width','height','bgcolor','align','flashvars','src','wmode'],function(na){var v=dom.getAttrib(n,na);if(v)pa[na]=v;});each(dom.select('span',n),function(n){if(dom.hasClass(n,'mceItemParam'))pa[dom.getAttrib(n,'name')]=dom.getAttrib(n,'_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}delete pa.width;delete pa.height;im.title=this._serialize(pa);return im;},_parse:function(s){return tinymce.util.JSON.parse('{'+s+'}');},_serialize:function(o){return tinymce.util.JSON.serialize(o).replace(/[{}]/g,'');}});tinymce.PluginManager.add('media',tinymce.plugins.MediaPlugin);})();
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/media/img/flash.gif b/wp-includes/js/tinymce/plugins/media/img/flash.gif Binary files differnew file mode 100644 index 0000000..cb192e6 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/img/flash.gif diff --git a/wp-includes/js/tinymce/plugins/media/img/flv_player.swf b/wp-includes/js/tinymce/plugins/media/img/flv_player.swf Binary files differnew file mode 100644 index 0000000..042c2ab --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/img/flv_player.swf diff --git a/wp-includes/js/tinymce/plugins/media/img/quicktime.gif b/wp-includes/js/tinymce/plugins/media/img/quicktime.gif Binary files differnew file mode 100644 index 0000000..3b04991 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/img/quicktime.gif diff --git a/wp-includes/js/tinymce/plugins/media/img/realmedia.gif b/wp-includes/js/tinymce/plugins/media/img/realmedia.gif Binary files differnew file mode 100644 index 0000000..fdfe0b9 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/img/realmedia.gif diff --git a/wp-includes/js/tinymce/plugins/media/img/shockwave.gif b/wp-includes/js/tinymce/plugins/media/img/shockwave.gif Binary files differnew file mode 100644 index 0000000..5f235df --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/img/shockwave.gif diff --git a/wp-includes/js/tinymce/themes/advanced/images/spacer.gif b/wp-includes/js/tinymce/plugins/media/img/trans.gif Binary files differindex 3884865..3884865 100644 --- a/wp-includes/js/tinymce/themes/advanced/images/spacer.gif +++ b/wp-includes/js/tinymce/plugins/media/img/trans.gif diff --git a/wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif b/wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif Binary files differnew file mode 100644 index 0000000..ab50f2d --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif diff --git a/wp-includes/js/tinymce/plugins/media/js/embed.js b/wp-includes/js/tinymce/plugins/media/js/embed.js new file mode 100644 index 0000000..6fe25de --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/js/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"'; + h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : ''; + h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : ''; + h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : ''; + h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : ''; + h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : ''; + h += '>'; + + for (n in p) + h += '<param name="' + n + '" value="' + p[n] + '">'; + + h += '<embed type="' + mt + '"'; + + for (n in p) + h += n + '="' + p[n] + '" '; + + h += '></embed></object>'; + + document.write(h); +} diff --git a/wp-includes/js/tinymce/plugins/media/js/media.js b/wp-includes/js/tinymce/plugins/media/js/media.js new file mode 100644 index 0000000..58d2faf --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/js/media.js @@ -0,0 +1,621 @@ +tinyMCEPopup.requireLangPack(); + +var oldWidth, oldHeight, ed, url; + +if (url = tinyMCEPopup.getParam("media_external_list_url")) + document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>'); + +function init() { + var pl = "", f, val; + var type = "flash", fe, i; + + ed = tinyMCEPopup.editor; + + tinyMCEPopup.resizeToInnerSize(); + f = document.forms[0] + + fe = ed.selection.getNode(); + if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { + pl = fe.title; + + switch (ed.dom.getAttrib(fe, 'class')) { + case 'mceItemFlash': + type = 'flash'; + break; + + case 'mceItemFlashVideo': + type = 'flv'; + break; + + case 'mceItemShockWave': + type = 'shockwave'; + break; + + case 'mceItemWindowsMedia': + type = 'wmp'; + break; + + case 'mceItemQuickTime': + type = 'qt'; + break; + + case 'mceItemRealMedia': + type = 'rmp'; + break; + } + + document.forms[0].insert.value = ed.getLang('update', 'Insert', true); + } + + document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var html = getMediaListHTML('medialist','src','media','media'); + if (html == "") + document.getElementById("linklistrow").style.display = 'none'; + else + document.getElementById("linklistcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('filebrowser')) + document.getElementById('src').style.width = '230px'; + + // Setup form + if (pl != "") { + pl = tinyMCEPopup.editor.plugins.media._parse(pl); + + switch (type) { + case "flash": + setBool(pl, 'flash', 'play'); + setBool(pl, 'flash', 'loop'); + setBool(pl, 'flash', 'menu'); + setBool(pl, 'flash', 'swliveconnect'); + setStr(pl, 'flash', 'quality'); + setStr(pl, 'flash', 'scale'); + setStr(pl, 'flash', 'salign'); + setStr(pl, 'flash', 'wmode'); + setStr(pl, 'flash', 'base'); + setStr(pl, 'flash', 'flashvars'); + break; + + case "qt": + setBool(pl, 'qt', 'loop'); + setBool(pl, 'qt', 'autoplay'); + setBool(pl, 'qt', 'cache'); + setBool(pl, 'qt', 'controller'); + setBool(pl, 'qt', 'correction'); + setBool(pl, 'qt', 'enablejavascript'); + setBool(pl, 'qt', 'kioskmode'); + setBool(pl, 'qt', 'autohref'); + setBool(pl, 'qt', 'playeveryframe'); + setBool(pl, 'qt', 'tarsetcache'); + setStr(pl, 'qt', 'scale'); + setStr(pl, 'qt', 'starttime'); + setStr(pl, 'qt', 'endtime'); + setStr(pl, 'qt', 'tarset'); + setStr(pl, 'qt', 'qtsrcchokespeed'); + setStr(pl, 'qt', 'volume'); + setStr(pl, 'qt', 'qtsrc'); + break; + + case "shockwave": + setBool(pl, 'shockwave', 'sound'); + setBool(pl, 'shockwave', 'progress'); + setBool(pl, 'shockwave', 'autostart'); + setBool(pl, 'shockwave', 'swliveconnect'); + setStr(pl, 'shockwave', 'swvolume'); + setStr(pl, 'shockwave', 'swstretchstyle'); + setStr(pl, 'shockwave', 'swstretchhalign'); + setStr(pl, 'shockwave', 'swstretchvalign'); + break; + + case "wmp": + setBool(pl, 'wmp', 'autostart'); + setBool(pl, 'wmp', 'enabled'); + setBool(pl, 'wmp', 'enablecontextmenu'); + setBool(pl, 'wmp', 'fullscreen'); + setBool(pl, 'wmp', 'invokeurls'); + setBool(pl, 'wmp', 'mute'); + setBool(pl, 'wmp', 'stretchtofit'); + setBool(pl, 'wmp', 'windowlessvideo'); + setStr(pl, 'wmp', 'balance'); + setStr(pl, 'wmp', 'baseurl'); + setStr(pl, 'wmp', 'captioningid'); + setStr(pl, 'wmp', 'currentmarker'); + setStr(pl, 'wmp', 'currentposition'); + setStr(pl, 'wmp', 'defaultframe'); + setStr(pl, 'wmp', 'playcount'); + setStr(pl, 'wmp', 'rate'); + setStr(pl, 'wmp', 'uimode'); + setStr(pl, 'wmp', 'volume'); + break; + + case "rmp": + setBool(pl, 'rmp', 'autostart'); + setBool(pl, 'rmp', 'loop'); + setBool(pl, 'rmp', 'autogotourl'); + setBool(pl, 'rmp', 'center'); + setBool(pl, 'rmp', 'imagestatus'); + setBool(pl, 'rmp', 'maintainaspect'); + setBool(pl, 'rmp', 'nojava'); + setBool(pl, 'rmp', 'prefetch'); + setBool(pl, 'rmp', 'shuffle'); + setStr(pl, 'rmp', 'console'); + setStr(pl, 'rmp', 'controls'); + setStr(pl, 'rmp', 'numloop'); + setStr(pl, 'rmp', 'scriptcallbacks'); + break; + } + + setStr(pl, null, 'src'); + setStr(pl, null, 'id'); + setStr(pl, null, 'name'); + setStr(pl, null, 'vspace'); + setStr(pl, null, 'hspace'); + setStr(pl, null, 'bgcolor'); + setStr(pl, null, 'align'); + setStr(pl, null, 'width'); + setStr(pl, null, 'height'); + + if ((val = ed.dom.getAttrib(fe, "width")) != "") + pl.width = f.width.value = val; + + if ((val = ed.dom.getAttrib(fe, "height")) != "") + pl.height = f.height.value = val; + + oldWidth = pl.width ? parseInt(pl.width) : 0; + oldHeight = pl.height ? parseInt(pl.height) : 0; + } else + oldWidth = oldHeight = 0; + + selectByValue(f, 'media_type', type); + changedType(type); + updateColor('bgcolor_pick', 'bgcolor'); + + TinyMCE_EditableSelects.init(); + generatePreview(); +} + +function insertMedia() { + var fe, f = document.forms[0], h; + + tinyMCEPopup.restoreSelection(); + + if (!AutoValidator.validate(f)) { + alert(ed.getLang('invalid_data')); + return false; + } + + f.width.value = f.width.value == "" ? 100 : f.width.value; + f.height.value = f.height.value == "" ? 100 : f.height.value; + + fe = ed.selection.getNode(); + if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + fe.className = "mceItemFlash"; + break; + + case "flv": + fe.className = "mceItemFlashVideo"; + break; + + case "shockwave": + fe.className = "mceItemShockWave"; + break; + + case "qt": + fe.className = "mceItemQuickTime"; + break; + + case "wmp": + fe.className = "mceItemWindowsMedia"; + break; + + case "rmp": + fe.className = "mceItemRealMedia"; + break; + } + + if (fe.width != f.width.value || fe.height != f.height.height) + ed.execCommand('mceRepaint'); + + fe.title = serializeParameters(); + fe.width = f.width.value; + fe.height = f.height.value; + fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : ''); + fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : ''); + fe.align = f.align.options[f.align.selectedIndex].value; + } else { + h = '<img src="' + tinyMCEPopup.getWindowArg("plugin_url") + '/img/trans.gif"' ; + + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + h += ' class="mceItemFlash"'; + break; + + case "flv": + h += ' class="mceItemFlashVideo"'; + break; + + case "shockwave": + h += ' class="mceItemShockWave"'; + break; + + case "qt": + h += ' class="mceItemQuickTime"'; + break; + + case "wmp": + h += ' class="mceItemWindowsMedia"'; + break; + + case "rmp": + h += ' class="mceItemRealMedia"'; + break; + } + + h += ' title="' + serializeParameters() + '"'; + h += ' width="' + f.width.value + '"'; + h += ' height="' + f.height.value + '"'; + h += ' align="' + f.align.options[f.align.selectedIndex].value + '"'; + + h += ' />'; + + ed.execCommand('mceInsertContent', false, h); + } + + tinyMCEPopup.close(); +} + +function updatePreview() { + var f = document.forms[0], type; + + f.width.value = f.width.value || '320'; + f.height.value = f.height.value || '240'; + + type = getType(f.src.value); + selectByValue(f, 'media_type', type); + changedType(type); + generatePreview(); +} + +function getMediaListHTML() { + if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { + var html = ""; + + html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;updatePreview();">'; + html += '<option value="">---</option>'; + + for (var i=0; i<tinyMCEMediaList.length; i++) + html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>'; + + html += '</select>'; + + return html; + } + + return ""; +} + +function getType(v) { + var fo, i, c, el, x, f = document.forms[0]; + + fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';'); + + // YouTube + if (v.match(/watch\?v=(.+)(.*)/)) { + f.width.value = '425'; + f.height.value = '350'; + f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1]; + return 'flash'; + } + + // Google video + if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) { + f.width.value = '425'; + f.height.value = '326'; + f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en'; + return 'flash'; + } + + for (i=0; i<fo.length; i++) { + c = fo[i].split('='); + + el = c[1].split(','); + for (x=0; x<el.length; x++) + if (v.indexOf('.' + el[x]) != -1) + return c[0]; + } + + return null; +} + +function switchType(v) { + var t = getType(v), d = document, f = d.forms[0]; + + if (!t) + return; + + selectByValue(d.forms[0], 'media_type', t); + changedType(t); + + // Update qtsrc also + if (t == 'qt' && f.src.value.toLowerCase().indexOf('rtsp://') != -1) { + alert(ed.getLang("media_qt_stream_warn")); + + if (f.qt_qtsrc.value == '') + f.qt_qtsrc.value = f.src.value; + } +} + +function changedType(t) { + var d = document; + + d.getElementById('flash_options').style.display = 'none'; + d.getElementById('flv_options').style.display = 'none'; + d.getElementById('qt_options').style.display = 'none'; + d.getElementById('shockwave_options').style.display = 'none'; + d.getElementById('wmp_options').style.display = 'none'; + d.getElementById('rmp_options').style.display = 'none'; + d.getElementById(t + '_options').style.display = 'block'; +} + +function serializeParameters() { + var d = document, f = d.forms[0], s = ''; + + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + s += getBool('flash', 'play', true); + s += getBool('flash', 'loop', true); + s += getBool('flash', 'menu', true); + s += getBool('flash', 'swliveconnect', false); + s += getStr('flash', 'quality'); + s += getStr('flash', 'scale'); + s += getStr('flash', 'salign'); + s += getStr('flash', 'wmode'); + s += getStr('flash', 'base'); + s += getStr('flash', 'flashvars'); + break; + + case "qt": + s += getBool('qt', 'loop', false); + s += getBool('qt', 'autoplay', true); + s += getBool('qt', 'cache', false); + s += getBool('qt', 'controller', true); + s += getBool('qt', 'correction', false, 'none', 'full'); + s += getBool('qt', 'enablejavascript', false); + s += getBool('qt', 'kioskmode', false); + s += getBool('qt', 'autohref', false); + s += getBool('qt', 'playeveryframe', false); + s += getBool('qt', 'targetcache', false); + s += getStr('qt', 'scale'); + s += getStr('qt', 'starttime'); + s += getStr('qt', 'endtime'); + s += getStr('qt', 'target'); + s += getStr('qt', 'qtsrcchokespeed'); + s += getStr('qt', 'volume'); + s += getStr('qt', 'qtsrc'); + break; + + case "shockwave": + s += getBool('shockwave', 'sound'); + s += getBool('shockwave', 'progress'); + s += getBool('shockwave', 'autostart'); + s += getBool('shockwave', 'swliveconnect'); + s += getStr('shockwave', 'swvolume'); + s += getStr('shockwave', 'swstretchstyle'); + s += getStr('shockwave', 'swstretchhalign'); + s += getStr('shockwave', 'swstretchvalign'); + break; + + case "wmp": + s += getBool('wmp', 'autostart', true); + s += getBool('wmp', 'enabled', false); + s += getBool('wmp', 'enablecontextmenu', true); + s += getBool('wmp', 'fullscreen', false); + s += getBool('wmp', 'invokeurls', true); + s += getBool('wmp', 'mute', false); + s += getBool('wmp', 'stretchtofit', false); + s += getBool('wmp', 'windowlessvideo', false); + s += getStr('wmp', 'balance'); + s += getStr('wmp', 'baseurl'); + s += getStr('wmp', 'captioningid'); + s += getStr('wmp', 'currentmarker'); + s += getStr('wmp', 'currentposition'); + s += getStr('wmp', 'defaultframe'); + s += getStr('wmp', 'playcount'); + s += getStr('wmp', 'rate'); + s += getStr('wmp', 'uimode'); + s += getStr('wmp', 'volume'); + break; + + case "rmp": + s += getBool('rmp', 'autostart', false); + s += getBool('rmp', 'loop', false); + s += getBool('rmp', 'autogotourl', true); + s += getBool('rmp', 'center', false); + s += getBool('rmp', 'imagestatus', true); + s += getBool('rmp', 'maintainaspect', false); + s += getBool('rmp', 'nojava', false); + s += getBool('rmp', 'prefetch', false); + s += getBool('rmp', 'shuffle', false); + s += getStr('rmp', 'console'); + s += getStr('rmp', 'controls'); + s += getStr('rmp', 'numloop'); + s += getStr('rmp', 'scriptcallbacks'); + break; + } + + s += getStr(null, 'id'); + s += getStr(null, 'name'); + s += getStr(null, 'src'); + s += getStr(null, 'align'); + s += getStr(null, 'bgcolor'); + s += getInt(null, 'vspace'); + s += getInt(null, 'hspace'); + s += getStr(null, 'width'); + s += getStr(null, 'height'); + + s = s.length > 0 ? s.substring(0, s.length - 1) : s; + + return s; +} + +function setBool(pl, p, n) { + if (typeof(pl[n]) == "undefined") + return; + + document.forms[0].elements[p + "_" + n].checked = pl[n]; +} + +function setStr(pl, p, n) { + var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n]; + + if (typeof(pl[n]) == "undefined") + return; + + if (e.type == "text") + e.value = pl[n]; + else + selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]); +} + +function getBool(p, n, d, tv, fv) { + var v = document.forms[0].elements[p + "_" + n].checked; + + tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; + fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; + + return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ','); +} + +function getStr(p, n, d) { + var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; + var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; + + if (n == 'src') + v = tinyMCEPopup.editor.convertURL(v, 'src', null); + + return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',"); +} + +function getInt(p, n, d) { + var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; + var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; + + return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ","); +} + +function jsEncode(s) { + s = s.replace(new RegExp('\\\\', 'g'), '\\\\'); + s = s.replace(new RegExp('"', 'g'), '\\"'); + s = s.replace(new RegExp("'", 'g'), "\\'"); + + return s; +} + +function generatePreview(c) { + var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh; + + p.innerHTML = '<!-- x --->'; + + nw = parseInt(f.width.value); + nh = parseInt(f.height.value); + + if (f.width.value != "" && f.height.value != "") { + if (f.constrain.checked) { + if (c == 'width' && oldWidth != 0) { + wp = nw / oldWidth; + nh = Math.round(wp * nh); + f.height.value = nh; + } else if (c == 'height' && oldHeight != 0) { + hp = nh / oldHeight; + nw = Math.round(hp * nw); + f.width.value = nw; + } + } + } + + if (f.width.value != "") + oldWidth = nw; + + if (f.height.value != "") + oldHeight = nh; + + // After constrain + pl = serializeParameters(); + + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; + codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'; + type = 'application/x-shockwave-flash'; + break; + + case "shockwave": + cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000'; + codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0'; + type = 'application/x-director'; + break; + + case "qt": + cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B'; + codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'; + type = 'video/quicktime'; + break; + + case "wmp": + cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'; + codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; + type = 'application/x-mplayer2'; + break; + + case "rmp": + cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'; + codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; + type = 'audio/x-pn-realaudio-plugin'; + break; + } + + if (pl == '') { + p.innerHTML = ''; + return; + } + + pl = tinyMCEPopup.editor.plugins.media._parse(pl); + + if (!pl.src) { + p.innerHTML = ''; + return; + } + + pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src); + pl.width = !pl.width ? 100 : pl.width; + pl.height = !pl.height ? 100 : pl.height; + pl.id = !pl.id ? 'obj' : pl.id; + pl.name = !pl.name ? 'eobj' : pl.name; + pl.align = !pl.align ? '' : pl.align; + + h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">'; + + for (n in pl) { + h += '<param name="' + n + '" value="' + pl[n] + '">'; + + // Add extra url parameter if it's an absolute URL + if (n == 'src' && pl[n].indexOf('://') != -1) + h += '<param name="url" value="' + pl[n] + '" />'; + } + + h += '<embed type="' + type + '" '; + + for (n in pl) + h += n + '="' + pl[n] + '" '; + + h += '></embed></object>'; + + p.innerHTML = "<!-- x --->" + h; +} + +tinyMCEPopup.onInit.add(init); diff --git a/wp-includes/js/tinymce/plugins/media/media.htm b/wp-includes/js/tinymce/plugins/media/media.htm new file mode 100644 index 0000000..32e0967 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/media/media.htm @@ -0,0 +1,824 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>{#media_dlg.title}</title> + <script type="text/javascript" src="../../tiny_mce_popup.js"></script> + <script type="text/javascript" src="js/media.js"></script> + <script type="text/javascript" src="../../utils/mctabs.js"></script> + <script type="text/javascript" src="../../utils/validate.js"></script> + <script type="text/javascript" src="../../utils/form_utils.js"></script> + <script type="text/javascript" src="../../utils/editable_selects.js"></script> + <link href="css/media.css" rel="stylesheet" type="text/css" /> + <base target="_self" /> +</head> +<body style="display: none"> + <form onsubmit="insertMedia();return false;" action="#"> + <div class="tabs"> + <ul> + <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');generatePreview();" onmousedown="return false;">{#media_dlg.general}</a></span></li> + <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#media_dlg.advanced}</a></span></li> + </ul> + </div> + + <div class="panel_wrapper"> + <div id="general_panel" class="panel current"> + <fieldset> + <legend>{#media_dlg.general}</legend> + + <table border="0" cellpadding="4" cellspacing="0"> + <tr> + <td><label for="media_type">{#media_dlg.type}</label></td> + <td> + <select id="media_type" name="media_type" onchange="changedType(this.value);generatePreview();"> + <option value="flash">Flash</option> + <!-- <option value="flv">Flash video (FLV)</option> --> + <option value="qt">Quicktime</option> + <option value="shockwave">Shockware</option> + <option value="wmp">Windows Media</option> + <option value="rmp">Real Media</option> + </select> + </td> + </tr> + <tr> + <td><label for="src">{#media_dlg.file}</label></td> + <td> + <table border="0" cellspacing="0" cellpadding="0"> + <tr> + <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="switchType(this.value);generatePreview();" /></td> + <td id="filebrowsercontainer"> </td> + </tr> + </table> + </td> + </tr> + <tr id="linklistrow"> + <td><label for="linklist">{#media_dlg.list}</label></td> + <td id="linklistcontainer"> </td> + </tr> + <tr> + <td><label for="width">{#media_dlg.size}</label></td> + <td> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="text" id="width" name="width" value="" class="size" onchange="generatePreview('width');" /> x <input type="text" id="height" name="height" value="" class="size" onchange="generatePreview('height');" /></td> + <td> <input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td> + <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td> + </tr> + </table> + </td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend>{#media_dlg.preview}</legend> + <div id="prev"></div> + </fieldset> + </div> + + <div id="advanced_panel" class="panel"> + <fieldset> + <legend>{#media_dlg.advanced}</legend> + + <table border="0" cellpadding="4" cellspacing="0" width="100%"> + <tr> + <td><label for="id">{#media_dlg.id}</label></td> + <td><input type="text" id="id" name="id" onchange="generatePreview();" /></td> + <td><label for="name">{#media_dlg.name}</label></td> + <td><input type="text" id="name" name="name" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="align">{#media_dlg.align}</label></td> + <td> + <select id="align" name="align" onchange="generatePreview();"> + <option value="">{#not_set}</option> + <option value="top">{#media_dlg.align_top}</option> + <option value="right">{#media_dlg.align_right}</option> + <option value="bottom">{#media_dlg.align_bottom}</option> + <option value="left">{#media_dlg.align_left}</option> + </select> + </td> + + <td><label for="bgcolor">{#media_dlg.bgcolor}</label></td> + <td> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');generatePreview();" /></td> + <td id="bgcolor_pickcontainer"> </td> + </tr> + </table> + </td> + </tr> + + <tr> + <td><label for="vspace">{#media_dlg.vspace}</label></td> + <td><input type="text" id="vspace" name="vspace" class="number" onchange="generatePreview();" /></td> + <td><label for="hspace">{#media_dlg.hspace}</label></td> + <td><input type="text" id="hspace" name="hspace" class="number" onchange="generatePreview();" /></td> + </tr> + </table> + </fieldset> + + <fieldset id="flash_options"> + <legend>{#media_dlg.flash_options}</legend> + + <table border="0" cellpadding="4" cellspacing="0"> + <tr> + <td><label for="flash_quality">{#media_dlg.quality}</label></td> + <td> + <select id="flash_quality" name="flash_quality" onchange="generatePreview();"> + <option value="">{#not_set}</option> + <option value="high">high</option> + <option value="low">low</option> + <option value="autolow">autolow</option> + <option value="autohigh">autohigh</option> + <option value="best">best</option> + </select> + </td> + + <td><label for="flash_scale">{#media_dlg.scale}</label></td> + <td> + <select id="flash_scale" name="flash_scale" onchange="generatePreview();"> + <option value="">{#not_set}</option> + <option value="showall">showall</option> + <option value="noborder">noborder</option> + <option value="exactfit">exactfit</option> + <option value="noscale">noscale</option> + </select> + </td> + </tr> + + <tr> + <td><label for="flash_wmode">{#media_dlg.wmode}</label></td> + <td> + <select id="flash_wmode" name="flash_wmode" onchange="generatePreview();"> + <option value="">{#not_set}</option> + <option value="window">window</option> + <option value="opaque">opaque</option> + <option value="transparent">transparent</option> + </select> + </td> + + <td><label for="flash_salign">{#media_dlg.salign}</label></td> + <td> + <select id="flash_salign" name="flash_salign" onchange="generatePreview();"> + <option value="">{#not_set}</option> + <option value="l">{#media_dlg.align_left}</option> + <option value="t">{#media_dlg.align_top}</option> + <option value="r">{#media_dlg.align_right}</option> + <option value="b">{#media_dlg.align_bottom}</option> + <option value="tl">{#media_dlg.align_top_left}</option> + <option value="tr">{#media_dlg.align_top_right}</option> + <option value="bl">{#media_dlg.align_bottom_left}</option> + <option value="br">{#media_dlg.align_bottom_right}</option> + </select> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="generatePreview();" /></td> + <td><label for="flash_play">{#media_dlg.play}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="generatePreview();" /></td> + <td><label for="flash_loop">{#media_dlg.loop}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="generatePreview();" /></td> + <td><label for="flash_menu">{#media_dlg.menu}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="generatePreview();" /></td> + <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td> + </tr> + </table> + </td> + </tr> + </table> + + <table> + <tr> + <td><label for="flash_base">{#media_dlg.base}</label></td> + <td><input type="text" id="flash_base" name="flash_base" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td> + <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="generatePreview();" /></td> + </tr> + </table> + </fieldset> + + <fieldset id="flv_options"> + <legend>{#media_dlg.flv_options}</legend> + + <table border="0" cellpadding="4" cellspacing="0"> + <tr> + <td><label for="flv_scalemode">{#media_dlg.flv_scalemode}</label></td> + <td> + <select id="flv_scalemode" name="flv_scalemode" onchange="generatePreview();"> + <option value="">{#not_set}</option> + <option value="none">none</option> + <option value="double">double</option> + <option value="full">full</option> + </select> + </td> + + <td><label for="flv_buffer">{#media_dlg.flv_buffer}</label></td> + <td><input type="text" id="flv_buffer" name="flv_buffer" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="flv_startimage">{#media_dlg.flv_startimage}</label></td> + <td><input type="text" id="flv_startimage" name="flv_startimage" onchange="generatePreview();" /></td> + + <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td> + <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="flv_defaultvolume">{#media_dlg.flv_defaultvolume}</label></td> + <td><input type="text" id="flv_defaultvolume" name="flv_defaultvolume" onchange="generatePreview();" /></td> + + <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td> + <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flv_hiddengui" name="flv_hiddengui" checked="checked" onchange="generatePreview();" /></td> + <td><label for="flv_hiddengui">{#media_dlg.flv_hiddengui}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flv_autostart" name="flv_autostart" checked="checked" onchange="generatePreview();" /></td> + <td><label for="flv_autostart">{#media_dlg.flv_autostart}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flv_loop" name="flv_loop" checked="checked" onchange="generatePreview();" /></td> + <td><label for="flv_loop">{#media_dlg.flv_loop}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flv_showscalemodes" name="flv_showscalemodes" onchange="generatePreview();" /></td> + <td><label for="flv_showscalemodes">{#media_dlg.flv_showscalemodes}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flv_smoothvideo" name="flash_flv_flv_smoothvideosmoothvideo" checked="checked" onchange="generatePreview();" /></td> + <td><label for="flv_smoothvideo">{#media_dlg.flv_smoothvideo}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="flv_jscallback" name="flv_jscallback" onchange="generatePreview();" /></td> + <td><label for="flv_jscallback">{#media_dlg.flv_jscallback}</label></td> + </tr> + </table> + </td> + </tr> + </table> + </fieldset> + + <fieldset id="qt_options"> + <legend>{#media_dlg.qt_options}</legend> + + <table border="0" cellpadding="4" cellspacing="0"> + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_loop" name="qt_loop" onchange="generatePreview();" /></td> + <td><label for="qt_loop">{#media_dlg.loop}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_autoplay" name="qt_autoplay" checked="checked" onchange="generatePreview();" /></td> + <td><label for="qt_autoplay">{#media_dlg.play}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_cache" name="qt_cache" onchange="generatePreview();" /></td> + <td><label for="qt_cache">{#media_dlg.cache}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_controller" name="qt_controller" checked="checked" onchange="generatePreview();" /></td> + <td><label for="qt_controller">{#media_dlg.controller}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_correction" name="qt_correction" onchange="generatePreview();" /></td> + <td><label for="qt_correction">{#media_dlg.correction}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_enablejavascript" name="qt_enablejavascript" onchange="generatePreview();" /></td> + <td><label for="qt_enablejavascript">{#media_dlg.enablejavascript}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_kioskmode" name="qt_kioskmode" onchange="generatePreview();" /></td> + <td><label for="qt_kioskmode">{#media_dlg.kioskmode}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_autohref" name="qt_autohref" onchange="generatePreview();" /></td> + <td><label for="qt_autohref">{#media_dlg.autohref}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_playeveryframe" name="qt_playeveryframe" onchange="generatePreview();" /></td> + <td><label for="qt_playeveryframe">{#media_dlg.playeveryframe}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="qt_targetcache" name="qt_targetcache" onchange="generatePreview();" /></td> + <td><label for="qt_targetcache">{#media_dlg.targetcache}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td><label for="qt_scale">{#media_dlg.scale}</label></td> + <td><select id="qt_scale" name="qt_scale" class="mceEditableSelect" onchange="generatePreview();"> + <option value="">{#not_set}</option> + <option value="tofit">tofit</option> + <option value="aspect">aspect</option> + </select> + </td> + + <td colspan="2"> </td> + </tr> + + <tr> + <td><label for="qt_starttime">{#media_dlg.starttime}</label></td> + <td><input type="text" id="qt_starttime" name="qt_starttime" onchange="generatePreview();" /></td> + + <td><label for="qt_endtime">{#media_dlg.endtime}</label></td> + <td><input type="text" id="qt_endtime" name="qt_endtime" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="qt_target">{#media_dlg.target}</label></td> + <td><input type="text" id="qt_target" name="qt_target" onchange="generatePreview();" /></td> + + <td><label for="qt_href">{#media_dlg.href}</label></td> + <td><input type="text" id="qt_href" name="qt_href" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="qt_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td> + <td><input type="text" id="qt_qtsrcchokespeed" name="qt_qtsrcchokespeed" onchange="generatePreview();" /></td> + + <td><label for="qt_volume">{#media_dlg.volume}</label></td> + <td><input type="text" id="qt_volume" name="qt_volume" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="qt_qtsrc">{#media_dlg.qtsrc}</label></td> + <td colspan="4"> + <table border="0" cellspacing="0" cellpadding="0"> + <tr> + <td><input type="text" id="qt_qtsrc" name="qt_qtsrc" onchange="generatePreview();" /></td> + <td id="qtsrcfilebrowsercontainer"> </td> + </tr> + </table> + </td> + </tr> + </table> + </fieldset> + + <fieldset id="wmp_options"> + <legend>{#media_dlg.wmp_options}</legend> + + <table border="0" cellpadding="4" cellspacing="0"> + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="wmp_autostart" name="wmp_autostart" checked="checked" onchange="generatePreview();" /></td> + <td><label for="wmp_autostart">{#media_dlg.autostart}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="wmp_enabled" name="wmp_enabled" onchange="generatePreview();" /></td> + <td><label for="wmp_enabled">{#media_dlg.enabled}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="wmp_enablecontextmenu" name="wmp_enablecontextmenu" checked="checked" onchange="generatePreview();" /></td> + <td><label for="wmp_enablecontextmenu">{#media_dlg.menu}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="wmp_fullscreen" name="wmp_fullscreen" onchange="generatePreview();" /></td> + <td><label for="wmp_fullscreen">{#media_dlg.fullscreen}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="wmp_invokeurls" name="wmp_invokeurls" checked="checked" onchange="generatePreview();" /></td> + <td><label for="wmp_invokeurls">{#media_dlg.invokeurls}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="wmp_mute" name="wmp_mute" onchange="generatePreview();" /></td> + <td><label for="wmp_mute">{#media_dlg.mute}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="wmp_stretchtofit" name="wmp_stretchtofit" onchange="generatePreview();" /></td> + <td><label for="wmp_stretchtofit">{#media_dlg.stretchtofit}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="wmp_windowlessvideo" name="wmp_windowlessvideo" onchange="generatePreview();" /></td> + <td><label for="wmp_windowlessvideo">{#media_dlg.windowlessvideo}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td><label for="wmp_balance">{#media_dlg.balance}</label></td> + <td><input type="text" id="wmp_balance" name="wmp_balance" onchange="generatePreview();" /></td> + + <td><label for="wmp_baseurl">{#media_dlg.baseurl}</label></td> + <td><input type="text" id="wmp_baseurl" name="wmp_baseurl" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="wmp_captioningid">{#media_dlg.captioningid}</label></td> + <td><input type="text" id="wmp_captioningid" name="wmp_captioningid" onchange="generatePreview();" /></td> + + <td><label for="wmp_currentmarker">{#media_dlg.currentmarker}</label></td> + <td><input type="text" id="wmp_currentmarker" name="wmp_currentmarker" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="wmp_currentposition">{#media_dlg.currentposition}</label></td> + <td><input type="text" id="wmp_currentposition" name="wmp_currentposition" onchange="generatePreview();" /></td> + + <td><label for="wmp_defaultframe">{#media_dlg.defaultframe}</label></td> + <td><input type="text" id="wmp_defaultframe" name="wmp_defaultframe" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="wmp_playcount">{#media_dlg.playcount}</label></td> + <td><input type="text" id="wmp_playcount" name="wmp_playcount" onchange="generatePreview();" /></td> + + <td><label for="wmp_rate">{#media_dlg.rate}</label></td> + <td><input type="text" id="wmp_rate" name="wmp_rate" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="wmp_uimode">{#media_dlg.uimode}</label></td> + <td><input type="text" id="wmp_uimode" name="wmp_uimode" onchange="generatePreview();" /></td> + + <td><label for="wmp_volume">{#media_dlg.volume}</label></td> + <td><input type="text" id="wmp_volume" name="wmp_volume" onchange="generatePreview();" /></td> + </tr> + + </table> + </fieldset> + + <fieldset id="rmp_options"> + <legend>{#media_dlg.rmp_options}</legend> + + <table border="0" cellpadding="4" cellspacing="0"> + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="rmp_autostart" name="rmp_autostart" onchange="generatePreview();" /></td> + <td><label for="rmp_autostart">{#media_dlg.autostart}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="rmp_loop" name="rmp_loop" onchange="generatePreview();" /></td> + <td><label for="rmp_loop">{#media_dlg.loop}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="rmp_autogotourl" name="rmp_autogotourl" checked="checked" onchange="generatePreview();" /></td> + <td><label for="rmp_autogotourl">{#media_dlg.autogotourl}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="rmp_center" name="rmp_center" onchange="generatePreview();" /></td> + <td><label for="rmp_center">{#media_dlg.center}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="rmp_imagestatus" name="rmp_imagestatus" checked="checked" onchange="generatePreview();" /></td> + <td><label for="rmp_imagestatus">{#media_dlg.imagestatus}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="rmp_maintainaspect" name="rmp_maintainaspect" onchange="generatePreview();" /></td> + <td><label for="rmp_maintainaspect">{#media_dlg.maintainaspect}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="rmp_nojava" name="rmp_nojava" onchange="generatePreview();" /></td> + <td><label for="rmp_nojava">{#media_dlg.nojava}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="rmp_prefetch" name="rmp_prefetch" onchange="generatePreview();" /></td> + <td><label for="rmp_prefetch">{#media_dlg.prefetch}</label></td> + </tr> + </table> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="rmp_shuffle" name="rmp_shuffle" onchange="generatePreview();" /></td> + <td><label for="rmp_shuffle">{#media_dlg.shuffle}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + + </td> + </tr> + + <tr> + <td><label for="rmp_console">{#media_dlg.console}</label></td> + <td><input type="text" id="rmp_console" name="rmp_console" onchange="generatePreview();" /></td> + + <td><label for="rmp_controls">{#media_dlg.controls}</label></td> + <td><input type="text" id="rmp_controls" name="rmp_controls" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="rmp_numloop">{#media_dlg.numloop}</label></td> + <td><input type="text" id="rmp_numloop" name="rmp_numloop" onchange="generatePreview();" /></td> + + <td><label for="rmp_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td> + <td><input type="text" id="rmp_scriptcallbacks" name="rmp_scriptcallbacks" onchange="generatePreview();" /></td> + </tr> + </table> + </fieldset> + + <fieldset id="shockwave_options"> + <legend>{#media_dlg.shockwave_options}</legend> + + <table border="0" cellpadding="4" cellspacing="0"> + <tr> + <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td> + <td> + <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="generatePreview();"> + <option value="none">{#not_set}</option> + <option value="meet">Meet</option> + <option value="fill">Fill</option> + <option value="stage">Stage</option> + </select> + </td> + + <td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td> + <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="generatePreview();" /></td> + </tr> + + <tr> + <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td> + <td> + <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="generatePreview();"> + <option value="none">{#not_set}</option> + <option value="left">{#media_dlg.align_left}</option> + <option value="center">{#media_dlg.align_center}</option> + <option value="right">{#media_dlg.align_right}</option> + </select> + </td> + + <td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td> + <td> + <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="generatePreview();"> + <option value="none">{#not_set}</option> + <option value="meet">Meet</option> + <option value="fill">Fill</option> + <option value="stage">Stage</option> + </select> + </td> + </tr> + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="generatePreview();" checked="checked" /></td> + <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="generatePreview();" checked="checked" /></td> + <td><label for="shockwave_sound">{#media_dlg.sound}</label></td> + </tr> + </table> + </td> + </tr> + + + <tr> + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="generatePreview();" /></td> + <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td> + </tr> + </table> + </td> + + <td colspan="2"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="generatePreview();" checked="checked" /></td> + <td><label for="shockwave_progress">{#media_dlg.progress}</label></td> + </tr> + </table> + </td> + </tr> + </table> + </fieldset> + </div> + </div> + + <div class="mceActionPanel"> + <div style="float: left"> + <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> + </div> + + <div style="float: right"> + <input type="submit" id="insert" name="insert" value="{#insert}" /> + </div> + </div> + </form> +</body> +</html> diff --git a/wp-includes/js/tinymce/plugins/paste/images/pastetext.gif b/wp-includes/js/tinymce/plugins/paste/images/pastetext.gif Binary files differdeleted file mode 100644 index e381cc6..0000000 --- a/wp-includes/js/tinymce/plugins/paste/images/pastetext.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/paste/images/pasteword.gif b/wp-includes/js/tinymce/plugins/paste/images/pasteword.gif Binary files differdeleted file mode 100644 index 0ccb008..0000000 --- a/wp-includes/js/tinymce/plugins/paste/images/pasteword.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/paste/images/selectall.gif b/wp-includes/js/tinymce/plugins/paste/images/selectall.gif Binary files differdeleted file mode 100644 index c4f9901..0000000 --- a/wp-includes/js/tinymce/plugins/paste/images/selectall.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/paste/jscripts/pastetext.js b/wp-includes/js/tinymce/plugins/paste/js/pastetext.js index 4c07691..2807387 100644 --- a/wp-includes/js/tinymce/plugins/paste/jscripts/pastetext.js +++ b/wp-includes/js/tinymce/plugins/paste/js/pastetext.js @@ -1,38 +1,42 @@ -function saveContent() {
- if (document.forms[0].htmlSource.value == '') {
- tinyMCEPopup.close();
- return false;
- }
-
- tinyMCEPopup.execCommand('mcePasteText', false, {
- html : document.forms[0].htmlSource.value,
- linebreaks : document.forms[0].linebreaks.checked
- });
-
- tinyMCEPopup.close();
-}
-
-function onLoadInit() {
- tinyMCEPopup.resizeToInnerSize();
-
- // Remove Gecko spellchecking
- if (tinyMCE.isGecko)
- document.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
-
- resizeInputs();
-}
-
-var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
-
-function resizeInputs() {
- if (!tinyMCE.isMSIE) {
- wHeight = self.innerHeight-80;
- wWidth = self.innerWidth-17;
- } else {
- wHeight = document.body.clientHeight-80;
- wWidth = document.body.clientWidth-17;
- }
-
- document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
- document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
-}
+tinyMCEPopup.requireLangPack(); + +function saveContent() { + if (document.forms[0].htmlSource.value == '') { + tinyMCEPopup.close(); + return false; + } + + tinyMCEPopup.execCommand('mcePasteText', false, { + html : document.forms[0].htmlSource.value, + linebreaks : document.forms[0].linebreaks.checked + }); + + tinyMCEPopup.close(); +} + +function onLoadInit() { + tinyMCEPopup.resizeToInnerSize(); + + // Remove Gecko spellchecking + if (tinymce.isGecko) + document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); + + resizeInputs(); +} + +var wHeight=0, wWidth=0, owHeight=0, owWidth=0; + +function resizeInputs() { + if (!tinymce.isIE) { + wHeight = self.innerHeight-80; + wWidth = self.innerWidth-17; + } else { + wHeight = document.body.clientHeight-80; + wWidth = document.body.clientWidth-17; + } + + document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px'; + document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px'; +} + +tinyMCEPopup.onInit.add(onLoadInit);
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/paste/jscripts/pasteword.js b/wp-includes/js/tinymce/plugins/paste/js/pasteword.js index b243a10..ea9c29c 100644 --- a/wp-includes/js/tinymce/plugins/paste/jscripts/pasteword.js +++ b/wp-includes/js/tinymce/plugins/paste/js/pasteword.js @@ -1,52 +1,56 @@ -function saveContent() {
- var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;
-
- if (html == ''){
- tinyMCEPopup.close();
- return false;
- }
-
- tinyMCEPopup.execCommand('mcePasteWord', false, html);
- tinyMCEPopup.close();
-}
-
-function onLoadInit() {
- tinyMCEPopup.resizeToInnerSize();
-
- // Fix for endless reloading in FF
- window.setTimeout('createIFrame();', 10);
-}
-
-function createIFrame() {
- document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" height="280" width="400" frameborder="0" style="background-color:#FFFFFF; width:100%;" dir="ltr" wrap="soft"></iframe>';
-}
-
-var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
-
-function initIframe(doc) {
- var dir = tinyMCE.selectedInstance.settings['directionality'];
-
- doc.body.dir = dir;
-
- // Remove Gecko spellchecking
- if (tinyMCE.isGecko)
- doc.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
-
- resizeInputs();
-}
-
-function resizeInputs() {
- if (!tinyMCE.isMSIE) {
- wHeight = self.innerHeight - 80;
- wWidth = self.innerWidth - 18;
- } else {
- wHeight = document.body.clientHeight - 80;
- wWidth = document.body.clientWidth - 18;
- }
-
- var elm = document.getElementById('frmData');
- if (elm) {
- elm.style.height = Math.abs(wHeight) + 'px';
- elm.style.width = Math.abs(wWidth) + 'px';
- }
-}
+tinyMCEPopup.requireLangPack(); + +function saveContent() { + var html = document.getElementById("frmData").contentWindow.document.body.innerHTML; + + if (html == ''){ + tinyMCEPopup.close(); + return false; + } + + tinyMCEPopup.execCommand('mcePasteWord', false, html); + tinyMCEPopup.close(); +} + +function onLoadInit() { + tinyMCEPopup.resizeToInnerSize(); + + // Fix for endless reloading in FF + window.setTimeout(createIFrame, 10); +} + +function createIFrame() { + document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" height="280" width="400" frameborder="0" style="background-color:#FFFFFF; width:100%;" dir="ltr" wrap="soft"></iframe>'; +} + +var wHeight=0, wWidth=0, owHeight=0, owWidth=0; + +function initIframe(doc) { + var dir = tinyMCEPopup.editor.settings.directionality; + + doc.body.dir = dir; + + // Remove Gecko spellchecking + if (tinymce.isGecko) + doc.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); + + resizeInputs(); +} + +function resizeInputs() { + if (!tinymce.isIE) { + wHeight = self.innerHeight - 80; + wWidth = self.innerWidth - 18; + } else { + wHeight = document.body.clientHeight - 80; + wWidth = document.body.clientWidth - 18; + } + + var elm = document.getElementById('frmData'); + if (elm) { + elm.style.height = Math.abs(wHeight) + 'px'; + elm.style.width = Math.abs(wWidth) + 'px'; + } +} + +tinyMCEPopup.onInit.add(onLoadInit); diff --git a/wp-includes/js/tinymce/plugins/paste/langs/en.js b/wp-includes/js/tinymce/plugins/paste/langs/en.js deleted file mode 100644 index b125d51..0000000 --- a/wp-includes/js/tinymce/plugins/paste/langs/en.js +++ /dev/null @@ -1,10 +0,0 @@ -// UK lang variables
-
-tinyMCE.addToLang('',{
-paste_text_desc : 'Paste as Plain Text',
-paste_text_title : 'Use CTRL+V on your keyboard to paste the text into the window.',
-paste_text_linebreaks : 'Keep linebreaks',
-paste_word_desc : 'Paste from Word',
-paste_word_title : 'Use CTRL+V on your keyboard to paste the text into the window.',
-selectall_desc : 'Select All'
-});
diff --git a/wp-includes/js/tinymce/plugins/safari/blank.htm b/wp-includes/js/tinymce/plugins/safari/blank.htm new file mode 100644 index 0000000..266808c --- /dev/null +++ b/wp-includes/js/tinymce/plugins/safari/blank.htm @@ -0,0 +1 @@ +<!-- WebKit -->
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/safari/editor_plugin.js b/wp-includes/js/tinymce/plugins/safari/editor_plugin.js new file mode 100644 index 0000000..960fc71 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/safari/editor_plugin.js @@ -0,0 +1 @@ +(function(){var Event=tinymce.dom.Event,grep=tinymce.grep,each=tinymce.each,inArray=tinymce.inArray,isOldWebKit=tinymce.isOldWebKit;tinymce.create('tinymce.plugins.Safari',{init:function(ed){var t=this,dom;if(!tinymce.isWebKit)return;t.editor=ed;t.webKitFontSizes=['x-small','small','medium','large','x-large','xx-large','-webkit-xxx-large'];t.namedFontSizes=['xx-small','x-small','small','medium','large','x-large','xx-large'];ed.onKeyUp.add(function(ed,e){var h;if(e.keyCode==46||e.keyCode==8){h=ed.getBody().innerHTML;if(!/<(img|hr)/.test(h)&&tinymce.trim(h.replace(/<[^>]+>/g,'')).length==0)ed.setContent('',{format:'raw'});}});ed.addCommand('FormatBlock',function(u,v){var dom=ed.dom,e=dom.getParent(ed.selection.getNode(),dom.isBlock);if(e)dom.replace(dom.create(v),e,1);else ed.getDoc().execCommand("FormatBlock",false,v);});ed.addCommand('mceInsertContent',function(u,v){ed.getDoc().execCommand("InsertText",false,'mce_marker');ed.getBody().innerHTML=ed.getBody().innerHTML.replace(/mce_marker/g,v+'<span id="_mce_tmp">XX</span>');ed.selection.select(ed.dom.get('_mce_tmp'));ed.getDoc().execCommand("Delete",false,' ');});ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&(e.shiftKey||ed.settings.force_br_newlines&&ed.selection.getNode().nodeName!='LI')){t._insertBR(ed);Event.cancel(e);}});ed.addQueryValueHandler('FontSize',function(u,v){var e,v;if((e=ed.dom.getParent(ed.selection.getStart(),'span'))&&(v=e.style.fontSize))return tinymce.inArray(t.namedFontSizes,v)+1;if((e=ed.dom.getParent(ed.selection.getEnd(),'span'))&&(v=e.style.fontSize))return tinymce.inArray(t.namedFontSizes,v)+1;return ed.getDoc().queryCommandValue('FontSize');});ed.addQueryValueHandler('FontName',function(u,v){var e,v;if((e=ed.dom.getParent(ed.selection.getStart(),'span'))&&(v=e.style.fontFamily))return v.replace(/, /g,',');if((e=ed.dom.getParent(ed.selection.getEnd(),'span'))&&(v=e.style.fontFamily))return v.replace(/, /g,',');return ed.getDoc().queryCommandValue('FontName');});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName=='IMG'){t.selElm=e;ed.selection.select(e);}else t.selElm=null;});ed.onBeforeExecCommand.add(function(ed,c,b){var r=t.bookmarkRng;if(r){ed.selection.setRng(r);t.bookmarkRng=null;}});ed.onInit.add(function(){t._fixWebKitSpans();ed.windowManager.onOpen.add(function(){var r=ed.selection.getRng();if(r.startContainer!=ed.getDoc()){t.bookmarkRng=r.cloneRange();}});ed.windowManager.onClose.add(function(){t.bookmarkRng=null;});if(isOldWebKit)t._patchSafari2x(ed);});ed.onSetContent.add(function(){dom=ed.dom;each(['strong','b','em','u','strike','sub','sup','a'],function(v){each(grep(dom.select(v)).reverse(),function(n){var nn=n.nodeName.toLowerCase(),st;if(nn=='a'){if(n.name)dom.replace(dom.create('img',{mce_name:'a',name:n.name,'class':'mceItemAnchor'}),n);return;}switch(nn){case'b':case'strong':if(nn=='b')nn='strong';st='font-weight: bold;';break;case'em':st='font-style: italic;';break;case'u':st='text-decoration: underline;';break;case'sub':st='vertical-align: sub;';break;case'sup':st='vertical-align: super;';break;case'strike':st='text-decoration: line-through;';break;}dom.replace(dom.create('span',{mce_name:nn,style:st,'class':'Apple-style-span'}),n,1);});});});ed.onPreProcess.add(function(ed,o){dom=ed.dom;each(grep(o.node.getElementsByTagName('span')).reverse(),function(n){var v,bg;if(o.get){if(dom.hasClass(n,'Apple-style-span')){bg=n.style.backgroundColor;switch(dom.getAttrib(n,'mce_name')){case'font':if(!ed.settings.convert_fonts_to_spans)dom.setAttrib(n,'style','');break;case'strong':case'em':case'sub':case'sup':dom.setAttrib(n,'style','');break;case'strike':case'u':if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');else dom.setAttrib(n,'mce_name','');break;default:if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');}if(bg)n.style.backgroundColor=bg;}}if(dom.hasClass(n,'mceItemRemoved'))dom.remove(n,1);});});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<br \/><\/(h[1-6]|div|p|address|pre)>/g,'</$1>');o.content=o.content.replace(/ id=\"undefined\"/g,'');});},_fixWebKitSpans:function(){var t=this,ed=t.editor;if(!isOldWebKit){Event.add(ed.getDoc(),'DOMNodeInserted',function(e){e=e.target;if(e&&e.nodeType==1)t._fixAppleSpan(e);});}else{ed.onExecCommand.add(function(){each(ed.dom.select('span'),function(n){t._fixAppleSpan(n);});ed.nodeChanged();});}},_fixAppleSpan:function(e){var ed=this.editor,dom=ed.dom,fz=this.webKitFontSizes,fzn=this.namedFontSizes,s=ed.settings,st,p;if(dom.getAttrib(e,'mce_fixed'))return;if(e.nodeName=='SPAN'&&e.className=='Apple-style-span'){st=e.style;if(!s.convert_fonts_to_spans){if(st.fontSize){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'size',inArray(fz,st.fontSize)+1);}if(st.fontFamily){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'face',st.fontFamily);}if(st.color){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'color',dom.toHex(st.color));}if(st.backgroundColor){dom.setAttrib(e,'mce_name','font');dom.setStyle(e,'background-color',st.backgroundColor);}}else{if(st.fontSize)dom.setStyle(e,'fontSize',fzn[inArray(fz,st.fontSize)]);}if(st.fontWeight=='bold')dom.setAttrib(e,'mce_name','strong');if(st.fontStyle=='italic')dom.setAttrib(e,'mce_name','em');if(st.textDecoration=='underline')dom.setAttrib(e,'mce_name','u');if(st.textDecoration=='line-through')dom.setAttrib(e,'mce_name','strike');if(st.verticalAlign=='super')dom.setAttrib(e,'mce_name','sup');if(st.verticalAlign=='sub')dom.setAttrib(e,'mce_name','sub');dom.setAttrib(e,'mce_fixed','1');}},_patchSafari2x:function(ed){var t=this,setContent,getNode,dom=ed.dom,lr;if(ed.windowManager.onBeforeOpen){ed.windowManager.onBeforeOpen.add(function(){r=ed.selection.getRng();});}ed.selection.select=function(n){this.getSel().setBaseAndExtent(n,0,n,1);};getNode=ed.selection.getNode;ed.selection.getNode=function(){return t.selElm||getNode.call(this);};ed.selection.getRng=function(){var t=this,s=t.getSel(),d=ed.getDoc(),r,rb,ra,di;if(s.anchorNode){r=d.createRange();try{rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(1);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(1);di=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;r.setStart(di?s.anchorNode:s.focusNode,di?s.anchorOffset:s.focusOffset);r.setEnd(di?s.focusNode:s.anchorNode,di?s.focusOffset:s.anchorOffset);lr=r;}catch(ex){}}return r||lr;};setContent=ed.selection.setContent;ed.selection.setContent=function(h,s){var r=this.getRng(),b;try{setContent.call(this,h,s);}catch(ex){b=dom.create('body');b.innerHTML=h;each(b.childNodes,function(n){r.insertNode(n.cloneNode(true));});}};},_insertBR:function(ed){var dom=ed.dom,s=ed.selection,r=s.getRng(),br;r.insertNode(br=dom.create('br'));r.setStartAfter(br);r.setEndAfter(br);s.setRng(r);if(s.getSel().focusNode==br.previousSibling){s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'),br));s.collapse(1);}ed.getWin().scrollTo(0,dom.getPos(s.getRng().startContainer).y);}});tinymce.PluginManager.add('safari',tinymce.plugins.Safari);})();
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php new file mode 100644 index 0000000..00c9f9f --- /dev/null +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php @@ -0,0 +1,158 @@ +<?php +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. + */ + +class GoogleSpell extends SpellChecker { + /** + * Spellchecks an array of words. + * + * @param {String} $lang Language code like sv or en. + * @param {Array} $words Array of words to spellcheck. + * @return {Array} Array of misspelled words. + */ + function &checkWords($lang, $words) { + $wordstr = implode(' ', $words); + $matches = $this->_getMatches($lang, $wordstr); + $words = array(); + + for ($i=0; $i<count($matches); $i++) + $words[] = $this->_unhtmlentities(mb_substr($wordstr, $matches[$i][1], $matches[$i][2], "UTF-8")); + + return $words; + } + + /** + * Returns suggestions of for a specific word. + * + * @param {String} $lang Language code like sv or en. + * @param {String} $word Specific word to get suggestions for. + * @return {Array} Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + $sug = array(); + $osug = array(); + $matches = $this->_getMatches($lang, $word); + + if (count($matches) > 0) + $sug = explode("\t", utf8_encode($this->_unhtmlentities($matches[0][4]))); + + // Remove empty + foreach ($sug as $item) { + if ($item) + $osug[] = $item; + } + + return $osug; + } + + function &_getMatches($lang, $str) { + $server = "www.google.com"; + $port = 443; + $path = "/tbproxy/spell?lang=" . $lang . "&hl=en"; + $host = "www.google.com"; + $url = "https://" . $server; + + // Setup XML request + $xml = '<?xml version="1.0" encoding="utf-8" ?><spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"><text>' . $str . '</text></spellrequest>'; + + $header = "POST ".$path." HTTP/1.0 \r\n"; + $header .= "MIME-Version: 1.0 \r\n"; + $header .= "Content-type: application/PTI26 \r\n"; + $header .= "Content-length: ".strlen($xml)." \r\n"; + $header .= "Content-transfer-encoding: text \r\n"; + $header .= "Request-number: 1 \r\n"; + $header .= "Document-type: Request \r\n"; + $header .= "Interface-Version: Test 1.4 \r\n"; + $header .= "Connection: close \r\n\r\n"; + $header .= $xml; + + // Use curl if it exists + if (function_exists('curl_init')) { + // Use curl + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL,$url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + $xml = curl_exec($ch); + curl_close($ch); + } else { + // Use raw sockets + $fp = fsockopen("ssl://" . $server, $port, $errno, $errstr, 30); + if ($fp) { + // Send request + fwrite($fp, $header); + + // Read response + $xml = ""; + while (!feof($fp)) + $xml .= fgets($fp, 128); + + fclose($fp); + } else + echo "Could not open SSL connection to google."; + } + + // Grab and parse content + $matches = array(); + preg_match_all('/<c o="([^"]*)" l="([^"]*)" s="([^"]*)">([^<]*)<\/c>/', $xml, $matches, PREG_SET_ORDER); + + return $matches; + } + + function _unhtmlentities($string) { + $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string); + $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string); + + $trans_tbl = get_html_translation_table(HTML_ENTITIES); + $trans_tbl = array_flip($trans_tbl); + + return strtr($string, $trans_tbl); + } +} + +// Patch in multibyte support +if (!function_exists('mb_substr')) { + function mb_substr($str, $start, $len = '', $encoding="UTF-8"){ + $limit = strlen($str); + + for ($s = 0; $start > 0;--$start) {// found the real start + if ($s >= $limit) + break; + + if ($str[$s] <= "\x7F") + ++$s; + else { + ++$s; // skip length + + while ($str[$s] >= "\x80" && $str[$s] <= "\xBF") + ++$s; + } + } + + if ($len == '') + return substr($str, $s); + else + for ($e = $s; $len > 0; --$len) {//found the real end + if ($e >= $limit) + break; + + if ($str[$e] <= "\x7F") + ++$e; + else { + ++$e;//skip length + + while ($str[$e] >= "\x80" && $str[$e] <= "\xBF" && $e < $limit) + ++$e; + } + } + + return substr($str, $s, $e - $s); + } +} + +?>
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php deleted file mode 100755 index cae27f0..0000000 --- a/wp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php +++ /dev/null @@ -1,339 +0,0 @@ -<?php - -/* Version 0.9, 6th April 2003 - Simon Willison ( http://simon.incutio.com/ ) - Manual: http://scripts.incutio.com/httpclient/ -*/ - -class HttpClient { - // Request vars - var $host; - var $port; - var $path; - var $method; - var $postdata = ''; - var $cookies = array(); - var $referer; - var $accept = 'text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,image/jpeg,image/gif,*/*'; - var $accept_encoding = 'gzip'; - var $accept_language = 'en-us'; - var $user_agent = 'Incutio HttpClient v0.9'; - // Options - var $timeout = 20; - var $use_gzip = true; - var $persist_cookies = true; // If true, received cookies are placed in the $this->cookies array ready for the next request - // Note: This currently ignores the cookie path (and time) completely. Time is not important, - // but path could possibly lead to security problems. - var $persist_referers = true; // For each request, sends path of last request as referer - var $debug = false; - var $handle_redirects = true; // Auaomtically redirect if Location or URI header is found - var $max_redirects = 5; - var $headers_only = false; // If true, stops receiving once headers have been read. - // Basic authorization variables - var $username; - var $password; - // Response vars - var $status; - var $headers = array(); - var $content = ''; - var $errormsg; - // Tracker variables - var $redirect_count = 0; - var $cookie_host = ''; - function HttpClient($host, $port=80) { - $this->host = $host; - $this->port = $port; - } - function get($path, $data = false) { - $this->path = $path; - $this->method = 'GET'; - if ($data) { - $this->path .= '?'.$this->buildQueryString($data); - } - return $this->doRequest(); - } - function post($path, $data) { - $this->path = $path; - $this->method = 'POST'; - $this->postdata = $this->buildQueryString($data); - return $this->doRequest(); - } - function buildQueryString($data) { - $querystring = ''; - if (is_array($data)) { - // Change data in to postable data - foreach ($data as $key => $val) { - if (is_array($val)) { - foreach ($val as $val2) { - $querystring .= urlencode($key).'='.urlencode($val2).'&'; - } - } else { - $querystring .= urlencode($key).'='.urlencode($val).'&'; - } - } - $querystring = substr($querystring, 0, -1); // Eliminate unnecessary & - } else { - $querystring = $data; - } - return $querystring; - } - function doRequest() { - // Performs the actual HTTP request, returning true or false depending on outcome - if (!$fp = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout)) { - // Set error message - switch($errno) { - case -3: - $this->errormsg = 'Socket creation failed (-3)'; - case -4: - $this->errormsg = 'DNS lookup failure (-4)'; - case -5: - $this->errormsg = 'Connection refused or timed out (-5)'; - default: - $this->errormsg = 'Connection failed ('.$errno.')'; - $this->errormsg .= ' '.$errstr; - $this->debug($this->errormsg); - } - return false; - } - socket_set_timeout($fp, $this->timeout); - $request = $this->buildRequest(); - $this->debug('Request', $request); - fwrite($fp, $request); - // Reset all the variables that should not persist between requests - $this->headers = array(); - $this->content = ''; - $this->errormsg = ''; - // Set a couple of flags - $inHeaders = true; - $atStart = true; - // Now start reading back the response - while (!feof($fp)) { - $line = fgets($fp, 4096); - if ($atStart) { - // Deal with first line of returned data - $atStart = false; - if (!preg_match('/HTTP\/(\\d\\.\\d)\\s*(\\d+)\\s*(.*)/', $line, $m)) { - $this->errormsg = "Status code line invalid: ".htmlentities($line); - $this->debug($this->errormsg); - return false; - } - $http_version = $m[1]; // not used - $this->status = $m[2]; - $status_string = $m[3]; // not used - $this->debug(trim($line)); - continue; - } - if ($inHeaders) { - if (trim($line) == '') { - $inHeaders = false; - $this->debug('Received Headers', $this->headers); - if ($this->headers_only) { - break; // Skip the rest of the input - } - continue; - } - if (!preg_match('/([^:]+):\\s*(.*)/', $line, $m)) { - // Skip to the next header - continue; - } - $key = strtolower(trim($m[1])); - $val = trim($m[2]); - // Deal with the possibility of multiple headers of same name - if (isset($this->headers[$key])) { - if (is_array($this->headers[$key])) { - $this->headers[$key][] = $val; - } else { - $this->headers[$key] = array($this->headers[$key], $val); - } - } else { - $this->headers[$key] = $val; - } - continue; - } - // We're not in the headers, so append the line to the contents - $this->content .= $line; - } - fclose($fp); - // If data is compressed, uncompress it - if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] == 'gzip') { - $this->debug('Content is gzip encoded, unzipping it'); - $this->content = substr($this->content, 10); // See http://www.php.net/manual/en/function.gzencode.php - $this->content = gzinflate($this->content); - } - // If $persist_cookies, deal with any cookies - if ($this->persist_cookies && isset($this->headers['set-cookie']) && $this->host == $this->cookie_host) { - $cookies = $this->headers['set-cookie']; - if (!is_array($cookies)) { - $cookies = array($cookies); - } - foreach ($cookies as $cookie) { - if (preg_match('/([^=]+)=([^;]+);/', $cookie, $m)) { - $this->cookies[$m[1]] = $m[2]; - } - } - // Record domain of cookies for security reasons - $this->cookie_host = $this->host; - } - // If $persist_referers, set the referer ready for the next request - if ($this->persist_referers) { - $this->debug('Persisting referer: '.$this->getRequestURL()); - $this->referer = $this->getRequestURL(); - } - // Finally, if handle_redirects and a redirect is sent, do that - if ($this->handle_redirects) { - if (++$this->redirect_count >= $this->max_redirects) { - $this->errormsg = 'Number of redirects exceeded maximum ('.$this->max_redirects.')'; - $this->debug($this->errormsg); - $this->redirect_count = 0; - return false; - } - $location = isset($this->headers['location']) ? $this->headers['location'] : ''; - $uri = isset($this->headers['uri']) ? $this->headers['uri'] : ''; - if ($location || $uri) { - $url = parse_url($location.$uri); - // This will FAIL if redirect is to a different site - return $this->get($url['path']); - } - } - return true; - } - function buildRequest() { - $headers = array(); - $headers[] = "{$this->method} {$this->path} HTTP/1.0"; // Using 1.1 leads to all manner of problems, such as "chunked" encoding - $headers[] = "Host: {$this->host}"; - $headers[] = "User-Agent: {$this->user_agent}"; - $headers[] = "Accept: {$this->accept}"; - if ($this->use_gzip) { - $headers[] = "Accept-encoding: {$this->accept_encoding}"; - } - $headers[] = "Accept-language: {$this->accept_language}"; - if ($this->referer) { - $headers[] = "Referer: {$this->referer}"; - } - // Cookies - if ($this->cookies) { - $cookie = 'Cookie: '; - foreach ($this->cookies as $key => $value) { - $cookie .= "$key=$value; "; - } - $headers[] = $cookie; - } - // Basic authentication - if ($this->username && $this->password) { - $headers[] = 'Authorization: BASIC '.base64_encode($this->username.':'.$this->password); - } - // If this is a POST, set the content type and length - if ($this->postdata) { - $headers[] = 'Content-Type: application/x-www-form-urlencoded'; - $headers[] = 'Content-Length: '.strlen($this->postdata); - } - $request = implode("\r\n", $headers)."\r\n\r\n".$this->postdata; - return $request; - } - function getStatus() { - return $this->status; - } - function getContent() { - return $this->content; - } - function getHeaders() { - return $this->headers; - } - function getHeader($header) { - $header = strtolower($header); - if (isset($this->headers[$header])) { - return $this->headers[$header]; - } else { - return false; - } - } - function getError() { - return $this->errormsg; - } - function getCookies() { - return $this->cookies; - } - function getRequestURL() { - $url = 'http://'.$this->host; - if ($this->port != 80) { - $url .= ':'.$this->port; - } - $url .= $this->path; - return $url; - } - // Setter methods - function setUserAgent($string) { - $this->user_agent = $string; - } - function setAuthorization($username, $password) { - $this->username = $username; - $this->password = $password; - } - function setCookies($array) { - $this->cookies = $array; - } - // Option setting methods - function useGzip($boolean) { - $this->use_gzip = $boolean; - } - function setPersistCookies($boolean) { - $this->persist_cookies = $boolean; - } - function setPersistReferers($boolean) { - $this->persist_referers = $boolean; - } - function setHandleRedirects($boolean) { - $this->handle_redirects = $boolean; - } - function setMaxRedirects($num) { - $this->max_redirects = $num; - } - function setHeadersOnly($boolean) { - $this->headers_only = $boolean; - } - function setDebug($boolean) { - $this->debug = $boolean; - } - // "Quick" static methods - function quickGet($url) { - $bits = parse_url($url); - $host = $bits['host']; - $port = isset($bits['port']) ? $bits['port'] : 80; - $path = isset($bits['path']) ? $bits['path'] : '/'; - if (isset($bits['query'])) { - $path .= '?'.$bits['query']; - } - $client = new HttpClient($host, $port); - if (!$client->get($path)) { - return false; - } else { - return $client->getContent(); - } - } - function quickPost($url, $data) { - $bits = parse_url($url); - $host = $bits['host']; - $port = isset($bits['port']) ? $bits['port'] : 80; - $path = isset($bits['path']) ? $bits['path'] : '/'; - $client = new HttpClient($host, $port); - if (!$client->post($path, $data)) { - return false; - } else { - return $client->getContent(); - } - } - function debug($msg, $object = false) { - if ($this->debug) { - print '<div style="border: 1px solid red; padding: 0.5em; margin: 0.5em;"><strong>HttpClient Debug:</strong> '.$msg; - if ($object) { - ob_start(); - print_r($object); - $content = htmlentities(ob_get_contents()); - ob_end_clean(); - print '<pre>'.$content.'</pre>'; - } - print '</div>'; - } - } -} - -?>
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php new file mode 100644 index 0000000..48af873 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php @@ -0,0 +1,81 @@ +<?php +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. + */ + +class PSpell extends SpellChecker { + /** + * Spellchecks an array of words. + * + * @param {String} $lang Language code like sv or en. + * @param {Array} $words Array of words to spellcheck. + * @return {Array} Array of misspelled words. + */ + function &checkWords($lang, $words) { + $plink = $this->_getPLink($lang); + + $outWords = array(); + foreach ($words as $word) { + if (!pspell_check($plink, trim($word))) + $outWords[] = utf8_encode($word); + } + + return $outWords; + } + + /** + * Returns suggestions of for a specific word. + * + * @param {String} $lang Language code like sv or en. + * @param {String} $word Specific word to get suggestions for. + * @return {Array} Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + $words = pspell_suggest($this->_getPLink($lang), $word); + + for ($i=0; $i<count($words); $i++) + $words[$i] = utf8_encode($words[$i]); + + return $words; + } + + /** + * Opens a link for pspell. + */ + function &_getPLink($lang) { + // Check for native PSpell support + if (!function_exists("pspell_new")) + $this->throwError("PSpell support not found in PHP installation."); + + // Setup PSpell link + $plink = pspell_new( + $lang, + $this->_config['PSpell.spelling'], + $this->_config['PSpell.jargon'], + $this->_config['PSpell.encoding'], + $this->_config['PSpell.mode'] + ); + + // Setup PSpell link +/* if (!$plink) { + $pspellConfig = pspell_config_create( + $lang, + $this->_config['PSpell.spelling'], + $this->_config['PSpell.jargon'], + $this->_config['PSpell.encoding'] + ); + + $plink = pspell_new_config($pspell_config); + }*/ + + if (!$plink) + $this->throwError("No PSpell link found opened."); + + return $plink; + } +} + +?> diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php new file mode 100644 index 0000000..779e837 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php @@ -0,0 +1,112 @@ +<?php +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. + */ + +class PSpellShell extends SpellChecker { + /** + * Spellchecks an array of words. + * + * @param {String} $lang Language code like sv or en. + * @param {Array} $words Array of words to spellcheck. + * @return {Array} Array of misspelled words. + */ + function &checkWords($lang, $words) { + $cmd = $this->_getCMD($lang); + + if ($fh = fopen($this->_tmpfile, "w")) { + fwrite($fh, "!\n"); + + foreach($words as $key => $value) + fwrite($fh, "^" . $value . "\n"); + + fclose($fh); + } else + $this->throwError("PSpell support was not found."); + + $data = shell_exec($cmd); + @unlink($this->_tmpfile); + + $returnData = array(); + $dataArr = preg_split("/[\r\n]/", $data, -1, PREG_SPLIT_NO_EMPTY); + + foreach ($dataArr as $dstr) { + $matches = array(); + + // Skip this line. + if (strpos($dstr, "@") === 0) + continue; + + preg_match("/\& ([^ ]+) .*/i", $dstr, $matches); + + if (!empty($matches[1])) + $returnData[] = utf8_encode(trim($matches[1])); + } + + return $returnData; + } + + /** + * Returns suggestions of for a specific word. + * + * @param {String} $lang Language code like sv or en. + * @param {String} $word Specific word to get suggestions for. + * @return {Array} Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + $cmd = $this->_getCMD($lang); + + if (function_exists("mb_convert_encoding")) + $word = mb_convert_encoding($word, "ISO-8859-1", mb_detect_encoding($word, "UTF-8")); + else + $word = utf8_encode($word); + + if ($fh = fopen($this->_tmpfile, "w")) { + fwrite($fh, "!\n"); + fwrite($fh, "^$word\n"); + fclose($fh); + } else + $this->throwError("Error opening tmp file."); + + $data = shell_exec($cmd); + @unlink($this->_tmpfile); + + $returnData = array(); + $dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY); + + foreach($dataArr as $dstr) { + $matches = array(); + + // Skip this line. + if (strpos($dstr, "@") === 0) + continue; + + preg_match("/\&[^:]+:(.*)/i", $dstr, $matches); + + if (!empty($matches[1])) { + $words = array_slice(explode(',', $matches[1]), 0, 10); + + for ($i=0; $i<count($words); $i++) + $words[$i] = trim($words[$i]); + + return $words; + } + } + + return array(); + } + + function _getCMD($lang) { + $this->_tmpfile = tempnam($this->_config['PSpellShell.tmp'], "tinyspell"); + + if(preg_match("#win#i", php_uname())) + return $this->_config['PSpellShell.aspell'] . " -a --lang=". $lang . " --encoding=utf-8 -H < " . $this->_tmpfile . " 2>&1"; + + return "cat ". $this->_tmpfile ." | " . $this->_config['PSpellShell.aspell'] . " -a --encoding=utf-8 -H --lang=". $lang; + } +} + +?> diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php new file mode 100644 index 0000000..ca7b143 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php @@ -0,0 +1,61 @@ +<?php +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. + */ + +class SpellChecker { + /** + * Constructor. + * + * @param $config Configuration name/value array. + */ + function SpellChecker(&$config) { + $this->_config = $config; + } + + /** + * Simple loopback function everything that gets in will be send back. + * + * @param $args.. Arguments. + * @return {Array} Array of all input arguments. + */ + function &loopback(/* args.. */) { + return func_get_args(); + } + + /** + * Spellchecks an array of words. + * + * @param {String} $lang Language code like sv or en. + * @param {Array} $words Array of words to spellcheck. + * @return {Array} Array of misspelled words. + */ + function &checkWords($lang, $words) { + return $words; + } + + /** + * Returns suggestions of for a specific word. + * + * @param {String} $lang Language code like sv or en. + * @param {String} $word Specific word to get suggestions for. + * @return {Array} Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + return array(); + } + + /** + * Throws an error message back to the user. This will stop all execution. + * + * @param {String} $str Message to send back to user. + */ + function throwError($str) { + die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); + } +} + +?> diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php deleted file mode 100755 index 0127ff1..0000000 --- a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php
-/* *
- * Tiny Spelling Interface for TinyMCE Spell Checking.
- *
- * Copyright © 2006 Moxiecode Systems AB
- */
-
-class TinyGoogleSpell {
- var $lang;
-
- function TinyGoogleSpell(&$config, $lang, $mode, $spelling, $jargon, $encoding) {
- $this->lang = $lang;
- }
-
- // Returns array with bad words or false if failed.
- function checkWords($word_array) {
- $words = array();
- $wordstr = implode(' ', $word_array);
-
- $matches = $this->_getMatches($wordstr);
-
- for ($i=0; $i<count($matches); $i++)
- $words[] = $this->unhtmlentities(mb_substr($wordstr, $matches[$i][1], $matches[$i][2], "UTF-8"));
-
- return $words;
- }
-
- function unhtmlentities($string) {
- $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
- $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
-
- $trans_tbl = get_html_translation_table(HTML_ENTITIES);
- $trans_tbl = array_flip($trans_tbl);
-
- return strtr($string, $trans_tbl);
- }
-
- // Returns array with suggestions or false if failed.
- function getSuggestion($word) {
- $sug = array();
-
- $matches = $this->_getMatches($word);
-
- if (count($matches) > 0)
- $sug = explode("\t", utf8_encode($this->unhtmlentities($matches[0][4])));
-
- return $sug;
- }
-
- function _xmlChars($string) {
- $trans = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES);
-
- foreach ($trans as $k => $v)
- $trans[$k] = "&#".ord($k).";";
-
- return strtr($string, $trans);
- }
-
- function _getMatches($word_list) {
- $server = "www.google.com";
- $port = 443;
- $path = "/tbproxy/spell?lang=" . $this->lang . "&hl=en";
- $host = "www.google.com";
- $url = "https://" . $server;
-
- // Setup XML request
- $xml = '<?xml version="1.0" encoding="utf-8" ?><spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"><text>' . $word_list . '</text></spellrequest>';
-
- $header = "POST ".$path." HTTP/1.0 \r\n";
- $header .= "MIME-Version: 1.0 \r\n";
- $header .= "Content-type: application/PTI26 \r\n";
- $header .= "Content-length: ".strlen($xml)." \r\n";
- $header .= "Content-transfer-encoding: text \r\n";
- $header .= "Request-number: 1 \r\n";
- $header .= "Document-type: Request \r\n";
- $header .= "Interface-Version: Test 1.4 \r\n";
- $header .= "Connection: close \r\n\r\n";
- $header .= $xml;
- //$this->_debugData($xml);
-
- // Use curl if it exists
- if (function_exists('curl_init')) {
- // Use curl
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,$url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- $xml = curl_exec($ch);
- curl_close($ch);
- } else {
- // Use raw sockets
- $fp = fsockopen("ssl://" . $server, $port, $errno, $errstr, 30);
- if ($fp) {
- // Send request
- fwrite($fp, $header);
-
- // Read response
- $xml = "";
- while (!feof($fp))
- $xml .= fgets($fp, 128);
-
- fclose($fp);
- } else
- echo "Could not open SSL connection to google.";
- }
-
- //$this->_debugData($xml);
-
- // Grab and parse content
- preg_match_all('/<c o="([^"]*)" l="([^"]*)" s="([^"]*)">([^<]*)<\/c>/', $xml, $matches, PREG_SET_ORDER);
-
- return $matches;
- }
-
- function _debugData($data) {
- $fh = @fopen("debug.log", 'a+');
- @fwrite($fh, $data);
- @fclose($fh);
- }
-}
-
-// Setup classname, should be the same as the name of the spellchecker class
-$spellCheckerConfig['class'] = "TinyGoogleSpell";
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php deleted file mode 100755 index 21fb194..0000000 --- a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php
-/* *
- * Tiny Spelling Interface for TinyMCE Spell Checking.
- *
- * Copyright © 2006 Moxiecode Systems AB
- *
- */
-
-class TinyPSpell {
- var $lang;
- var $mode;
- var $string;
- var $plink;
- var $errorMsg;
-
- var $jargon;
- var $spelling;
- var $encoding;
-
- function TinyPSpell(&$config, $lang, $mode, $spelling, $jargon, $encoding) {
- $this->lang = $lang;
- $this->mode = $mode;
- $this->plink = false;
- $this->errorMsg = array();
-
- if (!function_exists("pspell_new")) {
- $this->errorMsg[] = "PSpell not found.";
- return;
- }
-
- $this->plink = pspell_new($this->lang, $this->spelling, $this->jargon, $this->encoding, $this->mode);
- }
-
- // Returns array with bad words or false if failed.
- function checkWords($wordArray) {
- if (!$this->plink) {
- $this->errorMsg[] = "No PSpell link found for checkWords.";
- return array();
- }
-
- $wordError = array();
- foreach($wordArray as $word) {
- if(!pspell_check($this->plink, trim($word)))
- $wordError[] = $word;
- }
-
- return $wordError;
- }
-
- // Returns array with suggestions or false if failed.
- function getSuggestion($word) {
- if (!$this->plink) {
- $this->errorMsg[] = "No PSpell link found for getSuggestion.";
- return array();
- }
-
- return pspell_suggest($this->plink, $word);
- }
-}
-
-// Setup classname, should be the same as the name of the spellchecker class
-$spellCheckerConfig['class'] = "TinyPspell";
-
-?>
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php deleted file mode 100755 index 5723d2f..0000000 --- a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php
-/* *
- * Tiny Spelling Interface for TinyMCE Spell Checking.
- *
- * Copyright © 2006 Moxiecode Systems AB
- *
- */
-
-
-class TinyPspellShell {
- var $lang;
- var $mode;
- var $string;
- var $error;
- var $errorMsg;
-
- var $cmd;
- var $tmpfile;
-
- var $jargon;
- var $spelling;
- var $encoding;
-
- function TinyPspellShell(&$config, $lang, $mode, $spelling, $jargon, $encoding) {
- $this->lang = $lang;
- $this->mode = $mode;
- $this->error = false;
- $this->errorMsg = array();
-
- $this->tmpfile = tempnam($config['tinypspellshell.tmp'], "tinyspell");
-
- if(preg_match("#win#i",php_uname()))
- $this->cmd = $config['tinypspellshell.aspell'] . " -a --lang=". $this->lang." --encoding=utf-8 -H < $this->tmpfile 2>&1";
- else
- $this->cmd = "cat ". $this->tmpfile ." | " . $config['tinypspellshell.aspell'] . " -a --encoding=utf-8 -H --lang=". $this->lang;
- }
-
- // Returns array with bad words or false if failed.
- function checkWords($wordArray) {
- if ($fh = fopen($this->tmpfile, "w")) {
- fwrite($fh, "!\n");
- foreach($wordArray as $key => $value)
- fwrite($fh, "^" . $value . "\n");
- fclose($fh);
- } else {
- $this->errorMsg[] = "PSpell not found.";
- return array();
- }
-
- $data = shell_exec($this->cmd);
- @unlink($this->tmpfile);
-
- $returnData = array();
- $dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
-
- foreach($dataArr as $dstr) {
- $matches = array();
-
- // Skip this line.
- if (strpos($dstr, "@") === 0)
- continue;
-
- preg_match("/\& (.*) .* .*: .*/i", $dstr, $matches);
-
- if (!empty($matches[1]))
- $returnData[] = $matches[1];
- }
-
- return $returnData;
- }
-
- // Returns array with suggestions or false if failed.
- function getSuggestion($word) {
- if (function_exists("mb_convert_encoding"))
- $word = mb_convert_encoding($word, "ISO-8859-1", mb_detect_encoding($word, "UTF-8"));
- else
- $word = utf8_encode($word);
-
- if ($fh = fopen($this->tmpfile, "w")) {
- fwrite($fh, "!\n");
- fwrite($fh, "^$word\n");
- fclose($fh);
- } else
- die("Error opening tmp file.");
-
- $data = shell_exec($this->cmd);
-
- @unlink($this->tmpfile);
-
- $returnData = array();
- $dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
-
- foreach($dataArr as $dstr) {
- $matches = array();
-
- // Skip this line.
- if (strpos($dstr, "@") === 0)
- continue;
-
- preg_match("/\& .* .* .*: (.*)/i", $dstr, $matches);
-
- if (!empty($matches[1])) {
- // For some reason, the exec version seems to add commas?
- $returnData[] = str_replace(",", "", $matches[1]);
- }
- }
- return $returnData;
- }
-
- function _debugData($data) {
- $fh = @fopen("debug.log", 'a+');
- @fwrite($fh, $data);
- @fclose($fh);
- }
-
-}
-
-// Setup classname, should be the same as the name of the spellchecker class
-$spellCheckerConfig['class'] = "TinyPspellShell";
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php new file mode 100644 index 0000000..1c46116 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php @@ -0,0 +1,595 @@ +<?php +/** + * $Id: JSON.php 40 2007-06-18 11:43:15Z spocke $ + * + * @package MCManager.utils + * @author Moxiecode + * @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved. + */ + +define('JSON_BOOL', 1); +define('JSON_INT', 2); +define('JSON_STR', 3); +define('JSON_FLOAT', 4); +define('JSON_NULL', 5); +define('JSON_START_OBJ', 6); +define('JSON_END_OBJ', 7); +define('JSON_START_ARRAY', 8); +define('JSON_END_ARRAY', 9); +define('JSON_KEY', 10); +define('JSON_SKIP', 11); + +define('JSON_IN_ARRAY', 30); +define('JSON_IN_OBJECT', 40); +define('JSON_IN_BETWEEN', 50); + +class Moxiecode_JSONReader { + var $_data, $_len, $_pos; + var $_value, $_token; + var $_location, $_lastLocations; + var $_needProp; + + function Moxiecode_JSONReader($data) { + $this->_data = $data; + $this->_len = strlen($data); + $this->_pos = -1; + $this->_location = JSON_IN_BETWEEN; + $this->_lastLocations = array(); + $this->_needProp = false; + } + + function getToken() { + return $this->_token; + } + + function getLocation() { + return $this->_location; + } + + function getTokenName() { + switch ($this->_token) { + case JSON_BOOL: + return 'JSON_BOOL'; + + case JSON_INT: + return 'JSON_INT'; + + case JSON_STR: + return 'JSON_STR'; + + case JSON_FLOAT: + return 'JSON_FLOAT'; + + case JSON_NULL: + return 'JSON_NULL'; + + case JSON_START_OBJ: + return 'JSON_START_OBJ'; + + case JSON_END_OBJ: + return 'JSON_END_OBJ'; + + case JSON_START_ARRAY: + return 'JSON_START_ARRAY'; + + case JSON_END_ARRAY: + return 'JSON_END_ARRAY'; + + case JSON_KEY: + return 'JSON_KEY'; + } + + return 'UNKNOWN'; + } + + function getValue() { + return $this->_value; + } + + function readToken() { + $chr = $this->read(); + + if ($chr != null) { + switch ($chr) { + case '[': + $this->_lastLocation[] = $this->_location; + $this->_location = JSON_IN_ARRAY; + $this->_token = JSON_START_ARRAY; + $this->_value = null; + $this->readAway(); + return true; + + case ']': + $this->_location = array_pop($this->_lastLocation); + $this->_token = JSON_END_ARRAY; + $this->_value = null; + $this->readAway(); + + if ($this->_location == JSON_IN_OBJECT) + $this->_needProp = true; + + return true; + + case '{': + $this->_lastLocation[] = $this->_location; + $this->_location = JSON_IN_OBJECT; + $this->_needProp = true; + $this->_token = JSON_START_OBJ; + $this->_value = null; + $this->readAway(); + return true; + + case '}': + $this->_location = array_pop($this->_lastLocation); + $this->_token = JSON_END_OBJ; + $this->_value = null; + $this->readAway(); + + if ($this->_location == JSON_IN_OBJECT) + $this->_needProp = true; + + return true; + + // String + case '"': + case '\'': + return $this->_readString($chr); + + // Null + case 'n': + return $this->_readNull(); + + // Bool + case 't': + case 'f': + return $this->_readBool($chr); + + default: + // Is number + if (is_numeric($chr) || $chr == '-' || $chr == '.') + return $this->_readNumber($chr); + + return true; + } + } + + return false; + } + + function _readBool($chr) { + $this->_token = JSON_BOOL; + $this->_value = $chr == 't'; + + if ($chr == 't') + $this->skip(3); // rue + else + $this->skip(4); // alse + + $this->readAway(); + + if ($this->_location == JSON_IN_OBJECT && !$this->_needProp) + $this->_needProp = true; + + return true; + } + + function _readNull() { + $this->_token = JSON_NULL; + $this->_value = null; + + $this->skip(3); // ull + $this->readAway(); + + if ($this->_location == JSON_IN_OBJECT && !$this->_needProp) + $this->_needProp = true; + + return true; + } + + function _readString($quote) { + $output = ""; + $this->_token = JSON_STR; + $endString = false; + + while (($chr = $this->peek()) != -1) { + switch ($chr) { + case '\\': + // Read away slash + $this->read(); + + // Read escape code + $chr = $this->read(); + switch ($chr) { + case 't': + $output .= "\t"; + break; + + case 'b': + $output .= "\b"; + break; + + case 'f': + $output .= "\f"; + break; + + case 'r': + $output .= "\r"; + break; + + case 'n': + $output .= "\n"; + break; + + case 'u': + $output .= $this->_int2utf8(hexdec($this->read(4))); + break; + + default: + $output .= $chr; + break; + } + + break; + + case '\'': + case '"': + if ($chr == $quote) + $endString = true; + + $chr = $this->read(); + if ($chr != -1 && $chr != $quote) + $output .= $chr; + + break; + + default: + $output .= $this->read(); + } + + // String terminated + if ($endString) + break; + } + + $this->readAway(); + $this->_value = $output; + + // Needed a property + if ($this->_needProp) { + $this->_token = JSON_KEY; + $this->_needProp = false; + return true; + } + + if ($this->_location == JSON_IN_OBJECT && !$this->_needProp) + $this->_needProp = true; + + return true; + } + + function _int2utf8($int) { + $int = intval($int); + + switch ($int) { + case 0: + return chr(0); + + case ($int & 0x7F): + return chr($int); + + case ($int & 0x7FF): + return chr(0xC0 | (($int >> 6) & 0x1F)) . chr(0x80 | ($int & 0x3F)); + + case ($int & 0xFFFF): + return chr(0xE0 | (($int >> 12) & 0x0F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr (0x80 | ($int & 0x3F)); + + case ($int & 0x1FFFFF): + return chr(0xF0 | ($int >> 18)) . chr(0x80 | (($int >> 12) & 0x3F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr(0x80 | ($int & 0x3F)); + } + } + + function _readNumber($start) { + $value = ""; + $isFloat = false; + + $this->_token = JSON_INT; + $value .= $start; + + while (($chr = $this->peek()) != -1) { + if (is_numeric($chr) || $chr == '-' || $chr == '.') { + if ($chr == '.') + $isFloat = true; + + $value .= $this->read(); + } else + break; + } + + $this->readAway(); + + if ($isFloat) { + $this->_token = JSON_FLOAT; + $this->_value = floatval($value); + } else + $this->_value = intval($value); + + if ($this->_location == JSON_IN_OBJECT && !$this->_needProp) + $this->_needProp = true; + + return true; + } + + function readAway() { + while (($chr = $this->peek()) != null) { + if ($chr != ':' && $chr != ',' && $chr != ' ') + return; + + $this->read(); + } + } + + function read($len = 1) { + if ($this->_pos < $this->_len) { + if ($len > 1) { + $str = substr($this->_data, $this->_pos + 1, $len); + $this->_pos += $len; + + return $str; + } else + return $this->_data[++$this->_pos]; + } + + return null; + } + + function skip($len) { + $this->_pos += $len; + } + + function peek() { + if ($this->_pos < $this->_len) + return $this->_data[$this->_pos + 1]; + + return null; + } +} + +/** + * This class handles JSON stuff. + * + * @package MCManager.utils + */ +class Moxiecode_JSON { + function Moxiecode_JSON() { + } + + function decode($input) { + $reader = new Moxiecode_JSONReader($input); + + return $this->readValue($reader); + } + + function readValue(&$reader) { + $this->data = array(); + $this->parents = array(); + $this->cur =& $this->data; + $key = null; + $loc = JSON_IN_ARRAY; + + while ($reader->readToken()) { + switch ($reader->getToken()) { + case JSON_STR: + case JSON_INT: + case JSON_BOOL: + case JSON_FLOAT: + case JSON_NULL: + switch ($reader->getLocation()) { + case JSON_IN_OBJECT: + $this->cur[$key] = $reader->getValue(); + break; + + case JSON_IN_ARRAY: + $this->cur[] = $reader->getValue(); + break; + + default: + return $reader->getValue(); + } + break; + + case JSON_KEY: + $key = $reader->getValue(); + break; + + case JSON_START_OBJ: + case JSON_START_ARRAY: + if ($loc == JSON_IN_OBJECT) + $this->addArray($key); + else + $this->addArray(null); + + $cur =& $obj; + + $loc = $reader->getLocation(); + break; + + case JSON_END_OBJ: + case JSON_END_ARRAY: + $loc = $reader->getLocation(); + + if (count($this->parents) > 0) { + $this->cur =& $this->parents[count($this->parents) - 1]; + array_pop($this->parents); + } + break; + } + } + + return $this->data[0]; + } + + // This method was needed since PHP is crapy and doesn't have pointers/references + function addArray($key) { + $this->parents[] =& $this->cur; + $ar = array(); + + if ($key) + $this->cur[$key] =& $ar; + else + $this->cur[] =& $ar; + + $this->cur =& $ar; + } + + function getDelim($index, &$reader) { + switch ($reader->getLocation()) { + case JSON_IN_ARRAY: + case JSON_IN_OBJECT: + if ($index > 0) + return ","; + break; + } + + return ""; + } + + function encode($input) { + switch (gettype($input)) { + case 'boolean': + return $input ? 'true' : 'false'; + + case 'integer': + return (int) $input; + + case 'float': + case 'double': + return (float) $input; + + case 'NULL': + return 'null'; + + case 'string': + return $this->encodeString($input); + + case 'array': + return $this->_encodeArray($input); + + case 'object': + return $this->_encodeArray(get_object_vars($input)); + } + + return ''; + } + + function encodeString($input) { + // Needs to be escaped + if (preg_match('/[^a-zA-Z0-9]/', $input)) { + $output = ''; + + for ($i=0; $i<strlen($input); $i++) { + switch ($input[$i]) { + case "\b": + $output .= "\\b"; + break; + + case "\t": + $output .= "\\t"; + break; + + case "\f": + $output .= "\\f"; + break; + + case "\r": + $output .= "\\r"; + break; + + case "\n": + $output .= "\\n"; + break; + + case '\\': + $output .= "\\\\"; + break; + + case '\'': + $output .= "\\'"; + break; + + case '"': + $output .= '\"'; + break; + + default: + $byte = ord($input[$i]); + + if (($byte & 0xE0) == 0xC0) { + $char = pack('C*', $byte, ord($input[$i + 1])); + $i += 1; + $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char))); + } if (($byte & 0xF0) == 0xE0) { + $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2])); + $i += 2; + $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char))); + } if (($byte & 0xF8) == 0xF0) { + $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]))); + $i += 3; + $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char))); + } if (($byte & 0xFC) == 0xF8) { + $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]), ord($input[$i + 4]))); + $i += 4; + $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char))); + } if (($byte & 0xFE) == 0xFC) { + $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]), ord($input[$i + 4]), ord($input[$i + 5]))); + $i += 5; + $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char))); + } else if ($byte < 128) + $output .= $input[$i]; + } + } + + return '"' . $output . '"'; + } + + return '"' . $input . '"'; + } + + function _utf82utf16($utf8) { + if (function_exists('mb_convert_encoding')) + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + + switch (strlen($utf8)) { + case 1: + return $utf8; + + case 2: + return chr(0x07 & (ord($utf8[0]) >> 2)) . chr((0xC0 & (ord($utf8[0]) << 6)) | (0x3F & ord($utf8[1]))); + + case 3: + return chr((0xF0 & (ord($utf8[0]) << 4)) | (0x0F & (ord($utf8[1]) >> 2))) . chr((0xC0 & (ord($utf8[1]) << 6)) | (0x7F & ord($utf8[2]))); + } + + return ''; + } + + function _encodeArray($input) { + $output = ''; + $isIndexed = true; + + $keys = array_keys($input); + for ($i=0; $i<count($keys); $i++) { + if (!is_int($keys[$i])) { + $output .= $this->encodeString($keys[$i]) . ':' . $this->encode($input[$keys[$i]]); + $isIndexed = false; + } else + $output .= $this->encode($input[$keys[$i]]); + + if ($i != count($keys) - 1) + $output .= ','; + } + + return $isIndexed ? '[' . $output . ']' : '{' . $output . '}'; + } +} + +?> diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php new file mode 100644 index 0000000..a1fb4cd --- /dev/null +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php @@ -0,0 +1,268 @@ +<?php +/** + * $Id: Logger.class.php 10 2007-05-27 10:55:12Z spocke $ + * + * @package MCFileManager.filesystems + * @author Moxiecode + * @copyright Copyright © 2005, Moxiecode Systems AB, All rights reserved. + */ + +// File type contstants +define('MC_LOGGER_DEBUG', 0); +define('MC_LOGGER_INFO', 10); +define('MC_LOGGER_WARN', 20); +define('MC_LOGGER_ERROR', 30); +define('MC_LOGGER_FATAL', 40); + +/** + * Logging utility class. This class handles basic logging with levels, log rotation and custom log formats. It's + * designed to be compact but still powerful and flexible. + */ +class Moxiecode_Logger { + // Private fields + var $_path; + var $_filename; + var $_maxSize; + var $_maxFiles; + var $_maxSizeBytes; + var $_level; + var $_format; + + /** + * Constructs a new logger instance. + */ + function Moxiecode_Logger() { + $this->_path = ""; + $this->_filename = "{level}.log"; + $this->setMaxSize("100k"); + $this->_maxFiles = 10; + $this->_level = MC_LOGGER_DEBUG; + $this->_format = "[{time}] [{level}] {message}"; + } + + /** + * Sets the current log level, use the MC_LOGGER constants. + * + * @param int $level Log level instance for example MC_LOGGER_DEBUG. + */ + function setLevel($level) { + if (is_string($level)) { + switch (strtolower($level)) { + case "debug": + $level = MC_LOGGER_DEBUG; + break; + + case "info": + $level = MC_LOGGER_INFO; + break; + + case "warn": + case "warning": + $level = MC_LOGGER_WARN; + break; + + case "error": + $level = MC_LOGGER_ERROR; + break; + + case "fatal": + $level = MC_LOGGER_FATAL; + break; + + default: + $level = MC_LOGGER_FATAL; + } + } + + $this->_level = $level; + } + + /** + * Returns the current log level for example MC_LOGGER_DEBUG. + * + * @return int Current log level for example MC_LOGGER_DEBUG. + */ + function getLevel() { + return $this->_level; + } + + function setPath($path) { + $this->_path = $path; + } + + function getPath() { + return $this->_path; + } + + function setFileName($file_name) { + $this->_filename = $file_name; + } + + function getFileName() { + return $this->_filename; + } + + function setFormat($format) { + $this->_format = $format; + } + + function getFormat() { + return $this->_format; + } + + function setMaxSize($size) { + // Fix log max size + $logMaxSizeBytes = intval(preg_replace("/[^0-9]/", "", $size)); + + // Is KB + if (strpos((strtolower($size)), "k") > 0) + $logMaxSizeBytes *= 1024; + + // Is MB + if (strpos((strtolower($size)), "m") > 0) + $logMaxSizeBytes *= (1024 * 1024); + + $this->_maxSizeBytes = $logMaxSizeBytes; + $this->_maxSize = $size; + } + + function getMaxSize() { + return $this->_maxSize; + } + + function setMaxFiles($max_files) { + $this->_maxFiles = $max_files; + } + + function getMaxFiles() { + return $this->_maxFiles; + } + + function debug($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_DEBUG, implode(', ', $args)); + } + + function info($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_INFO, implode(', ', $args)); + } + + function warn($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_WARN, implode(', ', $args)); + } + + function error($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_ERROR, implode(', ', $args)); + } + + function fatal($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_FATAL, implode(', ', $args)); + } + + function isDebugEnabled() { + return $this->_level >= MC_LOGGER_DEBUG; + } + + function isInfoEnabled() { + return $this->_level >= MC_LOGGER_INFO; + } + + function isWarnEnabled() { + return $this->_level >= MC_LOGGER_WARN; + } + + function isErrorEnabled() { + return $this->_level >= MC_LOGGER_ERROR; + } + + function isFatalEnabled() { + return $this->_level >= MC_LOGGER_FATAL; + } + + function _logMsg($level, $message) { + $roll = false; + + if ($level < $this->_level) + return; + + $logFile = $this->toOSPath($this->_path . "/" . $this->_filename); + + switch ($level) { + case MC_LOGGER_DEBUG: + $levelName = "DEBUG"; + break; + + case MC_LOGGER_INFO: + $levelName = "INFO"; + break; + + case MC_LOGGER_WARN: + $levelName = "WARN"; + break; + + case MC_LOGGER_ERROR: + $levelName = "ERROR"; + break; + + case MC_LOGGER_FATAL: + $levelName = "FATAL"; + break; + } + + $logFile = str_replace('{level}', strtolower($levelName), $logFile); + + $text = $this->_format; + $text = str_replace('{time}', date("Y-m-d H:i:s"), $text); + $text = str_replace('{level}', strtolower($levelName), $text); + $text = str_replace('{message}', $message, $text); + $message = $text . "\r\n"; + + // Check filesize + if (file_exists($logFile)) { + $size = @filesize($logFile); + + if ($size + strlen($message) > $this->_maxSizeBytes) + $roll = true; + } + + // Roll if the size is right + if ($roll) { + for ($i=$this->_maxFiles-1; $i>=1; $i--) { + $rfile = $this->toOSPath($logFile . "." . $i); + $nfile = $this->toOSPath($logFile . "." . ($i+1)); + + if (@file_exists($rfile)) + @rename($rfile, $nfile); + } + + @rename($logFile, $this->toOSPath($logFile . ".1")); + + // Delete last logfile + $delfile = $this->toOSPath($logFile . "." . ($this->_maxFiles + 1)); + if (@file_exists($delfile)) + @unlink($delfile); + } + + // Append log line + if (($fp = @fopen($logFile, "a")) != null) { + @fputs($fp, $message); + @fflush($fp); + @fclose($fp); + } + } + + /** + * Converts a Unix path to OS specific path. + * + * @param String $path Unix path to convert. + */ + function toOSPath($path) { + return str_replace("/", DIRECTORY_SEPARATOR, $path); + } +} + +?>
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css b/wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css deleted file mode 100755 index f2c6ac7..0000000 --- a/wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css +++ /dev/null @@ -1,35 +0,0 @@ -.mceMsgBox {
- border: 1px solid gray;
- padding: 8px;
-}
-
-.mceMsgBox span {
- vertical-align: top;
- color: #555555;
-}
-
-/* Misc */
-
-.mceBlockBox {
- display: none;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 100;
- filter:progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=60);
- -moz-opacity:0.6;
- opacity: 0.6;
- background-color: white;
-}
-
-.mceMsgBox {
- display: none;
- z-index: 101;
- position: absolute;
- left: 0;
- top: 0;
- font-family: Arial, Verdana, Tahoma, Helvetica;
- font-weight: bold;
- font-size: 11px;
- background-color: #FFF;
-}
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/images/spellchecker.gif b/wp-includes/js/tinymce/plugins/spellchecker/images/spellchecker.gif Binary files differdeleted file mode 100755 index 294a9d2..0000000 --- a/wp-includes/js/tinymce/plugins/spellchecker/images/spellchecker.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/spellchecker/images/wline.gif b/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif Binary files differindex 7d0a4db..7d0a4db 100755..100644 --- a/wp-includes/js/tinymce/plugins/spellchecker/images/wline.gif +++ b/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif diff --git a/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php b/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php new file mode 100644 index 0000000..9a12145 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php @@ -0,0 +1,98 @@ +<?php +/** + * general.php + * + * @package MCManager.includes + * @author Moxiecode + * @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved. + */ + +@error_reporting(E_ALL ^ E_NOTICE); +$config = array(); + +require_once(dirname(__FILE__) . "/../classes/utils/Logger.php"); +require_once(dirname(__FILE__) . "/../classes/utils/JSON.php"); +require_once(dirname(__FILE__) . "/../config.php"); +require_once(dirname(__FILE__) . "/../classes/SpellChecker.php"); + +if (isset($config['general.engine'])) + require_once(dirname(__FILE__) . "/../classes/" . $config["general.engine"] . ".php"); + +/** + * Returns an request value by name without magic quoting. + * + * @param String $name Name of parameter to get. + * @param String $default_value Default value to return if value not found. + * @return String request value by name without magic quoting or default value. + */ +function getRequestParam($name, $default_value = false, $sanitize = false) { + if (!isset($_REQUEST[$name])) + return $default_value; + + if (is_array($_REQUEST[$name])) { + $newarray = array(); + + foreach ($_REQUEST[$name] as $name => $value) + $newarray[formatParam($name, $sanitize)] = formatParam($value, $sanitize); + + return $newarray; + } + + return formatParam($_REQUEST[$name], $sanitize); +} + +function &getLogger() { + global $mcLogger, $man; + + if (isset($man)) + $mcLogger = $man->getLogger(); + + if (!$mcLogger) { + $mcLogger = new Moxiecode_Logger(); + + // Set logger options + $mcLogger->setPath(dirname(__FILE__) . "/../logs"); + $mcLogger->setMaxSize("100kb"); + $mcLogger->setMaxFiles("10"); + $mcLogger->setFormat("{time} - {message}"); + } + + return $mcLogger; +} + +function debug($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->debug(implode(', ', $args)); +} + +function info($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->info(implode(', ', $args)); +} + +function error($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->error(implode(', ', $args)); +} + +function warn($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->warn(implode(', ', $args)); +} + +function fatal($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->fatal(implode(', ', $args)); +} + +?>
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/spellchecker/langs/en.js b/wp-includes/js/tinymce/plugins/spellchecker/langs/en.js deleted file mode 100755 index 02fdac5..0000000 --- a/wp-includes/js/tinymce/plugins/spellchecker/langs/en.js +++ /dev/null @@ -1,15 +0,0 @@ -// UK lang variables
-
-tinyMCE.addToLang('spellchecker',{
- desc : 'Toggle spellchecker',
- menu : 'Spellchecker settings',
- ignore_word : 'Ignore word',
- ignore_words : 'Ignore all',
- langs : 'Languages',
- wait : 'Please wait...',
- swait : 'Spellchecking, please wait...',
- sug : 'Suggestions',
- no_sug : 'No suggestions',
- no_mpell : 'No misspellings found.',
- mpell_found : 'Found {$words} misspellings.'
-});
diff --git a/wp-includes/js/tinymce/plugins/spellchecker/rpc.php b/wp-includes/js/tinymce/plugins/spellchecker/rpc.php new file mode 100644 index 0000000..d7b7436 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/spellchecker/rpc.php @@ -0,0 +1,75 @@ +<?php +/** + * $Id: rpc.php 354 2007-11-05 20:48:49Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. + */ + +require_once("./includes/general.php"); + +// Set RPC response headers +header('Content-Type: text/plain'); +header('Content-Encoding: UTF-8'); +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +$raw = ""; + +// Try param +if (isset($_POST["json_data"])) + $raw = getRequestParam("json_data"); + +// Try globals array +if (!$raw && isset($_GLOBALS) && isset($_GLOBALS["HTTP_RAW_POST_DATA"])) + $raw = $_GLOBALS["HTTP_RAW_POST_DATA"]; + +// Try globals variable +if (!$raw && isset($HTTP_RAW_POST_DATA)) + $raw = $HTTP_RAW_POST_DATA; + +// Try stream +if (!$raw) { + if (!function_exists('file_get_contents')) { + $fp = fopen("php://input", "r"); + if ($fp) { + $raw = ""; + + while (!feof($fp)) + $raw = fread($fp, 1024); + + fclose($fp); + } + } else + $raw = "" . file_get_contents("php://input"); +} + +// No input data +if (!$raw) + die('{"result":null,"id":null,"error":{"errstr":"Could not get raw post data.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); + +// Get JSON data +$json = new Moxiecode_JSON(); +$input = $json->decode($raw); + +// Execute RPC +if (isset($config['general.engine'])) { + $spellchecker = new $config['general.engine']($config); + $result = call_user_func_array(array($spellchecker, $input['method']), $input['params']); +} else + die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); + +// Request and response id should always be the same +$output = array( + "id" => $input->id, + "result" => $result, + "error" => null +); + +// Return JSON encoded string +echo $json->encode($output); + +?>
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php b/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php deleted file mode 100755 index 6b977c6..0000000 --- a/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php +++ /dev/null @@ -1,164 +0,0 @@ -<?php
-/**
- * $RCSfile: tinyspell.php,v $
- * $Revision: 1.1 $
- * $Date: 2006/03/14 17:33:47 $
- *
- * @author Moxiecode
- * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
- */
-
- // Ignore the Notice errors for now.
- error_reporting(E_ALL ^ E_NOTICE);
-
- require_once("config.php");
-
- $id = sanitize($_POST['id'], "loose");
-
- if (!$spellCheckerConfig['enabled']) {
- header('Content-type: text/xml; charset=utf-8');
- echo '<?xml version="1.0" encoding="utf-8" ?><res id="' . $id . '" error="true" msg="You must enable the spellchecker by modifying the config.php file." />';
- die;
- }
-
- // Basic config
- $defaultLanguage = $spellCheckerConfig['default.language'];
- $defaultMode = $spellCheckerConfig['default.mode'];
-
- // Normaly not required to configure
- $defaultSpelling = $spellCheckerConfig['default.spelling'];
- $defaultJargon = $spellCheckerConfig['default.jargon'];
- $defaultEncoding = $spellCheckerConfig['default.encoding'];
- $outputType = "xml"; // Do not change
-
- // Get input parameters.
-
- $check = urldecode(getRequestParam('check'));
- $cmd = sanitize(getRequestParam('cmd'));
- $lang = sanitize(getRequestParam('lang'), "strict");
- $mode = sanitize(getRequestParam('mode'), "strict");
- $spelling = sanitize(getRequestParam('spelling'), "strict");
- $jargon = sanitize(getRequestParam('jargon'), "strict");
- $encoding = sanitize(getRequestParam('encoding'), "strict");
- $sg = sanitize(getRequestParam('sg'), "bool");
- $words = array();
-
- $validRequest = true;
-
- if (empty($check))
- $validRequest = false;
-
- if (empty($lang))
- $lang = $defaultLanguage;
-
- if (empty($mode))
- $mode = $defaultMode;
-
- if (empty($spelling))
- $spelling = $defaultSpelling;
-
- if (empty($jargon))
- $jargon = $defaultJargon;
-
- if (empty($encoding))
- $encoding = $defaultEncoding;
-
- function sanitize($str, $type="strict") {
- switch ($type) {
- case "strict":
- $str = preg_replace("/[^a-zA-Z0-9_\-]/i", "", $str);
- break;
- case "loose":
- $str = preg_replace("/</i", ">", $str);
- $str = preg_replace("/>/i", "<", $str);
- break;
- case "bool":
- if ($str == "true" || $str == true)
- $str = true;
- else
- $str = false;
- break;
- }
-
- return $str;
- }
-
- function getRequestParam($name, $default_value = false) {
- if (!isset($_REQUEST[$name]))
- return $default_value;
-
- if (!isset($_GLOBALS['magic_quotes_gpc']))
- $_GLOBALS['magic_quotes_gpc'] = ini_get("magic_quotes_gpc");
-
- if (isset($_GLOBALS['magic_quotes_gpc'])) {
- if (is_array($_REQUEST[$name])) {
- $newarray = array();
-
- foreach($_REQUEST[$name] as $name => $value)
- $newarray[stripslashes($name)] = stripslashes($value);
-
- return $newarray;
- }
- return stripslashes($_REQUEST[$name]);
- }
-
- return $_REQUEST[$name];
- }
-
- $result = array();
- $tinyspell = new $spellCheckerConfig['class']($spellCheckerConfig, $lang, $mode, $spelling, $jargon, $encoding);
-
- if (count($tinyspell->errorMsg) == 0) {
- switch($cmd) {
- case "spell":
- // Space for non-exec version and \n for the exec version.
- $words = preg_split("/ |\n/", $check, -1, PREG_SPLIT_NO_EMPTY);
- $result = $tinyspell->checkWords($words);
- break;
-
- case "suggest":
- $result = $tinyspell->getSuggestion($check);
- break;
-
- default:
- // Just use this for now.
- $tinyspell->errorMsg[] = "No command.";
- $outputType = $outputType . "error";
- break;
- }
- } else
- $outputType = $outputType . "error";
-
- if (!$result)
- $result = array();
-
- // Output data
- switch($outputType) {
- case "xml":
- header('Content-type: text/xml; charset=utf-8');
- $body = '<?xml version="1.0" encoding="utf-8" ?>';
- $body .= "\n";
-
- if (count($result) == 0)
- $body .= '<res id="' . $id . '" cmd="'. $cmd .'" />';
- else
- $body .= '<res id="' . $id . '" cmd="'. $cmd .'">'. urlencode(implode(" ", $result)) .'</res>';
-
- echo $body;
- break;
- case "xmlerror";
- header('Content-type: text/xml; charset=utf-8');
- $body = '<?xml version="1.0" encoding="utf-8" ?>';
- $body .= "\n";
- $body .= '<res id="' . $id . '" cmd="'. $cmd .'" error="true" msg="'. implode(" ", $tinyspell->errorMsg) .'" />';
- echo $body;
- break;
- case "html":
- var_dump($result);
- break;
- case "htmlerror":
- echo "Error";
- break;
- }
-
-?>
diff --git a/wp-includes/js/tinymce/plugins/wordpress/css/content.css b/wp-includes/js/tinymce/plugins/wordpress/css/content.css new file mode 100644 index 0000000..a542e6e --- /dev/null +++ b/wp-includes/js/tinymce/plugins/wordpress/css/content.css @@ -0,0 +1,15 @@ + +.mceWPnextpage, .mceWPmore { + border: 0px; + border-top: 1px dotted #cccccc; + display: block; + width: 100%; + height: 12px; + margin-top: 15px; +} +.mceWPmore { + background: #ffffff url(../img/more_bug.gif) no-repeat right top; +} +.mceWPnextpage { + background: #ffffff url(../img/page_bug.gif) no-repeat right top; +}
\ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/help.gif b/wp-includes/js/tinymce/plugins/wordpress/img/help.gif Binary files differindex 51a1ee4..51a1ee4 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/images/help.gif +++ b/wp-includes/js/tinymce/plugins/wordpress/img/help.gif diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/more.gif b/wp-includes/js/tinymce/plugins/wordpress/img/more.gif Binary files differindex 4ff564d..4ff564d 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/images/more.gif +++ b/wp-includes/js/tinymce/plugins/wordpress/img/more.gif diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/more_bug.gif b/wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif Binary files differindex 4589cb4..4589cb4 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/images/more_bug.gif +++ b/wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/page.gif b/wp-includes/js/tinymce/plugins/wordpress/img/page.gif Binary files differindex 1cea78a..1cea78a 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/images/page.gif +++ b/wp-includes/js/tinymce/plugins/wordpress/img/page.gif diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/page_bug.gif b/wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif Binary files differindex 9ea3565..9ea3565 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/images/page_bug.gif +++ b/wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif diff --git a/wp-includes/js/tinymce/plugins/wordpress/images/toolbars.gif b/wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif Binary files differindex dcb7066..dcb7066 100755..100644 --- a/wp-includes/js/tinymce/plugins/wordpress/images/toolbars.gif +++ b/wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif b/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif Binary files differnew file mode 100644 index 0000000..3884865 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif diff --git a/wp-includes/js/tinymce/plugins/wordpress/langs/en.js b/wp-includes/js/tinymce/plugins/wordpress/langs/en.js deleted file mode 100644 index b431fb6..0000000 --- a/wp-includes/js/tinymce/plugins/wordpress/langs/en.js +++ /dev/null @@ -1,37 +0,0 @@ -// EN lang variables
-
-if (navigator.userAgent.indexOf('Mac OS') != -1) {
-// Mac OS browsers use Ctrl to hit accesskeys
- var metaKey = 'Ctrl';
-}
-else if (navigator.userAgent.indexOf('Firefox/2') != -1) {
-// Firefox 2.x uses Alt+Shift to hit accesskeys
- var metaKey = 'Alt+Shift';
-}
-else {
- var metaKey = 'Alt';
-}
-
-tinyMCE.addToLang('',{
-wordpress_more_button : 'Split post with More tag (' + metaKey + '+t)',
-wordpress_page_button : 'Split post with Page tag',
-wordpress_adv_button : 'Show/Hide Advanced Toolbar (' + metaKey + '+v)',
-wordpress_more_alt : 'More...',
-wordpress_page_alt : '...page...',
-help_button_title : 'Help (' + metaKey + '+h)',
-bold_desc : 'Bold (Ctrl+B)',
-italic_desc : 'Italic (Ctrl+I)',
-underline_desc : 'Underline (Ctrl+U)',
-link_desc : 'Insert/edit link (' + metaKey + '+a)',
-unlink_desc : 'Unlink (' + metaKey + '+s)',
-image_desc : 'Insert/edit image (' + metaKey + '+m)',
-striketrough_desc : 'Strikethrough (' + metaKey + '+k)',
-justifyleft_desc : 'Align left (' + metaKey + '+f)',
-justifycenter_desc : 'Align center (' + metaKey + '+c)',
-justifyright_desc : 'Align right (' + metaKey + '+r)',
-justifyfull_desc : 'Align full (' + metaKey + '+j)',
-bullist_desc : 'Unordered list (' + metaKey + '+l)',
-numlist_desc : 'Ordered list (' + metaKey + '+o)',
-outdent_desc : 'Outdent (' + metaKey + '+w)',
-indent_desc : 'Indent list/blockquote (' + metaKey + '+q)'
-});
diff --git a/wp-includes/js/tinymce/plugins/wordpress/wordpress.css b/wp-includes/js/tinymce/plugins/wordpress/wordpress.css deleted file mode 100644 index 00b454f..0000000 --- a/wp-includes/js/tinymce/plugins/wordpress/wordpress.css +++ /dev/null @@ -1,81 +0,0 @@ -.mce_plugin_wordpress_more {
- border: 0px;
- border-top: 1px dotted #cccccc;
- display:block;
- background-color: #ffffff;
- margin-top:15px;
- background-image: url(images/more_bug.gif);
- background-repeat: no-repeat;
- background-position: right top;
-}
-
-.mce_plugin_wordpress_page {
- border: 0px;
- border-top: 1px dotted #cccccc;
- display:block;
- background-color: #ffffff;
- margin-top:15px;
- background-image: url(images/page_bug.gif);
- background-repeat: no-repeat;
- background-position: right top;
-}
-
-/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
-/* You can extend this CSS by adding your own CSS file with the the content_css option */
-
-body {
- background: #fff;
- font: 1em/1.3em Georgia, "Times New Roman", Times, serif;
- padding: .5em;
-}
-
-td {
- font-size: 10px;
-}
-
-pre {
- font-family: "Courier New", fixed;
- font-size: 11px;
- line-height: 13px;
-}
-
-.mceVisualAid {
- border: 1px dashed #BBBBBB !important;
-}
-
-.mceItemAnchor {
- width: 12px;
- line-height: 6px;
- overflow: hidden;
- padding-left: 12px;
- background-position: bottom;
- background-repeat: no-repeat;
-}
-
-/* Important is needed in Gecko browsers inorder to style links */
-/*
-a {
- color: green !important;
-}
-*/
-
-/* Style selection range colors in Gecko browsers */
-/*
-::-moz-selection {
- background-color: red;
- color: green;
-}
-*/
-
-/* MSIE specific */
-
-* html body {
- scrollbar-3dlight-color: #F0F0EE;
- scrollbar-arrow-color: #676662;
- scrollbar-base-color: #F0F0EE;
- scrollbar-darkshadow-color: #DDDDDD;
- scrollbar-face-color: #E0E0DD;
- scrollbar-highlight-color: #F0F0EE;
- scrollbar-shadow-color: #F0F0EE;
- scrollbar-track-color: #F5F5F5;
-}
diff --git a/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js b/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js deleted file mode 100644 index 204e447..0000000 --- a/wp-includes/js/tinymce/plugins/wphelp/editor_plugin.js +++ /dev/null @@ -1,57 +0,0 @@ -/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('wphelp', '');
-
-function TinyMCE_wphelp_getControlHTML(control_name) {
- switch (control_name) {
- case "wphelp":
- var titleHelp = tinyMCE.getLang('lang_help_button_title');
- var buttons = '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceWordPressHelp\')" target="_self" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceWordPressHelp\');return false;"><img id="{$editor_id}_help" src="{$pluginurl}/images/help.gif" title="'+titleHelp+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
- var hiddenControls = '<div class="zerosize">'
- + '<input type="button" accesskey="b" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Bold\',false);" />'
- + '<input type="button" accesskey="i" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Italic\',false);" />'
- + '<input type="button" accesskey="d" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Strikethrough\',false);" />'
- + '<input type="button" accesskey="l" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertUnorderedList\',false);" />'
- + '<input type="button" accesskey="o" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertOrderedList\',false);" />'
- + '<input type="button" accesskey="w" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Outdent\',false);" />'
- + '<input type="button" accesskey="q" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Indent\',false);" />'
- + '<input type="button" accesskey="f" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyLeft\',false);" />'
- + '<input type="button" accesskey="c" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyCenter\',false);" />'
- + '<input type="button" accesskey="r" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyRight\',false);" />'
- + '<input type="button" accesskey="a" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceLink\',true);" />'
- + '<input type="button" accesskey="s" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'unlink\',false);" />'
- + '<input type="button" accesskey="m" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceImage\',true);" />'
- + '<input type="button" accesskey="t" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');" />'
- + '<input type="button" accesskey="u" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Undo\',false);" />'
- + '<input type="button" accesskey="y" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Redo\',false);" />'
- + '<input type="button" accesskey="e" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceCodeEditor\',false);" />'
- + '<input type="button" accesskey="h" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceWordPressHelp\',false);" />'
- + '</div>';
- return buttons+hiddenControls;
- }
-
- return "";
-}
-
-function TinyMCE_wphelp_execCommand(editor_id, element, command, user_interface, value) {
-
- // Handle commands
- switch (command) {
- case "mceWordPressHelp":
- var template = new Array();
-
- template['file'] = tinyMCE.baseURL + '/wp-mce-help.php';
- template['width'] = 480;
- template['height'] = 380;
-
- args = {
- resizable : 'yes',
- scrollbars : 'yes'
- };
-
- tinyMCE.openWindow(template, args);
- return true;
- }
-
- // Pass to next handler in chain
- return false;
-}
diff --git a/wp-includes/js/tinymce/plugins/wphelp/images/help.gif b/wp-includes/js/tinymce/plugins/wphelp/images/help.gif Binary files differdeleted file mode 100644 index 51a1ee4..0000000 --- a/wp-includes/js/tinymce/plugins/wphelp/images/help.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/plugins/wphelp/langs/en.js b/wp-includes/js/tinymce/plugins/wphelp/langs/en.js deleted file mode 100644 index b7b2aba..0000000 --- a/wp-includes/js/tinymce/plugins/wphelp/langs/en.js +++ /dev/null @@ -1,5 +0,0 @@ -// EN lang variables
-
-tinyMCE.addToLang('',{
-help_button_title : 'Help (Alt+h)'
-});
diff --git a/wp-includes/js/tinymce/themes/advanced/css/colorpicker.css b/wp-includes/js/tinymce/themes/advanced/css/colorpicker.css deleted file mode 100644 index 4b0360b..0000000 --- a/wp-includes/js/tinymce/themes/advanced/css/colorpicker.css +++ /dev/null @@ -1,53 +0,0 @@ -/* Colorpicker dialog specific CSS */
-
-#preview {
- float: right;
- width: 50px;
- height: 14px;
- line-height: 1px;
- border: 1px solid black;
- margin-left: 5px;
-}
-
-#colorpicker {
- float: left;
- cursor: crosshair;
-}
-
-#light {
- border: 1px solid gray;
- margin-left: 5px;
- float: left;
- width: 15px;
- cursor: crosshair;
-}
-
-#light div {
- overflow: hidden;
-}
-
-#previewblock {
- float: right;
- padding-left: 10px;
- height: 20px;
-}
-
-.panel_wrapper div.current {
- height: 175px;
-}
-
-#namedcolors {
- width: 150px;
-}
-
-#namedcolors a {
- display: block;
- float: left;
- width: 10px; height: 10px;
- margin: 1px 1px 0 0;
- overflow: hidden;
-}
-
-#colornamecontainer {
- margin-top: 5px;
-}
\ No newline at end of file diff --git a/wp-includes/js/tinymce/themes/advanced/css/editor_content.css b/wp-includes/js/tinymce/themes/advanced/css/editor_content.css deleted file mode 100644 index 182e791..0000000 --- a/wp-includes/js/tinymce/themes/advanced/css/editor_content.css +++ /dev/null @@ -1,58 +0,0 @@ -/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
-/* You can extend this CSS by adding your own CSS file with the the content_css option */
-
-body, td, pre {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 10px;
-}
-
-body {
- background-color: #FFFFFF;
-}
-
-.mceVisualAid {
- border: 1px dashed #BBBBBB !important;
-}
-
-div.mceVisualAid {
- background-image:url('../images/spacer.gif');
- visibility: visible !important;
-}
-
-.mceItemAnchor {
- width: 12px;
- line-height: 6px;
- overflow: hidden;
- padding-left: 12px;
- background-image: url('../images/anchor_symbol.gif');
- background-position: bottom;
- background-repeat: no-repeat;
-}
-
-/* Important is needed in Gecko browsers inorder to style links */
-/*
-a {
- color: green !important;
-}
-*/
-
-/* Style selection range colors in Gecko browsers */
-/*
-::-moz-selection {
- background-color: red;
- color: green;
-}
-*/
-
-/* MSIE specific */
-
-* html body {
- scrollbar-3dlight-color: #F0F0EE;
- scrollbar-arrow-color: #676662;
- scrollbar-base-color: #F0F0EE;
- scrollbar-darkshadow-color: #DDDDDD;
- scrollbar-face-color: #E0E0DD;
- scrollbar-highlight-color: #F0F0EE;
- scrollbar-shadow-color: #F0F0EE;
- scrollbar-track-color: #F5F5F5;
-}
diff --git a/wp-includes/js/tinymce/themes/advanced/css/editor_popup.css b/wp-includes/js/tinymce/themes/advanced/css/editor_popup.css deleted file mode 100644 index 079470c..0000000 --- a/wp-includes/js/tinymce/themes/advanced/css/editor_popup.css +++ /dev/null @@ -1,358 +0,0 @@ -/* This file contains the CSS data for all popups in TinyMCE */
-
-body {
- background-color: #F0F0EE;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- scrollbar-3dlight-color: #F0F0EE;
- scrollbar-arrow-color: #676662;
- scrollbar-base-color: #F0F0EE;
- scrollbar-darkshadow-color: #DDDDDD;
- scrollbar-face-color: #E0E0DD;
- scrollbar-highlight-color: #F0F0EE;
- scrollbar-shadow-color: #F0F0EE;
- scrollbar-track-color: #F5F5F5;
- margin: 8px;
-}
-
-td {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-input {
- background: #FFFFFF;
- border: 1px solid #cccccc;
-}
-
-td, input, select, textarea {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 10px;
-}
-
-input, select, textarea {
- border: 1px solid #808080;
-}
-
-.input_noborder {
- border: 0;
-}
-
-#insert, .updateButton {
- font-weight: bold;
- width: 90px;
- height: 21px;
- border: 0;
- background-image: url('../images/insert_button_bg.gif');
- cursor: pointer;
-}
-
-#cancel {
- font-weight: bold;
- width: 90px;
- height: 21px;
- border: 0;
- background-image: url('../images/cancel_button_bg.gif');
- cursor: pointer;
-}
-
-/* Mozilla only style */
-html>body #insert, html>body #cancel {
- padding-bottom: 2px;
-}
-
-.title {
- font-size: 12px;
- font-weight: bold;
- color: #2B6FB6;
-}
-
-table.charmap {
- border-style: solid;
- border-width: 1px;
- border-color: #AAAAAA;
-}
-
-td.charmap, td.charmapOver {
- color: #000000;
- border-color: #AAAAAA;
- border-style: solid;
- border-width: 1px;
- text-align: center;
- font-size: 12px;
-}
-
-td.charmapOver {
- background-color: #CCCCCC;
- cursor: default;
-}
-
-a.charmap {
- color: #000000;
- text-decoration: none
-}
-
-.wordWrapCode {
- vertical-align: middle;
- border: 1px none #000000;
- background-color: transparent;
-}
-
-input.radio {
- border: 1px none #000000;
- background-color: transparent;
- vertical-align: middle;
-}
-
-input.checkbox {
- border: 1px none #000000;
- background-color: transparent;
- vertical-align: middle;
-}
-
-.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
- margin-left: 1px;
-}
-
-.mceButtonNormal {
- border-top: 1px solid;
- border-left: 1px solid;
- border-bottom: 1px solid;
- border-right: 1px solid;
- border-color: #F0F0EE;
- cursor: default;
-}
-
-.mceButtonOver {
- border: 1px solid #0A246A;
- cursor: default;
- background-color: #B6BDD2;
-}
-
-.mceButtonDown {
- cursor: default;
- border: 1px solid #0A246A;
- background-color: #8592B5;
-}
-
-.mceButtonDisabled {
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
- -moz-opacity:0.3;
- opacity: 0.3;
- border-top: 1px solid;
- border-left: 1px solid;
- border-bottom: 1px solid;
- border-right: 1px solid;
- border-color: #F0F0EE;
- cursor: default;
-}
-
-.mceActionPanel {
- margin-top: 5px;
-}
-
-/* Tabs classes */
-
-.tabs {
- float: left;
- width: 100%;
- line-height: normal;
- background-image: url("../images/xp/tabs_bg.gif");
-}
-
-.tabs ul {
- margin: 0;
- padding: 0 0 0;
- list-style: none;
-}
-
-.tabs li {
- float: left;
- background: url("../images/xp/tab_bg.gif") no-repeat left top;
- margin: 0;
- margin-left: 0;
- margin-right: 2px;
- padding: 0 0 0 10px;
- line-height: 18px;
-}
-
-.tabs li.current {
- background: url("../images/xp/tab_sel_bg.gif") no-repeat left top;
- margin-right: 2px;
-}
-
-.tabs span {
- float: left;
- display: block;
- background: url("../images/xp/tab_end.gif") no-repeat right top;
- padding: 0px 10px 0 0;
-}
-
-.tabs .current span {
- background: url("../images/xp/tab_sel_end.gif") no-repeat right top;
-}
-
-.tabs a {
- text-decoration: none;
- font-family: Verdana, Arial;
- font-size: 10px;
-}
-
-.tabs a:link, .tabs a:visited, .tabs a:hover {
- color: black;
-}
-
-.tabs a:hover {
-}
-
-.tabs .current {
-}
-
-.tabs .current a, .tabs .current a:link, .tabs .current a:visited {
-}
-
-.panel_wrapper div.panel {
- display: none;
-}
-
-.panel_wrapper div.current {
- display: block;
- width: 100%;
- height: 300px;
- overflow: visible; /* Should be auto but that breaks Safari */
-}
-
-.panel_wrapper {
- border: 1px solid #919B9C;
- border-top: 0px;
- padding: 10px;
- padding-top: 5px;
- clear: both;
- background-color: white;
-}
-
-fieldset {
- border: 1px solid #919B9C;
- font-family: Verdana, Arial;
- font-size: 10px;
- padding: 0;
- margin: 0;
- padding: 4px;
-}
-
-legend {
- color: #2B6FB6;
- font-weight: bold;
-}
-
-.properties {
- width: 100%;
-}
-
-.properties .column1 {
-}
-
-.properties .column2 {
- text-align: left;
-}
-
-a:link, a:visited {
- color: black;
-}
-
-a:hover {
- color: #2B6FB6;
-}
-
-#plugintable thead {
- font-weight: bold;
- background-color: #DDDDDD;
-}
-
-#plugintable, #about #plugintable td {
- border: 1px solid #919B9C;
-}
-
-#plugintable {
- width: 99%;
- margin-top: 10px;
-}
-
-#pluginscontainer {
- height: 290px;
- overflow: auto;
-}
-
-/* MSIE Specific styles */
-
-* html .panel_wrapper {
- width: 100%;
-}
-
-.column {
- float: left;
-}
-
-h1, h2, h3, h4 {
- color: #2B6FB6;
- margin: 0;
- padding: 0;
- padding-top: 5px;
-}
-
-h3 {
- font-size: 14px;
-}
-
-#link .panel_wrapper, #link div.current {
- height: 125px;
-}
-
-#image .panel_wrapper, #image div.current {
- height: 190px;
-}
-
-label.msg { display: none; }
-label.invalid { color: #EE0000; display: inline; }
-input.invalid { border: 1px solid #EE0000; }
-
-/* Disables the advanced tab in the table plugin. */
-/*
-#table #advanced_tab {
- display: none;
-}
-*/
-
-/* Disables the border input field and label in the table plugin. */
-/*
-#table #border, #table #borderlabel {
- display: none;
-}
-*/
-
-/* Below this line is WordPress customizations */
-#insert, #cancel, .submitbutton {
- font: 11px Verdana, Arial, Helvetica, sans-serif;
- height: auto;
- width: auto;
- background-color: transparent;
- background-image: url(../../../../../../wp-admin/images/fade-butt.png);
- background-repeat: repeat;
- border: 3px double;
- border-right-color: rgb(153, 153, 153);
- border-bottom-color: rgb(153, 153, 153);
- border-left-color: rgb(204, 204, 204);
- border-top-color: rgb(204, 204, 204);
- color: rgb(51, 51, 51);
- padding: 0.1em 0.5em;
-}
-
-#insert:active, #cancel:active, .submitbutton:active {
- background: #f4f4f4;
- border-left-color: #999;
- border-top-color: #999;
-}
-
-#styleSelectRow {
- display: none;
-}
diff --git a/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css b/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css deleted file mode 100644 index 851837d..0000000 --- a/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css +++ /dev/null @@ -1,97 +0,0 @@ -/* This file contains the CSS data for the editor UI of TinyMCE instances */
-
-.mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {border: 0; margin: 0; padding: 0; background: transparent;}
-.mceSeparatorLine {border: 0; padding: 0; margin-left: 4px; margin-right: 2px;}
-.mceSelectList {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 7pt !important; font-weight: normal; margin-top: 3px; padding: 0; display: inline; vertical-align: top; background-color: #F0F0EE;}
-.mceLabel, .mceLabelDisabled {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt;}
-.mceLabel {color: #000000;}
-.mceLabelDisabled {cursor: text; color: #999999;}
-.mceEditor {background: #F0F0EE; border: 1px solid #cccccc; padding: 0; margin: 0;}
-.mceEditorArea { font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; background: #FFFFFF; padding: 0; margin: 0; }
-.mceToolbarTop, .mceToolbarBottom {background: #F0F0EE; line-height: 1px; font-size: 1px;}
-.mceToolbarTop {border-bottom: 1px solid #cccccc; padding-bottom: 1px;}
-.mceToolbarBottom {border-top: 1px solid #cccccc;}
-.mceToolbarContainer {display: block; position: relative; left: 0; top: 0; width: 100%;}
-.mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar {height: 20px;}
-.mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; padding: 2px; line-height: 16px; overflow: visible;}
-.mceStatusbarTop {border-bottom: 1px solid #cccccc;}
-.mceStatusbarBottom {border-top: 1px solid #cccccc;}
-.mceStatusbar {border-bottom: 1px solid #cccccc;}
-.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {text-decoration: none; font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; color: #000000;}
-.mcePathItem:hover {text-decoration: underline;}
-.mceStatusbarPathText {float: left;}
-.mceStatusbarResize {float: right; background-image: url('../images/statusbar_resize.gif'); background-repeat: no-repeat; width: 11px; height: 20px; cursor: se-resize;}
-.mceResizeBox {width: 10px; height: 10px; display: none; border: 1px dotted gray; margin: 0; padding: 0;}
-.mceEditorIframe {border: 0;}
-
-/* Button CSS rules */
-
-a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px; cursor: default; margin-top: 1px; margin-left: 1px;}
-a.mceButtonDisabled img {border: 0 !important;}
-a.mceButtonNormal img, a.mceButtonSelected img {border: 1px solid #F0F0EE !important;}
-a.mceButtonSelected img {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
-a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default; background-color: #B6BDD2;}
-a.mceButtonDisabled img {-moz-opacity:0.3; opacity: 0.3; border: 1px solid #F0F0EE !important; cursor: default;}
-a.mceTiledButton img {background-image: url('../images/buttons.gif'); background-repeat: no-repeat;}
-
-/* Menu button CSS rules */
-
-span.mceMenuButton img, span.mceMenuButtonSelected img {border: 1px solid #F0F0EE; margin-left: 1px;}
-span.mceMenuButtonSelected img {border: 1px solid #6779AA; background-color: #B6BDD2;}
-span.mceMenuButtonSelected img.mceMenuButton {border: 1px solid #F0F0EE; background-color: transparent;}
-span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {border-left: 0; margin-left: 0;}
-span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
-span.mceMenuButton:hover img.mceMenuButton, span.mceMenuButtonSelected:hover img.mceMenuButton {border-left: 0;}
-span.mceMenuButtonFocus img {border: 1px solid gray; border-right: 0; margin-left: 1px; background-color: #F5F4F2;}
-span.mceMenuButtonFocus img.mceMenuButton {border: 1px solid gray; border-left: 1px solid #F5F4F2; margin-left: 0;}
-span.mceMenuHover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
-span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {border: 1px solid #0A246A; background-color: #B6BDD2; border-left: 0;}
-
-/* Menu */
-
-.mceMenu {position: absolute; left: 0; top: 0; display: none; z-index: 1000; background-color: white; border: 1px solid gray; font-weight: normal;}
-.mceMenu a, .mceMenuTitle, .mceMenuDisabled {display: block; width: 100%; text-decoration: none; background-color: white; font-family: Tahoma, Verdana, Arial, Helvetica; font-size: 11px; line-height: 20px; color: black;}
-.mceMenu a:hover {background-color: #B6BDD2; color: black; text-decoration: none !important;}
-.mceMenu span {padding-left: 10px; padding-right: 10px; display: block; line-height: 20px;}
-.mceMenuSeparator {border-bottom: 1px solid gray; background-color: gray; height: 1px;}
-.mceMenuTitle span {padding-left: 5px;}
-.mceMenuTitle {background-color: #DDDDDD; font-weight: bold;}
-.mceMenuDisabled {color: gray;}
-span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat; background-position: 5px 8px; padding-left: 20px;}
-span.mceMenuCheckItem {padding-left: 20px;}
-span.mceMenuLine {display: block; position: absolute; left: 0; top: -1px; background-color: #F5F4F2; width: 30px; height: 1px; overflow: hidden; padding-left: 0; padding-right: 0;}
-.mceColors table, .mceColors td {margin: 0; padding: 2px;}
-a.mceMoreColors {width: auto; padding: 0; margin: 0 3px 3px 3px; text-align: center; border: 1px solid white; text-decoration: none !important;}
-.mceColorPreview {position: absolute; overflow:hidden; left: 0; top: 0; margin-left: 3px; margin-top: 15px; width: 16px; height: 4px; background-color: red;}
-a.mceMoreColors:hover {border: 1px solid #0A246A;}
-.mceColors td a {width: 9px; height: 9px; overflow: hidden; border: 1px solid #808080;}
-
-/* MSIE 6 specific rules */
-
-* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
-* html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
-* html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;}
-* html a.mceButtonNormal, * html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
-* html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
-* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
-* html .mceSelectList {margin-top: 2px;}
-* html span.mceMenuButton, * html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
-* html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {position: relative; top: 1px;}
-* html a.mceMoreColors {width: auto;}
-* html .mceColors td a {width: 10px; height: 10px;}
-* html .mceColorPreview {margin-left: 2px; margin-top: 14px;}
-
-/* MSIE 7 specific rules */
-
-*:first-child+html a.mceButtonNormal img, *:first-child+html a.mceButtonSelected img, *:first-child+html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
-*:first-child+html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
-*:first-child+html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;}
-*:first-child+html a.mceButtonNormal, *:first-child+html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
-*:first-child+html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
-*:first-child+html a.mceButtonNormal:hover, *:first-child+html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
-*:first-child+html .mceSelectList {margin-top: 2px;}
-*:first-child+html span.mceMenuButton, *:first-child+html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
-*:first-child+html span.mceMenuButton img, *:first-child+html span.mceMenuButtonSelected img, *:first-child+html span.mceMenuButtonFocus img {position: relative; top: 1px;}
-*:first-child+html a.mceMoreColors {width: 137px;}
-*:first-child+html .mceColors td a {width: 10px; height: 10px;}
-*:first-child+html .mceColorPreview {margin: 0; padding-left: 4px; margin-top: 14px; width: 14px;}
diff --git a/wp-includes/js/tinymce/themes/advanced/images/anchor.gif b/wp-includes/js/tinymce/themes/advanced/images/anchor.gif Binary files differdeleted file mode 100644 index 34ab715..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/anchor.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/backcolor.gif b/wp-includes/js/tinymce/themes/advanced/images/backcolor.gif Binary files differdeleted file mode 100644 index d03e206..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/backcolor.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/bold.gif b/wp-includes/js/tinymce/themes/advanced/images/bold.gif Binary files differdeleted file mode 100644 index d6a9cc2..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/bold.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/bold_de_se.gif b/wp-includes/js/tinymce/themes/advanced/images/bold_de_se.gif Binary files differdeleted file mode 100644 index 9b129de..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/bold_de_se.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/bold_es.gif b/wp-includes/js/tinymce/themes/advanced/images/bold_es.gif Binary files differdeleted file mode 100644 index ea341e6..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/bold_es.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/bold_fr.gif b/wp-includes/js/tinymce/themes/advanced/images/bold_fr.gif Binary files differdeleted file mode 100644 index 2816454..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/bold_fr.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/bold_ru.gif b/wp-includes/js/tinymce/themes/advanced/images/bold_ru.gif Binary files differdeleted file mode 100644 index e000d46..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/bold_ru.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/bold_tw.gif b/wp-includes/js/tinymce/themes/advanced/images/bold_tw.gif Binary files differdeleted file mode 100644 index 8208543..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/bold_tw.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/browse.gif b/wp-includes/js/tinymce/themes/advanced/images/browse.gif Binary files differdeleted file mode 100644 index c786d0b..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/browse.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/bullist.gif b/wp-includes/js/tinymce/themes/advanced/images/bullist.gif Binary files differdeleted file mode 100644 index 6e19467..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/bullist.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/button_menu.gif b/wp-includes/js/tinymce/themes/advanced/images/button_menu.gif Binary files differdeleted file mode 100644 index c3d8fa2..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/button_menu.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/buttons.gif b/wp-includes/js/tinymce/themes/advanced/images/buttons.gif Binary files differdeleted file mode 100644 index 5ad99a7..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/buttons.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/cancel_button_bg.gif b/wp-includes/js/tinymce/themes/advanced/images/cancel_button_bg.gif Binary files differdeleted file mode 100644 index 4b4aeef..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/cancel_button_bg.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/center.gif b/wp-includes/js/tinymce/themes/advanced/images/center.gif Binary files differdeleted file mode 100644 index 42d609a..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/center.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/charmap.gif b/wp-includes/js/tinymce/themes/advanced/images/charmap.gif Binary files differdeleted file mode 100644 index 3cdc4ac..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/charmap.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/cleanup.gif b/wp-includes/js/tinymce/themes/advanced/images/cleanup.gif Binary files differdeleted file mode 100644 index 16491f6..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/cleanup.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/close.gif b/wp-includes/js/tinymce/themes/advanced/images/close.gif Binary files differdeleted file mode 100644 index 679ca2a..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/close.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/code.gif b/wp-includes/js/tinymce/themes/advanced/images/code.gif Binary files differdeleted file mode 100644 index c5d5a67..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/code.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/color.gif b/wp-includes/js/tinymce/themes/advanced/images/color.gif Binary files differdeleted file mode 100644 index 1ecd574..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/color.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/copy.gif b/wp-includes/js/tinymce/themes/advanced/images/copy.gif Binary files differdeleted file mode 100644 index dc14686..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/copy.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/custom_1.gif b/wp-includes/js/tinymce/themes/advanced/images/custom_1.gif Binary files differdeleted file mode 100644 index 4cbccda..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/custom_1.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/cut.gif b/wp-includes/js/tinymce/themes/advanced/images/cut.gif Binary files differdeleted file mode 100644 index 4e9a70b..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/cut.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/forecolor.gif b/wp-includes/js/tinymce/themes/advanced/images/forecolor.gif Binary files differdeleted file mode 100644 index 8b70361..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/forecolor.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/full.gif b/wp-includes/js/tinymce/themes/advanced/images/full.gif Binary files differdeleted file mode 100644 index c8504f6..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/full.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/help.gif b/wp-includes/js/tinymce/themes/advanced/images/help.gif Binary files differdeleted file mode 100644 index 51a1ee4..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/help.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/hr.gif b/wp-includes/js/tinymce/themes/advanced/images/hr.gif Binary files differdeleted file mode 100644 index 1a1ba2a..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/hr.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/image.gif b/wp-includes/js/tinymce/themes/advanced/images/image.gif Binary files differdeleted file mode 100644 index 4b88edd..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/image.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/indent.gif b/wp-includes/js/tinymce/themes/advanced/images/indent.gif Binary files differdeleted file mode 100644 index acd315b..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/indent.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/insert_button_bg.gif b/wp-includes/js/tinymce/themes/advanced/images/insert_button_bg.gif Binary files differdeleted file mode 100644 index 69c131c..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/insert_button_bg.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/italic.gif b/wp-includes/js/tinymce/themes/advanced/images/italic.gif Binary files differdeleted file mode 100644 index 8bb330b..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/italic.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/italic_de_se.gif b/wp-includes/js/tinymce/themes/advanced/images/italic_de_se.gif Binary files differdeleted file mode 100644 index feb0309..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/italic_de_se.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/italic_es.gif b/wp-includes/js/tinymce/themes/advanced/images/italic_es.gif Binary files differdeleted file mode 100644 index 4572cdb..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/italic_es.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/italic_ru.gif b/wp-includes/js/tinymce/themes/advanced/images/italic_ru.gif Binary files differdeleted file mode 100644 index a2bb69a..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/italic_ru.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/italic_tw.gif b/wp-includes/js/tinymce/themes/advanced/images/italic_tw.gif Binary files differdeleted file mode 100644 index 4f6eeaa..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/italic_tw.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/justifycenter.gif b/wp-includes/js/tinymce/themes/advanced/images/justifycenter.gif Binary files differdeleted file mode 100644 index 42d609a..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/justifycenter.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/justifyfull.gif b/wp-includes/js/tinymce/themes/advanced/images/justifyfull.gif Binary files differdeleted file mode 100644 index c8504f6..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/justifyfull.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/justifyleft.gif b/wp-includes/js/tinymce/themes/advanced/images/justifyleft.gif Binary files differdeleted file mode 100644 index e8f7e42..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/justifyleft.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/justifyright.gif b/wp-includes/js/tinymce/themes/advanced/images/justifyright.gif Binary files differdeleted file mode 100644 index e4cea97..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/justifyright.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/left.gif b/wp-includes/js/tinymce/themes/advanced/images/left.gif Binary files differdeleted file mode 100644 index e8f7e42..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/left.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/link.gif b/wp-includes/js/tinymce/themes/advanced/images/link.gif Binary files differdeleted file mode 100644 index 1accf42..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/link.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/menu_check.gif b/wp-includes/js/tinymce/themes/advanced/images/menu_check.gif Binary files differdeleted file mode 100644 index 50d6afd..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/menu_check.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/newdocument.gif b/wp-includes/js/tinymce/themes/advanced/images/newdocument.gif Binary files differdeleted file mode 100644 index a9d2938..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/newdocument.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/numlist.gif b/wp-includes/js/tinymce/themes/advanced/images/numlist.gif Binary files differdeleted file mode 100644 index a268352..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/numlist.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/opacity.png b/wp-includes/js/tinymce/themes/advanced/images/opacity.png Binary files differdeleted file mode 100644 index b4217cb..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/opacity.png +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/outdent.gif b/wp-includes/js/tinymce/themes/advanced/images/outdent.gif Binary files differdeleted file mode 100644 index 23f6aa4..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/outdent.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/paste.gif b/wp-includes/js/tinymce/themes/advanced/images/paste.gif Binary files differdeleted file mode 100644 index 1b45000..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/paste.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/redo.gif b/wp-includes/js/tinymce/themes/advanced/images/redo.gif Binary files differdeleted file mode 100644 index 3af9069..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/redo.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/removeformat.gif b/wp-includes/js/tinymce/themes/advanced/images/removeformat.gif Binary files differdeleted file mode 100644 index 0fa3cb7..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/removeformat.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/right.gif b/wp-includes/js/tinymce/themes/advanced/images/right.gif Binary files differdeleted file mode 100644 index e4cea97..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/right.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/statusbar_resize.gif b/wp-includes/js/tinymce/themes/advanced/images/statusbar_resize.gif Binary files differdeleted file mode 100644 index af89d80..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/statusbar_resize.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/strikethrough.gif b/wp-includes/js/tinymce/themes/advanced/images/strikethrough.gif Binary files differdeleted file mode 100644 index 3264635..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/strikethrough.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/sub.gif b/wp-includes/js/tinymce/themes/advanced/images/sub.gif Binary files differdeleted file mode 100644 index 4d7ce30..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/sub.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/sup.gif b/wp-includes/js/tinymce/themes/advanced/images/sup.gif Binary files differdeleted file mode 100644 index a7145e0..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/sup.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/table.gif b/wp-includes/js/tinymce/themes/advanced/images/table.gif Binary files differdeleted file mode 100644 index 2911830..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/table.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/table_delete_col.gif b/wp-includes/js/tinymce/themes/advanced/images/table_delete_col.gif Binary files differdeleted file mode 100644 index 91f53af..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/table_delete_col.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/table_delete_row.gif b/wp-includes/js/tinymce/themes/advanced/images/table_delete_row.gif Binary files differdeleted file mode 100644 index 7025733..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/table_delete_row.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_after.gif b/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_after.gif Binary files differdeleted file mode 100644 index 8505808..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_after.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_before.gif b/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_before.gif Binary files differdeleted file mode 100644 index b669d4f..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_before.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_after.gif b/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_after.gif Binary files differdeleted file mode 100644 index b9c1446..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_after.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_before.gif b/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_before.gif Binary files differdeleted file mode 100644 index 157d373..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_before.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/underline.gif b/wp-includes/js/tinymce/themes/advanced/images/underline.gif Binary files differdeleted file mode 100644 index 1dfeb5f..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/underline.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/underline_es.gif b/wp-includes/js/tinymce/themes/advanced/images/underline_es.gif Binary files differdeleted file mode 100644 index 551d914..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/underline_es.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/underline_fr.gif b/wp-includes/js/tinymce/themes/advanced/images/underline_fr.gif Binary files differdeleted file mode 100644 index 551d914..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/underline_fr.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/underline_ru.gif b/wp-includes/js/tinymce/themes/advanced/images/underline_ru.gif Binary files differdeleted file mode 100644 index b78e2a4..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/underline_ru.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/underline_tw.gif b/wp-includes/js/tinymce/themes/advanced/images/underline_tw.gif Binary files differdeleted file mode 100644 index b715390..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/underline_tw.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/undo.gif b/wp-includes/js/tinymce/themes/advanced/images/undo.gif Binary files differdeleted file mode 100644 index 520796d..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/undo.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/unlink.gif b/wp-includes/js/tinymce/themes/advanced/images/unlink.gif Binary files differdeleted file mode 100644 index 5c8a33d..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/unlink.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/visualaid.gif b/wp-includes/js/tinymce/themes/advanced/images/visualaid.gif Binary files differdeleted file mode 100644 index 63caf18..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/visualaid.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/xp/tab_bg.gif b/wp-includes/js/tinymce/themes/advanced/images/xp/tab_bg.gif Binary files differdeleted file mode 100644 index 897a01f..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/xp/tab_bg.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/xp/tab_end.gif b/wp-includes/js/tinymce/themes/advanced/images/xp/tab_end.gif Binary files differdeleted file mode 100644 index aee442b..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/xp/tab_end.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_bg.gif b/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_bg.gif Binary files differdeleted file mode 100644 index 9dc8abe..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_bg.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_end.gif b/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_end.gif Binary files differdeleted file mode 100644 index 616a889..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_end.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/xp/tabs_bg.gif b/wp-includes/js/tinymce/themes/advanced/images/xp/tabs_bg.gif Binary files differdeleted file mode 100644 index c303f66..0000000 --- a/wp-includes/js/tinymce/themes/advanced/images/xp/tabs_bg.gif +++ /dev/null diff --git a/wp-includes/js/tinymce/themes/advanced/images/colors.jpg b/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg Binary files differindex b4c542d..b4c542d 100644 --- a/wp-includes/js/tinymce/themes/advanced/images/colors.jpg +++ b/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg diff --git a/wp-includes/js/tinymce/themes/advanced/img/fm.gif b/wp-includes/js/tinymce/themes/advanced/img/fm.gif Binary files differnew file mode 100644 index 0000000..b5f022b --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/img/fm.gif diff --git a/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png b/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png Binary files differnew file mode 100644 index 0000000..8a396e0 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png diff --git a/wp-includes/js/tinymce/themes/advanced/img/icons.gif b/wp-includes/js/tinymce/themes/advanced/img/icons.gif Binary files differnew file mode 100644 index 0000000..6870827 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/img/icons.gif diff --git a/wp-includes/js/tinymce/themes/advanced/img/sflogo.png b/wp-includes/js/tinymce/themes/advanced/img/sflogo.png Binary files differnew file mode 100644 index 0000000..142a6f9 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/img/sflogo.png diff --git a/wp-includes/js/tinymce/themes/advanced/js/about.js b/wp-includes/js/tinymce/themes/advanced/js/about.js new file mode 100644 index 0000000..277550f --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/js/about.js @@ -0,0 +1,72 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + var ed, tcont; + + tinyMCEPopup.resizeToInnerSize(); + ed = tinyMCEPopup.editor; + + // Give FF some time + window.setTimeout('insertHelpIFrame();', 10); + + tcont = document.getElementById('plugintablecontainer'); + document.getElementById('plugins_tab').style.display = 'none'; + + var html = ""; + html += '<table id="plugintable">'; + html += '<thead>'; + html += '<tr>'; + html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>'; + html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>'; + html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>'; + html += '</tr>'; + html += '</thead>'; + html += '<tbody>'; + + tinymce.each(ed.plugins, function(p, n) { + var info; + + if (!p.getInfo) + return; + + html += '<tr>'; + + info = p.getInfo(); + + if (info.infourl != null && info.infourl != '') + html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>'; + else + html += '<td width="50%" title="' + n + '">' + info.longname + '</td>'; + + if (info.authorurl != null && info.authorurl != '') + html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>'; + else + html += '<td width="35%">' + info.author + '</td>'; + + html += '<td width="15%">' + info.version + '</td>'; + html += '</tr>'; + + document.getElementById('plugins_tab').style.display = ''; + + }); + + html += '</tbody>'; + html += '</table>'; + + tcont.innerHTML = html; + + tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; + tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; +} + +function insertHelpIFrame() { + var html; + + if (tinyMCEPopup.getParam('docs_url')) { + html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>'; + document.getElementById('iframecontainer').innerHTML = html; + document.getElementById('help_tab').style.display = 'block'; + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/wp-includes/js/tinymce/themes/advanced/js/anchor.js b/wp-includes/js/tinymce/themes/advanced/js/anchor.js new file mode 100644 index 0000000..f1d01ea --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/js/anchor.js @@ -0,0 +1,33 @@ +tinyMCEPopup.requireLangPack(); + +var AnchorDialog = { + init : function(ed) { + var action, elm, f = document.forms[0]; + + this.editor = ed; + elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG'); + v = ed.dom.getAttrib(elm, 'name'); + + if (v) + f.anchorName.value = v; + + f.insert.value = ed.getLang(elm ? 'update' : 'insert'); + }, + + update : function() { + var ed = this.editor; + + tinyMCEPopup.restoreSelection(); + 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'})); + else + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}, '')); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff --git a/wp-includes/js/tinymce/themes/advanced/jscripts/charmap.js b/wp-includes/js/tinymce/themes/advanced/js/charmap.js index c4ec326..d9fd8d3 100644 --- a/wp-includes/js/tinymce/themes/advanced/jscripts/charmap.js +++ b/wp-includes/js/tinymce/themes/advanced/js/charmap.js @@ -1,13 +1,6 @@ -function init() { - tinyMCEPopup.resizeToInnerSize(); -} - -var charmap = new Array(); +tinyMCEPopup.requireLangPack(); -// for mor details please see w3c.org -// now here is the complete list ;) - -charmap = [ +var charmap = [ [' ', ' ', true, 'no-break space'], ['&', '&', true, 'ampersand'], ['"', '"', true, 'quotation mark'], @@ -270,32 +263,37 @@ charmap = [ ['­', '­', false,'soft hyphen'] ]; +tinyMCEPopup.onInit.add(function() { + tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); +}); + function renderCharMapHTML() { - var charsPerRow = 20, tdWidth=20, tdHeight=20; + var charsPerRow = 20, tdWidth=20, tdHeight=20, i; var html = '<table border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) + '"><tr height="' + tdHeight + '">'; var cols=-1; - for (var i=0; i<charmap.length; i++) { + + for (i=0; i<charmap.length; i++) { if (charmap[i][2]==true) { cols++; html += '' - + '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"' - + ' onmouseover="this.className=\'charmapOver\';' - + 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');"' - + ' onmouseout="this.className=\'charmap\';"' - + ' nowrap="nowrap" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');"><a style="text-decoration: none;" onfocus="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" href="javascript:insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">' + + '<td class="charmap">' + + '<a onmouseover="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" onfocus="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">' + charmap[i][1] + '</a></td>'; if ((cols+1) % charsPerRow == 0) html += '</tr><tr height="' + tdHeight + '">'; } } + if (cols % charsPerRow > 0) { var padd = charsPerRow - (cols % charsPerRow); for (var i=0; i<padd-1; i++) html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"> </td>'; } + html += '</tr></table>'; - document.write(html); + + return html; } function insertChar(chr) { @@ -305,6 +303,7 @@ function insertChar(chr) { if (tinyMCEPopup.isWindow) window.focus(); + tinyMCEPopup.editor.focus(); tinyMCEPopup.close(); } diff --git a/wp-includes/js/tinymce/themes/advanced/jscripts/color_picker.js b/wp-includes/js/tinymce/themes/advanced/js/color_picker.js index 9236fd0..148d7f5 100644 --- a/wp-includes/js/tinymce/themes/advanced/jscripts/color_picker.js +++ b/wp-includes/js/tinymce/themes/advanced/js/color_picker.js @@ -1,3 +1,5 @@ +tinyMCEPopup.requireLangPack(); + var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; var colors = new Array( @@ -57,10 +59,9 @@ var named = { }; function init() { - var inputColor = convertRGBToHex(tinyMCE.getWindowArg('input_color')); + var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')); - if (tinyMCE.isMSIE) - tinyMCEPopup.resizeToInnerSize(); + tinyMCEPopup.resizeToInnerSize(); generatePicker(); @@ -75,9 +76,13 @@ function init() { } function insertAction() { - var color = document.getElementById("color").value; + var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); + + tinyMCEPopup.restoreSelection(); + + if (f) + f(color); - tinyMCEPopup.execCommand(tinyMCE.getWindowArg('command'), false, color); tinyMCEPopup.close(); } @@ -86,7 +91,7 @@ function showColor(color, name) { document.getElementById("colorname").innerHTML = name; document.getElementById("preview").style.backgroundColor = color; - document.getElementById("color").value = color; + document.getElementById("color").value = color.toLowerCase(); } function convertRGBToHex(col) { @@ -152,9 +157,9 @@ function generateWebColors() { + '<tr>'; for (i=0; i<colors.length; i++) { - h += '<td bgcolor="' + colors[i] + '">' - + '<a href="javascript:insertAction();" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');">' - + '<img border="0" src="images/spacer.gif" width="10" height="10" title="' + colors[i] + '" alt="' + colors[i] + '" /></a></td>'; + h += '<td bgcolor="' + colors[i] + '" width="10" height="10">' + + '<a href="javascript:insertAction();" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">' + + '</a></td>'; if ((i+1) % 18 == 0) h += '</tr><tr>'; } @@ -190,9 +195,9 @@ function computeColor(e) { x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0); y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0); - partWidth = document.getElementById('colorpicker').width / 6; + partWidth = document.getElementById('colors').width / 6; partDetail = detail / 2; - imHeight = document.getElementById('colorpicker').height; + imHeight = document.getElementById('colors').height; r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); @@ -237,4 +242,4 @@ function changeFinalColor(color) { document.getElementById('color').value = color; } -window.focus(); +tinyMCEPopup.onInit.add(init); diff --git a/wp-includes/js/tinymce/themes/advanced/js/image.js b/wp-includes/js/tinymce/themes/advanced/js/image.js new file mode 100644 index 0000000..ebe9348 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/js/image.js @@ -0,0 +1,254 @@ +var ImageDialog = { + preInit : function() { + var url; + + tinyMCEPopup.requireLangPack(); + + if (url = tinyMCEPopup.getParam("external_image_list_url")) + document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>'); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '180px'; + + e = ed.selection.getNode(); + + this.fillFileList('image_list', 'tinyMCEImageList'); + + if (e.nodeName == 'IMG') { + f.src.value = ed.dom.getAttrib(e, 'src'); + f.alt.value = ed.dom.getAttrib(e, 'alt'); + f.border.value = this.getAttrib(e, 'border'); + f.vspace.value = this.getAttrib(e, 'vspace'); + f.hspace.value = this.getAttrib(e, 'hspace'); + f.width.value = ed.dom.getAttrib(e, 'width'); + f.height.value = ed.dom.getAttrib(e, 'height'); + f.insert.value = ed.getLang('update'); + f.class_name.value = ed.dom.getAttrib(e, 'class'); + this.styleVal = ed.dom.getAttrib(e, 'style'); + selectByValue(f, 'image_list', f.src.value); + selectByValue(f, 'align', this.getAttrib(e, 'align')); + this.updateStyle(); + } + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + update : function() { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (!ed.settings.inline_styles) { + args = tinymce.extend(args, { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }); + } else + args.style = this.styleVal; + + tinymce.extend(args, { + src : f.src.value, + alt : f.alt.value, + width : f.width.value, + height : f.height.value, + 'class' : f.class_name.value + }); + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />', {skip_undo : 1}); + ed.dom.setAttribs('__mce_tmp', args); + ed.dom.setAttrib('__mce_tmp', 'id', ''); + ed.undoManager.add(); + } + + tinyMCEPopup.close(); + }, + + updateStyle : function() { + var dom = tinyMCEPopup.dom, st, v, cls, oldcls, rep, f = document.forms[0]; + + if (tinyMCEPopup.editor.settings.inline_styles) { + st = tinyMCEPopup.dom.parseStyle(this.styleVal); + + // Handle align + v = getSelectValue(f, 'align'); + cls = f.class_name.value || ''; + cls = cls ? cls.replace(/alignright\s*|alignleft\s*/g, '') : ''; + cls = cls ? cls.replace(/^\s*(.+?)\s*$/, '$1') : ''; + if (v) { + if (v == 'left' || v == 'right') { + st['float'] = v; + delete st['vertical-align']; + oldcls = cls ? ' '+cls : ''; + f.class_name.value = 'align' + v + oldcls; + } else { + st['vertical-align'] = v; + delete st['float']; + f.class_name.value = cls; + } + } else { + delete st['float']; + delete st['vertical-align']; + f.class_name.value = cls; + } + + // Handle border + v = f.border.value; + if (v || v == '0') { + if (v == '0') + st['border'] = '0'; + else + st['border'] = v + 'px solid black'; + } else + delete st['border']; + + // Handle hspace + v = f.hspace.value; + if (v) { + delete st['margin']; + st['margin-left'] = v + 'px'; + st['margin-right'] = v + 'px'; + } else { + delete st['margin-left']; + delete st['margin-right']; + } + + // Handle vspace + v = f.vspace.value; + if (v) { + delete st['margin']; + st['margin-top'] = v + 'px'; + st['margin-bottom'] = v + 'px'; + } else { + delete st['margin-top']; + delete st['margin-bottom']; + } + + // Merge + st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st)); + this.styleVal = dom.serializeStyle(st); + } + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.width.value = f.height.value = ""; + }, + + updateImageData : function() { + var f = document.forms[0], t = ImageDialog; + + if (f.width.value == "") + f.width.value = t.preloadImg.width; + + if (f.height.value == "") + f.height.value = t.preloadImg.height; + }, + + getImageData : function() { + var f = document.forms[0]; + + this.preloadImg = new Image(); + this.preloadImg.onload = this.updateImageData; + this.preloadImg.onerror = this.resetImageData; + this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/wp-includes/js/tinymce/themes/advanced/js/link.js b/wp-includes/js/tinymce/themes/advanced/js/link.js new file mode 100644 index 0000000..bf310a3 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/js/link.js @@ -0,0 +1,126 @@ +tinyMCEPopup.requireLangPack(); + +var LinkDialog = { + preInit : function() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>'); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + + this.fillClassList('class_list'); + this.fillFileList('link_list', 'tinyMCELinkList'); + this.fillTargetList('target_list'); + + if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { + f.href.value = ed.dom.getAttrib(e, 'href'); + f.linktitle.value = ed.dom.getAttrib(e, 'title'); + f.insert.value = ed.getLang('update'); + selectByValue(f, 'link_list', f.href.value); + selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); + selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); + } + }, + + update : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b; + + tinyMCEPopup.restoreSelection(); + + // Remove element if there is no href + if (!f.href.value) { + e = ed.dom.getParent(ed.selection.getNode(), 'A'); + if (e) { + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + b = ed.selection.getBookmark(); + ed.dom.remove(e, 1); + ed.selection.moveToBookmark(b); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + } + + ed.execCommand('mceInsertLink', false, { + 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 + }); + + tinyMCEPopup.close(); + }, + + checkPrefix : function(n) { + 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'))) + n.value = 'http://' + n.value; + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillTargetList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v; + + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); + + if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { + tinymce.each(v.split(','), function(v) { + v = v.split('='); + html += '<option value="' + v[1] + '">' + v[0] + '</option>'; + }); + } + } +}; + +LinkDialog.preInit(); +tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff --git a/wp-includes/js/tinymce/themes/advanced/jscripts/source_editor.js b/wp-includes/js/tinymce/themes/advanced/js/source_editor.js index 83648be..a6235a3 100644 --- a/wp-includes/js/tinymce/themes/advanced/jscripts/source_editor.js +++ b/wp-includes/js/tinymce/themes/advanced/js/source_editor.js @@ -1,33 +1,36 @@ +tinyMCEPopup.requireLangPack(); +tinyMCEPopup.onInit.add(onLoadInit); + function saveContent() { - tinyMCE.setContent(document.getElementById('htmlSource').value); - tinyMCE.closeWindow(window); + tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value); + tinyMCEPopup.close(); } function onLoadInit() { tinyMCEPopup.resizeToInnerSize(); // Remove Gecko spellchecking - if (tinyMCE.isGecko) - document.body.spellcheck = tinyMCE.getParam("gecko_spellcheck"); - - document.getElementById('htmlSource').value = tinyMCE.getContent(tinyMCE.getWindowArg('editor_id')); + if (tinymce.isGecko) + document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); - resizeInputs(); + document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent(); - if (tinyMCE.getParam("theme_advanced_source_editor_wrap", true)) { + if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { setWrap('soft'); document.getElementById('wraped').checked = true; } + + resizeInputs(); } function setWrap(val) { - var s = document.getElementById('htmlSource'); + var v, n, s = document.getElementById('htmlSource'); s.wrap = val; - if (tinyMCE.isGecko || tinyMCE.isOpera) { - var v = s.value; - var n = s.cloneNode(false); + if (!tinymce.isIE) { + v = s.value; + n = s.cloneNode(false); n.setAttribute("wrap", val); s.parentNode.replaceChild(n, s); n.value = v; @@ -46,11 +49,11 @@ var wHeight=0, wWidth=0, owHeight=0, owWidth=0; function resizeInputs() { var el = document.getElementById('htmlSource'); - if (!tinyMCE.isMSIE) { - wHeight = self.innerHeight - 60; + if (!tinymce.isIE) { + wHeight = self.innerHeight - 65; wWidth = self.innerWidth - 16; } else { - wHeight = document.body.clientHeight - 60; + wHeight = document.body.clientHeight - 70; wWidth = document.body.clientWidth - 16; } diff --git a/wp-includes/js/tinymce/themes/advanced/jscripts/about.js b/wp-includes/js/tinymce/themes/advanced/jscripts/about.js deleted file mode 100644 index f60e6f6..0000000 --- a/wp-includes/js/tinymce/themes/advanced/jscripts/about.js +++ /dev/null @@ -1,75 +0,0 @@ -function init() { - var inst; - - tinyMCEPopup.resizeToInnerSize(); - inst = tinyMCE.selectedInstance; - - // Give FF some time - window.setTimeout('insertHelpIFrame();', 10); - - var tcont = document.getElementById('plugintablecontainer'); - var plugins = tinyMCE.getParam('plugins', '', true, ','); - if (plugins.length == 0) - document.getElementById('plugins_tab').style.display = 'none'; - - var html = ""; - html += '<table id="plugintable">'; - html += '<thead>'; - html += '<tr>'; - html += '<td>' + tinyMCE.getLang('lang_plugin') + '</td>'; - html += '<td>' + tinyMCE.getLang('lang_author') + '</td>'; - html += '<td>' + tinyMCE.getLang('lang_version') + '</td>'; - html += '</tr>'; - html += '</thead>'; - html += '<tbody>'; - - for (var i=0; i<inst.plugins.length; i++) { - var info = getPluginInfo(inst.plugins[i]); - - html += '<tr>'; - - if (info.infourl != null && info.infourl != '') - html += '<td width="50%" title="' + plugins[i] + '"><a href="' + info.infourl + '" target="mceplugin">' + info.longname + '</a></td>'; - else - html += '<td width="50%" title="' + plugins[i] + '">' + info.longname + '</td>'; - - if (info.authorurl != null && info.authorurl != '') - html += '<td width="35%"><a href="' + info.authorurl + '" target="mceplugin">' + info.author + '</a></td>'; - else - html += '<td width="35%">' + info.author + '</td>'; - - html += '<td width="15%">' + info.version + '</td>'; - html += '</tr>'; - } - - html += '</tbody>'; - html += '</table>'; - - tcont.innerHTML = html; -} - -function getPluginInfo(name) { - if (tinyMCE.plugins[name].getInfo) - return tinyMCE.plugins[name].getInfo(); - - return { - longname : name, - authorurl : '', - infourl : '', - author : '--', - version : '--' - }; -} - -function insertHelpIFrame() { - var html = '<iframe width="100%" height="300" src="' + tinyMCE.themeURL + "/docs/" + tinyMCE.settings['docs_language'] + "/index.htm" + '"></iframe>'; - - document.getElementById('iframecontainer').innerHTML = html; - - html = ''; - html += '<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a> '; - html += '<a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a> '; - html += '<a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a> '; - - document.getElementById('buttoncontainer').innerHTML = html; -} diff --git a/wp-includes/js/tinymce/themes/advanced/jscripts/anchor.js b/wp-includes/js/tinymce/themes/advanced/jscripts/anchor.js deleted file mode 100644 index f2e5d48..0000000 --- a/wp-includes/js/tinymce/themes/advanced/jscripts/anchor.js +++ /dev/null @@ -1,74 +0,0 @@ -var action, element; - -function init() { - tinyMCEPopup.resizeToInnerSize(); - - var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id')); - var anchor = tinyMCE.getParentElement(inst.getFocusElement(), "a", "name"); - var img = inst.getFocusElement(); - action = 'insert'; - - if (anchor != null) { - element = anchor; - action = "update"; - } - - if (tinyMCE.getAttrib(img, "class") == "mceItemAnchor") { - element = img; - action = "update"; - } - - if (action == "update") - document.forms[0].anchorName.value = element.nodeName == "IMG" ? element.getAttribute("title") : element.getAttribute("name"); - - document.forms[0].insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true); -} - -function insertAnchor() { - var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id')); - var name = document.forms[0].anchorName.value, e; - - tinyMCEPopup.execCommand("mceBeginUndoLevel"); - - if (action == "update") { - if (element.nodeName == "IMG") - element.setAttribute("title", name); - else - element.setAttribute("name", name); - } else { - var rng = inst.getRng(); - - if (rng.collapse) - rng.collapse(false); - - name = name.replace(/&/g, '&'); - name = name.replace(/\"/g, '"'); - name = name.replace(/</g, '<'); - name = name.replace(/>/g, '>'); - - // Fix for bug #1447335 - if (tinyMCE.isGecko) - html = '<a id="mceNewAnchor" name="' + name + '"></a>'; - else - html = '<a name="' + name + '"></a>'; - - tinyMCEPopup.execCommand("mceInsertContent", false, html); - - // Fix for bug #1447335 force cursor after the anchor element - if (tinyMCE.isGecko) { - e = inst.getDoc().getElementById('mceNewAnchor'); - - if (e) { - inst.selection.selectNode(e, true, false, false); - e.removeAttribute('id'); - } - } - - tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst); - } - - tinyMCEPopup.execCommand("mceEndUndoLevel"); - - tinyMCE.triggerNodeChange(); - tinyMCEPopup.close(); -} diff --git a/wp-includes/js/tinymce/themes/advanced/jscripts/image.js b/wp-includes/js/tinymce/themes/advanced/jscripts/image.js deleted file mode 100644 index 950c043..0000000 --- a/wp-includes/js/tinymce/themes/advanced/jscripts/image.js +++ /dev/null @@ -1,81 +0,0 @@ -var url = tinyMCE.getParam("external_image_list_url"); -if (url != null) { - // Fix relative - if (url.charAt(0) != '/' && url.indexOf('://') == -1) - url = tinyMCE.documentBasePath + "/" + url; - - document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>'); -} - -function insertImage() { - var src = document.forms[0].src.value; - var alt = document.forms[0].alt.value; - var border = document.forms[0].border.value; - var vspace = document.forms[0].vspace.value; - var hspace = document.forms[0].hspace.value; - var width = document.forms[0].width.value; - var height = document.forms[0].height.value; - var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value; - - tinyMCEPopup.restoreSelection(); - tinyMCE.themes['advanced']._insertImage(src, alt, border, hspace, vspace, width, height, align); - tinyMCEPopup.close(); -} - -function init() { - tinyMCEPopup.resizeToInnerSize(); - - document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); - - var formObj = document.forms[0]; - - for (var i=0; i<document.forms[0].align.options.length; i++) { - if (document.forms[0].align.options[i].value == tinyMCE.getWindowArg('align')) - document.forms[0].align.options.selectedIndex = i; - } - - formObj.src.value = tinyMCE.getWindowArg('src'); - formObj.alt.value = tinyMCE.getWindowArg('alt'); - formObj.border.value = tinyMCE.getWindowArg('border'); - formObj.vspace.value = tinyMCE.getWindowArg('vspace'); - formObj.hspace.value = tinyMCE.getWindowArg('hspace'); - formObj.width.value = tinyMCE.getWindowArg('width'); - formObj.height.value = tinyMCE.getWindowArg('height'); - formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); - - // Handle file browser - if (isVisible('srcbrowser')) - document.getElementById('src').style.width = '180px'; - - // Auto select image in list - if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) { - for (var i=0; i<formObj.image_list.length; i++) { - if (formObj.image_list.options[i].value == tinyMCE.getWindowArg('src')) - formObj.image_list.options[i].selected = true; - } - } -} - -var preloadImg = new Image(); - -function resetImageData() { - var formObj = document.forms[0]; - formObj.width.value = formObj.height.value = ""; -} - -function updateImageData() { - var formObj = document.forms[0]; - - if (formObj.width.value == "") - formObj.width.value = preloadImg.width; - - if (formObj.height.value == "") - formObj.height.value = preloadImg.height; -} - -function getImageData() { - preloadImg = new Image(); - tinyMCE.addEvent(preloadImg, "load", updateImageData); - tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";}); - preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value); -} diff --git a/wp-includes/js/tinymce/themes/advanced/jscripts/link.js b/wp-includes/js/tinymce/themes/advanced/jscripts/link.js deleted file mode 100644 index 36df14e..0000000 --- a/wp-includes/js/tinymce/themes/advanced/jscripts/link.js +++ /dev/null @@ -1,82 +0,0 @@ -var url = tinyMCE.getParam("external_link_list_url"); -if (url != null) { - // Fix relative - if (url.charAt(0) != '/' && url.indexOf('://') == -1) - url = tinyMCE.documentBasePath + "/" + url; - - document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>'); -} - -function init() { - tinyMCEPopup.resizeToInnerSize(); - - document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','theme_advanced_link'); - - // Handle file browser - if (isVisible('hrefbrowser')) - document.getElementById('href').style.width = '180px'; - - var formObj = document.forms[0]; - - for (var i=0; i<document.forms[0].target.options.length; i++) { - var option = document.forms[0].target.options[i]; - - if (option.value == tinyMCE.getWindowArg('target')) - option.selected = true; - } - - // WordPress -- next 3 lines - document.forms[0].href.value = tinyMCE.getWindowArg('href') || 'http://'; - document.forms[0].href.select(); - document.forms[0].href.focus(); - - document.forms[0].linktitle.value = tinyMCE.getWindowArg('title'); - document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); - - addClassesToList('styleSelect', 'theme_advanced_link_styles'); - selectByValue(formObj, 'styleSelect', tinyMCE.getWindowArg('className'), true); - - // Hide css select row if no CSS classes - if (formObj.styleSelect && formObj.styleSelect.options.length <= 1) { - var sr = document.getElementById('styleSelectRow'); - sr.style.display = 'none'; - sr.parentNode.removeChild(sr); - } - - // Auto select link in list - if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) { - var formObj = document.forms[0]; - - for (var i=0; i<formObj.link_list.length; i++) { - if (formObj.link_list.options[i].value == tinyMCE.getWindowArg('href')) - formObj.link_list.options[i].selected = true; - } - } -} - -function checkPrefix(n) { - if (Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCE.getLang('lang_is_email'))) - n.value = 'mailto:' + n.value; - - if (/^\s*www./i.test(n.value) && confirm(tinyMCE.getLang('lang_is_external'))) - n.value = 'http://' + n.value; -} - -function insertLink() { - var href = document.forms[0].href.value; - var target = document.forms[0].target.options[document.forms[0].target.selectedIndex].value; - var title = document.forms[0].linktitle.value; - var style_class = document.forms[0].styleSelect ? document.forms[0].styleSelect.value : ""; - var dummy; - - // WordPress: Make anchors absolute; - if (href.charAt(0) == '#') - href = tinyMCE.settings.document_base_url + href; - - if (target == '_self') - target = ''; - - tinyMCEPopup.restoreSelection(); - tinyMCE.themes['advanced']._insertLink(href, target, title, dummy, style_class); - tinyMCEPopup.close(); -} diff --git a/wp-includes/js/tinymce/themes/advanced/langs/en.js b/wp-includes/js/tinymce/themes/advanced/langs/en.js deleted file mode 100644 index 8409e58..0000000 --- a/wp-includes/js/tinymce/themes/advanced/langs/en.js +++ /dev/null @@ -1,93 +0,0 @@ -// UK lang variables
-
-tinyMCE.addToLang('',{
-theme_style_select : '-- Styles --',
-theme_code_desc : 'Edit HTML Source',
-theme_code_title : 'HTML Source Editor',
-theme_code_wordwrap : 'Word wrap',
-theme_sub_desc : 'Subscript',
-theme_sup_desc : 'Superscript',
-theme_hr_desc : 'Insert horizontal ruler',
-theme_removeformat_desc : 'Remove formatting',
-theme_custom1_desc : 'Your custom description here',
-insert_image_border : 'Border',
-insert_image_dimensions : 'Dimensions',
-insert_image_vspace : 'Vertical space',
-insert_image_hspace : 'Horizontal space',
-insert_image_align : 'Alignment',
-insert_image_align_default : '-- Not set --',
-insert_image_align_baseline : 'Baseline',
-insert_image_align_top : 'Top',
-insert_image_align_middle : 'Middle',
-insert_image_align_bottom : 'Bottom',
-insert_image_align_texttop : 'TextTop',
-insert_image_align_absmiddle : 'Absolute Middle',
-insert_image_align_absbottom : 'Absolute Bottom',
-insert_image_align_left : 'Left',
-insert_image_align_right : 'Right',
-theme_font_size : '-- Font size --',
-theme_fontdefault : '-- Font family --',
-theme_block : '-- Format --',
-theme_paragraph : 'Paragraph',
-theme_div : 'Div',
-theme_address : 'Address',
-theme_pre : 'Preformatted',
-theme_h1 : 'Heading 1',
-theme_h2 : 'Heading 2',
-theme_h3 : 'Heading 3',
-theme_h4 : 'Heading 4',
-theme_h5 : 'Heading 5',
-theme_h6 : 'Heading 6',
-theme_blockquote : 'Blockquote',
-theme_code : 'Code',
-theme_samp : 'Code sample',
-theme_dt : 'Definition term ',
-theme_dd : 'Definition description',
-theme_colorpicker_title : 'Select a color',
-theme_colorpicker_apply : 'Apply',
-theme_forecolor_desc : 'Select text color',
-theme_backcolor_desc : 'Select background color',
-theme_charmap_title : 'Select custom character',
-theme_charmap_desc : 'Insert custom character',
-theme_visualaid_desc : 'Toggle guidelines/invisible elements',
-insert_anchor_title : 'Insert/edit anchor',
-insert_anchor_name : 'Anchor name',
-theme_anchor_desc : 'Insert/edit anchor',
-theme_insert_link_titlefield : 'Title',
-theme_clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?',
-theme_path : 'Path',
-cut_desc : 'Cut',
-copy_desc : 'Copy',
-paste_desc : 'Paste',
-link_list : 'Link list',
-image_list : 'Image list',
-browse : 'Browse',
-image_props_desc : 'Image properties',
-newdocument_desc : 'New document',
-class_name : 'Class',
-newdocument : 'Are you sure you want clear all contents?',
-about_title : 'About TinyMCE',
-about : 'About',
-license : 'License',
-plugins : 'Plugins',
-plugin : 'Plugin',
-author : 'Author',
-version : 'Version',
-loaded_plugins : 'Loaded plugins',
-help : 'Help',
-not_set : '-- Not set --',
-close : 'Close',
-toolbar_focus : 'Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X',
-invalid_data : 'Error: Invalid values entered, these are marked in red.',
-more_colors : 'More colors',
-color_picker_tab : 'Picker',
-color_picker : 'Color picker',
-web_colors_tab : 'Palette',
-web_colors : 'Palette colors',
-named_colors_tab : 'Named',
-named_colors : 'Named colors',
-color : 'Color:',
-color_name : 'Name:',
-is_email : 'The URL you entered seems to be an email address, do you want to add the required mailto: prefix?',
-is_external : 'The URL you entered seems to external link, do you want to add the required http:// prefix?'
-});
diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/content.css b/wp-includes/js/tinymce/themes/advanced/skins/default/content.css new file mode 100644 index 0000000..363aa9f --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/content.css @@ -0,0 +1,25 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} +img {border:0;} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css b/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css new file mode 100644 index 0000000..497dda3 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css @@ -0,0 +1,114 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +} + +#insert {background:url(img/buttons.png) 0 -52px;} +#cancel {background:url(img/buttons.png) 0 0;} + +/* Browse */ +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
\ No newline at end of file diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png b/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png Binary files differnew file mode 100644 index 0000000..7dd5841 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png diff --git a/wp-includes/js/tinymce/themes/advanced/images/anchor_symbol.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif Binary files differindex 2eafd79..2eafd79 100644 --- a/wp-includes/js/tinymce/themes/advanced/images/anchor_symbol.gif +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif Binary files differnew file mode 100644 index 0000000..85e31df --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif Binary files differnew file mode 100644 index 0000000..adfdddc --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif Binary files differnew file mode 100644 index 0000000..5bb90fd --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif b/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif Binary files differnew file mode 100644 index 0000000..ce4be63 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css b/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css new file mode 100644 index 0000000..3f6df9c --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css @@ -0,0 +1,210 @@ +/* Reset */ +.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.defaultSkin table td {vertical-align:middle} + +/* Containers */ +.defaultSkin table {background:#F0F0EE} +.defaultSkin iframe {display:block; background:#FFF} +.defaultSkin .mceToolbar {height:26px} +.defaultSkin .mceLeft {text-align:left} +.defaultSkin .mceRight {text-align:right} + +/* External */ +.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;} +.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} +.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} +.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top} +.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} +.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} +.defaultSkin .mceStatusbar div {float:left; margin:2px} +.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.defaultSkin .mceStatusbar a:hover {text-decoration:underline} +.defaultSkin table.mceToolbar {margin-left:3px} +.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.defaultSkin td.mceCenter {text-align:center;} +.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;} +.defaultSkin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px;} +.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30)} + +/* Separator */ +.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} + +/* ListBox */ +.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} +.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} +.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} +.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} +.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} +.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px} +.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} +.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;} + +/* SplitButton */ +.defaultSkin .mceSplitButton {width:32px; height:20px} +.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} +.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} +.defaultSkin .mceSplitButton span.mceAction {width:20px; background:url(../../img/icons.gif) 20px 20px;} +.defaultSkin .mceSplitButton a.mceOpen {width:9px; border:1px solid #F0F0EE;} +.defaultSkin .mceSplitButton span.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0;} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {border:1px solid #0A246A;} +.defaultSkin table.mceSplitButtonEnabled:hover span.mceOpen, .defaultSkin .mceSplitButtonHover span.mceOpen, .defaultSkin .mceSplitButtonSelected span.mceOpen {background-color:#B2BBD0} +.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled span.mceOpen {opacity:0.3; filter:alpha(opacity=30)} +.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;} + +/* ColorSplitButton */ +.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.defaultSkin .mceColorSplitMenu td {padding:2px} +.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A} +.defaultSkin .mceColorPreview {position:absolute; top:15px; left:2px; width:16px; height:4px; overflow:hidden} +.defaultSkin .mce_forecolor, .defaultSkin .mce_backcolor {position:relative} + +/* Menu */ +.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} +.defaultSkin .mceNoIcons span.mceIcon {width:0;} +.defaultSkin .mceNoIcons a .mceText {padding-left:10px} +.defaultSkin .mceMenu table {background:#FFF} +.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block} +.defaultSkin .mceMenu td {height:20px} +.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0} +.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px} +.defaultSkin .mceMenu pre.mceText {font-family:Monospace} +.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px} +.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} +.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.defaultSkin .mceMenuItemDisabled .mceText {color:#888} +.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} +.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} +.defaultSkin .mceMenu span.mceMenuLine {display:none} +.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; filter:alpha(opacity=50); background:#FFF} +.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +.defaultSkin .mcePlaceHolder {border:1px dotted gray} + +/* Formats */ +.defaultSkin .mce_formatPreview a {font-size:10px} +.defaultSkin .mce_p span.mceText {} +.defaultSkin .mce_address span.mceText {font-style:italic} +.defaultSkin .mce_pre span.mceText {font-family:monospace} +.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.defaultSkin span.mce_bold {background-position:0 0} +.defaultSkin span.mce_italic {background-position:-60px 0} +.defaultSkin span.mce_underline {background-position:-140px 0} +.defaultSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSkin span.mce_undo {background-position:-160px 0} +.defaultSkin span.mce_redo {background-position:-100px 0} +.defaultSkin span.mce_cleanup {background-position:-40px 0} +.defaultSkin span.mce_bullist {background-position:-20px 0} +.defaultSkin span.mce_numlist {background-position:-80px 0} +.defaultSkin span.mce_justifyleft {background-position:-460px 0} +.defaultSkin span.mce_justifyright {background-position:-480px 0} +.defaultSkin span.mce_justifycenter {background-position:-420px 0} +.defaultSkin span.mce_justifyfull {background-position:-440px 0} +.defaultSkin span.mce_anchor {background-position:-200px 0} +.defaultSkin span.mce_indent {background-position:-400px 0} +.defaultSkin span.mce_outdent {background-position:-540px 0} +.defaultSkin span.mce_link {background-position:-500px 0} +.defaultSkin span.mce_unlink {background-position:-640px 0} +.defaultSkin span.mce_sub {background-position:-600px 0} +.defaultSkin span.mce_sup {background-position:-620px 0} +.defaultSkin span.mce_removeformat {background-position:-580px 0} +.defaultSkin span.mce_newdocument {background-position:-520px 0} +.defaultSkin span.mce_image {background-position:-380px 0} +.defaultSkin span.mce_help {background-position:-340px 0} +.defaultSkin span.mce_code {background-position:-260px 0} +.defaultSkin span.mce_hr {background-position:-360px 0} +.defaultSkin span.mce_visualaid {background-position:-660px 0} +.defaultSkin span.mce_charmap {background-position:-240px 0} +.defaultSkin span.mce_paste {background-position:-560px 0} +.defaultSkin span.mce_copy {background-position:-700px 0} +.defaultSkin span.mce_cut {background-position:-680px 0} +.defaultSkin span.mce_blockquote {background-position:-220px 0} +.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0} +.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0} +.defaultSkin .mce_forecolorpicker {background-position:-720px 0} +.defaultSkin .mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.defaultSkin span.mce_advhr {background-position:-0px -20px} +.defaultSkin span.mce_ltr {background-position:-20px -20px} +.defaultSkin span.mce_rtl {background-position:-40px -20px} +.defaultSkin span.mce_emotions {background-position:-60px -20px} +.defaultSkin span.mce_fullpage {background-position:-80px -20px} +.defaultSkin span.mce_fullscreen {background-position:-100px -20px} +.defaultSkin span.mce_iespell {background-position:-120px -20px} +.defaultSkin span.mce_insertdate {background-position:-140px -20px} +.defaultSkin span.mce_inserttime {background-position:-160px -20px} +.defaultSkin span.mce_absolute {background-position:-180px -20px} +.defaultSkin span.mce_backward {background-position:-200px -20px} +.defaultSkin span.mce_forward {background-position:-220px -20px} +.defaultSkin span.mce_insert_layer {background-position:-240px -20px} +.defaultSkin span.mce_insertlayer {background-position:-260px -20px} +.defaultSkin span.mce_movebackward {background-position:-280px -20px} +.defaultSkin span.mce_moveforward {background-position:-300px -20px} +.defaultSkin span.mce_media {background-position:-320px -20px} +.defaultSkin span.mce_nonbreaking {background-position:-340px -20px} +.defaultSkin span.mce_pastetext {background-position:-360px -20px} +.defaultSkin span.mce_pasteword {background-position:-380px -20px} +.defaultSkin span.mce_selectall {background-position:-400px -20px} +.defaultSkin span.mce_preview {background-position:-420px -20px} +.defaultSkin span.mce_print {background-position:-440px -20px} +.defaultSkin span.mce_cancel {background-position:-460px -20px} +.defaultSkin span.mce_save {background-position:-480px -20px} +.defaultSkin span.mce_replace {background-position:-500px -20px} +.defaultSkin span.mce_search {background-position:-520px -20px} +.defaultSkin span.mce_styleprops {background-position:-560px -20px} +.defaultSkin span.mce_table {background-position:-580px -20px} +.defaultSkin span.mce_cell_props {background-position:-600px -20px} +.defaultSkin span.mce_delete_table {background-position:-620px -20px} +.defaultSkin span.mce_delete_col {background-position:-640px -20px} +.defaultSkin span.mce_delete_row {background-position:-660px -20px} +.defaultSkin span.mce_col_after {background-position:-680px -20px} +.defaultSkin span.mce_col_before {background-position:-700px -20px} +.defaultSkin span.mce_row_after {background-position:-720px -20px} +.defaultSkin span.mce_row_before {background-position:-740px -20px} +.defaultSkin span.mce_merge_cells {background-position:-760px -20px} +.defaultSkin span.mce_table_props {background-position:-980px -20px} +.defaultSkin span.mce_row_props {background-position:-780px -20px} +.defaultSkin span.mce_split_cells {background-position:-800px -20px} +.defaultSkin span.mce_template {background-position:-820px -20px} +.defaultSkin span.mce_visualchars {background-position:-840px -20px} +.defaultSkin span.mce_abbr {background-position:-860px -20px} +.defaultSkin span.mce_acronym {background-position:-880px -20px} +.defaultSkin span.mce_attribs {background-position:-900px -20px} +.defaultSkin span.mce_cite {background-position:-920px -20px} +.defaultSkin span.mce_del {background-position:-940px -20px} +.defaultSkin span.mce_ins {background-position:-960px -20px} +.defaultSkin span.mce_pagebreak {background-position:0 -40px} +.defaultSkin .mce_spellchecker span.mceAction {background-position:-540px -20px} diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css new file mode 100644 index 0000000..a776ac9 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css @@ -0,0 +1,25 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;} +img {border:0;} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css new file mode 100644 index 0000000..e630fa7 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css @@ -0,0 +1,113 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(../default/img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +} + +#insert {background:url(../default/img/buttons.png) 0 -52px;} +#cancel {background:url(../default/img/buttons.png) 0 0;} + +/* Browse */ +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png Binary files differnew file mode 100644 index 0000000..12cfb41 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png Binary files differnew file mode 100644 index 0000000..8996c74 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png Binary files differnew file mode 100644 index 0000000..bd5d255 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css new file mode 100644 index 0000000..6a83b08 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css @@ -0,0 +1,211 @@ +/* Reset */ +.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.o2k7Skin table td {vertical-align:middle} + +/* Containers */ +.o2k7Skin table {background:#E5EFFD} +.o2k7Skin iframe {display:block; background:#FFF} +.o2k7Skin .mceToolbar {height:26px} + +/* External */ +.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none} +.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD} +.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD} +.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD} +.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0} +.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD} +.o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} +.o2k7Skin .mceStatusbar div {float:left; padding:2px} +.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.o2k7Skin .mceStatusbar a:hover {text-decoration:underline} +.o2k7Skin table.mceToolbar {margin-left:3px} +.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;} +.o2k7Skin .mceToolbar td.mceFirst span {margin:0} +.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px} +.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none} +.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px} +.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.o2k7Skin td.mceCenter {text-align:center;} +.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;} +.o2k7Skin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px} +.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px} +.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px} +.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px} +.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px} +.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30)} + +/* Separator */ +.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} + +/* ListBox */ +.o2k7Skin .mceListBox {margin-left:3px} +.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block} +.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0} +.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF} +.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px} +.o2k7Skin .mceListBoxDisabled .mceText {color:gray} +.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px} +.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;} + +/* SplitButton */ +.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px} +.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)} +.o2k7Skin .mceSplitButton a.mceAction {width:22px} +.o2k7Skin .mceSplitButton span.mceAction {width:22px; background:url(../../img/icons.gif) 20px 20px} +.o2k7Skin .mceSplitButton a.mceOpen {width:10px} +.o2k7Skin .mceSplitButton span.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0} +.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px} +.o2k7Skin table.mceSplitButtonEnabled:hover span.mceOpen, .o2k7Skin .mceSplitButtonHover span.mceOpen, .o2k7Skin .mceSplitButtonSelected span.mceOpen {background-position:-44px -44px} +.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; filter:alpha(opacity=30)} +.o2k7Skin .mceSplitButtonActive {background-position:0 -44px} + +/* ColorSplitButton */ +.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.o2k7Skin .mceColorSplitMenu td {padding:2px} +.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A} +.o2k7Skin .mceColorPreview {position:absolute; top:15px; left:2px; width:16px; height:4px; overflow:hidden} +.o2k7Skin .mce_forecolor, .o2k7Skin .mce_backcolor {position:relative} + +/* Menu */ +.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD} +.o2k7Skin .mceNoIcons span.mceIcon {width:0;} +.o2k7Skin .mceNoIcons a .mceText {padding-left:10px} +.o2k7Skin .mceMenu table {background:#FFF} +.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block} +.o2k7Skin .mceMenu td {height:20px} +.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0} +.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px} +.o2k7Skin .mceMenu pre.mceText {font-family:Monospace} +.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px} +.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD} +.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.o2k7Skin .mceMenuItemDisabled .mceText {color:#888} +.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)} +.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center} +.o2k7Skin .mceMenu span.mceMenuLine {display:none} +.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; filter:alpha(opacity=50); background:#FFF} +.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +.o2k7Skin .mcePlaceHolder {border:1px dotted gray} + +/* Formats */ +.o2k7Skin .mce_formatPreview a {font-size:10px} +.o2k7Skin .mce_p span.mceText {} +.o2k7Skin .mce_address span.mceText {font-style:italic} +.o2k7Skin .mce_pre span.mceText {font-family:monospace} +.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.o2k7Skin span.mce_bold {background-position:0 0} +.o2k7Skin span.mce_italic {background-position:-60px 0} +.o2k7Skin span.mce_underline {background-position:-140px 0} +.o2k7Skin span.mce_strikethrough {background-position:-120px 0} +.o2k7Skin span.mce_undo {background-position:-160px 0} +.o2k7Skin span.mce_redo {background-position:-100px 0} +.o2k7Skin span.mce_cleanup {background-position:-40px 0} +.o2k7Skin span.mce_bullist {background-position:-20px 0} +.o2k7Skin span.mce_numlist {background-position:-80px 0} +.o2k7Skin span.mce_justifyleft {background-position:-460px 0} +.o2k7Skin span.mce_justifyright {background-position:-480px 0} +.o2k7Skin span.mce_justifycenter {background-position:-420px 0} +.o2k7Skin span.mce_justifyfull {background-position:-440px 0} +.o2k7Skin span.mce_anchor {background-position:-200px 0} +.o2k7Skin span.mce_indent {background-position:-400px 0} +.o2k7Skin span.mce_outdent {background-position:-540px 0} +.o2k7Skin span.mce_link {background-position:-500px 0} +.o2k7Skin span.mce_unlink {background-position:-640px 0} +.o2k7Skin span.mce_sub {background-position:-600px 0} +.o2k7Skin span.mce_sup {background-position:-620px 0} +.o2k7Skin span.mce_removeformat {background-position:-580px 0} +.o2k7Skin span.mce_newdocument {background-position:-520px 0} +.o2k7Skin span.mce_image {background-position:-380px 0} +.o2k7Skin span.mce_help {background-position:-340px 0} +.o2k7Skin span.mce_code {background-position:-260px 0} +.o2k7Skin span.mce_hr {background-position:-360px 0} +.o2k7Skin span.mce_visualaid {background-position:-660px 0} +.o2k7Skin span.mce_charmap {background-position:-240px 0} +.o2k7Skin span.mce_paste {background-position:-560px 0} +.o2k7Skin span.mce_copy {background-position:-700px 0} +.o2k7Skin span.mce_cut {background-position:-680px 0} +.o2k7Skin span.mce_blockquote {background-position:-220px 0} +.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0} +.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0} +.o2k7Skin .mce_forecolorpicker {background-position:-720px 0} +.o2k7Skin .mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.o2k7Skin span.mce_advhr {background-position:-0px -20px} +.o2k7Skin span.mce_ltr {background-position:-20px -20px} +.o2k7Skin span.mce_rtl {background-position:-40px -20px} +.o2k7Skin span.mce_emotions {background-position:-60px -20px} +.o2k7Skin span.mce_fullpage {background-position:-80px -20px} +.o2k7Skin span.mce_fullscreen {background-position:-100px -20px} +.o2k7Skin span.mce_iespell {background-position:-120px -20px} +.o2k7Skin span.mce_insertdate {background-position:-140px -20px} +.o2k7Skin span.mce_inserttime {background-position:-160px -20px} +.o2k7Skin span.mce_absolute {background-position:-180px -20px} +.o2k7Skin span.mce_backward {background-position:-200px -20px} +.o2k7Skin span.mce_forward {background-position:-220px -20px} +.o2k7Skin span.mce_insert_layer {background-position:-240px -20px} +.o2k7Skin span.mce_insertlayer {background-position:-260px -20px} +.o2k7Skin span.mce_movebackward {background-position:-280px -20px} +.o2k7Skin span.mce_moveforward {background-position:-300px -20px} +.o2k7Skin span.mce_media {background-position:-320px -20px} +.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px} +.o2k7Skin span.mce_pastetext {background-position:-360px -20px} +.o2k7Skin span.mce_pasteword {background-position:-380px -20px} +.o2k7Skin span.mce_selectall {background-position:-400px -20px} +.o2k7Skin span.mce_preview {background-position:-420px -20px} +.o2k7Skin span.mce_print {background-position:-440px -20px} +.o2k7Skin span.mce_cancel {background-position:-460px -20px} +.o2k7Skin span.mce_save {background-position:-480px -20px} +.o2k7Skin span.mce_replace {background-position:-500px -20px} +.o2k7Skin span.mce_search {background-position:-520px -20px} +.o2k7Skin span.mce_styleprops {background-position:-560px -20px} +.o2k7Skin span.mce_table {background-position:-580px -20px} +.o2k7Skin span.mce_cell_props {background-position:-600px -20px} +.o2k7Skin span.mce_delete_table {background-position:-620px -20px} +.o2k7Skin span.mce_delete_col {background-position:-640px -20px} +.o2k7Skin span.mce_delete_row {background-position:-660px -20px} +.o2k7Skin span.mce_col_after {background-position:-680px -20px} +.o2k7Skin span.mce_col_before {background-position:-700px -20px} +.o2k7Skin span.mce_row_after {background-position:-720px -20px} +.o2k7Skin span.mce_row_before {background-position:-740px -20px} +.o2k7Skin span.mce_merge_cells {background-position:-760px -20px} +.o2k7Skin span.mce_table_props {background-position:-980px -20px} +.o2k7Skin span.mce_row_props {background-position:-780px -20px} +.o2k7Skin span.mce_split_cells {background-position:-800px -20px} +.o2k7Skin span.mce_template {background-position:-820px -20px} +.o2k7Skin span.mce_visualchars {background-position:-840px -20px} +.o2k7Skin span.mce_abbr {background-position:-860px -20px} +.o2k7Skin span.mce_acronym {background-position:-880px -20px} +.o2k7Skin span.mce_attribs {background-position:-900px -20px} +.o2k7Skin span.mce_cite {background-position:-920px -20px} +.o2k7Skin span.mce_del {background-position:-940px -20px} +.o2k7Skin span.mce_ins {background-position:-960px -20px} +.o2k7Skin span.mce_pagebreak {background-position:0 -40px} +.o2k7Skin .mce_spellchecker span.mceAction {background-position:-540px -20px} diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css new file mode 100644 index 0000000..caa7dbb --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css @@ -0,0 +1,8 @@ +/* Black */ +.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton span.mceOpen, .o2k7SkinBlack .mceListBox .mceOpen {background-image:url(img/button_bg_black.png)} +.o2k7SkinBlack table, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} +.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0} +.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0} +.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;} +.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)} +.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#FFE7A1}
\ No newline at end of file diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css new file mode 100644 index 0000000..bf3c479 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css @@ -0,0 +1,5 @@ +/* Silver */ +.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton span.mceOpen, .o2k7SkinSilver .mceListBox .mceOpen {background-image:url(img/button_bg_silver.png)} +.o2k7SkinSilver table, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} +.o2k7SkinSilver .mceListBox .mceText {background:#FFF} +.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb} diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css new file mode 100644 index 0000000..3ad3e01 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css @@ -0,0 +1,19 @@ +body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px; } +body.mceContentBody {background:#FFF; color:#000;} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} +img {border:0;} + +/* IE +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} +*/
\ No newline at end of file diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css new file mode 100644 index 0000000..7df59cd --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css @@ -0,0 +1,119 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +/*scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5;*/ +background:#eaf3ea; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#eaf3ea;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.mceButton, .updateButton { +border: 1px solid #bbb; +margin:0; +padding:0 0 1px; +font-weight:bold; +font-size: 11px; +width:94px; +height:24px; +background:url(img/fade-butt.png) 0 0; +cursor:pointer; +} +#insert:hover, #cancel:hover, input.mceButton:hover, .updateButton:hover, +#insert:focus, #cancel:focus, input.mceButton:focus, .updateButton:focus { +border: 1px solid #555; +} + +/* Browse */ +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} +#charmap #charmapView {background-color:#fff;} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
\ No newline at end of file diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/butt2.png b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/butt2.png Binary files differnew file mode 100644 index 0000000..df90439 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/butt2.png diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/button_bg.png b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/button_bg.png Binary files differnew file mode 100644 index 0000000..12cfb41 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/button_bg.png diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/down_arrow.gif b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/down_arrow.gif Binary files differnew file mode 100644 index 0000000..687b241 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/down_arrow.gif diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png Binary files differnew file mode 100644 index 0000000..42f08b7 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png diff --git a/wp-includes/js/tinymce/themes/advanced/images/separator.gif b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/separator.gif Binary files differindex 4f39b80..4f39b80 100644 --- a/wp-includes/js/tinymce/themes/advanced/images/separator.gif +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/separator.gif diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif Binary files differnew file mode 100644 index 0000000..ce4be63 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css new file mode 100644 index 0000000..9106dfb --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css @@ -0,0 +1,370 @@ +/* Reset */ +.wp_themeSkin table, .wp_themeSkin tbody, .wp_themeSkin a, .wp_themeSkin img, .wp_themeSkin tr, .wp_themeSkin div, .wp_themeSkin td, .wp_themeSkin iframe, .wp_themeSkin span, .wp_themeSkin *, .wp_themeSkin .mceText { +border:0; margin:0; padding:0; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; vertical-align:baseline; width:auto; border-collapse:separate; +} +.wp_themeSkin a:hover, .wp_themeSkin a:link, .wp_themeSkin a:visited, .wp_themeSkin a:active {text-decoration:none; font-weight:normal; cursor:default;} +.wp_themeSkin table td {vertical-align:middle} + +/* Containers */ +.wp_themeSkin table {} +.wp_themeSkin iframe {display:block;} +.wp_themeSkin .mceToolbar {padding: 2px;} + +/* External */ +.wp_themeSkin .mceExternalToolbar {position:absolute; border-bottom:0; display:none} +.wp_themeSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.wp_themeSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.wp_themeSkin table.mceToolbar, .wp_themeSkin tr.mceFirst .mceToolbar tr td, .wp_themeSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0} +.wp_themeSkin table.mceLayout {border:0;} +.wp_themeSkin .mceIframeContainer {} +.wp_themeSkin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible;height:20px;} +.wp_themeSkin .mceStatusbar div {float:left; padding:2px;} +.wp_themeSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.wp_themeSkin .mceStatusbar a:hover {text-decoration:underline} +.wp_themeSkin table.mceToolbar {margin: 0 2px 2px;} +.wp_themeSkin #content_toolbar1 {margin-top: 2px;} +.wp_themeSkin .mceToolbar .mceToolbarEndListBox span {display:none} +.wp_themeSkin span.mceIcon, .wp_themeSkin img.mceIcon {display:block; width:20px; height:20px} +.wp_themeSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} + +/* Button */ +.wp_themeSkin .mceButton { + display:block; + width: 20px; + height: 20px; + cursor: default; + padding: 1px 2px; + margin: 1px; + background-image: url(img/butt2.png); + background-position: 2px 1px; + background-repeat: no-repeat; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; + border-radius: 3px; +} +.wp_themeSkin a.mceButton span, .wp_themeSkin a.mceButton img {} +.wp_themeSkin .mceOldBoxModel a.mceButton span, .wp_themeSkin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px} +.wp_themeSkin a.mceButtonEnabled:hover { + background-position:0 -20px; +} +.wp_themeSkin a.mceButtonActive, .wp_themeSkin a.mceButtonSelected { + background-position:0 -20px; +} +.wp_themeSkin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30);} +.wp_themeSkin .mceButtonDisabled {} + +/* Separator */ +.wp_themeSkin .mceSeparator { + height: 24px; + width: 1px; + display: block; + background: transparent; + overflow: hidden; + margin: 0 2px; +} + +/* ListBox */ +.wp_themeSkin .mceListBox, .wp_themeSkin .mceListBox a {display:block} +.wp_themeSkin .mceListBox .mceText { + padding: 1px 2px 1px 5px; + text-align:left; + text-decoration: none !important; + width:70px; + background-image: url(img/butt2.png); + background-position: 1px 1px; + background-repeat: repeat-x; + font-family: Tahoma,Verdana,Arial,Helvetica; + font-size: 11px; + height: 20px; + line-height: 20px; + overflow: hidden; +} +.wp_themeSkin .mceListBox { + margin: 1px; + direction: ltr; +} +.wp_themeSkin .mceListBox .mceOpen { + width: 14px; + height: 20px; + border-collapse: separate; + background-image: url(img/butt2.png); + background-position: 1px 1px; + background-repeat: repeat-x; + padding: 1px; + border-left: 0 none !important; +} +.wp_themeSkin .mceListBox .mceOpen span { + display: block; + width:14px; + height:20px; + background-image: url(img/down_arrow.gif); + background-position: 2px 1px; + background-repeat: no-repeat; +} +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin .mceListBoxHover .mceText, +.wp_themeSkin .mceListBoxSelected .mceText, +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin .mceListBoxHover .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceOpen { + background-image: none; +} +.wp_themeSkin .mceListBoxDisabled .mceText {color:gray} +.wp_themeSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.wp_themeSkin .mceOldBoxModel .mceListBox .mceText {height:22px} +.wp_themeSkin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px;} + +/* SplitButton */ +.wp_themeSkin .mceSplitButton a, .wp_themeSkin .mceSplitButton span {display:block; height:20px} +.wp_themeSkin .mceSplitButton { + display:block; + margin: 1px; + direction: ltr; +} +.wp_themeSkin table.mceSplitButton td { + padding: 2px; +} +.wp_themeSkin .mceSplitButton a.mceAction { + height:20px; + width:20px; + background-image: url(img/butt2.png); + background-position: 1px 1px; + background-repeat: repeat-x; + padding: 1px 2px; +} +.wp_themeSkin .mceSplitButton span.mceAction { + background: url(../../img/icons.gif) 20px 20px; + width:20px; +} +.wp_themeSkin .mceSplitButton a.mceOpen { + width:10px; + height:20px; + border-collapse:separate; + background-image: url(img/butt2.png); + background-position: 1px 1px; + background-repeat: repeat-x; + padding: 1px; + border-left: 0 none !important; +} +.wp_themeSkin .mceSplitButton span.mceOpen { + width:10px; + background-image: url(img/down_arrow.gif); + background-position: 0px 1px; + background-repeat: no-repeat; + border-collapse:separate; + border-left: 0 none !important; +} +.wp_themeSkin .mceSplitButton a.mceOpen:hover, +.wp_themeSkin .mceSplitButtonSelected a.mceOpen, +.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, +.wp_themeSkin .mceSplitButton a.mceAction:hover { + background-image: none; +} +.wp_themeSkin table.mceSplitButtonEnabled:hover span.mceOpen, +.wp_themeSkin .mceSplitButtonHover span.mceOpen, +.wp_themeSkin .mceSplitButtonSelected span.mceOpen { +} +.wp_themeSkin .mceSplitButtonDisabled .mceAction { + opacity:0.3; filter:alpha(opacity=30); +} +.wp_themeSkin .mceListBox a.mceText, .wp_themeSkin .mceSplitButton a.mceAction { + -moz-border-radius-bottomleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; +} +.wp_themeSkin .mceSplitButton a.mceOpen, .wp_themeSkin .mceListBox a.mceOpen { + -moz-border-radius-bottomright: 3px; + -webkit-border-bottom-right-radius: 3px; + -khtml-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -webkit-border-top-right-radius: 3px; + -khtml-border-top-right-radius: 3px; + border-top-right-radius: 3px; +} + +/* ColorSplitButton */ +.wp_themeSkin div.mceColorSplitMenu table {} +.wp_themeSkin .mceColorSplitMenu td {padding:2px} +.wp_themeSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden;} +.wp_themeSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px;} +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover {} +.wp_themeSkin a.mceMoreColors:hover {} +.wp_themeSkin .mceColorPreview {position:absolute; top:15px; left:2px; width:16px; height:4px; overflow:hidden} + +/* Menu */ +.wp_themeSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000;} +.wp_themeSkin .mceNoIcons span.mceIcon {width:0;} +.wp_themeSkin .mceNoIcons a .mceText {padding-left:10px} +.wp_themeSkin .mceMenu table {} +.wp_themeSkin .mceMenu a, .wp_themeSkin .mceMenu span, .wp_themeSkin .mceMenu {display:block} +.wp_themeSkin .mceMenu td {height:20px;overflow:hidden;} +.wp_themeSkin .mceMenu a { + position:relative; + padding:3px 0 4px 0; + text-decoration: none !important; +} +.wp_themeSkin .mceMenu .mceText { + position:relative; + display:block; + font-family:Tahoma,Verdana,Arial,Helvetica; + cursor:default; + margin:0; + padding:0 25px; +} +.wp_themeSkin .mceMenu span.mceText, .wp_themeSkin .mceMenu .mcePreview {font-size:11px} +.wp_themeSkin .mceMenu pre.mceText {font-family:Monospace} +.wp_themeSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, +.wp_themeSkin .mceMenu .mceMenuItemActive {} +.wp_themeSkin td.mceMenuItemSeparator {height:1px} +.wp_themeSkin .mceMenuItemTitle a { + border-top: 0; + border-right: 0; + border-left: 0; + border-bottom-style: solid; + border-bottom-width: 1px; + text-decoration: none !important; +} +.wp_themeSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px} +.wp_themeSkin .mceMenuItemDisabled .mceText {} +.wp_themeSkin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)} +.wp_themeSkin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center} +.wp_themeSkin .mceMenu span.mceMenuLine {display:none} +.wp_themeSkin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.wp_themeSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; filter:alpha(opacity=50); background:#FFF} +.wp_themeSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +.wp_themeSkin .mcePlaceHolder {border:1px dotted gray} + +/* Theme */ +.wp_themeSkin span.mce_bold {background-position:0 0} +.wp_themeSkin span.mce_italic {background-position:-60px 0} +.wp_themeSkin span.mce_underline {background-position:-140px 0} +.wp_themeSkin span.mce_strikethrough {background-position:-120px 0} +.wp_themeSkin span.mce_undo {background-position:-160px 0} +.wp_themeSkin span.mce_redo {background-position:-100px 0} +.wp_themeSkin span.mce_cleanup {background-position:-40px 0} +.wp_themeSkin span.mce_bullist {background-position:-20px 0} +.wp_themeSkin span.mce_numlist {background-position:-80px 0} +.wp_themeSkin span.mce_justifyleft {background-position:-460px 0} +.wp_themeSkin span.mce_justifyright {background-position:-480px 0} +.wp_themeSkin span.mce_justifycenter {background-position:-420px 0} +.wp_themeSkin span.mce_justifyfull {background-position:-440px 0} +.wp_themeSkin span.mce_anchor {background-position:-200px 0} +.wp_themeSkin span.mce_indent {background-position:-400px 0} +.wp_themeSkin span.mce_outdent {background-position:-540px 0} +.wp_themeSkin span.mce_link {background-position:-500px 0} +.wp_themeSkin span.mce_unlink {background-position:-640px 0} +.wp_themeSkin span.mce_sub {background-position:-600px 0} +.wp_themeSkin span.mce_sup {background-position:-620px 0} +.wp_themeSkin span.mce_removeformat {background-position:-580px 0} +.wp_themeSkin span.mce_newdocument {background-position:-520px 0} +.wp_themeSkin span.mce_image {background-position:-380px 0} +.wp_themeSkin span.mce_help {background-position:-340px 0} +.wp_themeSkin span.mce_code {background-position:-260px 0} +.wp_themeSkin span.mce_hr {background-position:-360px 0} +.wp_themeSkin span.mce_visualaid {background-position:-660px 0} +.wp_themeSkin span.mce_charmap {background-position:-240px 0} +.wp_themeSkin span.mce_paste {background-position:-560px 0} +.wp_themeSkin span.mce_copy {background-position:-700px 0} +.wp_themeSkin span.mce_cut {background-position:-680px 0} +.wp_themeSkin span.mce_blockquote {background-position:-220px 0} +.wp_themeSkin .mce_forecolor span.mceAction {background-position:-720px 0} +.wp_themeSkin .mce_backcolor span.mceAction {background-position:-760px 0} +.wp_themeSkin .mce_forecolorpicker {background-position:-720px 0} +.wp_themeSkin .mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.wp_themeSkin span.mce_advhr {background-position:-0px -20px} +.wp_themeSkin span.mce_ltr {background-position:-20px -20px} +.wp_themeSkin span.mce_rtl {background-position:-40px -20px} +.wp_themeSkin span.mce_emotions {background-position:-60px -20px} +.wp_themeSkin span.mce_fullpage {background-position:-80px -20px} +.wp_themeSkin span.mce_fullscreen {background-position:-100px -20px} +.wp_themeSkin span.mce_iespell {background-position:-120px -20px} +.wp_themeSkin span.mce_insertdate {background-position:-140px -20px} +.wp_themeSkin span.mce_inserttime {background-position:-160px -20px} +.wp_themeSkin span.mce_absolute {background-position:-180px -20px} +.wp_themeSkin span.mce_backward {background-position:-200px -20px} +.wp_themeSkin span.mce_forward {background-position:-220px -20px} +.wp_themeSkin span.mce_insert_layer {background-position:-240px -20px} +.wp_themeSkin span.mce_insertlayer {background-position:-260px -20px} +.wp_themeSkin span.mce_movebackward {background-position:-280px -20px} +.wp_themeSkin span.mce_moveforward {background-position:-300px -20px} +.wp_themeSkin span.mce_media {background-position:-320px -20px} +.wp_themeSkin span.mce_nonbreaking {background-position:-340px -20px} +.wp_themeSkin span.mce_pastetext {background-position:-360px -20px} +.wp_themeSkin span.mce_pasteword {background-position:-380px -20px} +.wp_themeSkin span.mce_selectall {background-position:-400px -20px} +.wp_themeSkin span.mce_preview {background-position:-420px -20px} +.wp_themeSkin span.mce_print {background-position:-440px -20px} +.wp_themeSkin span.mce_cancel {background-position:-460px -20px} +.wp_themeSkin span.mce_save {background-position:-480px -20px} +.wp_themeSkin span.mce_replace {background-position:-500px -20px} +.wp_themeSkin span.mce_search {background-position:-520px -20px} +.wp_themeSkin span.mce_styleprops {background-position:-560px -20px} +.wp_themeSkin span.mce_table {background-position:-580px -20px} +.wp_themeSkin span.mce_cell_props {background-position:-600px -20px} +.wp_themeSkin span.mce_delete_table {background-position:-620px -20px} +.wp_themeSkin span.mce_delete_col {background-position:-640px -20px} +.wp_themeSkin span.mce_delete_row {background-position:-660px -20px} +.wp_themeSkin span.mce_col_after {background-position:-680px -20px} +.wp_themeSkin span.mce_col_before {background-position:-700px -20px} +.wp_themeSkin span.mce_row_after {background-position:-720px -20px} +.wp_themeSkin span.mce_row_before {background-position:-740px -20px} +.wp_themeSkin span.mce_merge_cells {background-position:-760px -20px} +.wp_themeSkin span.mce_table_props {background-position:-980px -20px} +.wp_themeSkin span.mce_row_props {background-position:-780px -20px} +.wp_themeSkin span.mce_split_cells {background-position:-800px -20px} +.wp_themeSkin span.mce_template {background-position:-820px -20px} +.wp_themeSkin span.mce_visualchars {background-position:-840px -20px} +.wp_themeSkin span.mce_abbr {background-position:-860px -20px} +.wp_themeSkin span.mce_acronym {background-position:-880px -20px} +.wp_themeSkin span.mce_attribs {background-position:-900px -20px} +.wp_themeSkin span.mce_cite {background-position:-920px -20px} +.wp_themeSkin span.mce_del {background-position:-940px -20px} +.wp_themeSkin span.mce_ins {background-position:-960px -20px} +.wp_themeSkin span.mce_pagebreak {background-position:0 -40px} +.wp_themeSkin .mce_spellchecker span.mceAction {background-position:-540px -20px} + +/* border */ +.wp_themeSkin .mceExternalToolbar, +.wp_themeSkin .mceButton, +.wp_themeSkin a.mceButtonEnabled:hover, +.wp_themeSkin a.mceButtonActive, +.wp_themeSkin a.mceButtonSelected, +.wp_themeSkin .mceListBox .mceText, +.wp_themeSkin .mceListBox .mceOpen, +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin .mceListBoxHover .mceText, +.wp_themeSkin .mceListBoxSelected .mceText, +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin .mceListBoxHover .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceOpen, +.wp_themeSkin select.mceListBox, +.wp_themeSkin .mceSplitButton a.mceAction, +.wp_themeSkin .mceSplitButton a.mceOpen, +.wp_themeSkin .mceSplitButton a.mceOpen:hover, +.wp_themeSkin .mceSplitButtonSelected a.mceOpen, +.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, +.wp_themeSkin .mceSplitButton a.mceAction:hover, +.wp_themeSkin div.mceColorSplitMenu table, +.wp_themeSkin .mceColorSplitMenu a, +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors, +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover, +.wp_themeSkin a.mceMoreColors:hover, +.wp_themeSkin .mceMenu { + border-style: solid; + border-width: 1px; +} diff --git a/wp-includes/js/tinymce/tiny_mce_ext.js b/wp-includes/js/tinymce/tiny_mce_ext.js new file mode 100644 index 0000000..ccea485 --- /dev/null +++ b/wp-includes/js/tinymce/tiny_mce_ext.js @@ -0,0 +1,29 @@ +tinyMCEPreInit.start = function() { + var t = this, each = tinymce.each, s = t.settings, sl = tinymce.ScriptLoader, ln = s.languages, th = s.themes; + + function load(u, sp) { + var o; + + if (!sp) + u = t.base + u; + + o = {url : u, state : 2}; + sl.queue.push(o); + sl.lookup[o.url] = o; + }; + + sl.markDone(t.base + '/langs/' + ln + '.js'); + + load('/themes/' + th + '/editor_template' + t.suffix + '.js'); + sl.markDone(t.base + '/themes/' + th + '/langs/' + ln + '.js'); + sl.markDone(t.base + '/themes/' + th + '/langs/' + ln + '_dlg.js'); + + each(s.plugins.split(','), function(n) { + if (n && n.charAt(0) != '-') { + load('/plugins/' + n + '/editor_plugin' + t.suffix + '.js'); + + sl.markDone(t.base + '/plugins/' + n + '/langs/' + ln + '.js'); + sl.markDone(t.base + '/plugins/' + n + '/langs/' + ln + '_dlg.js'); + } + }); +}; diff --git a/wp-includes/js/tinymce/wordpress.css b/wp-includes/js/tinymce/wordpress.css new file mode 100644 index 0000000..07da9ef --- /dev/null +++ b/wp-includes/js/tinymce/wordpress.css @@ -0,0 +1,29 @@ +/* This file contains the CSS data for the editable area(iframe) of TinyMCE */ + +body.mceContentBody { + background: #fff; + color: #000; + font: 13px/19px "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif; + padding: .2em; +} + +td { + font-size: 10px; +} + +pre { + font: 12px/18px "Courier New", monospace; +} + +.mceVisualAid { + border: 1px dashed #BBBBBB !important; +} + +.mceItemAnchor { + width: 12px; + line-height: 6px; + overflow: hidden; + padding-left: 12px; + background-position: bottom; + background-repeat: no-repeat; +} diff --git a/wp-includes/js/wp-ajax-response.js b/wp-includes/js/wp-ajax-response.js new file mode 100644 index 0000000..4197773 --- /dev/null +++ b/wp-includes/js/wp-ajax-response.js @@ -0,0 +1,57 @@ +wpAjax = jQuery.extend( { + unserialize: function( s ) { + var r = {}; if ( !s ) { return r; } + var q = s.split('?'); if ( q[1] ) { s = q[1]; } + var pp = s.split('&'); + for ( var i in pp ) { + if ( jQuery.isFunction(pp.hasOwnProperty) && !pp.hasOwnProperty(i) ) { continue; } + var p = pp[i].split('='); + r[p[0]] = p[1]; + } + return r; + }, + parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission + var parsed = {}; + var re = jQuery('#' + r).html(''); + if ( x && typeof x == 'object' && x.getElementsByTagName('wp_ajax') ) { + parsed.responses = []; + parsed.errors = false; + var err = ''; + jQuery('response', x).each( function() { + var th = jQuery(this); + var child = jQuery(this.firstChild); + var response = { action: th.attr('action'), what: child.get(0).nodeName, id: child.attr('id'), oldId: child.attr('old_id'), position: child.attr('position') }; + response.data = jQuery( 'response_data', child ).text(); + response.supplemental = {}; + if ( !jQuery( 'supplemental', child ).children().each( function() { + response.supplemental[this.nodeName] = jQuery(this).text(); + } ).size() ) { response.supplemental = false } + response.errors = []; + if ( !jQuery('wp_error', child).each( function() { + var code = jQuery(this).attr('code'); + var anError = { code: code, message: this.firstChild.nodeValue, data: false }; + var errorData = jQuery('wp_error_data[code="' + code + '"]', x); + if ( errorData ) { anError.data = errorData.get(); } + var formField = jQuery( 'form-field', errorData ).text(); + if ( formField ) { code = formField; } + if ( e ) { wpAjax.invalidateForm( jQuery('#' + e + ' :input[name="' + code + '"]' ).parents('.form-field:first') ); } + err += '<p>' + anError.message + '</p>'; + response.errors.push( anError ); + parsed.errors = true; + } ).size() ) { response.errors = false; } + parsed.responses.push( response ); + } ); + if ( err.length ) { re.html( '<div class="error">' + err + '</div>' ); } + return parsed; + } + if ( isNaN(x) ) { return !re.html('<div class="error"><p>' + x + '</p></div>'); } + x = parseInt(x,10); + if ( -1 == x ) { return !re.html('<div class="error"><p>' + this.noPerm + '</p></div>'); } + else if ( 0 === x ) { return !re.html('<div class="error"><p>' + this.broken + '</p></div>'); } + return true; + }, + validateForm: function( selector ) { + selector = jQuery( selector ); + return !selector.find('.form-required').andSelf().filter('.form-required:has(:input[value=""]), .form-required:input[value=""]').addClass( 'form-invalid' ).change( function() { jQuery(this).removeClass( 'form-invalid' ); } ).size(); + } +}, wpAjax || { noPerm: 'You do not have permission to do that.', broken: 'AJAX is teh b0rked.' } ); diff --git a/wp-includes/js/wp-lists.js b/wp-includes/js/wp-lists.js new file mode 100644 index 0000000..e0c5b25 --- /dev/null +++ b/wp-includes/js/wp-lists.js @@ -0,0 +1,369 @@ +(function($) { +var currentFormEl = false; +var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}; + +var wpList = { + settings: { + url: wpListL10n.url, type: 'POST', + response: 'ajax-response', + + what: '', + alt: 'alternate', altOffset: 0, + addColor: null, delColor: null, dimAddColor: null, dimDelColor: null, + + confirm: null, + addBefore: null, addAfter: null, + delBefore: null, delAfter: null, + dimBefore: null, dimAfter: null + }, + + nonce: function(e,s) { + var url = wpAjax.unserialize(e.attr('href')); + return s.nonce || url._ajax_nonce || $('#' + s.element + ' input[name=_ajax_nonce]').val() || url._wpnonce || $('#' + s.element + ' input[name=_wpnonce]').val() || 0; + }, + + parseClass: function(e,t) { + var c = [], cl; + try { + cl = $(e).attr('class') || ''; + cl = cl.match(new RegExp(t+':[A-Za-z0-9:_=-]+')); + if ( cl ) { c = cl[0].split(':'); } + } catch(r) {} + return c; + }, + + pre: function(e,s,a) { + var bg; var r; + s = $.extend( {}, this.wpList.settings, { + element: null, + nonce: 0 + }, s || {} ); + if ( $.isFunction( s.confirm ) ) { + if ( 'add' != a ) { + bg = $('#' + s.element).css('backgroundColor'); + $('#' + s.element).css('backgroundColor', '#FF9966'); + } + r = s.confirm.call(this,e,s,a,bg); + if ( 'add' != a ) { $('#' + s.element).css('backgroundColor', bg ); } + if ( !r ) { return false; } + } + return s; + }, + + ajaxAdd: function( e, s ) { + var list = this; e = $(e); s = s || {}; + var cls = wpList.parseClass(e,'add'); + s = wpList.pre.call( list, e, s, 'add' ); + + s.element = cls[2] || e.attr( 'id' ) || s.element || null; + if ( cls[3] ) { s.addColor = '#' + cls[3]; } + else { s.addColor = s.addColor || '#FFFF33'; } + + if ( !s ) { return false; } + + if ( !e.is("[class^=add:" + list.id + ":]") ) { return !wpList.add.call( list, e, s ); } + + if ( !s.element ) { return true; } + + s.action = 'add-' + s.what; + + s.nonce = wpList.nonce(e,s); + + var es = $('#' + s.element + ' :input').not('[name=_ajax_nonce], [name=_wpnonce], [name=action]'); + var valid = wpAjax.validateForm( '#' + s.element ); + if ( !valid ) { return false; } + + s.data = $.param( $.extend( { _ajax_nonce: s.nonce, action: s.action }, wpAjax.unserialize( cls[4] || '' ) ) ); + var formData = $.isFunction(es.fieldSerialize) ? es.fieldSerialize() : es.serialize(); + if ( formData ) { s.data += '&' + formData; } + + if ( $.isFunction(s.addBefore) ) { + s = s.addBefore( s ); + if ( !s ) { return true; } + } + if ( !s.data.match(/_ajax_nonce=[a-f0-9]+/) ) { return true; } + + s.success = function(r) { + var res = wpAjax.parseAjaxResponse(r, s.response, s.element); + if ( !res || res.errors ) { return false; } + + jQuery.each( res.responses, function() { + wpList.add.call( list, this.data, $.extend( {}, s, { // this.firstChild.nodevalue + pos: this.position || 0, + id: this.id || 0, + oldId: this.oldId || null + } ) ); + } ); + + if ( $.isFunction(s.addAfter) ) { + var o = this.complete; + this.complete = function(x,st) { + var _s = $.extend( { xml: x, status: st, parsed: res }, s ); + s.addAfter( r, _s ); + if ( $.isFunction(o) ) { o(x,st); } + }; + } + list.wpList.recolor(); + wpList.clear.call(list,'#' + s.element); + }; + + $.ajax( s ); + return false; + }, + + ajaxDel: function( e, s ) { + var list = this; e = $(e); s = s || {}; + var cls = wpList.parseClass(e,'delete'); + s = wpList.pre.call( list, e, s, 'delete' ); + + s.element = cls[2] || s.element || null; + if ( cls[3] ) { s.delColor = '#' + cls[3]; } + else { s.delColor = s.delColor || '#FF3333'; } + + if ( !s || !s.element ) { return false; } + + s.action = 'delete-' + s.what; + + s.nonce = wpList.nonce(e,s); + + s.data = $.extend( + { action: s.action, id: s.element.split('-').pop(), _ajax_nonce: s.nonce }, + wpAjax.unserialize( cls[4] || '' ) + ); + + if ( $.isFunction(s.delBefore) ) { + s = s.delBefore( s ); + if ( !s ) { return true; } + } + if ( !s.data._ajax_nonce ) { return true; } + + var element = $('#' + s.element); + + if ( 'none' != s.delColor ) { + var anim = 'slideUp'; + if ( element.css( 'display' ).match(/table/) ) + anim = 'fadeOut'; // Can't slideup table rows and other table elements. Known jQuery bug + element + .animate( { backgroundColor: s.delColor }, 'fast' )[anim]( 'fast' ) + .queue( function() { list.wpList.recolor(); $(this).dequeue(); } ); + } else { + list.wpList.recolor(); + } + + s.success = function(r) { + var res = wpAjax.parseAjaxResponse(r, s.response, s.element); + if ( !res || res.errors ) { + element.stop().css( 'backgroundColor', '#FF3333' ).show().queue( function() { list.wpList.recolor(); $(this).dequeue(); } ); + return false; + } + if ( $.isFunction(s.delAfter) ) { + var o = this.complete; + this.complete = function(x,st) { + element.queue( function() { + var _s = $.extend( { xml: x, status: st, parsed: res }, s ); + s.delAfter( r, _s ); + if ( $.isFunction(o) ) { o(x,st); } + } ).dequeue(); + }; + } + }; + $.ajax( s ); + return false; + }, + + ajaxDim: function( e, s ) { + var list = this; e = $(e); s = s || {}; + var cls = wpList.parseClass(e,'dim'); + s = wpList.pre.call( list, e, s, 'dim' ); + + s.element = cls[2] || s.element || null; + s.dimClass = cls[3] || s.dimClass || null; + if ( cls[4] ) { s.dimAddColor = '#' + cls[4]; } + else { s.dimAddColor = s.dimAddColor || '#FFFF33'; } + if ( cls[5] ) { s.dimDelColor = '#' + cls[5]; } + else { s.dimDelColor = s.dimDelColor || '#FF3333'; } + + if ( !s || !s.element || !s.dimClass ) { return true; } + + s.action = 'dim-' + s.what; + + s.nonce = wpList.nonce(e,s); + + s.data = $.extend( + { action: s.action, id: s.element.split('-').pop(), dimClass: s.dimClass, _ajax_nonce : s.nonce }, + wpAjax.unserialize( cls[6] || '' ) + ); + + if ( $.isFunction(s.dimBefore) ) { + s = s.dimBefore( s ); + if ( !s ) { return true; } + } + + var element = $('#' + s.element); + var isClass = element.toggleClass(s.dimClass).is('.' + s.dimClass); + var color = wpList.getColor( element ); + element.toggleClass( s.dimClass ) + var dimColor = isClass ? s.dimAddColor : s.dimDelColor; + if ( 'none' != dimColor ) { + element + .animate( { backgroundColor: dimColor }, 'fast' ) + .queue( function() { element.toggleClass(s.dimClass); $(this).dequeue(); } ) + .animate( { backgroundColor: color }, { complete: function() { $(this).css( 'backgroundColor', '' ); } } ); + } + + if ( !s.data._ajax_nonce ) { return true; } + + s.success = function(r) { + var res = wpAjax.parseAjaxResponse(r, s.response, s.element); + if ( !res || res.errors ) { + element.stop().css( 'backgroundColor', '#FF3333' )[isClass?'removeClass':'addClass'](s.dimClass).show().queue( function() { list.wpList.recolor(); $(this).dequeue(); } ); + return false; + } + if ( $.isFunction(s.dimAfter) ) { + var o = this.complete; + this.complete = function(x,st) { + element.queue( function() { + var _s = $.extend( { xml: x, status: st, parsed: res }, s ); + s.dimAfter( r, _s ); + if ( $.isFunction(o) ) { o(x,st); } + } ).dequeue(); + }; + } + }; + + $.ajax( s ); + return false; + }, + + // From jquery.color.js: jQuery Color Animation by John Resig + getColor: function( el ) { + if ( el.constructor == Object ) + el = el.get(0); + var elem = el, color, rgbaTrans = new RegExp( "rgba\\(\\s*0,\\s*0,\\s*0,\\s*0\\s*\\)", "i" ); + do { + color = jQuery.curCSS(elem, 'backgroundColor'); + if ( color != '' && color != 'transparent' && !color.match(rgbaTrans) || jQuery.nodeName(elem, "body") ) + break; + } while ( elem = elem.parentNode ); + return color || '#ffffff'; + }, + + add: function( e, s ) { + var list = $(this); + e = $(e); + + var old = false; + var _s = { pos: 0, id: 0, oldId: null }; + if ( 'string' == typeof s ) { s = { what: s }; } + s = $.extend(_s, this.wpList.settings, s); + if ( !e.size() || !s.what ) { return false; } + if ( s.oldId ) { old = $('#' + s.what + '-' + s.oldId); } + if ( s.id && ( s.id != s.oldId || !old || !old.size() ) ) { $('#' + s.what + '-' + s.id).remove(); } + + if ( old && old.size() ) { + old.replaceWith(e); + } else if ( isNaN(s.pos) ) { + var ba = 'after'; + if ( '-' == s.pos.substr(0,1) ) { + s.pos = s.pos.substr(1); + ba = 'before'; + } + var ref = list.find( '#' + s.pos ); + if ( 1 === ref.size() ) { ref[ba](e); } + else { list.append(e); } + } else if ( s.pos < 0 ) { + list.prepend(e); + } else { + list.append(e); + } + + if ( s.alt ) { + if ( ( list.children(':visible').index( e[0] ) + s.altOffset ) % 2 ) { e.removeClass( s.alt ); } + else { e.addClass( s.alt ); } + } + + if ( 'none' != s.addColor ) { + var color = wpList.getColor( e ); + e.css( 'backgroundColor', s.addColor ).animate( { backgroundColor: color }, { complete: function() { $(this).css( 'backgroundColor', '' ); } } ); + } + list.each( function() { this.wpList.process( e ); } ); + return e; + }, + + clear: function(e) { + var list = this; + e = $(e); + if ( list.wpList && e.parents( '#' + list.id ).size() ) { return; } + e.find(':input').each( function() { + if ( $(this).parents('.form-no-clear').size() ) + return; + var t = this.type.toLowerCase(); var tag = this.tagName.toLowerCase(); + if ( 'text' == t || 'password' == t || 'textarea' == tag ) { this.value = ''; } + else if ( 'checkbox' == t || 'radio' == t ) { this.checked = false; } + else if ( 'select' == tag ) { this.selectedIndex = null; } + }); + }, + + process: function(el) { + var list = this; + $("[class^=add:" + list.id + ":]", el || null) + .filter('form').submit( function() { return list.wpList.add(this); } ).end() + .not('form').click( function() { return list.wpList.add(this); } ).each( function() { + var addEl = this; + var c = wpList.parseClass(this,'add')[2] || addEl.id; + if ( !c ) { return; } + var forms = []; var ins = []; + $('#' + c + ' :input').focus( function() { currentFormEl = this; } ).blur( function() { currentFormEl = false; } ).each( function() { + ins.push(this); + $.merge(forms,$(this).parents('form')); + forms = $.unique(forms); + } ); + $(forms).submit( function() { + if ( 0 <= $.inArray(currentFormEl,ins) ) { + $(addEl).trigger( 'click' ); + $(currentFormEl).focus(); + return false; + } + } ); + } ); + $("[class^=delete:" + list.id + ":]", el || null).click( function() { return list.wpList.del(this); } ); + $("[class^=dim:" + list.id + ":]", el || null).click( function() { return list.wpList.dim(this); } ); + }, + + recolor: function() { + var list = this; + if ( !list.wpList.settings.alt ) { return; } + var items = $('.list-item:visible', list); + if ( !items.size() ) { items = $(list).children(':visible'); } + var eo = [':even',':odd']; + if ( list.wpList.settings.altOffset % 2 ) { eo.reverse(); } + items.filter(eo[0]).addClass(list.wpList.settings.alt).end().filter(eo[1]).removeClass(list.wpList.settings.alt); + }, + + init: function() { + var lists = this; + lists.wpList.process = function(a) { + lists.each( function() { + this.wpList.process(a); + } ); + }; + lists.wpList.recolor = function() { + lists.each( function() { + this.wpList.recolor(); + } ); + }; + } +}; + +$.fn.wpList = function( settings ) { + this.each( function() { + var _this = this; + this.wpList = { settings: $.extend( {}, wpList.settings, { what: wpList.parseClass(this,'list')[1] || '' }, settings ) }; + $.each( fs, function(i,f) { _this.wpList[i] = function( e, s ) { return wpList[f].call( _this, e, s ); }; } ); + } ); + wpList.init.call(this); + this.wpList.process(); + return this; +}; + +})(jQuery); |