this code is obsolete
@ -1,58 +0,0 @@
|
|||||||
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.Accounts;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Accounts
|
|
||||||
{
|
|
||||||
class YavscAccountAuthenticator : AbstractAccountAuthenticator
|
|
||||||
{
|
|
||||||
public YavscAccountAuthenticator(Context context): base(context)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Bundle AddAccount(AccountAuthenticatorResponse response, string accountType, string authTokenType, string[] requiredFeatures, Bundle options)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Bundle ConfirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Bundle EditProperties(AccountAuthenticatorResponse response, string accountType)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Bundle GetAuthToken(AccountAuthenticatorResponse response, Account account, string authTokenType, Bundle options)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string GetAuthTokenLabel(string authTokenType)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Bundle HasFeatures(AccountAuthenticatorResponse response, Account account, string[] features)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Bundle UpdateCredentials(AccountAuthenticatorResponse response, Account account, string authTokenType, Bundle options)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
Any raw assets you want to be deployed with your application can be placed in
|
|
||||||
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
|
||||||
|
|
||||||
These files will be deployed with you package and will be accessible using Android's
|
|
||||||
AssetManager, like this:
|
|
||||||
|
|
||||||
public class ReadAsset : Activity
|
|
||||||
{
|
|
||||||
protected override void OnCreate (Bundle bundle)
|
|
||||||
{
|
|
||||||
base.OnCreate (bundle);
|
|
||||||
|
|
||||||
InputStream input = Assets.Open ("my_asset.txt");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Additionally, some Android functions will automatically load asset files:
|
|
||||||
|
|
||||||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|
|
||||||
@ -1,69 +0,0 @@
|
|||||||
<!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>
|
|
||||||
@ -1,388 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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; }
|
|
||||||
|
Before Width: | Height: | Size: 31 KiB |
@ -1,31 +0,0 @@
|
|||||||
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);
|
|
||||||
});
|
|
||||||
@ -1 +0,0 @@
|
|||||||
.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}
|
|
||||||
@ -1,845 +0,0 @@
|
|||||||
/*!
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
@ -1,359 +0,0 @@
|
|||||||
/*!
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
@ -1,883 +0,0 @@
|
|||||||
/*!
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
@ -1,85 +0,0 @@
|
|||||||
<!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>
|
|
||||||
|
|
||||||
@ -1,71 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<link rel="stylesheet" href="quill.snow.css" />
|
|
||||||
<style>
|
|
||||||
.standalone-container {
|
|
||||||
margin: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
#bubble-container {
|
|
||||||
width:100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
#bubble-container div.ql-editor {
|
|
||||||
margin-top:0;
|
|
||||||
}
|
|
||||||
.hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Title</h1>
|
|
||||||
<div class="standalone-container">
|
|
||||||
<div id="bubble-container"><h1><strong>Hello Estimate!</strong></h1>
|
|
||||||
</div>
|
|
||||||
</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") {
|
|
||||||
$.get("file:validate?md=" + encodeURIComponent(getMD()));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
@ -1,842 +0,0 @@
|
|||||||
(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+, 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 HtmlParser = require('./lib/html-parser')
|
|
||||||
var collapse = require('collapse-whitespace')
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Utilities
|
|
||||||
*/
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
function htmlToDom (string) {
|
|
||||||
var tree = new HtmlParser().parseFromString(string, 'text/html')
|
|
||||||
collapse(tree.documentElement, isBlock)
|
|
||||||
return tree
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Flattens DOM tree into single array
|
|
||||||
*/
|
|
||||||
|
|
||||||
function bfsOrder (node) {
|
|
||||||
var inqueue = [node]
|
|
||||||
var outqueue = []
|
|
||||||
var elem
|
|
||||||
var children
|
|
||||||
var 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
|
|
||||||
var regExp
|
|
||||||
var 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, content) {
|
|
||||||
var leading = ''
|
|
||||||
var trailing = ''
|
|
||||||
|
|
||||||
if (!isBlock(node)) {
|
|
||||||
var hasLeading = /^[ \r\n\t]/.test(content)
|
|
||||||
var hasTrailing = /[ \r\n\t]$/.test(content)
|
|
||||||
|
|
||||||
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
|
|
||||||
var content = getContent(node)
|
|
||||||
|
|
||||||
// Remove blank nodes
|
|
||||||
if (!isVoid(node) && !/A|TH|TD/.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, content)
|
|
||||||
|
|
||||||
if (whitespace.leading || whitespace.trailing) {
|
|
||||||
content = content.trim()
|
|
||||||
}
|
|
||||||
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')
|
|
||||||
}
|
|
||||||
|
|
||||||
if (input === '') {
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
|
|
||||||
// Escape potential ol triggers
|
|
||||||
input = input.replace(/(\d+)\. /g, '$1\\. ')
|
|
||||||
|
|
||||||
var clone = htmlToDom(input).body
|
|
||||||
var nodes = bfsOrder(clone)
|
|
||||||
var 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.outer = outer
|
|
||||||
|
|
||||||
module.exports = toMarkdown
|
|
||||||
|
|
||||||
},{"./lib/gfm-converters":2,"./lib/html-parser":3,"./lib/md-converters":4,"collapse-whitespace":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){
|
|
||||||
/*
|
|
||||||
* Set up window for Node.js
|
|
||||||
*/
|
|
||||||
|
|
||||||
var _window = (typeof window !== 'undefined' ? window : this)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Parsing HTML strings
|
|
||||||
*/
|
|
||||||
|
|
||||||
function canParseHtmlNatively () {
|
|
||||||
var Parser = _window.DOMParser
|
|
||||||
var 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 () {}
|
|
||||||
|
|
||||||
// For Node.js environments
|
|
||||||
if (typeof document === 'undefined') {
|
|
||||||
var jsdom = require('jsdom')
|
|
||||||
Parser.prototype.parseFromString = function (string) {
|
|
||||||
return jsdom.jsdom(string, {
|
|
||||||
features: {
|
|
||||||
FetchExternalResources: [],
|
|
||||||
ProcessExternalResources: false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!shouldUseActiveX()) {
|
|
||||||
Parser.prototype.parseFromString = function (string) {
|
|
||||||
var doc = document.implementation.createHTMLDocument('')
|
|
||||||
doc.open()
|
|
||||||
doc.write(string)
|
|
||||||
doc.close()
|
|
||||||
return doc
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Parser.prototype.parseFromString = function (string) {
|
|
||||||
var doc = new window.ActiveXObject('htmlfile')
|
|
||||||
doc.designMode = 'on' // disable on-page scripts
|
|
||||||
doc.open()
|
|
||||||
doc.write(string)
|
|
||||||
doc.close()
|
|
||||||
return doc
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Parser
|
|
||||||
}
|
|
||||||
|
|
||||||
function shouldUseActiveX () {
|
|
||||||
var useActiveX = false
|
|
||||||
|
|
||||||
try {
|
|
||||||
document.implementation.createHTMLDocument('').open()
|
|
||||||
} catch (e) {
|
|
||||||
if (window.ActiveXObject) useActiveX = true
|
|
||||||
}
|
|
||||||
|
|
||||||
return useActiveX
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = canParseHtmlNatively() ? _window.DOMParser : createHtmlParser()
|
|
||||||
|
|
||||||
},{"jsdom":6}],4:[function(require,module,exports){
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
module.exports = [
|
|
||||||
{
|
|
||||||
filter: 'p',
|
|
||||||
replacement: function (content) {
|
|
||||||
return '\n\n' + content + '\n\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: ['strong', 'b'],
|
|
||||||
replacement: function (content) {
|
|
||||||
return '**' + content + '**'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
filter: ['u'],
|
|
||||||
replacement: function (content) {
|
|
||||||
return '_' + content + '_'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
filter: ['del', 's', 'strike'],
|
|
||||||
replacement: function (content) {
|
|
||||||
return '~~' + content + '~~'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
filter: 'div',
|
|
||||||
replacement: function (content) {
|
|
||||||
return content + '\n\n'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 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.alt || ''
|
|
||||||
var src = node.getAttribute('src') || ''
|
|
||||||
var title = node.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 = content.trim()
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
},{}],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){
|
|
||||||
|
|
||||||
},{}],7:[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":8}],8:[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
|
|
||||||
};
|
|
||||||
|
|
||||||
},{}]},{},[1])(1)
|
|
||||||
});
|
|
||||||
@ -1,356 +0,0 @@
|
|||||||
// ***********************************************************************
|
|
||||||
// Assembly : XLabs.Forms.Droid
|
|
||||||
// Author : XLabs Team
|
|
||||||
// Created : 12-27-2015
|
|
||||||
//
|
|
||||||
// Last Modified By : XLabs Team
|
|
||||||
// Last Modified On : 01-04-2016
|
|
||||||
// ***********************************************************************
|
|
||||||
// <copyright file="XFormsApp.cs" company="XLabs Team">
|
|
||||||
// Copyright (c) XLabs Team. All rights reserved.
|
|
||||||
// </copyright>
|
|
||||||
// <summary>
|
|
||||||
// This project is licensed under the Apache 2.0 license
|
|
||||||
// https://github.com/XLabs/Xamarin-Forms-Labs/blob/master/LICENSE
|
|
||||||
//
|
|
||||||
// XLabs is a open source project that aims to provide a powerfull and cross
|
|
||||||
// platform set of controls tailored to work with Xamarin Forms.
|
|
||||||
// </summary>
|
|
||||||
// ***********************************************************************
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using Xamarin.Forms;
|
|
||||||
using Xamarin.Forms.Platform.Android;
|
|
||||||
using XLabs.Platform.Device;
|
|
||||||
using XLabs.Platform.Mvvm;
|
|
||||||
using XLabs.Platform.Services;
|
|
||||||
using XLabs.Platform.Services.Email;
|
|
||||||
using XLabs.Platform.Services.Geolocation;
|
|
||||||
using XLabs.Platform.Services.IO;
|
|
||||||
using XLabs.Platform.Services.Media;
|
|
||||||
using Environment = Android.OS.Environment;
|
|
||||||
|
|
||||||
namespace XLabs.Forms
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Class XFormsApplicationDroid.
|
|
||||||
/// </summary>
|
|
||||||
public class XFormsCompatApplicationDroid :
|
|
||||||
global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the destroy.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The destroy.</value>
|
|
||||||
public EventHandler<EventArgs> Destroy { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the pause.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The pause.</value>
|
|
||||||
public EventHandler<EventArgs> Pause { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the restart.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The restart.</value>
|
|
||||||
public EventHandler<EventArgs> Restart { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the resume.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The resume.</value>
|
|
||||||
public EventHandler<EventArgs> Resume { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the start.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The start.</value>
|
|
||||||
public EventHandler<EventArgs> Start { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the stop.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The stop event handler.</value>
|
|
||||||
public EventHandler<EventArgs> Stop { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called when [destroy].
|
|
||||||
/// </summary>
|
|
||||||
protected override void OnDestroy()
|
|
||||||
{
|
|
||||||
var handler = this.Destroy;
|
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
handler(this, new EventArgs());
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnDestroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called as part of the activity lifecycle when an activity is going into
|
|
||||||
/// the background, but has not (yet) been killed.
|
|
||||||
/// </summary>
|
|
||||||
/// <since version="Added in API level 1" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnResume" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnSaveInstanceState(Android.OS.Bundle)" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnStop" />
|
|
||||||
/// <remarks><para tool="javadoc-to-mdoc">Called as part of the activity lifecycle when an activity is going into
|
|
||||||
/// the background, but has not (yet) been killed. The counterpart to
|
|
||||||
/// <c><see cref="M:Android.App.Activity.OnResume" /></c>.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">When activity B is launched in front of activity A, this callback will
|
|
||||||
/// be invoked on A. B will not be created until A's <c><see cref="M:Android.App.Activity.OnPause" /></c> returns,
|
|
||||||
/// so be sure to not do anything lengthy here.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">This callback is mostly used for saving any persistent state the
|
|
||||||
/// activity is editing, to present a "edit in place" model to the user and
|
|
||||||
/// making sure nothing is lost if there are not enough resources to start
|
|
||||||
/// the new activity without first killing this one. This is also a good
|
|
||||||
/// place to do things like stop animations and other things that consume a
|
|
||||||
/// noticeable amount of CPU in order to make the switch to the next activity
|
|
||||||
/// as fast as possible, or to close resources that are exclusive access
|
|
||||||
/// such as the camera.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">In situations where the system needs more memory it may kill paused
|
|
||||||
/// processes to reclaim resources. Because of this, you should be sure
|
|
||||||
/// that all of your state is saved by the time you return from
|
|
||||||
/// this function. In general <c><see cref="M:Android.App.Activity.OnSaveInstanceState(Android.OS.Bundle)" /></c> is used to save
|
|
||||||
/// per-instance state in the activity and this method is used to store
|
|
||||||
/// global persistent data (in content providers, files, etc.)
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">After receiving this call you will usually receive a following call
|
|
||||||
/// to <c><see cref="M:Android.App.Activity.OnStop" /></c> (after the next activity has been resumed and
|
|
||||||
/// displayed), however in some cases there will be a direct call back to
|
|
||||||
/// <c><see cref="M:Android.App.Activity.OnResume" /></c> without going through the stopped state.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <i>Derived classes must call through to the super class's
|
|
||||||
/// implementation of this method. If they do not, an exception will be
|
|
||||||
/// thrown.</i>
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <format type="text/html">
|
|
||||||
/// <a href="http://developer.android.com/reference/android/app/Activity.html#onPause()" target="_blank">[Android Documentation]</a>
|
|
||||||
/// </format>
|
|
||||||
/// </para></remarks>
|
|
||||||
protected override void OnPause()
|
|
||||||
{
|
|
||||||
var handler = this.Pause;
|
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
handler(this, new EventArgs());
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnPause();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called after <c><see cref="M:Android.App.Activity.OnStop" /></c> when the current activity is being
|
|
||||||
/// re-displayed to the user (the user has navigated back to it).
|
|
||||||
/// </summary>
|
|
||||||
/// <since version="Added in API level 1" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnStop" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnStart" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnResume" />
|
|
||||||
/// <remarks><para tool="javadoc-to-mdoc">Called after <c><see cref="M:Android.App.Activity.OnStop" /></c> when the current activity is being
|
|
||||||
/// re-displayed to the user (the user has navigated back to it). It will
|
|
||||||
/// be followed by <c><see cref="M:Android.App.Activity.OnStart" /></c> and then <c><see cref="M:Android.App.Activity.OnResume" /></c>.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">For activities that are using raw <c><see cref="T:Android.Database.ICursor" /></c> objects (instead of
|
|
||||||
/// creating them through
|
|
||||||
/// <c><see cref="M:Android.App.Activity.ManagedQuery(Android.Net.Uri, System.String[], System.String[], System.String[], System.String[])" /></c>,
|
|
||||||
/// this is usually the place
|
|
||||||
/// where the cursor should be required (because you had deactivated it in
|
|
||||||
/// <c><see cref="M:Android.App.Activity.OnStop" /></c>.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <i>Derived classes must call through to the super class's
|
|
||||||
/// implementation of this method. If they do not, an exception will be
|
|
||||||
/// thrown.</i>
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <format type="text/html">
|
|
||||||
/// <a href="http://developer.android.com/reference/android/app/Activity.html#onRestart()" target="_blank">[Android Documentation]</a>
|
|
||||||
/// </format>
|
|
||||||
/// </para></remarks>
|
|
||||||
protected override void OnRestart()
|
|
||||||
{
|
|
||||||
var handler = this.Restart;
|
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
handler(this, new EventArgs());
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnRestart();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called after <c><see cref="M:Android.App.Activity.OnRestoreInstanceState(Android.OS.Bundle)" /></c>, <c><see cref="M:Android.App.Activity.OnRestart" /></c>, or
|
|
||||||
/// <c><see cref="M:Android.App.Activity.OnPause" /></c>, for your activity to start interacting with the user.
|
|
||||||
/// </summary>
|
|
||||||
/// <since version="Added in API level 1" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnRestoreInstanceState(Android.OS.Bundle)" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnRestart" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnPostResume" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnPause" />
|
|
||||||
/// <remarks><para tool="javadoc-to-mdoc">Called after <c><see cref="M:Android.App.Activity.OnRestoreInstanceState(Android.OS.Bundle)" /></c>, <c><see cref="M:Android.App.Activity.OnRestart" /></c>, or
|
|
||||||
/// <c><see cref="M:Android.App.Activity.OnPause" /></c>, for your activity to start interacting with the user.
|
|
||||||
/// This is a good place to begin animations, open exclusive-access devices
|
|
||||||
/// (such as the camera), etc.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">Keep in mind that onResume is not the best indicator that your activity
|
|
||||||
/// is visible to the user; a system window such as the key guard may be in
|
|
||||||
/// front. Use <c><see cref="M:Android.App.Activity.OnWindowFocusChanged(System.Boolean)" /></c> to know for certain that your
|
|
||||||
/// activity is visible to the user (for example, to resume a game).
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <i>Derived classes must call through to the super class's
|
|
||||||
/// implementation of this method. If they do not, an exception will be
|
|
||||||
/// thrown.</i>
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <format type="text/html">
|
|
||||||
/// <a href="http://developer.android.com/reference/android/app/Activity.html#onResume()" target="_blank">[Android Documentation]</a>
|
|
||||||
/// </format>
|
|
||||||
/// </para></remarks>
|
|
||||||
protected override void OnResume()
|
|
||||||
{
|
|
||||||
var handler = this.Resume;
|
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
handler(this, new EventArgs());
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnResume();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called after <c><see cref="M:Android.App.Activity.OnCreate(Android.OS.Bundle)" /></c> or after <c><see cref="M:Android.App.Activity.OnRestart" /></c> when
|
|
||||||
/// the activity had been stopped, but is now again being displayed to the
|
|
||||||
/// user.
|
|
||||||
/// </summary>
|
|
||||||
/// <since version="Added in API level 1" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnCreate(Android.OS.Bundle)" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnStop" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnResume" />
|
|
||||||
/// <remarks><para tool="javadoc-to-mdoc">Called after <c><see cref="M:Android.App.Activity.OnCreate(Android.OS.Bundle)" /></c> or after <c><see cref="M:Android.App.Activity.OnRestart" /></c> when
|
|
||||||
/// the activity had been stopped, but is now again being displayed to the
|
|
||||||
/// user. It will be followed by <c><see cref="M:Android.App.Activity.OnResume" /></c>.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <i>Derived classes must call through to the super class's
|
|
||||||
/// implementation of this method. If they do not, an exception will be
|
|
||||||
/// thrown.</i>
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <format type="text/html">
|
|
||||||
/// <a href="http://developer.android.com/reference/android/app/Activity.html#onStart()" target="_blank">[Android Documentation]</a>
|
|
||||||
/// </format>
|
|
||||||
/// </para></remarks>
|
|
||||||
protected override void OnStart()
|
|
||||||
{
|
|
||||||
var handler = this.Start;
|
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
handler(this, new EventArgs());
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnStart();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called when you are no longer visible to the user.
|
|
||||||
/// </summary>
|
|
||||||
/// <since version="Added in API level 1" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnRestart" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnResume" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnSaveInstanceState(Android.OS.Bundle)" />
|
|
||||||
/// <altmember cref="M:Android.App.Activity.OnDestroy" />
|
|
||||||
/// <remarks><para tool="javadoc-to-mdoc">Called when you are no longer visible to the user. You will next
|
|
||||||
/// receive either <c><see cref="M:Android.App.Activity.OnRestart" /></c>, <c><see cref="M:Android.App.Activity.OnDestroy" /></c>, or nothing,
|
|
||||||
/// depending on later user activity.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">Note that this method may never be called, in low memory situations
|
|
||||||
/// where the system does not have enough memory to keep your activity's
|
|
||||||
/// process running after its <c><see cref="M:Android.App.Activity.OnPause" /></c> method is called.
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <i>Derived classes must call through to the super class's
|
|
||||||
/// implementation of this method. If they do not, an exception will be
|
|
||||||
/// thrown.</i>
|
|
||||||
/// </para>
|
|
||||||
/// <para tool="javadoc-to-mdoc">
|
|
||||||
/// <format type="text/html">
|
|
||||||
/// <a href="http://developer.android.com/reference/android/app/Activity.html#onStop()" target="_blank">[Android Documentation]</a>
|
|
||||||
/// </format>
|
|
||||||
/// </para></remarks>
|
|
||||||
protected override void OnStop()
|
|
||||||
{
|
|
||||||
var handler = this.Stop;
|
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
handler(this, new EventArgs());
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnStop();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Class XFormsAppDroid.
|
|
||||||
/// </summary>
|
|
||||||
public class XFormsCompatAppDroid : XFormsApp<XFormsCompatApplicationDroid>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="XFormsAppDroid"/> class.
|
|
||||||
/// </summary>
|
|
||||||
public XFormsCompatAppDroid() { }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="XFormsAppDroid"/> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="app">The application.</param>
|
|
||||||
public XFormsCompatAppDroid(XFormsCompatApplicationDroid app) : base(app) { }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Raises the back press.
|
|
||||||
/// </summary>
|
|
||||||
public void RaiseBackPress()
|
|
||||||
{
|
|
||||||
this.OnBackPress();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called when [initialize].
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="app">The application.</param>
|
|
||||||
/// <param name="initServices">Should initialize services.</param>
|
|
||||||
protected override void OnInit(XFormsCompatApplicationDroid app, bool initServices = true)
|
|
||||||
{
|
|
||||||
this.AppContext.Start += (o, e) => this.OnStartup();
|
|
||||||
this.AppContext.Stop += (o, e) => this.OnClosing();
|
|
||||||
this.AppContext.Pause += (o, e) => this.OnSuspended();
|
|
||||||
this.AppContext.Resume += (o, e) => this.OnResumed();
|
|
||||||
|
|
||||||
this.AppDataDirectory = Environment.ExternalStorageDirectory.AbsolutePath;
|
|
||||||
this.Orientation = AppContext.RequestedOrientation == Android.Content.PM.ScreenOrientation.Portrait ?
|
|
||||||
Enums.Orientation.Portrait : Enums.Orientation.None;
|
|
||||||
if (initServices)
|
|
||||||
{
|
|
||||||
DependencyService.Register<TextToSpeechService>();
|
|
||||||
DependencyService.Register<Geolocator>();
|
|
||||||
DependencyService.Register<MediaPicker>();
|
|
||||||
DependencyService.Register<SoundService>();
|
|
||||||
DependencyService.Register<EmailService>();
|
|
||||||
DependencyService.Register<FileManager>();
|
|
||||||
DependencyService.Register<AndroidDevice>();
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnInit(app);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
Devic Info Readme
|
|
||||||
Find the most up to date information at: https://github.com/jamesmontemagno/Xamarin.Plugins
|
|
||||||
|
|
||||||
**IMPORTANT**
|
|
||||||
|
|
||||||
|
|
||||||
Windows Phone:
|
|
||||||
Permissions to add:
|
|
||||||
ID_CAP_IDENTITY_DEVICE
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Android.App;
|
|
||||||
using Android.Content;
|
|
||||||
using Android.Runtime;
|
|
||||||
using Geofence.Plugin;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid
|
|
||||||
{
|
|
||||||
//This is a starting point application class so that geofence events can be handle even when application is closed.
|
|
||||||
|
|
||||||
[Application]
|
|
||||||
public class GeofenceAppStarter : Application
|
|
||||||
{
|
|
||||||
public static Context AppContext;
|
|
||||||
|
|
||||||
public GeofenceAppStarter(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnCreate()
|
|
||||||
{
|
|
||||||
base.OnCreate();
|
|
||||||
|
|
||||||
AppContext = this.ApplicationContext;
|
|
||||||
|
|
||||||
//TODO: Initialize CrossGeofence Plugin
|
|
||||||
//TODO: Specify the listener class implementing IGeofenceListener interface in the Initialize generic
|
|
||||||
//CrossGeofence.Initialize<CrossGeofenceListener>();
|
|
||||||
//CrossGeofence.GeofenceListener.OnAppStarted();
|
|
||||||
//Start a sticky service to keep receiving geofence events when app is closed.
|
|
||||||
StartService();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void StartService()
|
|
||||||
{
|
|
||||||
AppContext.StartService(new Intent(AppContext, typeof(GeofenceService)));
|
|
||||||
|
|
||||||
if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Kitkat)
|
|
||||||
{
|
|
||||||
|
|
||||||
PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext, typeof(GeofenceService)), 0);
|
|
||||||
AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(Context.AlarmService);
|
|
||||||
alarm.Cancel(pintent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void StopService()
|
|
||||||
{
|
|
||||||
AppContext.StopService(new Intent(AppContext, typeof(GeofenceService)));
|
|
||||||
if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Kitkat)
|
|
||||||
{
|
|
||||||
PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext, typeof(GeofenceService)), 0);
|
|
||||||
AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(Context.AlarmService);
|
|
||||||
alarm.Cancel(pintent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
using Android.App;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Helpers
|
|
||||||
{
|
|
||||||
[Service]
|
|
||||||
public class GeofenceService : Service
|
|
||||||
{
|
|
||||||
public override void OnCreate()
|
|
||||||
{
|
|
||||||
base.OnCreate();
|
|
||||||
|
|
||||||
System.Diagnostics.Debug.WriteLine("Geofence Service - Created");
|
|
||||||
}
|
|
||||||
|
|
||||||
public override StartCommandResult OnStartCommand(Android.Content.Intent intent, StartCommandFlags flags, int startId)
|
|
||||||
{
|
|
||||||
System.Diagnostics.Debug.WriteLine("Geofence Service - Started");
|
|
||||||
return StartCommandResult.Sticky;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Android.OS.IBinder OnBind(Android.Content.Intent intent)
|
|
||||||
{
|
|
||||||
System.Diagnostics.Debug.WriteLine("Geofence Service - Binded");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDestroy()
|
|
||||||
{
|
|
||||||
System.Diagnostics.Debug.WriteLine("Geofence Service - Destroyed");
|
|
||||||
base.OnDestroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
|
|
||||||
// Helpers/Settings.cs This file was automatically added when you installed the Settings Plugin. If you are not using a PCL then comment this file back in to use it.
|
|
||||||
using Plugin.Settings;
|
|
||||||
using Plugin.Settings.Abstractions;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Helpers
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// This is the Settings static class that can be used in your Core solution or in any
|
|
||||||
/// of your client applications. All settings are laid out the same exact way with getters
|
|
||||||
/// and setters.
|
|
||||||
/// </summary>
|
|
||||||
public static class Settings
|
|
||||||
{
|
|
||||||
private static ISettings AppSettings
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return CrossSettings.Current;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Setting Constants
|
|
||||||
|
|
||||||
private const string SettingsKey = "settings_key";
|
|
||||||
private static readonly string SettingsDefault = string.Empty;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
public static string GeneralSettings
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
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 ZicMoove.Droid.Interfaces
|
|
||||||
{
|
|
||||||
interface IGCMessageHandler
|
|
||||||
{
|
|
||||||
void Handle( string from, Bundle data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
using Android.App;
|
|
||||||
using Android.OS;
|
|
||||||
using Android.Runtime;
|
|
||||||
using Plugin.CurrentActivity;
|
|
||||||
|
|
||||||
namespace BookAStar.Droid
|
|
||||||
{
|
|
||||||
//You can specify additional application information in this attribute
|
|
||||||
[Application]
|
|
||||||
public class MainApplication : Application, Application.IActivityLifecycleCallbacks
|
|
||||||
{
|
|
||||||
public MainApplication(IntPtr handle, JniHandleOwnership transer)
|
|
||||||
:base(handle, transer)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnCreate()
|
|
||||||
{
|
|
||||||
base.OnCreate();
|
|
||||||
RegisterActivityLifecycleCallbacks(this);
|
|
||||||
//A great place to initialize Xamarin.Insights and Dependency Services!
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnTerminate()
|
|
||||||
{
|
|
||||||
base.OnTerminate();
|
|
||||||
UnregisterActivityLifecycleCallbacks(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
|
|
||||||
{
|
|
||||||
CrossCurrentActivity.Current.Activity = activity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityDestroyed(Activity activity)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityPaused(Activity activity)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityResumed(Activity activity)
|
|
||||||
{
|
|
||||||
CrossCurrentActivity.Current.Activity = activity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityStarted(Activity activity)
|
|
||||||
{
|
|
||||||
CrossCurrentActivity.Current.Activity = activity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnActivityStopped(Activity activity)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
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.Interop;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Markdown
|
|
||||||
{
|
|
||||||
public class JsBridgeMarkdown : Java.Lang.Object
|
|
||||||
{
|
|
||||||
readonly WeakReference<MarkdownViewRenderer> hybridWebViewRenderer;
|
|
||||||
|
|
||||||
public JsBridgeMarkdown(MarkdownViewRenderer hybridRenderer)
|
|
||||||
{
|
|
||||||
hybridWebViewRenderer = new WeakReference<MarkdownViewRenderer>(hybridRenderer);
|
|
||||||
}
|
|
||||||
|
|
||||||
[JavascriptInterface]
|
|
||||||
[Export("contentEdited")]
|
|
||||||
public void ContentEdited(string data)
|
|
||||||
{
|
|
||||||
MarkdownViewRenderer hybridRenderer;
|
|
||||||
|
|
||||||
if (hybridWebViewRenderer != null && hybridWebViewRenderer.TryGetTarget(out hybridRenderer))
|
|
||||||
{
|
|
||||||
hybridRenderer.Element.Markdown = data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[JavascriptInterface]
|
|
||||||
[Export("jsLoaded")]
|
|
||||||
public void JSLoaded()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,73 +0,0 @@
|
|||||||
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.Support.V7.App;
|
|
||||||
using XLabs.Ioc;
|
|
||||||
using XLabs.Platform.Mvvm;
|
|
||||||
using XLabs.Forms;
|
|
||||||
using static Android.Views.View;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Markdown
|
|
||||||
{
|
|
||||||
class MDContextMenu : AppCompatDialog
|
|
||||||
{
|
|
||||||
private ActionMode mActionMode = null;
|
|
||||||
public MDContextMenu(Context context) : base(context)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
public override void OnActionModeStarted(ActionMode mode)
|
|
||||||
{
|
|
||||||
if (mActionMode == null)
|
|
||||||
{
|
|
||||||
mActionMode = mode;
|
|
||||||
var menu = mode.Menu;
|
|
||||||
// Remove the default menu items (select all, copy, paste, search)
|
|
||||||
menu.Clear();
|
|
||||||
|
|
||||||
// If you want to keep any of the defaults,
|
|
||||||
// remove the items you don't want individually:
|
|
||||||
// menu.removeItem(android.R.id.[id_of_item_to_remove])
|
|
||||||
|
|
||||||
// Inflate your own menu items
|
|
||||||
mode.MenuInflater.Inflate(Resource.Menu.md_menu, menu);
|
|
||||||
|
|
||||||
}
|
|
||||||
mActionMode = mode;
|
|
||||||
base.OnActionModeStarted(mode);
|
|
||||||
}
|
|
||||||
public override void OnActionModeFinished(ActionMode mode)
|
|
||||||
{
|
|
||||||
base.OnActionModeFinished(mode);
|
|
||||||
}
|
|
||||||
protected override void OnCreate(Bundle savedInstanceState)
|
|
||||||
{
|
|
||||||
base.OnCreate(savedInstanceState);
|
|
||||||
}
|
|
||||||
public void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
|
|
||||||
{
|
|
||||||
/* if (menuInfo!=null)
|
|
||||||
{
|
|
||||||
var info = menuInfo.ToString();
|
|
||||||
}
|
|
||||||
menu.Add(0, 0, 0, "test");
|
|
||||||
var subMenu = menu.AddSubMenu(
|
|
||||||
0, 1, 1, "...");
|
|
||||||
subMenu.Add(0, 3, 0, "nkjnkjn");
|
|
||||||
var app = Resolver.Resolve<IXFormsApp>() as IXFormsApp<XFormsCompatApplicationDroid>;
|
|
||||||
|
|
||||||
var mgr = ClipboardManager.FromContext(app.AppContext);
|
|
||||||
if (mgr.HasText)
|
|
||||||
menu.Add(0, 0, 0, "Coller!");*/
|
|
||||||
//base.OnCreateContextMenu(menu, v, menuInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Markdown
|
|
||||||
{
|
|
||||||
class MDWebView : WebView
|
|
||||||
{
|
|
||||||
public MDWebView (Context context) : base (context)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ActionMode StartActionMode(ActionMode.ICallback callback)
|
|
||||||
{
|
|
||||||
return base.StartActionMode(callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,397 +0,0 @@
|
|||||||
#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 ZicMoove.Droid.Markdown
|
|
||||||
{
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorTemplatePreprocessor", "4.2.2.11")]
|
|
||||||
public partial class MarkdownEditor : MarkdownEditorBase
|
|
||||||
{
|
|
||||||
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 1 "MarkdownEditor.cshtml"
|
|
||||||
public MarkdownViewModel Model { get; set; }
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
|
|
||||||
public override void Execute()
|
|
||||||
{
|
|
||||||
WriteLiteral("<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta");
|
|
||||||
|
|
||||||
WriteLiteral(" charset=\"utf-8\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <style>\r\n .standalone-container {\r\n margin: 0;\r\n " +
|
|
||||||
" width: 100%;\r\n height: 100%;\r\n }\r\n </style>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 13 "MarkdownEditor.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 13 "MarkdownEditor.cshtml"
|
|
||||||
if (Model.Editable)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <link");
|
|
||||||
|
|
||||||
WriteLiteral(" rel=\"stylesheet\"");
|
|
||||||
|
|
||||||
WriteLiteral(" href=\"quill.snow.css\"");
|
|
||||||
|
|
||||||
WriteLiteral(" />\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(@" <style>
|
|
||||||
#bubble-container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bubble-container div.ql-editor {
|
|
||||||
padding-top:3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
");
|
|
||||||
|
|
||||||
|
|
||||||
#line 30 "MarkdownEditor.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</head>\r\n<body>\r\n <div");
|
|
||||||
|
|
||||||
WriteLiteral(" class=\"standalone-container\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n <div");
|
|
||||||
|
|
||||||
WriteLiteral(" id=\"bubble-container\"");
|
|
||||||
|
|
||||||
WriteLiteral(">");
|
|
||||||
|
|
||||||
|
|
||||||
#line 34 "MarkdownEditor.cshtml"
|
|
||||||
Write(Html.Write(Model.GetHtml()));
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</div>\r\n </div>\r\n <script");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"text/javascript\"");
|
|
||||||
|
|
||||||
WriteLiteral(" src=\"jquery.js\"");
|
|
||||||
|
|
||||||
WriteLiteral("></script>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 37 "MarkdownEditor.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 37 "MarkdownEditor.cshtml"
|
|
||||||
if (Model.Editable)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <script");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"text/javascript\"");
|
|
||||||
|
|
||||||
WriteLiteral(" src=\"quill.min.js\"");
|
|
||||||
|
|
||||||
WriteLiteral("></script>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" <script");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"text/javascript\"");
|
|
||||||
|
|
||||||
WriteLiteral(" src=\"showdown.js\"");
|
|
||||||
|
|
||||||
WriteLiteral("></script>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" <script");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"text/javascript\"");
|
|
||||||
|
|
||||||
WriteLiteral(" src=\"to-markdown.js\"");
|
|
||||||
|
|
||||||
WriteLiteral("></script>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" <script");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"text/javascript\"");
|
|
||||||
|
|
||||||
WriteLiteral(" src=\"md-helpers.js\"");
|
|
||||||
|
|
||||||
WriteLiteral("></script>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 43 "MarkdownEditor.cshtml"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <script");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"text/javascript\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n var toolbarOptions = [\r\n [\'bold\', \'italic\', \'underline\', \'str" +
|
|
||||||
"ike\'], // toggled buttons\r\n [\'blockquote\', \'code-block\'],\r\n [{ " +
|
|
||||||
"\'header\': 1 }, { \'header\': 2 }, { \'header\': 3 }], // custom button" +
|
|
||||||
" values\r\n [{ \'list\': \'ordered\' }, { \'list\': \'bullet\' }],\r\n [{ \'indent\'" +
|
|
||||||
": \'-1\' }, { \'indent\': \'+1\' }], // outdent/indent\r\n [\'link\', \'image" +
|
|
||||||
"\', \'audio\', \'video\'],\r\n [\'clean\'] /" +
|
|
||||||
"/ remove formatting button\r\n ];\r\n\r\n var showImageUI = func" +
|
|
||||||
"tion (value) {\r\n if (value) {\r\n var href = pro" +
|
|
||||||
"mpt(\'Enter the URL\');\r\n this.quill.format(\'image\', href);\r\n " +
|
|
||||||
" } else {\r\n this.quill.format(\'image\', false);\r\n" +
|
|
||||||
" }\r\n };\r\n\r\n $(document).ready(function () {" +
|
|
||||||
"\r\n var quill = new Quill(\'#bubble-container\', {\r\n " +
|
|
||||||
" modules: {\r\n toolbar: toolbarOptions\r\n " +
|
|
||||||
" },\r\n placeholder: \'Composez votre texte ...\',\r\n " +
|
|
||||||
" theme: \'snow\'\r\n });\r\n\r\n function getMD(" +
|
|
||||||
") {\r\n return markdownize($(\'#bubble-container div.ql-editor\')" +
|
|
||||||
".html())\r\n }\r\n quill.on(\'text-change\', function (d" +
|
|
||||||
"elta, oldDelta, source) {\r\n if (source === \"user\") {\r\n " +
|
|
||||||
" contentEdited(getMD());\r\n }\r\n " +
|
|
||||||
" });\r\n var toolbar = quill.getModule(\'toolbar\');\r\n " +
|
|
||||||
" toolbar.addHandler(\'image\', showImageUI);\r\n jsLoaded();\r\n " +
|
|
||||||
" });\r\n </script>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 86 "MarkdownEditor.cshtml"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(" <script");
|
|
||||||
|
|
||||||
WriteLiteral(" type=\"text/javascript\"");
|
|
||||||
|
|
||||||
WriteLiteral(">\r\n $(document).ready(function() {\r\n jsLoaded();\r\n });\r\n" +
|
|
||||||
" </script>\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 94 "MarkdownEditor.cshtml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("</body>\r\n</html>\r\n");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
@model MarkdownViewModel
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<style>
|
|
||||||
.standalone-container {
|
|
||||||
margin: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@if (Model.Editable)
|
|
||||||
{
|
|
||||||
<link rel="stylesheet" href="quill.snow.css" />
|
|
||||||
<style>
|
|
||||||
#bubble-container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bubble-container div.ql-editor {
|
|
||||||
padding-top:3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
}
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="standalone-container">
|
|
||||||
<div id="bubble-container">@Html.Write(Model.GetHtml())</div>
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript" src="jquery.js"></script>
|
|
||||||
@if (Model.Editable)
|
|
||||||
{
|
|
||||||
<script type="text/javascript" src="quill.min.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 }, { 'header': 3 }], // custom button values
|
|
||||||
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
|
|
||||||
[{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent
|
|
||||||
['link', 'image', 'audio', 'video'],
|
|
||||||
['clean'] // remove formatting button
|
|
||||||
];
|
|
||||||
|
|
||||||
var showImageUI = function (value) {
|
|
||||||
if (value) {
|
|
||||||
var href = prompt('Enter the URL');
|
|
||||||
this.quill.format('image', href);
|
|
||||||
} else {
|
|
||||||
this.quill.format('image', false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
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") {
|
|
||||||
contentEdited(getMD());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var toolbar = quill.getModule('toolbar');
|
|
||||||
toolbar.addHandler('image', showImageUI);
|
|
||||||
jsLoaded();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
jsLoaded();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
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.Graphics;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Markdown
|
|
||||||
{
|
|
||||||
public class MarkdownViewModel
|
|
||||||
{
|
|
||||||
protected static MarkdownDeep.Markdown markdown = new MarkdownDeep.Markdown();
|
|
||||||
public string Content { get; set; }
|
|
||||||
public bool Editable { get; set; }
|
|
||||||
|
|
||||||
public string GetHtml()
|
|
||||||
{
|
|
||||||
return markdown.Transform(Content);
|
|
||||||
}
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return Content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,120 +0,0 @@
|
|||||||
|
|
||||||
using ZicMoove.Views;
|
|
||||||
using Android.Webkit;
|
|
||||||
using Xamarin.Forms.Platform.Android;
|
|
||||||
using ZicMoove.Droid;
|
|
||||||
using System;
|
|
||||||
using Java.Interop;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using Android.Views;
|
|
||||||
|
|
||||||
[assembly: Xamarin.Forms.ExportRenderer(typeof(MarkdownView), typeof(MarkdownViewRenderer))]
|
|
||||||
namespace ZicMoove.Droid
|
|
||||||
{
|
|
||||||
using Markdown;
|
|
||||||
using XLabs.Forms;
|
|
||||||
using XLabs.Ioc;
|
|
||||||
using XLabs.Platform.Mvvm;
|
|
||||||
using static View;
|
|
||||||
|
|
||||||
public class MarkdownViewRenderer : ViewRenderer<MarkdownView, WebView>
|
|
||||||
{
|
|
||||||
private WebView editorView;
|
|
||||||
private MarkdownEditor editorTemplate = new MarkdownEditor();
|
|
||||||
const string jsLoadedJavaScriptFunction = "function jsLoaded(){jsBridge.jsLoaded()}";
|
|
||||||
const string contentEditedJavaScriptFunction = "function contentEdited(data){jsBridge.contentEdited(data)}";
|
|
||||||
public WebView EditorView
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return editorView;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// To be called once document finished loading
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="xview"></param>
|
|
||||||
/// <param name="view"></param>
|
|
||||||
public static async void AdjustHeightRequest(MarkdownView xview, WebView view)
|
|
||||||
{
|
|
||||||
if (view == null || xview == null) return;
|
|
||||||
var vch = view.ContentHeight;
|
|
||||||
// var oldH = xview.Height;
|
|
||||||
var newH = vch > xview.MinimumHeightRequest ? vch : xview.MinimumHeightRequest;
|
|
||||||
xview.HeightRequest = newH;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnElementChanged(ElementChangedEventArgs<MarkdownView> e)
|
|
||||||
{
|
|
||||||
base.OnElementChanged(e);
|
|
||||||
if (Control == null)
|
|
||||||
{
|
|
||||||
SetNativeControl(CreateNativeControl());
|
|
||||||
InjectJS(jsLoadedJavaScriptFunction);
|
|
||||||
InjectJS(contentEditedJavaScriptFunction);
|
|
||||||
}
|
|
||||||
if (e.OldElement != null)
|
|
||||||
{
|
|
||||||
// Unsubscribe
|
|
||||||
}
|
|
||||||
if (e.NewElement != null)
|
|
||||||
{
|
|
||||||
// Subscribe
|
|
||||||
editorTemplate.Model = new Markdown.MarkdownViewModel
|
|
||||||
{
|
|
||||||
Content = e.NewElement.Markdown, Editable = e.NewElement.Editable
|
|
||||||
};
|
|
||||||
var html = editorTemplate.GenerateString();
|
|
||||||
EditorView.LoadDataWithBaseURL("file:///android_asset/",
|
|
||||||
html, "text/html", "utf-8", null);
|
|
||||||
EditorView.SetBackgroundColor(e.NewElement.BackgroundColor.ToAndroid());
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void InjectJS(string script)
|
|
||||||
{
|
|
||||||
if (Control != null)
|
|
||||||
{
|
|
||||||
Control.LoadUrl(string.Format("javascript: {0}", script));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MDContextMenu contextMenu;
|
|
||||||
private WebView CreateNativeControl()
|
|
||||||
{
|
|
||||||
editorView = new WebView(Context);
|
|
||||||
EditorView.SetWebChromeClient(
|
|
||||||
new MarkdownWebChromeClient()
|
|
||||||
);
|
|
||||||
EditorView.Settings.BuiltInZoomControls = false;
|
|
||||||
EditorView.Settings.JavaScriptEnabled = true;
|
|
||||||
EditorView.Settings.LoadsImagesAutomatically = true;
|
|
||||||
EditorView.Settings.SetAppCacheEnabled(true);
|
|
||||||
EditorView.Settings.AllowContentAccess = true;
|
|
||||||
EditorView.Settings.AllowFileAccess = true;
|
|
||||||
EditorView.Settings.AllowFileAccessFromFileURLs = true;
|
|
||||||
EditorView.Settings.AllowUniversalAccessFromFileURLs = true;
|
|
||||||
EditorView.Settings.BlockNetworkImage = false;
|
|
||||||
EditorView.Settings.BlockNetworkLoads = false;
|
|
||||||
EditorView.Settings.DomStorageEnabled = true;
|
|
||||||
EditorView.AddJavascriptInterface(new JsBridgeMarkdown(this), "jsBridge");
|
|
||||||
EditorView.ViewTreeObserver.PreDraw += ViewTreeObserver_PreDraw;
|
|
||||||
//var app = Resolver.Resolve<IXFormsApp>() as IXFormsApp<XFormsCompatApplicationDroid>;
|
|
||||||
//contextMenu = new MDContextMenu(app.AppContext);
|
|
||||||
//EditorView.SetOnCreateContextMenuListener(contextMenu);
|
|
||||||
|
|
||||||
return EditorView;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EditorView_Touch(object sender, TouchEventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ViewTreeObserver_PreDraw(object sender, ViewTreeObserver.PreDrawEventArgs e)
|
|
||||||
{
|
|
||||||
AdjustHeightRequest(Element, Control);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Markdown
|
|
||||||
{
|
|
||||||
class MarkdownWebChromeClient : WebChromeClient
|
|
||||||
{
|
|
||||||
/*public override void OnConsoleMessage(string message, int lineNumber, string sourceID)
|
|
||||||
{
|
|
||||||
base.OnConsoleMessage(message, lineNumber, sourceID);
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,73 +0,0 @@
|
|||||||
@model string
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<link rel="stylesheet" href="quill.snow.css" />
|
|
||||||
<style>
|
|
||||||
.standalone-container {
|
|
||||||
margin: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
#bubble-container {
|
|
||||||
width:100%;
|
|
||||||
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>
|
|
||||||
|
|
||||||
<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
|
|
||||||
['link', 'image', 'video'],
|
|
||||||
['clean'] // remove formatting button
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
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") {
|
|
||||||
invokeCSharpAction(getMD());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// TODO implement a dedicated injection
|
|
||||||
invokeCSharpAction(getMD());
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,296 +0,0 @@
|
|||||||
// ***********************************************************************
|
|
||||||
// Assembly : XLabs.Forms.Droid
|
|
||||||
// Author : XLabs Team
|
|
||||||
// Created : 12-27-2015
|
|
||||||
//
|
|
||||||
// Last Modified By : XLabs Team
|
|
||||||
// Last Modified On : 01-04-2016
|
|
||||||
// ***********************************************************************
|
|
||||||
// <copyright file="ImageButtonRenderer.cs" company="XLabs Team">
|
|
||||||
// Copyright (c) XLabs Team. All rights reserved.
|
|
||||||
// </copyright>
|
|
||||||
// <summary>
|
|
||||||
// This project is licensed under the Apache 2.0 license
|
|
||||||
// https://github.com/XLabs/Xamarin-Forms-Labs/blob/master/LICENSE
|
|
||||||
//
|
|
||||||
// XLabs is a open source project that aims to provide a powerfull and cross
|
|
||||||
// platform set of controls tailored to work with Xamarin Forms.
|
|
||||||
// </summary>
|
|
||||||
// ***********************************************************************
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Android.Graphics;
|
|
||||||
using Android.Graphics.Drawables;
|
|
||||||
using Android.Views;
|
|
||||||
using XLabs.Enums;
|
|
||||||
using XLabs.Forms.Extensions;
|
|
||||||
using Color = Xamarin.Forms.Color;
|
|
||||||
using View = Android.Views.View;
|
|
||||||
using ZicMoove.Rendering;
|
|
||||||
using ZicMoove.Views;
|
|
||||||
using Xamarin.Forms.Platform.Android.AppCompat;
|
|
||||||
using Xamarin.Forms;
|
|
||||||
using Xamarin.Forms.Platform.Android;
|
|
||||||
using System.IO;
|
|
||||||
using ZicMoove.Helpers;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
[assembly: ExportRenderer(typeof(ImageButton), typeof(ImageButtonRenderer))]
|
|
||||||
namespace ZicMoove.Rendering
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Draws a button on the Android platform with the image shown in the right
|
|
||||||
/// position with the right size.
|
|
||||||
/// </summary>
|
|
||||||
public partial class ImageButtonRenderer : Xamarin.Forms.Platform.Android.AppCompat.ButtonRenderer
|
|
||||||
{
|
|
||||||
private static float _density = float.MinValue;
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sets up the button including the image.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="e">The event arguments.</param>
|
|
||||||
private ImageButton ImageButton
|
|
||||||
{
|
|
||||||
get { return (ImageButton)Element; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override async void OnElementChanged(ElementChangedEventArgs<Button> e)
|
|
||||||
{
|
|
||||||
base.OnElementChanged(e);
|
|
||||||
|
|
||||||
_density = Resources.DisplayMetrics.Density;
|
|
||||||
|
|
||||||
var targetButton = Control;
|
|
||||||
if (targetButton != null) targetButton.SetOnTouchListener(ImageButtonTouchListener.Instance.Value);
|
|
||||||
|
|
||||||
if (Element != null && Element.Font != Font.Default && targetButton != null) targetButton.Typeface = Element.Font.ToExtendedTypeface(Context);
|
|
||||||
|
|
||||||
if (Element != null && ImageButton.Source != null) await SetImageSourceAsync(targetButton, ImageButton).ConfigureAwait(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Releases unmanaged and - optionally - managed resources.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
|
|
||||||
protected override void Dispose (bool disposing)
|
|
||||||
{
|
|
||||||
base.Dispose (disposing);
|
|
||||||
if (disposing && Control != null) {
|
|
||||||
Control.Dispose ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int imageWitdh = 0;
|
|
||||||
int imageHeight = 0;
|
|
||||||
int imageWitdhRequest = 0;
|
|
||||||
int imageHeightRequest = 0;
|
|
||||||
|
|
||||||
// this is called before OnElementChanged ...
|
|
||||||
/*
|
|
||||||
public override SizeRequest GetDesiredSize(int widthConstraint, int heightConstraint)
|
|
||||||
{
|
|
||||||
switch (ImageButton.Orientation)
|
|
||||||
{
|
|
||||||
case ImageOrientation.ImageOnBottom:
|
|
||||||
case ImageOrientation.ImageOnTop:
|
|
||||||
return base.GetDesiredSize(widthConstraint, heightConstraint+ imageHeightRequest);
|
|
||||||
case ImageOrientation.ImageToRight:
|
|
||||||
case ImageOrientation.ImageToLeft:
|
|
||||||
return base.GetDesiredSize(widthConstraint + imageWitdhRequest, heightConstraint);
|
|
||||||
default:
|
|
||||||
return base.GetDesiredSize(widthConstraint, heightConstraint);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sets the image source.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="targetButton">The target button.</param>
|
|
||||||
/// <param name="model">The model.</param>
|
|
||||||
/// <returns>A <see cref="Task"/> for the awaited operation.</returns>
|
|
||||||
private async Task SetImageSourceAsync(Android.Widget.Button targetButton, ImageButton model)
|
|
||||||
{
|
|
||||||
if (targetButton == null || targetButton.Handle == IntPtr.Zero || model == null) return;
|
|
||||||
|
|
||||||
// const int Padding = 10;
|
|
||||||
var source = model.IsEnabled ? model.Source : model.DisabledSource ?? model.Source;
|
|
||||||
|
|
||||||
using (var bitmap = await GetBitmapAsync(source))
|
|
||||||
{
|
|
||||||
if (bitmap == null)
|
|
||||||
targetButton.SetCompoundDrawables(null, null, null, null);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var drawable = new BitmapDrawable(bitmap);
|
|
||||||
var tintColor = model.IsEnabled ? model.ImageTintColor : model.DisabledImageTintColor;
|
|
||||||
if (tintColor != Color.Transparent)
|
|
||||||
{
|
|
||||||
drawable.SetTint(tintColor.ToAndroid());
|
|
||||||
drawable.SetTintMode(PorterDuff.Mode.SrcIn);
|
|
||||||
}
|
|
||||||
imageWitdh = drawable.Bitmap.Width;
|
|
||||||
imageHeight = drawable.Bitmap.Height;
|
|
||||||
imageWitdhRequest = (int)model.ImageWidthRequest;
|
|
||||||
imageHeightRequest = (int)model.ImageHeightRequest;
|
|
||||||
|
|
||||||
if (imageHeightRequest <= 0) imageHeightRequest = imageHeight;
|
|
||||||
if (imageWitdhRequest <= 0) imageWitdhRequest = imageWitdh;
|
|
||||||
|
|
||||||
using (var scaledDrawable = GetScaleDrawable(drawable, imageWitdh, imageHeight))
|
|
||||||
{
|
|
||||||
Drawable left = null;
|
|
||||||
Drawable right = null;
|
|
||||||
Drawable top = null;
|
|
||||||
Drawable bottom = null;
|
|
||||||
int padding = 2; // model.Padding;
|
|
||||||
targetButton.CompoundDrawablePadding = RequestToPixels(padding);
|
|
||||||
targetButton.Gravity = GravityFlags.CenterHorizontal | GravityFlags.CenterVertical;
|
|
||||||
switch (model.Orientation)
|
|
||||||
{
|
|
||||||
case ImageOrientation.ImageToLeft:
|
|
||||||
left = scaledDrawable;
|
|
||||||
if (ImageButton.HeightRequest < imageHeightRequest)
|
|
||||||
ImageButton.HeightRequest = imageHeightRequest;
|
|
||||||
break;
|
|
||||||
case ImageOrientation.ImageToRight:
|
|
||||||
right = scaledDrawable;
|
|
||||||
if (ImageButton.HeightRequest < imageHeightRequest)
|
|
||||||
ImageButton.HeightRequest = imageHeightRequest;
|
|
||||||
break;
|
|
||||||
case ImageOrientation.ImageOnTop:
|
|
||||||
top = scaledDrawable;
|
|
||||||
if (ImageButton.WidthRequest < imageWitdhRequest)
|
|
||||||
ImageButton.WidthRequest = imageWitdhRequest;
|
|
||||||
break;
|
|
||||||
case ImageOrientation.ImageOnBottom:
|
|
||||||
bottom = scaledDrawable;
|
|
||||||
if (ImageButton.WidthRequest < imageWitdhRequest)
|
|
||||||
ImageButton.WidthRequest = imageWitdhRequest;
|
|
||||||
break;
|
|
||||||
case ImageOrientation.ImageCentered:
|
|
||||||
top = scaledDrawable;
|
|
||||||
if (ImageButton.HeightRequest < imageHeightRequest)
|
|
||||||
ImageButton.HeightRequest = imageHeightRequest;
|
|
||||||
if (ImageButton.WidthRequest < imageWitdhRequest)
|
|
||||||
ImageButton.WidthRequest = imageWitdhRequest;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
targetButton.SetCompoundDrawables(left, top, right, bottom);
|
|
||||||
// this.MeasureChildren(model.ImageWidthRequest, model.ImageHeightRequest);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a <see cref="Bitmap"/> for the supplied <see cref="ImageSource"/>.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="source">The <see cref="ImageSource"/> to get the image for.</param>
|
|
||||||
/// <returns>A loaded <see cref="Bitmap"/>.</returns>
|
|
||||||
private async Task<Bitmap> GetBitmapAsync(ImageSource imagesource)
|
|
||||||
|
|
||||||
{
|
|
||||||
var uriImageLoader = imagesource as UriImageSource;
|
|
||||||
if (uriImageLoader != null && uriImageLoader.Uri != null)
|
|
||||||
{
|
|
||||||
using (var client = UserHelpers.CreateJsonClient())
|
|
||||||
{
|
|
||||||
using (var response = await client.GetAsync(uriImageLoader.Uri))
|
|
||||||
{
|
|
||||||
var data = await response.Content.ReadAsByteArrayAsync();
|
|
||||||
return await BitmapFactory.DecodeByteArrayAsync(data, 0, data.Length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var resImageLoader = imagesource as StreamImageSource;
|
|
||||||
if (resImageLoader != null && resImageLoader.Stream != null)
|
|
||||||
{
|
|
||||||
return await BitmapFactory.DecodeStreamAsync(await resImageLoader.Stream(CancellationToken.None));
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called when the underlying model's properties are changed.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender">The Model used.</param>
|
|
||||||
/// <param name="e">The event arguments.</param>
|
|
||||||
protected override async void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (e.PropertyName == ImageButton.SourceProperty.PropertyName ||
|
|
||||||
e.PropertyName == ImageButton.DisabledSourceProperty.PropertyName ||
|
|
||||||
e.PropertyName == VisualElement.IsEnabledProperty.PropertyName ||
|
|
||||||
e.PropertyName == ImageButton.ImageTintColorProperty.PropertyName ||
|
|
||||||
e.PropertyName == ImageButton.DisabledImageTintColorProperty.PropertyName)
|
|
||||||
{
|
|
||||||
await SetImageSourceAsync(Control, ImageButton).ConfigureAwait(false);
|
|
||||||
}
|
|
||||||
base.OnElementPropertyChanged(sender, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns a <see cref="Drawable"/> with the correct dimensions from an
|
|
||||||
/// Android resource id.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="drawable">An android <see cref="Drawable"/>.</param>
|
|
||||||
/// <param name="width">The width to scale to.</param>
|
|
||||||
/// <param name="height">The height to scale to.</param>
|
|
||||||
/// <returns>A scaled <see cref="Drawable"/>.</returns>
|
|
||||||
private Drawable GetScaleDrawable(Drawable drawable, int width, int height)
|
|
||||||
{
|
|
||||||
var returnValue = new ScaleDrawable(drawable, 0, 100, 100).Drawable;
|
|
||||||
|
|
||||||
returnValue.SetBounds(0, 0, RequestToPixels(width), RequestToPixels(height));
|
|
||||||
|
|
||||||
return returnValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns a drawable dimension modified according to the current display DPI.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sizeRequest">The requested size in relative units.</param>
|
|
||||||
/// <returns>Size in pixels.</returns>
|
|
||||||
public int RequestToPixels(int sizeRequest)
|
|
||||||
{
|
|
||||||
if (_density == float.MinValue)
|
|
||||||
{
|
|
||||||
if (Resources.Handle == IntPtr.Zero || Resources.DisplayMetrics.Handle == IntPtr.Zero)
|
|
||||||
_density = 1.0f;
|
|
||||||
else
|
|
||||||
_density = Resources.DisplayMetrics.Density;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (int)(sizeRequest * _density);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Hot fix for the layout positioning issue on Android as described in http://forums.xamarin.com/discussion/20608/fix-for-button-layout-bug-on-android
|
|
||||||
class ImageButtonTouchListener : Java.Lang.Object, View.IOnTouchListener
|
|
||||||
{
|
|
||||||
public static readonly Lazy<ImageButtonTouchListener> Instance = new Lazy<ImageButtonTouchListener>(() => new ImageButtonTouchListener());
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Make TouchListener a singleton.
|
|
||||||
/// </summary>
|
|
||||||
private ImageButtonTouchListener()
|
|
||||||
{ }
|
|
||||||
|
|
||||||
public bool OnTouch(View v, MotionEvent e)
|
|
||||||
{
|
|
||||||
var buttonRenderer = v.Tag as Xamarin.Forms.Platform.Android.AppCompat.ButtonRenderer;
|
|
||||||
if (buttonRenderer != null && e.Action == MotionEventActions.Down) buttonRenderer.Control.Text = buttonRenderer.Element.Text;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Net.Http;
|
|
||||||
using Android.App;
|
|
||||||
using Android.Content;
|
|
||||||
using Android.OS;
|
|
||||||
using Android.Runtime;
|
|
||||||
using Android.Views;
|
|
||||||
using Android.Widget;
|
|
||||||
using Android.Graphics;
|
|
||||||
using Xamarin.Forms;
|
|
||||||
using ZicMoove.Views;
|
|
||||||
using XamSvg;
|
|
||||||
using Xamarin.Forms.Platform.Android;
|
|
||||||
|
|
||||||
[assembly: ExportRenderer(typeof(SvgImage), typeof(ZicMoove.Droid.Rendering.SvgRenderer))]
|
|
||||||
namespace ZicMoove.Droid.Rendering
|
|
||||||
{
|
|
||||||
class SvgRenderer : Xamarin.Forms.Platform.Android.AppCompat.ViewRenderer<SvgImage, ImageView>
|
|
||||||
{
|
|
||||||
private ImageView view;
|
|
||||||
private ImageView CreateNativeControl()
|
|
||||||
{
|
|
||||||
view = new ImageView(Context);
|
|
||||||
view.LayoutParameters = new Gallery.LayoutParams(LayoutParams.WrapContent, LayoutParams.FillParent);
|
|
||||||
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
protected override void OnElementChanged(ElementChangedEventArgs<SvgImage> e)
|
|
||||||
{
|
|
||||||
base.OnElementChanged(e);
|
|
||||||
|
|
||||||
if (Control == null)
|
|
||||||
{
|
|
||||||
// Init
|
|
||||||
SetNativeControl(CreateNativeControl());
|
|
||||||
}
|
|
||||||
if (e.OldElement != null)
|
|
||||||
{
|
|
||||||
// Unsubscribe
|
|
||||||
}
|
|
||||||
if (e.NewElement != null) if (e.NewElement.Svg != null)
|
|
||||||
{
|
|
||||||
// Subscribe
|
|
||||||
|
|
||||||
if (!e.NewElement.Svg.EndsWith(".svg"))
|
|
||||||
throw new NotSupportedException("Source must end width '.svg'");
|
|
||||||
var fi = new System.IO.FileInfo(e.NewElement.Svg);
|
|
||||||
if (fi.Exists)
|
|
||||||
{
|
|
||||||
using (var stream = fi.OpenRead())
|
|
||||||
{
|
|
||||||
var svg = SvgFactory.GetSvg(System.Threading.CancellationToken.None,
|
|
||||||
stream);
|
|
||||||
var drawable = XamSvg.SvgFactory.GetDrawable(svg, XamSvg.Shared.Cross.SvgFillMode.Fill);
|
|
||||||
view.SetImageDrawable(drawable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
|
||||||
in your application as resource files. Various Android APIs are designed to
|
|
||||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
|
||||||
directly.
|
|
||||||
|
|
||||||
For example, a sample Android app that contains a user interface layout (main.xml),
|
|
||||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
|
||||||
would keep its resources in the "Resources" directory of the application:
|
|
||||||
|
|
||||||
Resources/
|
|
||||||
drawable-hdpi/
|
|
||||||
icon.png
|
|
||||||
|
|
||||||
drawable-ldpi/
|
|
||||||
icon.png
|
|
||||||
|
|
||||||
drawable-mdpi/
|
|
||||||
icon.png
|
|
||||||
|
|
||||||
layout/
|
|
||||||
main.xml
|
|
||||||
|
|
||||||
values/
|
|
||||||
strings.xml
|
|
||||||
|
|
||||||
In order to get the build system to recognize Android resources, set the build action to
|
|
||||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
|
||||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
|
||||||
the build system will package the resources for distribution and generate a class called
|
|
||||||
"Resource" that contains the tokens for each one of the resources included. For example,
|
|
||||||
for the above Resources layout, this is what the Resource class would expose:
|
|
||||||
|
|
||||||
public class Resource {
|
|
||||||
public class drawable {
|
|
||||||
public const int icon = 0x123;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class layout {
|
|
||||||
public const int main = 0x456;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class strings {
|
|
||||||
public const int first_string = 0xabc;
|
|
||||||
public const int second_string = 0xbcd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
|
|
||||||
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
|
|
||||||
string in the dictionary file values/strings.xml.
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 353 B |
|
Before Width: | Height: | Size: 507 B |
|
Before Width: | Height: | Size: 601 B |
|
Before Width: | Height: | Size: 293 B |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 258 KiB |
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
<RelativeLayout
|
|
||||||
android:minWidth="25px"
|
|
||||||
android:minHeight="25px"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/relativeLayout1" />
|
|
||||||
<TextView
|
|
||||||
android:text="Validation de votre solvabilité (le retrait n'est effectué qu'une fois la préstation executée et validée par vos soins)"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/textViewReason" />
|
|
||||||
<TextView
|
|
||||||
android:text="Taille de la transaction: ... €"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/textViewAmount"
|
|
||||||
style="@style/Base.TextAppearance.AppCompat.Medium" />
|
|
||||||
<Button
|
|
||||||
android:text="Payer avec Paypal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/buttonPay" />
|
|
||||||
</LinearLayout>
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/sliding_tabs"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?attr/colorPrimary"
|
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
|
||||||
app:tabIndicatorColor="@android:color/white"
|
|
||||||
app:tabGravity="fill"
|
|
||||||
app:tabMode="fixed" />
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<android.support.v7.widget.Toolbar
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?attr/colorPrimary"
|
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
|
||||||
android:popupTheme="@style/ThemeOverlay.AppCompat.Dark"
|
|
||||||
tools:context=".MainActivity"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
|
||||||
/>
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item android:id="@+id/copy"
|
|
||||||
android:title="@string/copy"/>
|
|
||||||
<group android:id="@+id/group">
|
|
||||||
<item android:id="@+id/past"
|
|
||||||
android:title="@string/past"
|
|
||||||
android:showAsAction="ifRoom|withText"/>
|
|
||||||
</group>
|
|
||||||
<item android:id="@+id/submenu_character"
|
|
||||||
android:title="@string/character" >
|
|
||||||
<menu>
|
|
||||||
<item android:id="@+id/bold"
|
|
||||||
android:title="@string/bold" />
|
|
||||||
<item android:id="@+id/italic"
|
|
||||||
android:title="@string/italic" />
|
|
||||||
<item android:id="@+id/underline"
|
|
||||||
android:title="@string/underline" />
|
|
||||||
</menu>
|
|
||||||
</item>
|
|
||||||
<item android:id="@+id/submenu_paragraph"
|
|
||||||
android:title="@string/paragraph" >
|
|
||||||
<menu>
|
|
||||||
|
|
||||||
<item android:id="@+id/header1"
|
|
||||||
android:onClick="onGroupItemClick"
|
|
||||||
android:title="@string/header1" />
|
|
||||||
<item android:id="@+id/header2"
|
|
||||||
android:onClick="onGroupItemClick"
|
|
||||||
android:title="@string/header2" />
|
|
||||||
</menu>
|
|
||||||
</item>
|
|
||||||
</menu>
|
|
||||||
@ -1,156 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
<svg
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:ns1="http://sozi.baierouge.fr"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
id="svg2"
|
|
||||||
sodipodi:docname="mobile phone.svg"
|
|
||||||
viewBox="0 0 212.6 212.6"
|
|
||||||
version="1.1"
|
|
||||||
inkscape:version="0.48.3.1 r9886"
|
|
||||||
>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
fit-margin-left="0"
|
|
||||||
inkscape:showpageshadow="false"
|
|
||||||
inkscape:zoom="0.59451925"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:current-layer="layer1"
|
|
||||||
inkscape:cx="278.72629"
|
|
||||||
inkscape:cy="-120.86787"
|
|
||||||
borderlayer="true"
|
|
||||||
inkscape:window-maximized="0"
|
|
||||||
showgrid="false"
|
|
||||||
fit-margin-right="0"
|
|
||||||
units="mm"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
bordercolor="#666666"
|
|
||||||
inkscape:window-x="258"
|
|
||||||
inkscape:window-y="156"
|
|
||||||
fit-margin-bottom="0"
|
|
||||||
inkscape:window-width="676"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
inkscape:window-height="697"
|
|
||||||
fit-margin-top="0"
|
|
||||||
/>
|
|
||||||
<g
|
|
||||||
id="layer1"
|
|
||||||
inkscape:label="Ebene 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
transform="translate(49.578 -405.14)"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
id="path4240"
|
|
||||||
style="fill:#939a99"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
d="m138.46 518.1c-3.3948 42.183-38.678 75.363-81.735 75.363-24.407 0-46.312-10.671-61.338-27.589 0 0 24.644 3.4644 24.644 3.4644 9.5709 1.3452 18.421-5.3223 19.766-14.894l4.0045-28.501c1.2787-9.0991-4.6893-17.529-13.503-19.498 9.082 0.62988 17.237-5.8496 18.524-15.006l4.0051-28.497c1.3452-9.5715-5.3229-18.422-14.893-19.767 0 0-21.721-3.053-21.721-3.053 11.954-6.8054 25.773-10.712 40.511-10.712 45.303 0 82.028 36.724 82.028 82.026 0 2.1643-0.10988 4.3018-0.27404 6.4233-0.006 0.0794-0.0125 0.15991-0.0182 0.24049zm-157.48 24.854s44.728 6.2854 44.728 6.2854-1.3898 9.8889-1.3898 9.8889-37.839-5.3174-37.839-5.3174c-2.0917-3.4595-3.9294-7.0886-5.4993-10.857zm-4.9982-17.115l7.6074 1.0693s-1.3898 9.8889-1.3898 9.8889-3.6627-0.51513-3.6627-0.51513c-1.076-3.3887-1.9232-6.8787-2.5549-10.443zm1.1762-16.166s14.086 1.98 14.086 1.98-1.3898 9.8889-1.3898 9.8889-14.085-1.98-14.085-1.98l1.3892-9.8889zm37.587 15.367s1.3892-9.8877 1.3892-9.8877 14.086 1.98 14.086 1.98l-1.3898 9.8877s-14.085-1.98-14.085-1.98zm-6.2652 5.3674s14.087 1.98 14.087 1.98l-1.3892 9.8865s-14.086-1.98-14.086-1.98 1.3886-9.8865 1.3886-9.8865zm-5.4022-0.75927l-1.3892 9.8865-14.086-1.9788s1.3898-9.8889 1.3898-9.8889l14.086 1.9812zm-7.821-7.3462l1.3898-9.8901 14.085 1.9812-1.3898 9.8877-14.085-1.9788zm6.5247-71.766s27.39 3.8501 27.39 3.8501l-5.448 38.76s-45.251-6.3611-45.251-6.3611c4.4409-14.11 12.592-26.573 23.31-36.249zm54.942-45.398c-58.707 0-106.3 47.59-106.3 106.3 0 58.708 47.592 106.3 106.3 106.3 58.707 0 106.3-47.59 106.3-106.3 0-58.708-47.592-106.3-106.3-106.3zm35.055 69.49c0.62439-4.4409-0.61524-8.7121-3.1207-12.028l-8.2513 15.372-7.5653 0.23681s-3.985-6.4355-3.985-6.4355l8.3325-15.526c-8.5565-0.7788-16.307 5.2686-17.515 13.868-0.88868 6.3232 2.0111 12.291 6.9556 15.657 0 0-11.881 84.541-11.881 84.541l14.232 1.9983 4.4104-31.383 7.4762-53.196c5.6384-1.8945 10.028-6.814 10.912-13.105zm-6.8634 19.672l12.874 9.9072s3.0158 0.42358 3.0158 0.42358l-7.1362 50.776 14.232 1.9983 7.1362-50.774 8.54 1.2 2.2333-15.885s-25.789-3.6243-25.789-3.6243-15.106 5.9778-15.106 5.9778z"
|
|
||||||
/>
|
|
||||||
</g
|
|
||||||
>
|
|
||||||
<metadata
|
|
||||||
>
|
|
||||||
<rdf:RDF
|
|
||||||
>
|
|
||||||
<cc:Work
|
|
||||||
>
|
|
||||||
<dc:format
|
|
||||||
>image/svg+xml</dc:format
|
|
||||||
>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
|
|
||||||
/>
|
|
||||||
<cc:license
|
|
||||||
rdf:resource="http://creativecommons.org/licenses/publicdomain/"
|
|
||||||
/>
|
|
||||||
<dc:publisher
|
|
||||||
>
|
|
||||||
<cc:Agent
|
|
||||||
rdf:about="http://openclipart.org/"
|
|
||||||
>
|
|
||||||
<dc:title
|
|
||||||
>Openclipart</dc:title
|
|
||||||
>
|
|
||||||
</cc:Agent
|
|
||||||
>
|
|
||||||
</dc:publisher
|
|
||||||
>
|
|
||||||
<dc:title
|
|
||||||
>Web 2.0</dc:title
|
|
||||||
>
|
|
||||||
<dc:date
|
|
||||||
>2013-01-18T05:56:20</dc:date
|
|
||||||
>
|
|
||||||
<dc:description
|
|
||||||
>Icon for web 2.0</dc:description
|
|
||||||
>
|
|
||||||
<dc:source
|
|
||||||
>https://openclipart.org/detail/174317/web-2.0-by-fallerton-174317</dc:source
|
|
||||||
>
|
|
||||||
<dc:creator
|
|
||||||
>
|
|
||||||
<cc:Agent
|
|
||||||
>
|
|
||||||
<dc:title
|
|
||||||
>Fallerton</dc:title
|
|
||||||
>
|
|
||||||
</cc:Agent
|
|
||||||
>
|
|
||||||
</dc:creator
|
|
||||||
>
|
|
||||||
<dc:subject
|
|
||||||
>
|
|
||||||
<rdf:Bag
|
|
||||||
>
|
|
||||||
<rdf:li
|
|
||||||
>2.0</rdf:li
|
|
||||||
>
|
|
||||||
<rdf:li
|
|
||||||
>extended</rdf:li
|
|
||||||
>
|
|
||||||
<rdf:li
|
|
||||||
>web</rdf:li
|
|
||||||
>
|
|
||||||
<rdf:li
|
|
||||||
>wide</rdf:li
|
|
||||||
>
|
|
||||||
<rdf:li
|
|
||||||
>world</rdf:li
|
|
||||||
>
|
|
||||||
<rdf:li
|
|
||||||
>www</rdf:li
|
|
||||||
>
|
|
||||||
</rdf:Bag
|
|
||||||
>
|
|
||||||
</dc:subject
|
|
||||||
>
|
|
||||||
</cc:Work
|
|
||||||
>
|
|
||||||
<cc:License
|
|
||||||
rdf:about="http://creativecommons.org/licenses/publicdomain/"
|
|
||||||
>
|
|
||||||
<cc:permits
|
|
||||||
rdf:resource="http://creativecommons.org/ns#Reproduction"
|
|
||||||
/>
|
|
||||||
<cc:permits
|
|
||||||
rdf:resource="http://creativecommons.org/ns#Distribution"
|
|
||||||
/>
|
|
||||||
<cc:permits
|
|
||||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks"
|
|
||||||
/>
|
|
||||||
</cc:License
|
|
||||||
>
|
|
||||||
</rdf:RDF
|
|
||||||
>
|
|
||||||
</metadata
|
|
||||||
>
|
|
||||||
</svg
|
|
||||||
>
|
|
||||||
|
Before Width: | Height: | Size: 5.7 KiB |
@ -1,44 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<resources>
|
|
||||||
|
|
||||||
<style name="MainTheme" parent="MainTheme.Base">
|
|
||||||
<item name="android:windowBackground">@color/windowBackground</item>
|
|
||||||
<item name="android:windowNoTitle">true</item>
|
|
||||||
<item name="android:statusBarColor">@color/primaryDark</item>
|
|
||||||
<item name="android:colorPrimaryDark">@color/primaryDark</item>
|
|
||||||
<item name="android:windowFullscreen">true</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<!-- Base theme applied no matter what API -->
|
|
||||||
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
|
|
||||||
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
|
|
||||||
<item name="windowNoTitle">true</item>
|
|
||||||
<!--We will be using the toolbar so no need to show ActionBar-->
|
|
||||||
<item name="windowActionBar">false</item>
|
|
||||||
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
|
|
||||||
<!-- colorPrimary is used for the default action bar background -->
|
|
||||||
<item name="colorPrimary">#2196F3</item>
|
|
||||||
<!-- colorPrimaryDark is used for the status bar -->
|
|
||||||
<item name="colorPrimaryDark">#1976D2</item>
|
|
||||||
<!-- colorAccent is used as the default value for colorControlActivated
|
|
||||||
which is used to tint widgets -->
|
|
||||||
<item name="colorAccent">#FF4081</item>
|
|
||||||
<!-- You can also set colorControlNormal, colorControlActivated
|
|
||||||
colorControlHighlight and colorSwitchThumbNormal. -->
|
|
||||||
<item name="windowActionModeOverlay">true</item>
|
|
||||||
|
|
||||||
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
|
|
||||||
<!--We will be using the toolbar so no need to show ActionBar-->
|
|
||||||
<!-- <item name="android:actionBarStyle">@style/MyActionBar</item> -->
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
|
|
||||||
<item name="colorAccent">#FF4081</item>
|
|
||||||
</style>
|
|
||||||
<!--
|
|
||||||
<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
|
|
||||||
<item name="android:background">#A97946</item>
|
|
||||||
</style> -->
|
|
||||||
|
|
||||||
</resources>
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
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 ZicMoove.Droid
|
|
||||||
{
|
|
||||||
[Activity(Label = "SendFileActivity")]
|
|
||||||
[MetaData("android.service.chooser.chooser_target_service", Value = Constants.ApplicationName + ".YavscChooserTargetService")]
|
|
||||||
[IntentFilter(new[] { "android.intent.action.SEND" },
|
|
||||||
Categories = new[] { "android.intent.category.DEFAULT" },
|
|
||||||
Icon = "@drawable/icon",
|
|
||||||
Label = Constants.SendToApp)]
|
|
||||||
public class SendFileActivity : Activity
|
|
||||||
{
|
|
||||||
protected override void OnCreate(Bundle savedInstanceState)
|
|
||||||
{
|
|
||||||
base.OnCreate(savedInstanceState);
|
|
||||||
|
|
||||||
// Create your application here
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
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 ZicMoove.Droid.OAuth;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Services
|
|
||||||
{
|
|
||||||
[Service(
|
|
||||||
Name = Constants.ApplicationName + ".AccountChooserService",
|
|
||||||
Label = Constants.ApplicationLabel + " accounts service",
|
|
||||||
Icon = "@drawable/icon",
|
|
||||||
Exported = true,
|
|
||||||
Enabled = true
|
|
||||||
)]
|
|
||||||
[IntentFilter(new String[] { "android.accounts.AccountAuthenticator" })]
|
|
||||||
[MetaData("android.accounts.AccountAuthenticator",Resource = "@xml/authenticator")]
|
|
||||||
class AccountChooserService : Service
|
|
||||||
{
|
|
||||||
public static YaOAuth2Authenticator authenticator;
|
|
||||||
public override void OnCreate()
|
|
||||||
{
|
|
||||||
base.OnCreate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IBinder OnBind(Intent intent)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
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 ZicMoove.Droid.Interfaces;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Services.GCMHandlers
|
|
||||||
{
|
|
||||||
public abstract class GCMessageHandler : IGCMessageHandler
|
|
||||||
{
|
|
||||||
protected Context context;
|
|
||||||
protected NotificationManager notificationManager;
|
|
||||||
protected Notification.Builder notificationBuilder;
|
|
||||||
public GCMessageHandler(Context context,
|
|
||||||
NotificationManager notificationManager,
|
|
||||||
Notification.Builder notificationBuilder)
|
|
||||||
{
|
|
||||||
this.context = context;
|
|
||||||
this.notificationBuilder = notificationBuilder;
|
|
||||||
this.notificationManager = notificationManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void Handle(string from, Bundle data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
using Android.App;
|
|
||||||
using Android.Content;
|
|
||||||
using Android.OS;
|
|
||||||
using Android.Runtime;
|
|
||||||
using Android.Views;
|
|
||||||
using Android.Widget;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Services.GCMHandlers
|
|
||||||
{
|
|
||||||
using Interfaces;
|
|
||||||
using Model.Social;
|
|
||||||
using Data;
|
|
||||||
using Model;
|
|
||||||
using Model.Musical;
|
|
||||||
|
|
||||||
public class BookQueryGCMHandler : GCMessageHandler
|
|
||||||
{
|
|
||||||
public BookQueryGCMHandler(
|
|
||||||
Context context,
|
|
||||||
NotificationManager manager,
|
|
||||||
Notification.Builder builder) : base(context,manager,builder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Prend en charge le message push
|
|
||||||
/// contenant une nouvelle demande de rendez-vous
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="from"></param>
|
|
||||||
/// <param name="data"></param>
|
|
||||||
public override void Handle(string from, Bundle data)
|
|
||||||
{
|
|
||||||
var locationJson = data.GetString("Location");
|
|
||||||
var location = JsonConvert.DeserializeObject<Location>(locationJson);
|
|
||||||
var cid = long.Parse(data.GetString("Id"));
|
|
||||||
var clientJson = data.GetString("Client");
|
|
||||||
var client = JsonConvert.DeserializeObject<ClientProviderInfo>(clientJson);
|
|
||||||
var bq = new BookQuery
|
|
||||||
{
|
|
||||||
Id = cid,
|
|
||||||
Location = location,
|
|
||||||
Client = client,
|
|
||||||
Reason = data.GetString("Reason")
|
|
||||||
};
|
|
||||||
var dateString = data.GetString("EventDate");
|
|
||||||
DateTime evDate;
|
|
||||||
if (DateTime.TryParse(dateString, out evDate))
|
|
||||||
{
|
|
||||||
bq.EventDate = evDate;
|
|
||||||
}
|
|
||||||
SendBookQueryNotification(bq);
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// Notifie la demande
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="bquery"></param>
|
|
||||||
void SendBookQueryNotification(BookQuery bquery)
|
|
||||||
{
|
|
||||||
DataManager.Instance.BookQueries.Merge(bquery);
|
|
||||||
var bookquerynotifications = DataManager.Instance.BookQueries.Where(
|
|
||||||
q => !q.Read && q.EventDate > DateTime.Now
|
|
||||||
).ToArray();
|
|
||||||
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}\n {bquery.Reason}";
|
|
||||||
|
|
||||||
var intent = new Intent(context, typeof(MainActivity));
|
|
||||||
intent.AddFlags(ActivityFlags.ClearTop);
|
|
||||||
intent.PutExtra("BookQueryId", bquery.Id);
|
|
||||||
|
|
||||||
var pendingIntent = PendingIntent.GetActivity(context, 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,119 +0,0 @@
|
|||||||
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 Newtonsoft.Json;
|
|
||||||
using ZicMoove.Model.Social;
|
|
||||||
using ZicMoove.Model;
|
|
||||||
using ZicMoove.Model.Workflow;
|
|
||||||
using ZicMoove.Data;
|
|
||||||
using ZicMoove.Settings;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Services.GCMHandlers
|
|
||||||
{
|
|
||||||
class EstimateGCMHandler: GCMessageHandler
|
|
||||||
{
|
|
||||||
public EstimateGCMHandler(Context context,
|
|
||||||
NotificationManager manager,
|
|
||||||
Notification.Builder builder) :
|
|
||||||
base(context,manager,builder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Handle(string from, Bundle data)
|
|
||||||
{
|
|
||||||
var locationJson = data.GetString("Location");
|
|
||||||
var location = JsonConvert.DeserializeObject<Location>(locationJson);
|
|
||||||
var eid = long.Parse(data.GetString("Id"));
|
|
||||||
var clientJson = data.GetString("Client");
|
|
||||||
var client = JsonConvert.DeserializeObject<ClientProviderInfo>(clientJson);
|
|
||||||
var estimate = new Estimate
|
|
||||||
{
|
|
||||||
Id = eid,
|
|
||||||
CommandType = data.GetString("CommandType")
|
|
||||||
};
|
|
||||||
var dateString = data.GetString("ProviderValidationDate");
|
|
||||||
DateTime evDate;
|
|
||||||
if (DateTime.TryParse(dateString, out evDate))
|
|
||||||
{
|
|
||||||
estimate.ProviderValidationDate = evDate;
|
|
||||||
}
|
|
||||||
Notify(estimate);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Notify (Estimate estimate)
|
|
||||||
{
|
|
||||||
// do merge the data, even when no user is active
|
|
||||||
DataManager.Instance.Estimates.Merge(estimate);
|
|
||||||
if (MainSettings.CurrentUser == null) return;
|
|
||||||
var estimatenotifications = DataManager.Instance.Estimates.Where(
|
|
||||||
e => e.ClientApprouvalDate == default(DateTime) &&
|
|
||||||
e.ClientId == MainSettings.CurrentUser.Id
|
|
||||||
).OrderByDescending(e=>e.ProviderValidationDate).ToArray();
|
|
||||||
var count = estimatenotifications.Length;
|
|
||||||
var multiple = count > 1;
|
|
||||||
string title;
|
|
||||||
string message;
|
|
||||||
if (multiple)
|
|
||||||
{
|
|
||||||
StringBuilder tb = new StringBuilder();
|
|
||||||
int nc = 0;
|
|
||||||
foreach (var pro in estimatenotifications.Select(
|
|
||||||
e=>e.Owner
|
|
||||||
).Distinct())
|
|
||||||
{
|
|
||||||
nc++;
|
|
||||||
tb.Append($"{pro.UserName}");
|
|
||||||
if (nc > 3)
|
|
||||||
{
|
|
||||||
tb.Append(" et {count-nc} autres");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else tb.Append(", ");
|
|
||||||
}
|
|
||||||
tb.Append("attendent votre validation de leur devis");
|
|
||||||
title = tb.ToString();
|
|
||||||
message =
|
|
||||||
string.Join("\n",
|
|
||||||
estimatenotifications.Select(
|
|
||||||
n => $"{n.Title} [{n.Owner.UserName}]\n").ToArray());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
title = $"{estimate.Owner.UserName} attend votre validation de son devis";
|
|
||||||
message = $"{estimate.Title} ({estimate.Total} euro)\n({estimate.Query.Reason})";
|
|
||||||
}
|
|
||||||
|
|
||||||
var intent = new Intent(context, typeof(MainActivity));
|
|
||||||
intent.AddFlags(ActivityFlags.ClearTop);
|
|
||||||
intent.PutExtra("EstimateId", estimate.Id);
|
|
||||||
|
|
||||||
var pendingIntent = PendingIntent.GetActivity(context, 0, intent, PendingIntentFlags.OneShot);
|
|
||||||
Notification.InboxStyle inboxStyle = new Notification.InboxStyle();
|
|
||||||
int maxil = 5;
|
|
||||||
for (int cn = 0; cn < count && cn < maxil; cn++)
|
|
||||||
{
|
|
||||||
inboxStyle.AddLine(estimatenotifications[cn].Owner.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(notificationId, notification);
|
|
||||||
}
|
|
||||||
|
|
||||||
int notificationId = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,85 +0,0 @@
|
|||||||
|
|
||||||
using Android.App;
|
|
||||||
using Android.Content;
|
|
||||||
using Android.OS;
|
|
||||||
using Android.Gms.Gcm;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid.Services
|
|
||||||
{
|
|
||||||
using Model.Social;
|
|
||||||
using Model;
|
|
||||||
using Data;
|
|
||||||
using Interfaces;
|
|
||||||
using GCMHandlers;
|
|
||||||
|
|
||||||
namespace ClientApp
|
|
||||||
{
|
|
||||||
[Service(Exported = false), IntentFilter(new[] { "com.google.android.c2dm.intent.RECEIVE" })]
|
|
||||||
public class MyGcmListenerService : GcmListenerService
|
|
||||||
{
|
|
||||||
private Notification.Builder notificationBuilder;
|
|
||||||
|
|
||||||
NotificationManager notificationManager;
|
|
||||||
Dictionary<string, IGCMessageHandler> Handlers;
|
|
||||||
public override void OnCreate()
|
|
||||||
{
|
|
||||||
base.OnCreate();
|
|
||||||
notificationBuilder = new Notification.Builder(this)
|
|
||||||
.SetSmallIcon(Resource.Drawable.icon)
|
|
||||||
.SetAutoCancel(true);
|
|
||||||
notificationManager = (NotificationManager)GetSystemService(Context.NotificationService);
|
|
||||||
Handlers = new Dictionary<string, IGCMessageHandler>
|
|
||||||
{
|
|
||||||
{"RdvQuery", new BookQueryGCMHandler(this,notificationManager,notificationBuilder) },
|
|
||||||
{"Estimation", new EstimateGCMHandler(this,notificationManager,notificationBuilder) },
|
|
||||||
{"HairCutQuery", new HairCutQueryGCMHandler(this,notificationManager,notificationBuilder) },
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
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 (Handlers.ContainsKey(topic))
|
|
||||||
{
|
|
||||||
Handlers[topic].Handle(from, data);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new NotImplementedException(topic);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* TODO cleaning
|
|
||||||
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(title)
|
|
||||||
.SetContentText(message)
|
|
||||||
.SetAutoCancel(true)
|
|
||||||
.SetContentIntent(pendingIntent);
|
|
||||||
|
|
||||||
notificationManager.Notify(0, notificationBuilder.Build());
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,114 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Android.App;
|
|
||||||
using Android.Content;
|
|
||||||
using Android.Util;
|
|
||||||
using System.Net;
|
|
||||||
using System.IO;
|
|
||||||
using Android.Gms.Gcm;
|
|
||||||
using Android.Gms.Gcm.Iid;
|
|
||||||
using Android.OS;
|
|
||||||
using Android;
|
|
||||||
using ZicMoove.Settings;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid
|
|
||||||
{
|
|
||||||
|
|
||||||
[Service(Exported = false), IntentFilter(new[] { "com.google.android.c2dm.intent.REGISTRATION" })]
|
|
||||||
class GcmRegistrationIntentService : IntentService
|
|
||||||
{
|
|
||||||
static object locker = new object();
|
|
||||||
|
|
||||||
public GcmRegistrationIntentService() : base("RegistrationIntentService") {
|
|
||||||
}
|
|
||||||
|
|
||||||
static PowerManager.WakeLock sWakeLock;
|
|
||||||
static object LOCK = new object();
|
|
||||||
|
|
||||||
public override void OnCreate()
|
|
||||||
{
|
|
||||||
base.OnCreate();
|
|
||||||
sWakeLock = PowerManager.FromContext(this).NewWakeLock(WakeLockFlags.Partial,
|
|
||||||
"ZicMoove");
|
|
||||||
sWakeLock.Acquire();
|
|
||||||
}
|
|
||||||
public override void OnDestroy()
|
|
||||||
{
|
|
||||||
base.OnDestroy();
|
|
||||||
sWakeLock.Release();
|
|
||||||
}
|
|
||||||
protected override void OnHandleIntent (Intent intent)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Log.Info ("RegistrationIntentService", "Calling InstanceID.GetToken");
|
|
||||||
lock (locker)
|
|
||||||
{
|
|
||||||
|
|
||||||
var instanceID = InstanceID.GetInstance(this);
|
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
// When debugging, and application data/cache is preserved,
|
|
||||||
// a previous instance comes from another application installation
|
|
||||||
// and the old registration against GCM fails,
|
|
||||||
// until one delete it.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
instanceID.DeleteInstanceID();
|
|
||||||
}
|
|
||||||
catch(Exception ex)
|
|
||||||
{
|
|
||||||
Debug.WaitForDebugger();
|
|
||||||
Log.Debug("bas.GCM", ex.StackTrace.ToString());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
var senderid = Constants.GoogleSenderId;
|
|
||||||
var token = instanceID.GetToken ( senderid,
|
|
||||||
GoogleCloudMessaging.InstanceIdScope, null);
|
|
||||||
|
|
||||||
Log.Info ("RegistrationIntentService", "GCM Registration Token: " + token);
|
|
||||||
SendRegistrationToAppServer (token);
|
|
||||||
Subscribe (token);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (WebException e) {
|
|
||||||
Log.Debug ("RegistrationIntentService", "Failed to get a registration token");
|
|
||||||
if (e.Response!=null)
|
|
||||||
using (var s = e.Response.GetResponseStream ()) {
|
|
||||||
using (var r = new StreamReader (s)) {
|
|
||||||
var t = r.ReadToEnd ();
|
|
||||||
Log.Debug("RegistrationIntentService",t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Log.Error ("RegistrationIntentService", "Failed to get a registration token");
|
|
||||||
Log.Error ("RegistrationIntentService", e.Message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SendRegistrationToAppServer (string token)
|
|
||||||
{
|
|
||||||
MainSettings.GoogleRegId = token;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Subscribe (string token)
|
|
||||||
{
|
|
||||||
var pubSub = GcmPubSub.GetInstance(this);
|
|
||||||
pubSub.Subscribe(token, "/topics/global", null);
|
|
||||||
///if (MainSettings.CurrentUser.Roles.Contains("Performer"))
|
|
||||||
// TODO add activity codes in the bundle
|
|
||||||
//pubSub.Subscribe(token, "/topics/jobs", null);
|
|
||||||
// TODO if a Activity is specified,
|
|
||||||
// and general annonces in this activity are accepted:
|
|
||||||
// pubSub.Subscribe(token, "/topics/jobs/"+ActivityCode, null);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
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.Service.Chooser;
|
|
||||||
using static Android.Manifest;
|
|
||||||
|
|
||||||
namespace ZicMoove.Droid
|
|
||||||
{
|
|
||||||
[Service(
|
|
||||||
Name = Constants.ApplicationName + ".YavscChooserTargetService",
|
|
||||||
Label = Constants.ApplicationLabel + " share service",
|
|
||||||
Permission = Permission.BindChooserTargetService,
|
|
||||||
Icon = "@drawable/icon",
|
|
||||||
Exported = true,
|
|
||||||
Enabled = true
|
|
||||||
)]
|
|
||||||
[IntentFilter(new String[] { "android.service.chooser.ChooserTargetService" })]
|
|
||||||
class YavscChooserTargetService : ChooserTargetService
|
|
||||||
{
|
|
||||||
public override IList<ChooserTarget> OnGetChooserTargets(ComponentName targetActivityName, IntentFilter matchedFilter)
|
|
||||||
{
|
|
||||||
Android.Graphics.Drawables.Icon i =
|
|
||||||
Android.Graphics.Drawables.Icon.CreateWithResource(this.BaseContext,
|
|
||||||
Resource.Drawable.icon);
|
|
||||||
ChooserTarget t = new ChooserTarget(
|
|
||||||
new Java.Lang.String(
|
|
||||||
Constants.ApplicationLabel), i,
|
|
||||||
.5f, new ComponentName(this, "ZicMoove.SendFilesActivity"),
|
|
||||||
null);
|
|
||||||
var res = new List<ChooserTarget>();
|
|
||||||
res.Add(t);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IBinder OnBind(Intent intent)
|
|
||||||
{
|
|
||||||
return base.OnBind(intent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime" publicKeyToken="B03F5F7F11D50A3A" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.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>
|
|
||||||
<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" />
|
|
||||||
</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" />
|
|
||||||
</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" />
|
|
||||||
</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" />
|
|
||||||
</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" />
|
|
||||||
</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>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="XLabs.Serialization" publicKeyToken="d65109b36e5040e4" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.5782.15703" newVersion="2.0.5782.15703" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
{
|
|
||||||
"project_info": {
|
|
||||||
"project_number": "325408689282",
|
|
||||||
"project_id": "yavsc-001"
|
|
||||||
},
|
|
||||||
"client": [
|
|
||||||
{
|
|
||||||
"client_info": {
|
|
||||||
"android_client_info": {
|
|
||||||
"package_name": "fr.pschneider.android.wearable.speedtracker"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oauth_client": [
|
|
||||||
{
|
|
||||||
"client_id": "325408689282-6bekh7p3guj4k0f3301a6frf025cnrk1.apps.googleusercontent.com",
|
|
||||||
"client_type": 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"api_key": [
|
|
||||||
{
|
|
||||||
"current_key": "AIzaSyBCAE_pc6lrxLf8_Vyho0KSxLsqjxecPFk"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": {
|
|
||||||
"analytics_service": {
|
|
||||||
"status": 1
|
|
||||||
},
|
|
||||||
"appinvite_service": {
|
|
||||||
"status": 1,
|
|
||||||
"other_platform_oauth_client": []
|
|
||||||
},
|
|
||||||
"ads_service": {
|
|
||||||
"status": 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_info": {
|
|
||||||
"mobilesdk_app_id": "1:325408689282:android:50a2328516f10af3",
|
|
||||||
"android_client_info": {
|
|
||||||
"package_name": "fr.pschneider.bas"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oauth_client": [
|
|
||||||
{
|
|
||||||
"client_id": "325408689282-emdeucmt5pr9jg7170t0q9gnndacsqqf.apps.googleusercontent.com",
|
|
||||||
"client_type": 1,
|
|
||||||
"android_info": {
|
|
||||||
"package_name": "fr.pschneider.bas",
|
|
||||||
"certificate_hash": "E97A345457861B8E2E7BA79BB814BB1ACC0471A6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_id": "325408689282-6bekh7p3guj4k0f3301a6frf025cnrk1.apps.googleusercontent.com",
|
|
||||||
"client_type": 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"api_key": [
|
|
||||||
{
|
|
||||||
"current_key": "AIzaSyBCAE_pc6lrxLf8_Vyho0KSxLsqjxecPFk"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": {
|
|
||||||
"analytics_service": {
|
|
||||||
"status": 1
|
|
||||||
},
|
|
||||||
"appinvite_service": {
|
|
||||||
"status": 1,
|
|
||||||
"other_platform_oauth_client": []
|
|
||||||
},
|
|
||||||
"ads_service": {
|
|
||||||
"status": 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"configuration_version": "1"
|
|
||||||
}
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="ExifLib.PCL" version="1.0.1" targetFramework="monoandroid70" />
|
|
||||||
<package id="Kobush.Build" version="2.2.0.0" targetFramework="monoandroid70" />
|
|
||||||
<package id="MarkdownDeep-av.NET" version="1.5.6.5" targetFramework="monoandroid71" />
|
|
||||||
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="monoandroid70" />
|
|
||||||
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="monoandroid71" />
|
|
||||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="monoandroid71" />
|
|
||||||
<package id="Plugin.CurrentActivity" version="1.0.1" targetFramework="monoandroid70" />
|
|
||||||
<package id="Plugin.Permissions" version="1.1.7" targetFramework="monoandroid70" />
|
|
||||||
<package id="Plugin.Share" version="3.0.1" targetFramework="monoandroid70" />
|
|
||||||
<package id="Softlion.XamSvg.Free" version="2.3.2.5" targetFramework="monoandroid70" />
|
|
||||||
<package id="SQLite.Net.Async-PCL" version="3.1.1" targetFramework="monoandroid70" />
|
|
||||||
<package id="SQLite.Net.Core-PCL" version="3.1.1" targetFramework="monoandroid70" />
|
|
||||||
<package id="SQLite.Net.Platform.XamarinAndroid" version="2.5.1" targetFramework="monoandroid70" />
|
|
||||||
<package id="SQLite.Net-PCL" version="3.1.1" targetFramework="monoandroid70" />
|
|
||||||
<package id="Square.OkHttp3" version="3.4.1.1" targetFramework="monoandroid70" />
|
|
||||||
<package id="Square.OkIO" version="1.6.0.0" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xam.PayPal.Droid" version="2.15.1.1" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xam.Plugin.Connectivity" version="2.2.12" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xam.Plugin.DeviceInfo" version="2.0.2" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xam.Plugin.Geofence" version="1.1.2" targetFramework="monoandroid70" developmentDependency="true" />
|
|
||||||
<package id="Xam.Plugin.Geolocator" version="3.0.4" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xam.Plugin.Media" version="2.3.0" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xam.Plugins.Settings" version="2.5.1.0" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
|
|
||||||
<package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid60" />
|
|
||||||
<package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" />
|
|
||||||
<package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="monoandroid60" />
|
|
||||||
<package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="monoandroid60" />
|
|
||||||
<package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid60" />
|
|
||||||
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid60" />
|
|
||||||
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
|
|
||||||
<package id="Xamarin.Controls.SignaturePad" version="1.4.0" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.Controls.SignaturePad.Forms" version="1.4.0" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.Forms" version="2.3.3.193" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.Forms.Maps" version="2.3.3.193" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.GooglePlayServices.Ads" version="29.0.0.2" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.GooglePlayServices.Analytics" version="29.0.0.2" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.GooglePlayServices.Base" version="29.0.0.2" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.GooglePlayServices.Basement" version="29.0.0.2" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.GooglePlayServices.Gcm" version="29.0.0.2" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.GooglePlayServices.Location" version="29.0.0.2" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.GooglePlayServices.Maps" version="29.0.0.2" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.GooglePlayServices.Measurement" version="29.0.0.2" targetFramework="monoandroid70" />
|
|
||||||
<package id="Xamarin.PayPal.Android.CardIO" version="1.0.0" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.Caching" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.Caching.SQLite" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.Core" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.Forms" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.IoC" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.Platform" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.Serialization" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.Serialization.JSON" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.Settings" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
<package id="XLabs.Settings.XamSettings" version="2.3.0-pre02" targetFramework="monoandroid70" />
|
|
||||||
</packages>
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
<Application
|
|
||||||
x:Class="App2.UWP.App"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="using:App2.UWP"
|
|
||||||
RequestedTheme="Light">
|
|
||||||
|
|
||||||
</Application>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |