增加部分基础组件
This commit is contained in:
1 parent
0fc35d4d02
commit
bcee7bca67
18 files changed
+999
-95
No files matched your search
@@ -6,7 +6,7 @@ import functools
|
|||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
|
|
||||||
from utils.shortcuts import error_response, error_page
|
from utils.shortcuts import error_response, error_page, redirect_to_login
|
||||||
from .models import AdminType
|
from .models import AdminType
|
||||||
|
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ class BasePermissionDecorator(object):
|
|||||||
if self.request.is_ajax():
|
if self.request.is_ajax():
|
||||||
return error_response(_("Please login in first"))
|
return error_response(_("Please login in first"))
|
||||||
else:
|
else:
|
||||||
return HttpResponseRedirect("/login/?__from=" + urllib.quote(self.request.path))
|
return redirect_to_login(self.request)
|
||||||
|
|
||||||
def check_permission(self):
|
def check_permission(self):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
@@ -47,9 +47,11 @@ class login_required(BasePermissionDecorator):
|
|||||||
|
|
||||||
class super_admin_required(BasePermissionDecorator):
|
class super_admin_required(BasePermissionDecorator):
|
||||||
def check_permission(self):
|
def check_permission(self):
|
||||||
return self.request.user.is_authenticated() and self.request.user.admin_type == AdminType.SUPER_ADMIN
|
return self.request.user.is_authenticated() and \
|
||||||
|
self.request.user.admin_type == AdminType.SUPER_ADMIN
|
||||||
|
|
||||||
|
|
||||||
class admin_required(BasePermissionDecorator):
|
class admin_required(BasePermissionDecorator):
|
||||||
def check_permission(self):
|
def check_permission(self):
|
||||||
return self.request.user.is_authenticated() and self.request.user.admin_type in [AdminType.SUPER_ADMIN, AdminType.ADMIN]
|
return self.request.user.is_authenticated() and \
|
||||||
|
self.request.user.admin_type in [AdminType.SUPER_ADMIN, AdminType.ADMIN]
|
||||||
@@ -3,27 +3,24 @@ import time
|
|||||||
import json
|
import json
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
from django.http import HttpResponseRedirect, HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
from django.contrib import auth
|
|
||||||
|
|
||||||
from .models import AdminType, User
|
from utils.shortcuts import redirect_to_login
|
||||||
|
from .models import AdminType
|
||||||
|
|
||||||
|
|
||||||
# todo remove this
|
|
||||||
from django.contrib import auth
|
|
||||||
|
|
||||||
class SessionSecurityMiddleware(object):
|
class SessionSecurityMiddleware(object):
|
||||||
def process_request(self, request):
|
def process_request(self, request):
|
||||||
if request.user.is_authenticated() and request.user.admin_type in [AdminType.ADMIN, AdminType.SUPER_ADMIN]:
|
if request.user.is_authenticated() and request.user.admin_type in [AdminType.ADMIN, AdminType.SUPER_ADMIN]:
|
||||||
if "last_activity" in request.session:
|
if "last_activity" in request.session:
|
||||||
# 24 hours passwd since last visit
|
# 24 hours passed since last visit
|
||||||
if time.time() - request.session["last_activity"] >= 24 * 60 * 60:
|
if time.time() - request.session["last_activity"] >= 24 * 60 * 60:
|
||||||
auth.logout(request)
|
auth.logout(request)
|
||||||
if request.is_ajax():
|
if request.is_ajax():
|
||||||
return HttpResponse(json.dumps({"code": 1, "data": _("Please login in first")}),
|
return HttpResponse(json.dumps({"code": 1, "data": _("Please login in first")}),
|
||||||
content_type="application/json")
|
content_type="application/json")
|
||||||
else:
|
else:
|
||||||
return HttpResponseRedirect("/login/?__from=" + urllib.quote(request.path))
|
return redirect_to_login(request)
|
||||||
# 更新最后活动日期
|
# 更新最后活动日期
|
||||||
request.session["last_activity"] = time.time()
|
request.session["last_activity"] = time.time()
|
||||||
+15
-18
@@ -1,38 +1,35 @@
|
|||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
import os
|
|
||||||
import codecs
|
|
||||||
import qrcode
|
|
||||||
import StringIO
|
import StringIO
|
||||||
|
import codecs
|
||||||
|
import os
|
||||||
|
|
||||||
from django import http
|
import qrcode
|
||||||
|
from django.conf import settings
|
||||||
from django.contrib import auth
|
from django.contrib import auth
|
||||||
from django.shortcuts import render
|
from django.core.exceptions import MultipleObjectsReturned
|
||||||
from django.core.paginator import Paginator
|
from django.core.paginator import Paginator
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.conf import settings
|
from django.http import HttpResponse, HttpResponseRedirect
|
||||||
from django.http import HttpResponse
|
from django.shortcuts import render
|
||||||
from django.core.exceptions import MultipleObjectsReturned
|
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
|
|
||||||
from rest_framework.views import APIView
|
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
|
from rest_framework.views import APIView
|
||||||
|
|
||||||
from utils.shortcuts import (serializer_invalid_response, error_response,
|
|
||||||
success_response, error_page, paginate, rand_str)
|
|
||||||
from utils.captcha import Captcha
|
from utils.captcha import Captcha
|
||||||
from utils.otp_auth import OtpAuth
|
from utils.otp_auth import OtpAuth
|
||||||
|
from utils.shortcuts import (serializer_invalid_response, error_response,
|
||||||
from .tasks import _send_email
|
success_response, error_page, paginate, rand_str)
|
||||||
from .decorators import login_required
|
from .decorators import login_required
|
||||||
from .models import User, UserProfile, AdminExtraPermission, AdminType
|
from .decorators import super_admin_required
|
||||||
|
from .models import User, UserProfile, AdminType
|
||||||
from .serializers import (UserLoginSerializer, UserRegisterSerializer,
|
from .serializers import (UserLoginSerializer, UserRegisterSerializer,
|
||||||
UserChangePasswordSerializer,
|
UserChangePasswordSerializer,
|
||||||
UserSerializer, EditUserSerializer,
|
UserSerializer, EditUserSerializer,
|
||||||
ApplyResetPasswordSerializer, ResetPasswordSerializer,
|
ApplyResetPasswordSerializer, ResetPasswordSerializer,
|
||||||
SSOSerializer, EditUserProfileSerializer,
|
SSOSerializer, EditUserProfileSerializer,
|
||||||
TwoFactorAuthCodeSerializer)
|
TwoFactorAuthCodeSerializer)
|
||||||
from .decorators import super_admin_required
|
from .tasks import _send_email
|
||||||
|
|
||||||
|
|
||||||
class UserLoginAPIView(APIView):
|
class UserLoginAPIView(APIView):
|
||||||
@@ -223,7 +220,7 @@ class UserAdminAPIView(APIView):
|
|||||||
|
|
||||||
def logout(request):
|
def logout(request):
|
||||||
auth.logout(request)
|
auth.logout(request)
|
||||||
return http.HttpResponseRedirect("/")
|
return HttpResponseRedirect("/")
|
||||||
|
|
||||||
|
|
||||||
def index_page(request):
|
def index_page(request):
|
||||||
@@ -233,7 +230,7 @@ def index_page(request):
|
|||||||
if request.META.get('HTTP_REFERER') or request.GET.get("index"):
|
if request.META.get('HTTP_REFERER') or request.GET.get("index"):
|
||||||
return render(request, "oj/index.html")
|
return render(request, "oj/index.html")
|
||||||
else:
|
else:
|
||||||
return http.HttpResponseRedirect('/problems/')
|
return HttpResponseRedirect('/problems/')
|
||||||
|
|
||||||
|
|
||||||
class UsernameCheckAPIView(APIView):
|
class UsernameCheckAPIView(APIView):
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<app></app>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"ora": "^0.2.0",
|
"ora": "^0.2.0",
|
||||||
"shelljs": "^0.6.0",
|
"shelljs": "^0.6.0",
|
||||||
|
"simditor-markdown": "^1.1.2",
|
||||||
"url-loader": "^0.5.7",
|
"url-loader": "^0.5.7",
|
||||||
"vue-hot-reload-api": "^1.2.0",
|
"vue-hot-reload-api": "^1.2.0",
|
||||||
"vue-html-loader": "^1.0.0",
|
"vue-html-loader": "^1.0.0",
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
"webpack": "^1.12.2",
|
"webpack": "^1.12.2",
|
||||||
"webpack-dev-middleware": "^1.4.0",
|
"webpack-dev-middleware": "^1.4.0",
|
||||||
"webpack-hot-middleware": "^2.6.0",
|
"webpack-hot-middleware": "^2.6.0",
|
||||||
"webpack-merge": "^0.8.3"
|
"webpack-merge": "^0.8.3",
|
||||||
|
"webuploader": "^0.1.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@import "../../static/css/bootstrap.css";
|
@import "../../static/css/bootstrap.css";
|
||||||
@import "../../static/css/todc-bootstrap.css";
|
@import "../../static/css/todc-bootstrap.css";
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<back url="/user"></back>
|
<back></back>
|
||||||
<h3>修改用户信息</h3>
|
<h3>修改用户信息</h3>
|
||||||
<form v-on:submit="submit">
|
<form v-on:submit="submit">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
url: "/api/admin/user/",
|
url: "/api/admin/user/",
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
data: data,
|
data: data,
|
||||||
success: (data)=> {
|
success: (data)=> {
|
||||||
alert("更新成功");
|
alert("更新成功");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
this.request({
|
this.request({
|
||||||
url: "/api/admin/user/?user_id=" + this.$route.params["userId"],
|
url: "/api/admin/user/?user_id=" + this.$route.params["userId"],
|
||||||
method: "GET",
|
method: "GET",
|
||||||
success:(data)=> {
|
success: (data)=> {
|
||||||
this.user = data.data;
|
this.user = data.data;
|
||||||
for (var p of data.data.admin_extra_permission) {
|
for (var p of data.data.admin_extra_permission) {
|
||||||
if (this.userPermissionNum2Str[p]) {
|
if (this.userPermissionNum2Str[p]) {
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<simditor editorid="problem_detail"></simditor>
|
||||||
|
|
||||||
|
<uploader uploaderid="uploader"></uploader>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import simditor from "../utils/simditor.vue"
|
||||||
|
import uploader from "../utils/uploader.vue"
|
||||||
|
|
||||||
|
export default({
|
||||||
|
components: {
|
||||||
|
simditor,
|
||||||
|
uploader
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -39,10 +39,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
"showModal":(content) => {
|
"showModal": (content) => {
|
||||||
this.showModal = true;
|
this.showModal = true;
|
||||||
this.content = true;
|
this.content = true;
|
||||||
setTimeout(()=>{
|
setTimeout(()=> {
|
||||||
this.showModal = false;
|
this.showModal = false;
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
adminNav: [{}, {}]
|
adminNav: [{}, {}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<textarea id="{{ editorid }}"></textarea>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import Simditor from 'simditor'
|
||||||
|
import SimditorMakrdown from "simditor-markdown"
|
||||||
|
|
||||||
|
export default{
|
||||||
|
props: ["editorid"],
|
||||||
|
attached() {
|
||||||
|
var self = this;
|
||||||
|
var editor = new Simditor({
|
||||||
|
textarea: document.getElementById(self.editorid),
|
||||||
|
upload: {url: "/", fileKey: "file"},
|
||||||
|
toolbar: ['bold', 'italic', 'underline', 'color', 'image', 'ol', 'ul', 'markdown']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
@import "../../../../static/css/simditor.css";
|
||||||
|
@import "../../../../static/css/simditor-markdown.css";
|
||||||
|
@import "../../../../static/css/webuploader.css";
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<template>
|
||||||
|
<div id="{{ uploaderid }}">
|
||||||
|
<div class="btns">
|
||||||
|
<div id="picker"> picker</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import WebUploader from "webuploader"
|
||||||
|
|
||||||
|
export default ({
|
||||||
|
props: {
|
||||||
|
uploaderid: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
uploadpath: {
|
||||||
|
required: false,
|
||||||
|
default: "/server"
|
||||||
|
},
|
||||||
|
accept: {
|
||||||
|
required: false,
|
||||||
|
default(){
|
||||||
|
return {
|
||||||
|
title: 'Images',
|
||||||
|
extensions: 'gif,jpg,jpeg,bmp,png',
|
||||||
|
mimeTypes: 'image/*'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
attached() {
|
||||||
|
var self = this;
|
||||||
|
var uploader = WebUploader.create({
|
||||||
|
dnd: '#' + self.uploaderid,
|
||||||
|
runtimeOrder: "html5",
|
||||||
|
server: self.uploadpath,
|
||||||
|
pick: '#' + self.uploaderid,
|
||||||
|
resize: false,
|
||||||
|
auto: true,
|
||||||
|
accept: self.accept
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,51 +1,51 @@
|
|||||||
export default {
|
export default {
|
||||||
"zh-cn": {
|
"zh-cn": {
|
||||||
nav: {
|
nav: {
|
||||||
UserManagement: "用户管理"
|
UserManagement: "用户管理"
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
first: "首页",
|
first: "首页",
|
||||||
last: "末页"
|
last: "末页"
|
||||||
},
|
},
|
||||||
modalAlert: {
|
modalAlert: {
|
||||||
alert: "提示",
|
alert: "提示",
|
||||||
close: "关闭"
|
close: "关闭"
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
error: "请求失败",
|
error: "请求失败",
|
||||||
succeeded: "操作成功"
|
succeeded: "操作成功"
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
username: "用户名",
|
username: "用户名",
|
||||||
email: "邮箱",
|
email: "邮箱",
|
||||||
realName: "真实姓名",
|
realName: "真实姓名",
|
||||||
adminType: "用户类型",
|
adminType: "用户类型",
|
||||||
createTime: "注册时间",
|
createTime: "注册时间",
|
||||||
management: "管理",
|
management: "管理",
|
||||||
edit: "编辑",
|
edit: "编辑",
|
||||||
submission: "提交",
|
submission: "提交",
|
||||||
newPassword: "新密码",
|
newPassword: "新密码",
|
||||||
leaveBlankIfDoNotChangePassword: "不需要修改密码请留空",
|
leaveBlankIfDoNotChangePassword: "不需要修改密码请留空",
|
||||||
openAPIFunction: "OpenAPI 功能",
|
openAPIFunction: "OpenAPI 功能",
|
||||||
tfaAuth: "两步验证",
|
tfaAuth: "两步验证",
|
||||||
isDisabled: "禁用用户",
|
isDisabled: "禁用用户",
|
||||||
adminExtraPermission: "普通管理员额外权限",
|
adminExtraPermission: "普通管理员额外权限",
|
||||||
showAdminOnly: "只显示管理员"
|
showAdminOnly: "只显示管理员"
|
||||||
},
|
},
|
||||||
adminUtils: {
|
adminUtils: {
|
||||||
search: "搜索",
|
search: "搜索",
|
||||||
inputKeyword: "输入关键词",
|
inputKeyword: "输入关键词",
|
||||||
regularUser: "普通用户",
|
regularUser: "普通用户",
|
||||||
admin: "普通管理员",
|
admin: "普通管理员",
|
||||||
superAdmin: "超级管理员",
|
superAdmin: "超级管理员",
|
||||||
UserDoesNotExist: "用户不存在",
|
UserDoesNotExist: "用户不存在",
|
||||||
back: "返回",
|
back: "返回",
|
||||||
saveChanges: "保存修改",
|
saveChanges: "保存修改",
|
||||||
createPublicContest: "创建公开比赛",
|
createPublicContest: "创建公开比赛",
|
||||||
manageAllContest: "管理所有比赛",
|
manageAllContest: "管理所有比赛",
|
||||||
manageAllProblem: "管理所有题目",
|
manageAllProblem: "管理所有题目",
|
||||||
manageOwnProblem: "管理自己创建的题目",
|
manageOwnProblem: "管理自己创建的题目",
|
||||||
unsupportedBrowserWarningMsg: "当前网页 <strong>不支持</strong> 你正在使用的浏览器, 为了正常的访问,请到 <a href=\"http://browsehappy.com/\"> 升级你的浏览器</a>"
|
unsupportedBrowserWarningMsg: "当前网页 <strong>不支持</strong> 你正在使用的浏览器, 为了正常的访问,请到 <a href=\"http://browsehappy.com/\"> 升级你的浏览器</a>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -7,6 +7,8 @@ import locale from "./locales"
|
|||||||
|
|
||||||
import userList from "./components/account/userList.vue"
|
import userList from "./components/account/userList.vue"
|
||||||
import editUser from "./components/account/editUser.vue"
|
import editUser from "./components/account/editUser.vue"
|
||||||
|
import problem from "./components/problem/problem.vue"
|
||||||
|
import uploader from "./components/utils/uploader.vue"
|
||||||
|
|
||||||
|
|
||||||
var request = {
|
var request = {
|
||||||
@@ -83,6 +85,10 @@ router.map({
|
|||||||
"/user/edit/:userId": {
|
"/user/edit/:userId": {
|
||||||
name: "editUser",
|
name: "editUser",
|
||||||
component: editUser
|
component: editUser
|
||||||
|
},
|
||||||
|
"/problem/create": {
|
||||||
|
name: "createProblem",
|
||||||
|
component: problem
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
.simditor .markdown-editor {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.simditor .markdown-editor textarea {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 22px 15px 40px;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 1px solid #dfdfdf;
|
||||||
|
resize: none;
|
||||||
|
outline: none;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.simditor.simditor-markdown .markdown-editor {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.simditor.simditor-markdown .simditor-body {
|
||||||
|
min-height: 100px;
|
||||||
|
background: #f3f3f3;
|
||||||
|
}
|
||||||
|
.simditor.simditor-markdown .simditor-placeholder {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-item.toolbar-item-markdown .simditor-icon {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,746 @@
|
|||||||
|
/*!
|
||||||
|
* Simditor v2.3.6
|
||||||
|
* http://simditor.tower.im/
|
||||||
|
* 2015-12-21
|
||||||
|
*/
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Simditor';
|
||||||
|
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABp8AA4AAAAAKmwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAaYAAAABoAAAAcdO8GE09TLzIAAAG0AAAARQAAAGAQ+ZFXY21hcAAAAkgAAABRAAABWuA2Gx9jdnQgAAAEgAAAAAoAAAAKAwQAxGZwZ20AAAKcAAABsQAAAmUPtC+nZ2x5ZgAABNgAABPeAAAgZG/p6QxoZWFkAAABRAAAADAAAAA2BvuCgGhoZWEAAAF0AAAAHgAAACQH9QTlaG10eAAAAfwAAABKAAAAlHv7AItsb2NhAAAEjAAAAEwAAABMi4qTXm1heHAAAAGUAAAAIAAAACABRwHNbmFtZQAAGLgAAAEFAAAB12vS/ulwb3N0AAAZwAAAAJ4AAAFsyCrvunByZXAAAARQAAAALgAAAC6w8isUeNpjYGRgYADiKAkPy3h+m68M8swfgCIMF0/IVyDo/84sFswJQC4HAx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+4Ln0ZfYx9jqomhqQDT7u1CNRm+x0ckE3RZBrneC013ayvrklmmLnZCsGPrFgk+10hm6TBdlinFLESfq25yC+JPtmds7vpWiixyBmTO+DALGgWKH98GTUds/4xLVORNkJgeJphm9u2TZNJxfcMHmGTrpWsYp0UUpt53bPLine truncated
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
.simditor-icon {
|
||||||
|
display: inline-block;
|
||||||
|
font: normal normal normal 14px/1 'Simditor';
|
||||||
|
font-size: inherit;
|
||||||
|
text-rendering: auto;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-code:before {
|
||||||
|
content: '\f000';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-bold:before {
|
||||||
|
content: '\f001';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-italic:before {
|
||||||
|
content: '\f002';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-underline:before {
|
||||||
|
content: '\f003';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-times:before {
|
||||||
|
content: '\f004';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-strikethrough:before {
|
||||||
|
content: '\f005';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-list-ol:before {
|
||||||
|
content: '\f006';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-list-ul:before {
|
||||||
|
content: '\f007';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-quote-left:before {
|
||||||
|
content: '\f008';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-table:before {
|
||||||
|
content: '\f009';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-link:before {
|
||||||
|
content: '\f00a';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-picture-o:before {
|
||||||
|
content: '\f00b';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-minus:before {
|
||||||
|
content: '\f00c';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-indent:before {
|
||||||
|
content: '\f00d';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-outdent:before {
|
||||||
|
content: '\f00e';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-unlink:before {
|
||||||
|
content: '\f00f';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-caret-down:before {
|
||||||
|
content: '\f010';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-caret-right:before {
|
||||||
|
content: '\f011';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-upload:before {
|
||||||
|
content: '\f012';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-undo:before {
|
||||||
|
content: '\f013';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-smile-o:before {
|
||||||
|
content: '\f014';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-tint:before {
|
||||||
|
content: '\f015';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-font:before {
|
||||||
|
content: '\f016';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-html5:before {
|
||||||
|
content: '\f017';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-mark:before {
|
||||||
|
content: '\f018';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-align-center:before {
|
||||||
|
content: '\f019';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-align-left:before {
|
||||||
|
content: '\f01a';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-align-right:before {
|
||||||
|
content: '\f01b';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-font-minus:before {
|
||||||
|
content: '\f01c';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-markdown:before {
|
||||||
|
content: '\f01d';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor-icon-checklist:before {
|
||||||
|
content: '\f01e';
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor {
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid #c9d8db;
|
||||||
|
}
|
||||||
|
.simditor .simditor-wrapper {
|
||||||
|
position: relative;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
.simditor .simditor-wrapper > textarea {
|
||||||
|
display: none !important;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-family: monaco;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.6;
|
||||||
|
border: none;
|
||||||
|
padding: 22px 15px 40px;
|
||||||
|
min-height: 300px;
|
||||||
|
outline: none;
|
||||||
|
background: transparent;
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
.simditor .simditor-wrapper .simditor-placeholder {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
z-index: 0;
|
||||||
|
padding: 22px 15px;
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: arial, sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #999999;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.simditor .simditor-wrapper.toolbar-floating .simditor-toolbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
z-index: 10;
|
||||||
|
box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
.simditor .simditor-wrapper .simditor-image-loading {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.simditor .simditor-wrapper .simditor-image-loading .progress {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.4);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body {
|
||||||
|
padding: 22px 15px 40px;
|
||||||
|
min-height: 300px;
|
||||||
|
outline: none;
|
||||||
|
cursor: text;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body a.selected {
|
||||||
|
background: #b3d4fd;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body a.simditor-mention {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body .simditor-table {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body .simditor-table.resizing {
|
||||||
|
cursor: col-resize;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body .simditor-table .simditor-resize-handle {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 10px;
|
||||||
|
height: 100%;
|
||||||
|
cursor: col-resize;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body pre {
|
||||||
|
/*min-height: 28px;*/
|
||||||
|
box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
word-wrap: break-word !important;
|
||||||
|
white-space: pre-wrap !important;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body img {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body img.selected {
|
||||||
|
box-shadow: 0 0 0 4px #cccccc;
|
||||||
|
}
|
||||||
|
.simditor .simditor-paste-bin {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 10px;
|
||||||
|
right: 10px;
|
||||||
|
width: 1px;
|
||||||
|
height: 20px;
|
||||||
|
font-size: 1px;
|
||||||
|
line-height: 1px;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
opacity: 0;
|
||||||
|
-webkit-user-select: text;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar {
|
||||||
|
border-bottom: 1px solid #eeeeee;
|
||||||
|
background: #ffffff;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0 0 6px;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > span.separator {
|
||||||
|
display: inline-block;
|
||||||
|
background: #cfcfcf;
|
||||||
|
width: 1px;
|
||||||
|
height: 18px;
|
||||||
|
margin: 11px 15px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item {
|
||||||
|
display: inline-block;
|
||||||
|
width: 46px;
|
||||||
|
height: 40px;
|
||||||
|
outline: none;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 40px;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item span {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item span.simditor-icon {
|
||||||
|
display: inline;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item:hover span {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.active {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.active span {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.disabled {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.disabled span {
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title span:before {
|
||||||
|
content: "H";
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-family: 'Times New Roman';
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title.active-h1 span:before {
|
||||||
|
content: 'H1';
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title.active-h2 span:before {
|
||||||
|
content: 'H2';
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title.active-h3 span:before {
|
||||||
|
content: 'H3';
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-image {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-image > input[type=file] {
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
top: 0px;
|
||||||
|
opacity: 0;
|
||||||
|
font-size: 100px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li.menu-on .toolbar-item {
|
||||||
|
position: relative;
|
||||||
|
z-index: 20;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li.menu-on .toolbar-item span {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar > ul > li.menu-on .toolbar-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 40px;
|
||||||
|
left: 0;
|
||||||
|
z-index: 21;
|
||||||
|
background: #ffffff;
|
||||||
|
text-align: left;
|
||||||
|
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu:before {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
width: 46px;
|
||||||
|
height: 4px;
|
||||||
|
background: #ffffff;
|
||||||
|
position: absolute;
|
||||||
|
top: -3px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu ul {
|
||||||
|
min-width: 160px;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 10px 1px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item {
|
||||||
|
display: block;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 2em;
|
||||||
|
padding: 0 10px;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item:hover {
|
||||||
|
background: #f6f6f6;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h2 {
|
||||||
|
font-size: 22px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h3 {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h4 {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h5 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu ul > li .separator {
|
||||||
|
display: block;
|
||||||
|
border-top: 1px solid #cccccc;
|
||||||
|
height: 0;
|
||||||
|
line-height: 0;
|
||||||
|
font-size: 0;
|
||||||
|
margin: 6px 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color {
|
||||||
|
width: 96px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list {
|
||||||
|
height: 40px;
|
||||||
|
margin: 10px 6px 6px 10px;
|
||||||
|
padding: 0;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li {
|
||||||
|
float: left;
|
||||||
|
margin: 0 4px 4px 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color {
|
||||||
|
display: block;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
background: #dfdfdf;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color:hover {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color.font-color-default {
|
||||||
|
background: #333333;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-1 {
|
||||||
|
background: #E33737;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-2 {
|
||||||
|
background: #e28b41;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-3 {
|
||||||
|
background: #c8a732;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-4 {
|
||||||
|
background: #209361;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-5 {
|
||||||
|
background: #418caf;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-6 {
|
||||||
|
background: #aa8773;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-7 {
|
||||||
|
background: #999999;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table {
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table {
|
||||||
|
border: none;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table td {
|
||||||
|
padding: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table td:before {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border: 1px solid #ffffff;
|
||||||
|
background: #f3f3f3;
|
||||||
|
display: block;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table td.selected:before {
|
||||||
|
background: #cfcfcf;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-edit-table {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-edit-table ul li {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-image .menu-item-upload-image {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-image .menu-item-upload-image input[type=file] {
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
top: 0px;
|
||||||
|
opacity: 0;
|
||||||
|
font-size: 100px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-alignment {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-alignment ul {
|
||||||
|
min-width: 100%;
|
||||||
|
}
|
||||||
|
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-alignment .menu-item {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover {
|
||||||
|
display: none;
|
||||||
|
padding: 5px 8px 0;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||||
|
border-radius: 2px;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover .settings-field {
|
||||||
|
margin: 0 0 5px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover .settings-field label {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 5px 0 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover .settings-field input[type=text] {
|
||||||
|
display: inline-block;
|
||||||
|
width: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover .settings-field input[type=text].image-size {
|
||||||
|
width: 83px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover .settings-field .times {
|
||||||
|
display: inline-block;
|
||||||
|
width: 26px;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover.link-popover .btn-unlink, .simditor .simditor-popover.image-popover .btn-upload, .simditor .simditor-popover.image-popover .btn-restore {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 0 0 5px;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 14px;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover.link-popover .btn-unlink span, .simditor .simditor-popover.image-popover .btn-upload span, .simditor .simditor-popover.image-popover .btn-restore span {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover.link-popover .btn-unlink:hover span, .simditor .simditor-popover.image-popover .btn-upload:hover span, .simditor .simditor-popover.image-popover .btn-restore:hover span {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover.image-popover .btn-upload {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.simditor .simditor-popover.image-popover .btn-upload input[type=file] {
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
top: 0px;
|
||||||
|
opacity: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 28px;
|
||||||
|
}
|
||||||
|
.simditor.simditor-mobile .simditor-wrapper.toolbar-floating .simditor-toolbar {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
z-index: 10;
|
||||||
|
box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.simditor .simditor-body, .editor-style {
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: arial, sans-serif;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: #333;
|
||||||
|
outline: none;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body > :first-child, .editor-style > :first-child {
|
||||||
|
margin-top: 0 !important;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body a, .editor-style a {
|
||||||
|
color: #4298BA;
|
||||||
|
text-decoration: none;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body a:visited, .editor-style a:visited {
|
||||||
|
color: #4298BA;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body a:hover, .editor-style a:hover {
|
||||||
|
color: #0F769F;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body a:active, .editor-style a:active {
|
||||||
|
color: #9E792E;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body a:hover, .simditor .simditor-body a:active, .editor-style a:hover, .editor-style a:active {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body h1, .simditor .simditor-body h2, .simditor .simditor-body h3, .simditor .simditor-body h4, .simditor .simditor-body h5, .simditor .simditor-body h6, .editor-style h1, .editor-style h2, .editor-style h3, .editor-style h4, .editor-style h5, .editor-style h6 {
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 40px 0 20px;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body h1, .editor-style h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body h2, .editor-style h2 {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body h3, .editor-style h3 {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body h4, .editor-style h4 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body h5, .editor-style h5 {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body h6, .editor-style h6 {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body p, .simditor .simditor-body div, .editor-style p, .editor-style div {
|
||||||
|
word-wrap: break-word;
|
||||||
|
margin: 0 0 15px 0;
|
||||||
|
color: #333;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body b, .simditor .simditor-body strong, .editor-style b, .editor-style strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body i, .simditor .simditor-body em, .editor-style i, .editor-style em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body u, .editor-style u {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body strike, .simditor .simditor-body del, .editor-style strike, .editor-style del {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body ul, .simditor .simditor-body ol, .editor-style ul, .editor-style ol {
|
||||||
|
list-style: disc outside none;
|
||||||
|
margin: 15px 0;
|
||||||
|
padding: 0 0 0 40px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body ul ul, .simditor .simditor-body ul ol, .simditor .simditor-body ol ul, .simditor .simditor-body ol ol, .editor-style ul ul, .editor-style ul ol, .editor-style ol ul, .editor-style ol ol {
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body ul ul, .simditor .simditor-body ol ul, .editor-style ul ul, .editor-style ol ul {
|
||||||
|
list-style: circle outside none;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body ul ul ul, .simditor .simditor-body ol ul ul, .editor-style ul ul ul, .editor-style ol ul ul {
|
||||||
|
list-style: square outside none;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body ol, .editor-style ol {
|
||||||
|
list-style: decimal;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body blockquote, .editor-style blockquote {
|
||||||
|
border-left: 6px solid #ddd;
|
||||||
|
padding: 5px 0 5px 10px;
|
||||||
|
margin: 15px 0 15px 15px;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body blockquote > :first-child, .editor-style blockquote > :first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body code, .editor-style code {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 4px;
|
||||||
|
margin: 0 5px;
|
||||||
|
background: #eeeeee;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: 'monaco', 'Consolas', "Liberation Mono", Courier, monospace;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body pre, .editor-style pre {
|
||||||
|
padding: 10px 5px 10px 10px;
|
||||||
|
margin: 15px 0;
|
||||||
|
display: block;
|
||||||
|
line-height: 18px;
|
||||||
|
background: #F0F0F0;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: 'monaco', 'Consolas', "Liberation Mono", Courier, monospace;
|
||||||
|
white-space: pre;
|
||||||
|
word-wrap: normal;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body pre code, .editor-style pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
background: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body hr, .editor-style hr {
|
||||||
|
display: block;
|
||||||
|
height: 0px;
|
||||||
|
border: 0;
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
margin: 15px 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body table, .editor-style table {
|
||||||
|
width: 100%;
|
||||||
|
table-layout: fixed;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
margin: 15px 0;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body table thead, .editor-style table thead {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body table td, .simditor .simditor-body table th, .editor-style table td, .editor-style table th {
|
||||||
|
min-width: 40px;
|
||||||
|
height: 30px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
vertical-align: top;
|
||||||
|
padding: 2px 4px;
|
||||||
|
text-align: left;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body table td.active, .simditor .simditor-body table th.active, .editor-style table td.active, .editor-style table th.active {
|
||||||
|
background-color: #ffffee;
|
||||||
|
}
|
||||||
|
.simditor .simditor-body img, .editor-style img {
|
||||||
|
margin: 0 5px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
.webuploader-container {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.webuploader-element-invisible {
|
||||||
|
position: absolute !important;
|
||||||
|
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
|
||||||
|
clip: rect(1px,1px,1px,1px);
|
||||||
|
}
|
||||||
|
.webuploader-pick {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
background: #00b7ee;
|
||||||
|
padding: 10px 15px;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 3px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.webuploader-pick-hover {
|
||||||
|
background: #00a2d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.webuploader-pick-disable {
|
||||||
|
opacity: 0.6;
|
||||||
|
pointer-events:none;
|
||||||
|
}
|
||||||
|
|
||||||
+5
-2
@@ -1,12 +1,11 @@
|
|||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
import os
|
import os
|
||||||
import hashlib
|
import hashlib
|
||||||
import time
|
|
||||||
import random
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.core.paginator import Paginator
|
from django.core.paginator import Paginator
|
||||||
|
from django.http import HttpResponseRedirect
|
||||||
|
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
|
|
||||||
@@ -125,3 +124,7 @@ def build_query_string(kv_data, ignore_none=True):
|
|||||||
query_string = "?"
|
query_string = "?"
|
||||||
query_string += (k + "=" + str(v))
|
query_string += (k + "=" + str(v))
|
||||||
return query_string
|
return query_string
|
||||||
|
|
||||||
|
|
||||||
|
def redirect_to_login(request):
|
||||||
|
return HttpResponseRedirect("/login/?__from=" + urllib.quote(request.path))
|
||||||
Reference in new issue
Block a user