* finish task #5152.
This commit is contained in:
@@ -45,7 +45,6 @@ class control extends baseControl
|
||||
{
|
||||
if(!file_exists($mainViewFile))
|
||||
{
|
||||
if($this->viewType == 'xhtml') $this->app->viewType = 'html';
|
||||
$this->devicePrefix = '';
|
||||
$mainViewFile = $modulePath . 'view' . DS . $this->devicePrefix . $methodName . '.' . $viewType . '.php';
|
||||
}
|
||||
|
||||
@@ -16,6 +16,17 @@ function toggleAcl(acl)
|
||||
}
|
||||
}
|
||||
|
||||
function loadDocModule(libID)
|
||||
{
|
||||
link = createLink('doc', 'ajaxGetChild', 'libID=' + libID);
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#module').replaceWith(data);
|
||||
$('#module_chosen').remove();
|
||||
$('#module').chosen();
|
||||
});
|
||||
}
|
||||
|
||||
function setBrowseType(type)
|
||||
{
|
||||
$.cookie('browseType', type, {expires:config.cookieLife, path:config.webRoot});
|
||||
@@ -24,6 +35,12 @@ function setBrowseType(type)
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
// hide #module chosen dropdown on #lib dropdown show
|
||||
$('#lib').on('chosen:showing_dropdown', function()
|
||||
{
|
||||
$('#module').trigger('chosen:close');
|
||||
});
|
||||
|
||||
$('#pageActions ul.dropdown-menu').css('left', '67px');
|
||||
$('.libs-group.sort').sortable(
|
||||
{
|
||||
|
||||
@@ -15,21 +15,4 @@ $(function()
|
||||
$('#urlBox').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
// hide #module chosen dropdown on #lib dropdown show
|
||||
$('#lib').on('chosen:showing_dropdown', function()
|
||||
{
|
||||
$('#module').trigger('chosen:close');
|
||||
});
|
||||
})
|
||||
|
||||
function loadDocModule(libID)
|
||||
{
|
||||
link = createLink('doc', 'ajaxGetChild', 'libID=' + libID);
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#module').replaceWith(data);
|
||||
$('#module_chosen').remove();
|
||||
$('#module').chosen();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of doc module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Jia Fu <fujia@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id: create.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/ueditor.html.php';?>
|
||||
<?php include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('holders', $lang->doc->placeholder);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->doc->create;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" id="dataform" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->lib;?></th>
|
||||
<?php $libs = $this->doc->getLibs($type = 'all', $extra = 'withObject');?>
|
||||
<td> <?php echo html::select('lib', $libs, $libID, "class='form-control chosen' onchange=loadDocModule(this.value)");?> </td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td>
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->title;?></th>
|
||||
<td colspan='2'><?php echo html::input('title', '', "class='form-control' autocomplete='off' required");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->type;?></th>
|
||||
<td><?php echo html::radio('type', $lang->doc->types, 'text');?></td>
|
||||
</tr>
|
||||
<tr id='contentBox'>
|
||||
<th><?php echo $lang->doc->content;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='contenthtml'><?php echo html::textarea('content', '', "style='width:100%;height:200px'");?></div>
|
||||
<div class='contentmarkdown hidden'><?php echo html::textarea('contentMarkdown', '', "style='width:100%;height:200px'");?></div>
|
||||
<?php echo html::hidden('contentType', 'html');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='urlBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->url;?></th>
|
||||
<td colspan='2'><?php echo html::input('url', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<td><?php echo html::radio('acl', $lang->doc->aclList, 'open', "onchange='toggleAcl(this.value)'")?></td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, '', "class='form-control chosen' multiple")?>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, '', "class='form-control chosen' multiple")?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('body').addClass('body-modal');
|
||||
window.injectWithXXC = function(message)
|
||||
{
|
||||
$('#title').val(message.content);
|
||||
if(message.type == 'url')
|
||||
{
|
||||
$('#typeurl').attr('checked', 'checked');
|
||||
$('input[name="type"]').change();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
@@ -3,3 +3,4 @@
|
||||
#end_chosen .chosen-single{border-left: none;}
|
||||
.cycleConfig .checkbox-primary{float:left; width:100px;}
|
||||
.cycleConfig .tab-pane{padding:8px 0px;}
|
||||
.body-modal .btn-back{display:none;}
|
||||
|
||||
@@ -10,7 +10,11 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php if($this->app->viewType == 'xhtml'):?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php else:?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('noTodo', $lang->todo->noTodo);?>
|
||||
@@ -144,5 +148,8 @@
|
||||
var nowTime = '<?php echo $time?>';
|
||||
var today = '<?php echo date('Y-m-d')?>';
|
||||
var start = '<?php echo key($times)?>';
|
||||
<?php if($this->app->viewType == 'xhtml'):?>
|
||||
$('body').addClass('body-modal');
|
||||
<?php endif;?>
|
||||
</script>
|
||||
<?php include './footer.html.php';?>
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
<?php js::set('account', $app->user->account)?>
|
||||
<?php if($this->app->viewType == 'xhtml'):?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php else:?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<?php
|
||||
$sn = $this->loadModel('setting')->getItem('owner=system&module=xuanxuan&key=key');
|
||||
if(empty($sn)) $this->setting->setItem('system.xuanxuan..key', $this->setting->computeSN());
|
||||
$sn = $this->loadModel('setting')->getItem('owner=system&module=common§ion=xuanxuan&key=key');
|
||||
if(empty($sn))
|
||||
{
|
||||
$this->setting->setItem('system.common.xuanxuan.turnon', 1);
|
||||
$this->setting->setItem('system.common.xuanxuan.key', $this->setting->computeSN());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user