Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Clean Koztumize

  • Loading branch information...
commit fbf3c71d5d0f247ed4f8b90839debe58cc2a047e 1 parent 3ea2b8b
@abois abois authored
View
159 static/TeddyBar/teddybar.css~
@@ -1,159 +0,0 @@
-body {
- margin-top:40px;
-}
-
-#teddybar {
- position: fixed;
- top: 0;
- left: 0;
- display: block;
- z-index: 1000;
- width: 100%;
- min-height: 40px;
- background: -moz-linear-gradient(center bottom, #C6C6C6 0%, #E2E1E2 100%) repeat scroll 0 0 #DDD;
- background: -webkit-linear-gradient(#C6C6C6,#E2E1E2) repeat scroll 0 0 #DDD;
- box-shadow: 0 0 5px #fff;
- border: 1px solid #999;
- border-bottom: 1px solid #727272;
-}
-
-#teddybar ul {
- list-style: none;
- padding: 0;
- margin: 0.25em 1em;
- display:inline;
-}
-
-#teddybar li {
- display: inline-block;
-}
-
-#teddybar li > input {
- width: 32px;
- height: 32px;
- cursor: pointer;
- border: none;
- font-size: 0;
-}
-
-#teddybar li > input::-moz-focus-inner{
- border: 0;
-}
-
-#teddybar li > input:active, #teddybar li > input:hover {
- box-shadow:
- 0px 2px 2px 0px rgba(0, 0, 0, 0.5) inset,
- 0px 2px 2px 0px rgba(255, 255, 255, 0.5);
-}
-
-#teddybar input.bold {
- background: url(icons/bold.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.italic {
- background: url(icons/italic.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.underline {
- background: url(icons/underline.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.strikethrough {
- background: url(icons/strikethrough.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.paragraph {
- background: url(icons/paragraph.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.insertunorderedlist {
- background: url(icons/list.png) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.insertorderedlist {
- background: url(icons/ordered_list.png) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.justifyleft {
- background: url(icons/left.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.justifyright {
- background: url(icons/right.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.justifycenter {
- background: url(icons/center.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.justifyfull {
- background: url(icons/full.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.undo {
- background: url(icons/undo.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.redo {
- background: url(icons/redo.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.generate {
- background: url(icons/pdf.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.save {
- background: url(icons/save.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.insertimage {
- background: url(icons/image.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.history {
- background: url(icons/history.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.update {
- background: url(icons/update.png) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar input.model {
- background: url(icons/documentnew.svg) no-repeat;
- background-size: 100% 100%;
-}
-
-#teddybar select {
- background: transparent;
- color: #333;
- font-size: 0.9em;
- max-width: 200px;
- overflow: hidden;
- position:relative;
- top:7px;
-}
-
-#teddybar option {
- background: transparent;
- color: #333;
- border-right: 1px solid #444;
- border-left: 1px solid #444;
-}
View
100 static/TeddyBar/teddybar.js~
@@ -1,100 +0,0 @@
-// Copyright (C) 2012 Kozea
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as
-// published by the Free Software Foundation, either version 3 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-(function ($) {
- $.fn.teddybar = function (options) {
- var config = {
- document : function () { return document.getElementById('iframe').contentWindow.document },
- menu : {
- 'Gras': 'bold',
- 'Italique': 'italic',
- 'Souligné': 'underline',
- 'Barré': 'strikethrough',
- '-1': null,
- 'Police': ['fontname', {'-- Police --': '0','Fontin': 'fontin', 'Serif': 'sefif', 'Sans-serif': 'sans-serif', 'Courier': 'Courier new', 'Monospace': 'monospace'}],
- 'Taille': ['fontsize', {'-- Taille --': '0','1 (8pt)': '1', '2 (10pt)': '2','3 (12pt)': '3','4 (14pt)': '4','5 (18pt)': '5','6 (24pt)': '6','7 (36pt)': '7'}],
- 'Format': ['formatblock', {'-- Format --': '0','Titre 1': 'h1','Titre 2': 'h2','Titre 3': 'h3','Titre 4': 'h4','Titre 5': 'h5','Titre 6': 'h6','Paragraphe': 'p','Preformaté': 'pre','Retirer le format':'removeformat'}],
- '-2': null,
- 'Liste numérotée': 'insertorderedlist',
- 'Liste non numérotée': 'insertunorderedlist',
- '-3': null,
- 'Aligner à gauche': 'justifyleft',
- 'Aligner à droite': 'justifyright',
- 'Centrer': 'justifycenter',
- 'Justifier': 'justifyfull',
- '-4': null,
- 'Annuler': 'undo',
- 'Refaire': 'redo',
- '-5': null,
- 'Insérer une image': 'insertimage',
- '-6': null,
- 'Enregistrer sous': 'save',
- 'Générer en PDF': 'generate'
- },
- commands : {
- //'save': function(){ alert('TODO') }
- }
- };
- if (options) {
- $.extend(true,config, options);
- }
- return this.each(function () {
- var $this=$(this);
- var block = $('<ul>').appendTo($this);
- $.each(config.menu, function (name, command) {
- if (command == null) {
- // make a separator
- block = $('<ul>').appendTo($this);
- } else if (typeof command == 'string') {
- // make a button
- $('<input>', {"title": name, "type": "button", "value": name, "class": command, "data-command": command}).appendTo(block).wrap('<li>');
- } else {
- // make a select
- $('<select>', {"title": name, "data-command": command[0]}).appendTo(block).wrap('<li>');
- $.each(command[1], function(label, value) {
- $('select[data-command='+command[0]+']').append($('<option>', {"value":value}).html(label));
- });
- }
- });
-
- // execCommand on select elements
- $('select').change(function() {
- var command = $(this).attr('data-command');
- var value = $(this).val();
- if (command in config.commands) {
- config.commands[command](value);
- } else {
- config.document().execCommand(command,false,value);
- }
- });
-
- // execCommand on input elements
- $('input[type=button]').on('click', function () {
- var command = $(this).attr('data-command');
- if (command in config.commands) {
- config.commands[command]();
- } else {
- config.document().execCommand(command,false,'');
- }
- });
-
- // function that always puts the toolbar above the body
- $(window).resize(function() {
- $('body').css('margin-top',$this.height());
- });
- });
- };
-})(jQuery);
View
BIN  static/img/horse.jpg
Deleted file not rendered
View
BIN  static/img/horse.jpg~
Binary file not shown
View
BIN  templates/koztumize HTML.zip
Binary file not shown
View
25 templates/koztumize HTML/archive.html
@@ -1,25 +0,0 @@
-{% block head %}
- <title>Koztumize - Vos archives </title>
-{% endblock head %}
-{% extends "layout.html" %}
-{% block content %}
-<h3>Vos archives</h3>
-<aside>
- <a href="/">index</a>
- {% for parent in path.split('/')%}
- / <a href="{{ url_for('archive', path=parent)}}">{{parent}}</a>
- {% endfor %}
-</aside>
-<aside>
- <ul>
- {% for dir in archived_dirs %}
- <li><a href="{{ url_for('archive', path=dir) }}" class="dir">{{ dir.split('/')[-1] }}</a></li>
- {% endfor %}
- </ul>
- <ul>
- {% for file in archived_files %}
- <li><a href="{{ url_for('modify', path=file, version='master') }}" class="file">{{ file.split('/')[-1] }}</a></li>
- {% endfor %}
- </ul>
-</aside>
-{% endblock content %}
View
31 templates/koztumize HTML/base.html
@@ -1,31 +0,0 @@
-{% extends "layout.html" %}
- {% block head %}
- <title>Koztumize - {{ filename }} </title>
- {% endblock head %}
- {% block content %}
- <h3>{{ filename[:-4] }}</h3>
- <section class="toolbar">
- <ul>
- <li>
- <form action="{{ url_for('generate') }}" method="post">
- <input type="hidden"id="html_content" value="" name="html_content" />
- <input type="hidden"id="html_content" value="{{ filename }}" name="filename" />
- <input type="submit" value="Générer le PDF" onclick="document.getElementById('html_content').value=document.getElementById('iframe').contentDocument.documentElement.innerHTML;" name="generate"/>
- </form>
- </li>
- <li>
- <form action="{{ url_for('save') }}" method="post">
- <input type="hidden" id="save_html_content" value="" name="html_content" />
- <input type="hidden" value="{{ filename }}" name="filename" />
- <input type="hidden" value="{{ category }}" name="category" />
- <input type="submit" value="Enregistrer le document" onclick="document.getElementById('save_html_content').value=document.getElementById('iframe').contentDocument.documentElement.innerHTML;" name="save"/>
- </form>
- </li>
- <li>
- <input type="button" value="Réinitialiser" onclick="window.location.reload();"/>
- </li>
- <ul>
- </section>
- <div><iframe id="iframe" src="{{ url_for('model', category=category, filename=filename) }}" ></iframe></div>
- {% endblock content %}
-
View
44 templates/koztumize HTML/layout.html
@@ -1,44 +0,0 @@
-<!Doctype html>
-<html>
- <head>
- <meta charset="UTF-8" />
- <link href="{{url_for('static',filename='style.css')}}" media="screen" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
- {% block head %}
- {% endblock head %}
- </head>
- <body>
- <header><h1><a href="/">Koztumize</a></h1></header>
- <nav>
- <ul>
- <li><a href="{{ url_for('index')}}">Créer un nouveau document</a></li>
- <li><a href="{{ url_for('archive', path=g.domain) }}">Accéder à vos documents enregistrés</a></li>
- </ul>
- </nav>
- <aside>
- {% if session.user %}
- <ul>
- <li>{{ session.user }}</li>
- <li><a href="{{ url_for('logout') }}">se déconnecter</a></li>
- </ul>
- {% endif %}
- </aside>
- {% with messages = get_flashed_messages(with_categories=true) %}
- {% if messages %}
- {% for style,message in messages %}
- <p class="{{ style }}">{{ message }}</p>
- {% endfor %}
- {% endif %}
- {% endwith %}
- <section>
- {% block content %}
- {% endblock content %}
- </section>
- <footer>
- <ul>
- <li><a href="http://community.kozea.org/">A Kozea Project</a></li>
- <li><a href="http://validator.w3.org/check?uri=referer">Optimized for Standards</a></li>
- </ul>
- </footer>
- </body>
-</html>
View
49 templates/koztumize HTML/modify.html
@@ -1,49 +0,0 @@
-{% extends "layout.html" %}
-{% block head %}
- <title>Koztumize - {{ filename }} </title>
-{% endblock head %}
- {% block content %}
- <h3>{{ filename[:-4] }}</h3>
- <section class="toolbar">
- <ul>
- <li>
- <form action="{{ url_for('generate') }}" method="post">
- <input type="hidden"id="gen_html_content" value="" name="html_content" />
- <input type="hidden" value="{{ filename }}" name="filename" />
- <input type="submit" value="Générer le PDF" onclick="document.getElementById('gen_html_content').value=document.getElementById('iframe').contentDocument.documentElement.innerHTML;$('span[contenteditable=true]:eq(1)').html().replace('.',',');" name="generate"/>
- </form>
- </li>
- <li>
- <form action="{{ url_for('save') }}" method="post" name="save">
- <input type="hidden" id="save_html_content" value="" name="html_content" />
- <input type="hidden" value="{{ filename }}" name="filename" />
- <input type="hidden" value="{{ category }}" name="category" />
- <input type="submit" value="Enregistrer le document" onclick="document.getElementById('save_html_content').value=$('#iframe')[0].contentDocument.documentElement.innerHTML;" name="save"/>
- </form>
- </li>
- <li>
- <input type="submit" value="Modèle vierge" onclick="window.location.href='{{ url_for('edit',category=category, filename=filename) }}';"/>
- </li>
- <li>
- <input type="submit" id="btn_version" value="Version" onmouseover="document.getElementById('hist').style.display='block';" onmouseout="document.getElementById('hist').style.display='none';"/>
- <ul id="hist" onmouseover="document.getElementById('hist').style.display='block';" onmouseout="document.getElementById('hist').style.display='none';">
- {% for commit in date_commit %}
- <li><a href="{{ url_for('modify', path=path, version=commit.commit) }}">{{ commit['date']}} {{ commit['author']}}</a></li>
- {% endfor %}
- </ul>
- </li>
- <li>
- <input type="submit" value="Mettre à jour le style" onclick="$('#iframe').contents().find('meta[name=date]').attr('content', '{{ date }}'); $('form[name=save]').children()[0].value=$('#iframe')[0].contentDocument.documentElement.innerHTML; $('form[name=save]').submit();"/>
- </li>
- <ul>
- </section>
- <aside>
- <a href="/">index</a>
- {% for parent in path.split('/')%}
- / <a href="{{ url_for('archive', path=parent)}}">{{parent}}</a>
- {% endfor %}
- </aside>
- <iframe id="iframe" src="{{ url_for('reader', path=path) }}"></iframe>
-
-
- {% endblock content %}
Please sign in to comment.
Something went wrong with that request. Please try again.