提交 133e778a 编写于 作者: huangxuan258's avatar huangxuan258

前端修改发布问题和编辑问题,发布文章页面如果搜索标签没有将不显示下拉

上级 810eab30
......@@ -344,7 +344,13 @@ $(".txt_taginput").on(" input propertychange",function(){
$(".tagsearch").append('<div class="tagitem" tagid="'+result.taglist[i].id+'">'+_msg+'</div>');
}
$(".tagsearch").show();
if(result.taglist.length>0){
$(".tagsearch").show();
}else{
$(".tagsearch").hide();
}
$(".tagsearch .tagitem").click(function(){
var _tagname=$.trim($(this).html());
var _tagid=$.trim($(this).attr("tagid"));
......
......@@ -479,7 +479,14 @@ $(".txt_taginput").on(" input propertychange",function(){
$(".tagsearch").append('<div class="tagitem" tagid="'+result.taglist[i].id+'">'+_msg+'</div>');
}
$(".tagsearch").show();
if(result.taglist.length>0){
$(".tagsearch").show();
}else{
$(".tagsearch").hide();
}
$(".tagsearch .tagitem").click(function(){
var _tagname=$.trim($(this).html());
var _tagid=$.trim($(this).attr("tagid"));
......
......@@ -368,7 +368,13 @@ $(".txt_taginput").on(" input propertychange",function(){
$(".tagsearch").append('<div class="tagitem" tagid="'+result.taglist[i].id+'">'+_msg+'</div>');
}
$(".tagsearch").show();
if(result.taglist.length>0){
$(".tagsearch").show();
}else{
$(".tagsearch").hide();
}
$(".tagsearch .tagitem").click(function(){
var _tagname=$.trim($(this).html());
var _tagid=$.trim($(this).attr("tagid"));
......
......@@ -342,7 +342,13 @@ $(".txt_taginput").on(" input propertychange",function(){
$(".tagsearch").append('<div class="tagitem" tagid="'+result.taglist[i].id+'">'+_msg+'</div>');
}
$(".tagsearch").show();
if(result.taglist.length>0){
$(".tagsearch").show();
}else{
$(".tagsearch").hide();
}
$(".tagsearch .tagitem").click(function(){
var _tagname=$.trim($(this).html());
var _tagid=$.trim($(this).attr("tagid"));
......
......@@ -175,7 +175,13 @@ $(".txt_taginput").on(" input propertychange",function(){
$(".tagsearch").append('<div class="tagitem" tagid="'+result.taglist[i].id+'">'+_msg+'</div>');
}
$(".tagsearch").show();
if(result.taglist.length>0){
$(".tagsearch").show();
}else{
$(".tagsearch").hide();
}
$(".tagsearch .tagitem").click(function(){
var _tagname=$.trim($(this).html());
var _tagid=$.trim($(this).attr("tagid"));
......
......@@ -113,7 +113,13 @@ $(".txt_taginput").on(" input propertychange",function(){
$(".tagsearch").append('<div class="tagitem" tagid="'+result.taglist[i].id+'">'+_msg+'</div>');
}
$(".tagsearch").show();
if(result.taglist.length>0){
$(".tagsearch").show();
}else{
$(".tagsearch").hide();
}
$(".tagsearch .tagitem").click(function(){
var _tagname=$.trim($(this).html());
var _tagid=$.trim($(this).attr("tagid"));
......
......@@ -217,7 +217,13 @@ $(".txt_taginput").on(" input propertychange",function(){
$(".tagsearch").append('<div class="tagitem" tagid="'+result.taglist[i].id+'">'+_msg+'</div>');
}
$(".tagsearch").show();
if(result.taglist.length>0){
$(".tagsearch").show();
}else{
$(".tagsearch").hide();
}
$(".tagsearch .tagitem").click(function(){
var _tagname=$.trim($(this).html());
var _tagid=$.trim($(this).attr("tagid"));
......
<!--{template header}-->
<!--内容部分--->
<div class="content-body" style="margin-top:20px;">
<div class="container bg-white ">
<div class="row">
<div class="col-sm-24">
<!--引入wangEditor.css-->
<link rel="stylesheet" type="text/css" href="{SITE_URL}static/js/wangeditor/pcwangeditor/css/wangEditor.min.css">
<!--引入jquery和wangEditor.js--> <!--注意:javascript必须放在body最后,否则可能会出现问题-->
<script src="{SITE_URL}static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="{SITE_URL}static/js/wangeditor/pcwangeditor/js/wangEditor.js"></script>
<script>
$.noConflict()
</script>
<style>
.editor_container {
height:auto;
background-color: #fff;
text-align: left;
text-shadow: none;
margin:10px 10px;
}
.wangEditor-drop-panel{
left:0px;
margin-left:0px;
width:100%;
}
</style>
<div class="editor_container">
<textarea id="editor" name="content" style="width:100%;height:100px;">
{if $this->uri->segment ( 2 ) !='view'&&$this->uri->segment ( 1 )=='question'||$this->uri->segment ( 2 ) =='editxinzhi'}
{if $navtitle=='编辑问题'} {eval echo htmlspecialchars_decode(htmlspecialchars_decode($question['description']));} {/if}
{if $this->uri->segment ( 1 )!='question'}
{eval echo htmlspecialchars($topic['describtion']);}
{/if}
{if $user['groupid']==1||$user['uid']==$answer['authorid']&&$this->uri->segment ( 2 )=='editanswer'&&$this->uri->segment ( 1 )=='question'} {eval echo htmlspecialchars($answer['content']);} {/if}
{/if}
{if $this->uri->segment ( 1 )=='question'&&$this->uri->segment ( 2 )=='add'}
{$setting['editor_defaulttip']}
{/if}
</textarea>
</div>
<script type="text/javascript">
var testeditor='999';
var editor=null;
// 初始化编辑器的内容
editor = new wangEditor('editor');
// 自定义配置
editor.config.uploadImgUrl = "{url attach/upimg}" ;
editor.config.uploadImgFileName = 'wangEditorMobileFile';
// 阻止输出log
editor.config.printLog = true;
editor.config.hideLinkImg = true;
// 普通的自定义菜单
// 普通的自定义菜单
editor.config.menus = [
'eraser',
'quote',
'|',
'img',
'undo',
'redo',
'fullscreen' ];
// 将全屏时z-index修改为20000
// editor.config.zindex =-1;
editor.create();
$(".wangEditor-container").css("z-index","1");
</script>
</div>
</div>
</div>
</div>
<!--{template footer}-->
\ No newline at end of file
此差异已折叠。
......@@ -35,8 +35,8 @@ CREATE TABLE `whatsns_user_invateanswer` (
CREATE TABLE `whatsns_tag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tagname` varchar(255) NOT NULL DEFAULT '' COMMENT '标签名称',
`tagalias` varchar(255) NOT NULL DEFAULT '' COMMENT '标签别名',
`tagname` varchar(100) NOT NULL DEFAULT '' COMMENT '标签名称',
`tagalias` varchar(150) NOT NULL DEFAULT '' COMMENT '标签别名',
`tagfisrtchar` varchar(20) NOT NULL DEFAULT '' COMMENT '标签首字母',
`tagimage` varchar(255) DEFAULT NULL COMMENT '标签缩略图',
`tagquestions` int(11) NOT NULL DEFAULT '0' COMMENT '标签问题数',
......@@ -63,7 +63,7 @@ CREATE TABLE `whatsns_tag_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tagid` int(11) NOT NULL DEFAULT '0' COMMENT '标签id',
`typeid` int(11) NOT NULL DEFAULT '0' COMMENT '类型id 文章或者问题表的主键id',
`itemtype` varchar(255) NOT NULL DEFAULT '' COMMENT 'question或者article',
`itemtype` varchar(100) NOT NULL DEFAULT '' COMMENT 'question或者article',
`time` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
`uid` int(11) NOT NULL DEFAULT '1' COMMENT '创建者',
`cid` int(11) NOT NULL DEFAULT '1' COMMENT '分类话题id',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册