* fix the error when create empty doc library.

* comment url, digest and so on fields.
This commit is contained in:
fujia
2010-08-03 02:15:43 +00:00
parent e5e034c839
commit 8baf48e423
3 changed files with 19 additions and 13 deletions
+9 -3
View File
@@ -87,9 +87,15 @@ class doc extends control
if(!empty($_POST))
{
$libID = $this->doc->createLib();
if(dao::isError()) die(js::error(dao::getError()));
$this->loadModel('action')->create('docLib', $libID, 'Created');
die(js::locate($this->createLink($this->moduleName, 'browse', "libID=$libID"), 'parent'));
if(!dao::isError())
{
$this->loadModel('action')->create('docLib', $libID, 'Created');
die(js::locate($this->createLink($this->moduleName, 'browse', "libID=$libID"), 'parent'));
}
else
{
echo js::error(dao::getError());
}
}
die($this->display());
}
+5 -5
View File
@@ -45,22 +45,22 @@ $(document).ready(function()
<!--
<tr>
<th class='rowhead'><?php echo $lang->doc->type;?></th>
<td><?php echo html::input('type', $type, "class='text-1'");?></td>
<td><?php //echo html::input('type', $type, "class='text-1'");?></td>
</tr>
<th class='rowhead'><?php echo $lang->doc->digest;?></th>
<td><?php echo html::input('digest', $digest, "class='text-1'");?></td>
<td><?php //echo html::input('digest', $digest, "class='text-1'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->doc->content;?></th>
<td><?php echo html::textarea('content', $content, "rows='6' class='area-1'");?></td>
<td><?php //echo html::textarea('content', $content, "rows='6' class='area-1'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->doc->keywords;?></th>
<td><?php echo html::input('keywords', $keywords, "class='text-1'");?></td>
<td><?php //echo html::input('keywords', $keywords, "class='text-1'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->doc->url;?></th>
<td><?php echo html::input('url', $url, "class='text-1'");?></td>
<td><?php //echo html::input('url', $url, "class='text-1'");?></td>
</tr>
-->
<tr>
+5 -5
View File
@@ -45,22 +45,22 @@ $(document).ready(function()
<!--
<tr>
<th class='rowhead'><?php echo $lang->doc->type;?></th>
<td><?php echo html::input('type', $type, "class='text-1'");?></td>
<td><?php //echo html::input('type', $type, "class='text-1'");?></td>
</tr>
<th class='rowhead'><?php echo $lang->doc->digest;?></th>
<td><?php echo html::input('digest', $digest, "class='text-1'");?></td>
<td><?php //echo html::input('digest', $digest, "class='text-1'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->doc->content;?></th>
<td><?php echo html::textarea('content', $content, "rows='6' class='area-1'");?></td>
<td><?php //echo html::textarea('content', $content, "rows='6' class='area-1'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->doc->keywords;?></th>
<td><?php echo html::input('keywords', $keywords, "class='text-1'");?></td>
<td><?php //echo html::input('keywords', $keywords, "class='text-1'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->doc->url;?></th>
<td><?php echo html::input('url', $url, "class='text-1'");?></td>
<td><?php //echo html::input('url', $url, "class='text-1'");?></td>
</tr>
-->
<tr>