Merge branch 'vnext' of github.com:pazof/yavsc into vnext

This commit is contained in:
2016-09-20 21:13:04 +02:00
78 changed files with 53607 additions and 329 deletions

3
.gitignore vendored
View File

@ -21,4 +21,7 @@ RSA-Params.json
Components/
packages/
build/
*.user
*.bak
*~

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<title>Bubble Theme - Quill</title>
<meta charset="utf-8">
<link rel="stylesheet" href="quill.bubble.css" />
<style>
.standalone-container {
margin: 50px auto;
width: 720px;
}
#bubble-container {
height: 350px;
}
</style>
</head>
<body>
<div class="standalone-container">
<div id="bubble-container"></div>
</div>
<form><input type="hidden" name="md" id="md" />
<input id="btnSubmit" type="submit" value="Valider" class="ql-hidden"/></form>
<script type="text/javascript" src="quill.min.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="showdown.js"></script>
<script type="text/javascript" src="to-markdown.js"></script>
<script type="text/javascript" src="md-helpers.js"></script>
<script type="text/javascript">
var toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block'],
[{ 'header': 1 }, { 'header': 2 }], // custom button values
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
[{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent
['clean'] // remove formatting button
];
var quill = new Quill('#bubble-container', {
modules: {
toolbar: toolbarOptions
},
placeholder: 'Composez votre texte ...',
theme: 'bubble'
});
function getMD() {
return markdownize($('#bubble-container div.ql-editor').html())
}
quill.on('text-change', function (delta, oldDelta, source)
{
if (source === "user") {
$('#md').val(getMD());
$('#btnSubmit').removeClass('ql-hidden');
};
});
</script>
</body>
</html>

View File

@ -0,0 +1,388 @@
/*
* The MIT License
* Copyright (c) 2012 Matias Meno <m@tias.me>
*/
@-webkit-keyframes passing-through {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30%, 70% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); }
100% {
opacity: 0;
-webkit-transform: translateY(-40px);
-moz-transform: translateY(-40px);
-ms-transform: translateY(-40px);
-o-transform: translateY(-40px);
transform: translateY(-40px); } }
@-moz-keyframes passing-through {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30%, 70% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); }
100% {
opacity: 0;
-webkit-transform: translateY(-40px);
-moz-transform: translateY(-40px);
-ms-transform: translateY(-40px);
-o-transform: translateY(-40px);
transform: translateY(-40px); } }
@keyframes passing-through {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30%, 70% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); }
100% {
opacity: 0;
-webkit-transform: translateY(-40px);
-moz-transform: translateY(-40px);
-ms-transform: translateY(-40px);
-o-transform: translateY(-40px);
transform: translateY(-40px); } }
@-webkit-keyframes slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); } }
@-moz-keyframes slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); } }
@keyframes slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); } }
@-webkit-keyframes pulse {
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); }
10% {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1); }
20% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); } }
@-moz-keyframes pulse {
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); }
10% {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1); }
20% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); } }
@keyframes pulse {
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); }
10% {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1); }
20% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); } }
.dropzone, .dropzone * {
box-sizing: border-box; }
.dropzone {
min-height: 150px;
border: 2px solid rgba(0, 0, 0, 0.3);
background: white;
padding: 20px 20px; }
.dropzone.dz-clickable {
cursor: pointer; }
.dropzone.dz-clickable * {
cursor: default; }
.dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * {
cursor: pointer; }
.dropzone.dz-started .dz-message {
display: none; }
.dropzone.dz-drag-hover {
border-style: solid; }
.dropzone.dz-drag-hover .dz-message {
opacity: 0.5; }
.dropzone .dz-message {
text-align: center;
margin: 2em 0; }
.dropzone .dz-preview {
position: relative;
display: inline-block;
vertical-align: top;
margin: 16px;
min-height: 100px; }
.dropzone .dz-preview:hover {
z-index: 1000; }
.dropzone .dz-preview:hover .dz-details {
opacity: 1; }
.dropzone .dz-preview.dz-file-preview .dz-image {
border-radius: 20px;
background: #999;
background: linear-gradient(to bottom, #eee, #ddd); }
.dropzone .dz-preview.dz-file-preview .dz-details {
opacity: 1; }
.dropzone .dz-preview.dz-image-preview {
background: white; }
.dropzone .dz-preview.dz-image-preview .dz-details {
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
-ms-transition: opacity 0.2s linear;
-o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear; }
.dropzone .dz-preview .dz-remove {
font-size: 14px;
text-align: center;
display: block;
cursor: pointer;
border: none; }
.dropzone .dz-preview .dz-remove:hover {
text-decoration: underline; }
.dropzone .dz-preview:hover .dz-details {
opacity: 1; }
.dropzone .dz-preview .dz-details {
z-index: 20;
position: absolute;
top: 0;
left: 0;
opacity: 0;
font-size: 13px;
min-width: 100%;
max-width: 100%;
padding: 2em 1em;
text-align: center;
color: rgba(0, 0, 0, 0.9);
line-height: 150%; }
.dropzone .dz-preview .dz-details .dz-size {
margin-bottom: 1em;
font-size: 16px; }
.dropzone .dz-preview .dz-details .dz-filename {
white-space: nowrap; }
.dropzone .dz-preview .dz-details .dz-filename:hover span {
border: 1px solid rgba(200, 200, 200, 0.8);
background-color: rgba(255, 255, 255, 0.8); }
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) {
overflow: hidden;
text-overflow: ellipsis; }
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {
border: 1px solid transparent; }
.dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {
background-color: rgba(255, 255, 255, 0.4);
padding: 0 0.4em;
border-radius: 3px; }
.dropzone .dz-preview:hover .dz-image img {
-webkit-transform: scale(1.05, 1.05);
-moz-transform: scale(1.05, 1.05);
-ms-transform: scale(1.05, 1.05);
-o-transform: scale(1.05, 1.05);
transform: scale(1.05, 1.05);
-webkit-filter: blur(8px);
filter: blur(8px); }
.dropzone .dz-preview .dz-image {
border-radius: 20px;
overflow: hidden;
width: 120px;
height: 120px;
position: relative;
display: block;
z-index: 10; }
.dropzone .dz-preview .dz-image img {
display: block; }
.dropzone .dz-preview.dz-success .dz-success-mark {
-webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
-moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
-ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
-o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); }
.dropzone .dz-preview.dz-error .dz-error-mark {
opacity: 1;
-webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
-moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
-ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
-o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); }
.dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
pointer-events: none;
opacity: 0;
z-index: 500;
position: absolute;
display: block;
top: 50%;
left: 50%;
margin-left: -27px;
margin-top: -27px; }
.dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg {
display: block;
width: 54px;
height: 54px; }
.dropzone .dz-preview.dz-processing .dz-progress {
opacity: 1;
-webkit-transition: all 0.2s linear;
-moz-transition: all 0.2s linear;
-ms-transition: all 0.2s linear;
-o-transition: all 0.2s linear;
transition: all 0.2s linear; }
.dropzone .dz-preview.dz-complete .dz-progress {
opacity: 0;
-webkit-transition: opacity 0.4s ease-in;
-moz-transition: opacity 0.4s ease-in;
-ms-transition: opacity 0.4s ease-in;
-o-transition: opacity 0.4s ease-in;
transition: opacity 0.4s ease-in; }
.dropzone .dz-preview:not(.dz-processing) .dz-progress {
-webkit-animation: pulse 6s ease infinite;
-moz-animation: pulse 6s ease infinite;
-ms-animation: pulse 6s ease infinite;
-o-animation: pulse 6s ease infinite;
animation: pulse 6s ease infinite; }
.dropzone .dz-preview .dz-progress {
opacity: 1;
z-index: 1000;
pointer-events: none;
position: absolute;
height: 16px;
left: 50%;
top: 50%;
margin-top: -8px;
width: 80px;
margin-left: -40px;
background: rgba(255, 255, 255, 0.9);
-webkit-transform: scale(1);
border-radius: 8px;
overflow: hidden; }
.dropzone .dz-preview .dz-progress .dz-upload {
background: #333;
background: linear-gradient(to bottom, #666, #444);
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 0;
-webkit-transition: width 300ms ease-in-out;
-moz-transition: width 300ms ease-in-out;
-ms-transition: width 300ms ease-in-out;
-o-transition: width 300ms ease-in-out;
transition: width 300ms ease-in-out; }
.dropzone .dz-preview.dz-error .dz-error-message {
display: block; }
.dropzone .dz-preview.dz-error:hover .dz-error-message {
opacity: 1;
pointer-events: auto; }
.dropzone .dz-preview .dz-error-message {
pointer-events: none;
z-index: 1000;
position: absolute;
display: block;
display: none;
opacity: 0;
-webkit-transition: opacity 0.3s ease;
-moz-transition: opacity 0.3s ease;
-ms-transition: opacity 0.3s ease;
-o-transition: opacity 0.3s ease;
transition: opacity 0.3s ease;
border-radius: 8px;
font-size: 13px;
top: 130px;
left: -10px;
width: 140px;
background: #be2626;
background: linear-gradient(to bottom, #be2626, #a92222);
padding: 0.5em 1.2em;
color: white; }
.dropzone .dz-preview .dz-error-message:after {
content: '';
position: absolute;
top: -6px;
left: 64px;
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #be2626; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

9210
BookAStar/BookAStar.Droid/Assets/jquery.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,31 @@
var markdownize = function(content) {
if (!content) return '';
var html = content.split("\n").map($.trim).filter(function(line) {
return line != "" ;
}).join("\n");
return toMarkdown(html);
};
var htmlize = function(content) {
return converter.makeHtml(content);
};
var updateHtml = function(jView,content) {
if (markdownize(jView.html()) === content) {
return;
}
var html = htmlize(content);
jView.html(html);
};
var updateMD = function(id,content) {
if (!content) return jQuery('#'+id).val('') ;
var markdown = markdownize(content);
if (jQuery('#'+id).val() === markdown) {
return;
}
jQuery('#'+id).val( markdown );
};
var onMDModified = ( function (event, data) {
$('#Submit').addClass('success');
updateMD(this.attributes["for"].value, data.content);
});

View File

@ -0,0 +1 @@
.hljs{display:block;overflow-x:auto;padding:0.5em;background:#23241f}.hljs,.hljs-tag,.hljs-subst{color:#f8f8f2}.hljs-strong,.hljs-emphasis{color:#a8a8a2}.hljs-bullet,.hljs-quote,.hljs-number,.hljs-regexp,.hljs-literal,.hljs-link{color:#ae81ff}.hljs-code,.hljs-title,.hljs-section,.hljs-selector-class{color:#a6e22e}.hljs-strong{font-weight:bold}.hljs-emphasis{font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-name,.hljs-attr{color:#f92672}.hljs-symbol,.hljs-attribute{color:#66d9ef}.hljs-params,.hljs-class .hljs-title{color:#f8f8f2}.hljs-string,.hljs-type,.hljs-built_in,.hljs-builtin-name,.hljs-selector-id,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-addition,.hljs-variable,.hljs-template-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e}

View File

@ -0,0 +1,845 @@
/*!
* Quill Editor v1.0.2
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
.ql-container {
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
height: 100%;
margin: 0px;
position: relative;
}
.ql-clipboard {
left: -100000px;
height: 1px;
overflow-y: hidden;
position: absolute;
top: 50%;
}
.ql-clipboard p {
margin: 0;
padding: 0;
}
.ql-editor {
box-sizing: border-box;
cursor: text;
line-height: 1.42;
height: 100%;
outline: none;
overflow-y: auto;
padding: 12px 15px;
tab-size: 4;
-moz-tab-size: 4;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0;
padding: 0;
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol,
.ql-editor ul {
padding-left: 1.5em;
}
.ql-editor ol > li,
.ql-editor ul > li {
list-style-type: none;
}
.ql-editor ul > li::before {
content: '\25CF';
}
.ql-editor li::before {
display: inline-block;
margin-right: 0.3em;
text-align: right;
white-space: nowrap;
width: 1.2em;
}
.ql-editor li:not(.ql-direction-rtl)::before {
margin-left: -1.5em;
}
.ql-editor ol li,
.ql-editor ul li {
padding-left: 1.5em;
}
.ql-editor ol li {
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
counter-increment: list-num;
}
.ql-editor ol li:before {
content: counter(list-num, decimal) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-increment: list-1;
}
.ql-editor ol li.ql-indent-1:before {
content: counter(list-1, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-2 {
counter-increment: list-2;
}
.ql-editor ol li.ql-indent-2:before {
content: counter(list-2, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-2 {
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-3 {
counter-increment: list-3;
}
.ql-editor ol li.ql-indent-3:before {
content: counter(list-3, decimal) '. ';
}
.ql-editor ol li.ql-indent-3 {
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-4 {
counter-increment: list-4;
}
.ql-editor ol li.ql-indent-4:before {
content: counter(list-4, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-4 {
counter-reset: list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-5 {
counter-increment: list-5;
}
.ql-editor ol li.ql-indent-5:before {
content: counter(list-5, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-5 {
counter-reset: list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-6 {
counter-increment: list-6;
}
.ql-editor ol li.ql-indent-6:before {
content: counter(list-6, decimal) '. ';
}
.ql-editor ol li.ql-indent-6 {
counter-reset: list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-7 {
counter-increment: list-7;
}
.ql-editor ol li.ql-indent-7:before {
content: counter(list-7, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-7 {
counter-reset: list-8 list-9;
}
.ql-editor ol li.ql-indent-8 {
counter-increment: list-8;
}
.ql-editor ol li.ql-indent-8:before {
content: counter(list-8, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-8 {
counter-reset: list-9;
}
.ql-editor ol li.ql-indent-9 {
counter-increment: list-9;
}
.ql-editor ol li.ql-indent-9:before {
content: counter(list-9, decimal) '. ';
}
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
padding-left: 3em;
}
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
padding-left: 4.5em;
}
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 3em;
}
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 4.5em;
}
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
padding-left: 7.5em;
}
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 7.5em;
}
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
padding-left: 9em;
}
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
padding-left: 10.5em;
}
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 9em;
}
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 10.5em;
}
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
padding-left: 13.5em;
}
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 13.5em;
}
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
padding-left: 15em;
}
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
padding-left: 16.5em;
}
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 15em;
}
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 16.5em;
}
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
padding-left: 19.5em;
}
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 19.5em;
}
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
padding-left: 21em;
}
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
padding-left: 22.5em;
}
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 21em;
}
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 22.5em;
}
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
padding-left: 24em;
}
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
padding-left: 25.5em;
}
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 24em;
}
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 25.5em;
}
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
padding-left: 27em;
}
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
padding-left: 28.5em;
}
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 27em;
}
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 28.5em;
}
.ql-editor .ql-video {
display: block;
max-width: 100%;
}
.ql-editor .ql-video.ql-align-center {
margin: 0 auto;
}
.ql-editor .ql-video.ql-align-right {
margin: 0 0 0 auto;
}
.ql-editor .ql-bg-black {
background-color: #000;
}
.ql-editor .ql-bg-red {
background-color: #e60000;
}
.ql-editor .ql-bg-orange {
background-color: #f90;
}
.ql-editor .ql-bg-yellow {
background-color: #ff0;
}
.ql-editor .ql-bg-green {
background-color: #008a00;
}
.ql-editor .ql-bg-blue {
background-color: #06c;
}
.ql-editor .ql-bg-purple {
background-color: #93f;
}
.ql-editor .ql-color-white {
color: #fff;
}
.ql-editor .ql-color-red {
color: #e60000;
}
.ql-editor .ql-color-orange {
color: #f90;
}
.ql-editor .ql-color-yellow {
color: #ff0;
}
.ql-editor .ql-color-green {
color: #008a00;
}
.ql-editor .ql-color-blue {
color: #06c;
}
.ql-editor .ql-color-purple {
color: #93f;
}
.ql-editor .ql-font-serif {
font-family: Georgia, Times New Roman, serif;
}
.ql-editor .ql-font-monospace {
font-family: Monaco, Courier New, monospace;
}
.ql-editor .ql-size-small {
font-size: 0.75em;
}
.ql-editor .ql-size-large {
font-size: 1.5em;
}
.ql-editor .ql-size-huge {
font-size: 2.5em;
}
.ql-editor .ql-direction-rtl {
direction: rtl;
text-align: inherit;
}
.ql-editor .ql-align-center {
text-align: center;
}
.ql-editor .ql-align-justify {
text-align: justify;
}
.ql-editor .ql-align-right {
text-align: right;
}
.ql-editor.ql-blank::before {
color: rgba(0,0,0,0.6);
content: attr(data-placeholder);
font-style: italic;
pointer-events: none;
position: absolute;
}
.ql-bubble.ql-toolbar:after,
.ql-bubble .ql-toolbar:after {
clear: both;
content: '';
display: table;
}
.ql-bubble.ql-toolbar button,
.ql-bubble .ql-toolbar button {
background: none;
border: none;
cursor: pointer;
display: inline-block;
float: left;
height: 24px;
outline: none;
padding: 3px 5px;
width: 28px;
}
.ql-bubble.ql-toolbar button svg,
.ql-bubble .ql-toolbar button svg {
float: left;
height: 100%;
}
.ql-bubble.ql-toolbar input.ql-image[type=file],
.ql-bubble .ql-toolbar input.ql-image[type=file] {
display: none;
}
.ql-bubble.ql-toolbar button:hover,
.ql-bubble .ql-toolbar button:hover,
.ql-bubble.ql-toolbar button.ql-active,
.ql-bubble .ql-toolbar button.ql-active,
.ql-bubble.ql-toolbar .ql-picker-label:hover,
.ql-bubble .ql-toolbar .ql-picker-label:hover,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active,
.ql-bubble.ql-toolbar .ql-picker-item:hover,
.ql-bubble .ql-toolbar .ql-picker-item:hover,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected {
color: #fff;
}
.ql-bubble.ql-toolbar button:hover .ql-fill,
.ql-bubble .ql-toolbar button:hover .ql-fill,
.ql-bubble.ql-toolbar button.ql-active .ql-fill,
.ql-bubble .ql-toolbar button.ql-active .ql-fill,
.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
fill: #fff;
}
.ql-bubble.ql-toolbar button:hover .ql-stroke,
.ql-bubble .ql-toolbar button:hover .ql-stroke,
.ql-bubble.ql-toolbar button.ql-active .ql-stroke,
.ql-bubble .ql-toolbar button.ql-active .ql-stroke,
.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-bubble.ql-toolbar button:hover .ql-stroke-mitter,
.ql-bubble .ql-toolbar button:hover .ql-stroke-mitter,
.ql-bubble.ql-toolbar button.ql-active .ql-stroke-mitter,
.ql-bubble .ql-toolbar button.ql-active .ql-stroke-mitter,
.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-mitter,
.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-mitter,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-mitter,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-mitter,
.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-mitter,
.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-mitter,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-mitter,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-mitter {
stroke: #fff;
}
.ql-bubble {
box-sizing: border-box;
}
.ql-bubble * {
box-sizing: border-box;
}
.ql-bubble .ql-hidden {
display: none;
}
.ql-bubble .ql-out-bottom,
.ql-bubble .ql-out-top {
visibility: hidden;
}
.ql-bubble .ql-tooltip {
position: absolute;
}
.ql-bubble .ql-tooltip a {
cursor: pointer;
text-decoration: none;
}
.ql-bubble .ql-formats {
display: inline-block;
vertical-align: middle;
}
.ql-bubble .ql-formats:after {
clear: both;
content: '';
display: table;
}
.ql-bubble .ql-toolbar.bubble,
.ql-bubble .ql-stroke {
fill: none;
stroke: #ccc;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2;
}
.ql-bubble .ql-stroke-mitter {
fill: none;
stroke: #ccc;
stroke-mitterlimit: 10;
stroke-width: 2;
}
.ql-bubble .ql-fill,
.ql-bubble .ql-stroke.ql-fill {
fill: #ccc;
}
.ql-bubble .ql-empty {
fill: none;
}
.ql-bubble .ql-even {
fill-rule: evenodd;
}
.ql-bubble .ql-thin,
.ql-bubble .ql-stroke.ql-thin {
stroke-width: 1;
}
.ql-bubble .ql-transparent {
opacity: 0.4;
}
.ql-bubble .ql-direction svg:last-child {
display: none;
}
.ql-bubble .ql-direction.ql-active svg:last-child {
display: inline;
}
.ql-bubble .ql-direction.ql-active svg:first-child {
display: none;
}
.ql-bubble .ql-editor h1 {
font-size: 2em;
}
.ql-bubble .ql-editor h2 {
font-size: 1.5em;
}
.ql-bubble .ql-editor h3 {
font-size: 1.17em;
}
.ql-bubble .ql-editor h4 {
font-size: 1em;
}
.ql-bubble .ql-editor h5 {
font-size: 0.83em;
}
.ql-bubble .ql-editor h6 {
font-size: 0.67em;
}
.ql-bubble .ql-editor a {
text-decoration: underline;
}
.ql-bubble .ql-editor blockquote {
border-left: 4px solid #ccc;
margin-bottom: 5px;
margin-top: 5px;
padding-left: 16px;
}
.ql-bubble .ql-editor code,
.ql-bubble .ql-editor pre {
background-color: #f0f0f0;
border-radius: 3px;
}
.ql-bubble .ql-editor pre {
white-space: pre-wrap;
margin-bottom: 5px;
margin-top: 5px;
padding: 5px 10px;
}
.ql-bubble .ql-editor code {
font-size: 85%;
padding-bottom: 2px;
padding-top: 2px;
}
.ql-bubble .ql-editor code:before,
.ql-bubble .ql-editor code:after {
content: "\A0";
letter-spacing: -2px;
}
.ql-bubble .ql-editor pre.ql-syntax {
background-color: #23241f;
color: #f8f8f2;
overflow: visible;
}
.ql-bubble .ql-editor img {
max-width: 100%;
}
.ql-bubble .ql-picker {
color: #ccc;
display: inline-block;
float: left;
font-size: 14px;
font-weight: 500;
height: 24px;
position: relative;
vertical-align: middle;
}
.ql-bubble .ql-picker-label {
cursor: pointer;
display: inline-block;
height: 100%;
padding-left: 8px;
padding-right: 2px;
position: relative;
width: 100%;
}
.ql-bubble .ql-picker-label::before {
display: inline-block;
line-height: 22px;
}
.ql-bubble .ql-picker-options {
background-color: #444;
display: none;
min-width: 100%;
padding: 4px 8px;
position: absolute;
white-space: nowrap;
}
.ql-bubble .ql-picker-options .ql-picker-item {
cursor: pointer;
display: block;
padding-bottom: 5px;
padding-top: 5px;
}
.ql-bubble .ql-picker.ql-expanded .ql-picker-label {
color: #777;
z-index: 2;
}
.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill {
fill: #777;
}
.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke {
stroke: #777;
}
.ql-bubble .ql-picker.ql-expanded .ql-picker-options {
display: block;
margin-top: -1px;
top: 100%;
z-index: 1;
}
.ql-bubble .ql-color-picker,
.ql-bubble .ql-icon-picker {
width: 28px;
}
.ql-bubble .ql-color-picker .ql-picker-label,
.ql-bubble .ql-icon-picker .ql-picker-label {
padding: 2px 4px;
}
.ql-bubble .ql-color-picker .ql-picker-label svg,
.ql-bubble .ql-icon-picker .ql-picker-label svg {
right: 4px;
}
.ql-bubble .ql-icon-picker .ql-picker-options {
padding: 4px 0px;
}
.ql-bubble .ql-icon-picker .ql-picker-item {
height: 24px;
width: 24px;
padding: 2px 4px;
}
.ql-bubble .ql-color-picker .ql-picker-options {
padding: 3px 5px;
width: 152px;
}
.ql-bubble .ql-color-picker .ql-picker-item {
border: 1px solid transparent;
float: left;
height: 16px;
margin: 2px;
padding: 0px;
width: 16px;
}
.ql-bubble .ql-color-picker .ql-picker-item.ql-primary-color {
margin-bottom: toolbarPadding;
}
.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
position: absolute;
margin-top: -9px;
right: 0;
top: 50%;
width: 18px;
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {
content: attr(data-label);
}
.ql-bubble .ql-picker.ql-header {
width: 98px;
}
.ql-bubble .ql-picker.ql-header .ql-picker-label::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item::before {
content: 'Normal';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: 'Heading 1';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: 'Heading 2';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: 'Heading 3';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: 'Heading 4';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: 'Heading 5';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: 'Heading 6';
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
font-size: 2em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
font-size: 1.5em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
font-size: 1.17em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
font-size: 1em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
font-size: 0.83em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
font-size: 0.67em;
}
.ql-bubble .ql-picker.ql-font {
width: 108px;
}
.ql-bubble .ql-picker.ql-font .ql-picker-label::before,
.ql-bubble .ql-picker.ql-font .ql-picker-item::before {
content: 'Sans Serif';
}
.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
content: 'Serif';
}
.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
content: 'Monospace';
}
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
font-family: Georgia, Times New Roman, serif;
}
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
font-family: Monaco, Courier New, monospace;
}
.ql-bubble .ql-picker.ql-size {
width: 98px;
}
.ql-bubble .ql-picker.ql-size .ql-picker-label::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item::before {
content: 'Normal';
}
.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
content: 'Small';
}
.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
content: 'Large';
}
.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
content: 'Huge';
}
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
font-size: 10px;
}
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
font-size: 18px;
}
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
font-size: 32px;
}
.ql-bubble .ql-color-picker.ql-background .ql-picker-item {
background-color: #fff;
}
.ql-bubble .ql-color-picker.ql-color .ql-picker-item {
background-color: #000;
}
.ql-bubble .ql-toolbar .ql-formats {
margin: 8px 12px 8px 0px;
}
.ql-bubble .ql-toolbar .ql-formats:first-child {
margin-left: 12px;
}
.ql-bubble .ql-color-picker svg {
margin: 1px;
}
.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,
.ql-bubble .ql-color-picker .ql-picker-item:hover {
border-color: #fff;
}
.ql-bubble .ql-tooltip {
background-color: #444;
border-radius: 25px;
color: #fff;
margin-top: 10px;
}
.ql-bubble .ql-tooltip-arrow {
border-bottom: 6px solid #444;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
content: " ";
display: block;
left: 50%;
margin-left: -6px;
position: absolute;
top: -6px;
}
.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor {
display: block;
}
.ql-bubble .ql-tooltip.ql-editing .ql-formats {
visibility: hidden;
}
.ql-bubble .ql-tooltip-editor {
display: none;
}
.ql-bubble .ql-tooltip-editor input[type=text] {
background: transparent;
border: none;
color: #fff;
font-size: 13px;
height: 100%;
outline: none;
padding: 10px 20px;
position: absolute;
width: 100%;
}
.ql-bubble .ql-tooltip-editor a {
top: 10px;
position: absolute;
right: 20px;
}
.ql-bubble .ql-tooltip-editor a:before {
color: #ccc;
content: "\D7";
font-size: 16px;
font-weight: bold;
}

View File

@ -0,0 +1,359 @@
/*!
* Quill Editor v1.0.2
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
.ql-container {
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
height: 100%;
margin: 0px;
position: relative;
}
.ql-clipboard {
left: -100000px;
height: 1px;
overflow-y: hidden;
position: absolute;
top: 50%;
}
.ql-clipboard p {
margin: 0;
padding: 0;
}
.ql-editor {
box-sizing: border-box;
cursor: text;
line-height: 1.42;
height: 100%;
outline: none;
overflow-y: auto;
padding: 12px 15px;
tab-size: 4;
-moz-tab-size: 4;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0;
padding: 0;
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol,
.ql-editor ul {
padding-left: 1.5em;
}
.ql-editor ol > li,
.ql-editor ul > li {
list-style-type: none;
}
.ql-editor ul > li::before {
content: '\25CF';
}
.ql-editor li::before {
display: inline-block;
margin-right: 0.3em;
text-align: right;
white-space: nowrap;
width: 1.2em;
}
.ql-editor li:not(.ql-direction-rtl)::before {
margin-left: -1.5em;
}
.ql-editor ol li,
.ql-editor ul li {
padding-left: 1.5em;
}
.ql-editor ol li {
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
counter-increment: list-num;
}
.ql-editor ol li:before {
content: counter(list-num, decimal) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-increment: list-1;
}
.ql-editor ol li.ql-indent-1:before {
content: counter(list-1, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-2 {
counter-increment: list-2;
}
.ql-editor ol li.ql-indent-2:before {
content: counter(list-2, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-2 {
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-3 {
counter-increment: list-3;
}
.ql-editor ol li.ql-indent-3:before {
content: counter(list-3, decimal) '. ';
}
.ql-editor ol li.ql-indent-3 {
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-4 {
counter-increment: list-4;
}
.ql-editor ol li.ql-indent-4:before {
content: counter(list-4, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-4 {
counter-reset: list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-5 {
counter-increment: list-5;
}
.ql-editor ol li.ql-indent-5:before {
content: counter(list-5, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-5 {
counter-reset: list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-6 {
counter-increment: list-6;
}
.ql-editor ol li.ql-indent-6:before {
content: counter(list-6, decimal) '. ';
}
.ql-editor ol li.ql-indent-6 {
counter-reset: list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-7 {
counter-increment: list-7;
}
.ql-editor ol li.ql-indent-7:before {
content: counter(list-7, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-7 {
counter-reset: list-8 list-9;
}
.ql-editor ol li.ql-indent-8 {
counter-increment: list-8;
}
.ql-editor ol li.ql-indent-8:before {
content: counter(list-8, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-8 {
counter-reset: list-9;
}
.ql-editor ol li.ql-indent-9 {
counter-increment: list-9;
}
.ql-editor ol li.ql-indent-9:before {
content: counter(list-9, decimal) '. ';
}
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
padding-left: 3em;
}
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
padding-left: 4.5em;
}
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 3em;
}
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 4.5em;
}
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
padding-left: 7.5em;
}
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 7.5em;
}
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
padding-left: 9em;
}
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
padding-left: 10.5em;
}
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 9em;
}
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 10.5em;
}
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
padding-left: 13.5em;
}
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 13.5em;
}
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
padding-left: 15em;
}
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
padding-left: 16.5em;
}
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 15em;
}
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 16.5em;
}
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
padding-left: 19.5em;
}
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 19.5em;
}
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
padding-left: 21em;
}
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
padding-left: 22.5em;
}
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 21em;
}
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 22.5em;
}
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
padding-left: 24em;
}
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
padding-left: 25.5em;
}
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 24em;
}
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 25.5em;
}
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
padding-left: 27em;
}
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
padding-left: 28.5em;
}
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 27em;
}
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 28.5em;
}
.ql-editor .ql-video {
display: block;
max-width: 100%;
}
.ql-editor .ql-video.ql-align-center {
margin: 0 auto;
}
.ql-editor .ql-video.ql-align-right {
margin: 0 0 0 auto;
}
.ql-editor .ql-bg-black {
background-color: #000;
}
.ql-editor .ql-bg-red {
background-color: #e60000;
}
.ql-editor .ql-bg-orange {
background-color: #f90;
}
.ql-editor .ql-bg-yellow {
background-color: #ff0;
}
.ql-editor .ql-bg-green {
background-color: #008a00;
}
.ql-editor .ql-bg-blue {
background-color: #06c;
}
.ql-editor .ql-bg-purple {
background-color: #93f;
}
.ql-editor .ql-color-white {
color: #fff;
}
.ql-editor .ql-color-red {
color: #e60000;
}
.ql-editor .ql-color-orange {
color: #f90;
}
.ql-editor .ql-color-yellow {
color: #ff0;
}
.ql-editor .ql-color-green {
color: #008a00;
}
.ql-editor .ql-color-blue {
color: #06c;
}
.ql-editor .ql-color-purple {
color: #93f;
}
.ql-editor .ql-font-serif {
font-family: Georgia, Times New Roman, serif;
}
.ql-editor .ql-font-monospace {
font-family: Monaco, Courier New, monospace;
}
.ql-editor .ql-size-small {
font-size: 0.75em;
}
.ql-editor .ql-size-large {
font-size: 1.5em;
}
.ql-editor .ql-size-huge {
font-size: 2.5em;
}
.ql-editor .ql-direction-rtl {
direction: rtl;
text-align: inherit;
}
.ql-editor .ql-align-center {
text-align: center;
}
.ql-editor .ql-align-justify {
text-align: justify;
}
.ql-editor .ql-align-right {
text-align: right;
}
.ql-editor.ql-blank::before {
color: rgba(0,0,0,0.6);
content: attr(data-placeholder);
font-style: italic;
pointer-events: none;
position: absolute;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,883 @@
/*!
* Quill Editor v1.0.2
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
.ql-container {
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
height: 100%;
margin: 0px;
position: relative;
}
.ql-clipboard {
left: -100000px;
height: 1px;
overflow-y: hidden;
position: absolute;
top: 50%;
}
.ql-clipboard p {
margin: 0;
padding: 0;
}
.ql-editor {
box-sizing: border-box;
cursor: text;
line-height: 1.42;
height: 100%;
outline: none;
overflow-y: auto;
padding: 12px 15px;
tab-size: 4;
-moz-tab-size: 4;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0;
padding: 0;
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol,
.ql-editor ul {
padding-left: 1.5em;
}
.ql-editor ol > li,
.ql-editor ul > li {
list-style-type: none;
}
.ql-editor ul > li::before {
content: '\25CF';
}
.ql-editor li::before {
display: inline-block;
margin-right: 0.3em;
text-align: right;
white-space: nowrap;
width: 1.2em;
}
.ql-editor li:not(.ql-direction-rtl)::before {
margin-left: -1.5em;
}
.ql-editor ol li,
.ql-editor ul li {
padding-left: 1.5em;
}
.ql-editor ol li {
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
counter-increment: list-num;
}
.ql-editor ol li:before {
content: counter(list-num, decimal) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-increment: list-1;
}
.ql-editor ol li.ql-indent-1:before {
content: counter(list-1, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-2 {
counter-increment: list-2;
}
.ql-editor ol li.ql-indent-2:before {
content: counter(list-2, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-2 {
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-3 {
counter-increment: list-3;
}
.ql-editor ol li.ql-indent-3:before {
content: counter(list-3, decimal) '. ';
}
.ql-editor ol li.ql-indent-3 {
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-4 {
counter-increment: list-4;
}
.ql-editor ol li.ql-indent-4:before {
content: counter(list-4, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-4 {
counter-reset: list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-5 {
counter-increment: list-5;
}
.ql-editor ol li.ql-indent-5:before {
content: counter(list-5, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-5 {
counter-reset: list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-6 {
counter-increment: list-6;
}
.ql-editor ol li.ql-indent-6:before {
content: counter(list-6, decimal) '. ';
}
.ql-editor ol li.ql-indent-6 {
counter-reset: list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-7 {
counter-increment: list-7;
}
.ql-editor ol li.ql-indent-7:before {
content: counter(list-7, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-7 {
counter-reset: list-8 list-9;
}
.ql-editor ol li.ql-indent-8 {
counter-increment: list-8;
}
.ql-editor ol li.ql-indent-8:before {
content: counter(list-8, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-8 {
counter-reset: list-9;
}
.ql-editor ol li.ql-indent-9 {
counter-increment: list-9;
}
.ql-editor ol li.ql-indent-9:before {
content: counter(list-9, decimal) '. ';
}
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
padding-left: 3em;
}
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
padding-left: 4.5em;
}
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 3em;
}
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 4.5em;
}
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
padding-left: 7.5em;
}
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 7.5em;
}
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
padding-left: 9em;
}
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
padding-left: 10.5em;
}
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 9em;
}
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 10.5em;
}
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
padding-left: 13.5em;
}
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 13.5em;
}
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
padding-left: 15em;
}
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
padding-left: 16.5em;
}
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 15em;
}
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 16.5em;
}
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
padding-left: 19.5em;
}
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 19.5em;
}
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
padding-left: 21em;
}
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
padding-left: 22.5em;
}
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 21em;
}
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 22.5em;
}
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
padding-left: 24em;
}
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
padding-left: 25.5em;
}
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 24em;
}
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 25.5em;
}
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
padding-left: 27em;
}
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
padding-left: 28.5em;
}
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 27em;
}
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 28.5em;
}
.ql-editor .ql-video {
display: block;
max-width: 100%;
}
.ql-editor .ql-video.ql-align-center {
margin: 0 auto;
}
.ql-editor .ql-video.ql-align-right {
margin: 0 0 0 auto;
}
.ql-editor .ql-bg-black {
background-color: #000;
}
.ql-editor .ql-bg-red {
background-color: #e60000;
}
.ql-editor .ql-bg-orange {
background-color: #f90;
}
.ql-editor .ql-bg-yellow {
background-color: #ff0;
}
.ql-editor .ql-bg-green {
background-color: #008a00;
}
.ql-editor .ql-bg-blue {
background-color: #06c;
}
.ql-editor .ql-bg-purple {
background-color: #93f;
}
.ql-editor .ql-color-white {
color: #fff;
}
.ql-editor .ql-color-red {
color: #e60000;
}
.ql-editor .ql-color-orange {
color: #f90;
}
.ql-editor .ql-color-yellow {
color: #ff0;
}
.ql-editor .ql-color-green {
color: #008a00;
}
.ql-editor .ql-color-blue {
color: #06c;
}
.ql-editor .ql-color-purple {
color: #93f;
}
.ql-editor .ql-font-serif {
font-family: Georgia, Times New Roman, serif;
}
.ql-editor .ql-font-monospace {
font-family: Monaco, Courier New, monospace;
}
.ql-editor .ql-size-small {
font-size: 0.75em;
}
.ql-editor .ql-size-large {
font-size: 1.5em;
}
.ql-editor .ql-size-huge {
font-size: 2.5em;
}
.ql-editor .ql-direction-rtl {
direction: rtl;
text-align: inherit;
}
.ql-editor .ql-align-center {
text-align: center;
}
.ql-editor .ql-align-justify {
text-align: justify;
}
.ql-editor .ql-align-right {
text-align: right;
}
.ql-editor.ql-blank::before {
color: rgba(0,0,0,0.6);
content: attr(data-placeholder);
font-style: italic;
pointer-events: none;
position: absolute;
}
.ql-snow.ql-toolbar:after,
.ql-snow .ql-toolbar:after {
clear: both;
content: '';
display: table;
}
.ql-snow.ql-toolbar button,
.ql-snow .ql-toolbar button {
background: none;
border: none;
cursor: pointer;
display: inline-block;
float: left;
height: 24px;
outline: none;
padding: 3px 5px;
width: 28px;
}
.ql-snow.ql-toolbar button svg,
.ql-snow .ql-toolbar button svg {
float: left;
height: 100%;
}
.ql-snow.ql-toolbar input.ql-image[type=file],
.ql-snow .ql-toolbar input.ql-image[type=file] {
display: none;
}
.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow .ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow .ql-toolbar .ql-picker-label.ql-active,
.ql-snow.ql-toolbar .ql-picker-item:hover,
.ql-snow .ql-toolbar .ql-picker-item:hover,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected {
color: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
fill: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow.ql-toolbar button:hover .ql-stroke-mitter,
.ql-snow .ql-toolbar button:hover .ql-stroke-mitter,
.ql-snow.ql-toolbar button.ql-active .ql-stroke-mitter,
.ql-snow .ql-toolbar button.ql-active .ql-stroke-mitter,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-mitter,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-mitter,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-mitter,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-mitter,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-mitter,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-mitter,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-mitter,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-mitter {
stroke: #06c;
}
.ql-snow {
box-sizing: border-box;
}
.ql-snow * {
box-sizing: border-box;
}
.ql-snow .ql-hidden {
display: none;
}
.ql-snow .ql-out-bottom,
.ql-snow .ql-out-top {
visibility: hidden;
}
.ql-snow .ql-tooltip {
position: absolute;
}
.ql-snow .ql-tooltip a {
cursor: pointer;
text-decoration: none;
}
.ql-snow .ql-formats {
display: inline-block;
vertical-align: middle;
}
.ql-snow .ql-formats:after {
clear: both;
content: '';
display: table;
}
.ql-snow .ql-toolbar.snow,
.ql-snow .ql-stroke {
fill: none;
stroke: #444;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2;
}
.ql-snow .ql-stroke-mitter {
fill: none;
stroke: #444;
stroke-mitterlimit: 10;
stroke-width: 2;
}
.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
fill: #444;
}
.ql-snow .ql-empty {
fill: none;
}
.ql-snow .ql-even {
fill-rule: evenodd;
}
.ql-snow .ql-thin,
.ql-snow .ql-stroke.ql-thin {
stroke-width: 1;
}
.ql-snow .ql-transparent {
opacity: 0.4;
}
.ql-snow .ql-direction svg:last-child {
display: none;
}
.ql-snow .ql-direction.ql-active svg:last-child {
display: inline;
}
.ql-snow .ql-direction.ql-active svg:first-child {
display: none;
}
.ql-snow .ql-editor h1 {
font-size: 2em;
}
.ql-snow .ql-editor h2 {
font-size: 1.5em;
}
.ql-snow .ql-editor h3 {
font-size: 1.17em;
}
.ql-snow .ql-editor h4 {
font-size: 1em;
}
.ql-snow .ql-editor h5 {
font-size: 0.83em;
}
.ql-snow .ql-editor h6 {
font-size: 0.67em;
}
.ql-snow .ql-editor a {
text-decoration: underline;
}
.ql-snow .ql-editor blockquote {
border-left: 4px solid #ccc;
margin-bottom: 5px;
margin-top: 5px;
padding-left: 16px;
}
.ql-snow .ql-editor code,
.ql-snow .ql-editor pre {
background-color: #f0f0f0;
border-radius: 3px;
}
.ql-snow .ql-editor pre {
white-space: pre-wrap;
margin-bottom: 5px;
margin-top: 5px;
padding: 5px 10px;
}
.ql-snow .ql-editor code {
font-size: 85%;
padding-bottom: 2px;
padding-top: 2px;
}
.ql-snow .ql-editor code:before,
.ql-snow .ql-editor code:after {
content: "\A0";
letter-spacing: -2px;
}
.ql-snow .ql-editor pre.ql-syntax {
background-color: #23241f;
color: #f8f8f2;
overflow: visible;
}
.ql-snow .ql-editor img {
max-width: 100%;
}
.ql-snow .ql-picker {
color: #444;
display: inline-block;
float: left;
font-size: 14px;
font-weight: 500;
height: 24px;
position: relative;
vertical-align: middle;
}
.ql-snow .ql-picker-label {
cursor: pointer;
display: inline-block;
height: 100%;
padding-left: 8px;
padding-right: 2px;
position: relative;
width: 100%;
}
.ql-snow .ql-picker-label::before {
display: inline-block;
line-height: 22px;
}
.ql-snow .ql-picker-options {
background-color: #fff;
display: none;
min-width: 100%;
padding: 4px 8px;
position: absolute;
white-space: nowrap;
}
.ql-snow .ql-picker-options .ql-picker-item {
cursor: pointer;
display: block;
padding-bottom: 5px;
padding-top: 5px;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label {
color: #ccc;
z-index: 2;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {
fill: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {
stroke: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-options {
display: block;
margin-top: -1px;
top: 100%;
z-index: 1;
}
.ql-snow .ql-color-picker,
.ql-snow .ql-icon-picker {
width: 28px;
}
.ql-snow .ql-color-picker .ql-picker-label,
.ql-snow .ql-icon-picker .ql-picker-label {
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-label svg,
.ql-snow .ql-icon-picker .ql-picker-label svg {
right: 4px;
}
.ql-snow .ql-icon-picker .ql-picker-options {
padding: 4px 0px;
}
.ql-snow .ql-icon-picker .ql-picker-item {
height: 24px;
width: 24px;
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-options {
padding: 3px 5px;
width: 152px;
}
.ql-snow .ql-color-picker .ql-picker-item {
border: 1px solid transparent;
float: left;
height: 16px;
margin: 2px;
padding: 0px;
width: 16px;
}
.ql-snow .ql-color-picker .ql-picker-item.ql-primary-color {
margin-bottom: toolbarPadding;
}
.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
position: absolute;
margin-top: -9px;
right: 0;
top: 50%;
width: 18px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {
content: attr(data-label);
}
.ql-snow .ql-picker.ql-header {
width: 98px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: 'Heading 1';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: 'Heading 2';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: 'Heading 3';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: 'Heading 4';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: 'Heading 5';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: 'Heading 6';
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
font-size: 2em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
font-size: 1.5em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
font-size: 1.17em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
font-size: 1em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
font-size: 0.83em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
font-size: 0.67em;
}
.ql-snow .ql-picker.ql-font {
width: 108px;
}
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: 'Sans Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
content: 'Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
content: 'Monospace';
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
font-family: Georgia, Times New Roman, serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
font-family: Monaco, Courier New, monospace;
}
.ql-snow .ql-picker.ql-size {
width: 98px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
content: 'Small';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
content: 'Large';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
content: 'Huge';
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
font-size: 10px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
font-size: 18px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
font-size: 32px;
}
.ql-snow .ql-color-picker.ql-background .ql-picker-item {
background-color: #fff;
}
.ql-snow .ql-color-picker.ql-color .ql-picker-item {
background-color: #000;
}
.ql-toolbar.ql-snow {
border: 1px solid #ccc;
box-sizing: border-box;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
padding: 8px;
}
.ql-toolbar.ql-snow .ql-formats {
margin-right: 15px;
}
.ql-toolbar.ql-snow .ql-picker-label {
border: 1px solid transparent;
}
.ql-toolbar.ql-snow .ql-picker-options {
border: 1px solid transparent;
box-shadow: rgba(0,0,0,0.2) 0 2px 8px;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {
border-color: #000;
}
.ql-toolbar.ql-snow + .ql-container.ql-snow {
border-top: 0px;
}
.ql-snow .ql-tooltip {
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0px 0px 5px #ddd;
color: #444;
margin-top: 10px;
padding: 5px 12px;
white-space: nowrap;
}
.ql-snow .ql-tooltip::before {
content: "Visit URL:";
line-height: 26px;
margin-right: 8px;
}
.ql-snow .ql-tooltip input[type=text] {
display: none;
border: 1px solid #ccc;
font-size: 13px;
height: 26px;
margin: 0px;
padding: 3px 5px;
width: 170px;
}
.ql-snow .ql-tooltip a.ql-preview {
display: inline-block;
max-width: 200px;
overflow-x: hidden;
text-overflow: ellipsis;
vertical-align: top;
}
.ql-snow .ql-tooltip a.ql-action::after {
border-right: 1px solid #ccc;
content: 'Edit';
margin-left: 16px;
padding-right: 8px;
}
.ql-snow .ql-tooltip a.ql-remove::before {
content: 'Remove';
margin-left: 8px;
}
.ql-snow .ql-tooltip a {
line-height: 26px;
}
.ql-snow .ql-tooltip.ql-editing a.ql-preview,
.ql-snow .ql-tooltip.ql-editing a.ql-remove {
display: none;
}
.ql-snow .ql-tooltip.ql-editing input[type=text] {
display: inline-block;
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
border-right: 0px;
content: 'Save';
padding-right: 0px;
}
.ql-snow .ql-tooltip[data-mode=link]::before {
content: "Enter link:";
}
.ql-snow .ql-tooltip[data-mode=formula]::before {
content: "Enter formula:";
}
.ql-snow .ql-tooltip[data-mode=video]::before {
content: "Enter video:";
}
.ql-snow a {
color: #06c;
}
.ql-container.ql-snow {
border: 1px solid #ccc;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,85 @@
<!DOCTYPE html>
<html>
<head>
<title>Quill</title>
<meta charset="utf-8">
<link rel="stylesheet" href="quill.snow.css" />
<style>
.standalone-container {
margin: 0;
width: 100%;
}
#bubble-container {
height: 100%;
}
#bubble-container div.ql-editor {
margin-top:3em;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<div class="standalone-container">
<div id="bubble-container"></div>
</div>
<form><input type="hidden" name="md" id="md" />
<input id="btnSubmit" type="button" value="Valider" class="hidden" />
</form>
<div id="result"></div>
<script type="text/javascript" src="quill.min.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="showdown.js"></script>
<script type="text/javascript" src="to-markdown.js"></script>
<script type="text/javascript" src="md-helpers.js"></script>
<script type="text/javascript">
var toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block'],
[{ 'header': 1 }, { 'header': 2 }], // custom button values
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
[{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent
['clean'] // remove formatting button
];
var quill = new Quill('#bubble-container', {
modules: {
toolbar: toolbarOptions
},
placeholder: 'Composez votre texte ...',
theme: 'snow'
});
function getMD() {
return markdownize($('#bubble-container div.ql-editor').html())
}
quill.on('text-change', function (delta, oldDelta, source)
{
if (source === "user") {
$('#md').val(getMD());
$('#btnSubmit').removeClass('hidden');
}
});
$( document ).ready(function() {
$('#btnSubmit').on('click', function () {
$.get("hybrid:validate?md=" + encodeURIComponent(getMD()),
function(data,stat,jqXHR) { $('#result').html("Okay") })
})
});
</script>
</body>
</html>

View File

@ -0,0 +1,813 @@
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.toMarkdown = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*
* to-markdown - an HTML to Markdown converter
*
* Copyright 2011-15, Dom Christie
* Licenced under the MIT licence
*
*/
'use strict';
var toMarkdown;
var converters;
var mdConverters = require('./lib/md-converters');
var gfmConverters = require('./lib/gfm-converters');
var collapse = require('collapse-whitespace');
/*
* Set up window and document for Node.js
*/
var _window = (typeof window !== 'undefined' ? window : this), _document;
if (typeof document === 'undefined') {
_document = require('jsdom').jsdom();
}
else {
_document = document;
}
/*
* Utilities
*/
function trim(string) {
return string.replace(/^[ \r\n\t]+|[ \r\n\t]+$/g, '');
}
var blocks = ['address', 'article', 'aside', 'audio', 'blockquote', 'body',
'canvas', 'center', 'dd', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption',
'figure', 'footer', 'form', 'frameset', 'h1', 'h2', 'h3', 'h4','h5', 'h6',
'header', 'hgroup', 'hr', 'html', 'isindex', 'li', 'main', 'menu', 'nav',
'noframes', 'noscript', 'ol', 'output', 'p', 'pre', 'section', 'table',
'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul'
];
function isBlock(node) {
return blocks.indexOf(node.nodeName.toLowerCase()) !== -1;
}
var voids = [
'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input',
'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'
];
function isVoid(node) {
return voids.indexOf(node.nodeName.toLowerCase()) !== -1;
}
/*
* Parsing HTML strings
*/
function canParseHtml() {
var Parser = _window.DOMParser, canParse = false;
// Adapted from https://gist.github.com/1129031
// Firefox/Opera/IE throw errors on unsupported types
try {
// WebKit returns null on unsupported types
if (new Parser().parseFromString('', 'text/html')) {
canParse = true;
}
} catch (e) {}
return canParse;
}
function createHtmlParser() {
var Parser = function () {};
Parser.prototype.parseFromString = function (string) {
var newDoc = _document.implementation.createHTMLDocument('');
if (string.toLowerCase().indexOf('<!doctype') > -1) {
newDoc.documentElement.innerHTML = string;
}
else {
newDoc.body.innerHTML = string;
}
return newDoc;
};
return Parser;
}
var HtmlParser = canParseHtml() ? _window.DOMParser : createHtmlParser();
function htmlToDom(string) {
var tree = new HtmlParser().parseFromString(string, 'text/html');
collapse(tree, isBlock);
return tree;
}
/*
* Flattens DOM tree into single array
*/
function bfsOrder(node) {
var inqueue = [node],
outqueue = [],
elem, children, i;
while (inqueue.length > 0) {
elem = inqueue.shift();
outqueue.push(elem);
children = elem.childNodes;
for (i = 0 ; i < children.length; i++) {
if (children[i].nodeType === 1) { inqueue.push(children[i]); }
}
}
outqueue.shift();
return outqueue;
}
/*
* Contructs a Markdown string of replacement text for a given node
*/
function getContent(node) {
var text = '';
for (var i = 0; i < node.childNodes.length; i++) {
if (node.childNodes[i].nodeType === 1) {
text += node.childNodes[i]._replacement;
}
else if (node.childNodes[i].nodeType === 3) {
text += node.childNodes[i].data;
}
else { continue; }
}
return text;
}
/*
* Returns the HTML string of an element with its contents converted
*/
function outer(node, content) {
return node.cloneNode(false).outerHTML.replace('><', '>'+ content +'<');
}
function canConvert(node, filter) {
if (typeof filter === 'string') {
return filter === node.nodeName.toLowerCase();
}
if (Array.isArray(filter)) {
return filter.indexOf(node.nodeName.toLowerCase()) !== -1;
}
else if (typeof filter === 'function') {
return filter.call(toMarkdown, node);
}
else {
throw new TypeError('`filter` needs to be a string, array, or function');
}
}
function isFlankedByWhitespace(side, node) {
var sibling, regExp, isFlanked;
if (side === 'left') {
sibling = node.previousSibling;
regExp = / $/;
}
else {
sibling = node.nextSibling;
regExp = /^ /;
}
if (sibling) {
if (sibling.nodeType === 3) {
isFlanked = regExp.test(sibling.nodeValue);
}
else if(sibling.nodeType === 1 && !isBlock(sibling)) {
isFlanked = regExp.test(sibling.textContent);
}
}
return isFlanked;
}
function flankingWhitespace(node) {
var leading = '', trailing = '';
if (!isBlock(node)) {
var hasLeading = /^[ \r\n\t]/.test(node.innerHTML),
hasTrailing = /[ \r\n\t]$/.test(node.innerHTML);
if (hasLeading && !isFlankedByWhitespace('left', node)) {
leading = ' ';
}
if (hasTrailing && !isFlankedByWhitespace('right', node)) {
trailing = ' ';
}
}
return { leading: leading, trailing: trailing };
}
/*
* Finds a Markdown converter, gets the replacement, and sets it on
* `_replacement`
*/
function process(node) {
var replacement, content = getContent(node);
// Remove blank nodes
if (!isVoid(node) && !/A/.test(node.nodeName) && /^\s*$/i.test(content)) {
node._replacement = '';
return;
}
for (var i = 0; i < converters.length; i++) {
var converter = converters[i];
if (canConvert(node, converter.filter)) {
if (typeof converter.replacement !== 'function') {
throw new TypeError(
'`replacement` needs to be a function that returns a string'
);
}
var whitespace = flankingWhitespace(node);
if (whitespace.leading || whitespace.trailing) {
content = trim(content);
}
replacement = whitespace.leading +
converter.replacement.call(toMarkdown, content, node) +
whitespace.trailing;
break;
}
}
node._replacement = replacement;
}
toMarkdown = function (input, options) {
options = options || {};
if (typeof input !== 'string') {
throw new TypeError(input + ' is not a string');
}
// Escape potential ol triggers
input = input.replace(/(\d+)\. /g, '$1\\. ');
var clone = htmlToDom(input).body,
nodes = bfsOrder(clone),
output;
converters = mdConverters.slice(0);
if (options.gfm) {
converters = gfmConverters.concat(converters);
}
if (options.converters) {
converters = options.converters.concat(converters);
}
// Process through nodes in reverse (so deepest child elements are first).
for (var i = nodes.length - 1; i >= 0; i--) {
process(nodes[i]);
}
output = getContent(clone);
return output.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g, '')
.replace(/\n\s+\n/g, '\n\n')
.replace(/\n{3,}/g, '\n\n');
};
toMarkdown.isBlock = isBlock;
toMarkdown.isVoid = isVoid;
toMarkdown.trim = trim;
toMarkdown.outer = outer;
module.exports = toMarkdown;
},{"./lib/gfm-converters":2,"./lib/md-converters":3,"collapse-whitespace":4,"jsdom":7}],2:[function(require,module,exports){
'use strict';
function cell(content, node) {
var index = Array.prototype.indexOf.call(node.parentNode.childNodes, node);
var prefix = ' ';
if (index === 0) { prefix = '| '; }
return prefix + content + ' |';
}
var highlightRegEx = /highlight highlight-(\S+)/;
module.exports = [
{
filter: 'br',
replacement: function () {
return '\n';
}
},
{
filter: ['del', 's', 'strike'],
replacement: function (content) {
return '~~' + content + '~~';
}
},
{
filter: function (node) {
return node.type === 'checkbox' && node.parentNode.nodeName === 'LI';
},
replacement: function (content, node) {
return (node.checked ? '[x]' : '[ ]') + ' ';
}
},
{
filter: ['th', 'td'],
replacement: function (content, node) {
return cell(content, node);
}
},
{
filter: 'tr',
replacement: function (content, node) {
var borderCells = '';
var alignMap = { left: ':--', right: '--:', center: ':-:' };
if (node.parentNode.nodeName === 'THEAD') {
for (var i = 0; i < node.childNodes.length; i++) {
var align = node.childNodes[i].attributes.align;
var border = '---';
if (align) { border = alignMap[align.value] || border; }
borderCells += cell(border, node.childNodes[i]);
}
}
return '\n' + content + (borderCells ? '\n' + borderCells : '');
}
},
{
filter: 'table',
replacement: function (content) {
return '\n\n' + content + '\n\n';
}
},
{
filter: ['thead', 'tbody', 'tfoot'],
replacement: function (content) {
return content;
}
},
// Fenced code blocks
{
filter: function (node) {
return node.nodeName === 'PRE' &&
node.firstChild &&
node.firstChild.nodeName === 'CODE';
},
replacement: function(content, node) {
return '\n\n```\n' + node.firstChild.textContent + '\n```\n\n';
}
},
// Syntax-highlighted code blocks
{
filter: function (node) {
return node.nodeName === 'PRE' &&
node.parentNode.nodeName === 'DIV' &&
highlightRegEx.test(node.parentNode.className);
},
replacement: function (content, node) {
var language = node.parentNode.className.match(highlightRegEx)[1];
return '\n\n```' + language + '\n' + node.textContent + '\n```\n\n';
}
},
{
filter: function (node) {
return node.nodeName === 'DIV' &&
highlightRegEx.test(node.className);
},
replacement: function (content) {
return '\n\n' + content + '\n\n';
}
}
];
},{}],3:[function(require,module,exports){
'use strict';
module.exports = [
{
filter: 'p',
replacement: function (content) {
return '\n\n' + content + '\n\n';
}
},
{
filter: 'div',
replacement: function (content) {
return content + '\n';
}
},
{
filter: 'br',
replacement: function () {
return ' \n';
}
},
{
filter: ['h1', 'h2', 'h3', 'h4','h5', 'h6'],
replacement: function(content, node) {
var hLevel = node.nodeName.charAt(1);
var hPrefix = '';
for(var i = 0; i < hLevel; i++) {
hPrefix += '#';
}
return '\n\n' + hPrefix + ' ' + content + '\n\n';
}
},
{
filter: 'hr',
replacement: function () {
return '\n\n* * *\n\n';
}
},
{
filter: ['em', 'i'],
replacement: function (content) {
return '*' + content + '*';
}
},
{
filter: ['u'],
replacement: function (content) {
return '_' + content + '_';
}
},
{
filter: ['strong', 'b'],
replacement: function (content) {
return '**' + content + '**';
}
},
{
filter: ['strike','s'],
replacement: function (content) {
return '~~' + content + '~~';
}
},
// Inline code
{
filter: function (node) {
var hasSiblings = node.previousSibling || node.nextSibling;
var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings;
return node.nodeName === 'CODE' && !isCodeBlock;
},
replacement: function(content) {
return '`' + content + '`';
}
},
{
filter: function (node) {
return node.nodeName === 'A' && node.getAttribute('href');
},
replacement: function(content, node) {
var titlePart = node.title ? ' "'+ node.title +'"' : '';
return '[' + content + '](' + node.getAttribute('href') + titlePart + ')';
}
},
{
filter: 'video',
replacement: function(content, node) {
var alt = node.getAttribute("alt") || '';
var src ;
for (var i = 0; i < node.childNodes.length; i++)
{
if (node.childNodes[i].localName == 'source') {
src = node.childNodes[i].getAttribute('src') ;
break;
}
}
var title = node.title || '';
var titlePart = title ? ' "'+ title +'"' : '';
return src ? '![video:' + alt + ']' + '(' + src + titlePart + ')' : '';
}
},
{
filter: 'audio',
replacement: function(content, node) {
var alt = node.getAttribute("alt") || '';
var src = node.getAttribute('src') || '';
if (!src)
for (var i = 0; i < node.childNodes.length; i++)
{
if (node.childNodes[i].localName == 'source') {
src = node.childNodes[i].getAttribute('src') ;
break;
}
}
var title = node.title || '';
var titlePart = title ? ' "'+ title +'"' : '';
return src ? '![audio:' + alt + ']' + '(' + src + titlePart + ')' : '';
}
},
{
filter: 'img',
replacement: function(content, node) {
var alt = node.getAttribute("alt") || '';
var src = node.getAttribute('src') || '';
var title = node.getAttribute('title') || '';
var titlePart = title ? ' "'+ title +'"' : '';
return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : '';
}
},
// Code blocks
{
filter: function (node) {
return node.nodeName === 'PRE' && node.firstChild.nodeName === 'CODE';
},
replacement: function(content, node) {
return '\n\n ' + node.firstChild.textContent.replace(/\n/g, '\n ') + '\n\n';
}
},
{
filter: 'blockquote',
replacement: function (content) {
content = this.trim(content);
content = content.replace(/\n{3,}/g, '\n\n');
content = content.replace(/^/gm, '> ');
return '\n\n' + content + '\n\n';
}
},
{
filter: 'li',
replacement: function (content, node) {
content = content.replace(/^\s+/, '').replace(/\n/gm, '\n ');
var prefix = '* ';
var parent = node.parentNode;
var index = Array.prototype.indexOf.call(parent.children, node) + 1;
prefix = /ol/i.test(parent.nodeName) ? index + '. ' : '* ';
return prefix + content;
}
},
{
filter: ['ul', 'ol'],
replacement: function (content, node) {
var strings = [];
for (var i = 0; i < node.childNodes.length; i++) {
strings.push(node.childNodes[i]._replacement);
}
if (/li/i.test(node.parentNode.nodeName)) {
return '\n' + strings.join('\n');
}
return '\n\n' + strings.join('\n') + '\n\n';
}
},
{
filter: function (node) {
return this.isBlock(node);
},
replacement: function (content, node) {
return '\n\n' + this.outer(node, content) + '\n\n';
}
},
// Anything else!
{
filter: function () {
return true;
},
replacement: function (content, node) {
return this.outer(node, content);
}
}
];
},{}],4:[function(require,module,exports){
'use strict';
var voidElements = require('void-elements');
Object.keys(voidElements).forEach(function (name) {
voidElements[name.toUpperCase()] = 1;
});
var blockElements = {};
require('block-elements').forEach(function (name) {
blockElements[name.toUpperCase()] = 1;
});
/**
* isBlockElem(node) determines if the given node is a block element.
*
* @param {Node} node
* @return {Boolean}
*/
function isBlockElem(node) {
return !!(node && blockElements[node.nodeName]);
}
/**
* isVoid(node) determines if the given node is a void element.
*
* @param {Node} node
* @return {Boolean}
*/
function isVoid(node) {
return !!(node && voidElements[node.nodeName]);
}
/**
* whitespace(elem [, isBlock]) removes extraneous whitespace from an
* the given element. The function isBlock may optionally be passed in
* to determine whether or not an element is a block element; if none
* is provided, defaults to using the list of block elements provided
* by the `block-elements` module.
*
* @param {Node} elem
* @param {Function} blockTest
*/
function collapseWhitespace(elem, isBlock) {
if (!elem.firstChild || elem.nodeName === 'PRE') return;
if (typeof isBlock !== 'function') {
isBlock = isBlockElem;
}
var prevText = null;
var prevVoid = false;
var prev = null;
var node = next(prev, elem);
while (node !== elem) {
if (node.nodeType === 3) {
// Node.TEXT_NODE
var text = node.data.replace(/[ \r\n\t]+/g, ' ');
if ((!prevText || / $/.test(prevText.data)) && !prevVoid && text[0] === ' ') {
text = text.substr(1);
}
// `text` might be empty at this point.
if (!text) {
node = remove(node);
continue;
}
node.data = text;
prevText = node;
} else if (node.nodeType === 1) {
// Node.ELEMENT_NODE
if (isBlock(node) || node.nodeName === 'BR') {
if (prevText) {
prevText.data = prevText.data.replace(/ $/, '');
}
prevText = null;
prevVoid = false;
} else if (isVoid(node)) {
// Avoid trimming space around non-block, non-BR void elements.
prevText = null;
prevVoid = true;
}
} else {
node = remove(node);
continue;
}
var nextNode = next(prev, node);
prev = node;
node = nextNode;
}
if (prevText) {
prevText.data = prevText.data.replace(/ $/, '');
if (!prevText.data) {
remove(prevText);
}
}
}
/**
* remove(node) removes the given node from the DOM and returns the
* next node in the sequence.
*
* @param {Node} node
* @return {Node} node
*/
function remove(node) {
var next = node.nextSibling || node.parentNode;
node.parentNode.removeChild(node);
return next;
}
/**
* next(prev, current) returns the next node in the sequence, given the
* current and previous nodes.
*
* @param {Node} prev
* @param {Node} current
* @return {Node}
*/
function next(prev, current) {
if (prev && prev.parentNode === current || current.nodeName === 'PRE') {
return current.nextSibling || current.parentNode;
}
return current.firstChild || current.nextSibling || current.parentNode;
}
module.exports = collapseWhitespace;
},{"block-elements":5,"void-elements":6}],5:[function(require,module,exports){
/**
* This file automatically generated from `build.js`.
* Do not manually edit.
*/
module.exports = [
"address",
"article",
"aside",
"audio",
"blockquote",
"canvas",
"dd",
"div",
"dl",
"fieldset",
"figcaption",
"figure",
"footer",
"form",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"header",
"hgroup",
"hr",
"main",
"nav",
"noscript",
"ol",
"output",
"p",
"pre",
"section",
"table",
"tfoot",
"ul",
"video"
];
},{}],6:[function(require,module,exports){
/**
* This file automatically generated from `pre-publish.js`.
* Do not manually edit.
*/
module.exports = {
"area": true,
"base": true,
"br": true,
"col": true,
"embed": true,
"hr": true,
"img": true,
"input": true,
"keygen": true,
"link": true,
"menuitem": true,
"meta": true,
"param": true,
"source": true,
"track": true,
"wbr": true
};
},{}],7:[function(require,module,exports){
},{}]},{},[1])(1)
});

View File

@ -16,8 +16,8 @@
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
<AndroidStoreUncompressedFileExtensions />
<MandroidI18n />
@ -35,7 +35,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
<AndroidLinkMode>Full</AndroidLinkMode>
<AndroidLinkMode>None</AndroidLinkMode>
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
<BundleAssemblies>False</BundleAssemblies>
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
@ -51,7 +51,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<AndroidLinkMode>None</AndroidLinkMode>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
<BundleAssemblies>False</BundleAssemblies>
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
@ -89,6 +89,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Mono.Android" />
<Reference Include="Mono.Data.Sqlite" />
<Reference Include="mscorlib" />
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
@ -104,12 +105,14 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Drawing.dll</HintPath>
</Reference>
<Reference Include="System.Json" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web.Services" />
<Reference Include="Xamarin.Android.Support.Animated.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll</HintPath>
<Private>True</Private>
@ -193,7 +196,14 @@
<Compile Include="Helpers\Settings.cs" />
<Compile Include="Helpers\SimpleJsonPostMethod.cs" />
<Compile Include="Helpers\YavscHelpers.cs" />
<Compile Include="Html.cs" />
<Compile Include="MainActivity.cs" />
<Compile Include="MarkdownEditor.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>MarkdownEditor.cshtml</DependentUpon>
</Compile>
<Compile Include="MarkdownWebViewClient.cs" />
<Compile Include="OAuth2\YaOAuth2Authenticator.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@ -206,6 +216,11 @@
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="MarkdownEditor.cshtml">
<Generator>RazorTemplatePreprocessor</Generator>
<LastGenOutput>MarkdownEditor.cs</LastGenOutput>
<SubType>None</SubType>
</None>
<None Include="packages.config" />
<None Include="Resources\AboutResources.txt" />
<AndroidAsset Include="Assets\AboutAssets.txt" />
@ -223,7 +238,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Yavsc.Client\Yavsc.Client.csproj">
<Project>{67F9D3A8-F71E-4428-913F-C37AE82CDB24}</Project>
<Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>
<Name>Yavsc.Client</Name>
</ProjectReference>
<ProjectReference Include="..\BookAStar\BookAStar.csproj">
@ -258,6 +273,21 @@
</XamarinComponentReference>
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\bootstrap.js" />
<AndroidAsset Include="Assets\jquery.js" />
<AndroidAsset Include="Assets\jquery-ui.js" />
<AndroidAsset Include="Assets\md-helpers.js" />
<AndroidAsset Include="Assets\quill.js" />
<AndroidAsset Include="Assets\showdown.js" />
<AndroidAsset Include="Assets\to-markdown.js" />
<AndroidAsset Include="Assets\quill.snow.css" />
<AndroidAsset Include="Assets\highlight.min.js" />
<AndroidAsset Include="Assets\katex.min.js" />
<AndroidAsset Include="Assets\katex.min.css" />
<AndroidAsset Include="Assets\monokai-sublime.min.css" />
<AndroidAsset Include="Assets\quill.min.js" />
<AndroidAsset Include="Assets\quill.core.css" />
<AndroidAsset Include="Assets\quill.bubble.css" />
<Content Include="PluginsHelp\ConnectivityReadme.txt" />
<Content Include="PluginsHelp\GeolocatorReadme.txt" />
<AndroidResource Include="Resources\values\colors.xml" />

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AndroidDesignerPreferredDevice>Nexus 4</AndroidDesignerPreferredDevice>
</PropertyGroup>
<PropertyGroup>
<ReferencePath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\</ReferencePath>
</PropertyGroup>
</Project>

View File

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2A8C2BD7-B1B6-4D74-A3FC-3F5DB3BE325E}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>App2.Droid</RootNamespace>
<AssemblyName>App2.Droid</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidApplication>true</AndroidApplication>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
<AndroidStoreUncompressedFileExtensions />
<MandroidI18n />
<JavaMaximumHeapSize />
<JavaOptions />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
</PropertyGroup>
<ItemGroup>
<Reference Include="FormsViewGroup, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.0.0.6482\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ObjectModel" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="Xamarin.Android.Support.Design, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.Design.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.Design.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.v4.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.AppCompat.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.CardView, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.CardView.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.MediaRouter, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.MediaRouter.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.0.0.6482\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.0.0.6482\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.0.0.6482\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.0.0.6482\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\icon.png" />
<AndroidResource Include="Resources\drawable-hdpi\icon.png" />
<AndroidResource Include="Resources\drawable-xhdpi\icon.png" />
<AndroidResource Include="Resources\drawable-xxhdpi\icon.png" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.axml" />
<AndroidResource Include="Resources\layout\Toolbar.axml" />
<AndroidResource Include="Resources\values\styles.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\App2\App2.csproj">
<Project>{A0815650-0A0A-47B0-8826-771F0E1AD137}</Project>
<Name>App2</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,12 @@

using System;
public static class Html
{
public static Action<System.IO.TextWriter> Write(object o)
{
return new Action<System.IO.TextWriter>(w => w.Write(o));
}
}

View File

@ -23,6 +23,11 @@ using BookAStar.Droid.OAuth;
using Yavsc.Helpers;
using Yavsc.Models.Identity;
using static Android.Content.Res.Resources;
using Android.Webkit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using Android.Views;
namespace BookAStar.Droid
{
@ -38,11 +43,11 @@ namespace BookAStar.Droid
global::Xamarin.Forms.Forms.Init(this, bundle);
global::Xamarin.FormsMaps.Init(this, bundle);
LoadApplication(new App(this));
/* var x = typeof(Themes.DarkThemeResources);
x = typeof(Themes.LightThemeResources);
x = typeof(Themes.Android.UnderlineEffect); */
/* var x = typeof(Themes.DarkThemeResources);
x = typeof(Themes.LightThemeResources);
x = typeof(Themes.Android.UnderlineEffect); */
}
public bool EnablePushNotifications(bool enable)
{
@ -105,6 +110,16 @@ namespace BookAStar.Droid
base.OnStart();
if (MainSettings.PushNotifications)
StartNotifications();
long queryId = Intent.GetLongExtra("BookQueryId",0);
if (queryId > 0)
{
Task.Run(async () =>
{
App.CurrentApp.ShowBookQuery(
await DataManager.Current.BookQueries.Get(queryId));
});
}
}
@ -168,17 +183,15 @@ namespace BookAStar.Droid
return manager.FindAccountsForService(MainSettings.ApplicationName);
});
}
public void AddAccount()
{
var auth = new YaOAuth2Authenticator(
YaOAuth2Authenticator auth = new YaOAuth2Authenticator(
clientId: "d9be5e97-c19d-42e4-b444-0e65863b19e1",
clientSecret: "blouh",
scope: "profile",
authorizeUrl: new Uri("http://dev.pschneider.fr/authorize"),
redirectUrl: new Uri("http://dev.pschneider.fr/oauth/success"),
accessTokenUrl: new Uri("http://dev.pschneider.fr/token"));
auth.AllowCancel = false;
public void AddAccount()
{
Intent loginIntent = auth.GetUI(this);
var accStore = AccountStore.Create(this);
auth.Completed += (sender, eventArgs) =>
@ -260,7 +273,7 @@ namespace BookAStar.Droid
private void Auth_Error(object sender, AuthenticatorErrorEventArgs e)
{
throw new NotImplementedException("Auth_Error");
// TODO handle
}
public class GCMDeclaration : IGCMDeclaration
@ -294,6 +307,7 @@ namespace BookAStar.Droid
};
}
[Obsolete("Use RemoteEntity to manage entities from API")]
public TAnswer InvokeApi<TAnswer>(string method, object arg)
{
using (var m =
@ -317,6 +331,35 @@ namespace BookAStar.Droid
return m.InvokeJson(arg);
}
}
public Xamarin.Forms.View CreateMarkdownView(string markdown, Action<string> update)
{
var view = new Android.Webkit.WebView(Forms.Context);
var viewclient = new MarkdownWebViewClient(update);
view.SetWebViewClient(viewclient);
var mde = new MarkdownEditor();
if (markdown!=null)
{
var md = new MarkdownDeep.Markdown();
mde.Model = md.Transform(markdown);
}
var html = mde.GenerateString();
view.Settings.BuiltInZoomControls = true;
view.Settings.JavaScriptEnabled = true;
view.Settings.LoadsImagesAutomatically = true;
view.Settings.SetAppCacheEnabled(true);
view.Settings.AllowContentAccess = true;
view.Settings.AllowFileAccess = true;
view.Settings.AllowFileAccessFromFileURLs = true;
view.Settings.AllowUniversalAccessFromFileURLs = true;
view.Settings.BlockNetworkImage = false;
view.Settings.BlockNetworkLoads = false;
view.LoadDataWithBaseURL("file:///android_asset/",
html, "text/html", "utf-8",null);
return view.ToView();
}
}
}

View File

@ -0,0 +1,360 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// Ce code a été généré par un outil.
// Version du runtime :4.0.30319.42000
//
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// le code est régénéré.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BookAStar.Droid
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorTemplatePreprocessor", "4.1.2.18")]
public partial class MarkdownEditor : MarkdownEditorBase
{
#line hidden
#line 1 "MarkdownEditor.cshtml"
public string Model { get; set; }
#line default
#line hidden
public override void Execute()
{
WriteLiteral("<!DOCTYPE html>\r\n<html>\r\n<head>\r\n \r\n <meta");
WriteLiteral(" charset=\"utf-8\"");
WriteLiteral(">\r\n\r\n <link");
WriteLiteral(" rel=\"stylesheet\"");
WriteLiteral(" href=\"quill.snow.css\"");
WriteLiteral(@" />
<style>
.standalone-container {
margin: 0;
width: 100%;
}
#bubble-container {
height: 100%;
}
#bubble-container div.ql-editor {
margin-top:3em;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<div");
WriteLiteral(" class=\"standalone-container\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"bubble-container\"");
WriteLiteral(">");
#line 33 "MarkdownEditor.cshtml"
Write(Html.Write(Model));
#line default
#line hidden
WriteLiteral("</div>\r\n </div>\r\n <form><input");
WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"md\"");
WriteLiteral(" id=\"md\"");
WriteLiteral(" />\r\n <input");
WriteLiteral(" id=\"btnSubmit\"");
WriteLiteral(" type=\"button\"");
WriteLiteral(" value=\"Valider\"");
WriteLiteral(" class=\"hidden\"");
WriteLiteral(" /></form>\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(" src=\"quill.min.js\"");
WriteLiteral("></script>\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(" src=\"jquery.js\"");
WriteLiteral("></script>\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(" src=\"showdown.js\"");
WriteLiteral("></script>\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(" src=\"to-markdown.js\"");
WriteLiteral("></script>\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(" src=\"md-helpers.js\"");
WriteLiteral("></script>\r\n\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
var toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block'],
[{ 'header': 1 }, { 'header': 2 }], // custom button values
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
[{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent
['clean'] // remove formatting button
];
var quill = new Quill('#bubble-container', {
modules: {
toolbar: toolbarOptions
},
placeholder: 'Composez votre texte ...',
theme: 'snow'
});
function getMD() {
return markdownize($('#bubble-container div.ql-editor').html())
}
quill.on('text-change', function (delta, oldDelta, source)
{
if (source === ""user"") {
$('#md').val(getMD());
$('#btnSubmit').removeClass('hidden');
}
});
$(document).ready(function () {
$('#btnSubmit').on('click', function () {
$.get(""file:validate?md="" + encodeURIComponent(getMD()),
function (data, stat, jqXHR) { $('#result').html(""Okay"") })
})
});
</script>
</body>
</html>
");
}
}
// NOTE: this is the default generated helper class. You may choose to extract it to a separate file
// in order to customize it or share it between multiple templates, and specify the template's base
// class via the @inherits directive.
public abstract class MarkdownEditorBase
{
// This field is OPTIONAL, but used by the default implementation of Generate, Write, WriteAttribute and WriteLiteral
//
System.IO.TextWriter __razor_writer;
// This method is OPTIONAL
//
/// <summary>Executes the template and returns the output as a string.</summary>
/// <returns>The template output.</returns>
public string GenerateString ()
{
using (var sw = new System.IO.StringWriter ()) {
Generate (sw);
return sw.ToString ();
}
}
// This method is OPTIONAL, you may choose to implement Write and WriteLiteral without use of __razor_writer
// and provide another means of invoking Execute.
//
/// <summary>Executes the template, writing to the provided text writer.</summary>
/// <param name="writer">The TextWriter to which to write the template output.</param>
public void Generate (System.IO.TextWriter writer)
{
__razor_writer = writer;
Execute ();
__razor_writer = null;
}
// This method is REQUIRED, but you may choose to implement it differently
//
/// <summary>Writes a literal value to the template output without HTML escaping it.</summary>
/// <param name="value">The literal value.</param>
protected void WriteLiteral (string value)
{
__razor_writer.Write (value);
}
// This method is REQUIRED if the template contains any Razor helpers, but you may choose to implement it differently
//
/// <summary>Writes a literal value to the TextWriter without HTML escaping it.</summary>
/// <param name="writer">The TextWriter to which to write the literal.</param>
/// <param name="value">The literal value.</param>
protected static void WriteLiteralTo (System.IO.TextWriter writer, string value)
{
writer.Write (value);
}
// This method is REQUIRED, but you may choose to implement it differently
//
/// <summary>Writes a value to the template output, HTML escaping it if necessary.</summary>
/// <param name="value">The value.</param>
/// <remarks>The value may be a Action<System.IO.TextWriter>, as returned by Razor helpers.</remarks>
protected void Write (object value)
{
WriteTo (__razor_writer, value);
}
// This method is REQUIRED if the template contains any Razor helpers, but you may choose to implement it differently
//
/// <summary>Writes an object value to the TextWriter, HTML escaping it if necessary.</summary>
/// <param name="writer">The TextWriter to which to write the value.</param>
/// <param name="value">The value.</param>
/// <remarks>The value may be a Action<System.IO.TextWriter>, as returned by Razor helpers.</remarks>
protected static void WriteTo (System.IO.TextWriter writer, object value)
{
if (value == null)
return;
var write = value as Action<System.IO.TextWriter>;
if (write != null) {
write (writer);
return;
}
//NOTE: a more sophisticated implementation would write safe and pre-escaped values directly to the
//instead of double-escaping. See System.Web.IHtmlString in ASP.NET 4.0 for an example of this.
writer.Write(System.Net.WebUtility.HtmlEncode (value.ToString ()));
}
// This method is REQUIRED, but you may choose to implement it differently
//
/// <summary>
/// Conditionally writes an attribute to the template output.
/// </summary>
/// <param name="name">The name of the attribute.</param>
/// <param name="prefix">The prefix of the attribute.</param>
/// <param name="suffix">The suffix of the attribute.</param>
/// <param name="values">Attribute values, each specifying a prefix, value and whether it's a literal.</param>
protected void WriteAttribute (string name, string prefix, string suffix, params Tuple<string,object,bool>[] values)
{
WriteAttributeTo (__razor_writer, name, prefix, suffix, values);
}
// This method is REQUIRED if the template contains any Razor helpers, but you may choose to implement it differently
//
/// <summary>
/// Conditionally writes an attribute to a TextWriter.
/// </summary>
/// <param name="writer">The TextWriter to which to write the attribute.</param>
/// <param name="name">The name of the attribute.</param>
/// <param name="prefix">The prefix of the attribute.</param>
/// <param name="suffix">The suffix of the attribute.</param>
/// <param name="values">Attribute values, each specifying a prefix, value and whether it's a literal.</param>
///<remarks>Used by Razor helpers to write attributes.</remarks>
protected static void WriteAttributeTo (System.IO.TextWriter writer, string name, string prefix, string suffix, params Tuple<string,object,bool>[] values)
{
// this is based on System.Web.WebPages.WebPageExecutingBase
// Copyright (c) Microsoft Open Technologies, Inc.
// Licensed under the Apache License, Version 2.0
if (values.Length == 0) {
// Explicitly empty attribute, so write the prefix and suffix
writer.Write (prefix);
writer.Write (suffix);
return;
}
bool first = true;
bool wroteSomething = false;
for (int i = 0; i < values.Length; i++) {
Tuple<string,object,bool> attrVal = values [i];
string attPrefix = attrVal.Item1;
object value = attrVal.Item2;
bool isLiteral = attrVal.Item3;
if (value == null) {
// Nothing to write
continue;
}
// The special cases here are that the value we're writing might already be a string, or that the
// value might be a bool. If the value is the bool 'true' we want to write the attribute name instead
// of the string 'true'. If the value is the bool 'false' we don't want to write anything.
//
// Otherwise the value is another object (perhaps an IHtmlString), and we'll ask it to format itself.
string stringValue;
bool? boolValue = value as bool?;
if (boolValue == true) {
stringValue = name;
} else if (boolValue == false) {
continue;
} else {
stringValue = value as string;
}
if (first) {
writer.Write (prefix);
first = false;
} else {
writer.Write (attPrefix);
}
if (isLiteral) {
writer.Write (stringValue ?? value);
} else {
WriteTo (writer, stringValue ?? value);
}
wroteSomething = true;
}
if (wroteSomething) {
writer.Write (suffix);
}
}
// This method is REQUIRED. The generated Razor subclass will override it with the generated code.
//
///<summary>Executes the template, writing output to the Write and WriteLiteral methods.</summary>.
///<remarks>Not intended to be called directly. Call the Generate method instead.</remarks>
public abstract void Execute ();
}
}
#pragma warning restore 1591

View File

@ -0,0 +1,82 @@
@model string
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="quill.snow.css" />
<style>
.standalone-container {
margin: 0;
width: 100%;
}
#bubble-container {
height: 100%;
}
#bubble-container div.ql-editor {
margin-top:3em;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<div class="standalone-container">
<div id="bubble-container">@Html.Write(Model)</div>
</div>
<form><input type="hidden" name="md" id="md" />
<input id="btnSubmit" type="button" value="Valider" class="hidden" /></form>
<script type="text/javascript" src="quill.min.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="showdown.js"></script>
<script type="text/javascript" src="to-markdown.js"></script>
<script type="text/javascript" src="md-helpers.js"></script>
<script type="text/javascript">
var toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block'],
[{ 'header': 1 }, { 'header': 2 }], // custom button values
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
[{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent
['clean'] // remove formatting button
];
var quill = new Quill('#bubble-container', {
modules: {
toolbar: toolbarOptions
},
placeholder: 'Composez votre texte ...',
theme: 'snow'
});
function getMD() {
return markdownize($('#bubble-container div.ql-editor').html())
}
quill.on('text-change', function (delta, oldDelta, source)
{
if (source === "user") {
$('#md').val(getMD());
$('#btnSubmit').removeClass('hidden');
}
});
$(document).ready(function () {
$('#btnSubmit').on('click', function () {
$.get("file:validate?md=" + encodeURIComponent(getMD()),
function (data, stat, jqXHR) { $('#result').html("Okay") })
})
});
</script>
</body>
</html>

View File

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Webkit;
using Java.Lang;
using Java.IO;
using Android.Content.Res;
namespace BookAStar.Droid
{
class MarkdownWebViewClient : WebViewClient
{
Action<string> update;
public MarkdownWebViewClient(Action<string> update) : base()
{
this.update = update;
}
private static Activity getActivity ()
{
return (Activity)App.PlateformSpecificInstance;
}
public string Markdown { get; private set; }
public override WebResourceResponse ShouldInterceptRequest(WebView view, IWebResourceRequest request)
{
if (request.Url.Scheme=="file")
{
if (request.Url.Path=="/android_asset/validate")
{
Markdown = request.Url.GetQueryParameter("md");
update(Markdown);
return new WebResourceResponse("application/json", "utf-8" ,200, "Ok", null, null);
}
}
return base.ShouldInterceptRequest(view, request);
}
}
}

View File

@ -71,6 +71,7 @@ public class YaOAuth2Authenticator : WebRedirectAuthenticator
{
get { return this.redirectUrl; }
}
/// <summary>
/// Initializes a new <see cref="Xamarin.Auth.OAuth2Authenticator"/>
/// that authenticates using implicit granting (token).

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="fr.pschneider.bas" android:installLocation="auto">
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="23" />
<uses-sdk android:minSdkVersion="15" />
<application android:label="BookAStar" android:icon="@drawable/icon" android:theme="@style/MainTheme">
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBLSEDhZixwpHDsWmO2pKwgGDJReoTuQ7A" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

View File

@ -3310,9 +3310,6 @@ namespace BookAStar.Droid
// aapt resource value: 0x7f06004b
public const int Description = 2131099723;
// aapt resource value: 0x7f060052
public const int GoogleSenderId = 2131099730;
// aapt resource value: 0x7f06004d
public const int Location = 2131099725;

View File

@ -13,5 +13,4 @@
<string name="url">url</string>
<string name="url_hint">url_hint</string>
<string name="picture">picture</string>
<string name="GoogleSenderId">AA325408689282</string>
</resources>

View File

@ -1,14 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace BookAStar.Droid.Services
{
@ -16,37 +6,114 @@ namespace BookAStar.Droid.Services
using Android.Content;
using Android.OS;
using Android.Gms.Gcm;
using Android.Util;
using Model.Social;
using Newtonsoft.Json;
using Model;
namespace ClientApp
{
[Service(Exported = false), IntentFilter(new[] { "com.google.android.c2dm.intent.RECEIVE" })]
public class MyGcmListenerService : GcmListenerService
{
public override void OnMessageReceived(string from, Bundle data)
private Notification.Builder notificationBuilder;
NotificationManager notificationManager;
public override void OnCreate()
{
var message = data.GetString("message");
Log.Debug("MyGcmListenerService", "From: " + from);
Log.Debug("MyGcmListenerService", "Message: " + message);
SendNotification(message);
base.OnCreate();
notificationBuilder = new Notification.Builder(this)
.SetSmallIcon(Resource.Drawable.icon)
.SetAutoCancel(true);
notificationManager = (NotificationManager)GetSystemService(Context.NotificationService);
}
void SendNotification(string message)
public override void OnDestroy()
{
base.OnDestroy();
notificationManager.Dispose();
notificationManager = null;
notificationBuilder.Dispose();
notificationBuilder = null;
}
public override void OnMessageReceived(string from, Bundle data)
{
var topic = data.GetString("Topic");
if (topic == "BookQuery")
{
DateTime eventdate,enddate;
var sdatestr = data.GetString("EventDate");
DateTime.TryParse(sdatestr, out eventdate);
var locationJson = data.GetString("Location");
var location = JsonConvert.DeserializeObject<Location>(locationJson);
var cid = long.Parse(data.GetString("Id"));
var bq = new BookQueryData
{
Id = cid,
Location = location
};
SendBookQueryNotification(bq);
}
else
{
throw new NotImplementedException(topic);
}
}
void SendNotification(string title, string message)
{
var intent = new Intent(this, typeof(MainActivity));
intent.AddFlags(ActivityFlags.ClearTop);
var pendingIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.OneShot);
var notificationBuilder = new Notification.Builder(this)
.SetSmallIcon(Resource.Drawable.icon)
.SetContentTitle("GCM Message")
.SetContentTitle(title)
.SetContentText(message)
.SetAutoCancel(true)
.SetContentIntent(pendingIntent);
var notificationManager = (NotificationManager)GetSystemService(Context.NotificationService);
notificationManager.Notify(0, notificationBuilder.Build());
}
void SendBookQueryNotification(BookQueryData bquery)
{
var bookquerynotifications = MainSettings.AddBookQueryNotification(bquery);
var count = bookquerynotifications.Length;
var multiple = count > 1;
var title =
multiple ? $"{count} demandes" : bquery.Client.UserName;
var message = $"{bquery.EventDate} {bquery.Client.UserName} {bquery.Location.Address}";
var intent = new Intent(this, typeof(MainActivity));
intent.AddFlags(ActivityFlags.ClearTop);
intent.PutExtra("BookQueryId", bquery.Id);
var pendingIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.OneShot);
Notification.InboxStyle inboxStyle = new Notification.InboxStyle();
int maxil = 5;
for (int cn = 0; cn < count && cn < maxil; cn++)
{
inboxStyle.AddLine(bookquerynotifications[cn].Client.UserName);
}
if (count > maxil)
inboxStyle.SetSummaryText($"Plus {count - maxil} autres");
else inboxStyle.SetSummaryText((string)null);
notificationBuilder.SetContentTitle(title).SetContentText(message)
.SetStyle(inboxStyle)
.SetContentIntent(pendingIntent);
var notification = notificationBuilder.Build();
notificationManager.Notify(bookQueryNotificationId, notification );
}
int bookQueryNotificationId=1;
}
}
}

View File

@ -1,30 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Drawing" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
<assemblyIdentity name="System.Drawing" publicKeyToken="B03F5F7F11D50A3A" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SqlXml" publicKeyToken="B77A5C561934E089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
<assemblyIdentity name="System.Data.SqlXml" publicKeyToken="B77A5C561934E089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Configuration" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
<assemblyIdentity name="System.Configuration" publicKeyToken="B03F5F7F11D50A3A" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
<assemblyIdentity name="System.Security" publicKeyToken="B03F5F7F11D50A3A" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml" publicKeyToken="B77A5C561934E089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
<assemblyIdentity name="System.Xml" publicKeyToken="B77A5C561934E089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Drawing" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

View File

@ -34,10 +34,6 @@
<Setter Property="WidthRequest" Value="200" />
<Setter Property="TextColor" Value="Teal" />
</Style>
<Style TargetType="Label">
<Setter Property="FontSize" Value="Large" />
<Setter Property="FontAttributes" Value="Bold" />
</Style>
</ResourceDictionary>
</Application.Resources>

View File

@ -1,4 +1,6 @@
using BookAStar.Model.Auth.Account;
using BookAStar.Model;
using BookAStar.Model.Auth.Account;
using BookAStar.Pages;
using System;
using System.Diagnostics;
using System.Net;
@ -8,7 +10,6 @@ using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using Yavsc.Helpers;
/*
Glyphish icons from
http://www.glyphish.com/
@ -26,21 +27,32 @@ namespace BookAStar
SettingsPage settingsPage;
PinPage pinPage;
ContentPage deviceInfoPage;
BookQueryPage bookQueryPage;
BookQueriesPage bookQueriesPage;
public static IPlatform PlateformSpecificInstance { get; set; }
public static string AppName { get; set; }
public static App CurrentApp { get { return Current as App; } }
public App (IPlatform instance)
{
public DataManager DataManager { get; set; }
public App(IPlatform instance)
{
DataManager = new DataManager();
deviceInfoPage = new DeviceInfoPage(instance.GetDeviceInfo());
bookQueriesPage = new BookQueriesPage();
PlateformSpecificInstance = instance;
searchPage = new SearchPage { Title = "Trouvez votre artiste"
, Icon = "glyphish_07_map_marker.png"
};
mp = new NavigationPage (searchPage);
settingsPage = new SettingsPage { Title = "Settings"
, Icon = "ic_corp_icon.png"
};
searchPage = new SearchPage
{
Title = "Trouvez votre artiste",
Icon = "glyphish_07_map_marker.png"
};
mp = new NavigationPage(searchPage);
settingsPage = new SettingsPage
{
Title = "Settings",
Icon = "ic_corp_icon.png"
};
var r = this.Resources;
//var hasLabelStyle = r.ContainsKey("labelStyle");
@ -49,25 +61,47 @@ namespace BookAStar
// null var appsstyle = settingsPage.Style;
// appsstyle.CanCascade = true;
MainPage = mp;
ToolbarItem tiSetts = new ToolbarItem () { Text = "Settings"
, Icon = "ic_corp_icon.png"
ToolbarItem tiSetts = new ToolbarItem()
{
Text = "Settings",
Icon = "ic_corp_icon.png"
};
mp.ToolbarItems.Add (tiSetts);
tiSetts.Clicked += (object sender, EventArgs e) => {
if (settingsPage.Parent==null)
mp.Navigation.PushAsync(settingsPage);
else {
mp.ToolbarItems.Add(tiSetts);
tiSetts.Clicked += (object sender, EventArgs e) =>
{
if (settingsPage.Parent == null)
mp.Navigation.PushAsync(settingsPage);
else
{
settingsPage.Focus();
}
};
ToolbarItem tiMap = new ToolbarItem { Text = "Carte",
Icon = "glyphish_07_map_marker.png"
};
mp.ToolbarItems.Add (tiMap);
pinPage = new PinPage { Title = "Carte",
Icon = "glyphish_07_map_marker.png"
};
tiMap.Clicked += (object sender, EventArgs e) => {
};
ToolbarItem tiQueries = new ToolbarItem
{
Text = "Demandes"
};
tiQueries.Clicked += (object sender, EventArgs e) =>
{
if (bookQueriesPage.Parent == null)
mp.Navigation.PushAsync(bookQueriesPage);
else bookQueriesPage.Focus();
};
mp.ToolbarItems.Add(tiQueries);
ToolbarItem tiMap = new ToolbarItem
{
Text = "Carte",
Icon = "glyphish_07_map_marker.png"
};
mp.ToolbarItems.Add(tiMap);
pinPage = new PinPage
{
Title = "Carte",
Icon = "glyphish_07_map_marker.png"
};
tiMap.Clicked += (object sender, EventArgs e) =>
{
if (pinPage.Parent == null)
mp.Navigation.PushAsync(pinPage);
else pinPage.Focus();
@ -86,10 +120,20 @@ namespace BookAStar
public void PostDeviceInfo()
{
var res = PlateformSpecificInstance.InvokeApi(
"gcm/register",
"gcm/register",
PlateformSpecificInstance.GetDeviceInfo());
}
public void ShowBookQuery(BookQueryData data)
{
bookQueriesPage.BindingContext = data;
mp.Navigation.PushAsync(bookQueriesPage);
}
public void CloseWindow()
{
mp.Navigation.PopAsync();
}
}
}

View File

@ -38,18 +38,30 @@
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="DeviceInfoPage.cs" />
<Compile Include="EventDetail.xaml.cs">
<Compile Include="DataManager.cs" />
<Compile Include="Helpers\RemoteEntityRO.cs" />
<Compile Include="Pages\BlogPage.cs" />
<Compile Include="Pages\BookQueriesPage.xaml.cs">
<DependentUpon>BookQueriesPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\BookQueryPage.xaml.cs">
<DependentUpon>BookQueryPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\DeviceInfoPage.cs" />
<Compile Include="Pages\EventDetail.xaml.cs">
<DependentUpon>EventDetail.xaml</DependentUpon>
</Compile>
<Compile Include="Helpers\MainSettings.cs" />
<Compile Include="IdentificationChangedEventArgs.cs" />
<Compile Include="Helpers\RemoteEntity.cs" />
<Compile Include="IPlatform.cs" />
<Compile Include="MainPage.xaml.cs">
<Compile Include="Pages\MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Model\Blog\Blog.cs" />
<Compile Include="Model\Blog\BlogTag.cs" />
<Compile Include="Model\BookQueryData.cs" />
<Compile Include="Model\Market\BaseProduct.cs" />
<Compile Include="Model\Workflow\CommandLine.cs" />
<Compile Include="Model\Manager.cs" />
<Compile Include="Model\Auth\MobileAppDeclaration.cs" />
<Compile Include="Model\Auth\passwrecovery.cs" />
@ -83,18 +95,29 @@
<Compile Include="Model\Social\Messaging\YaEvent.cs" />
<Compile Include="Model\Auth\Tokens.cs" />
<Compile Include="Model\Auth\User.cs" />
<Compile Include="PinPage.cs" />
<Compile Include="Model\Workflow\Estimate.cs" />
<Compile Include="Pages\MakeAnEstimatePage.xaml.cs">
<DependentUpon>MakeAnEstimatePage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\MarkdownEditorPage.xaml.cs">
<DependentUpon>MarkdownEditorPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\PinPage.cs" />
<Compile Include="Views\MarkdownView.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SearchPage.xaml.cs">
<Compile Include="Pages\QueriesPage.xaml.cs">
<DependentUpon>QueriesPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\SearchPage.xaml.cs">
<DependentUpon>SearchPage.xaml</DependentUpon>
</Compile>
<Compile Include="SettingsPage.xaml.cs">
<Compile Include="Pages\SettingsPage.xaml.cs">
<DependentUpon>SettingsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Model\Tag.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MainPage.xaml">
<EmbeddedResource Include="Pages\MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
@ -109,26 +132,29 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="EventDetail.xaml">
<EmbeddedResource Include="Pages\EventDetail.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SearchPage.xaml">
<EmbeddedResource Include="Pages\SearchPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettingsPage.xaml">
<EmbeddedResource Include="Pages\SettingsPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Folder Include="Model\Workflow\" />
<Folder Include="Model\Billing\" />
</ItemGroup>
<ItemGroup>
<Reference Include="Json.NET.Web">
<HintPath>..\..\packages\Json.NET.Web.1.0.49\lib\portable45-net45+win8+wpa81\Json.NET.Web.dll</HintPath>
</Reference>
<Reference Include="MarkdownDeep">
<HintPath>..\..\packages\MarkdownDeep-av.NET.1.5.2\lib\net451\MarkdownDeep.dll</HintPath>
</Reference>
<Reference Include="Mono.Android">
<HintPath>..\..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\Mono.Android.dll</HintPath>
</Reference>
@ -160,12 +186,42 @@
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\BookQueryPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Yavsc.Client\Yavsc.Client.csproj">
<Project>{67F9D3A8-F71E-4428-913F-C37AE82CDB24}</Project>
<Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>
<Name>Yavsc.Client</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\QueriesPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\MarkdownEditorPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\MakeAnEstimatePage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\BookQueriesPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="..\..\packages\Xamarin.Forms.2.3.0.107\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.0.107\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BookAStar
{
using Model;
using Model.Blog;
using Model.Workflow;
public class DataManager
{
// TODO userinfo estimatetemplate rating service product tag
public RemoteEntity<BookQueryData, long> BookQueries { get; set; }
public RemoteEntity<Estimate, long> Estimates { get; set; }
public RemoteEntity<Blog, long> Blogspot { get; set; }
public static DataManager Current
{
get
{
return App.CurrentApp.DataManager;
}
}
public DataManager()
{
BookQueries = new RemoteEntity<BookQueryData, long>("bookquery",
q => q.Id);
Estimates = new RemoteEntity<Estimate, long>("estimate",
x => x.Id);
Blogspot = new RemoteEntity<Blog, long>("blog",
x=>x.Id);
}
public async Task<BookQueryData> GetBookQuery(long bookQueryId)
{
return await BookQueries.Get(bookQueryId);
}
}
}

View File

@ -1,34 +0,0 @@
using System;
using System.Collections.Generic;
using Xamarin.Forms;
using BookAStar;
using System.Collections.ObjectModel;
using BookAStar.Model.Workflow.Messaging;
namespace BookAStar
{
public partial class EventDetail : ContentPage
{
public ObservableCollection<YaEvent> Events
{ get; private set; }
public EventDetail (YaEvent ev)
{
InitializeComponent();
BindingContext = ev;
btn_webpage.Clicked += (object sender, EventArgs e) => {
App.PlateformSpecificInstance.OpenWeb(ev.EventWebPage);
};
}
///protected override void OnDisappearing ()
// { Navigation.PopAsync (); }
//private async void Close() {
//await Navigation.PopAsync ();
//}
}
}

View File

@ -1,4 +1,5 @@
// Helpers/Settings.cs
using BookAStar.Model;
using BookAStar.Model.Auth.Account;
using Newtonsoft.Json;
using Plugin.Settings;
@ -58,7 +59,6 @@ namespace BookAStar
};
private static readonly Dictionary<string, double> environ = new Dictionary<string, double>();
public static readonly string YavscApiUrl = "http://dev.pschneider.fr/api";
#endregion
@ -68,6 +68,25 @@ namespace BookAStar
return AppSettings.GetValueOrDefault<string>(userNameKey, null);
}
}
public const string bookQueryNotificationsKey = "BookQueryNotifications";
public static BookQueryData[] GetBookQueryNotifications()
{
// Do not return any null List
var json = AppSettings.GetValueOrDefault<string>(bookQueryNotificationsKey);
if (!string.IsNullOrWhiteSpace(json))
return JsonConvert.DeserializeObject<BookQueryData[]>(json);
return new BookQueryData[] {};
}
public static BookQueryData[] AddBookQueryNotification(BookQueryData query)
{
var existing = new List<BookQueryData>(GetBookQueryNotifications());
existing.Add(query);
var result = existing.ToArray();
AppSettings.AddOrUpdateValue(bookQueryNotificationsKey,
JsonConvert.SerializeObject(result));
return result;
}
public static string GoogleRegId
{
@ -185,10 +204,11 @@ namespace BookAStar
return environ;
}
}
public const string MobileRegistrationUrl = "http://dev.pschneider.fr/api/gcm/register";
public const string YavscHomeUrl = "http://dev.pschneider.fr";
public static readonly string YavscApiUrl = "http://dev.pschneider.fr/api";
public static readonly string MobileRegistrationUrl = YavscApiUrl + "/gcm/register";
public static readonly string UserInfoUrl = YavscApiUrl + "/me";
public static readonly string BlogUrl = YavscApiUrl + "/blogs";
public const string ApplicationName = "BookAStar";
public static readonly string UserInfoUrl = "http://dev.pschneider.fr/api/me";
}
}

View File

@ -0,0 +1,113 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows.Input;
using System.Linq;
using System.Net.Http;
using Newtonsoft.Json;
using System.Threading.Tasks;
namespace BookAStar
{
public class RemoteEntity<V,K> : ObservableCollection<V>, ICommand where K : IEquatable<K>
{
private string _controller;
public event EventHandler CanExecuteChanged;
public bool IsExecuting { get; private set; }
private HttpClient client;
private Uri controllerUri;
protected Func<V, K> GetKey { get; set; }
public bool CanExecute(object parameter)
{
return !IsExecuting;
}
public RemoteEntity(string controllerName, Func<V,K> getKey):base()
{
if (string.IsNullOrWhiteSpace(controllerName) || getKey == null)
throw new InvalidOperationException();
_controller = controllerName;
GetKey = getKey;
client = new HttpClient();
controllerUri = new Uri(MainSettings.YavscApiUrl + "/" + _controller);
}
private void BeforeExecute()
{
if (IsExecuting)
throw new InvalidOperationException("Already executing");
IsExecuting = true;
if (CanExecuteChanged != null)
CanExecuteChanged.Invoke(this, new EventArgs());
}
/// <summary>
/// Refresh the collection
/// </summary>
/// <param name="parameter"></param>
public async void Execute(object parameter)
{
BeforeExecute();
// Update credentials
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(
"Bearer", MainSettings.CurrentUser.YavscTokens.AccessToken);
// Get the whole data
var response = await client.GetAsync(controllerUri);
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
List<V> col = JsonConvert.DeserializeObject<List<V>>(content);
// LocalData.Clear();
foreach (var item in col)
{
UpdateOrAdd(item);
}
}
AfterExecuting();
}
protected virtual void UpdateOrAdd (V item)
{
var key = GetKey(item);
if (this.Any(x => GetKey(x).Equals(key)))
{
Remove(LocalGet(key));
}
Add(item);
}
public V LocalGet(K key)
{
return this.Single(x => GetKey(x).Equals(key));
}
private void AfterExecuting()
{
IsExecuting = false;
if (CanExecuteChanged != null)
CanExecuteChanged.Invoke(this, new EventArgs());
}
public async Task<V> Get(K key)
{
V item = default(V);
BeforeExecute();
// Get the whole data
var uri = new Uri(controllerUri.AbsolutePath+"/"+key.ToString());
var response = await client.GetAsync(uri);
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
item = JsonConvert.DeserializeObject<V>(content);
// LocalData.Clear();
UpdateOrAdd(item);
}
AfterExecuting();
return item;
}
}
}

View File

@ -0,0 +1,24 @@
using BookAStar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BookAStar.Helpers
{
class RemoteEntityRO<V,K>: RemoteEntity<V,K> where K: IEquatable<K>
{
public RemoteEntityRO (string controllerName,
Func<V,K> getKey) : base(controllerName,getKey)
{
}
protected override void UpdateOrAdd(V item)
{
var key = GetKey(item);
if (this.Any(x => GetKey(x).Equals(key))) { return; }
Add(item);
}
}
}

View File

@ -1,4 +1,6 @@
using BookAStar.Model.Auth.Account;
using System;
using Xamarin.Forms;
using Yavsc.Models.Identity;
namespace BookAStar
@ -22,6 +24,8 @@ namespace BookAStar
TAnswer InvokeApi<TAnswer>(string method, object arg);
object InvokeApi(string method, object arg);
View CreateMarkdownView(string markdown, Action<string> update);
}
}

View File

@ -1,14 +0,0 @@
using BookAStar.Model.Auth.Account;
using System;
namespace BookAStar
{
public class IdentificationChangedEventArgs : EventArgs
{
public User NewIdentification { get; private set; }
public IdentificationChangedEventArgs(User newId)
{
NewIdentification = newId;
}
}
}

View File

@ -5,7 +5,7 @@ using Yavsc.Models.Identity;
namespace BookAStar.Model.Auth.Account
{
public class GoogleCloudMobileDeclaration : IGoogleCloudMobileDeclaration
public class GoogleCloudMobileDeclaration
{
public string GCMRegistrationId { get; set; }
public string DeviceId { get; set; }

View File

@ -0,0 +1,20 @@
using BookAStar.Model.Social;
using System;
namespace BookAStar.Model
{
public class ClientProviderInfo
{
public string UserName { get; set; }
public string UserId { get; set; }
public int Rate { get; set; }
}
public class BookQueryData
{
public ClientProviderInfo Client { get; set; }
public Location Location { get; set; }
public long Id { get; set; }
public DateTime EventDate { get; set; }
public decimal? Previsionnal { get; set; }
}
}

View File

@ -1,24 +1,30 @@
using BookAStar.Model.Social;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows.Input;
namespace BookAStar
{
public static class Manager
{
static Manager ()
{
}
public static ICommand RefreshBookQueries;
// TODO WIP TEST rop this
private static Location[] _places = new Location[] {
new Location(48.8626458, 2.2065559, "2 bd Aristide Briand - Suresnes" ),
new Location(48.8632757, 2.2023099, "Théatre Jean Villard - Suresnes" ),
new Location(48.8647120, 2.2054588, "Place de la Paix - Suresnes" ),
new Location(48.8640133, 2.2056573, "Restaurant" ),
new Location(48.8634839, 2.2064137, "Square" ),
new Location(48.8653649, 2.2014945, "Stade de foot" ),
private static Location[] _places = new Location[] {
new Location { Latitude = 48.8626458, Longitude = 2.2065559, Address = "2 bd Aristide Briand - Suresnes" },
new Location{ Latitude =48.8632757, Longitude =2.2023099, Address ="Théatre Jean Villard - Suresnes" },
new Location{ Latitude =48.8647120, Longitude =2.2054588,Address = "Place de la Paix - Suresnes" },
new Location{ Latitude =48.8640133, Longitude =2.2056573, Address ="Restaurant" },
new Location{ Latitude =48.8634839, Longitude =2.2064137,Address = "Square" },
new Location{ Latitude =48.8653649, Longitude =2.2014945,Address = "Stade de foot" },
};
// TODO WIP TEST rop this
private static ObservableCollection<LocalizedEvent> _your_events = new ObservableCollection<LocalizedEvent> {

View File

@ -0,0 +1,26 @@

namespace BookAStar.Model.Workflow
{
public partial class BaseProduct
{
/// <summary>
/// An unique product identifier.
/// </summary>
/// <returns></returns>
public long Id { get; set; }
public string Name { get; set; }
/// <summary>
/// A contractual description for this product.
/// </summary>
/// <returns></returns>
public string Description { get; set; }
/// <summary>
/// Controls wether this product or service
/// may be offered to clients, or simply
/// are internal workflow entry point.
/// </summary>
/// <returns>true when this product belongs to the public catalog.</returns>
public bool Public { get; set; }
}
}

View File

@ -1,5 +1,7 @@
using System;
using Android.Runtime;
using BookAStar.Model.Workflow.Messaging;
namespace BookAStar.Model.Social
@ -24,16 +26,11 @@ namespace BookAStar.Model.Social
}
public class Location : Position {
public long Id { get; set; }
public string Address { get; set; }
public Location(double latitude, double longitude, string address)
{
this.Latitude = latitude;
this.Longitude = longitude;
this.Address = address;
}
}

View File

@ -0,0 +1,13 @@

namespace BookAStar.Model.Workflow
{
public class CommandLine
{
public long Id { get; set; }
public string Comment { get; set; }
public BaseProduct Article { get; set; }
public int Count { get; set; }
public decimal UnitaryCost { get; set; }
}
}

View File

@ -0,0 +1,47 @@
using System.Collections.Generic;
using System.Linq;
namespace BookAStar.Model.Workflow
{
public partial class Estimate
{
public long Id { get; set; }
public long? CommandId { get; set; }
public string Description { get; set; }
public int? Status { get; set; }
public string Title { get; set; }
public List<CommandLine> Bill { get; set; }
/// <summary>
/// List of attached graphic files
/// to this estimate, as relative pathes to
/// the command performer's root path.
/// In db, they are separated by <c>:</c>
/// </summary>
/// <returns></returns>
public List<string> AttachedGraphicList { get; private set; }
public string AttachedGraphicsString
{
get { return string.Join(":", AttachedGraphicList); }
set { AttachedGraphicList = value.Split(':').ToList(); }
}
/// <summary>
/// List of attached files
/// to this estimate, as relative pathes to
/// the command performer's root path.
/// In db, they are separated by <c>:</c>
/// </summary>
/// <returns></returns>
public List<string> AttachedFiles { get; set; }
public string AttachedFilesString
{
get { return string.Join(":", AttachedFiles); }
set { AttachedFiles = value.Split(':').ToList(); }
}
public string OwnerId { get; set; }
public string ClientId { get; set; }
}
}

View File

@ -0,0 +1,49 @@
using BookAStar.Model.Blog;
using Xamarin.Forms;
namespace BookAStar.Pages
{
public class BlogPage : ContentPage
{
HtmlWebViewSource _source;
HtmlWebViewSource _sourceTitle;
MarkdownDeep.Markdown _md;
WebView titleLabel;
WebView contentView;
public BlogPage()
{
_source = new HtmlWebViewSource();
_sourceTitle = new HtmlWebViewSource();
_md = new MarkdownDeep.Markdown();
_sourceTitle.BaseUrl = _source.BaseUrl = MainSettings.YavscHomeUrl;
_sourceTitle.Html = "Hello";
titleLabel = new WebView { Source = _sourceTitle };
contentView = new WebView { Source = _source };
Content = new StackLayout
{
Children = {
titleLabel,
contentView
}
};
}
protected override void OnBindingContextChanged()
{
base.OnBindingContextChanged();
var blog = BindingContext as Blog;
if (blog == null)
{
_sourceTitle.Html = _source.Html = "";
}
else
{
_sourceTitle.Html = _md.Transform(blog.bcontent);
_source.Html = _md.Transform(blog.bcontent);
}
}
}
}

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:BookAStar.Views;assembly=BookAStar"
x:Class="BookAStar.Pages.BookQueriesPage">
<StackLayout>
<ListView x:Name="list"
HasUnevenRows="true" ItemTapped="OnViewDetail">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<StackLayout Orientation="Horizontal">
<StackLayout Orientation="Vertical">
<Label Text="{Binding Title}" FontSize="12"/>
<Label Text="{Binding Description}"/>
<Label Text="{Binding Comment}"/>
<Label Text="{Binding CommandId}"/>
<StackLayout Orientation="Horizontal">
<StackLayout>
<Label Text="Date:" FontAttributes="Italic"/>
<Label Text="{Binding StartDate, StringFormat='{0:jj/MM/yyyy}'}" VerticalOptions="End"/>
</StackLayout>
<StackLayout>
<Label Text="Heure:" FontAttributes="Italic" />
<Label Text="{Binding StartDate, StringFormat='{0:H:mm}'}" VerticalOptions="End"/>
</StackLayout>
<StackLayout>
<Label Text="Lieu:" FontAttributes="Italic" VerticalOptions="End"/>
<Label Text="{Binding Location.Address}"/>
</StackLayout>
</StackLayout>
</StackLayout>
</StackLayout>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage>

View File

@ -0,0 +1,46 @@
using BookAStar.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Xamarin.Forms;
namespace BookAStar.Pages
{
public partial class BookQueriesPage : ContentPage
{
public BookQueriesPage()
{
InitializeComponent();
BindingContext = App.CurrentApp.DataManager.BookQueries;
list.ItemsSource = BindingContext as ObservableCollection<BookQueryData>;
list.RefreshCommand = BindingContext as ICommand;
list.IsPullToRefreshEnabled = true;
}
public RemoteEntity<BookQueryData,long> Queries
{
get
{
return BindingContext!=null? BindingContext as RemoteEntity<BookQueryData, long>:null;
}
}
protected override void OnAppearing()
{
base.OnAppearing();
if (!Queries.IsExecuting)
Queries.Execute(null);
}
private void OnViewDetail(object sender, ItemTappedEventArgs e)
{
BookQueryData data = e.Item as BookQueryData;
App.CurrentApp.ShowBookQuery(data);
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps.dll"
x:Class="BookAStar.Pages.BookQueryPage">
<StackLayout x:Name="bookQueryLayout">
<Label Text="{Binding Title}" VerticalOptions="Start" HorizontalOptions="Center" />
<Label Text="{Binding Description}" VerticalOptions="FillAndExpand" HorizontalOptions="Center" />
<Label Text="{Binding CommandId}" VerticalOptions="Center" HorizontalOptions="Center" />
<Label Text="{Binding Comment}" VerticalOptions="Center" HorizontalOptions="Center" />
<Label Text="{Binding StartDate}" VerticalOptions="Center" HorizontalOptions="Center" />
<Label Text="{Binding EndDate}" VerticalOptions="Center" HorizontalOptions="Center" />
<Label Text="{Binding Location}" VerticalOptions="Center" HorizontalOptions="Center" />
<maps:Map x:Name="map"></maps:Map>
<Button Text="Faire un devis" Clicked="MakeAnEstimate" VerticalOptions="Center" HorizontalOptions="End"/>
</StackLayout>
</ContentPage>

View File

@ -0,0 +1,64 @@

using System;
using Xamarin.Forms;
using Xamarin.Forms.Maps;
namespace BookAStar.Pages
{
using Model;
using System.Threading.Tasks;
public partial class BookQueryPage : ContentPage
{
public BookQueryData BookQuery
{
get
{
return BindingContext as BookQueryData;
}
set
{
BindingContext = value;
}
}
protected override void OnBindingContextChanged()
{
base.OnBindingContextChanged();
map.Pins.Clear();
if (BookQuery != null)
{
var lat = BookQuery.Location.Latitude;
var lon = BookQuery.Location.Longitude;
var pin = new Pin
{
Type = PinType.SavedPin,
Position = new Position(
lat, lon),
Label = BookQuery.Client.UserName,
Address = BookQuery.Location.Address
};
map.Pins.Add(pin);
map.MoveToRegion(MapSpan.FromCenterAndRadius(
new Position(lat, lon), Distance.FromMeters(100)));
}
}
public BookQueryPage(BookQueryData bookQuery)
{
InitializeComponent();
// Task.Run( async () => { bookQuery = await App.CurrentApp.DataManager.BookQueries.Get(bookQueryId); });
BookQuery = bookQuery;
}
private void MakeAnEstimate(object sender, EventArgs e)
{
throw new NotImplementedException();
}
}
}

View File

@ -7,7 +7,7 @@ using System.Text;
using Xamarin.Forms;
using Yavsc.Models.Identity;
namespace BookAStar
namespace BookAStar.Pages
{
public class DeviceInfoPage : ContentPage
{

View File

@ -2,7 +2,7 @@
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:BookAStar;Assembly:BookAStar"
x:Class="BookAStar.EventDetail">
x:Class="BookAStar.Pages.EventDetail">
<ContentPage.Content>
<ScrollView>
<StackLayout>

View File

@ -0,0 +1,25 @@
using System;
using Xamarin.Forms;
namespace BookAStar
{
using Model.Workflow.Messaging;
namespace Pages
{
public partial class EventDetail : ContentPage
{
public EventDetail(YaEvent ev)
{
InitializeComponent();
BindingContext = ev;
btn_webpage.Clicked += (object sender, EventArgs e) =>
{
App.PlateformSpecificInstance.OpenWeb(ev.EventWebPage);
};
}
}
}
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="BookAStar.Pages.MakeAnEstimatePage"
xmlns:local="clr-namespace:BookAStar.Views;assembly=BookAStar"
>
<local:MarkdownView x:Name="mdview" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
Markdown="hello estimate"></local:MarkdownView>
</ContentPage>

View File

@ -0,0 +1,28 @@
using BookAStar.Model.Workflow;
using BookAStar.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace BookAStar.Pages
{
public partial class MakeAnEstimatePage : ContentPage
{
public Estimate Estimate { get { return BindingContext as Estimate; } set {
BindingContext = value;
} }
public static readonly BindableProperty MarkdownProperty =
BindableProperty.Create("Description", typeof(string), typeof(Estimate),
null, BindingMode.TwoWay);
public MakeAnEstimatePage(string clientId,long bookQueryId)
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="BookAStar.Pages.MarkdownEditorPage">
<Editor VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"
x:Name="editor"
/>
<WebView x:Name="webView"></WebView>
</ContentPage>

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace BookAStar.Pages
{
public partial class MarkdownEditorPage : ContentPage
{
public MarkdownEditorPage()
{
InitializeComponent();
}
public void GetText()
{
}
}
}

View File

@ -4,7 +4,7 @@ using Xamarin.Forms;
using Xamarin.Forms.Maps;
using Yavsc;
namespace BookAStar
namespace BookAStar.Pages
{
public class PinPage : ContentPage
{

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="BookAStar.QueriesPage">
<Label Text="{Binding MainText}" VerticalOptions="Center" HorizontalOptions="Center" />
</ContentPage>

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace BookAStar
{
public partial class QueriesPage : ContentPage
{
public QueriesPage()
{
InitializeComponent();
}
}
}

View File

@ -3,6 +3,7 @@ using Xamarin.Forms;
using System.Collections.ObjectModel;
using BookAStar.Model.Social;
using BookAStar.Model.Workflow.Messaging;
using BookAStar.Pages;
namespace BookAStar
{

View File

@ -51,11 +51,6 @@ namespace BookAStar
public Dictionary<string, double> Musical { get; private set; }
public Dictionary<string, double> Environ { get; private set; }
private void PlateformSpecificInstance_IdentificationChanged(object sender, IdentificationChangedEventArgs e)
{
// Assert AccountListView.SelectedItem == e.NewIdentification;
}
private void Accounts_ItemSelected(object sender, SelectedItemChangedEventArgs e)
{
var user = e.SelectedItem as User;

View File

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using Xamarin.Forms;
namespace BookAStar.Views
{
public partial class MarkdownView : ContentView
{
public static readonly BindableProperty MarkdownProperty = BindableProperty.Create(
"Markdown", typeof(string), typeof(MarkdownView), null, BindingMode.TwoWay
);
private string markdown;
public string Markdown
{
get
{
return markdown;
}
set {
markdown = value;
Content = App.PlateformSpecificInstance.CreateMarkdownView(
markdown,
e => {
Markdown = e;
if (Validated != null)
Validated.Invoke(this, new EventArgs());
}
);
}
}
public MarkdownView() : base()
{
}
public event EventHandler Validated;
}
}

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Json.NET.Web" version="1.0.49" targetFramework="portable45-net45+win8+wpa81" />
<package id="MarkdownDeep.NET" version="1.5" targetFramework="portable45-net45+win8+wpa81" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="portable45-net45+win8+wpa81" />
<package id="Xam.Plugins.Settings" version="2.1.0" targetFramework="portable45-net45+win8+wpa81" />
<package id="Xamarin.Forms" version="2.3.0.107" targetFramework="portable45-net45+win8+wpa81" />

View File

@ -0,0 +1 @@


View File

@ -48,6 +48,7 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="MarkdownParser.y" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
@ -67,4 +68,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>