Commit 0d4846ba authored by Frank Bergmann's avatar Frank Bergmann

- Merged stuff from Malte

parent 04c55cc0
This diff is collapsed.
/*
* WYMeditor : what you see is What You Mean web-based editor
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
* Dual licensed under the MIT (MIT-license.txt)
* and GPL (GPL-license.txt) licenses.
*
* For further information visit:
* http://www.wymeditor.org/
*
* File Name:
* jquery.wymeditor.embed.js
* Experimental embed plugin
*
* File Authors:
* Jonatan Lundin
*/
/*
* ISSUES:
* - The closing object tag seems to be stripped out...
*/
(function() {
if (WYMeditor && WYMeditor.XhtmlValidator['_tags']['param']['attributes']) {
WYMeditor.XhtmlValidator['_tags']["embed"] = {
"attributes":[
"allowscriptaccess",
"allowfullscreen",
"height",
"src",
"type",
"width"
]
};
WYMeditor.XhtmlValidator['_tags']['param']['attributes'] = {
'0':'name',
'1':'type',
'valuetype':/^(data|ref|object)$/,
'2':'valuetype',
'3':'value'
};
var XhtmlSaxListener = WYMeditor.XhtmlSaxListener;
WYMeditor.XhtmlSaxListener = function () {
var listener = XhtmlSaxListener.call(this);
listener.block_tags.push('embed');
return listener;
};
WYMeditor.XhtmlSaxListener.prototype = XhtmlSaxListener.prototype;
}
})();
/*
* WYMeditor : what you see is What You Mean web-based editor
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
* Dual licensed under the MIT (MIT-license.txt)
* and GPL (GPL-license.txt) licenses.
*
* For further information visit:
* http://www.wymeditor.org/
*
* File Name:
* jquery.wymeditor.fullscreen.js
* Fullscreen plugin for WYMeditor
*
* File Authors:
* Luis Santos (luis.santos a-t openquest dotpt)
*/
//Extend WYMeditor
WYMeditor.editor.prototype.fullscreen = function() {
var wym = this;
//construct the button's html
var html = "<li class='wym_tools_fullscreen'>"
+ "<a name='Fullscreen' href='#'"
+ " style='background-image:"
+ " url(" + wym._options.basePath +"plugins/fullscreen/icon_fullscreen.gif)'>"
+ "Fullscreen"
+ "</a></li>";
//add the button to the tools box
jQuery(wym._box)
.find(wym._options.toolsSelector + wym._options.toolsListSelector)
.append(html);
//handle click event
jQuery(wym._box).find('li.wym_tools_fullscreen a').click(function() {
if (jQuery(wym._box).css('position') != 'fixed') {
jQuery('body').append('<div id="loader"></div>');
jQuery('#loader').css({'position' : 'fixed', 'background-color': 'rgb(0, 0, 0)', 'opacity': '0.8', 'z-index': '98', 'width': '100%', 'height': '100%', 'top': '0px', 'left': '0px'});
jQuery(wym._box).css({'position' : 'fixed', 'z-index' : '99', 'top': '5%', 'left': '5%', 'width': '90%', 'height': '90%'});
} else {
jQuery('#loader').remove();
jQuery(wym._box).css({'position' : 'static', 'z-index' : '99', 'height' : '100%', 'width' : '100%', 'top': '0px', 'left': '0px'});
}
return(false);
});
};
/*
* WYMeditor : what you see is What You Mean web-based editor
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
* Dual licensed under the MIT (MIT-license.txt)
* and GPL (GPL-license.txt) licenses.
*
* For further information visit:
* http://www.wymeditor.org/
*
* File Name:
* screen.css
* main stylesheet for the WYMeditor skin
* See the documentation for more info.
*
* File Authors:
* Daniel Reszka (d.reszka a-t wymeditor dotorg)
* Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)
*/
/*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/
.wym_skin_compact p, .wym_skin_compact h2, .wym_skin_compact h3,
.wym_skin_compact ul, .wym_skin_compact li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; }
/*HIDDEN BY DEFAULT*/
.wym_skin_compact .wym_area_left { display: none; }
.wym_skin_compact .wym_area_right { display: none; }
/*TYPO*/
.wym_skin_compact { font-size: 10px; font-family: Verdana, Arial, sans-serif; }
.wym_skin_compact h2 { font-size: 110%; /* = 11px */}
.wym_skin_compact h3 { font-size: 100%; /* = 10px */}
.wym_skin_compact li { font-size: 100%; /* = 10px */}
/*WYM_BOX*/
.wym_skin_compact { border: 1px solid gray; padding: 5px}
/*auto-clear the wym_box*/
.wym_skin_compact:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
* html .wym_skin_compact { height: 1%;}
/*WYM_HTML*/
.wym_skin_compact .wym_html { width: 98%;}
.wym_skin_compact .wym_html textarea { font-size: 120%; width: 100%; height: 200px; border: 1px solid gray; background: white; }
/*WYM_IFRAME*/
.wym_skin_compact .wym_iframe { width: 98%;}
.wym_skin_compact .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid gray; background: white }
/*AREAS*/
.wym_skin_compact .wym_area_left { width: 100px; float: left;}
.wym_skin_compact .wym_area_right { width: 150px; float: right;}
.wym_skin_compact .wym_area_bottom { height: 1%; clear: both;}
* html .wym_skin_compact .wym_area_main { height: 1%;}
* html .wym_skin_compact .wym_area_top { height: 1%;}
*+html .wym_skin_compact .wym_area_top { height: 1%;}
/*SECTIONS SYSTEM*/
/*common defaults for all sections*/
.wym_skin_compact .wym_section { margin-bottom: 5px; }
.wym_skin_compact .wym_section h2,
.wym_skin_compact .wym_section h3 { padding: 1px 3px; margin: 0; }
.wym_skin_compact .wym_section a { padding: 0 3px; display: block; text-decoration: none; color: black; }
.wym_skin_compact .wym_section a:hover { background-color: yellow; }
/*hide section titles by default*/
.wym_skin_compact .wym_section h2 { display: none; }
/*disable any margin-collapse*/
.wym_skin_compact .wym_section { padding-top: 1px; padding-bottom: 1px; }
/*auto-clear sections*/
.wym_skin_compact .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
* html .wym_skin_compact .wym_section ul { height: 1%;}
/*option: add this class to a section to make it render as a panel*/
.wym_skin_compact .wym_panel { }
.wym_skin_compact .wym_panel h2 { display: block; }
/*option: add this class to a section to make it render as a dropdown menu*/
.wym_skin_compact .wym_dropdown h2 { display: block; }
.wym_skin_compact .wym_dropdown ul { display: none; position: absolute; background: white; }
.wym_skin_compact .wym_dropdown:hover ul,
.wym_skin_compact .wym_dropdown.hover ul { display: block; }
/*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/
.wym_skin_compact .wym_buttons li { float:left;}
.wym_skin_compact .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px }
/*image replacements*/
.wym_skin_compact .wym_buttons li a { background: url(icons.png) no-repeat; text-indent: -9999px;}
.wym_skin_compact .wym_buttons li.wym_tools_strong a { background-position: 0 -382px;}
.wym_skin_compact .wym_buttons li.wym_tools_emphasis a { background-position: 0 -22px;}
.wym_skin_compact .wym_buttons li.wym_tools_superscript a { background-position: 0 -430px;}
.wym_skin_compact .wym_buttons li.wym_tools_subscript a { background-position: 0 -454px;}
.wym_skin_compact .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;}
.wym_skin_compact .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;}
.wym_skin_compact .wym_buttons li.wym_tools_indent a { background-position: 0 -574px;}
.wym_skin_compact .wym_buttons li.wym_tools_outdent a { background-position: 0 -598px;}
.wym_skin_compact .wym_buttons li.wym_tools_undo a { background-position: 0 -502px;}
.wym_skin_compact .wym_buttons li.wym_tools_redo a { background-position: 0 -526px;}
.wym_skin_compact .wym_buttons li.wym_tools_link a { background-position: 0 -96px;}
.wym_skin_compact .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;}
.wym_skin_compact .wym_buttons li.wym_tools_image a { background-position: 0 -121px;}
.wym_skin_compact .wym_buttons li.wym_tools_table a { background-position: 0 -144px;}
.wym_skin_compact .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;}
.wym_skin_compact .wym_buttons li.wym_tools_html a { background-position: 0 -193px;}
.wym_skin_compact .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;}
/*DECORATION*/
.wym_skin_compact .wym_section h2 { background: #f0f0f0; border: solid gray; border-width: 0 0 1px;}
.wym_skin_compact .wym_section h2 span { color: gray;}
.wym_skin_compact .wym_panel { padding: 0; border: solid gray; border-width: 1px; background: white;}
.wym_skin_compact .wym_panel ul { margin: 2px 0 5px; }
.wym_skin_compact .wym_dropdown { padding: 0; border: solid gray; border-width: 1px 1px 0 1px; }
.wym_skin_compact .wym_dropdown ul { border: solid gray; border-width: 0 1px 1px 1px; margin-left: -1px; padding: 5px 10px 5px 3px;}
/*DIALOGS*/
.wym_dialog div.row { margin-bottom: 5px;}
.wym_dialog div.row input { margin-right: 5px;}
.wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; }
.wym_dialog div.row-indent { padding-left: 160px; }
/*autoclearing*/
.wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.wym_dialog div.row { display: inline-block; }
/* Hides from IE-mac \*/
* html .wym_dialog div.row { height: 1%; }
.wym_dialog div.row { display: block; }
/* End hide from IE-mac */
/*WYMEDITOR_LINK*/
a.wym_wymeditor_link { text-indent: -9999px; float: right; display: block; width: 50px; height: 15px; background: url(../wymeditor_icon.png); overflow: hidden; text-decoration: none; }
WYMeditor.SKINS['compact'] = {
init: function(wym) {
//move the containers panel to the top area
jQuery(wym._options.containersSelector + ', '
+ wym._options.classesSelector, wym._box)
.appendTo( jQuery("div.wym_area_top", wym._box) )
.addClass("wym_dropdown")
.css({"margin-right": "10px", "width": "120px", "float": "left"});
//render following sections as buttons
jQuery(wym._options.toolsSelector, wym._box)
.addClass("wym_buttons")
.css({"margin-right": "10px", "float": "left"});
//make hover work under IE < 7
jQuery(".wym_section", wym._box).hover(function(){
jQuery(this).addClass("hover");
},function(){
jQuery(this).removeClass("hover");
});
var postInit = wym._options.postInit;
wym._options.postInit = function(wym) {
if(postInit) postInit.call(wym, wym);
var rule = {
name: 'body',
css: 'background-color: #f0f0f0;'
};
wym.addCssRule( wym._doc.styleSheets[0], rule);
};
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment