forked from Gitlink/forgeplus
Change assets precompile
This commit is contained in:
parent
61e7091ece
commit
79b61913c5
|
@ -39,7 +39,7 @@ module LaboratoryHelper
|
|||
new_course: "https://www.trustie.net/courses/new",
|
||||
edit_account: "https://www.trustie.net/my/account",
|
||||
my_courses: "https://www.trustie.net/users/#{current_user.try(:login)}/user_courselist",
|
||||
my_projects: "/users/#{current_user.try(:login)}/projects",
|
||||
my_projects: "https://testforgeplus.trustie.net/users/#{current_user.try(:login)}/projects",
|
||||
my_organ: "https://www.trustie.net/users/#{current_user.try(:login)}/user_organizations",
|
||||
default_url: "https://www.trustie.net/",
|
||||
tiding_url: "https://www.trustie.net/users/#{current_user.try(:login)}/user_messages",
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -135979,6 +135979,20 @@ $(document).on('turbolinks:load', function() {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
// ------------ 上移/下移 -------------
|
||||
$('.discipline-list-container').on('click', ".move-action", function () {
|
||||
var $doAction = $(this);
|
||||
|
||||
var disciplineId = $doAction.data('id');
|
||||
var opr = $doAction.data('opr');
|
||||
$.ajax({
|
||||
url: '/admins/disciplines/' + disciplineId + '/adjust_position',
|
||||
method: 'POST',
|
||||
dataType: 'script',
|
||||
data: {opr: opr}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
$(document).on('turbolinks:load', function() {
|
||||
|
@ -136082,6 +136096,10 @@ $(document).on('turbolinks:load', function() {
|
|||
});
|
||||
}
|
||||
});
|
||||
$(document).on('turbolinks:load', function() {
|
||||
var $addSectionModal = $('.admin-import-user-modal');
|
||||
|
||||
});
|
||||
$(document).on('turbolinks:load', function() {
|
||||
if($(".admins-graduation-standards-index-page").length > 0){
|
||||
$(".admin-body-container").on("click", ".standard-create-modal", function () {
|
||||
|
@ -137754,17 +137772,6 @@ $(document).on('turbolinks:load', function() {
|
|||
}
|
||||
})
|
||||
;
|
||||
$(document).on('turbolinks:load', function () {
|
||||
if ($('body.admins-projects-index-page').length > 0) {
|
||||
var $form = $('.search-form');
|
||||
|
||||
// 清空
|
||||
$form.on('click', '.clear-btn', function () {
|
||||
$form.find('input[name="search"]').val('');
|
||||
$form.find('input[type="submit"]').trigger('click');
|
||||
});
|
||||
}
|
||||
});
|
||||
$(document).on('turbolinks:load', function() {
|
||||
if ($('body.admins-repertoires-index-page').length > 0) {
|
||||
|
||||
|
@ -137837,13 +137844,13 @@ $(document).on('turbolinks:load', function() {
|
|||
var $addMemberModal = $('.admin-add-salesman-channel-user-modal');
|
||||
var $addMemberForm = $addMemberModal.find('.admin-add-salesman-channel-user-form');
|
||||
var $memberSelect = $addMemberModal.find('.salesman-channel-user-select');
|
||||
var $salesmanIdInput = $('.salesman-channel-list-form').find(".btn-primary");
|
||||
var $form = $addMemberModal.find('form.admin-add-salesman-user-form');
|
||||
|
||||
// 搜索
|
||||
var searchscForm = $(".saleman-channel-list-form .search-form");
|
||||
|
||||
|
||||
$addMemberModal.on('show.bs.modal', function(event){
|
||||
var $link = $(event.relatedTarget);
|
||||
// var salesmanId = $link.data('salesman_id');
|
||||
// $salesmanIdInput.val(salesmanId);
|
||||
|
||||
$memberSelect.select2('val', ' ');
|
||||
});
|
||||
|
||||
|
@ -137880,28 +137887,73 @@ $(document).on('turbolinks:load', function() {
|
|||
// var salesmanId = $salesmanIdInput.val();
|
||||
var memberIds = $memberSelect.val();
|
||||
if (memberIds && memberIds.length > 0) {
|
||||
var url = $form.data('url');
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
url: '/admins/salesman_channels/batch_add',
|
||||
data: { salesman_id: $salesmanIdInput.data("salesman-id"), school_ids: memberIds },
|
||||
url: url,
|
||||
data: $form.serialize(),
|
||||
success: function(){
|
||||
$.notify({ message: '创建成功' });
|
||||
$addMemberModal.modal('hide');
|
||||
searchscForm.find('input[name="keyword"]').val('');
|
||||
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
submitForm();
|
||||
}, 500);
|
||||
},
|
||||
error: function(res){
|
||||
var data = res.responseJSON;
|
||||
$form.find('.error').html(data.message);
|
||||
$addMemberForm.find('.error').html(data.message);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$addMemberModal.modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 清空
|
||||
searchscForm.on('click', '.clear-btn', function () {
|
||||
searchscForm.find('.start_date').val('');
|
||||
searchscForm.find('.end_date').val('').trigger('change');
|
||||
searchscForm.find('input[name="keyword"]').val('');
|
||||
});
|
||||
|
||||
// 时间跨度
|
||||
var baseOptions = {
|
||||
autoclose: true,
|
||||
language: 'zh-CN',
|
||||
format: 'yyyy-mm-dd',
|
||||
startDate: '2017-04-01'
|
||||
};
|
||||
|
||||
var defineDateRangeSelect = function(element){
|
||||
var options = $.extend({inputs: $(element).find('.start-date, .end-date')}, baseOptions);
|
||||
$(element).datepicker(options);
|
||||
|
||||
$(element).find('.start-date').datepicker().on('changeDate', function(e){
|
||||
$(element).find('.end-date').datepicker('setStartDate', e.date);
|
||||
});
|
||||
};
|
||||
|
||||
defineDateRangeSelect('.grow-date-input-daterange');
|
||||
|
||||
|
||||
// 区间搜索
|
||||
searchscForm.on('click', ".search-btn", function(){
|
||||
submitForm();
|
||||
});
|
||||
|
||||
var submitForm = function(){
|
||||
var url = searchscForm.data('search-form-url');
|
||||
var form = searchscForm;
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: form.serialize(),
|
||||
dataType: "script"
|
||||
})
|
||||
};
|
||||
}
|
||||
});
|
||||
$(document).on('turbolinks:load', function() {
|
||||
|
@ -137964,7 +138016,7 @@ $(document).on('turbolinks:load', function() {
|
|||
$addMemberModal.modal('hide');
|
||||
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
listForm();
|
||||
}, 500);
|
||||
},
|
||||
error: function(res){
|
||||
|
@ -137976,6 +138028,14 @@ $(document).on('turbolinks:load', function() {
|
|||
$addMemberModal.modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var listForm = function(){
|
||||
$.ajax({
|
||||
url: '/admins/salesman_customers?salesman_id='+ $salesmanIdInput.data("salesman-id"),
|
||||
dataType: "script"
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
$(document).on('turbolinks:load', function() {
|
||||
|
@ -138272,18 +138332,6 @@ $(document).on('turbolinks:load', function(){
|
|||
defineDateRangeSelect('.grow-date-input-daterange');
|
||||
}
|
||||
});
|
||||
$(document).on('turbolinks:load', function () {
|
||||
if ($('body.admins-shixun-modify-records-index-page').length > 0) {
|
||||
var $form = $('.search-form');
|
||||
|
||||
// 清空
|
||||
$form.on('click', '.clear-btn', function () {
|
||||
$form.find('select[name="date"]').val('weekly');
|
||||
$form.find('input[name="user_name"]').val('');
|
||||
$form.find('input[type="submit"]').trigger('click');
|
||||
});
|
||||
}
|
||||
});
|
||||
$(document).on('turbolinks:load', function() {
|
||||
if ($('body.admins-shixun-settings-index-page').length > 0) {
|
||||
let searchContainer = $(".shixun-settings-list-form");
|
||||
|
@ -138458,6 +138506,19 @@ $(document).on('turbolinks:load', function () {
|
|||
data: json
|
||||
});
|
||||
});
|
||||
// ------------ 上移/下移 -------------
|
||||
$('.sub-discipline-list-container').on('click', ".move-action", function () {
|
||||
var $doAction = $(this);
|
||||
|
||||
var objectId = $doAction.data('id');
|
||||
var opr = $doAction.data('opr');
|
||||
$.ajax({
|
||||
url: '/admins/sub_disciplines/' + objectId + '/adjust_position',
|
||||
method: 'POST',
|
||||
dataType: 'script',
|
||||
data: {opr: opr}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
$(document).on('turbolinks:load', function() {
|
||||
|
@ -138577,6 +138638,7 @@ $(document).on('turbolinks:load', function () {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
$(".subject-setting-list-container").on("change", '.subject-setting-form', function () {
|
||||
var s_id = $(this).attr("data-id");
|
||||
var s_value = $(this).val();
|
||||
|
@ -138790,6 +138852,20 @@ $(document).on('turbolinks:load', function () {
|
|||
data: json
|
||||
});
|
||||
});
|
||||
|
||||
// ------------ 上移/下移 -------------
|
||||
$('.tag-discipline-list-container').on('click', ".move-action", function () {
|
||||
var $doAction = $(this);
|
||||
|
||||
var objectId = $doAction.data('id');
|
||||
var opr = $doAction.data('opr');
|
||||
$.ajax({
|
||||
url: '/admins/tag_disciplines/' + objectId + '/adjust_position',
|
||||
method: 'POST',
|
||||
dataType: 'script',
|
||||
data: {opr: opr}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
$(document).on('turbolinks:load', function() {
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -25598,6 +25598,65 @@ input.form-control {
|
|||
background: #fff;
|
||||
}
|
||||
|
||||
/* line 138, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .mt-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* line 139, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .nav_blueline_status {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* line 143, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .nav_blueline_status li {
|
||||
padding: 0px 15px;
|
||||
border-radius: 15px;
|
||||
border: 1px solid #CDCDCD;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
float: left;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
/* line 151, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .nav_blueline_status li a {
|
||||
color: #CDCDCD !important;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* line 156, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .nav_blueline_status li.active {
|
||||
border: 1px solid #4CACFF;
|
||||
}
|
||||
|
||||
/* line 158, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .nav_blueline_status li.active a {
|
||||
color: #4CACFF !important;
|
||||
}
|
||||
|
||||
/* line 163, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .fr {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* line 164, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .width240 {
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
/* line 167, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .mr15 {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
/* line 168, app/assets/stylesheets/admins/common.scss */
|
||||
.admin-body-container .mt2 {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* line 3, app/assets/stylesheets/admins/competition_settings.scss */
|
||||
.admins-competition-settings-index-page .competition-mode-container .row {
|
||||
height: 35px;
|
||||
|
@ -25812,83 +25871,6 @@ input.form-control {
|
|||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* line 1, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* line 2, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff ul {
|
||||
background: #fff;
|
||||
overflow: auto;
|
||||
font-size: 13px;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 1rem;
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* line 3, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff del, .diff ins {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line 4, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff li {
|
||||
padding: 0;
|
||||
display: table-row;
|
||||
margin: 0;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
/* line 5, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff li.ins {
|
||||
background: #dfd;
|
||||
color: #080;
|
||||
}
|
||||
|
||||
/* line 6, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff li.del {
|
||||
background: #fee;
|
||||
color: #b00;
|
||||
}
|
||||
|
||||
/* line 7, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff li:hover {
|
||||
background: #ffc;
|
||||
}
|
||||
|
||||
/* try 'whitespace:pre;' if you don't want lines to wrap */
|
||||
/* line 10, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff del, .diff ins, .diff span {
|
||||
white-space: pre-wrap;
|
||||
font-family: courier;
|
||||
}
|
||||
|
||||
/* line 11, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff del strong {
|
||||
font-weight: normal;
|
||||
background: #fcc;
|
||||
}
|
||||
|
||||
/* line 12, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff ins strong {
|
||||
font-weight: normal;
|
||||
background: #9f9;
|
||||
}
|
||||
|
||||
/* line 13, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff li.diff-comment {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* line 14, app/assets/stylesheets/admins/diff.scss */
|
||||
.diff li.diff-block-info {
|
||||
background: none repeat scroll 0 0 gray;
|
||||
}
|
||||
|
||||
/* line 2, app/assets/stylesheets/admins/ec_tempaltes.scss */
|
||||
.admins-ec-templates-index-page .template-file-upload {
|
||||
padding: 10px;
|
||||
|
@ -25912,6 +25894,224 @@ input.form-control {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* line 2, app/assets/stylesheets/admins/forum_moderators.scss */
|
||||
.admins-forum-moderators-index-page .df {
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* line 5, app/assets/stylesheets/admins/forum_moderators.scss */
|
||||
.admins-forum-moderators-index-page .flex1 {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* line 8, app/assets/stylesheets/admins/forum_moderators.scss */
|
||||
.admins-forum-moderators-index-page .text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* line 2, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .color-grey {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
/* line 3, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .grid-item-top {
|
||||
display: grid;
|
||||
grid-template-columns: -webkit-max-content 1fr;
|
||||
grid-template-columns: max-content 1fr;
|
||||
align-self: start;
|
||||
}
|
||||
|
||||
/* line 8, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .mt20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* line 9, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .none {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* line 10, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .color-red {
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
/* line 11, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .upload-image-100 {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
/* line-height: 100px; */
|
||||
background: #f5f5f5;
|
||||
color: #999;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* line 21, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* line 24, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .avatar100 {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* line 29, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .upload-image-100:hover .admin-show-again-upload {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* line 30, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .admin-show-again-upload {
|
||||
bottom: 0;
|
||||
width: 100px;
|
||||
height: 100%;
|
||||
line-height: 100px;
|
||||
/* top: 0; */
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* line 41, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .menu_operate {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* line 44, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .menu_operate .operateList {
|
||||
position: absolute;
|
||||
right: -110px;
|
||||
top: 9px;
|
||||
background: #fff;
|
||||
width: 100px;
|
||||
color: #999;
|
||||
box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.2);
|
||||
z-index: 100;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* line 54, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .menu_operate .operateList a {
|
||||
display: block;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
/* line 62, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .menu_operate .operateList.active {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* line 66, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .color-grey-6 {
|
||||
color: #666 !important;
|
||||
}
|
||||
|
||||
/* line 69, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .set_l_submenu {
|
||||
padding-left: 50px;
|
||||
display: none;
|
||||
width: 180px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
/* line 74, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .set_l_submenu li {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
/* line 78, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .set_l_submenu.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* line 81, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .set_l_premenu {
|
||||
position: relative;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* line 88, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .df {
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* line 91, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .flex1 {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* line 94, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* line 97, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .grid-item-left {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr -webkit-max-content;
|
||||
grid-template-columns: 1fr max-content;
|
||||
align-self: start;
|
||||
}
|
||||
|
||||
/* line 102, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .ml20 {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* line 104, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .forum-moderators-items {
|
||||
padding: 10px 30px;
|
||||
max-height: 175px;
|
||||
overflow-y: auto;
|
||||
background: #F4FAFF;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* line 111, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .mr4 {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
/* line 112, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .blue-user-btn {
|
||||
margin: 0 5px;
|
||||
padding: 2px 8px;
|
||||
background: #F4F8FA !important;
|
||||
color: #fff !important;
|
||||
border: 1px solid #4CACFF;
|
||||
border-radius: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* line 121, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .mr5 {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* line 124, app/assets/stylesheets/admins/forum_sections.scss */
|
||||
.admins-forum-sections-index-page .moderator-list-content {
|
||||
display: inline-block;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
/* line 4, app/assets/stylesheets/admins/identity_authentications.scss */
|
||||
.admins-identity-authentications-index-page .identity-authentication-list-container span.apply-status-1 {
|
||||
color: #28a745;
|
||||
|
@ -26178,6 +26378,11 @@ input.form-control {
|
|||
color: #888;
|
||||
}
|
||||
|
||||
/* line 2, app/assets/stylesheets/admins/memos.scss */
|
||||
.admins-memos-index-page .users-list-container {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* line 4, app/assets/stylesheets/admins/professional_authentications.scss */
|
||||
.admins-professional-authentications-index-page .professional-authentication-list-container span.apply-status-1 {
|
||||
color: #28a745;
|
||||
|
@ -26286,11 +26491,6 @@ input.form-control {
|
|||
color: #6c757d;
|
||||
}
|
||||
|
||||
/* line 3, app/assets/stylesheets/admins/shixun_feedback_messages.scss */
|
||||
.admins-shixun-feedback-messages-index-page .content-img img {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
/* line 2, app/assets/stylesheets/admins/shixun_settings.scss */
|
||||
.admins-shixun-settings-index-page input[type="checkbox"] {
|
||||
font-size: 18px;
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -1,239 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* KindEditor - WYSIWYG HTML Editor for Internet
|
||||
* Copyright (C) 2006-2011 kindsoft.net
|
||||
*
|
||||
* @author Roddy <luolonghao@gmail.com>
|
||||
* @site http://www.kindsoft.net/
|
||||
* @licence http://www.kindsoft.net/license.php
|
||||
*******************************************************************************/
|
||||
|
||||
KindEditor.lang({
|
||||
imagedirectupload:'本地图片',
|
||||
more: '切换到更多功能',
|
||||
less: '切换到简单功能',
|
||||
source : 'HTML代码',
|
||||
preview : '预览',
|
||||
undo : '后退(Ctrl+Z)',
|
||||
redo : '前进(Ctrl+Y)',
|
||||
cut : '剪切(Ctrl+X)',
|
||||
copy : '复制(Ctrl+C)',
|
||||
paste : '粘贴(Ctrl+V)',
|
||||
plainpaste : '粘贴为无格式文本',
|
||||
wordpaste : '从Word粘贴',
|
||||
selectall : '全选(Ctrl+A)',
|
||||
justifyleft : '左对齐',
|
||||
justifycenter : '居中',
|
||||
justifyright : '右对齐',
|
||||
justifyfull : '两端对齐',
|
||||
insertorderedlist : '编号',
|
||||
insertunorderedlist : '项目符号',
|
||||
indent : '增加缩进',
|
||||
outdent : '减少缩进',
|
||||
subscript : '下标',
|
||||
superscript : '上标',
|
||||
formatblock : '段落',
|
||||
fontname : '字体',
|
||||
fontsize : '文字大小',
|
||||
forecolor : '文字颜色',
|
||||
hilitecolor : '文字背景',
|
||||
bold : '粗体(Ctrl+B)',
|
||||
italic : '斜体(Ctrl+I)',
|
||||
underline : '下划线(Ctrl+U)',
|
||||
strikethrough : '删除线',
|
||||
removeformat : '删除格式',
|
||||
image : '图片',
|
||||
multiimage : '批量图片上传',
|
||||
flash : 'Flash',
|
||||
media : '视音频',
|
||||
table : '表格',
|
||||
tablecell : '单元格',
|
||||
hr : '插入横线',
|
||||
emoticons : '插入表情',
|
||||
link : '超级链接',
|
||||
unlink : '取消超级链接',
|
||||
fullscreen : '全屏显示',
|
||||
about : '关于',
|
||||
print : '打印(Ctrl+P)',
|
||||
filemanager : '文件空间',
|
||||
code : '插入程序代码',
|
||||
map : 'Google地图',
|
||||
baidumap : '百度地图',
|
||||
lineheight : '行距',
|
||||
clearhtml : '清理HTML代码',
|
||||
pagebreak : '插入分页符',
|
||||
quickformat : '一键排版',
|
||||
insertfile : '插入文件',
|
||||
template : '插入模板',
|
||||
anchor : '锚点',
|
||||
yes : '确定',
|
||||
no : '取消',
|
||||
close : '关闭',
|
||||
editImage : '图片属性',
|
||||
deleteImage : '删除图片',
|
||||
editFlash : 'Flash属性',
|
||||
deleteFlash : '删除Flash',
|
||||
editMedia : '视音频属性',
|
||||
deleteMedia : '删除视音频',
|
||||
editLink : '超级链接属性',
|
||||
deleteLink : '取消超级链接',
|
||||
editAnchor : '锚点属性',
|
||||
deleteAnchor : '删除锚点',
|
||||
tableprop : '表格属性',
|
||||
tablecellprop : '单元格属性',
|
||||
tableinsert : '插入表格',
|
||||
tabledelete : '删除表格',
|
||||
tablecolinsertleft : '左侧插入列',
|
||||
tablecolinsertright : '右侧插入列',
|
||||
tablerowinsertabove : '上方插入行',
|
||||
tablerowinsertbelow : '下方插入行',
|
||||
tablerowmerge : '向下合并单元格',
|
||||
tablecolmerge : '向右合并单元格',
|
||||
tablerowsplit : '拆分行',
|
||||
tablecolsplit : '拆分列',
|
||||
tablecoldelete : '删除列',
|
||||
tablerowdelete : '删除行',
|
||||
noColor : '无颜色',
|
||||
pleaseSelectFile : '请选择文件。',
|
||||
invalidImg : "请输入有效的URL地址。\n只允许jpg,gif,bmp,png格式。",
|
||||
invalidMedia : "请输入有效的URL地址。\n只允许swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb格式。",
|
||||
invalidWidth : "宽度必须为数字。",
|
||||
invalidHeight : "高度必须为数字。",
|
||||
invalidBorder : "边框必须为数字。",
|
||||
invalidUrl : "请输入有效的URL地址。",
|
||||
invalidRows : '行数为必选项,只允许输入大于0的数字。',
|
||||
invalidCols : '列数为必选项,只允许输入大于0的数字。',
|
||||
invalidPadding : '边距必须为数字。',
|
||||
invalidSpacing : '间距必须为数字。',
|
||||
invalidJson : '服务器发生故障。',
|
||||
uploadSuccess : '上传成功。',
|
||||
cutError : '您的浏览器安全设置不允许使用剪切操作,请使用快捷键(Ctrl+X)来完成。',
|
||||
copyError : '您的浏览器安全设置不允许使用复制操作,请使用快捷键(Ctrl+C)来完成。',
|
||||
pasteError : '您的浏览器安全设置不允许使用粘贴操作,请使用快捷键(Ctrl+V)来完成。',
|
||||
ajaxLoading : '加载中,请稍候 ...',
|
||||
uploadLoading : '上传中,请稍候 ...',
|
||||
uploadError : '上传错误',
|
||||
'plainpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。',
|
||||
'wordpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。',
|
||||
'code.pleaseInput' : '请输入程序代码。',
|
||||
'link.url' : 'URL',
|
||||
'link.linkType' : '打开类型',
|
||||
'link.newWindow' : '新窗口',
|
||||
'link.selfWindow' : '当前窗口',
|
||||
'flash.url' : 'URL',
|
||||
'flash.width' : '宽度',
|
||||
'flash.height' : '高度',
|
||||
'flash.upload' : '上传',
|
||||
'flash.viewServer' : '文件空间',
|
||||
'media.url' : 'URL',
|
||||
'media.width' : '宽度',
|
||||
'media.height' : '高度',
|
||||
'media.autostart' : '自动播放',
|
||||
'media.upload' : '上传',
|
||||
'media.viewServer' : '文件空间',
|
||||
'image.remoteImage' : '网络图片',
|
||||
'image.localImage' : '本地上传',
|
||||
'image.remoteUrl' : '图片地址',
|
||||
'image.localUrl' : '上传文件',
|
||||
'image.size' : '图片大小',
|
||||
'image.width' : '宽',
|
||||
'image.height' : '高',
|
||||
'image.resetSize' : '重置大小',
|
||||
'image.align' : '对齐方式',
|
||||
'image.defaultAlign' : '默认方式',
|
||||
'image.leftAlign' : '左对齐',
|
||||
'image.rightAlign' : '右对齐',
|
||||
'image.imgTitle' : '图片说明',
|
||||
'image.upload' : '浏览...',
|
||||
'image.viewServer' : '图片空间',
|
||||
'multiimage.uploadDesc' : '允许用户同时上传<%=uploadLimit%>张图片,单张图片容量不超过<%=sizeLimit%>',
|
||||
'multiimage.startUpload' : '开始上传',
|
||||
'multiimage.clearAll' : '全部清空',
|
||||
'multiimage.insertAll' : '全部插入',
|
||||
'multiimage.queueLimitExceeded' : '文件数量超过限制。',
|
||||
'multiimage.fileExceedsSizeLimit' : '文件大小超过限制。',
|
||||
'multiimage.zeroByteFile' : '无法上传空文件。',
|
||||
'multiimage.invalidFiletype' : '文件类型不正确。',
|
||||
'multiimage.unknownError' : '发生异常,无法上传。',
|
||||
'multiimage.pending' : '等待上传',
|
||||
'multiimage.uploadError' : '上传失败',
|
||||
'filemanager.emptyFolder' : '空文件夹',
|
||||
'filemanager.moveup' : '移到上一级文件夹',
|
||||
'filemanager.viewType' : '显示方式:',
|
||||
'filemanager.viewImage' : '缩略图',
|
||||
'filemanager.listImage' : '详细信息',
|
||||
'filemanager.orderType' : '排序方式:',
|
||||
'filemanager.fileName' : '名称',
|
||||
'filemanager.fileSize' : '大小',
|
||||
'filemanager.fileType' : '类型',
|
||||
'insertfile.url' : 'URL',
|
||||
'insertfile.title' : '文件说明',
|
||||
'insertfile.upload' : '上传',
|
||||
'insertfile.viewServer' : '文件空间',
|
||||
'table.cells' : '单元格数',
|
||||
'table.rows' : '行数',
|
||||
'table.cols' : '列数',
|
||||
'table.size' : '大小',
|
||||
'table.width' : '宽度',
|
||||
'table.height' : '高度',
|
||||
'table.percent' : '%',
|
||||
'table.px' : 'px',
|
||||
'table.space' : '边距间距',
|
||||
'table.padding' : '边距',
|
||||
'table.spacing' : '间距',
|
||||
'table.align' : '对齐方式',
|
||||
'table.textAlign' : '水平对齐',
|
||||
'table.verticalAlign' : '垂直对齐',
|
||||
'table.alignDefault' : '默认',
|
||||
'table.alignLeft' : '左对齐',
|
||||
'table.alignCenter' : '居中',
|
||||
'table.alignRight' : '右对齐',
|
||||
'table.alignTop' : '顶部',
|
||||
'table.alignMiddle' : '中部',
|
||||
'table.alignBottom' : '底部',
|
||||
'table.alignBaseline' : '基线',
|
||||
'table.border' : '边框',
|
||||
'table.borderWidth' : '边框',
|
||||
'table.borderColor' : '颜色',
|
||||
'table.backgroundColor' : '背景颜色',
|
||||
'map.address' : '地址: ',
|
||||
'map.search' : '搜索',
|
||||
'baidumap.address' : '地址: ',
|
||||
'baidumap.search' : '搜索',
|
||||
'baidumap.insertDynamicMap' : '插入动态地图',
|
||||
'anchor.name' : '锚点名称',
|
||||
'formatblock.formatBlock' : {
|
||||
h1 : '标题 1',
|
||||
h2 : '标题 2',
|
||||
h3 : '标题 3',
|
||||
h4 : '标题 4',
|
||||
p : '正 文'
|
||||
},
|
||||
'fontname.fontName' : {
|
||||
'SimSun' : '宋体',
|
||||
'NSimSun' : '新宋体',
|
||||
'FangSong_GB2312' : '仿宋_GB2312',
|
||||
'KaiTi_GB2312' : '楷体_GB2312',
|
||||
'SimHei' : '黑体',
|
||||
'Microsoft YaHei' : '微软雅黑',
|
||||
'Arial' : 'Arial',
|
||||
'Arial Black' : 'Arial Black',
|
||||
'Times New Roman' : 'Times New Roman',
|
||||
'Courier New' : 'Courier New',
|
||||
'Tahoma' : 'Tahoma',
|
||||
'Verdana' : 'Verdana'
|
||||
},
|
||||
'lineheight.lineHeight' : [
|
||||
{'1' : '单倍行距'},
|
||||
{'1.5' : '1.5倍行距'},
|
||||
{'2' : '2倍行距'},
|
||||
{'2.5' : '2.5倍行距'},
|
||||
{'3' : '3倍行距'}
|
||||
],
|
||||
'template.selectTemplate' : '可选模板',
|
||||
'template.replaceContent' : '替换当前内容',
|
||||
'template.fileList' : {
|
||||
'1.html' : '图片和文字',
|
||||
'2.html' : '表格',
|
||||
'3.html' : '项目编号'
|
||||
}
|
||||
}, 'zh_CN');
|
|
@ -1,71 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* KindEditor - WYSIWYG HTML Editor for Internet
|
||||
* Copyright (C) 2006-2011 kindsoft.net
|
||||
*
|
||||
* @author Roddy <luolonghao@gmail.com>
|
||||
* @site http://www.kindsoft.net/
|
||||
* @licence http://www.kindsoft.net/license.php
|
||||
*******************************************************************************/
|
||||
|
||||
KindEditor.plugin('autoheight', function(K) {
|
||||
var self = this;
|
||||
//self.autoHeightMode = true;
|
||||
if (!self.autoHeightMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
var minHeight;
|
||||
|
||||
function hideScroll() {
|
||||
var edit = self.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe[0].scroll = 'no';
|
||||
body.style.overflowY = 'hidden';
|
||||
}
|
||||
|
||||
function resetHeight() {
|
||||
var edit = self.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe.height(minHeight);
|
||||
|
||||
//最高418 超过用滚动条
|
||||
self.resize(null, Math.max(
|
||||
(K.IE ? body.scrollHeight : body.offsetHeight) > 385 ? 385+33 : (K.IE ? body.scrollHeight : body.offsetHeight)
|
||||
+ 33, minHeight));
|
||||
|
||||
if( self.height == "418px" ){
|
||||
edit.iframe[0].scroll = 'yes';
|
||||
body.style.overflowY = 'auto';
|
||||
}
|
||||
else{
|
||||
hideScroll();
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
minHeight = K.removeUnit(self.height);
|
||||
|
||||
self.edit.afterChange(resetHeight);
|
||||
hideScroll();
|
||||
var edit = self.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe.height(minHeight);
|
||||
self.resize(null, Math.max(
|
||||
((K.IE ? body.scrollHeight : body.offsetHeight) > 250 ? 250 : (K.IE ? body.scrollHeight : body.offsetHeight)) //限制初始化太高的情况
|
||||
+ 33, minHeight));
|
||||
}
|
||||
|
||||
if (self.isCreated) {
|
||||
init();
|
||||
} else {
|
||||
self.afterCreate(init);
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* 如何实现真正的自动高度?
|
||||
* 修改编辑器高度之后,再次获取body内容高度时,最小值只会是当前iframe的设置高度,这样就导致高度只增不减。
|
||||
* 所以每次获取body内容高度之前,先将iframe的高度重置为最小高度,这样就能获取body的实际高度。
|
||||
* 由此就实现了真正的自动高度
|
||||
* 测试:chrome、firefox、IE9、IE8
|
||||
* */
|
|
@ -1,56 +0,0 @@
|
|||
.ke-content {
|
||||
font-family: "微软雅黑","宋体";
|
||||
}
|
||||
.ke-content pre {
|
||||
font-size:9pt;
|
||||
font-family:Courier New,Arial;
|
||||
border:1px solid #ddd;
|
||||
border-left:5px solid #6CE26C;
|
||||
background:#f6f6f6;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.ke-content code {
|
||||
margin: 0 2px;
|
||||
padding: 0 5px;
|
||||
white-space: nowrap;
|
||||
border: 1px solid #DDD;
|
||||
background-color: #F6F6F6;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.ke-content pre>code {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ke-content pre code {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ke-content p {
|
||||
/*margin: 0 0 15px 0;*/
|
||||
/*margin-bottom:15pt;*/
|
||||
line-height:1.5;
|
||||
/*letter-spacing: 1px;*/
|
||||
}
|
||||
|
||||
.ke-content div.ref {border:1px solid #ddd;margin:0 0 10px 0;padding:2px;font-size:9pt;background:#ffe;}
|
||||
.ke-content div.ref h4 {margin:0;padding:1px 3px;background:#CC9966;color:#fff;font-size:9pt;font-weight:normal;}
|
||||
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
|
||||
|
||||
|
||||
.ke-content blockquote{background: none;border: none;padding: 0px;margin: 0 0 0 40px;}
|
||||
span.at {color:#269ac9;}
|
||||
span.at a{color:#269ac9;text-decoration: none;}
|
||||
|
||||
/*yk*/
|
||||
.ke-content ol li{list-style-type: decimal;}
|
||||
.ke-content ul li{list-style-type: disc;}
|
||||
.ke-content ol,.ke-content ul,.ke-content h1,.ke-content h2,.ke-content h3,.ke-content h4{margin-top:0;margin-bottom: 0;}
|
||||
.ke-content a{color: #136ec2;}
|
||||
.ke-content a:link,.ke-content a:visited{text-decoration:none;}
|
|
@ -1,361 +0,0 @@
|
|||
// Generated by CoffeeScript 1.9.0
|
||||
|
||||
/*
|
||||
paste.js is an interface to read data ( text / image ) from clipboard in different browsers. It also contains several hacks.
|
||||
https://github.com/layerssss/paste.js
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var $, Paste, createHiddenEditable, dataURLtoBlob;
|
||||
|
||||
$ = window.jQuery;
|
||||
|
||||
$.paste = function(pasteContainer) {
|
||||
var pm;
|
||||
if (typeof console !== "undefined" && console !== null) {
|
||||
console.log("DEPRECATED: This method is deprecated. Please use $.fn.pastableNonInputable() instead.");
|
||||
}
|
||||
pm = Paste.mountNonInputable(pasteContainer);
|
||||
return pm._container;
|
||||
};
|
||||
|
||||
$.fn.pastableNonInputable = function() {
|
||||
var el, _i, _len;
|
||||
for (_i = 0, _len = this.length; _i < _len; _i++) {
|
||||
el = this[_i];
|
||||
Paste.mountNonInputable(el);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
$.fn.pastableTextarea = function() {
|
||||
var el, _i, _len;
|
||||
for (_i = 0, _len = this.length; _i < _len; _i++) {
|
||||
el = this[_i];
|
||||
Paste.mountTextarea(el);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
$.fn.pastableContenteditable = function() {
|
||||
var el, _i, _len;
|
||||
for (_i = 0, _len = this.length; _i < _len; _i++) {
|
||||
el = this[_i];
|
||||
Paste.mountContenteditable(el);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
dataURLtoBlob = function(dataURL, sliceSize) {
|
||||
var b64Data, byteArray, byteArrays, byteCharacters, byteNumbers, contentType, i, m, offset, slice, _ref;
|
||||
if (sliceSize == null) {
|
||||
sliceSize = 512;
|
||||
}
|
||||
if (!(m = dataURL.match(/^data\:([^\;]+)\;base64\,(.+)$/))) {
|
||||
return null;
|
||||
}
|
||||
_ref = m, m = _ref[0], contentType = _ref[1], b64Data = _ref[2];
|
||||
byteCharacters = atob(b64Data);
|
||||
byteArrays = [];
|
||||
offset = 0;
|
||||
while (offset < byteCharacters.length) {
|
||||
slice = byteCharacters.slice(offset, offset + sliceSize);
|
||||
byteNumbers = new Array(slice.length);
|
||||
i = 0;
|
||||
while (i < slice.length) {
|
||||
byteNumbers[i] = slice.charCodeAt(i);
|
||||
i++;
|
||||
}
|
||||
byteArray = new Uint8Array(byteNumbers);
|
||||
byteArrays.push(byteArray);
|
||||
offset += sliceSize;
|
||||
}
|
||||
return new Blob(byteArrays, {
|
||||
type: contentType
|
||||
});
|
||||
};
|
||||
|
||||
createHiddenEditable = function() {
|
||||
return $(document.createElement('div')).attr('contenteditable', true).css({
|
||||
width: 1,
|
||||
height: 1,
|
||||
position: 'fixed',
|
||||
left: -100,
|
||||
overflow: 'hidden'
|
||||
});
|
||||
};
|
||||
|
||||
Paste = (function() {
|
||||
Paste.prototype._target = null;
|
||||
|
||||
Paste.prototype._container = null;
|
||||
|
||||
Paste.mountNonInputable = function(nonInputable) {
|
||||
var paste;
|
||||
paste = new Paste(createHiddenEditable().appendTo(nonInputable), nonInputable);
|
||||
$(nonInputable).on('click', (function(_this) {
|
||||
return function() {
|
||||
return paste._container.focus();
|
||||
};
|
||||
})(this));
|
||||
paste._container.on('focus', (function(_this) {
|
||||
return function() {
|
||||
return $(nonInputable).addClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
return paste._container.on('blur', (function(_this) {
|
||||
return function() {
|
||||
return $(nonInputable).removeClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Paste.mountTextarea = function(textarea) {
|
||||
var ctlDown, paste;
|
||||
if (-1 !== navigator.userAgent.toLowerCase().indexOf('chrome')) {
|
||||
return this.mountContenteditable(textarea);
|
||||
}
|
||||
paste = new Paste(createHiddenEditable().insertBefore(textarea), textarea);
|
||||
ctlDown = false;
|
||||
$(textarea).on('keyup', function(ev) {
|
||||
var _ref;
|
||||
if ((_ref = ev.keyCode) === 17 || _ref === 224) {
|
||||
return ctlDown = false;
|
||||
}
|
||||
});
|
||||
$(textarea).on('keydown', function(ev) {
|
||||
var _ref;
|
||||
if ((_ref = ev.keyCode) === 17 || _ref === 224) {
|
||||
ctlDown = true;
|
||||
}
|
||||
if (ctlDown && ev.keyCode === 86) {
|
||||
return paste._container.focus();
|
||||
}
|
||||
});
|
||||
$(paste._target).on('pasteImage', (function(_this) {
|
||||
return function() {
|
||||
return $(textarea).focus();
|
||||
};
|
||||
})(this));
|
||||
$(paste._target).on('pasteText', (function(_this) {
|
||||
return function() {
|
||||
return $(textarea).focus();
|
||||
};
|
||||
})(this));
|
||||
$(textarea).on('focus', (function(_this) {
|
||||
return function() {
|
||||
return $(textarea).addClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
return $(textarea).on('blur', (function(_this) {
|
||||
return function() {
|
||||
return $(textarea).removeClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Paste.mountContenteditable = function(contenteditable) {
|
||||
var paste;
|
||||
paste = new Paste(contenteditable, contenteditable);
|
||||
$(contenteditable).on('focus', (function(_this) {
|
||||
return function() {
|
||||
return $(contenteditable).addClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
return $(contenteditable).on('blur', (function(_this) {
|
||||
return function() {
|
||||
return $(contenteditable).removeClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
function Paste(_at__container, _at__target) {
|
||||
this._container = _at__container;
|
||||
this._target = _at__target;
|
||||
this._container = $(this._container);
|
||||
this._target = $(this._target).addClass('pastable');
|
||||
this._container.on('paste', (function(_this) {
|
||||
return function(ev) {
|
||||
var clipboardData, file, item, reader, text, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3, _results;
|
||||
if (((_ref = ev.originalEvent) != null ? _ref.clipboardData : void 0) != null) {
|
||||
clipboardData = ev.originalEvent.clipboardData;
|
||||
if (clipboardData.items) {
|
||||
_ref1 = clipboardData.items;
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
item = _ref1[_i];
|
||||
if (item.type.match(/^image\//)) {
|
||||
reader = new FileReader();
|
||||
reader.onload = function(event) {
|
||||
return _this._handleImage(event.target.result);
|
||||
};
|
||||
reader.readAsDataURL(item.getAsFile());
|
||||
}
|
||||
if (item.type === 'text/plain') {
|
||||
item.getAsString(function(string) {
|
||||
return _this._target.trigger('pasteText', {
|
||||
text: string
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (-1 !== Array.prototype.indexOf.call(clipboardData.types, 'text/plain')) {
|
||||
text = clipboardData.getData('Text');
|
||||
_this._target.trigger('pasteText', {
|
||||
text: text
|
||||
});
|
||||
}
|
||||
_this._checkImagesInContainer(function(src) {
|
||||
return _this._handleImage(src);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (clipboardData = window.clipboardData) {
|
||||
if ((_ref2 = (text = clipboardData.getData('Text'))) != null ? _ref2.length : void 0) {
|
||||
return _this._target.trigger('pasteText', {
|
||||
text: text
|
||||
});
|
||||
} else {
|
||||
_ref3 = clipboardData.files;
|
||||
_results = [];
|
||||
for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
|
||||
file = _ref3[_j];
|
||||
_this._handleImage(URL.createObjectURL(file));
|
||||
_results.push(_this._checkImagesInContainer(function() {}));
|
||||
}
|
||||
return _results;
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
}
|
||||
|
||||
Paste.prototype._handleImage = function(src) {
|
||||
var loader;
|
||||
loader = new Image();
|
||||
loader.onload = (function(_this) {
|
||||
return function() {
|
||||
var blob, canvas, ctx, dataURL;
|
||||
canvas = document.createElement('canvas');
|
||||
canvas.width = loader.width;
|
||||
canvas.height = loader.height;
|
||||
ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(loader, 0, 0, canvas.width, canvas.height);
|
||||
dataURL = null;
|
||||
try {
|
||||
dataURL = canvas.toDataURL('image/png');
|
||||
blob = dataURLtoBlob(dataURL);
|
||||
} catch (_error) {}
|
||||
if (dataURL) {
|
||||
return _this._target.trigger('pasteImage', {
|
||||
blob: blob,
|
||||
dataURL: dataURL,
|
||||
width: loader.width,
|
||||
height: loader.height
|
||||
});
|
||||
}
|
||||
};
|
||||
})(this);
|
||||
return loader.src = src;
|
||||
};
|
||||
|
||||
Paste.prototype._checkImagesInContainer = function(cb) {
|
||||
var img, timespan, _i, _len, _ref;
|
||||
timespan = Math.floor(1000 * Math.random());
|
||||
_ref = this._container.find('img');
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
img = _ref[_i];
|
||||
img["_paste_marked_" + timespan] = true;
|
||||
}
|
||||
return setTimeout((function(_this) {
|
||||
return function() {
|
||||
var _j, _len1, _ref1, _results;
|
||||
_ref1 = _this._container.find('img');
|
||||
_results = [];
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
img = _ref1[_j];
|
||||
if (!img["_paste_marked_" + timespan]) {
|
||||
cb(img.src);
|
||||
}
|
||||
//firefox问题处理,因为采用了 pastableContenteditable 模式,故只需要删除默认的粘贴
|
||||
if ($(img).attr('src').startsWith('data:image/')) {
|
||||
_results.push($(img).remove());
|
||||
};
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
})(this), 1);
|
||||
};
|
||||
|
||||
return Paste;
|
||||
|
||||
})();
|
||||
|
||||
}).call(this);
|
||||
|
||||
KindEditor.plugin('paste', function(K) {
|
||||
var editor = this,
|
||||
name = 'paste';
|
||||
if(editor.edit == undefined || editor.edit.iframe == undefined){
|
||||
return;
|
||||
}
|
||||
var contentWindow = editor.edit.iframe[0].contentWindow;
|
||||
//var contentWindow = editor.iframeDoc;
|
||||
//var contentWindow = document.getElementsByTagName('iframe')[0].contentWindow;
|
||||
var nodeBody = contentWindow.document.getElementsByTagName('body')[0];
|
||||
console.log(nodeBody);
|
||||
$(nodeBody).pastableContenteditable();
|
||||
|
||||
dataURItoBlob = function(dataURI) {
|
||||
// convert base64/URLEncoded data component to raw binary data held in a string
|
||||
var byteString;
|
||||
if (dataURI.split(',')[0].indexOf('base64') >= 0)
|
||||
byteString = atob(dataURI.split(',')[1]);
|
||||
else
|
||||
byteString = unescape(dataURI.split(',')[1]);
|
||||
|
||||
// separate out the mime component
|
||||
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
|
||||
|
||||
// write the bytes of the string to a typed array
|
||||
var ia = new Uint8Array(byteString.length);
|
||||
for (var i = 0; i < byteString.length; i++) {
|
||||
ia[i] = byteString.charCodeAt(i);
|
||||
}
|
||||
|
||||
return new Blob([ia], {type:mimeString});
|
||||
};
|
||||
|
||||
$(nodeBody).on('pasteImage', function(ev, data) {
|
||||
console.log('pasteImage');
|
||||
console.log("dataURL: " + data.dataURL);
|
||||
console.log("width: " + data.width);
|
||||
console.log("height: " + data.height);
|
||||
var blob = dataURItoBlob(data.dataURL);
|
||||
if (data.blob !== null) {
|
||||
var data = new FormData();
|
||||
// data.append("imgFile",blob, "imageFilename.png");
|
||||
data.append("file",blob, "imageFilename.png");
|
||||
console.log(data);
|
||||
$.ajax({
|
||||
url: '/kindeditor/upload?dir=image',
|
||||
url: '/api/attachments.json',
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
data: data,
|
||||
processData: false,
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
// editor.exec('insertimage', JSON.parse(data).url);
|
||||
|
||||
// /api/attachments/227362
|
||||
editor.exec('insertimage', '/api/attachments/' + data.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
return;
|
||||
|
||||
});
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,118 @@
|
|||
@charset "UTF-8";
|
||||
/* line 1, app/assets/stylesheets/oauth.scss */
|
||||
html {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 14px;
|
||||
font-family: "微软雅黑","宋体";
|
||||
}
|
||||
|
||||
/* line 2, app/assets/stylesheets/oauth.scss */
|
||||
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* line 6, app/assets/stylesheets/oauth.scss */
|
||||
.IndexContent {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
background-image: url("/images/oauth/backImg.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* line 18, app/assets/stylesheets/oauth.scss */
|
||||
.indexLogo {
|
||||
width: 80px;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
/* line 22, app/assets/stylesheets/oauth.scss */
|
||||
.indexPanel {
|
||||
width: 580px;
|
||||
min-height: 400px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 2px 10px 5px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* line 30, app/assets/stylesheets/oauth.scss */
|
||||
.indexTitle {
|
||||
height: 75px;
|
||||
line-height: 75px;
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
/* line 38, app/assets/stylesheets/oauth.scss */
|
||||
.indexInfo {
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
flex-direction: column;
|
||||
-webkit-box-align: start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/* line 43, app/assets/stylesheets/oauth.scss */
|
||||
.indexInfos {
|
||||
padding: 40px 60px;
|
||||
}
|
||||
|
||||
/* line 46, app/assets/stylesheets/oauth.scss */
|
||||
.indexInfo > span {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* line 51, app/assets/stylesheets/oauth.scss */
|
||||
.indexInfo input {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #eee;
|
||||
margin-top: 5px;
|
||||
padding: 0px 0px 0px 8px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* line 60, app/assets/stylesheets/oauth.scss */
|
||||
.indexInfo .checkInfo {
|
||||
height: 15px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* line 64, app/assets/stylesheets/oauth.scss */
|
||||
.indexBtn {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* line 68, app/assets/stylesheets/oauth.scss */
|
||||
.indexSubmit {
|
||||
width: 50%;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
background-color: #1890FF;
|
||||
border: none;
|
||||
color: #fff;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue