mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 04:39:55 +09:00
#348 향상/문제수정
[A]코드의 파일명 및 설명 입력 추가 [A]시작 줄 번호 입력 추가 [M]옵션이 있을 경우 비정상 동작하던 부분 수정 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3398 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ca6f7c5293
commit
f79d11a4ef
7 changed files with 131 additions and 80 deletions
|
|
@ -32,15 +32,28 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->used_collapse}</th>
|
||||
<th scope="row">{$lang->file_path}</th>
|
||||
<td>
|
||||
<input type="checkbox" id="collapse" name="collapse" value="Y" />
|
||||
<input type="text" id="file_path" name="file_path" class="inputTypeText w400" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->hidden_linenumber}</th>
|
||||
<th scope="row">{$lang->description}</th>
|
||||
<td>
|
||||
<input type="checkbox" id="nogutter" name="nogutter" value="Y" />
|
||||
<input type="text" id="description" name="description" class="inputTypeText w400" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->first_line}</th>
|
||||
<td>
|
||||
<input type="text" id="first_line" name="first_line" value="1" class="inputTypeText w40" />
|
||||
<input type="checkbox" id="nogutter" name="nogutter" value="Y" /> <label for="nogutter">{$lang->hidden_linenumber}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->used_collapse}</th>
|
||||
<td>
|
||||
<input type="checkbox" id="collapse" name="collapse" value="Y" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -13,11 +13,18 @@ function getCode() {
|
|||
selected_node = node;
|
||||
|
||||
var code_type = node.getAttribute('code_type');
|
||||
var file_path = node.getAttribute('file_path');
|
||||
var description = node.getAttribute('description');
|
||||
var first_line = node.getAttribute('first_line');
|
||||
var collapse = node.getAttribute('collapse');
|
||||
var nogutter = node.getAttribute('nogutter');
|
||||
var nocontrols = node.getAttribute('nocontrols');
|
||||
|
||||
xGetElementById('code_type').value = code_type;
|
||||
xGetElementById('file_path').value = file_path;
|
||||
xGetElementById('description').value = description;
|
||||
if(!first_line) xGetElementById('first_line').value = '1';
|
||||
else xGetElementById('first_line').value = first_line;
|
||||
if(collapse == 'Y') xGetElementById('collapse').checked = true;
|
||||
if(nogutter == 'Y') xGetElementById('nogutter').checked = true;
|
||||
if(nocontrols == 'Y') xGetElementById('nocontrols').checked = true;
|
||||
|
|
@ -28,6 +35,9 @@ function insertCode() {
|
|||
if(typeof(opener)=='undefined') return;
|
||||
|
||||
var code_type = xGetElementById('code_type').value;
|
||||
var file_path = xGetElementById('file_path').value;
|
||||
var description = xGetElementById('description').value;
|
||||
var first_line = xGetElementById('first_line').value;
|
||||
var collapse = xGetElementById('collapse').checked;
|
||||
var nogutter = xGetElementById("nogutter").checked;
|
||||
var nocontrols = xGetElementById("nocontrols").checked;
|
||||
|
|
@ -40,25 +50,16 @@ function insertCode() {
|
|||
|
||||
if(!content) content = " ";
|
||||
|
||||
var text = "\n<div editor_component=\"code_highlighter\" code_type=\""+code_type+"\" style=\""+style+"\">"+content+"</div>\n<br />";
|
||||
var text = "\n"+'<div editor_component="code_highlighter" code_type="'+code_type+'" file_path="'+file_path+'" description="'+description+'" first_line="'+first_line+'" collapse="'+collapse+'" nogutter="'+nogutter+'" nocontrols="'+nocontrols+'" style="'+style+'">'+content+'</div>'+"\n<br />";
|
||||
|
||||
if(selected_node) {
|
||||
selected_node.setAttribute('code_type', code_type);
|
||||
if(collapse == true) {
|
||||
selected_node.setAttribute('collapse', 'Y');
|
||||
} else {
|
||||
selected_node.setAttribute('collapse', 'N');
|
||||
}
|
||||
if(nogutter == true) {
|
||||
selected_node.setAttribute('nogutter', 'Y');
|
||||
} else {
|
||||
selected_node.setAttribute('nogutter', 'N');
|
||||
}
|
||||
if(nocontrols == true && collapse == false) {
|
||||
selected_node.setAttribute('nocontrols', 'Y');
|
||||
} else {
|
||||
selected_node.setAttribute('nocontrols', 'N');
|
||||
}
|
||||
selected_node.setAttribute('file_path', file_path);
|
||||
selected_node.setAttribute('description', description);
|
||||
selected_node.setAttribute('first_line', first_line);
|
||||
selected_node.setAttribute("collapse", collapse);
|
||||
selected_node.setAttribute('nogutter', nogutter);
|
||||
selected_node.setAttribute('nocontrols', nocontrols);
|
||||
selected_node.setAttribute('style', style);
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue