/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/fullscreen/langs/fr.js |
---|
New file |
0,0 → 1,7 |
// FR lang variables |
// Modified by Motte, last updated 2006-03-23 |
tinyMCE.addToLang('',{ |
fullscreen_title : 'Affichage plein écran', |
fullscreen_desc : 'Affichage plein écran/normal' |
}); |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/fullscreen/langs/en.js |
---|
New file |
0,0 → 1,5 |
// UK lang variables |
tinyMCE.addToLang('',{ |
fullscreen_desc : 'Toggle fullscreen mode' |
}); |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/fullscreen/images/fullscreen.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/fullscreen/images/fullscreen.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js |
---|
New file |
0,0 → 1,230 |
/** |
* $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. |
*/ |
/* Import plugin specific language pack */ |
tinyMCE.importPluginLanguagePack('fullscreen'); |
var TinyMCE_FullScreenPlugin = { |
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 |
}; |
}, |
initInstance : function(inst) { |
if (!tinyMCE.settings['fullscreen_skip_plugin_css']) |
tinyMCE.importCSS(inst.getContainerWin().document, tinyMCE.baseURL + "/plugins/fullscreen/css/page.css"); |
}, |
getControlHTML : function(cn) { |
switch (cn) { |
case "fullscreen": |
return tinyMCE.getButtonHTML(cn, 'lang_fullscreen_desc', '{$pluginurl}/images/fullscreen.gif', 'mceFullScreen'); |
} |
return ""; |
}, |
execCommand : function(editor_id, element, command, user_interface, value) { |
var inst; |
// Handle commands |
switch (command) { |
case "mceFullScreen": |
inst = tinyMCE.getInstanceById(editor_id); |
if (tinyMCE.getParam('fullscreen_new_window')) |
this._toggleFullscreenWin(inst); |
else |
this._toggleFullscreen(inst); |
return true; |
} |
// Pass to next handler in chain |
return false; |
}, |
_toggleFullscreenWin : function(inst) { |
if (tinyMCE.getParam('fullscreen_is_enabled')) { |
// In fullscreen mode |
window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(inst.editorId)); |
top.close(); |
} else { |
tinyMCE.setWindowArg('editor_id', inst.editorId); |
var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/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) {} |
} |
}, |
_toggleFullscreen : function(inst) { |
var ds = inst.getData('fullscreen'), editorContainer, tableElm, iframe, vp, cw, cd, re, w, h, si, blo, delta = 0, cell, row, fcml, bcml; |
cw = inst.getContainerWin(); |
cd = cw.document; |
editorContainer = cd.getElementById(inst.editorId + '_parent'); |
tableElm = editorContainer.firstChild; |
iframe = inst.iframeElement; |
re = cd.getElementById(inst.editorId + '_resize'); |
blo = document.getElementById('mce_fullscreen_blocker'); |
fcm = new TinyMCE_Layer(inst.editorId + '_fcMenu'); |
fcml = new TinyMCE_Layer(inst.editorId + '_fcMenu'); |
bcml = new TinyMCE_Layer(inst.editorId + '_bcMenu'); |
if (fcml.exists() && fcml.isVisible()) { |
tinyMCE.switchClass(inst.editorId + '_forecolor', 'mceMenuButton'); |
fcml.hide(); |
} |
if (bcml.exists() && bcml.isVisible()) { |
tinyMCE.switchClass(inst.editorId + '_backcolor', 'mceMenuButton'); |
bcml.hide(); |
} |
if (!ds.enabled) { |
// Handle External Toolbar |
if (inst.toolbarElement) { |
delta += inst.toolbarElement.offsetHeight; |
cell = tableElm.tBodies[0].insertRow(0).insertCell(-1); |
cell.className = 'mceToolbarTop'; |
cell.nowrap = true; |
ds.oldToolbarParent = inst.toolbarElement.parentNode; |
ds.toolbarHolder = document.createTextNode('...'); |
cell.appendChild(ds.oldToolbarParent.replaceChild(ds.toolbarHolder, inst.toolbarElement)); |
} |
ds.parents = []; |
vp = tinyMCE.getViewPort(cw); |
ds.scrollX = vp.left; |
ds.scrollY = vp.top; |
// Opera has a bug restoring scrollbars |
if (!tinyMCE.isOpera) |
tinyMCE.addCSSClass(cd.body, 'mceFullscreen'); |
tinyMCE.getParentNode(tableElm.parentNode, function (n) { |
if (n.nodeName == 'BODY') |
return true; |
if (n.nodeType == 1) |
tinyMCE.addCSSClass(n, 'mceFullscreenPos'); |
return false; |
}); |
if (re) |
re.style.display = 'none'; |
vp = tinyMCE.getViewPort(cw); |
ds.oldWidth = iframe.style.width ? iframe.style.width : iframe.offsetWidth; |
ds.oldHeight = iframe.style.height ? iframe.style.height : iframe.offsetHeight; |
ds.oldTWidth = tableElm.style.width ? tableElm.style.width : tableElm.offsetWidth; |
ds.oldTHeight = tableElm.style.height ? tableElm.style.height : tableElm.offsetHeight; |
// Handle % width |
if (ds.oldWidth && ds.oldWidth.indexOf) |
ds.oldTWidth = ds.oldWidth.indexOf('%') != -1 ? ds.oldWidth : ds.oldTWidth; |
if (!blo && tinyMCE.isRealIE) { |
blo = tinyMCE.createTag(document, 'iframe', {id : 'mce_fullscreen_blocker', src : 'about:blank', frameBorder : 0, width : vp.width, height : vp.height, style : 'display: block; position: absolute; left: 0; top: 0; z-index: 999; margin: 0; padding: 0;'}); |
document.body.appendChild(blo); |
} |
tableElm.style.position = 'absolute'; |
tableElm.style.zIndex = 1000; |
tableElm.style.left = tableElm.style.top = '0'; |
tableElm.style.width = vp.width + 'px'; |
tableElm.style.height = vp.height + 'px'; |
if (tinyMCE.isRealIE) { |
iframe.style.width = vp.width + 'px'; |
iframe.style.height = vp.height + 'px'; |
// Calc new width/height based on overflow |
w = iframe.parentNode.clientWidth - (tableElm.offsetWidth - vp.width); |
h = iframe.parentNode.clientHeight - (tableElm.offsetHeight - vp.height); |
} else { |
w = iframe.parentNode.clientWidth; |
h = iframe.parentNode.clientHeight; |
} |
iframe.style.width = w + "px"; |
iframe.style.height = (h+delta) + "px"; |
tinyMCE.switchClass(inst.editorId + '_fullscreen', 'mceButtonSelected'); |
ds.enabled = true; |
inst.useCSS = false; |
} else { |
// Handle External Toolbar |
if (inst.toolbarElement) { |
row = inst.toolbarElement.parentNode.parentNode; |
row.parentNode.removeChild(row); |
ds.oldToolbarParent.replaceChild(inst.toolbarElement, ds.toolbarHolder); |
ds.oldToolbarParent = null; |
ds.toolbarHolder = null; |
} |
if (blo) |
blo.parentNode.removeChild(blo); |
si = 0; |
tinyMCE.getParentNode(tableElm.parentNode, function (n) { |
if (n.nodeName == 'BODY') |
return true; |
if (n.nodeType == 1) |
tinyMCE.removeCSSClass(n, 'mceFullscreenPos'); |
}); |
if (re && tinyMCE.getParam("theme_advanced_resizing", false)) |
re.style.display = 'block'; |
tableElm.style.position = 'static'; |
tableElm.style.zIndex = ''; |
tableElm.style.width = ''; |
tableElm.style.height = ''; |
tableElm.style.width = ds.oldTWidth ? ds.oldTWidth : ''; |
tableElm.style.height = ds.oldTHeight ? ds.oldTHeight : ''; |
iframe.style.width = ds.oldWidth ? ds.oldWidth : ''; |
iframe.style.height = ds.oldHeight ? ds.oldHeight : ''; |
tinyMCE.switchClass(inst.editorId + '_fullscreen', 'mceButtonNormal'); |
ds.enabled = false; |
tinyMCE.removeCSSClass(cd.body, 'mceFullscreen'); |
cw.scrollTo(ds.scrollX, ds.scrollY); |
inst.useCSS = false; |
} |
}, |
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { |
if (tinyMCE.getParam('fullscreen_is_enabled')) |
tinyMCE.switchClass(editor_id + '_fullscreen', 'mceButtonSelected'); |
return true; |
} |
}; |
tinyMCE.addPlugin("fullscreen", TinyMCE_FullScreenPlugin); |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/fullscreen/css/page.css |
---|
New file |
0,0 → 1,21 |
/* This class restores all CSS properties to that absolute positioning of fullscreen mode is correct */ |
.mceFullscreenPos { |
display: block !important; |
position: static !important; |
left: 0 !important; |
top: 0 !important; |
bottom: auto !important; |
right: auto !important; |
width: auto !important; |
height: auto !important; |
margin: 0 !important; |
padding: 0 !important; |
border: 0 !important; |
overflow: visible; |
z-index: 1 !important; |
clear: both; |
} |
body.mceFullscreen { |
overflow: hidden !important; |
} |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm |
---|
New file |
0,0 → 1,91 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head> |
<title>{$lang_fullscreen_title}</title> |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
<script language="javascript" type="text/javascript" src="../../tiny_mce.js"></script> |
<script language="javascript" type="text/javascript"> |
function patchCallback(settings, key) { |
if (settings[key]) |
settings[key] = "window.opener." + settings[key]; |
} |
var settings = new Array(); |
// Clone array |
for (var name in window.opener.tinyMCE.settings) |
settings[name] = window.opener.tinyMCE.settings[name]; |
// Override options for fullscreen |
for (var name in window.opener.tinyMCE.settings.fullscreen_settings) |
settings[name] = window.opener.tinyMCE.settings.fullscreen_settings[name]; |
// 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 |
settings['mode'] = 'exact'; |
settings['elements'] = 'fullscreenarea'; |
settings['ask'] = false; |
settings['setupcontent_callback'] = 'setupContent'; |
settings['fullscreen_is_enabled'] = true; |
settings['fullscreen_editor_id'] = window.opener.tinyMCE.getWindowArg("editor_id"); |
settings['theme_advanced_resizing'] = false; |
// Init |
tinyMCE.init(settings); |
tinyMCE.documentBasePath = window.opener.tinyMCE.documentBasePath; |
function setupContent(editor_id, body, doc) { |
var inst = tinyMCE.getInstanceById(editor_id); |
var content = window.opener.tinyMCE.getContent(tinyMCE.getParam('fullscreen_editor_id')); |
// Setup title |
var divElm = document.createElement("div"); |
divElm.innerHTML = tinyMCELang['lang_fullscreen_title']; |
document.title = divElm.innerHTML; |
// Get content |
inst.execCommand('mceSetContent', false, content); |
} |
function unloadHandler(e) { |
moveContent(); |
} |
function moveContent() { |
var doc = tinyMCE.isMSIE ? window.frames['mce_editor_0'].window.document : document.getElementById('mce_editor_0').contentDocument; |
window.opener.tinyMCE.setInnerHTML(window.opener.tinyMCE.selectedInstance.getBody(), doc.body.innerHTML); |
} |
// Add onunload |
tinyMCE.addEvent(window, "beforeunload", unloadHandler); |
function doParentSubmit() { |
moveContent(); |
if (window.opener.tinyMCE.selectedInstance.formElement.form) |
window.opener.tinyMCE.selectedInstance.formElement.form.submit(); |
window.close(); |
return false; |
} |
</script> |
<base target="_self" /> |
</head> |
<body style="margin: 0; overflow: hidden; height: 100%" scrolling="no" scroll="no"> |
<form onsubmit="doParentSubmit();" style="height: 100%"> |
<textarea id="fullscreenarea" style="width: 100%; height: 100%"></textarea> |
</form> |
</body> |
</html> |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/fullscreen/readme.txt |
---|
New file |
0,0 → 1,0 |
Check the TinyMCE documentation for details on this plugin. |
/branches/v4.0/wikini/maj_wikini/tools/templates/themes/default/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js |
---|
New file |
0,0 → 1,0 |
tinyMCE.importPluginLanguagePack('fullscreen');var TinyMCE_FullScreenPlugin={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}},initInstance:function(inst){if(!tinyMCE.settings['fullscreen_skip_plugin_css'])tinyMCE.importCSS(inst.getContainerWin().document,tinyMCE.baseURL+"/plugins/fullscreen/css/page.css")},getControlHTML:function(cn){switch(cn){case"fullscreen":return tinyMCE.getButtonHTML(cn,'lang_fullscreen_desc','{$pluginurl}/images/fullscreen.gif','mceFullScreen')}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst;switch(command){case"mceFullScreen":inst=tinyMCE.getInstanceById(editor_id);if(tinyMCE.getParam('fullscreen_new_window'))this._toggleFullscreenWin(inst);else this._toggleFullscreen(inst);return true}return false},_toggleFullscreenWin:function(inst){if(tinyMCE.getParam('fullscreen_is_enabled')){window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'),'mceSetContent',false,tinyMCE.getContent(inst.editorId));top.close()}else{tinyMCE.setWindowArg('editor_id',inst.editorId);var win=window.open(tinyMCE.baseURL+"/plugins/fullscreen/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){}}},_toggleFullscreen:function(inst){var ds=inst.getData('fullscreen'),editorContainer,tableElm,iframe,vp,cw,cd,re,w,h,si,blo,delta=0,cell,row,fcml,bcml;cw=inst.getContainerWin();cd=cw.document;editorContainer=cd.getElementById(inst.editorId+'_parent');tableElm=editorContainer.firstChild;iframe=inst.iframeElement;re=cd.getElementById(inst.editorId+'_resize');blo=document.getElementById('mce_fullscreen_blocker');fcm=new TinyMCE_Layer(inst.editorId+'_fcMenu');fcml=new TinyMCE_Layer(inst.editorId+'_fcMenu');bcml=new TinyMCE_Layer(inst.editorId+'_bcMenu');if(fcml.exists()&&fcml.isVisible()){tinyMCE.switchClass(inst.editorId+'_forecolor','mceMenuButton');fcml.hide()}if(bcml.exists()&&bcml.isVisible()){tinyMCE.switchClass(inst.editorId+'_backcolor','mceMenuButton');bcml.hide()}if(!ds.enabled){if(inst.toolbarElement){delta+=inst.toolbarElement.offsetHeight;cell=tableElm.tBodies[0].insertRow(0).insertCell(-1);cell.className='mceToolbarTop';cell.nowrap=true;ds.oldToolbarParent=inst.toolbarElement.parentNode;ds.toolbarHolder=document.createTextNode('...');cell.appendChild(ds.oldToolbarParent.replaceChild(ds.toolbarHolder,inst.toolbarElement))}ds.parents=[];vp=tinyMCE.getViewPort(cw);ds.scrollX=vp.left;ds.scrollY=vp.top;if(!tinyMCE.isOpera)tinyMCE.addCSSClass(cd.body,'mceFullscreen');tinyMCE.getParentNode(tableElm.parentNode,function(n){if(n.nodeName=='BODY')return true;if(n.nodeType==1)tinyMCE.addCSSClass(n,'mceFullscreenPos');return false});if(re)re.style.display='none';vp=tinyMCE.getViewPort(cw);ds.oldWidth=iframe.style.width?iframe.style.width:iframe.offsetWidth;ds.oldHeight=iframe.style.height?iframe.style.height:iframe.offsetHeight;ds.oldTWidth=tableElm.style.width?tableElm.style.width:tableElm.offsetWidth;ds.oldTHeight=tableElm.style.height?tableElm.style.height:tableElm.offsetHeight;if(ds.oldWidth&&ds.oldWidth.indexOf)ds.oldTWidth=ds.oldWidth.indexOf('%')!=-1?ds.oldWidth:ds.oldTWidth;if(!blo&&tinyMCE.isRealIE){blo=tinyMCE.createTag(document,'iframe',{id:'mce_fullscreen_blocker',src:'about:blank',frameBorder:0,width:vp.width,height:vp.height,style:'display: block; position: absolute; left: 0; top: 0; z-index: 999; margin: 0; padding: 0;'});document.body.appendChild(blo)}tableElm.style.position='absolute';tableElm.style.zIndex=1000;tableElm.style.left=tableElm.style.top='0';tableElm.style.width=vp.width+'px';tableElm.style.height=vp.height+'px';if(tinyMCE.isRealIE){iframe.style.width=vp.width+'px';iframe.style.height=vp.height+'px';w=iframe.parentNode.clientWidth-(tableElm.offsetWidth-vp.width);h=iframe.parentNode.clientHeight-(tableElm.offsetHeight-vp.height)}else{w=iframe.parentNode.clientWidth;h=iframe.parentNode.clientHeight}iframe.style.width=w+"px";iframe.style.height=(h+delta)+"px";tinyMCE.switchClass(inst.editorId+'_fullscreen','mceButtonSelected');ds.enabled=true;inst.useCSS=false}else{if(inst.toolbarElement){row=inst.toolbarElement.parentNode.parentNode;row.parentNode.removeChild(row);ds.oldToolbarParent.replaceChild(inst.toolbarElement,ds.toolbarHolder);ds.oldToolbarParent=null;ds.toolbarHolder=null}if(blo)blo.parentNode.removeChild(blo);si=0;tinyMCE.getParentNode(tableElm.parentNode,function(n){if(n.nodeName=='BODY')return true;if(n.nodeType==1)tinyMCE.removeCSSClass(n,'mceFullscreenPos')});if(re&&tinyMCE.getParam("theme_advanced_resizing",false))re.style.display='block';tableElm.style.position='static';tableElm.style.zIndex='';tableElm.style.width='';tableElm.style.height='';tableElm.style.width=ds.oldTWidth?ds.oldTWidth:'';tableElm.style.height=ds.oldTHeight?ds.oldTHeight:'';iframe.style.width=ds.oldWidth?ds.oldWidth:'';iframe.style.height=ds.oldHeight?ds.oldHeight:'';tinyMCE.switchClass(inst.editorId+'_fullscreen','mceButtonNormal');ds.enabled=false;tinyMCE.removeCSSClass(cd.body,'mceFullscreen');cw.scrollTo(ds.scrollX,ds.scrollY);inst.useCSS=false}},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(tinyMCE.getParam('fullscreen_is_enabled'))tinyMCE.switchClass(editor_id+'_fullscreen','mceButtonSelected');return true}};tinyMCE.addPlugin("fullscreen",TinyMCE_FullScreenPlugin); |