mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
위키 링크 애드온의 배경 투명을 없애고 UI 살짝 변경. 가상사이트에서 위키 문서 연결시 이상없이 동작하도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6201 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1bc5754cbc
commit
011efbdb6a
3 changed files with 26 additions and 24 deletions
|
|
@ -6,9 +6,7 @@
|
|||
if(!$module_info->module) return;
|
||||
if($module_info->module != 'wiki') return;
|
||||
Context::loadJavascriptPlugin('hotkeys');
|
||||
Context::addJsFile('./addons/wiki_link/wikilink.js');
|
||||
Context::addCssFile('./addons/wiki_link/wikilink.css');
|
||||
$footer = "<div id='link'> <div class='linkForm'>Link Target: <input type='text' id='linktarget' class='inputTypeText w100' /><a href='#' onclick='setText(); return false;'>AddLink</a></div></div>";
|
||||
Context::addHtmlFooter($footer);
|
||||
Context::addJsFile('./addons/wiki_link/wikilink.js',false);
|
||||
Context::addCssFile('./addons/wiki_link/wikilink.css',false);
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#link { display: none; }
|
||||
#link .linkForm { margin-left: 10px; margin-top: 10px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 5px; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
|
||||
.ui-dialog { background-color:#fff; z-index:999; padding:10px;}
|
||||
.ui-dialog-title { font-weight:bold; margin-bottom:3px; }
|
||||
.ui-dialog-titlebar-close { display:none; }
|
||||
.ui-dialog-buttonpane { text-align:right; bottom:5px !important; }
|
||||
.ui-dialog-buttonpane button { font-size:11px; font-family:tahoma; }
|
||||
|
|
|
|||
|
|
@ -1,15 +1,20 @@
|
|||
function openWikiLinkDialog()
|
||||
{
|
||||
var link = jQuery("#link");
|
||||
link.css('display', 'block');
|
||||
var target = xGetElementById('linktarget');
|
||||
target.value = "";
|
||||
try{
|
||||
link.dialog({height:100});
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
link.dialog("open");
|
||||
var wikiLink = jQuery('#wikiLink');
|
||||
if ( wikiLink.length < 1 ) {
|
||||
try{
|
||||
jQuery('<div id="wikiLink">Link Target : <input type="text" id="linktarget" class="inputTypeText" style="width:200px;" /></div>')
|
||||
.appendTo('body')
|
||||
.dialog({
|
||||
title:'wiki Link', width:300, height:60, resizable:false,
|
||||
modal: false, overlay: { opacity: 1, background: "#fff" },
|
||||
buttons: { "add link": function() { setText(); jQuery(this).dialog("close"); }, "cancel": function() { jQuery(this).dialog("close"); } },
|
||||
show: 'drop' /* , hide: 'explode' */
|
||||
});
|
||||
} catch(e){
|
||||
}
|
||||
} else {
|
||||
wikiLink.dialog('open');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -19,6 +24,7 @@ function setText() {
|
|||
var text = target.value;
|
||||
text.replace(/&/ig,'&').replace(/</ig,'<').replace(/>/ig,'>');
|
||||
var url = request_uri.setQuery('mid',current_mid).setQuery('entry',text);
|
||||
if(typeof(xeVid)!='undefined') url.setQuery('vid', xeVid);
|
||||
var link = "<a href=\""+url+"\" ";
|
||||
link += ">"+text+"</a>";
|
||||
|
||||
|
|
@ -31,16 +37,13 @@ function addShortCutForWiki()
|
|||
{
|
||||
var iframe_obj = editorGetIFrame(1);
|
||||
jQuery(iframe_obj.contentWindow.document).bind('keydown', "CTRL+SHIFT+SPACE", function(evt) { openWikiLinkDialog(); });
|
||||
if(jQuery.os.Mac)
|
||||
{
|
||||
if(jQuery.os.Mac) {
|
||||
jQuery(iframe_obj.contentWindow.document).bind('keydown', "ALT+SPACE", function(evt) { openWikiLinkDialog(); });
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
jQuery(iframe_obj.contentWindow.document).bind('keydown', "CTRL+SPACE", function(evt) { openWikiLinkDialog(); });
|
||||
}
|
||||
jQuery(document).bind('keydown',"CTRL+SHIFT+SPACE", function(evt) {} );
|
||||
}
|
||||
|
||||
xAddEventListener(window, 'load', addShortCutForWiki);
|
||||
jQuery(window).load( function() { addShortCutForWiki() } );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue