+ adjust page of edit.

This commit is contained in:
wangyidong
2011-07-02 07:27:59 +00:00
parent 5e4b653b1b
commit b3eaeb8d30
6 changed files with 64 additions and 53 deletions

16
module/editor/js/edit.js Normal file
View File

@@ -0,0 +1,16 @@
$(function()
{
var windowHeight = $(window).height();
var showHeight = Math.ceil(windowHeight *0.3);
if($('#showContent').attr('id') != undefined)
{
var fileHeight = windowHeight - showHeight - 150;
$('#showContent').height(showHeight);
$('#fileContent').height(fileHeight);
}
else
{
var fileHeight = windowHeight - 140;
$('#fileContent').height(fileHeight);
}
})

View File

@@ -1,6 +1,6 @@
$(function()
{
var showHeight = $(window).height() - 125;
var showHeight = $(window).height() - $('#header').height() - $('#footer').height() - $('#hiddenwin').height();
$('#editWin').height(showHeight);
$('#extendWin').height(showHeight);
});

View File

@@ -14,12 +14,11 @@ $lang->editor->filePath = "File Path:";
$lang->editor->sourceFile = 'Source file:';
$lang->editor->fileName = "File name:";
$lang->editor->fileContent = "File content:";
$lang->editor->overrideFile = "Repeat file:";
$lang->editor->isOverride = "Override";
$lang->editor->exampleHook = "For example:***.html.hook.php";
$lang->editor->exampleJs = "For example:***.js";
$lang->editor->exampleCss = "For example:***.css";
$lang->editor->examplePHP = "For example:***.php";
$lang->editor->isOverride = "Override repeat file";
$lang->editor->exampleHook = "(For example:***.html.hook.php)";
$lang->editor->exampleJs = "(For example:***.js)";
$lang->editor->exampleCss = "(For example:***.css)";
$lang->editor->examplePHP = "(For example:***.php)";
$lang->editor->pageName = "Page Name:";
$lang->editor->deleteConfirm = 'Are you sure?';

View File

@@ -14,12 +14,11 @@ $lang->editor->filePath = "文件路径:";
$lang->editor->sourceFile = '源文件:';
$lang->editor->fileName = "文件名:";
$lang->editor->fileContent = "文件内容:";
$lang->editor->overrideFile = "重复文件";
$lang->editor->isOverride = "覆盖";
$lang->editor->exampleHook = "例如:***.html.hook.php";
$lang->editor->exampleJs = "例如:***.js";
$lang->editor->exampleCss = "例如:***.css";
$lang->editor->examplePHP = "例如:***.php";
$lang->editor->isOverride = "覆盖重复文件";
$lang->editor->exampleHook = "(例如:***.html.hook.php)";
$lang->editor->exampleJs = "(例如:***.js)";
$lang->editor->exampleCss = "(例如:***.css)";
$lang->editor->examplePHP = "(例如:***.php)";
$lang->editor->pageName = "页面名称:";
$lang->editor->deleteConfirm = '是否要删除?';

View File

@@ -20,56 +20,53 @@
<?php echo $filePath?>
</caption>
<?php endif?>
<?php $rows = 39?>
<?php if(!empty($showContent)):?>
<tr>
<th><?php echo $lang->editor->sourceFile?></th>
<td>
<div style='width:100%; height:300px; overflow:auto'>
<?php echo "<pre>$showContent</pre>"?>
</div>
</td>
<?php echo "<span class='strong'>" . $lang->editor->sourceFile . '</span>'?><br />
<div id='showContent' style='width:90%; overflow:auto'>
<?php echo "<pre>$showContent</pre>"?>
</div>
</td>
</tr>
<?php $rows = 20?>
<?php endif?>
<tr>
<th class='w-80px'><?php echo $lang->editor->fileContent?></th>
<td>
<?php echo html::textarea('fileContent', $fileContent, "class='area-1' rows=$rows")?>
<td colspan='2'>
<?php echo "<span class='strong'>" . $lang->editor->fileContent . '</span>'?><br />
<?php echo html::textarea('fileContent', $fileContent, "class='area-1'")?>
</td>
</tr>
<?php if($action and $action != 'edit' and $action != 'newPage' and $action != 'override' and $action != 'extendControl'):?>
<tr>
<th><?php echo $lang->editor->fileName?></th>
<td>
<?php
echo html::input('fileName', '', "class=text-5");
if($action == 'newHook')
{
echo $lang->editor->exampleHook;
}
elseif($action and $action == 'extendOther' and strpos(basename($filePath), '.js') !== false or $action == 'newJS')
{
echo $lang->editor->exampleJs;
}
elseif($action and $action == 'extendOther' and strpos(basename($filePath), '.css') !== false or $action == 'newCSS')
{
echo $lang->editor->exampleCss;
}
else
{
echo $lang->editor->examplePHP;
}
?>
<td colspan='2'>
<?php if($action and $action != 'edit' and $action != 'newPage' and $action != 'override' and $action != 'extendControl'):?>
<?php echo "<span class='strong'>" . $lang->editor->fileName . '</span>'?>
<span>
<?php
echo html::input('fileName', '', "class=text-4");
if($action == 'newHook')
{
echo $lang->editor->exampleHook;
}
elseif($action and $action == 'extendOther' and strpos(basename($filePath), '.js') !== false or $action == 'newJS')
{
echo $lang->editor->exampleJs;
}
elseif($action and $action == 'extendOther' and strpos(basename($filePath), '.css') !== false or $action == 'newCSS')
{
echo $lang->editor->exampleCss;
}
else
{
echo $lang->editor->examplePHP;
}
?>
</span>
<?php endif;?>
<?php if($action and $action != 'edit' and $action != 'newPage'):?>
<span class='strong'><input type='checkbox' name='override' id='override' /> <?php echo $lang->editor->isOverride?></span>
<?php endif;?>
</td>
</tr>
<?php endif;?>
<?php if($action and $action != 'edit' and $action != 'newPage'):?>
<tr>
<th><?php echo $lang->editor->overrideFile?></th>
<td><input type='checkbox' name='override' id='override' /> <?php echo $lang->editor->isOverride?></td>
</tr>
<?php endif;?>
<tr><td colspan='2' align='center'><?php echo html::submitButton()?><td></tr>
</table>
</form>

View File

@@ -11,7 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<table class='table-1'>
<table class='table-1 bd-none'>
<tr valign='top'>
<td width='160'>
<div class='box-title'><?php echo $lang->editor->moduleList?></div>