Bug & styling fixes, Editor component update

This commit is contained in:
Thomas Hounsell 2017-01-22 16:42:34 +00:00
parent 8e200d81eb
commit c3cdb064de
94 changed files with 3781 additions and 2544 deletions

View File

@ -2,7 +2,7 @@
ViewBag.Title = "Administration | BuildFeed";
}
<h2>Administration</h2>
<h1>Administration</h1>
<ul>
<li>

View File

@ -3,7 +3,7 @@
ViewBag.Title = $"Add metadata for {Model.Id.Value} | BuildFeed";
}
<h2>@($"Add metadata for {Model.Id.Value}") </h2>
<h1>@($"Add metadata for {Model.Id.Value}") </h1>
@using (Html.BeginForm())

View File

@ -5,9 +5,8 @@
ViewBag.Title = "Metadata | BuildFeed";
}
<h2>Manage metadata</h2>
<h1>Manage metadata</h1>
<ul>
<li>@Html.ActionLink("Manage users", "index")</li>
<li>@Html.ActionLink("Return to admin panel", "index", "base")</li>
</ul>
<h3>Current items</h3>

View File

@ -5,7 +5,7 @@
ViewBag.Title = "View administrators | BuildFeed";
}
<h2>View administrators</h2>
<h1>View administrators</h1>
<ul>
<li>@Html.ActionLink("Manage users", "index")</li>

View File

@ -5,7 +5,7 @@
ViewBag.Title = "Manage users | BuildFeed";
}
<h2>Manage users</h2>
<h1>Manage users</h1>
<ul>
<li>@Html.ActionLink("View administrators", "admins")</li>

View File

@ -301,6 +301,7 @@
<Content Include="Scripts\jquery.validate.unobtrusive.js" />
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
<Content Include="Scripts\trumbowyg\langs\ar.min.js" />
<Content Include="Scripts\trumbowyg\langs\bg.min.js" />
<Content Include="Scripts\trumbowyg\langs\ca.min.js" />
<Content Include="Scripts\trumbowyg\langs\cs.min.js" />
<Content Include="Scripts\trumbowyg\langs\da.min.js" />
@ -312,6 +313,7 @@
<Content Include="Scripts\trumbowyg\langs\fi.min.js" />
<Content Include="Scripts\trumbowyg\langs\fr.min.js" />
<Content Include="Scripts\trumbowyg\langs\he.min.js" />
<Content Include="Scripts\trumbowyg\langs\hr.min.js" />
<Content Include="Scripts\trumbowyg\langs\hu.min.js" />
<Content Include="Scripts\trumbowyg\langs\id.min.js" />
<Content Include="Scripts\trumbowyg\langs\it.min.js" />
@ -319,6 +321,8 @@
<Content Include="Scripts\trumbowyg\langs\ko.min.js" />
<Content Include="Scripts\trumbowyg\langs\my.min.js" />
<Content Include="Scripts\trumbowyg\langs\nl.min.js" />
<Content Include="Scripts\trumbowyg\langs\no_nb.min.js" />
<Content Include="Scripts\trumbowyg\langs\ph.min.js" />
<Content Include="Scripts\trumbowyg\langs\pl.min.js" />
<Content Include="Scripts\trumbowyg\langs\pt.min.js" />
<Content Include="Scripts\trumbowyg\langs\ro.min.js" />
@ -334,32 +338,33 @@
<Content Include="Scripts\trumbowyg\langs\zh_tw.min.js" />
<Content Include="Scripts\trumbowyg\plugins\base64\trumbowyg.base64.js" />
<Content Include="Scripts\trumbowyg\plugins\base64\trumbowyg.base64.min.js" />
<Content Include="Scripts\trumbowyg\plugins\cleanpaste\trumbowyg.cleanpaste.js" />
<Content Include="Scripts\trumbowyg\plugins\cleanpaste\trumbowyg.cleanpaste.min.js" />
<Content Include="Scripts\trumbowyg\plugins\colors\Gulpfile.js" />
<Content Include="Scripts\trumbowyg\plugins\colors\Gulpfile.min.js" />
<Content Include="Scripts\trumbowyg\plugins\colors\trumbowyg.colors.js" />
<Content Include="Scripts\trumbowyg\plugins\colors\trumbowyg.colors.min.js" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\images\icons-black-2x.png" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\images\icons-black.png" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\images\icons-white-2x.png" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\images\icons-white.png" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\trumbowyg.colors.css" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\trumbowyg.colors.min.css" />
<Content Include="Scripts\trumbowyg\plugins\editlink\trumbowyg.editlink.js" />
<Content Include="Scripts\trumbowyg\plugins\editlink\trumbowyg.editlink.min.js" />
<Content Include="Scripts\trumbowyg\plugins\emoji\trumbowyg.emoji.js" />
<Content Include="Scripts\trumbowyg\plugins\emoji\trumbowyg.emoji.min.js" />
<Content Include="Scripts\trumbowyg\plugins\insertaudio\trumbowyg.insertaudio.js" />
<Content Include="Scripts\trumbowyg\plugins\insertaudio\trumbowyg.insertaudio.min.js" />
<Content Include="Scripts\trumbowyg\plugins\noembed\trumbowyg.noembed.js" />
<Content Include="Scripts\trumbowyg\plugins\noembed\trumbowyg.noembed.min.js" />
<Content Include="Scripts\trumbowyg\plugins\pasteimage\trumbowyg.pasteimage.js" />
<Content Include="Scripts\trumbowyg\plugins\pasteimage\trumbowyg.pasteimage.min.js" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\trumbowyg.preformatted.js" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\trumbowyg.preformatted.min.js" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\images\icons-black-2x.png" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\images\icons-black.png" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\images\icons-white-2x.png" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\images\icons-white.png" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\trumbowyg.preformatted.css" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\trumbowyg.preformatted.min.css" />
<Content Include="Scripts\trumbowyg\plugins\table\trumbowyg.table.js" />
<Content Include="Scripts\trumbowyg\plugins\table\trumbowyg.table.min.js" />
<Content Include="Scripts\trumbowyg\plugins\template\trumbowyg.template.js" />
<Content Include="Scripts\trumbowyg\plugins\template\trumbowyg.template.min.js" />
<Content Include="Scripts\trumbowyg\plugins\upload\trumbowyg.upload.js" />
<Content Include="Scripts\trumbowyg\plugins\upload\trumbowyg.upload.min.js" />
<Content Include="Scripts\trumbowyg\trumbowyg.js" />
<Content Include="Scripts\trumbowyg\trumbowyg.min.js" />
<Content Include="Scripts\trumbowyg\ui\images\icons-black-2x.png" />
<Content Include="Scripts\trumbowyg\ui\images\icons-black.png" />
<Content Include="Scripts\trumbowyg\ui\images\icons-white-2x.png" />
<Content Include="Scripts\trumbowyg\ui\images\icons-white.png" />
<Content Include="Scripts\trumbowyg\ui\icons.svg" />
<Content Include="Scripts\trumbowyg\ui\trumbowyg.css" />
<Content Include="Scripts\trumbowyg\ui\trumbowyg.min.css" />
<Content Include="yandex_702baad42b020be7.html" />
@ -401,26 +406,12 @@
<Content Include="Views\front\ViewVersion.cshtml" />
<Content Include="Views\support\credits.cshtml" />
<Content Include="Views\shared\error.cshtml" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\sass\trumbowyg.colors.scss" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\sass\_sprite-black-2x.scss" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\sass\_sprite-black.scss" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\sass\_sprite-white-2x.scss" />
<Content Include="Scripts\trumbowyg\plugins\colors\ui\sass\_sprite-white.scss" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\sass\trumbowyg.preformatted.scss" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\sass\_sprite-black-2x.scss" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\sass\_sprite-black.scss" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\sass\_sprite-white-2x.scss" />
<Content Include="Scripts\trumbowyg\plugins\preformatted\ui\sass\_sprite-white.scss" />
<Content Include="Scripts\trumbowyg\ui\sass\mixins\_sprite-pos.scss" />
<Content Include="Scripts\trumbowyg\ui\sass\trumbowyg.scss" />
<Content Include="Scripts\trumbowyg\ui\sass\_sprite-black-2x.scss" />
<Content Include="Scripts\trumbowyg\ui\sass\_sprite-black.scss" />
<Content Include="Scripts\trumbowyg\ui\sass\_sprite-white-2x.scss" />
<Content Include="Scripts\trumbowyg\ui\sass\_sprite-white.scss" />
<Content Include="Views\front\Index.cshtml" />
<Content Include="settings.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Scripts\trumbowyg\plugins\colors\ui\sass\trumbowyg.colors.scss" />
<Content Include="Scripts\trumbowyg\ui\sass\trumbowyg.scss" />
</ItemGroup>
<ItemGroup />
<ItemGroup>

View File

@ -5,5 +5,7 @@
* ===========================================================
* Author : Abo Mokh ahmed (abomokhahmed)
* Github : https://github.com/abomokhahmed
* Reviewed by : Abdellah Chadidi (chadidi)
* Github : https://github.com/chadidi
*/
jQuery.trumbowyg.langs.ar={_dir:"rtl",viewHTML:"إعرض-HTML",formatting:"تصميم",p:"فقرة",blockquote:"اقتباس",code:"كود",header:"رئيسي",bold:"عريض",italic:"مائل",strikethrough:"مشطوب",underline:"خطّ سفلي",strong:"بارز",em:"تغميق",del:"حذف",unorderedList:"قائمة غير مرتّبة",orderedList:"قائمة مرتّبة",insertImage:"إدخال صورة",insertVideo:"إدخال فيديو",link:"رابط",createLink:"انشاء رابط",unlink:"حذف رابط",justifyLeft:"تصحيح للشمال",justifyCenter:"تصحيح للمركز",justifyRight:"تصحيح لليمين",justifyFull:"تصحيح لكلا الإتّجاهين",horizontalRule:"إدخال خطّ أفقي",fullscreen:"شاشة واسعة",close:"إغلاق",submit:"أرسل",reset:"تهيئة من حديد",required:"إلزامي",description:"وصف",title:"عنوان",text:"نصّ"};
jQuery.trumbowyg.langs.ar={_dir:"rtl",viewHTML:"إعرض-HTML",undo:"تراجع",redo:"إعادة",formatting:"تنسيق",p:"فقرة",blockquote:"اقتباس",code:"كود",header:أس",bold:"عريض",italic:"مائل",strikethrough:"مشطوب",underline:"خطّ سفلي",strong:"بارز",em:"تغميق",del:"حذف",superscript:"الأس",subscript:"أس سفلي",unorderedList:"قائمة غير مرتّبة",orderedList:"قائمة مرتّبة",insertImage:"إدراج صورة",insertVideo:"إدراج فيديو",link:"رابط",createLink:"انشاء رابط",unlink:"حذف رابط",justifyLeft:"تصحيح للشمال",justifyCenter:وسيط",justifyRight:"تصحيح لليمين",justifyFull:"تصحيح لكلا الإتّجاهين",horizontalRule:"إدراج خطّ أفقي",fullscreen:"ملء الشاشة",close:"إغلاق",submit:"إرسال",reset:"إعادة تعيين",required:"إلزامي",description:"وصف",title:"عنوان",text:"نصّ",target:"الهدف"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* bg.js
* Bulgarian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Aleksandar Dimitrov
*/
jQuery.trumbowyg.langs.bg={viewHTML:"Прегледай HTML",formatting:"Форматиране",p:"Параграф",blockquote:"Цитат",code:"Код",header:"Заглавие",bold:"Удебелен",italic:"Наклонен",strikethrough:"Зачеркнат",underline:"Подчертан",strong:"Удебелен",em:"Наклонен",del:"Зачеркнат",unorderedList:"Обикновен списък",orderedList:"Номериран списък",insertImage:"Добави изображение",insertVideo:"Добави видео",link:"Връзка",createLink:"Създай връзка",unlink:"Премахни връзката",justifyLeft:"Подравни от ляво",justifyCenter:"Центрирай",justifyRight:"Подравни от дясно",justifyFull:"Подравни по ширина",horizontalRule:"Хоризонтална линия",fullscreen:"На цял екран",close:"Затвори",submit:"Впиши",reset:"Отмени",required:"Задължително",description:"Описание",title:"Заглавие",text:"Текст"};

View File

@ -9,4 +9,4 @@
* LinkedIn: https://gr.linkedin.com/in/merianosnikos
* Behance: https://www.behance.net/web_design_blog
*/
jQuery.trumbowyg.langs.es={viewHTML:"Προβολή κώδικα HTML",formatting:"Μορφοποίηση",p:"Παράγραφος",blockquote:"Παράθεση",code:"Κώδικας",header:"Επικεφαλίδα",bold:"Έντονα",italic:"Πλάγια",strikethrough:"Διαγραφή",underline:"Υπογράμμιση",strong:"Έντονα",em:"Πλάγια",del:"Διαγραφή",unorderedList:"Αταξινόμητη λίστα",orderedList:"Ταξινομημένη λίστα",insertImage:"Εισαγωγή εικόνας",insertVideo:"Εισαγωγή βίντεο",link:"Σύνδεσμος",createLink:"Δημιουργία συνδέσμου",unlink:"Διαγραφή συνδέσμου",justifyLeft:"Στοίχιση αριστερά",justifyCenter:"Στοίχιση στο κέντρο",justifyRight:"Στοίχιση δεξιά",justifyFull:"Πλήρης στοίχιση",horizontalRule:"Οριζόντια γραμμή",fullscreen:"Πλήρης οθόνη",close:"Κλείσιμο",submit:"Υποβολή",reset:"Επαναφορά",invalidUrl:"Λανθασμένο URL",required:"Απαραίτητο",description:"Περιγραφή",title:"Τίτλος",text:"Κείμενο"};
jQuery.trumbowyg.langs.es={viewHTML:"Προβολή κώδικα HTML",formatting:"Μορφοποίηση",p:"Παράγραφος",blockquote:"Παράθεση",code:"Κώδικας",header:"Επικεφαλίδα",bold:"Έντονα",italic:"Πλάγια",strikethrough:"Διαγραφή",underline:"Υπογράμμιση",strong:"Έντονα",em:"Πλάγια",del:"Διαγραφή",unorderedList:"Αταξινόμητη λίστα",orderedList:"Ταξινομημένη λίστα",insertImage:"Εισαγωγή εικόνας",insertVideo:"Εισαγωγή βίντεο",link:"Σύνδεσμος",createLink:"Δημιουργία συνδέσμου",unlink:"Διαγραφή συνδέσμου",justifyLeft:"Στοίχιση αριστερά",justifyCenter:"Στοίχιση στο κέντρο",justifyRight:"Στοίχιση δεξιά",justifyFull:"Πλήρης στοίχιση",horizontalRule:"Οριζόντια γραμμή",fullscreen:"Πλήρης οθόνη",close:"Κλείσιμο",submit:"Υποβολή",reset:"Επαναφορά",required:"Απαραίτητο",description:"Περιγραφή",title:"Τίτλος",text:"Κείμενο"};

View File

@ -6,4 +6,4 @@
* Author : Moisés Márquez
* Email : moises.marquez.g@gmail.com
*/
jQuery.trumbowyg.langs.es={viewHTML:"Ver HTML",formatting:"Formato",p:"Párrafo",blockquote:"Cita",code:"Código",header:"Título",bold:"Negrita",italic:"Cursiva",strikethrough:"Tachado",underline:"Subrayado",strong:"Negrita",em:"Énfasis",del:"Borrar",unorderedList:"Lista Desordenada",orderedList:"Lista Ordenada",insertImage:"Insertar una imagen",insertVideo:"Insertar un vídeo",link:"Enlace",createLink:"Insertar un enlace",unlink:"Suprimir un enlace",justifyLeft:"Izquierda",justifyCenter:"Centrar",justifyRight:"Derecha",justifyFull:"Justificado",horizontalRule:"Insertar separador horizontal",fullscreen:"Pantalla completa",close:"Cerrar",submit:"Enviar",reset:"Cancelar",required:"Obligatorio",description:"Descripción",title:"Título",text:"Texto"};
jQuery.trumbowyg.langs.es={viewHTML:"Ver HTML",undo:"Desfazer",redo:"Refazer",formatting:"Formato",p:"Párrafo",blockquote:"Cita",code:"Código",header:"Título",bold:"Negrita",italic:"Cursiva",strikethrough:"Tachado",underline:"Subrayado",strong:"Negrita",em:"Énfasis",del:"Borrar",superscript:"Sobrescrito",subscript:"Subíndice",unorderedList:"Lista Desordenada",orderedList:"Lista Ordenada",insertImage:"Insertar una imagen",insertVideo:"Insertar un vídeo",link:"Enlace",createLink:"Insertar un enlace",unlink:"Suprimir un enlace",justifyLeft:"Izquierda",justifyCenter:"Centrar",justifyRight:"Derecha",justifyFull:"Justificado",horizontalRule:"Insertar separador horizontal",removeformat:"Eliminar formato",fullscreen:"Pantalla completa",close:"Cerrar",submit:"Enviar",reset:"Cancelar",required:"Obligatorio",description:"Descripción",title:"Título",text:"Texto",target:"Target"};

View File

@ -6,4 +6,5 @@
* Author : Félix Vera
* Email : felix.vera@gmail.com
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.es_ar={viewHTML:"Ver HTML",formatting:"Formato",p:"Párrafo",blockquote:"Cita",code:"Código",header:"Título",bold:"Negrita",italic:"Itálica",strikethrough:"Tachado",underline:"Subrayado",strong:"Fuere",em:"Énfasis",del:"Borrar",unorderedList:"Lista Desordenada",orderedList:"Lista Ordenada",insertImage:"Insertar una imagen",insertVideo:"Insertar un video",link:"Vínculo",createLink:"Insertar un vínculo",unlink:"Suprimir un vínculo",justifyLeft:"Alinear a la Izquierda",justifyCenter:"Centrar",justifyRight:"Alinear a la Derecha",justifyFull:"Justificado",horizontalRule:"Insertar separado Horizontal",fullscreen:"Pantalla Completa",close:"Cerrar",submit:"Enviar",reset:"Cancelar",required:"Obligatorio",description:"Descripción",title:"Título",text:"Texto"};

View File

@ -7,4 +7,4 @@
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
jQuery.trumbowyg.langs.fr={viewHTML:"Voir le HTML",formatting:"Format",p:"Paragraphe",blockquote:"Citation",code:"Code",header:"Titre",bold:"Gras",italic:"Italique",strikethrough:"Rayé",underline:"Souligné",strong:"Fort",em:"Emphase",del:"Supprimé",unorderedList:"Liste à puces",orderedList:"Liste ordonnée",insertImage:"Insérer une image",insertVideo:"Insérer une video",link:"Lien",createLink:"Insérer un lien",unlink:"Supprimer le lien",justifyLeft:"Aligner à gauche",justifyCenter:"Centrer",justifyRight:"Aligner à droite",justifyFull:"Justifier",horizontalRule:"Insérer un séparateur horizontal",fullscreen:"Plein écran",close:"Fermer",submit:"Valider",reset:"Annuler",required:"Obligatoire",description:"Description",title:"Titre",text:"Texte"};
jQuery.trumbowyg.langs.fr={viewHTML:"Voir le HTML",undo:"Annuler",redo:"Refaire",formatting:"Format",p:"Paragraphe",blockquote:"Citation",code:"Code",header:"Titre",bold:"Gras",italic:"Italique",strikethrough:"Rayé",underline:"Souligné",strong:"Fort",em:"Emphase",del:"Supprimé",superscript:"Exposant",subscript:"Indice",unorderedList:"Liste à puces",orderedList:"Liste ordonnée",insertImage:"Insérer une image",insertVideo:"Insérer une video",link:"Lien",createLink:"Insérer un lien",unlink:"Supprimer le lien",justifyLeft:"Aligner à gauche",justifyCenter:"Centrer",justifyRight:"Aligner à droite",justifyFull:"Justifier",horizontalRule:"Insérer un séparateur horizontal",fullscreen:"Plein écran",close:"Fermer",submit:"Valider",reset:"Annuler",required:"Obligatoire",description:"Description",title:"Titre",text:"Texte",target:"Cible"};

View File

@ -1,9 +1,9 @@
/* ===========================================================
* he.js
* Hebrew translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Udi Doron (udidoron)
* Github : https://github.com/udidoron
*/
* he.js
* Hebrew translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Udi Doron (udidoron)
* Github : https://github.com/udidoron
*/
jQuery.trumbowyg.langs.he={_dir:"rtl",viewHTML:"צפה ב-HTML",formatting:"פורמט",p:"פסקה",blockquote:"ציטוט",code:"קוד",header:"ראשית",bold:"מודגש",italic:"נטוי",strikethrough:"קו חוצה",underline:"קו תחתון",strong:"בולט",em:"הדגשה",del:"נמחק",unorderedList:"רשימה ללא סדר",orderedList:"רשימה מסודרת",insertImage:"הכנס תמונה",insertVideo:"הכנס סרטון",link:"קישור",createLink:"צור קישור",unlink:"הסר קישור",justifyLeft:"ישר לשמאל",justifyCenter:"מרכז",justifyRight:"ישר לימין",justifyFull:"ישר לשני הצדדים",horizontalRule:"הכנס קו אופקי",fullscreen:"מסך מלא",close:"סגור",submit:"שלח",reset:"אתחל מחדש",required:"נחוץ",description:"תיאור",title:"כותרת",text:"טקסט"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* hr.js
* Croatian translation for Trumbowyg
* https://www.github.com/Buda9
* ===========================================================
* Author : Davor Budimir (https://www.github.com/Buda9)
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.hr={viewHTML:"Poglеdaj HTML kód",formatting:"Formatiranjе",p:"Odlomak",blockquote:"Citat",code:"Kód",header:"Zaglavlje",bold:"Podеbljano",italic:"Nakošeno",strikethrough:"Prеcrtano",underline:"Podvučеno",strong:"Podеbljano",em:"Istaknuto",del:"Obrisano",unorderedList:"Neuređen popis",orderedList:"Uređen popis",insertImage:"Dodaj sliku",insertVideo:"Dodaj vidеo",link:"Povezica",createLink:"Dodaj povezicu",unlink:"Ukloni povezicu",justifyLeft:"Lijеvo poravnanjе",justifyCenter:"Središnje poravnanjе",justifyRight:"Dеsno poravnanjе",justifyFull:"Obostrano poravnanjе",horizontalRule:"Horizontalna crta",fullscreen:"Puni zaslon",close:"Zatvori",submit:"Unеsi",reset:"Otkaži",required:"Obavеzno poljе",description:"Opis",title:"Naslov",text:"Tеkst"};

View File

@ -0,0 +1,10 @@
/* ===========================================================
* no_nb.js
* Norwegian Bokmål translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Jon Severin Eivik Jakobsen
* Github : https://github.com/jsejakobsen
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.no_nb={viewHTML:"Vis HTML",formatting:"Formater",p:"Avsnitt",blockquote:"Sitat",code:"Kode",header:"Overskrift",bold:"Fet",italic:"Kursiv",strikethrough:"Gjennomstreking",underline:"Understreking",strong:"Viktig",em:"Fremhevet",del:"Slettet",unorderedList:"Uordnet liste",orderedList:"Ordnet liste",insertImage:"Sett inn bilde",insertVideo:"Sett inn video",link:"Lenke",createLink:"Sett inn lenke",unlink:"Fjern lenke",justifyLeft:"Venstrejuster",justifyCenter:"Midtstill",justifyRight:"Høyrejuster",justifyFull:"Blokkjuster",horizontalRule:"Horisontal linje",fullscreen:"Full skjerm",close:"Lukk",submit:"Bekreft",reset:"Avbryt",required:"Påkrevd",description:"Beskrivelse",title:"Tittel",text:"Tekst"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* ph.js
* Filipino translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : @leogono
*/
jQuery.trumbowyg.langs.ph={viewHTML:"Tumingin sa HTML",formatting:"Formatting",p:"Talata",blockquote:"Blockquote",code:"Kowd",header:"Header",bold:"Makapal",italic:"Hilig",strikethrough:"Strikethrough",underline:"Salungguhit",strong:"Malakas",em:"Hilig",del:"Tinanggal",unorderedList:"Hindi nakahanay na listahan",orderedList:"Nakahanay na listahan",insertImage:"Ilagay ang larawan",insertVideo:"Ilagay ang video",link:"Koneksyon",createLink:"Iugnay",unlink:"Tanggalin ang koneksyon",justifyLeft:"Ihanay sa kaliwa",justifyCenter:"Ihanay sa gitna",justifyRight:"Ihanay sa kanan",justifyFull:"Ihanay sa kaliwa at kanan",horizontalRule:"Pahalang na linya",fullscreen:"Fullscreen",close:"Isara",submit:"Ipasa",reset:"I-reset",required:"Kailangan",description:"Paglalarawan",title:"Pamagat",text:"Teksto"};

View File

@ -8,4 +8,4 @@
* Website : about.me/ramirovjnr
* Github : https://github.com/ramirovjr
*/
jQuery.trumbowyg.langs.pt={viewHTML:"Ver HTML",formatting:"Formatar",p:"Paragráfo",blockquote:"Citação",code:"Código",header:"Título",bold:"Negrito",italic:"Itálico",strikethrough:"Suprimir",underline:"Sublinhado",strong:"Forte",em:"Ênfase",del:"Apagar",unorderedList:"Lista não ordenada",orderedList:"Liste ordenada",insertImage:"Inserir imagem",insertVideo:"Inserir vídeo",link:"Link",createLink:"Criar um link",unlink:"Remover link",justifyLeft:"Alinhar a esquerda",justifyCenter:"Centralizar",justifyRight:"Alinhar a direita",justifyFull:"Justificar",horizontalRule:"Inserir separador horizontal",fullscreen:"Tela cheia",close:"Fechar",submit:"Enviar",reset:"Limpar",required:"Obrigatório",description:"Descrição",title:"Título",text:"Texto"};
jQuery.trumbowyg.langs.pt={viewHTML:"Ver HTML",undo:"Desfazer",redo:"Refazer",formatting:"Formatar",p:"Paragráfo",blockquote:"Citação",code:"Código",header:"Título",bold:"Negrito",italic:"Itálico",strikethrough:"Suprimir",underline:"Sublinhado",strong:"Negrito",em:"Ênfase",del:"Apagar",superscript:"Sobrescrito",subscript:"Subscrito",unorderedList:"Lista não ordenada",orderedList:"Lista ordenada",insertImage:"Inserir imagem",insertVideo:"Inserir vídeo",link:"Link",createLink:"Criar um link",unlink:"Remover link",justifyLeft:"Alinhar a esquerda",justifyCenter:"Centralizar",justifyRight:"Alinhar a direita",justifyFull:"Justificar",horizontalRule:"Inserir separador horizontal",removeformat:"Remover formatação",fullscreen:"Tela cheia",close:"Fechar",submit:"Enviar",reset:"Limpar",required:"Obrigatório",description:"Descrição",title:"Título",text:"Texto",target:"Target"};

View File

@ -5,4 +5,4 @@
* ===========================================================
* Author : Nikola Trifunovic (https://www.github.com/johonunu)
*/
jQuery.trumbowyg.langs.rs={viewHTML:"Погледај HTML кóд",formatting:"Форматирање",p:"Параграф",blockquote:"Цитат",code:"Кóд",header:"Наслов",bold:"Подебљано",italic:"Курзив",strikethrough:"Прецртано",underline:"Подвучено",strong:"Подебљано",em:"Истакнуто",del:"Обрисано",unorderedList:"Ненабројива листа",orderedList:"Набројива листа",insertImage:"Унеси слику",insertVideo:"Унеси видео",link:"Линк",createLink:"Унеси линк",unlink:"Уклони линк",justifyLeft:"Лево равнање",justifyCenter:"Централно равнање",justifyRight:"Десно равнање",justifyFull:"Обострано равнање",horizontalRule:"Хоризонтална линија",fullscreen:"Режим читавог екрана",close:"Затвори",submit:"Унеси",reset:"Откажи",required:"Обавезно поље",invalidUrl:"URL",description:"Опис",title:"Наслов",text:"Текст"};
jQuery.trumbowyg.langs.rs={viewHTML:"Погледај HTML кóд",formatting:"Форматирање",p:"Параграф",blockquote:"Цитат",code:"Кóд",header:"Наслов",bold:"Подебљано",italic:"Курзив",strikethrough:"Прецртано",underline:"Подвучено",strong:"Подебљано",em:"Истакнуто",del:"Обрисано",unorderedList:"Ненабројива листа",orderedList:"Набројива листа",insertImage:"Унеси слику",insertVideo:"Унеси видео",link:"Линк",createLink:"Унеси линк",unlink:"Уклони линк",justifyLeft:"Лево равнање",justifyCenter:"Централно равнање",justifyRight:"Десно равнање",justifyFull:"Обострано равнање",horizontalRule:"Хоризонтална линија",fullscreen:"Режим читавог екрана",close:"Затвори",submit:"Унеси",reset:"Откажи",required:"Обавезно поље",description:"Опис",title:"Наслов",text:"Текст"};

View File

@ -5,4 +5,5 @@
* ===========================================================
* Author : Nikola Trifunovic (https://www.github.com/johonunu)
*/
jQuery.trumbowyg.langs.rs_latin={viewHTML:"Poglеdaj HTML kód",formatting:"Formatiranjе",p:"Paragraf",blockquote:"Citat",code:"Kód",header:"Naslov",bold:"Podеbljano",italic:"Kurziv",strikethrough:"Prеcrtano",underline:"Podvučеno",strong:"Podеbljano",em:"Istaknuto",del:"Obrisano",unorderedList:"Nеnabrojiva lista",orderedList:"Nabrojiva lista",insertImage:"Unеsi sliku",insertVideo:"Unеsi vidеo",link:"Link",createLink:"Unеsi link",unlink:"Ukloni link",justifyLeft:"Lеvo ravnanjе",justifyCenter:"Cеntralno ravnanjе",justifyRight:"Dеsno ravnanjе",justifyFull:"Obostrano ravnanjе",horizontalRule:"Horizontalna linija",fullscreen:"Rеžim čitavog еkrana",close:"Zatvori",submit:"Unеsi",reset:"Otkaži",required:"Obavеzno poljе",invalidUrl:"URL",description:"Opis",title:"Naslov",text:"Tеkst"};
// jshint camelcase:false
jQuery.trumbowyg.langs.rs_latin={viewHTML:"Poglеdaj HTML kód",formatting:"Formatiranjе",p:"Paragraf",blockquote:"Citat",code:"Kód",header:"Naslov",bold:"Podеbljano",italic:"Kurziv",strikethrough:"Prеcrtano",underline:"Podvučеno",strong:"Podеbljano",em:"Istaknuto",del:"Obrisano",unorderedList:"Nеnabrojiva lista",orderedList:"Nabrojiva lista",insertImage:"Unеsi sliku",insertVideo:"Unеsi vidеo",link:"Link",createLink:"Unеsi link",unlink:"Ukloni link",justifyLeft:"Lеvo ravnanjе",justifyCenter:"Cеntralno ravnanjе",justifyRight:"Dеsno ravnanjе",justifyFull:"Obostrano ravnanjе",horizontalRule:"Horizontalna linija",fullscreen:"Rеžim čitavog еkrana",close:"Zatvori",submit:"Unеsi",reset:"Otkaži",required:"Obavеzno poljе",description:"Opis",title:"Naslov",text:"Tеkst"};

View File

@ -5,5 +5,8 @@
* ===========================================================
* Author : T. Almroth
* Github : https://github.com/timint
*
* Review : M Hagberg
* Github : https://github.com/pestbarn
*/
jQuery.trumbowyg.langs.sv={viewHTML:"Visa HTML",formatting:"Formatera",p:"Avsnitt",blockquote:"Citat",code:"Kod",header:"Överskrift",bold:"Fet",italic:"Kursiv",strikethrough:"Genomstruken",underline:"Understreck",strong:"Viktig",em:"Framhäv",del:"Rensa formatering",unorderedList:"Lista",orderedList:"Numrerad lista",insertImage:"Infoga bild",insertVideo:"Infoga video",link:"Länk",createLink:"Infoga länk",unlink:"Ta bort länk",justifyLeft:"Vänsterjustera",justifyCenter:"Centrera",justifyRight:"Högerjustera",justifyFull:"Marginaljustera",horizontalRule:"Horisontell linje",fullscreen:"Fullskärm",close:"Stäng",submit:"Bekräfta",reset:"Återställ",required:"Obligatorisk",description:"Beskrivning",title:"Titel",text:"Text"};
jQuery.trumbowyg.langs.sv={viewHTML:"Visa HTML",formatting:"Formatering",p:"Paragraf",blockquote:"Citat",code:"Kod",header:"Rubrik",bold:"Fet",italic:"Kursiv",strikethrough:"Genomstruken",underline:"Understruken",strong:"Fet",em:"Kursiv",del:"Rensa formatering",unorderedList:"Punktlista",orderedList:"Numrerad lista",insertImage:"Infoga bild",insertVideo:"Infoga video",link:"Länk",createLink:"Infoga länk",unlink:"Ta bort länk",justifyLeft:"Vänsterjustera",justifyCenter:"Centrera",justifyRight:"Högerjustera",justifyFull:"Marginaljustera",horizontalRule:"Horisontell linje",fullscreen:"Fullskärm",close:"Stäng",submit:"Bekräfta",reset:"Återställ",required:"Obligatorisk",description:"Beskrivning",title:"Titel",text:"Text"};

View File

@ -7,4 +7,5 @@
* Twitter : @akai404
* Github : https://github.com/akai
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.zh_cn={viewHTML:"源代码",formatting:"格式",p:"段落",blockquote:"引用",code:"代码",header:"标题",bold:"加粗",italic:"斜体",strikethrough:"删除线",underline:"下划线",strong:"加粗",em:"斜体",del:"删除线",unorderedList:"无序列表",orderedList:"有序列表",insertImage:"插入图片",insertVideo:"插入视频",link:"超链接",createLink:"插入链接",unlink:"取消链接",justifyLeft:"居左对齐",justifyCenter:"居中对齐",justifyRight:"居右对齐",justifyFull:"两端对齐",horizontalRule:"插入分隔线",fullscreen:"全屏",close:"关闭",submit:"确定",reset:"取消",required:"必需的",description:"描述",title:"标题",text:"文字"};

View File

@ -7,4 +7,5 @@
* Twitter : @PeterDaveHello
* Github : https://github.com/PeterDaveHello
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.zh_tw={viewHTML:"原始碼",formatting:"格式",p:"段落",blockquote:"引用",code:"代碼",header:"標題",bold:"加粗",italic:"斜體",strikethrough:"刪除線",underline:"底線",strong:"加粗",em:"斜體",del:"刪除線",unorderedList:"無序列表",orderedList:"有序列表",insertImage:"插入圖片",insertVideo:"插入影片",link:"超連結",createLink:"插入連結",unlink:"取消連結",justifyLeft:"靠左對齊",justifyCenter:"置中對齊",justifyRight:"靠右對齊",justifyFull:"左右對齊",horizontalRule:"插入分隔線",fullscreen:"全螢幕",close:"關閉",submit:"確定",reset:"取消",required:"必需的",description:"描述",title:"標題",text:"文字"};

View File

@ -9,12 +9,22 @@
(function ($) {
'use strict';
var isSupported = function () {
return typeof FileReader !== 'undefined';
};
var isValidImage = function (type) {
return /^data:image\/[a-z]?/i.test(type);
};
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
base64: 'Image as base64',
file: 'File',
errFileReaderNotSupported: 'FileReader is not supported by your browser.'
errFileReaderNotSupported: 'FileReader is not supported by your browser.',
errInvalidImage: 'Invalid image file.'
},
fr: {
base64: 'Image en base64',
@ -23,59 +33,77 @@
cs: {
base64: 'Vložit obrázek',
file: 'Soubor'
},
zh_cn: {
base64: '图片Base64编码',
file: '文件'
},
nl: {
errFileReaderNotSupported: 'Uw browser ondersteunt deze functionaliteit niet.',
errInvalidImage: 'De gekozen afbeelding is ongeldig.'
}
},
// jshint camelcase:true
opts: {
btnsDef: {
base64: {
isSupported: function () {
if (typeof FileReader === 'undefined') {
if (window.console !== undefined) {
console.err('[Trumbowyg - Plugin base64] FileReader is not supported by your browser.');
}
return false;
}
return true;
},
func: function (params, tbw) {
var file;
tbw.openModalInsert(
// Title
tbw.lang.base64,
plugins: {
base64: {
shouldInit: isSupported,
init: function (trumbowyg) {
var btnDef = {
isSupported: isSupported,
fn: function () {
trumbowyg.saveRange();
// Fields
{
file: {
type: 'file',
required: true
var file;
var $modal = trumbowyg.openModalInsert(
// Title
trumbowyg.lang.base64,
// Fields
{
file: {
type: 'file',
required: true,
attributes: {
accept: 'image/*'
}
},
alt: {
label: 'description',
value: trumbowyg.getRangeText()
}
},
alt: {
label: 'description'
// Callback
function (values) {
var fReader = new FileReader();
fReader.onloadend = function (e) {
if (isValidImage(e.target.result)) {
trumbowyg.execCmd('insertImage', fReader.result);
$(['img[src="', fReader.result, '"]:not([alt])'].join(''), trumbowyg.$box).attr('alt', values.alt);
trumbowyg.closeModal();
} else {
trumbowyg.addErrorOnModalField(
$('input[type=file]', $modal),
trumbowyg.lang.errInvalidImage
);
}
};
fReader.readAsDataURL(file);
}
},
);
// Callback
function (values) {
var fReader = new FileReader();
$('input[type=file]').on('change', function (e) {
file = e.target.files[0];
});
}
};
fReader.onloadend = function () {
tbw.execCmd('insertImage', fReader.result);
$(['img[src="', fReader.result, '"]:not([alt])'].join(''), tbw.$box).attr('alt', values.alt);
tbw.closeModal();
};
fReader.readAsDataURL(file);
}
);
$('input[type=file]').on('change', function (e) {
file = e.target.files[0];
});
},
ico: 'insertImage'
trumbowyg.addBtnDef('base64', btnDef);
}
}
}
});
})(jQuery);
})(jQuery);

View File

@ -1 +1 @@
!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{base64:"Image as base64",file:"File",errFileReaderNotSupported:"FileReader is not supported by your browser."},fr:{base64:"Image en base64",file:"Fichier"},cs:{base64:"Vložit obrázek",file:"Soubor"}},opts:{btnsDef:{base64:{isSupported:function(){return"undefined"==typeof FileReader?(void 0!==window.console&&console.err("[Trumbowyg - Plugin base64] FileReader is not supported by your browser."),!1):!0},func:function(o,r){var n;r.openModalInsert(r.lang.base64,{file:{type:"file",required:!0},alt:{label:"description"}},function(o){var t=new FileReader;t.onloadend=function(){r.execCmd("insertImage",t.result),e(['img[src="',t.result,'"]:not([alt])'].join(""),r.$box).attr("alt",o.alt),r.closeModal()},t.readAsDataURL(n)}),e("input[type=file]").on("change",function(e){n=e.target.files[0]})},ico:"insertImage"}}}})}(jQuery);
!function(e){"use strict";var a=function(){return"undefined"!=typeof FileReader},t=function(e){return/^data:image\/[a-z]?/i.test(e)};e.extend(!0,e.trumbowyg,{langs:{en:{base64:"Image as base64",file:"File",errFileReaderNotSupported:"FileReader is not supported by your browser.",errInvalidImage:"Invalid image file."},fr:{base64:"Image en base64",file:"Fichier"},cs:{base64:"Vložit obrázek",file:"Soubor"},zh_cn:{base64:"图片Base64编码",file:"文件"},nl:{errFileReaderNotSupported:"Uw browser ondersteunt deze functionaliteit niet.",errInvalidImage:"De gekozen afbeelding is ongeldig."}},plugins:{base64:{shouldInit:a,init:function(n){var i={isSupported:a,fn:function(){n.saveRange();var a,i=n.openModalInsert(n.lang.base64,{file:{type:"file",required:!0,attributes:{accept:"image/*"}},alt:{label:"description",value:n.getRangeText()}},function(r){var l=new FileReader;l.onloadend=function(a){t(a.target.result)?(n.execCmd("insertImage",l.result),e(['img[src="',l.result,'"]:not([alt])'].join(""),n.$box).attr("alt",r.alt),n.closeModal()):n.addErrorOnModalField(e("input[type=file]",i),n.lang.errInvalidImage)},l.readAsDataURL(a)});e("input[type=file]").on("change",function(e){a=e.target.files[0]})}};n.addBtnDef("base64",i)}}}})}(jQuery);

View File

@ -0,0 +1,179 @@
/* ===========================================================
* trumbowyg.cleanpaste.js v1.0
* Font Clean paste plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Eric Radin
*/
/**
* This plugin will perform a "cleaning" on any paste, in particular
* it will clean pasted content of microsoft word document tags and classes.
*/
(function ($) {
'use strict';
function reverse(sentString) {
var theString = '';
for (var i = sentString.length - 1; i >= 0; i -= 1) {
theString += sentString.charAt(i);
}
return theString;
}
function checkValidTags(snippet) {
var theString = snippet;
// Replace uppercase element names with lowercase
theString = theString.replace(/<[^> ]*/g, function (match) {
return match.toLowerCase();
});
// Replace uppercase attribute names with lowercase
theString = theString.replace(/<[^>]*>/g, function (match) {
match = match.replace(/ [^=]+=/g, function (match2) {
return match2.toLowerCase();
});
return match;
});
// Put quotes around unquoted attributes
theString = theString.replace(/<[^>]*>/g, function (match) {
match = match.replace(/( [^=]+=)([^"][^ >]*)/g, '$1\"$2\"');
return match;
});
return theString;
}
function cleanIt(htmlBefore, htmlAfter) {
var matchedHead = '';
var matchedTail = '';
var afterStart;
var afterFinish;
var newSnippet;
// we need to extract the inserted block
for (afterStart = 0; htmlAfter.charAt(afterStart) === htmlBefore.charAt(afterStart); afterStart += 1) {
matchedHead += htmlAfter.charAt(afterStart);
}
// If afterStart is inside a HTML tag, move to opening brace of tag
for (var i = afterStart; i >= 0; i -= 1) {
if (htmlBefore.charAt(i) === '<') {
afterStart = i;
matchedHead = htmlBefore.substring(0, afterStart);
break;
} else if (htmlBefore.charAt(i) === '>') {
break;
}
}
// now reverse string and work from the end in
htmlAfter = reverse(htmlAfter);
htmlBefore = reverse(htmlBefore);
// Find end of both strings that matches
for (afterFinish = 0; htmlAfter.charAt(afterFinish) === htmlBefore.charAt(afterFinish); afterFinish += 1) {
matchedTail += htmlAfter.charAt(afterFinish);
}
// If afterFinish is inside a HTML tag, move to closing brace of tag
for (var j = afterFinish; j >= 0; j -= 1) {
if (htmlBefore.charAt(j) === '>') {
afterFinish = j;
matchedTail = htmlBefore.substring(0, afterFinish);
break;
} else if (htmlBefore.charAt(j) === '<') {
break;
}
}
matchedTail = reverse(matchedTail);
// If there's no difference in pasted content
if (afterStart === (htmlAfter.length - afterFinish)) {
return false;
}
htmlAfter = reverse(htmlAfter);
newSnippet = htmlAfter.substring(afterStart, htmlAfter.length - afterFinish);
// first make sure all tags and attributes are made valid
newSnippet = checkValidTags(newSnippet);
// Replace opening bold tags with strong
newSnippet = newSnippet.replace(/<b(\s+|>)/g, '<strong$1');
// Replace closing bold tags with closing strong
newSnippet = newSnippet.replace(/<\/b(\s+|>)/g, '</strong$1');
// Replace italic tags with em
newSnippet = newSnippet.replace(/<i(\s+|>)/g, '<em$1');
// Replace closing italic tags with closing em
newSnippet = newSnippet.replace(/<\/i(\s+|>)/g, '</em$1');
// strip out comments -cgCraft
newSnippet = newSnippet.replace(/<!(?:--[\s\S]*?--\s*)?>\s*/g, '');
// strip out &nbsp; -cgCraft
newSnippet = newSnippet.replace(/&nbsp;/gi, ' ');
// strip out extra spaces -cgCraft
newSnippet = newSnippet.replace(/ <\//gi, '</');
while (newSnippet.indexOf(' ') !== -1) {
var anArray = newSnippet.split(' ');
newSnippet = anArray.join(' ');
}
// strip &nbsp; -cgCraft
newSnippet = newSnippet.replace(/^\s*|\s*$/g, '');
// Strip out unaccepted attributes
newSnippet = newSnippet.replace(/<[^>]*>/g, function (match) {
match = match.replace(/ ([^=]+)="[^"]*"/g, function (match2, attributeName) {
if (['alt', 'href', 'src', 'title'].indexOf(attributeName) !== -1) {
return match2;
}
return '';
});
return match;
});
// Final cleanout for MS Word crud
newSnippet = newSnippet.replace(/<\?xml[^>]*>/g, '');
newSnippet = newSnippet.replace(/<[^ >]+:[^>]*>/g, '');
newSnippet = newSnippet.replace(/<\/[^ >]+:[^>]*>/g, '');
// remove unwanted tags
newSnippet = newSnippet.replace(/<(div|span|style|meta|link){1}.*?>/gi, '');
htmlAfter = matchedHead + newSnippet + matchedTail;
return htmlAfter;
}
// clean editor
// this will clean the inserted contents
// it does a compare, before and after paste to determine the
// pasted contents
$.extend(true, $.trumbowyg, {
plugins: {
cleanPaste: {
init: function (trumbowyg) {
trumbowyg.pasteHandlers.push(function () {
try {
var contentBefore = trumbowyg.$ed.html();
setTimeout(function () {
var contentAfter = trumbowyg.$ed.html();
contentAfter = cleanIt(contentBefore, contentAfter);
trumbowyg.$ed.html(contentAfter);
}, 0);
} catch (c) {
}
});
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(r){"use strict";function e(r){for(var e="",t=r.length-1;t>=0;t-=1)e+=r.charAt(t);return e}function t(r){var e=r;return e=e.replace(/<[^> ]*/g,function(r){return r.toLowerCase()}),e=e.replace(/<[^>]*>/g,function(r){return r=r.replace(/ [^=]+=/g,function(r){return r.toLowerCase()})}),e=e.replace(/<[^>]*>/g,function(r){return r=r.replace(/( [^=]+=)([^"][^ >]*)/g,'$1"$2"')})}function n(r,n){var a,c,i,l="",s="";for(a=0;n.charAt(a)===r.charAt(a);a+=1)l+=n.charAt(a);for(var u=a;u>=0;u-=1){if("<"===r.charAt(u)){a=u,l=r.substring(0,a);break}if(">"===r.charAt(u))break}for(n=e(n),r=e(r),c=0;n.charAt(c)===r.charAt(c);c+=1)s+=n.charAt(c);for(var g=c;g>=0;g-=1){if(">"===r.charAt(g)){c=g,s=r.substring(0,c);break}if("<"===r.charAt(g))break}if(s=e(s),a===n.length-c)return!1;for(n=e(n),i=n.substring(a,n.length-c),i=t(i),i=i.replace(/<b(\s+|>)/g,"<strong$1"),i=i.replace(/<\/b(\s+|>)/g,"</strong$1"),i=i.replace(/<i(\s+|>)/g,"<em$1"),i=i.replace(/<\/i(\s+|>)/g,"</em$1"),i=i.replace(/<!(?:--[\s\S]*?--\s*)?>\s*/g,""),i=i.replace(/&nbsp;/gi," "),i=i.replace(/ <\//gi,"</");-1!==i.indexOf(" ");){var o=i.split(" ");i=o.join(" ")}return i=i.replace(/^\s*|\s*$/g,""),i=i.replace(/<[^>]*>/g,function(r){return r=r.replace(/ ([^=]+)="[^"]*"/g,function(r,e){return-1!==["alt","href","src","title"].indexOf(e)?r:""})}),i=i.replace(/<\?xml[^>]*>/g,""),i=i.replace(/<[^ >]+:[^>]*>/g,""),i=i.replace(/<\/[^ >]+:[^>]*>/g,""),i=i.replace(/<(div|span|style|meta|link){1}.*?>/gi,""),n=l+i+s}r.extend(!0,r.trumbowyg,{plugins:{cleanPaste:{init:function(r){r.pasteHandlers.push(function(){try{var e=r.$ed.html();setTimeout(function(){var t=r.$ed.html();t=n(e,t),r.$ed.html(t)},0)}catch(t){}})}}}})}(jQuery);

View File

@ -0,0 +1,69 @@
// jshint node:true
'use strict';
var gulp = require('gulp'),
$ = require('gulp-load-plugins')();
var paths = {
mainStyle: 'ui/sass/trumbowyg.colors.scss',
styles: {
sass: 'ui/sass',
includePaths: ['ui/sass', '../../src/ui/sass/mixins']
}
};
var pkg = require('../../package.json');
var banner = ['/**',
' * <%= pkg.title %> v<%= pkg.version %> - <%= pkg.description %>',
' * <%= description %>',
' * ------------------------',
' * @link <%= pkg.homepage %>',
' * @license <%= pkg.license %>',
' * @author <%= pkg.author.name %>',
' * Twitter : @AlexandreDemode',
' * Website : <%= pkg.author.url.replace("http://", "") %>',
' */',
'\n'].join('\n');
var bannerLight = ['/** <%= pkg.title %> v<%= pkg.version %> - <%= pkg.description %>',
' - <%= pkg.homepage.replace("http://", "") %>',
' - License <%= pkg.license %>',
' - Author : <%= pkg.author.name %>',
' / <%= pkg.author.url.replace("http://", "") %>',
' */',
'\n'].join('');
gulp.task('styles', function () {
return gulp.src(paths.mainStyle)
.pipe($.sass({
sass: paths.styles.sass,
includePaths: paths.styles.includePaths
}))
.pipe($.autoprefixer(['last 1 version', '> 1%', 'ff >= 20', 'ie >= 8', 'opera >= 12', 'Android >= 2.2'], {cascade: true}))
.pipe($.header(banner, {pkg: pkg, description: 'Colors plugin stylesheet for Trumbowyg editor'}))
.pipe(gulp.dest('../../dist/plugins/colors/ui/'))
.pipe($.size({title: 'trumbowyg.colors.css'}))
.pipe($.rename({suffix: '.min'})) // génère une version minimifié
.pipe($.minifyCss())
.pipe($.header(bannerLight, {pkg: pkg}))
.pipe(gulp.dest('../../dist/plugins/colors/ui/'))
.pipe($.size({title: 'trumbowyg.colors.min.css'}));
});
gulp.task('sass-dist', function () {
return gulp.src('ui/sass/**/*.scss')
.pipe($.header(banner, {pkg: pkg, description: 'Colors plugin stylesheet for Trumbowyg editor'}))
.pipe(gulp.dest('../../dist/plugins/colors/ui/sass/'));
});
gulp.task('watch', function () {
gulp.watch(paths.mainStyle, ['styles']);
});
gulp.task('build', ['styles', 'sass-dist']);
gulp.task('default', ['build', 'watch']);

View File

@ -0,0 +1 @@
"use strict";var gulp=require("gulp"),$=require("gulp-load-plugins")(),paths={mainStyle:"ui/sass/trumbowyg.colors.scss",styles:{sass:"ui/sass",includePaths:["ui/sass","../../src/ui/sass/mixins"]}},pkg=require("../../package.json"),banner=["/**"," * <%= pkg.title %> v<%= pkg.version %> - <%= pkg.description %>"," * <%= description %>"," * ------------------------"," * @link <%= pkg.homepage %>"," * @license <%= pkg.license %>"," * @author <%= pkg.author.name %>"," * Twitter : @AlexandreDemode",' * Website : <%= pkg.author.url.replace("http://", "") %>'," */","\n"].join("\n"),bannerLight=["/** <%= pkg.title %> v<%= pkg.version %> - <%= pkg.description %>",' - <%= pkg.homepage.replace("http://", "") %>'," - License <%= pkg.license %>"," - Author : <%= pkg.author.name %>",' / <%= pkg.author.url.replace("http://", "") %>'," */","\n"].join("");gulp.task("styles",function(){return gulp.src(paths.mainStyle).pipe($.sass({sass:paths.styles.sass,includePaths:paths.styles.includePaths})).pipe($.autoprefixer(["last 1 version","> 1%","ff >= 20","ie >= 8","opera >= 12","Android >= 2.2"],{cascade:!0})).pipe($.header(banner,{pkg:pkg,description:"Colors plugin stylesheet for Trumbowyg editor"})).pipe(gulp.dest("../../dist/plugins/colors/ui/")).pipe($.size({title:"trumbowyg.colors.css"})).pipe($.rename({suffix:".min"})).pipe($.minifyCss()).pipe($.header(bannerLight,{pkg:pkg})).pipe(gulp.dest("../../dist/plugins/colors/ui/")).pipe($.size({title:"trumbowyg.colors.min.css"}))}),gulp.task("sass-dist",function(){return gulp.src("ui/sass/**/*.scss").pipe($.header(banner,{pkg:pkg,description:"Colors plugin stylesheet for Trumbowyg editor"})).pipe(gulp.dest("../../dist/plugins/colors/ui/sass/"))}),gulp.task("watch",function(){gulp.watch(paths.mainStyle,["styles"])}),gulp.task("build",["styles","sass-dist"]),gulp.task("default",["build","watch"]);

View File

@ -13,6 +13,7 @@
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
cs: {
foreColor: 'Barva textu',
backColor: 'Barva pozadí'
@ -28,55 +29,140 @@
sk: {
foreColor: 'Farba textu',
backColor: 'Farba pozadia'
},
zh_cn: {
foreColor: '文字颜色',
backColor: '背景颜色'
}
}
});
// jshint camelcase:true
// Create btnsDef entry
$.extend(true, $.trumbowyg, {
opts: {
btnsDef: {}
function hex(x) {
return ('0' + parseInt(x).toString(16)).slice(-2);
}
function colorToHex(rgb) {
if (rgb.search('rgb') === -1) {
return rgb.replace('#', '');
} else if (rgb === 'rgba(0, 0, 0, 0)') {
return 'transparent';
} else {
rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);
return hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
}
});
}
// Set default colors
if (!$.trumbowyg.opts.colors)
$.trumbowyg.opts.colors = ['ffffff', '000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646', 'ffff00', 'f2f2f2', '7f7f7f', 'ddd9c3', 'c6d9f0', 'dbe5f1', 'f2dcdb', 'ebf1dd', 'e5e0ec', 'dbeef3', 'fdeada', 'fff2ca', 'd8d8d8', '595959', 'c4bd97', '8db3e2', 'b8cce4', 'e5b9b7', 'd7e3bc', 'ccc1d9', 'b7dde8', 'fbd5b5', 'ffe694', 'bfbfbf', '3f3f3f', '938953', '548dd4', '95b3d7', 'd99694', 'c3d69b', 'b2a2c7', 'b7dde8', 'fac08f', 'f2c314', 'a5a5a5', '262626', '494429', '17365d', '366092', '953734', '76923c', '5f497a', '92cddc', 'e36c09', 'c09100', '7f7f7f', '0c0c0c', '1d1b10', '0f243e', '244061', '632423', '4f6128', '3f3151', '31859b', '974806', '7f6000'];
function colorTagHandler(element, trumbowyg) {
var tags = [];
if(!element.style){
return tags;
}
// background color
if (element.style.backgroundColor !== '') {
var backColor = colorToHex(element.style.backgroundColor);
if (trumbowyg.o.plugins.colors.colorList.indexOf(backColor) >= 0) {
tags.push('backColor' + backColor);
} else {
tags.push('backColorFree');
}
}
// text color
var foreColor;
if (element.style.color !== '') {
foreColor = colorToHex(element.style.color);
} else if (element.hasAttribute('color')) {
foreColor = colorToHex(element.getAttribute('color'));
}
if (foreColor) {
if (trumbowyg.o.plugins.colors.colorList.indexOf(foreColor) >= 0) {
tags.push('foreColor' + foreColor);
} else {
tags.push('foreColorFree');
}
}
return tags;
}
var defaultOptions = {
colorList: ['ffffff', '000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646', 'ffff00', 'f2f2f2', '7f7f7f', 'ddd9c3', 'c6d9f0', 'dbe5f1', 'f2dcdb', 'ebf1dd', 'e5e0ec', 'dbeef3', 'fdeada', 'fff2ca', 'd8d8d8', '595959', 'c4bd97', '8db3e2', 'b8cce4', 'e5b9b7', 'd7e3bc', 'ccc1d9', 'b7dde8', 'fbd5b5', 'ffe694', 'bfbfbf', '3f3f3f', '938953', '548dd4', '95b3d7', 'd99694', 'c3d69b', 'b2a2c7', 'b7dde8', 'fac08f', 'f2c314', 'a5a5a5', '262626', '494429', '17365d', '366092', '953734', '76923c', '5f497a', '92cddc', 'e36c09', 'c09100', '7f7f7f', '0c0c0c', '1d1b10', '0f243e', '244061', '632423', '4f6128', '3f3151', '31859b', '974806', '7f6000']
};
// Add all colors in two dropdowns
$.extend(true, $.trumbowyg, {
opts: {
btnsDef: {
foreColor: {
dropdown: buildDropdown('foreColor')
plugins: {
color: {
init: function (trumbowyg) {
trumbowyg.o.plugins.colors = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.colors || {});
var foreColorBtnDef = {
dropdown: buildDropdown('foreColor', trumbowyg)
},
backColorBtnDef = {
dropdown: buildDropdown('backColor', trumbowyg)
};
trumbowyg.addBtnDef('foreColor', foreColorBtnDef);
trumbowyg.addBtnDef('backColor', backColorBtnDef);
},
backColor: {
dropdown: buildDropdown('backColor')
}
tagHandler: colorTagHandler
}
}
});
function buildDropdown(func) {
function buildDropdown(fn, trumbowyg) {
var dropdown = [];
$.each($.trumbowyg.opts.colors, function (i, color) {
var btn = '_' + func + color;
$.trumbowyg.opts.btnsDef[btn] = {
func: func,
param: '#' + color,
style: 'background-color: #' + color + ';'
};
$.each(trumbowyg.o.plugins.colors.colorList, function (i, color) {
var btn = fn + color,
btnDef = {
fn: fn,
forceCss: true,
param: '#' + color,
style: 'background-color: #' + color + ';'
};
trumbowyg.addBtnDef(btn, btnDef);
dropdown.push(btn);
});
var btn = '_' + func + 'transparent';
$.trumbowyg.opts.btnsDef[btn] = {
func: func,
param: 'transparent',
style: 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);'
};
dropdown.push(btn);
var removeColorButtonName = fn + 'Remove',
removeColorBtnDef = {
fn: 'removeFormat',
param: fn,
style: 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);'
};
trumbowyg.addBtnDef(removeColorButtonName, removeColorBtnDef);
dropdown.push(removeColorButtonName);
// add free color btn
var freeColorButtonName = fn + 'Free',
freeColorBtnDef = {
fn: function () {
trumbowyg.openModalInsert(trumbowyg.lang[fn],
{
color: {
label: fn,
value: '#FFFFFF'
}
},
// callback
function (values) {
trumbowyg.execCmd(fn, values.color);
return true;
}
);
},
text: '#',
// style adjust for displaying the text
style: 'text-indent: 0;line-height: 20px;padding: 0 5px;'
};
trumbowyg.addBtnDef(freeColorButtonName, freeColorBtnDef);
dropdown.push(freeColorButtonName);
return dropdown;
}
})(jQuery);

View File

@ -1 +1 @@
!function(o){"use strict";function f(f){var r=[];o.each(o.trumbowyg.opts.colors,function(e,d){var c="_"+f+d;o.trumbowyg.opts.btnsDef[c]={func:f,param:"#"+d,style:"background-color: #"+d+";"},r.push(c)});var e="_"+f+"transparent";return o.trumbowyg.opts.btnsDef[e]={func:f,param:"transparent",style:"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);"},r.push(e),r}o.extend(!0,o.trumbowyg,{langs:{cs:{foreColor:"Barva textu",backColor:"Barva pozadí"},en:{foreColor:"Text color",backColor:"Background color"},fr:{foreColor:"Couleur du texte",backColor:"Couleur de fond"},sk:{foreColor:"Farba textu",backColor:"Farba pozadia"}}}),o.extend(!0,o.trumbowyg,{opts:{btnsDef:{}}}),o.trumbowyg.opts.colors||(o.trumbowyg.opts.colors=["ffffff","000000","eeece1","1f497d","4f81bd","c0504d","9bbb59","8064a2","4bacc6","f79646","ffff00","f2f2f2","7f7f7f","ddd9c3","c6d9f0","dbe5f1","f2dcdb","ebf1dd","e5e0ec","dbeef3","fdeada","fff2ca","d8d8d8","595959","c4bd97","8db3e2","b8cce4","e5b9b7","d7e3bc","ccc1d9","b7dde8","fbd5b5","ffe694","bfbfbf","3f3f3f","938953","548dd4","95b3d7","d99694","c3d69b","b2a2c7","b7dde8","fac08f","f2c314","a5a5a5","262626","494429","17365d","366092","953734","76923c","5f497a","92cddc","e36c09","c09100","7f7f7f","0c0c0c","1d1b10","0f243e","244061","632423","4f6128","3f3151","31859b","974806","7f6000"]),o.extend(!0,o.trumbowyg,{opts:{btnsDef:{foreColor:{dropdown:f("foreColor")},backColor:{dropdown:f("backColor")}}}})}(jQuery);
!function(o){"use strict";function r(o){return("0"+parseInt(o).toString(16)).slice(-2)}function e(o){return-1===o.search("rgb")?o.replace("#",""):"rgba(0, 0, 0, 0)"===o?"transparent":(o=o.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/),r(o[1])+r(o[2])+r(o[3]))}function f(o,r){var f=[];if(!o.style)return f;if(""!==o.style.backgroundColor){var c=e(o.style.backgroundColor);r.o.plugins.colors.colorList.indexOf(c)>=0?f.push("backColor"+c):f.push("backColorFree")}var a;return""!==o.style.color?a=e(o.style.color):o.hasAttribute("color")&&(a=e(o.getAttribute("color"))),a&&(r.o.plugins.colors.colorList.indexOf(a)>=0?f.push("foreColor"+a):f.push("foreColorFree")),f}function c(r,e){var f=[];o.each(e.o.plugins.colors.colorList,function(o,c){var a=r+c,d={fn:r,forceCss:!0,param:"#"+c,style:"background-color: #"+c+";"};e.addBtnDef(a,d),f.push(a)});var c=r+"Remove",a={fn:"removeFormat",param:r,style:"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);"};e.addBtnDef(c,a),f.push(c);var d=r+"Free",t={fn:function(){e.openModalInsert(e.lang[r],{color:{label:r,value:"#FFFFFF"}},function(o){return e.execCmd(r,o.color),!0})},text:"#",style:"text-indent: 0;line-height: 20px;padding: 0 5px;"};return e.addBtnDef(d,t),f.push(d),f}o.extend(!0,o.trumbowyg,{langs:{cs:{foreColor:"Barva textu",backColor:"Barva pozadí"},en:{foreColor:"Text color",backColor:"Background color"},fr:{foreColor:"Couleur du texte",backColor:"Couleur de fond"},sk:{foreColor:"Farba textu",backColor:"Farba pozadia"},zh_cn:{foreColor:"文字颜色",backColor:"背景颜色"}}});var a={colorList:["ffffff","000000","eeece1","1f497d","4f81bd","c0504d","9bbb59","8064a2","4bacc6","f79646","ffff00","f2f2f2","7f7f7f","ddd9c3","c6d9f0","dbe5f1","f2dcdb","ebf1dd","e5e0ec","dbeef3","fdeada","fff2ca","d8d8d8","595959","c4bd97","8db3e2","b8cce4","e5b9b7","d7e3bc","ccc1d9","b7dde8","fbd5b5","ffe694","bfbfbf","3f3f3f","938953","548dd4","95b3d7","d99694","c3d69b","b2a2c7","b7dde8","fac08f","f2c314","a5a5a5","262626","494429","17365d","366092","953734","76923c","5f497a","92cddc","e36c09","c09100","7f7f7f","0c0c0c","1d1b10","0f243e","244061","632423","4f6128","3f3151","31859b","974806","7f6000"]};o.extend(!0,o.trumbowyg,{plugins:{color:{init:function(r){r.o.plugins.colors=o.extend(!0,{},a,r.o.plugins.colors||{});var e={dropdown:c("foreColor",r)},f={dropdown:c("backColor",r)};r.addBtnDef("foreColor",e),r.addBtnDef("backColor",f)},tagHandler:f}}})}(jQuery);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

View File

@ -1,18 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Colors plugin stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$backcolor-black-2x: 0px 0px;
$forecolor-black-2x: -50px 0px;
$sprite-height-black-2x: 50px;
$sprite-width-black-2x: 100px;
$icons-black-2x: "./images/icons-black-2x.png";

View File

@ -1,18 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Colors plugin stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$backcolor-black: 0px 0px;
$forecolor-black: -25px 0px;
$sprite-height-black: 25px;
$sprite-width-black: 50px;
$icons-black: "./images/icons-black.png";

View File

@ -1,18 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Colors plugin stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$backcolor-white-2x: 0px 0px;
$forecolor-white-2x: -50px 0px;
$sprite-height-white-2x: 50px;
$sprite-width-white-2x: 100px;
$icons-white-2x: "./images/icons-white-2x.png";

View File

@ -1,18 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Colors plugin stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$backcolor-white: 0px 0px;
$forecolor-white: -25px 0px;
$sprite-height-white: 25px;
$sprite-width-white: 50px;
$icons-white: "./images/icons-white.png";

View File

@ -1,5 +1,5 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Trumbowyg v2.4.2 - A lightweight WYSIWYG editor
* Colors plugin stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
@ -9,18 +9,15 @@
* Website : alex-d.fr
*/
@import "sprite-black";
@import "sprite-black-2x";
@import "sprite-white";
@import "sprite-white-2x";
@import "sprite-pos";
.foreColor-trumbowyg-dropdown,
.backColor-trumbowyg-dropdown {
.trumbowyg-dropdown-foreColor,
.trumbowyg-dropdown-backColor {
width: 276px;
padding: 7px 5px;
svg {
display: none !important;
}
button {
display: block;
position: relative;
@ -37,69 +34,16 @@
&::after {
content: " ";
display: block;
height: 27px;
width: 27px;
background: inherit;
position: absolute;
top: -5px;
left: -5px;
height: 27px;
width: 27px;
background: inherit;
border: 1px solid #FFF;
box-shadow: #000 0 0 2px;
z-index: 10;
}
}
}
}
/*
* Buttons icons
*/
.trumbowyg-button-pane li button {
&.trumbowyg-foreColor-button,
&.trumbowyg-backColor-button {
background-image: url($icons-black);
}
&.trumbowyg-foreColor-button { @include sprite-pos($forecolor-black); }
&.trumbowyg-backColor-button { @include sprite-pos($backcolor-black); }
}
.trumbowyg-black {
.trumbowyg-button-pane li button {
&.trumbowyg-foreColor-button,
&.trumbowyg-backColor-button {
background-image: url($icons-white);
}
&.trumbowyg-foreColor-button { @include sprite-pos($forecolor-white); }
&.trumbowyg-backColor-button { @include sprite-pos($backcolor-white); }
}
}
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 4/3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx){
.trumbowyg-button-pane li button {
&.trumbowyg-foreColor-button,
&.trumbowyg-backColor-button {
background-image: url($icons-black-2x) !important;
background-size: round($sprite-width-black-2x / 2) round($sprite-height-black-2x / 2) !important;
}
&.trumbowyg-foreColor-button { @include sprite-pos($forecolor-black-2x, true); }
&.trumbowyg-backColor-button { @include sprite-pos($backcolor-black-2x, true); }
}
.trumbowyg-black {
.trumbowyg-button-pane li button {
&.trumbowyg-foreColor-button,
&.trumbowyg-backColor-button {
background-image: url($icons-white-2x) !important;
}
&.trumbowyg-foreColor-button { @include sprite-pos($forecolor-white-2x, true); }
&.trumbowyg-backColor-button { @include sprite-pos($backcolor-white-2x, true); }
}
}
}

View File

@ -1,5 +1,5 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Trumbowyg v2.4.2 - A lightweight WYSIWYG editor
* Colors plugin stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
@ -9,12 +9,15 @@
* Website : alex-d.fr
*/
.foreColor-trumbowyg-dropdown,
.backColor-trumbowyg-dropdown {
.trumbowyg-dropdown-foreColor,
.trumbowyg-dropdown-backColor {
width: 276px;
padding: 7px 5px; }
.foreColor-trumbowyg-dropdown button,
.backColor-trumbowyg-dropdown button {
.trumbowyg-dropdown-foreColor svg,
.trumbowyg-dropdown-backColor svg {
display: none !important; }
.trumbowyg-dropdown-foreColor button,
.trumbowyg-dropdown-backColor button {
display: block;
position: relative;
float: left;
@ -24,53 +27,17 @@
border: 1px solid #333;
padding: 0;
margin: 2px; }
.foreColor-trumbowyg-dropdown button:hover::after, .foreColor-trumbowyg-dropdown button:focus::after,
.backColor-trumbowyg-dropdown button:hover::after,
.backColor-trumbowyg-dropdown button:focus::after {
.trumbowyg-dropdown-foreColor button:hover::after, .trumbowyg-dropdown-foreColor button:focus::after,
.trumbowyg-dropdown-backColor button:hover::after,
.trumbowyg-dropdown-backColor button:focus::after {
content: " ";
display: block;
height: 27px;
width: 27px;
background: inherit;
position: absolute;
top: -5px;
left: -5px;
height: 27px;
width: 27px;
background: inherit;
border: 1px solid #FFF;
box-shadow: #000 0 0 2px;
z-index: 10; }
/*
* Buttons icons
*/
.trumbowyg-button-pane li button.trumbowyg-foreColor-button, .trumbowyg-button-pane li button.trumbowyg-backColor-button {
background-image: url("./images/icons-black.png"); }
.trumbowyg-button-pane li button.trumbowyg-foreColor-button {
background-position: -20px 5px; }
.trumbowyg-button-pane li button.trumbowyg-backColor-button {
background-position: 5px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-foreColor-button, .trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-backColor-button {
background-image: url("./images/icons-white.png"); }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-foreColor-button {
background-position: -20px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-backColor-button {
background-position: 5px 5px; }
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
.trumbowyg-button-pane li button.trumbowyg-foreColor-button, .trumbowyg-button-pane li button.trumbowyg-backColor-button {
background-image: url("./images/icons-black-2x.png") !important;
background-size: 50px 25px !important; }
.trumbowyg-button-pane li button.trumbowyg-foreColor-button {
background-position: -20px 5px; }
.trumbowyg-button-pane li button.trumbowyg-backColor-button {
background-position: 5px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-foreColor-button, .trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-backColor-button {
background-image: url("./images/icons-white-2x.png") !important; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-foreColor-button {
background-position: -20px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-backColor-button {
background-position: 5px 5px; } }

View File

@ -1,2 +1,2 @@
/** Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
.backColor-trumbowyg-dropdown,.foreColor-trumbowyg-dropdown{width:276px;padding:7px 5px}.backColor-trumbowyg-dropdown button,.foreColor-trumbowyg-dropdown button{display:block;position:relative;float:left;text-indent:-9999px;height:20px;width:20px;border:1px solid #333;padding:0;margin:2px}.backColor-trumbowyg-dropdown button:focus::after,.backColor-trumbowyg-dropdown button:hover::after,.foreColor-trumbowyg-dropdown button:focus::after,.foreColor-trumbowyg-dropdown button:hover::after{content:" ";display:block;height:27px;width:27px;background:inherit;position:absolute;top:-5px;left:-5px;border:1px solid #FFF;box-shadow:#000 0 0 2px;z-index:10}.trumbowyg-button-pane li button.trumbowyg-backColor-button,.trumbowyg-button-pane li button.trumbowyg-foreColor-button{background-image:url(images/icons-black.png)}.trumbowyg-button-pane li button.trumbowyg-foreColor-button{background-position:-20px 5px}.trumbowyg-button-pane li button.trumbowyg-backColor-button{background-position:5px 5px}.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-backColor-button,.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-foreColor-button{background-image:url(images/icons-white.png)}.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-foreColor-button{background-position:-20px 5px}.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-backColor-button{background-position:5px 5px}@media only screen and (-webkit-min-device-pixel-ratio:1.3),only screen and (min--moz-device-pixel-ratio:1.3),only screen and (min-device-pixel-ratio:1.3),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.trumbowyg-button-pane li button.trumbowyg-backColor-button,.trumbowyg-button-pane li button.trumbowyg-foreColor-button{background-image:url(images/icons-black-2x.png)!important;background-size:50px 25px!important}.trumbowyg-button-pane li button.trumbowyg-foreColor-button{background-position:-20px 5px}.trumbowyg-button-pane li button.trumbowyg-backColor-button{background-position:5px 5px}.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-backColor-button,.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-foreColor-button{background-image:url(images/icons-white-2x.png)!important}.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-foreColor-button{background-position:-20px 5px}.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-backColor-button{background-position:5px 5px}}
/** Trumbowyg v2.4.2 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
.trumbowyg-dropdown-backColor,.trumbowyg-dropdown-foreColor{width:276px;padding:7px 5px}.trumbowyg-dropdown-backColor svg,.trumbowyg-dropdown-foreColor svg{display:none!important}.trumbowyg-dropdown-backColor button,.trumbowyg-dropdown-foreColor button{display:block;position:relative;float:left;text-indent:-9999px;height:20px;width:20px;border:1px solid #333;padding:0;margin:2px}.trumbowyg-dropdown-backColor button:focus::after,.trumbowyg-dropdown-backColor button:hover::after,.trumbowyg-dropdown-foreColor button:focus::after,.trumbowyg-dropdown-foreColor button:hover::after{content:" ";display:block;position:absolute;top:-5px;left:-5px;height:27px;width:27px;background:inherit;border:1px solid #FFF;box-shadow:#000 0 0 2px;z-index:10}

View File

@ -1,112 +0,0 @@
/* ===========================================================
* trumbowyg.editlink.js v1.0
* Link editation plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Rastislav Švarba (ra100)
* Twitter : @ra100
* Website : ra100.net
*/
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
en: {
editLink: 'Edit Link'
},
fr: {
editLink: 'Editer un lien'
},
cs: {
editLink: 'Upravit odkaz'
},
sk: {
editLink: 'Upraviť odkaz'
}
},
opts: {
btnsDef: {
editLink: {
func: function (params, tbw) {
var t = tbw,
url = '',
title = '',
target = '_blank',
node = '',
edit = false;
var sel = t.doc.getSelection();
var range = new Range();
if (sel.type === 'Caret') { //if range is not selected, select whole <a> element
range.selectNode(sel.baseNode);
sel.addRange(range);
t.saveSelection();
node = t.selection.commonAncestorContainer;
} else {
if ((sel.anchorOffset + sel.focusOffset) === sel.focusNode.length) { //if selection is large as whole <a>
range.selectNode(sel.focusNode);
sel.addRange(range);
t.saveSelection();
node = t.selection.commonAncestorContainer;
} else {
t.saveSelection();
node = t.selection.commonAncestorContainer.parentNode;
}
}
if (node !== '' && $(node).prop('tagName') === 'A') {
var $a = $(node);
url = $a.attr('href');
title = ($a.attr('title') !== undefined) ? $a.attr('title') : $a.text();
target = ($a.attr('target') !== undefined) ? $a.attr('target') : target;
edit = true;
}
t.openModalInsert(t.lang.editLink, {
url: {
label: 'URL',
required: true,
value: url
},
title: {
label: t.lang.title,
value: title
},
text: {
label: t.lang.text,
value: t.getSelectedText()
},
target: {
label: t.lang.target,
value: target
}
}, function (v) { // v is value
t.execCmd('createLink', v.url);
if (!edit) return true;
var l = $('a[href="' + v.url + '"]:not([title])', t.$box);
if (v.text.length > 0) {
l.text(v.text);
}
if (v.title.length > 0) {
l.attr('title', v.title);
} else {
l.removeAttr('title');
}
if (v.target.length > 0) {
l.attr('target', v.target);
} else {
l.removeAttr('target');
}
return true;
});
}
},
link: {
dropdown: ['createLink', 'editLink', 'unlink']
}
}
}
});
})(jQuery);

View File

@ -1 +0,0 @@
!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{editLink:"Edit Link"},fr:{editLink:"Editer un lien"},cs:{editLink:"Upravit odkaz"},sk:{editLink:"Upraviť odkaz"}},opts:{btnsDef:{editLink:{func:function(t,n){var a=n,r="",i="",l="_blank",o="",d=!1,c=a.doc.getSelection(),s=new Range;if("Caret"===c.type?(s.selectNode(c.baseNode),c.addRange(s),a.saveSelection(),o=a.selection.commonAncestorContainer):c.anchorOffset+c.focusOffset===c.focusNode.length?(s.selectNode(c.focusNode),c.addRange(s),a.saveSelection(),o=a.selection.commonAncestorContainer):(a.saveSelection(),o=a.selection.commonAncestorContainer.parentNode),""!==o&&"A"===e(o).prop("tagName")){var g=e(o);r=g.attr("href"),i=void 0!==g.attr("title")?g.attr("title"):g.text(),l=void 0!==g.attr("target")?g.attr("target"):l,d=!0}a.openModalInsert(a.lang.editLink,{url:{label:"URL",required:!0,value:r},title:{label:a.lang.title,value:i},text:{label:a.lang.text,value:a.getSelectedText()},target:{label:a.lang.target,value:l}},function(t){if(a.execCmd("createLink",t.url),!d)return!0;var n=e('a[href="'+t.url+'"]:not([title])',a.$box);return t.text.length>0&&n.text(t.text),t.title.length>0?n.attr("title",t.title):n.removeAttr("title"),t.target.length>0?n.attr("target",t.target):n.removeAttr("target"),!0})}},link:{dropdown:["createLink","editLink","unlink"]}}}})}(jQuery);

View File

@ -0,0 +1,938 @@
/* ===========================================================
* trumbowyg.emoji.js v0.1
* Emoji picker plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Nicolas Pion
* Twitter : @nicolas_pion
*/
(function ($) {
'use strict';
var defaultOptions = {
emojiList: [
':bowtie:',
':smile:',
':laughing:',
':blush:',
':smiley:',
':relaxed:',
':smirk:',
':heart_eyes:',
':kissing_heart:',
':kissing_closed_eyes:',
':flushed:',
':relieved:',
':satisfied:',
':grin:',
':wink:',
':stuck_out_tongue_winking_eye:',
':stuck_out_tongue_closed_eyes:',
':grinning:',
':kissing:',
':kissing_smiling_eyes:',
':stuck_out_tongue:',
':sleeping:',
':worried:',
':frowning:',
':anguished:',
':open_mouth:',
':grimacing:',
':confused:',
':hushed:',
':expressionless:',
':unamused:',
':sweat_smile:',
':sweat:',
':disappointed_relieved:',
':weary:',
':pensive:',
':disappointed:',
':confounded:',
':fearful:',
':cold_sweat:',
':persevere:',
':cry:',
':sob:',
':joy:',
':astonished:',
':scream:',
':neckbeard:',
':tired_face:',
':angry:',
':rage:',
':triumph:',
':sleepy:',
':yum:',
':mask:',
':sunglasses:',
':dizzy_face:',
':imp:',
':smiling_imp:',
':neutral_face:',
':no_mouth:',
':innocent:',
':alien:',
':yellow_heart:',
':blue_heart:',
':purple_heart:',
':heart:',
':green_heart:',
':broken_heart:',
':heartbeat:',
':heartpulse:',
':two_hearts:',
':revolving_hearts:',
':cupid:',
':sparkling_heart:',
':sparkles:',
':star:',
':star2:',
':dizzy:',
':boom:',
':collision:',
':anger:',
':exclamation:',
':question:',
':grey_exclamation:',
':grey_question:',
':zzz:',
':dash:',
':sweat_drops:',
':notes:',
':musical_note:',
':fire:',
':hankey:',
':poop:',
':shit:',
':+1:',
':thumbsup:',
':-1:',
':thumbsdown:',
':ok_hand:',
':punch:',
':facepunch:',
':fist:',
':v:',
':wave:',
':hand:',
':raised_hand:',
':open_hands:',
':point_up:',
':point_down:',
':point_left:',
':point_right:',
':raised_hands:',
':pray:',
':point_up_2:',
':clap:',
':muscle:',
':metal:',
':fu:',
':runner:',
':running:',
':couple:',
':family:',
':two_men_holding_hands:',
':two_women_holding_hands:',
':dancer:',
':dancers:',
':ok_woman:',
':no_good:',
':information_desk_person:',
':raising_hand:',
':bride_with_veil:',
':person_with_pouting_face:',
':person_frowning:',
':bow:',
':couplekiss:',
':couple_with_heart:',
':massage:',
':haircut:',
':nail_care:',
':boy:',
':girl:',
':woman:',
':man:',
':baby:',
':older_woman:',
':older_man:',
':person_with_blond_hair:',
':man_with_gua_pi_mao:',
':man_with_turban:',
':construction_worker:',
':cop:',
':angel:',
':princess:',
':smiley_cat:',
':smile_cat:',
':heart_eyes_cat:',
':kissing_cat:',
':smirk_cat:',
':scream_cat:',
':crying_cat_face:',
':joy_cat:',
':pouting_cat:',
':japanese_ogre:',
':japanese_goblin:',
':see_no_evil:',
':hear_no_evil:',
':speak_no_evil:',
':guardsman:',
':skull:',
':feet:',
':lips:',
':kiss:',
':droplet:',
':ear:',
':eyes:',
':nose:',
':tongue:',
':love_letter:',
':bust_in_silhouette:',
':busts_in_silhouette:',
':speech_balloon:',
':thought_balloon:',
':feelsgood:',
':finnadie:',
':goberserk:',
':godmode:',
':hurtrealbad:',
':rage1:',
':rage2:',
':rage3:',
':rage4:',
':suspect:',
':trollface:',
':sunny:',
':umbrella:',
':cloud:',
':snowflake:',
':snowman:',
':zap:',
':cyclone:',
':foggy:',
':ocean:',
':cat:',
':dog:',
':mouse:',
':hamster:',
':rabbit:',
':wolf:',
':frog:',
':tiger:',
':koala:',
':bear:',
':pig:',
':pig_nose:',
':cow:',
':boar:',
':monkey_face:',
':monkey:',
':horse:',
':racehorse:',
':camel:',
':sheep:',
':elephant:',
':panda_face:',
':snake:',
':bird:',
':baby_chick:',
':hatched_chick:',
':hatching_chick:',
':chicken:',
':penguin:',
':turtle:',
':bug:',
':honeybee:',
':ant:',
':beetle:',
':snail:',
':octopus:',
':tropical_fish:',
':fish:',
':whale:',
':whale2:',
':dolphin:',
':cow2:',
':ram:',
':rat:',
':water_buffalo:',
':tiger2:',
':rabbit2:',
':dragon:',
':goat:',
':rooster:',
':dog2:',
':pig2:',
':mouse2:',
':ox:',
':dragon_face:',
':blowfish:',
':crocodile:',
':dromedary_camel:',
':leopard:',
':cat2:',
':poodle:',
':paw_prints:',
':bouquet:',
':cherry_blossom:',
':tulip:',
':four_leaf_clover:',
':rose:',
':sunflower:',
':hibiscus:',
':maple_leaf:',
':leaves:',
':fallen_leaf:',
':herb:',
':mushroom:',
':cactus:',
':palm_tree:',
':evergreen_tree:',
':deciduous_tree:',
':chestnut:',
':seedling:',
':blossom:',
':ear_of_rice:',
':shell:',
':globe_with_meridians:',
':sun_with_face:',
':full_moon_with_face:',
':new_moon_with_face:',
':new_moon:',
':waxing_crescent_moon:',
':first_quarter_moon:',
':waxing_gibbous_moon:',
':full_moon:',
':waning_gibbous_moon:',
':last_quarter_moon:',
':waning_crescent_moon:',
':last_quarter_moon_with_face:',
':first_quarter_moon_with_face:',
':crescent_moon:',
':earth_africa:',
':earth_americas:',
':earth_asia:',
':volcano:',
':milky_way:',
':partly_sunny:',
':octocat:',
':squirrel:',
':bamboo:',
':gift_heart:',
':dolls:',
':school_satchel:',
':mortar_board:',
':flags:',
':fireworks:',
':sparkler:',
':wind_chime:',
':rice_scene:',
':jack_o_lantern:',
':ghost:',
':santa:',
':christmas_tree:',
':gift:',
':bell:',
':no_bell:',
':tanabata_tree:',
':tada:',
':confetti_ball:',
':balloon:',
':crystal_ball:',
':cd:',
':dvd:',
':floppy_disk:',
':camera:',
':video_camera:',
':movie_camera:',
':computer:',
':tv:',
':iphone:',
':phone:',
':telephone:',
':telephone_receiver:',
':pager:',
':fax:',
':minidisc:',
':vhs:',
':sound:',
':speaker:',
':mute:',
':loudspeaker:',
':mega:',
':hourglass:',
':hourglass_flowing_sand:',
':alarm_clock:',
':watch:',
':radio:',
':satellite:',
':loop:',
':mag:',
':mag_right:',
':unlock:',
':lock:',
':lock_with_ink_pen:',
':closed_lock_with_key:',
':key:',
':bulb:',
':flashlight:',
':high_brightness:',
':low_brightness:',
':electric_plug:',
':battery:',
':calling:',
':email:',
':mailbox:',
':postbox:',
':bath:',
':bathtub:',
':shower:',
':toilet:',
':wrench:',
':nut_and_bolt:',
':hammer:',
':seat:',
':moneybag:',
':yen:',
':dollar:',
':pound:',
':euro:',
':credit_card:',
':money_with_wings:',
':e-mail:',
':inbox_tray:',
':outbox_tray:',
':envelope:',
':incoming_envelope:',
':postal_horn:',
':mailbox_closed:',
':mailbox_with_mail:',
':mailbox_with_no_mail:',
':package:',
':door:',
':smoking:',
':bomb:',
':gun:',
':hocho:',
':pill:',
':syringe:',
':page_facing_up:',
':page_with_curl:',
':bookmark_tabs:',
':bar_chart:',
':chart_with_upwards_trend:',
':chart_with_downwards_trend:',
':scroll:',
':clipboard:',
':calendar:',
':date:',
':card_index:',
':file_folder:',
':open_file_folder:',
':scissors:',
':pushpin:',
':paperclip:',
':black_nib:',
':pencil2:',
':straight_ruler:',
':triangular_ruler:',
':closed_book:',
':green_book:',
':blue_book:',
':orange_book:',
':notebook:',
':notebook_with_decorative_cover:',
':ledger:',
':books:',
':bookmark:',
':name_badge:',
':microscope:',
':telescope:',
':newspaper:',
':football:',
':basketball:',
':soccer:',
':baseball:',
':tennis:',
':8ball:',
':rugby_football:',
':bowling:',
':golf:',
':mountain_bicyclist:',
':bicyclist:',
':horse_racing:',
':snowboarder:',
':swimmer:',
':surfer:',
':ski:',
':spades:',
':hearts:',
':clubs:',
':diamonds:',
':gem:',
':ring:',
':trophy:',
':musical_score:',
':musical_keyboard:',
':violin:',
':space_invader:',
':video_game:',
':black_joker:',
':flower_playing_cards:',
':game_die:',
':dart:',
':mahjong:',
':clapper:',
':memo:',
':pencil:',
':book:',
':art:',
':microphone:',
':headphones:',
':trumpet:',
':saxophone:',
':guitar:',
':shoe:',
':sandal:',
':high_heel:',
':lipstick:',
':boot:',
':shirt:',
':tshirt:',
':necktie:',
':womans_clothes:',
':dress:',
':running_shirt_with_sash:',
':jeans:',
':kimono:',
':bikini:',
':ribbon:',
':tophat:',
':crown:',
':womans_hat:',
':mans_shoe:',
':closed_umbrella:',
':briefcase:',
':handbag:',
':pouch:',
':purse:',
':eyeglasses:',
':fishing_pole_and_fish:',
':coffee:',
':tea:',
':sake:',
':baby_bottle:',
':beer:',
':beers:',
':cocktail:',
':tropical_drink:',
':wine_glass:',
':fork_and_knife:',
':pizza:',
':hamburger:',
':fries:',
':poultry_leg:',
':meat_on_bone:',
':spaghetti:',
':curry:',
':fried_shrimp:',
':bento:',
':sushi:',
':fish_cake:',
':rice_ball:',
':rice_cracker:',
':rice:',
':ramen:',
':stew:',
':oden:',
':dango:',
':egg:',
':bread:',
':doughnut:',
':custard:',
':icecream:',
':ice_cream:',
':shaved_ice:',
':birthday:',
':cake:',
':cookie:',
':chocolate_bar:',
':candy:',
':lollipop:',
':honey_pot:',
':apple:',
':green_apple:',
':tangerine:',
':lemon:',
':cherries:',
':grapes:',
':watermelon:',
':strawberry:',
':peach:',
':melon:',
':banana:',
':pear:',
':pineapple:',
':sweet_potato:',
':eggplant:',
':tomato:',
':corn:',
':house:',
':house_with_garden:',
':school:',
':office:',
':post_office:',
':hospital:',
':bank:',
':convenience_store:',
':love_hotel:',
':hotel:',
':wedding:',
':church:',
':department_store:',
':european_post_office:',
':city_sunrise:',
':city_sunset:',
':japanese_castle:',
':european_castle:',
':tent:',
':factory:',
':tokyo_tower:',
':japan:',
':mount_fuji:',
':sunrise_over_mountains:',
':sunrise:',
':stars:',
':statue_of_liberty:',
':bridge_at_night:',
':carousel_horse:',
':rainbow:',
':ferris_wheel:',
':fountain:',
':roller_coaster:',
':ship:',
':speedboat:',
':boat:',
':sailboat:',
':rowboat:',
':anchor:',
':rocket:',
':airplane:',
':helicopter:',
':steam_locomotive:',
':tram:',
':mountain_railway:',
':bike:',
':aerial_tramway:',
':suspension_railway:',
':mountain_cableway:',
':tractor:',
':blue_car:',
':oncoming_automobile:',
':car:',
':red_car:',
':taxi:',
':oncoming_taxi:',
':articulated_lorry:',
':bus:',
':oncoming_bus:',
':rotating_light:',
':police_car:',
':oncoming_police_car:',
':fire_engine:',
':ambulance:',
':minibus:',
':truck:',
':train:',
':station:',
':train2:',
':bullettrain_front:',
':bullettrain_side:',
':light_rail:',
':monorail:',
':railway_car:',
':trolleybus:',
':ticket:',
':fuelpump:',
':vertical_traffic_light:',
':traffic_light:',
':warning:',
':construction:',
':beginner:',
':atm:',
':slot_machine:',
':busstop:',
':barber:',
':hotsprings:',
':checkered_flag:',
':crossed_flags:',
':izakaya_lantern:',
':moyai:',
':circus_tent:',
':performing_arts:',
':round_pushpin:',
':triangular_flag_on_post:',
':jp:',
':kr:',
':cn:',
':us:',
':fr:',
':es:',
':it:',
':ru:',
':gb:',
':uk:',
':de:',
':one:',
':two:',
':three:',
':four:',
':five:',
':six:',
':seven:',
':eight:',
':nine:',
':keycap_ten:',
':1234:',
':zero:',
':hash:',
':symbols:',
':arrow_backward:',
':arrow_down:',
':arrow_forward:',
':arrow_left:',
':capital_abcd:',
':abcd:',
':abc:',
':arrow_lower_left:',
':arrow_lower_right:',
':arrow_right:',
':arrow_up:',
':arrow_upper_left:',
':arrow_upper_right:',
':arrow_double_down:',
':arrow_double_up:',
':arrow_down_small:',
':arrow_heading_down:',
':arrow_heading_up:',
':leftwards_arrow_with_hook:',
':arrow_right_hook:',
':left_right_arrow:',
':arrow_up_down:',
':arrow_up_small:',
':arrows_clockwise:',
':arrows_counterclockwise:',
':rewind:',
':fast_forward:',
':information_source:',
':ok:',
':twisted_rightwards_arrows:',
':repeat:',
':repeat_one:',
':new:',
':top:',
':up:',
':cool:',
':free:',
':ng:',
':cinema:',
':koko:',
':signal_strength:',
':u5272:',
':u5408:',
':u55b6:',
':u6307:',
':u6708:',
':u6709:',
':u6e80:',
':u7121:',
':u7533:',
':u7a7a:',
':u7981:',
':sa:',
':restroom:',
':mens:',
':womens:',
':baby_symbol:',
':no_smoking:',
':parking:',
':wheelchair:',
':metro:',
':baggage_claim:',
':accept:',
':wc:',
':potable_water:',
':put_litter_in_its_place:',
':secret:',
':congratulations:',
':m:',
':passport_control:',
':left_luggage:',
':customs:',
':ideograph_advantage:',
':cl:',
':sos:',
':id:',
':no_entry_sign:',
':underage:',
':no_mobile_phones:',
':do_not_litter:',
':non-potable_water:',
':no_bicycles:',
':no_pedestrians:',
':children_crossing:',
':no_entry:',
':eight_spoked_asterisk:',
':sparkle:',
':eight_pointed_black_star:',
':heart_decoration:',
':vs:',
':vibration_mode:',
':mobile_phone_off:',
':chart:',
':currency_exchange:',
':aries:',
':taurus:',
':gemini:',
':cancer:',
':leo:',
':virgo:',
':libra:',
':scorpius:',
':sagittarius:',
':capricorn:',
':aquarius:',
':pisces:',
':ophiuchus:',
':six_pointed_star:',
':negative_squared_cross_mark:',
':a:',
':b:',
':ab:',
':o2:',
':diamond_shape_with_a_dot_inside:',
':recycle:',
':end:',
':back:',
':on:',
':soon:',
':clock1:',
':clock130:',
':clock10:',
':clock1030:',
':clock11:',
':clock1130:',
':clock12:',
':clock1230:',
':clock2:',
':clock230:',
':clock3:',
':clock330:',
':clock4:',
':clock430:',
':clock5:',
':clock530:',
':clock6:',
':clock630:',
':clock7:',
':clock730:',
':clock8:',
':clock830:',
':clock9:',
':clock930:',
':heavy_dollar_sign:',
':copyright:',
':registered:',
':tm:',
':x:',
':heavy_exclamation_mark:',
':bangbang:',
':interrobang:',
':o:',
':heavy_multiplication_x:',
':heavy_plus_sign:',
':heavy_minus_sign:',
':heavy_division_sign:',
':white_flower:',
':100:',
':heavy_check_mark:',
':ballot_box_with_check:',
':radio_button:',
':link:',
':curly_loop:',
':wavy_dash:',
':part_alternation_mark:',
':trident:',
':black_small_square:',
':white_small_square:',
':black_medium_small_square:',
':white_medium_small_square:',
':black_medium_square:',
':white_medium_square:',
':black_large_square:',
':white_large_square:',
':white_check_mark:',
':black_square_button:',
':white_square_button:',
':black_circle:',
':white_circle:',
':red_circle:',
':large_blue_circle:',
':large_blue_diamond:',
':large_orange_diamond:',
':small_blue_diamond:',
':small_orange_diamond:',
':small_red_triangle:',
':small_red_triangle_down:',
':shipit:'
]
};
// Add all emoji in a dropdown
$.extend(true, $.trumbowyg, {
langs: {
en: {
emoji: 'Add an emoji'
},
fr: {
emoji: 'Ajouter un emoji'
},
zh_cn: {
emoji: '添加表情'
}
},
plugins: {
emoji: {
init: function (trumbowyg) {
trumbowyg.o.plugins.emoji = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.emoji || {});
var emojiBtnDef = {
dropdown: buildDropdown(trumbowyg)
};
trumbowyg.addBtnDef('emoji', emojiBtnDef);
}
}
}
});
function buildDropdown(trumbowyg) {
var dropdown = [];
$.each(trumbowyg.o.plugins.emoji.emojiList, function (i, emoji) {
var btn = emoji,
btnDef = {
param: emoji,
fn: function () {
trumbowyg.execCmd('insertText', emoji);
return true;
}
};
trumbowyg.addBtnDef(btn, btnDef);
dropdown.push(btn);
});
return dropdown;
}
})(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,77 @@
/*/* ===========================================================
* trumbowyg.insertaudio.js v1.0
* InsertAudio plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Adam Hess (AdamHess)
*/
(function ($) {
'use strict';
var insertAudioOptions = {
src: {
label: 'URL',
required: true
},
autoplay: {
label: 'AutoPlay',
required: false,
type: 'checkbox'
},
muted: {
label: 'Muted',
required: false,
type: 'checkbox'
},
preload: {
label: 'preload options',
required: false
}
};
$.extend(true, $.trumbowyg, {
langs: {
en: {
insertAudio: 'Insert Audio'
}
},
plugins: {
insertAudio: {
init: function (trumbowyg) {
var btnDef = {
fn: function () {
var insertAudioCallback = function (v) {
// controls should always be show otherwise the audio will
// be invisible defeating the point of a wysiwyg
var html = '<audio controls';
if (v.src) {
html += ' src=\'' + v.src + '\'';
}
if (v.autoplay) {
html += ' autoplay';
}
if (v.muted) {
html += ' muted';
}
if (v.preload) {
html += ' preload=\'' + v + '\'';
}
html += '></audio>';
var node = $(html)[0];
trumbowyg.range.deleteContents();
trumbowyg.range.insertNode(node);
return true;
};
trumbowyg.openModalInsert(trumbowyg.lang.insertAudio, insertAudioOptions, insertAudioCallback);
}
};
trumbowyg.addBtnDef('insertAudio', btnDef);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";var r={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"}},plugins:{insertAudio:{init:function(t){var n={fn:function(){var n=function(r){var n="<audio controls";r.src&&(n+=" src='"+r.src+"'"),r.autoplay&&(n+=" autoplay"),r.muted&&(n+=" muted"),r.preload&&(n+=" preload='"+r+"'"),n+="></audio>";var o=e(n)[0];return t.range.deleteContents(),t.range.insertNode(o),!0};t.openModalInsert(t.lang.insertAudio,r,n)}};t.addBtnDef("insertAudio",n)}}}})}(jQuery);

View File

@ -0,0 +1,96 @@
/* ===========================================================
* trumbowyg.noembed.js v1.0
* noEmbed plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Jake Johns (jakejohns)
*/
(function ($) {
'use strict';
var defaultOptions = {
proxy: 'https://noembed.com/embed?nowrap=on',
urlFiled: 'url',
data: [],
success: undefined,
error: undefined
};
$.extend(true, $.trumbowyg, {
langs: {
en: {
noembed: 'noEmbed',
noembedError: 'Error'
},
sk: {
noembedError: 'Chyba'
},
fr: {
noembed: 'noEmbed',
noembedError: 'Erreur'
},
cs: {
noembedError: 'Chyba'
}
},
plugins: {
noembed: {
init: function (trumbowyg) {
trumbowyg.o.plugins.noembed = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.noembed || {});
var btnDef = {
fn: function () {
var $modal = trumbowyg.openModalInsert(
// Title
trumbowyg.lang.noembed,
// Fields
{
url: {
label: 'URL',
required: true
}
},
// Callback
function (data) {
$.ajax({
url: trumbowyg.o.plugins.noembed.proxy,
type: 'GET',
data: data,
cache: false,
dataType: 'json',
success: trumbowyg.o.plugins.noembed.success || function (data) {
if (data.html) {
trumbowyg.execCmd('insertHTML', data.html);
setTimeout(function () {
trumbowyg.closeModal();
}, 250);
} else {
trumbowyg.addErrorOnModalField(
$('input[type=text]', $modal),
data.error
);
}
},
error: trumbowyg.o.plugins.noembed.error || function () {
trumbowyg.addErrorOnModalField(
$('input[type=text]', $modal),
trumbowyg.lang.noembedError
);
}
});
}
);
}
};
trumbowyg.addBtnDef('noembed', btnDef);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";var o={proxy:"https://noembed.com/embed?nowrap=on",urlFiled:"url",data:[],success:void 0,error:void 0};e.extend(!0,e.trumbowyg,{langs:{en:{noembed:"noEmbed",noembedError:"Error"},sk:{noembedError:"Chyba"},fr:{noembed:"noEmbed",noembedError:"Erreur"},cs:{noembedError:"Chyba"}},plugins:{noembed:{init:function(n){n.o.plugins.noembed=e.extend(!0,{},o,n.o.plugins.noembed||{});var r={fn:function(){var o=n.openModalInsert(n.lang.noembed,{url:{label:"URL",required:!0}},function(r){e.ajax({url:n.o.plugins.noembed.proxy,type:"GET",data:r,cache:!1,dataType:"json",success:n.o.plugins.noembed.success||function(r){r.html?(n.execCmd("insertHTML",r.html),setTimeout(function(){n.closeModal()},250)):n.addErrorOnModalField(e("input[type=text]",o),r.error)},error:n.o.plugins.noembed.error||function(){n.addErrorOnModalField(e("input[type=text]",o),n.lang.noembedError)}})})}};n.addBtnDef("noembed",r)}}}})}(jQuery);

View File

@ -0,0 +1,41 @@
/* ===========================================================
* trumbowyg.pasteimage.js v1.0
* Basic base64 paste plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
plugins: {
pasteImage: {
init: function (trumbowyg) {
trumbowyg.pasteHandlers.push(function (pasteEvent) {
try {
var items = (pasteEvent.originalEvent || pasteEvent).clipboardData.items,
reader;
for (var i = items.length -1; i >= 0; i += 1) {
if (items[i].type.match(/^image\//)) {
reader = new FileReader();
/* jshint -W083 */
reader.onloadend = function (event) {
trumbowyg.execCmd('insertImage', event.target.result, undefined, true);
};
/* jshint +W083 */
reader.readAsDataURL(items[i].getAsFile());
}
}
} catch (c) {
}
});
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";e.extend(!0,e.trumbowyg,{plugins:{pasteImage:{init:function(e){e.pasteHandlers.push(function(t){try{for(var a,n=(t.originalEvent||t).clipboardData.items,i=n.length-1;i>=0;i+=1)n[i].type.match(/^image\//)&&(a=new FileReader,a.onloadend=function(t){e.execCmd("insertImage",t.target.result,void 0,!0)},a.readAsDataURL(n[i].getAsFile()))}catch(r){}})}}}})}(jQuery);

View File

@ -12,6 +12,7 @@
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
preformatted: 'Code sample <pre>'
},
@ -20,30 +21,40 @@
},
it: {
preformatted: 'Codice <pre>'
},
zh_cn: {
preformatted: '代码示例 <pre>'
}
},
opts: {
btnsDef: {
preformatted: {
func: function (params, tbw) {
var text = String(tbw.doc.getSelection());
if (text.replace(/\s/g, '') !== '') {
try {
var curtag = getSelectionParentElement().tagName.toLowerCase();
if (curtag == 'code' || curtag == 'pre') {
return unwrapCode();
// jshint camelcase:true
plugins: {
preformatted: {
init: function (trumbowyg) {
var btnDef = {
fn: function () {
trumbowyg.saveRange();
var text = trumbowyg.getRangeText();
if (text.replace(/\s/g, '') !== '') {
try {
var curtag = getSelectionParentElement().tagName.toLowerCase();
if (curtag === 'code' || curtag === 'pre') {
return unwrapCode();
}
else {
trumbowyg.execCmd('insertHTML', '<pre><code>' + strip(text) + '</code></pre>');
}
} catch (e) {
}
else {
tbw.execCmd('insertHTML', '<pre><code>' + strip(text) + '</code></pre>');
}
} catch (e) {
}
}
},
ico: 'insertCode'
},
tag: 'pre'
};
trumbowyg.addBtnDef('preformatted', btnDef);
}
}
},
}
});
/*
@ -51,17 +62,17 @@
*/
function getSelectionParentElement() {
var parentEl = null,
sel;
selection;
if (window.getSelection) {
sel = window.getSelection();
if (sel.rangeCount) {
parentEl = sel.getRangeAt(0).commonAncestorContainer;
if (parentEl.nodeType != 1) {
selection = window.getSelection();
if (selection.rangeCount) {
parentEl = selection.getRangeAt(0).commonAncestorContainer;
if (parentEl.nodeType !== 1) {
parentEl = parentEl.parentNode;
}
}
} else if ((sel = document.selection) && sel.type != 'Control') {
parentEl = sel.createRange().parentElement();
} else if ((selection = document.selection) && selection.type !== 'Control') {
parentEl = selection.createRange().parentElement();
}
return parentEl;
}
@ -83,12 +94,13 @@
*/
function unwrapCode() {
var container = null;
if (document.selection) //for IE
if (document.selection) { //for IE
container = document.selection.createRange().parentElement();
else {
} else {
var select = window.getSelection();
if (select.rangeCount > 0)
if (select.rangeCount > 0) {
container = select.getRangeAt(0).startContainer.parentNode;
}
}
//'paranoic' unwrap
var ispre = $(container).contents().closest('pre').length;
@ -102,5 +114,4 @@
}
}
})(jQuery);
})(jQuery);

View File

@ -1 +1 @@
!function(e){"use strict";function t(){var e,t=null;return window.getSelection?(e=window.getSelection(),e.rangeCount&&(t=e.getRangeAt(0).commonAncestorContainer,1!=t.nodeType&&(t=t.parentNode))):(e=document.selection)&&"Control"!=e.type&&(t=e.createRange().parentElement()),t}function n(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}function o(){var t=null;if(document.selection)t=document.selection.createRange().parentElement();else{var n=window.getSelection();n.rangeCount>0&&(t=n.getRangeAt(0).startContainer.parentNode)}var o=e(t).contents().closest("pre").length,r=e(t).contents().closest("code").length;o&&r?e(t).contents().unwrap("code").unwrap("pre"):o?e(t).contents().unwrap("pre"):r&&e(t).contents().unwrap("code")}e.extend(!0,e.trumbowyg,{langs:{en:{preformatted:"Code sample <pre>"},fr:{preformatted:"Exemple de code"},it:{preformatted:"Codice <pre>"}},opts:{btnsDef:{preformatted:{func:function(e,r){var c=String(r.doc.getSelection());if(""!==c.replace(/\s/g,""))try{var a=t().tagName.toLowerCase();if("code"==a||"pre"==a)return o();r.execCmd("insertHTML","<pre><code>"+n(c)+"</code></pre>")}catch(i){}},ico:"insertCode"}}}})}(jQuery);
!function(e){"use strict";function t(){var e,t=null;return window.getSelection?(e=window.getSelection(),e.rangeCount&&(t=e.getRangeAt(0).commonAncestorContainer,1!==t.nodeType&&(t=t.parentNode))):(e=document.selection)&&"Control"!==e.type&&(t=e.createRange().parentElement()),t}function n(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}function r(){var t=null;if(document.selection)t=document.selection.createRange().parentElement();else{var n=window.getSelection();n.rangeCount>0&&(t=n.getRangeAt(0).startContainer.parentNode)}var r=e(t).contents().closest("pre").length,o=e(t).contents().closest("code").length;r&&o?e(t).contents().unwrap("code").unwrap("pre"):r?e(t).contents().unwrap("pre"):o&&e(t).contents().unwrap("code")}e.extend(!0,e.trumbowyg,{langs:{en:{preformatted:"Code sample <pre>"},fr:{preformatted:"Exemple de code"},it:{preformatted:"Codice <pre>"},zh_cn:{preformatted:"代码示例 <pre>"}},plugins:{preformatted:{init:function(e){var o={fn:function(){e.saveRange();var o=e.getRangeText();if(""!==o.replace(/\s/g,""))try{var a=t().tagName.toLowerCase();if("code"===a||"pre"===a)return r();e.execCmd("insertHTML","<pre><code>"+n(o)+"</code></pre>")}catch(c){}},tag:"pre"};e.addBtnDef("preformatted",o)}}}})}(jQuery);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

View File

@ -1,17 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Preformatted text supplier
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$preformatted-black-2x: 0px 0px;
$sprite-height-black-2x: 50px;
$sprite-width-black-2x: 50px;
$icons-black-2x: "./images/icons-black-2x.png";

View File

@ -1,17 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Preformatted text supplier
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$preformatted-black: 0px 0px;
$sprite-height-black: 25px;
$sprite-width-black: 25px;
$icons-black: "./images/icons-black.png";

View File

@ -1,17 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Preformatted text supplier
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$preformatted-white-2x: 0px 0px;
$sprite-height-white-2x: 50px;
$sprite-width-white-2x: 50px;
$icons-white-2x: "./images/icons-white-2x.png";

View File

@ -1,17 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Preformatted text supplier
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$preformatted-white: 0px 0px;
$sprite-height-white: 25px;
$sprite-width-white: 25px;
$icons-white: "./images/icons-white.png";

View File

@ -1,56 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Preformatted text supplier
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
@import "sprite-black";
@import "sprite-black-2x";
@import "sprite-white";
@import "sprite-white-2x";
@import "sprite-pos";
/*
* Buttons icons
*/
.trumbowyg-button-pane li button {
&.trumbowyg-preformatted-button {
background-image: url($icons-black);
}
&.trumbowyg-preformatted-button { @include sprite-pos($preformatted-black); }
}
.trumbowyg-black {
.trumbowyg-button-pane li button {
&.trumbowyg-preformatted-button {
background-image: url($icons-white);
}
&.trumbowyg-preformatted-button { @include sprite-pos($preformatted-white); }
}
}
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 4/3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx){
.trumbowyg-button-pane li button {
&.trumbowyg-preformatted-button {
background-image: url($icons-black-2x) !important;
background-size: round($sprite-width-black-2x / 2) round($sprite-height-black-2x / 2) !important;
}
&.trumbowyg-preformatted-button { @include sprite-pos($preformatted-black-2x, true); }
}
.trumbowyg-black {
.trumbowyg-button-pane li button {
&.trumbowyg-preformatted-button {
background-image: url($icons-white-2x) !important;
}
&.trumbowyg-preformatted-button { @include sprite-pos($preformatted-white-2x, true); }
}
}
}

View File

@ -1,36 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Preformatted text supplier
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
/*
* Buttons icons
*/
.trumbowyg-button-pane li button.trumbowyg-preformatted-button {
background-image: url("./images/icons-black.png"); }
.trumbowyg-button-pane li button.trumbowyg-preformatted-button {
background-position: 5px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-preformatted-button {
background-image: url("./images/icons-white.png"); }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-preformatted-button {
background-position: 5px 5px; }
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
.trumbowyg-button-pane li button.trumbowyg-preformatted-button {
background-image: url("./images/icons-black-2x.png") !important;
background-size: 25px 25px !important; }
.trumbowyg-button-pane li button.trumbowyg-preformatted-button {
background-position: 5px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-preformatted-button {
background-image: url("./images/icons-white-2x.png") !important; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-preformatted-button {
background-position: 5px 5px; } }

View File

@ -1,2 +0,0 @@
/** Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
.trumbowyg-button-pane li button.trumbowyg-preformatted-button{background-image:url(images/icons-black.png);background-position:5px 5px}.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-preformatted-button{background-image:url(images/icons-white.png);background-position:5px 5px}@media only screen and (-webkit-min-device-pixel-ratio:1.3),only screen and (min--moz-device-pixel-ratio:1.3),only screen and (min-device-pixel-ratio:1.3),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.trumbowyg-button-pane li button.trumbowyg-preformatted-button{background-image:url(images/icons-black-2x.png)!important;background-size:25px 25px!important;background-position:5px 5px}.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-preformatted-button{background-image:url(images/icons-white-2x.png)!important;background-position:5px 5px}}

View File

@ -0,0 +1,136 @@
/* ===========================================================
* trumbowyg.table.js v1.2
* Table plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Lawrence Meckan
* Twitter : @absalomedia
* Website : absalom.biz
*/
(function ($) {
'use strict';
var defaultOptions = {
rows: 0,
columns: 0,
styler: ''
};
$.extend(true, $.trumbowyg, {
langs: {
en: {
table: 'Insert table',
tableAddRow: 'Add rows',
tableAddColumn: 'Add columns',
rows: 'Rows',
columns: 'Columns',
styler: 'Table class',
error: 'Error'
},
sk: {
table: 'Vytvoriť tabuľky',
tableAddRow: 'Pridať riadok',
tableAddColumn: 'Pridať stĺpec',
rows: 'Riadky',
columns: 'Stĺpce',
styler: 'Tabuľku triedy',
error: 'Chyba'
},
fr: {
table: 'Insérer un tableau',
tableAddRow: 'Ajouter des lignes',
tableAddColumn: 'Ajouter des colonnes',
rows: 'Lignes',
columns: 'Colonnes',
styler: 'Classes CSS sur la table',
error: 'Erreur'
},
cs: {
table: 'Vytvořit příkaz Table',
tableAddRow: 'Přidat řádek',
tableAddColumn: 'Přidat sloupec',
rows: 'Řádky',
columns: 'Sloupce',
styler: 'Tabulku třída',
error: 'Chyba'
}
},
plugins: {
table: {
init: function (trumbowyg) {
trumbowyg.o.plugins.table = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.table || {});
var tableBuild = {
fn: function () {
trumbowyg.saveRange();
trumbowyg.openModalInsert(
// Title
trumbowyg.lang.table,
// Fields
{
rows: {
type: 'number',
required: true
},
columns: {
type: 'number',
required: true
},
styler: {
label: trumbowyg.lang.styler,
type: 'text'
}
},
function (v) { // v is value
var tabler = $('<table></table>');
if (v.styler.length !== 0) {
tabler.addClass(v.styler);
}
for (var i = 0; i < v.rows; i += 1) {
var row = $('<tr></tr>').appendTo(tabler);
for (var j = 0; j < v.columns; j += 1) {
$('<td></td>').appendTo(row);
}
}
trumbowyg.range.deleteContents();
trumbowyg.range.insertNode(tabler[0]);
return true;
});
}
};
var addRow = {
fn: function () {
trumbowyg.saveRange();
var rower = $('<tr></tr>');
trumbowyg.range.deleteContents();
trumbowyg.range.insertNode(rower[0]);
return true;
}
};
var addColumn = {
fn: function () {
trumbowyg.saveRange();
var columner = $('<td></td>');
trumbowyg.range.deleteContents();
trumbowyg.range.insertNode(columner[0]);
return true;
}
};
trumbowyg.addBtnDef('table', tableBuild);
trumbowyg.addBtnDef('tableAddRow', addRow);
trumbowyg.addBtnDef('tableAddColumn', addColumn);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";var t={rows:0,columns:0,styler:""};e.extend(!0,e.trumbowyg,{langs:{en:{table:"Insert table",tableAddRow:"Add rows",tableAddColumn:"Add columns",rows:"Rows",columns:"Columns",styler:"Table class",error:"Error"},sk:{table:"Vytvoriť tabuľky",tableAddRow:"Pridať riadok",tableAddColumn:"Pridať stĺpec",rows:"Riadky",columns:"Stĺpce",styler:"Tabuľku triedy",error:"Chyba"},fr:{table:"Insérer un tableau",tableAddRow:"Ajouter des lignes",tableAddColumn:"Ajouter des colonnes",rows:"Lignes",columns:"Colonnes",styler:"Classes CSS sur la table",error:"Erreur"},cs:{table:"Vytvořit příkaz Table",tableAddRow:"Přidat řádek",tableAddColumn:"Přidat sloupec",rows:"Řádky",columns:"Sloupce",styler:"Tabulku třída",error:"Chyba"}},plugins:{table:{init:function(r){r.o.plugins.table=e.extend(!0,{},t,r.o.plugins.table||{});var n={fn:function(){r.saveRange(),r.openModalInsert(r.lang.table,{rows:{type:"number",required:!0},columns:{type:"number",required:!0},styler:{label:r.lang.styler,type:"text"}},function(t){var n=e("<table></table>");0!==t.styler.length&&n.addClass(t.styler);for(var a=0;a<t.rows;a+=1)for(var l=e("<tr></tr>").appendTo(n),o=0;o<t.columns;o+=1)e("<td></td>").appendTo(l);return r.range.deleteContents(),r.range.insertNode(n[0]),!0})}},a={fn:function(){r.saveRange();var t=e("<tr></tr>");return r.range.deleteContents(),r.range.insertNode(t[0]),!0}},l={fn:function(){r.saveRange();var t=e("<td></td>");return r.range.deleteContents(),r.range.insertNode(t[0]),!0}};r.addBtnDef("table",n),r.addBtnDef("tableAddRow",a),r.addBtnDef("tableAddColumn",l)}}}})}(jQuery);

View File

@ -0,0 +1,52 @@
(function($) {
'use strict';
// Adds the language variables
$.extend(true, $.trumbowyg, {
langs: {
en: {
template: 'Template'
},
nl: {
template: 'Sjabloon'
}
}
});
// Adds the extra button definition
$.extend(true, $.trumbowyg, {
plugins: {
template: {
shouldInit: function(trumbowyg) {
return trumbowyg.o.plugins.hasOwnProperty('templates');
},
init: function(trumbowyg) {
trumbowyg.addBtnDef('template', {
dropdown: templateSelector(trumbowyg),
hasIcon: false,
text: trumbowyg.lang.template
});
}
}
}
});
// Creates the template-selector dropdown.
function templateSelector(trumbowyg) {
var available = trumbowyg.o.plugins.templates;
var templates = [];
$.each(available, function(index, template) {
trumbowyg.addBtnDef('template_' + index, {
fn: function(){
trumbowyg.html(template.html);
},
hasIcon: false,
title: template.name
});
templates.push('template_' + index);
});
return templates;
}
})(jQuery);

View File

@ -0,0 +1 @@
!function(t){"use strict";function e(e){var n=e.o.plugins.templates,a=[];return t.each(n,function(t,n){e.addBtnDef("template_"+t,{fn:function(){e.html(n.html)},hasIcon:!1,title:n.name}),a.push("template_"+t)}),a}t.extend(!0,t.trumbowyg,{langs:{en:{template:"Template"},nl:{template:"Sjabloon"}}}),t.extend(!0,t.trumbowyg,{plugins:{template:{shouldInit:function(t){return t.o.plugins.hasOwnProperty("templates")},init:function(t){t.addBtnDef("template",{dropdown:e(t),hasIcon:!1,text:t.lang.template})}}}})}(jQuery);

View File

@ -1,16 +1,31 @@
/* ===========================================================
* trumbowyg.upload.js v1.1
* trumbowyg.upload.js v1.2
* Upload plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
* Mod by : Aleksandr-ru
* Twitter : @Aleksandr_ru
* Website : aleksandr.ru
*/
(function ($) {
'use strict';
var defaultOptions = {
serverPath: './src/plugins/upload/trumbowyg.upload.php',
fileFieldName: 'fileToUpload',
data: [],
headers: {},
xhrFields: {},
urlPropertyName: 'file',
statusPropertyName: 'success',
success: undefined,
error: undefined
};
function getDeep(object, propertyParts) {
var mainProperty = propertyParts.shift(),
otherProperties = propertyParts;
@ -31,6 +46,7 @@
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
upload: 'Upload',
file: 'File',
@ -50,116 +66,135 @@
upload: 'Nahrát obrázek',
file: 'Soubor',
uploadError: 'Chyba'
},
zh_cn: {
upload: '上传',
file: '文件',
uploadError: '错误'
},
ru: {
upload: 'Загрузка',
file: 'Файл',
uploadError: 'Ошибка'
}
},
// jshint camelcase:true
upload: {
serverPath: './src/plugins/upload/trumbowyg.upload.php',
fileFieldName: 'fileToUpload',
data: [],
headers: {},
urlPropertyName: 'file',
statusPropertyName: 'success',
success: undefined,
error: undefined
},
plugins: {
upload: {
init: function (trumbowyg) {
trumbowyg.o.plugins.upload = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.upload || {});
var btnDef = {
fn: function () {
trumbowyg.saveRange();
opts: {
btnsDef: {
upload: {
func: function (params, tbw) {
var file,
prefix = tbw.o.prefix;
var file,
prefix = trumbowyg.o.prefix;
var $modal = tbw.openModalInsert(
// Title
tbw.lang.upload,
var $modal = trumbowyg.openModalInsert(
// Title
trumbowyg.lang.upload,
// Fields
{
file: {
type: 'file',
required: true
},
alt: {
label: 'description'
}
},
// Callback
function (values) {
var data = new FormData();
data.append($.trumbowyg.upload.fileFieldName, file);
$.trumbowyg.upload.data.map(function (cur) {
data.append(cur.name, cur.value);
});
if ($('.' + prefix + 'progress', $modal).length === 0) {
$('.' + prefix + 'modal-title', $modal)
.after(
$('<div/>', {
'class': prefix + 'progress'
}).append(
$('<div/>', {
'class': prefix + 'progress-bar'
})
)
);
}
$.ajax({
url: $.trumbowyg.upload.serverPath,
headers: $.trumbowyg.upload.headers,
type: 'POST',
data: data,
cache: false,
dataType: 'json',
processData: false,
contentType: false,
progressUpload: function (e) {
$('.' + prefix + 'progress-bar').stop().animate({
width: Math.round(e.loaded * 100 / e.total) + '%'
}, 200);
},
success: $.trumbowyg.upload.success || function (data) {
if (!!getDeep(data, $.trumbowyg.upload.statusPropertyName.split('.'))) {
var url = getDeep(data, $.trumbowyg.upload.urlPropertyName.split('.'));
tbw.execCmd('insertImage', url);
$('img[src="' + url + '"]:not([alt])', tbw.$box).attr('alt', values.alt);
setTimeout(function () {
tbw.closeModal();
}, 250);
} else {
tbw.addErrorOnModalField(
$('input[type=file]', $modal),
tbw.lang[data.message]
);
// Fields
{
file: {
type: 'file',
required: true,
attributes: {
accept: 'image/*'
}
},
error: $.trumbowyg.upload.error || function () {
tbw.addErrorOnModalField(
$('input[type=file]', $modal),
tbw.lang.uploadError
);
alt: {
label: 'description',
value: trumbowyg.getRangeText()
}
});
}
);
},
$('input[type=file]').on('change', function (e) {
try {
// If multiple files allowed, we just get the first.
file = e.target.files[0];
} catch (err) {
// In IE8, multiple files not allowed
file = e.target.value;
}
});
},
ico: 'insertImage'
// Callback
function (values) {
var data = new FormData();
data.append(trumbowyg.o.plugins.upload.fileFieldName, file);
trumbowyg.o.plugins.upload.data.map(function (cur) {
data.append(cur.name, cur.value);
});
if ($('.' + prefix + 'progress', $modal).length === 0) {
$('.' + prefix + 'modal-title', $modal)
.after(
$('<div/>', {
'class': prefix + 'progress'
}).append(
$('<div/>', {
'class': prefix + 'progress-bar'
})
)
);
}
$.ajax({
url: trumbowyg.o.plugins.upload.serverPath,
headers: trumbowyg.o.plugins.upload.headers,
xhrFields: trumbowyg.o.plugins.upload.xhrFields,
type: 'POST',
data: data,
cache: false,
dataType: 'json',
processData: false,
contentType: false,
progressUpload: function (e) {
$('.' + prefix + 'progress-bar').stop().animate({
width: Math.round(e.loaded * 100 / e.total) + '%'
}, 200);
},
success: function (data) {
if (trumbowyg.o.plugins.upload.success) {
trumbowyg.o.plugins.upload.success(data, trumbowyg, $modal, values);
} else {
if (!!getDeep(data, trumbowyg.o.plugins.upload.statusPropertyName.split('.'))) {
var url = getDeep(data, trumbowyg.o.plugins.upload.urlPropertyName.split('.'));
trumbowyg.execCmd('insertImage', url);
$('img[src="' + url + '"]:not([alt])', trumbowyg.$box).attr('alt', values.alt);
setTimeout(function () {
trumbowyg.closeModal();
}, 250);
trumbowyg.$c.trigger('tbwuploadsuccess', [trumbowyg, data, url]);
} else {
trumbowyg.addErrorOnModalField(
$('input[type=file]', $modal),
trumbowyg.lang[data.message]
);
trumbowyg.$c.trigger('tbwuploaderror', [trumbowyg, data]);
}
}
},
error: trumbowyg.o.plugins.upload.error || function () {
trumbowyg.addErrorOnModalField(
$('input[type=file]', $modal),
trumbowyg.lang.uploadError
);
trumbowyg.$c.trigger('tbwuploaderror', [trumbowyg]);
}
});
}
);
$('input[type=file]').on('change', function (e) {
try {
// If multiple files allowed, we just get the first.
file = e.target.files[0];
} catch (err) {
// In IE8, multiple files not allowed
file = e.target.value;
}
});
}
};
trumbowyg.addBtnDef('upload', btnDef);
}
}
}
@ -173,10 +208,11 @@
xhr: function () {
var req = originalXhr(),
that = this;
if (req && typeof req.upload == 'object' && that.progressUpload !== undefined)
if (req && typeof req.upload === 'object' && that.progressUpload !== undefined) {
req.upload.addEventListener('progress', function (e) {
that.progressUpload(e);
}, false);
}
return req;
}

View File

@ -1 +1 @@
!function(r){"use strict";function e(r,a){var o=a.shift(),t=a;if(null!==r){if(0===t.length)return r[o];if("object"==typeof r)return e(r[o],t)}return r}function a(){if(!r.trumbowyg&&!r.trumbowyg.addedXhrProgressEvent){var e=r.ajaxSettings.xhr;r.ajaxSetup({xhr:function(){var r=e(),a=this;return r&&"object"==typeof r.upload&&void 0!==a.progressUpload&&r.upload.addEventListener("progress",function(r){a.progressUpload(r)},!1),r}}),r.trumbowyg.addedXhrProgressEvent=!0}}a(),r.extend(!0,r.trumbowyg,{langs:{en:{upload:"Upload",file:"File",uploadError:"Error"},sk:{upload:"Nahrať",file:"Súbor",uploadError:"Chyba"},fr:{upload:"Envoi",file:"Fichier",uploadError:"Erreur"},cs:{upload:"Nahrát obrázek",file:"Soubor",uploadError:"Chyba"}},upload:{serverPath:"./src/plugins/upload/trumbowyg.upload.php",fileFieldName:"fileToUpload",data:[],headers:{},urlPropertyName:"file",statusPropertyName:"success",success:void 0,error:void 0},opts:{btnsDef:{upload:{func:function(a,o){var t,l=o.o.prefix,u=o.openModalInsert(o.lang.upload,{file:{type:"file",required:!0},alt:{label:"description"}},function(a){var s=new FormData;s.append(r.trumbowyg.upload.fileFieldName,t),r.trumbowyg.upload.data.map(function(r){s.append(r.name,r.value)}),0===r("."+l+"progress",u).length&&r("."+l+"modal-title",u).after(r("<div/>",{"class":l+"progress"}).append(r("<div/>",{"class":l+"progress-bar"}))),r.ajax({url:r.trumbowyg.upload.serverPath,headers:r.trumbowyg.upload.headers,type:"POST",data:s,cache:!1,dataType:"json",processData:!1,contentType:!1,progressUpload:function(e){r("."+l+"progress-bar").stop().animate({width:Math.round(100*e.loaded/e.total)+"%"},200)},success:r.trumbowyg.upload.success||function(t){if(e(t,r.trumbowyg.upload.statusPropertyName.split("."))){var l=e(t,r.trumbowyg.upload.urlPropertyName.split("."));o.execCmd("insertImage",l),r('img[src="'+l+'"]:not([alt])',o.$box).attr("alt",a.alt),setTimeout(function(){o.closeModal()},250)}else o.addErrorOnModalField(r("input[type=file]",u),o.lang[t.message])},error:r.trumbowyg.upload.error||function(){o.addErrorOnModalField(r("input[type=file]",u),o.lang.uploadError)}})});r("input[type=file]").on("change",function(r){try{t=r.target.files[0]}catch(e){t=r.target.value}})},ico:"insertImage"}}}})}(jQuery);
!function(e){"use strict";function r(e,a){var o=a.shift(),l=a;if(null!==e){if(0===l.length)return e[o];if("object"==typeof e)return r(e[o],l)}return e}function a(){if(!e.trumbowyg&&!e.trumbowyg.addedXhrProgressEvent){var r=e.ajaxSettings.xhr;e.ajaxSetup({xhr:function(){var e=r(),a=this;return e&&"object"==typeof e.upload&&void 0!==a.progressUpload&&e.upload.addEventListener("progress",function(e){a.progressUpload(e)},!1),e}}),e.trumbowyg.addedXhrProgressEvent=!0}}var o={serverPath:"./src/plugins/upload/trumbowyg.upload.php",fileFieldName:"fileToUpload",data:[],headers:{},xhrFields:{},urlPropertyName:"file",statusPropertyName:"success",success:void 0,error:void 0};a(),e.extend(!0,e.trumbowyg,{langs:{en:{upload:"Upload",file:"File",uploadError:"Error"},sk:{upload:"Nahrať",file:"Súbor",uploadError:"Chyba"},fr:{upload:"Envoi",file:"Fichier",uploadError:"Erreur"},cs:{upload:"Nahrát obrázek",file:"Soubor",uploadError:"Chyba"},zh_cn:{upload:"上传",file:"文件",uploadError:"错误"},ru:{upload:"Загрузка",file:"Файл",uploadError:"Ошибка"}},plugins:{upload:{init:function(a){a.o.plugins.upload=e.extend(!0,{},o,a.o.plugins.upload||{});var l={fn:function(){a.saveRange();var o,l=a.o.prefix,t=a.openModalInsert(a.lang.upload,{file:{type:"file",required:!0,attributes:{accept:"image/*"}},alt:{label:"description",value:a.getRangeText()}},function(u){var s=new FormData;s.append(a.o.plugins.upload.fileFieldName,o),a.o.plugins.upload.data.map(function(e){s.append(e.name,e.value)}),0===e("."+l+"progress",t).length&&e("."+l+"modal-title",t).after(e("<div/>",{"class":l+"progress"}).append(e("<div/>",{"class":l+"progress-bar"}))),e.ajax({url:a.o.plugins.upload.serverPath,headers:a.o.plugins.upload.headers,xhrFields:a.o.plugins.upload.xhrFields,type:"POST",data:s,cache:!1,dataType:"json",processData:!1,contentType:!1,progressUpload:function(r){e("."+l+"progress-bar").stop().animate({width:Math.round(100*r.loaded/r.total)+"%"},200)},success:function(o){if(a.o.plugins.upload.success)a.o.plugins.upload.success(o,a,t,u);else if(r(o,a.o.plugins.upload.statusPropertyName.split("."))){var l=r(o,a.o.plugins.upload.urlPropertyName.split("."));a.execCmd("insertImage",l),e('img[src="'+l+'"]:not([alt])',a.$box).attr("alt",u.alt),setTimeout(function(){a.closeModal()},250),a.$c.trigger("tbwuploadsuccess",[a,o,l])}else a.addErrorOnModalField(e("input[type=file]",t),a.lang[o.message]),a.$c.trigger("tbwuploaderror",[a,o])},error:a.o.plugins.upload.error||function(){a.addErrorOnModalField(e("input[type=file]",t),a.lang.uploadError),a.$c.trigger("tbwuploaderror",[a])}})});e("input[type=file]").on("change",function(e){try{o=e.target.files[0]}catch(r){o=e.target.value}})}};a.addBtnDef("upload",l)}}}})}(jQuery);

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -1,40 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Default stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$attachement-black-2x: -50px 0px;
$barre-black-2x: 0px -150px;
$bold-black-2x: 0px -50px;
$center-align-black-2x: -50px -50px;
$close-black-2x: -100px 0px;
$formatting-black-2x: -100px -50px;
$fullscreen-exit-black-2x: 0px -100px;
$fullscreen-black-2x: -50px -100px;
$gras-black-2x: -100px -100px;
$horizontal-rule-black-2x: -150px 0px;
$image-black-2x: -150px -50px;
$italic-black-2x: -150px -100px;
$justify-align-black-2x: 0px 0px;
$left-align-black-2x: -50px -150px;
$link-black-2x: -100px -150px;
$ordered-list-black-2x: -150px -150px;
$removeformat-black-2x: -200px 0px;
$right-align-black-2x: -200px -50px;
$souligne-black-2x: -200px -100px;
$strikethrough-black-2x: -200px -150px;
$underline-black-2x: 0px -200px;
$unordered-list-black-2x: -50px -200px;
$video-black-2x: -100px -200px;
$view-html-black-2x: -150px -200px;
$sprite-height-black-2x: 250px;
$sprite-width-black-2x: 250px;
$icons-black-2x: "./images/icons-black-2x.png";

View File

@ -1,40 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Default stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$attachement-black: -25px 0px;
$barre-black: 0px -75px;
$bold-black: 0px -25px;
$center-align-black: -25px -25px;
$close-black: -50px 0px;
$formatting-black: -50px -25px;
$fullscreen-exit-black: 0px -50px;
$fullscreen-black: -25px -50px;
$gras-black: -50px -50px;
$horizontal-rule-black: -75px 0px;
$image-black: -75px -25px;
$italic-black: -75px -50px;
$justify-align-black: 0px 0px;
$left-align-black: -25px -75px;
$link-black: -50px -75px;
$ordered-list-black: -75px -75px;
$removeformat-black: -100px 0px;
$right-align-black: -100px -25px;
$souligne-black: -100px -50px;
$strikethrough-black: -100px -75px;
$underline-black: 0px -100px;
$unordered-list-black: -25px -100px;
$video-black: -50px -100px;
$view-html-black: -75px -100px;
$sprite-height-black: 125px;
$sprite-width-black: 125px;
$icons-black: "./images/icons-black.png";

View File

@ -1,40 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Default stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$attachement-white-2x: -50px 0px;
$barre-white-2x: 0px -150px;
$bold-white-2x: 0px -50px;
$center-align-white-2x: -50px -50px;
$close-white-2x: -100px 0px;
$formatting-white-2x: -100px -50px;
$fullscreen-exit-white-2x: 0px -100px;
$fullscreen-white-2x: -50px -100px;
$gras-white-2x: -100px -100px;
$horizontal-rule-white-2x: -150px 0px;
$image-white-2x: -150px -50px;
$italic-white-2x: -150px -100px;
$justify-align-white-2x: 0px 0px;
$left-align-white-2x: -50px -150px;
$link-white-2x: -100px -150px;
$ordered-list-white-2x: -150px -150px;
$removeformat-white-2x: -200px 0px;
$right-align-white-2x: -200px -50px;
$souligne-white-2x: -200px -100px;
$strikethrough-white-2x: -200px -150px;
$underline-white-2x: 0px -200px;
$unordered-list-white-2x: -50px -200px;
$video-white-2x: -100px -200px;
$view-html-white-2x: -150px -200px;
$sprite-height-white-2x: 250px;
$sprite-width-white-2x: 250px;
$icons-white-2x: "./images/icons-white-2x.png";

View File

@ -1,40 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Default stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
$attachement-white: -25px 0px;
$barre-white: 0px -75px;
$bold-white: 0px -25px;
$center-align-white: -25px -25px;
$close-white: -50px 0px;
$formatting-white: -50px -25px;
$fullscreen-exit-white: 0px -50px;
$fullscreen-white: -25px -50px;
$gras-white: -50px -50px;
$horizontal-rule-white: -75px 0px;
$image-white: -75px -25px;
$italic-white: -75px -50px;
$justify-align-white: 0px 0px;
$left-align-white: -25px -75px;
$link-white: -50px -75px;
$ordered-list-white: -75px -75px;
$removeformat-white: -100px 0px;
$right-align-white: -100px -25px;
$souligne-white: -100px -50px;
$strikethrough-white: -100px -75px;
$underline-white: 0px -100px;
$unordered-list-white: -25px -100px;
$video-white: -50px -100px;
$view-html-white: -75px -100px;
$sprite-height-white: 125px;
$sprite-width-white: 125px;
$icons-white: "./images/icons-white.png";

View File

@ -1,18 +0,0 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Default stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
@mixin sprite-pos($_item, $retina: false){
@if($retina == false){
background-position: nth($_item, 1)+5 nth($_item, 2)+5;
} @else {
background-position: round(nth($_item, 1)/ 2)+5 round(nth($_item, 2)/ 2)+5;
}
}

View File

@ -1,5 +1,5 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Trumbowyg v2.4.2 - A lightweight WYSIWYG editor
* Default stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
@ -9,23 +9,38 @@
* Website : alex-d.fr
*/
@import "sprite-black";
@import "sprite-black-2x";
@import "sprite-white";
@import "sprite-white-2x";
@import "mixins/sprite-pos";
$light-color: #ecf0f1 !default;
$dark-color: #222 !default;
$light-color: #ecf0f1;
$dark-color: #222;
$modal-submit-color: #2ecc71 !default;
$modal-reset-color: #EEE !default;
$transition-duration: 150ms !default;
#trumbowyg-icons {
overflow: hidden;
visibility: hidden;
height: 0;
width: 0;
svg {
height: 0;
width: 0;
}
}
.trumbowyg-box {
padding-top: 37px;
*,
*::before,
*::after {
box-sizing: border-box;
}
svg {
width: 17px;
height: 100%;
fill: $dark-color;
}
}
.trumbowyg-box,
@ -33,7 +48,7 @@ $dark-color: #222;
display: block;
position: relative;
border: 1px solid #DDD;
width: 96%;
width: 100%;
min-height: 300px;
margin: 17px auto;
}
@ -44,13 +59,14 @@ $dark-color: #222;
.trumbowyg-box.trumbowyg-fullscreen {
background: #FEFEFE;
border: none !important;
}
.trumbowyg-editor,
.trumbowyg-textarea {
position: relative;
box-sizing: border-box;
padding: 1% 2%;
padding: 20px;
min-height: 300px;
width: 100%;
border-style: none;
@ -60,12 +76,22 @@ $dark-color: #222;
}
.trumbowyg-box-blur .trumbowyg-editor {
* {
*,
&::before {
color: transparent !important;
text-shadow: 0 0 7px #333;
@media screen and (min-width: 0 \0
) {
color: rgba(200, 200, 200, 0.6) !important;
}
@supports (-ms-accelerator:true) {
color: rgba(200, 200, 200, 0.6) !important;
}
}
img {
opacity: .2;
img,
hr {
opacity: 0.2;
}
}
@ -82,14 +108,12 @@ $dark-color: #222;
.trumbowyg-box.trumbowyg-editor-visible {
.trumbowyg-textarea {
position: absolute;
top: 36px;
height: 1px !important;
width: 25%;
min-height: 0 !important;
padding: 0 !important;
background: none;
opacity: 0;
opacity: 0 !important;
}
}
@ -102,33 +126,55 @@ $dark-color: #222;
}
}
.trumbowyg-editor[contenteditable=true]:empty:before {
.trumbowyg-box.trumbowyg-disabled {
.trumbowyg-textarea {
opacity: 0.8;
background: none;
}
}
.trumbowyg-editor[contenteditable=true]:empty:not(:focus)::before {
content: attr(placeholder);
color: #999;
pointer-events: none;
}
.trumbowyg-button-pane {
position: absolute;
top: 0;
left: 0;
display: flex;
flex-flow: row wrap;
width: 100%;
min-height: 37px;
min-height: 36px;
background: $light-color;
border-bottom: 1px solid darken($light-color, 7%);
margin: 0;
padding: 0;
padding: 0 5px;
list-style-type: none;
line-height: 10px;
backface-visibility: hidden;
li {
&::after {
content: " ";
display: block;
float: left;
text-align: center;
overflow: hidden;
padding: 0 !important;
position: absolute;
top: 36px;
left: 0;
right: 0;
width: 100%;
height: 1px;
background: darken($light-color, 7%);
}
&.trumbowyg-separator {
.trumbowyg-button-group {
display: flex;
flex-flow: row wrap;
.trumbowyg-fullscreen-button svg {
color: transparent;
}
&:not(:empty) + .trumbowyg-button-group::before {
content: " ";
display: block;
width: 1px;
background: darken($light-color, 7%);
margin: 0 5px;
@ -136,48 +182,73 @@ $dark-color: #222;
}
}
&.trumbowyg-disable {
li:not(.trumbowyg-not-disable) button:not(.trumbowyg-active) {
opacity: .2;
cursor: default;
button {
display: block;
position: relative;
width: 35px;
height: 35px;
padding: 1px 6px !important;
margin-bottom: 1px;
overflow: hidden;
border: none;
cursor: pointer;
background: none;
transition: background-color $transition-duration, opacity $transition-duration;
&.trumbowyg-textual-button {
width: auto;
line-height: 35px;
}
li.trumbowyg-separator {
}
&.trumbowyg-disable button:not(.trumbowyg-not-disable):not(.trumbowyg-active),
.trumbowyg-disabled & button:not(.trumbowyg-not-disable):not(.trumbowyg-viewHTML-button) {
opacity: 0.2;
cursor: default;
}
&.trumbowyg-disable,
.trumbowyg-disabled & {
.trumbowyg-button-group::before {
background: darken($light-color, 3%);
}
}
li button {
padding: 1px 6px !important;
// At bottom of this stylesheet
}
&:not(.trumbowyg-disable) li button:hover,
&:not(.trumbowyg-disable) li button:focus,
li button.trumbowyg-active,
li.trumbowyg-not-disable button:hover,
li.trumbowyg-not-disable button:focus {
button:not(.trumbowyg-disable):hover,
button:not(.trumbowyg-disable):focus,
button.trumbowyg-active {
background-color: #FFF;
outline: none;
}
li .trumbowyg-open-dropdown:after {
display: block;
content: " ";
position: absolute;
top: 25px;
right: 3px;
height: 0;
width: 0;
border: 3px solid transparent;
border-top-color: #555;
.trumbowyg-open-dropdown {
&::after {
display: block;
content: " ";
position: absolute;
top: 25px;
right: 3px;
height: 0;
width: 0;
border: 3px solid transparent;
border-top-color: #555;
}
&.trumbowyg-textual-button {
padding-left: 10px !important;
padding-right: 18px !important;
&::after {
top: 17px;
right: 7px;
}
}
}
.trumbowyg-buttons-right {
float: right;
width: auto;
.trumbowyg-right {
margin-left: auto;
button {
float: left;
&::before {
display: none !important;
}
}
}
@ -198,18 +269,23 @@ $dark-color: #222;
line-height: 35px;
text-decoration: none;
background: #FFF;
padding: 0 14px;
padding: 0 10px;
color: #333 !important;
border: none;
cursor: pointer;
text-align: left;
font-size: 15px;
transition: all .15s;
transition: all $transition-duration;
&:hover,
&:focus {
background: $light-color;
}
svg {
float: left;
margin-right: 14px;
}
}
}
@ -218,8 +294,9 @@ $dark-color: #222;
position: absolute;
top: 0;
left: 50%;
margin-left: -260px;
width: 520px;
transform: translateX(-50%);
max-width: 520px;
width: 100%;
height: 350px;
z-index: 11;
overflow: hidden;
@ -230,8 +307,9 @@ $dark-color: #222;
position: absolute;
top: 0;
left: 50%;
margin-left: -250px;
width: 500px;
transform: translateX(-50%);
max-width: 500px;
width: calc(100% - 20px);
padding-bottom: 45px;
z-index: 1;
background-color: #FFF;
@ -253,7 +331,6 @@ $dark-color: #222;
.trumbowyg-progress {
width: 100%;
background: #F00;
height: 3px;
position: absolute;
top: 58px;
@ -261,7 +338,7 @@ $dark-color: #222;
.trumbowyg-progress-bar {
background: #2BC06A;
height: 100%;
transition: width .15s linear;
transition: width $transition-duration linear;
}
}
@ -269,8 +346,8 @@ $dark-color: #222;
display: block;
position: relative;
margin: 15px 12px;
height: 27px;
line-height: 27px;
height: 29px;
line-height: 29px;
overflow: hidden;
.trumbowyg-input-infos {
@ -278,7 +355,7 @@ $dark-color: #222;
text-align: left;
height: 25px;
line-height: 25px;
transition: all .15;
transition: all 150ms;
span {
display: block;
@ -286,7 +363,7 @@ $dark-color: #222;
background-color: lighten($light-color, 5%);
border: 1px solid #DEDEDE;
padding: 0 7px;
width: 137px;
width: 150px;
}
span.trumbowyg-msg-error {
color: #e74c3c;
@ -311,11 +388,12 @@ $dark-color: #222;
height: 27px;
line-height: 27px;
border: 1px solid #DEDEDE;
background: transparent;
background: #fff;
font-size: 14px;
width: 340px;
max-width: 330px;
width: 70%;
padding: 0 7px;
transition: all .15s;
transition: all $transition-duration;
&:hover,
&:focus {
@ -323,7 +401,7 @@ $dark-color: #222;
border: 1px solid #95a5a6;
}
&:focus {
background: rgba(230, 230, 255, .1);
background: lighten($light-color, 5%);
}
}
}
@ -350,9 +428,8 @@ $dark-color: #222;
cursor: pointer;
font-family: "Trebuchet MS", Helvetica, Verdana, sans-serif;
font-size: 16px;
transition: all .15s;
transition: all $transition-duration;
$modal-submit-color: #2ecc71;
&.trumbowyg-modal-submit {
right: 110px;
background: darken($modal-submit-color, 3%);
@ -367,7 +444,6 @@ $dark-color: #222;
}
}
$modal-reset-color: #EEE;
&.trumbowyg-modal-reset {
color: #555;
background: darken($modal-reset-color, 3%);
@ -386,7 +462,7 @@ $dark-color: #222;
.trumbowyg-overlay {
position: absolute;
background-color: rgba(255, 255, 255, .5);
background-color: rgba(255, 255, 255, 0.5);
width: 100%;
left: 0;
display: none;
@ -418,11 +494,14 @@ body.trumbowyg-body-fullscreen {
.trumbowyg-textarea {
height: calc(100% - 37px) !important;
overflow: auto;
margin-top: 37px;
}
.trumbowyg-overlay {
height: 100% !important;
}
.trumbowyg-button-group .trumbowyg-fullscreen-button svg {
color: $dark-color;
fill: transparent;
}
}
.trumbowyg-editor {
@ -441,7 +520,7 @@ body.trumbowyg-body-fullscreen {
}
/*
* Reset for resetCss option
* lset for resetCss option
*/
&.trumbowyg-reset-css {
background: #FEFEFE !important;
@ -535,52 +614,91 @@ body.trumbowyg-body-fullscreen {
}
/*
* Black theme
* Dark theme
*/
.trumbowyg-black {
.trumbowyg-dark {
.trumbowyg-textarea {
background: #111;
color: #ddd;
}
.trumbowyg-box {
border: 1px solid lighten($dark-color, 7%);
&.trumbowyg-fullscreen {
background: #111;
}
&.trumbowyg-box-blur .trumbowyg-editor {
*,
&::before {
text-shadow: 0 0 7px #ccc;
@media screen and (min-width: 0 \0
) {
color: rgba(20, 20, 20, 0.6) !important;
}
@supports (-ms-accelerator:true) {
color: rgba(20, 20, 20, 0.6) !important;
}
}
}
svg {
fill: $light-color;
color: $light-color;
}
}
.trumbowyg-button-pane {
background-color: $dark-color;
border-bottom-color: lighten($dark-color, 7%);
li {
&.trumbowyg-separator {
&::after {
background: lighten($dark-color, 7%);
}
.trumbowyg-button-group:not(:empty) {
&::before {
background-color: lighten($dark-color, 7%);
}
.trumbowyg-fullscreen-button svg {
color: transparent;
}
}
&.trumbowyg-disable {
li.trumbowyg-separator {
.trumbowyg-button-group::before {
background-color: lighten($dark-color, 3%);
}
}
li button {
// At bottom of this stylesheet
button:not(.trumbowyg-disable):hover,
button:not(.trumbowyg-disable):focus,
button.trumbowyg-active {
background-color: #333;
}
&:not(.trumbowyg-disable) li button:hover,
&:not(.trumbowyg-disable) li button:focus,
li button.trumbowyg-active,
li.trumbowyg-not-disable button:hover,
li.trumbowyg-not-disable button:focus {
background-color: #555;
}
li .trumbowyg-open-dropdown:after {
.trumbowyg-open-dropdown::after {
border-top-color: #fff;
}
}
.trumbowyg-fullscreen {
.trumbowyg-button-group .trumbowyg-fullscreen-button svg {
color: $light-color;
fill: transparent;
}
}
.trumbowyg-dropdown {
border-color: $dark-color;
background: $dark-color;
background: #333;
box-shadow: rgba(0, 0, 0, .3) 0 2px 3px;
button {
background: $dark-color;
background: #333;
color: #fff !important;
&:hover,
&:focus {
background: #555;
background: $dark-color;
}
}
}
@ -628,390 +746,41 @@ body.trumbowyg-body-fullscreen {
&:hover,
&:focus {
border-color: #95a5a6;
border-color: lighten($dark-color, 25%);
}
&:focus {
background-color: rgba(230, 230, 255, .1);
background-color: lighten($dark-color, 5%);
}
}
}
.trumbowyg-modal-button {
&.trumbowyg-modal-submit {
background: darken($modal-submit-color, 20%);
&:hover,
&:focus {
background: darken($modal-submit-color, 10%);
}
&:active {
background: darken($modal-submit-color, 25%);
}
}
&.trumbowyg-modal-reset {
background: #333;
color: #ccc;
&:hover,
&:focus {
background: #444;
}
&:active {
background: #111;
}
}
}
}
.trumbowyg-overlay {
background-color: rgba(0, 0, 0, .5);
background-color: rgba(15, 15, 15, 0.6);
}
}
/*
* Buttons icons
*/
.trumbowyg-button-pane li button {
display: block;
position: relative;
text-indent: -9999px;
width: 35px;
height: 35px;
overflow: hidden;
background: transparent url($icons-black) no-repeat;
border: none;
cursor: pointer;
transition: background-color .15s, background-image .15s, opacity .15s;
&.trumbowyg-viewHTML-button {
@include sprite-pos($view-html-black);
}
&.trumbowyg-formatting-button {
@include sprite-pos($formatting-black);
}
/* English and others */
&.trumbowyg-bold-button, &.trumbowyg-strong-button {
@include sprite-pos($bold-black);
}
&.trumbowyg-italic-button, &.trumbowyg-em-button {
@include sprite-pos($italic-black);
}
&.trumbowyg-underline-button {
@include sprite-pos($underline-black);
}
&.trumbowyg-strikethrough-button, &.trumbowyg-del-button {
@include sprite-pos($strikethrough-black);
}
&.trumbowyg-link-button {
@include sprite-pos($link-black);
}
&.trumbowyg-insertImage-button {
@include sprite-pos($image-black);
}
&.trumbowyg-justifyLeft-button {
@include sprite-pos($left-align-black);
}
&.trumbowyg-justifyCenter-button {
@include sprite-pos($center-align-black);
}
&.trumbowyg-justifyRight-button {
@include sprite-pos($right-align-black);
}
&.trumbowyg-justifyFull-button {
@include sprite-pos($justify-align-black);
}
&.trumbowyg-unorderedList-button {
@include sprite-pos($unordered-list-black);
}
&.trumbowyg-orderedList-button {
@include sprite-pos($ordered-list-black);
}
&.trumbowyg-horizontalRule-button {
@include sprite-pos($horizontal-rule-black);
}
&.trumbowyg-removeformat-button {
@include sprite-pos($removeformat-black);
}
&.trumbowyg-fullscreen-button {
@include sprite-pos($fullscreen-black);
}
&.trumbowyg-close-button {
@include sprite-pos($close-black);
}
}
.trumbowyg-fullscreen .trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
@include sprite-pos($fullscreen-exit-black);
}
.trumbowyg-button-pane li {
&:first-child button {
margin-left: 6px;
}
&:last-child button {
margin-right: 6px;
}
}
/* French */
.trumbowyg-fr .trumbowyg-button-pane li button {
&.trumbowyg-bold-button, &.trumbowyg-strong-button {
@include sprite-pos($gras-black);
}
&.trumbowyg-underline-button {
@include sprite-pos($souligne-black);
}
&.trumbowyg-strikethrough-button, &.trumbowyg-del-button {
@include sprite-pos($barre-black);
}
}
.trumbowyg-black {
.trumbowyg-button-pane li button {
background-image: url($icons-white);
&.trumbowyg-viewHTML-button {
@include sprite-pos($view-html-white);
}
&.trumbowyg-formatting-button {
@include sprite-pos($formatting-white);
}
/* English and others */
&.trumbowyg-bold-button, &.trumbowyg-strong-button {
@include sprite-pos($bold-white);
}
&.trumbowyg-italic-button, &.trumbowyg-em-button {
@include sprite-pos($italic-white);
}
&.trumbowyg-underline-button {
@include sprite-pos($underline-white);
}
&.trumbowyg-strikethrough-button, &.trumbowyg-del-button {
@include sprite-pos($strikethrough-white);
}
&.trumbowyg-link-button {
@include sprite-pos($link-white);
}
&.trumbowyg-insertImage-button {
@include sprite-pos($image-white);
}
&.trumbowyg-justifyLeft-button {
@include sprite-pos($left-align-white);
}
&.trumbowyg-justifyCenter-button {
@include sprite-pos($center-align-white);
}
&.trumbowyg-justifyRight-button {
@include sprite-pos($right-align-white);
}
&.trumbowyg-justifyFull-button {
@include sprite-pos($justify-align-white);
}
&.trumbowyg-unorderedList-button {
@include sprite-pos($unordered-list-white);
}
&.trumbowyg-orderedList-button {
@include sprite-pos($ordered-list-white);
}
&.trumbowyg-horizontalRule-button {
@include sprite-pos($horizontal-rule-white);
}
&.trumbowyg-removeformat-button {
@include sprite-pos($removeformat-white);
}
&.trumbowyg-fullscreen-button {
@include sprite-pos($fullscreen-white);
}
&.trumbowyg-close-button {
@include sprite-pos($close-white);
}
}
.trumbowyg-fullscreen .trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
@include sprite-pos($fullscreen-exit-white);
}
.trumbowyg-button-pane li {
&:first-child button {
margin-left: 6px;
}
&:last-child button {
margin-right: 6px;
}
}
/* French */
.trumbowyg-fr .trumbowyg-button-pane li button {
&.trumbowyg-bold-button, &.trumbowyg-strong-button {
@include sprite-pos($gras-white);
}
&.trumbowyg-underline-button {
@include sprite-pos($souligne-white);
}
&.trumbowyg-strikethrough-button, &.trumbowyg-del-button {
@include sprite-pos($barre-white);
}
}
}
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 4/3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
.trumbowyg-button-pane li button {
background-size: round($sprite-width-black-2x / 2) round($sprite-height-black-2x / 2) !important;
background-image: url($icons-black-2x) !important;
&.trumbowyg-viewHTML-button {
@include sprite-pos($view-html-black-2x, true);
}
&.trumbowyg-formatting-button {
@include sprite-pos($formatting-black-2x, true);
}
/* English and others */
&.trumbowyg-bold-button, &.trumbowyg-strong-button {
@include sprite-pos($bold-black-2x, true);
}
&.trumbowyg-italic-button, &.trumbowyg-em-button {
@include sprite-pos($italic-black-2x, true);
}
&.trumbowyg-underline-button {
@include sprite-pos($underline-black-2x, true);
}
&.trumbowyg-strikethrough-button, &.trumbowyg-del-button {
@include sprite-pos($strikethrough-black-2x, true);
}
&.trumbowyg-link-button {
@include sprite-pos($link-black-2x, true);
}
&.trumbowyg-insertImage-button {
@include sprite-pos($image-black-2x, true);
}
&.trumbowyg-justifyLeft-button {
@include sprite-pos($left-align-black-2x, true);
}
&.trumbowyg-justifyCenter-button {
@include sprite-pos($center-align-black-2x, true);
}
&.trumbowyg-justifyRight-button {
@include sprite-pos($right-align-black-2x, true);
}
&.trumbowyg-justifyFull-button {
@include sprite-pos($justify-align-black-2x, true);
}
&.trumbowyg-unorderedList-button {
@include sprite-pos($unordered-list-black-2x, true);
}
&.trumbowyg-orderedList-button {
@include sprite-pos($ordered-list-black-2x, true);
}
&.trumbowyg-horizontalRule-button {
@include sprite-pos($horizontal-rule-black-2x, true);
}
&.trumbowyg-removeformat-button {
@include sprite-pos($removeformat-black-2x, true);
}
&.trumbowyg-fullscreen-button {
@include sprite-pos($fullscreen-black-2x, true);
}
&.trumbowyg-close-button {
@include sprite-pos($close-black-2x, true);
}
}
.trumbowyg-fullscreen .trumbowyg-button-pane li a.trumbowyg-fullscreen-button {
@include sprite-pos($fullscreen-exit-black-2x, true);
}
/* French */
.trumbowyg-fr .trumbowyg-button-pane li button {
&.trumbowyg-bold-button, &.trumbowyg-strong-button {
@include sprite-pos($gras-black-2x, true);
}
&.trumbowyg-underline-button {
@include sprite-pos($souligne-black-2x, true);
}
&.trumbowyg-strikethrough-button, &.trumbowyg-del-button {
@include sprite-pos($barre-black-2x, true);
}
}
/* Black theme */
.trumbowyg-black {
.trumbowyg-button-pane li button {
background-size: round($sprite-width-white-2x / 2) round($sprite-height-white-2x / 2) !important;
background-image: url($icons-white-2x) !important;
&.trumbowyg-viewHTML-button {
@include sprite-pos($view-html-white-2x, true);
}
&.trumbowyg-formatting-button {
@include sprite-pos($formatting-white-2x, true);
}
/* English and others */
&.trumbowyg-bold-button, &.trumbowyg-strong-button {
@include sprite-pos($bold-white-2x, true);
}
&.trumbowyg-italic-button, &.trumbowyg-em-button {
@include sprite-pos($italic-white-2x, true);
}
&.trumbowyg-underline-button {
@include sprite-pos($underline-white-2x, true);
}
&.trumbowyg-strikethrough-button, &.trumbowyg-del-button {
@include sprite-pos($strikethrough-white-2x, true);
}
&.trumbowyg-link-button {
@include sprite-pos($link-white-2x, true);
}
&.trumbowyg-insertImage-button {
@include sprite-pos($image-white-2x, true);
}
&.trumbowyg-justifyLeft-button {
@include sprite-pos($left-align-white-2x, true);
}
&.trumbowyg-justifyCenter-button {
@include sprite-pos($center-align-white-2x, true);
}
&.trumbowyg-justifyRight-button {
@include sprite-pos($right-align-white-2x, true);
}
&.trumbowyg-justifyFull-button {
@include sprite-pos($justify-align-white-2x, true);
}
&.trumbowyg-unorderedList-button {
@include sprite-pos($unordered-list-white-2x, true);
}
&.trumbowyg-orderedList-button {
@include sprite-pos($ordered-list-white-2x, true);
}
&.trumbowyg-horizontalRule-button {
@include sprite-pos($horizontal-rule-white-2x, true);
}
&.trumbowyg-removeformat-button {
@include sprite-pos($removeformat-white-2x, true);
}
&.trumbowyg-fullscreen-button {
@include sprite-pos($fullscreen-white-2x, true);
}
&.trumbowyg-close-button {
@include sprite-pos($close-white-2x, true);
}
}
.trumbowyg-fullscreen .trumbowyg-button-pane li a.trumbowyg-fullscreen-button {
@include sprite-pos($fullscreen-exit-white-2x, true);
}
/* French */
.trumbowyg-fr .trumbowyg-button-pane li button {
&.trumbowyg-bold-button, &.trumbowyg-strong-button {
@include sprite-pos($gras-white-2x, true);
}
&.trumbowyg-underline-button {
@include sprite-pos($souligne-white-2x, true);
}
&.trumbowyg-strikethrough-button, &.trumbowyg-del-button {
@include sprite-pos($barre-white-2x, true);
}
}
}
}

View File

@ -1,5 +1,5 @@
/**
* Trumbowyg v2.0.0-beta.7 - A lightweight WYSIWYG editor
* Trumbowyg v2.4.2 - A lightweight WYSIWYG editor
* Default stylesheet for Trumbowyg editor
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
@ -9,19 +9,31 @@
* Website : alex-d.fr
*/
.trumbowyg-box {
padding-top: 37px; }
.trumbowyg-box *,
.trumbowyg-box *::before,
.trumbowyg-box *::after {
box-sizing: border-box; }
#trumbowyg-icons {
overflow: hidden;
visibility: hidden;
height: 0;
width: 0; }
#trumbowyg-icons svg {
height: 0;
width: 0; }
.trumbowyg-box *,
.trumbowyg-box *::before,
.trumbowyg-box *::after {
box-sizing: border-box; }
.trumbowyg-box svg {
width: 17px;
height: 100%;
fill: #222; }
.trumbowyg-box,
.trumbowyg-editor {
display: block;
position: relative;
border: 1px solid #DDD;
width: 96%;
width: 100%;
min-height: 300px;
margin: 17px auto; }
@ -29,13 +41,14 @@
margin: 0 auto; }
.trumbowyg-box.trumbowyg-fullscreen {
background: #FEFEFE; }
background: #FEFEFE;
border: none !important; }
.trumbowyg-editor,
.trumbowyg-textarea {
position: relative;
box-sizing: border-box;
padding: 1% 2%;
padding: 20px;
min-height: 300px;
width: 100%;
border-style: none;
@ -43,12 +56,19 @@
outline: none;
overflow: auto; }
.trumbowyg-box-blur .trumbowyg-editor * {
.trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-box-blur .trumbowyg-editor::before {
color: transparent !important;
text-shadow: 0 0 7px #333; }
@media screen and (min-width: 0 \0 ) {
.trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-box-blur .trumbowyg-editor::before {
color: rgba(200, 200, 200, 0.6) !important; } }
@supports (-ms-accelerator: true) {
.trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-box-blur .trumbowyg-editor::before {
color: rgba(200, 200, 200, 0.6) !important; } }
.trumbowyg-box-blur .trumbowyg-editor img {
opacity: .2; }
.trumbowyg-box-blur .trumbowyg-editor img,
.trumbowyg-box-blur .trumbowyg-editor hr {
opacity: 0.2; }
.trumbowyg-textarea {
position: relative;
@ -61,14 +81,12 @@
line-height: 18px; }
.trumbowyg-box.trumbowyg-editor-visible .trumbowyg-textarea {
position: absolute;
top: 36px;
height: 1px !important;
width: 25%;
min-height: 0 !important;
padding: 0 !important;
background: none;
opacity: 0; }
opacity: 0 !important; }
.trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-textarea {
display: block; }
@ -76,50 +94,85 @@
.trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-editor {
display: none; }
.trumbowyg-editor[contenteditable=true]:empty:before {
.trumbowyg-box.trumbowyg-disabled .trumbowyg-textarea {
opacity: 0.8;
background: none; }
.trumbowyg-editor[contenteditable=true]:empty:not(:focus)::before {
content: attr(placeholder);
color: #999; }
color: #999;
pointer-events: none; }
.trumbowyg-button-pane {
position: absolute;
top: 0;
left: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
width: 100%;
min-height: 37px;
min-height: 36px;
background: #ecf0f1;
border-bottom: 1px solid #d7e0e2;
margin: 0;
padding: 0;
padding: 0 5px;
list-style-type: none;
line-height: 10px;
-webkit-backface-visibility: hidden;
backface-visibility: hidden; }
.trumbowyg-button-pane li {
.trumbowyg-button-pane::after {
content: " ";
display: block;
float: left;
text-align: center;
overflow: hidden;
padding: 0 !important; }
.trumbowyg-button-pane li.trumbowyg-separator {
position: absolute;
top: 36px;
left: 0;
right: 0;
width: 100%;
height: 1px;
background: #d7e0e2; }
.trumbowyg-button-pane .trumbowyg-button-group {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row wrap;
flex-flow: row wrap; }
.trumbowyg-button-pane .trumbowyg-button-group .trumbowyg-fullscreen-button svg {
color: transparent; }
.trumbowyg-button-pane .trumbowyg-button-group:not(:empty) + .trumbowyg-button-group::before {
content: " ";
display: block;
width: 1px;
background: #d7e0e2;
margin: 0 5px;
height: 35px; }
.trumbowyg-button-pane.trumbowyg-disable li:not(.trumbowyg-not-disable) button:not(.trumbowyg-active) {
opacity: .2;
.trumbowyg-button-pane button {
display: block;
position: relative;
width: 35px;
height: 35px;
padding: 1px 6px !important;
margin-bottom: 1px;
overflow: hidden;
border: none;
cursor: pointer;
background: none;
-webkit-transition: background-color 150ms, opacity 150ms;
transition: background-color 150ms, opacity 150ms; }
.trumbowyg-button-pane button.trumbowyg-textual-button {
width: auto;
line-height: 35px; }
.trumbowyg-button-pane.trumbowyg-disable button:not(.trumbowyg-not-disable):not(.trumbowyg-active),
.trumbowyg-disabled .trumbowyg-button-pane button:not(.trumbowyg-not-disable):not(.trumbowyg-viewHTML-button) {
opacity: 0.2;
cursor: default; }
.trumbowyg-button-pane.trumbowyg-disable li.trumbowyg-separator {
.trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::before,
.trumbowyg-disabled .trumbowyg-button-pane .trumbowyg-button-group::before {
background: #e3e9eb; }
.trumbowyg-button-pane li button {
padding: 1px 6px !important; }
.trumbowyg-button-pane:not(.trumbowyg-disable) li button:hover,
.trumbowyg-button-pane:not(.trumbowyg-disable) li button:focus,
.trumbowyg-button-pane li button.trumbowyg-active,
.trumbowyg-button-pane li.trumbowyg-not-disable button:hover,
.trumbowyg-button-pane li.trumbowyg-not-disable button:focus {
.trumbowyg-button-pane button:not(.trumbowyg-disable):hover,
.trumbowyg-button-pane button:not(.trumbowyg-disable):focus,
.trumbowyg-button-pane button.trumbowyg-active {
background-color: #FFF;
outline: none; }
.trumbowyg-button-pane li .trumbowyg-open-dropdown:after {
.trumbowyg-button-pane .trumbowyg-open-dropdown::after {
display: block;
content: " ";
position: absolute;
@ -129,11 +182,16 @@
width: 0;
border: 3px solid transparent;
border-top-color: #555; }
.trumbowyg-button-pane .trumbowyg-buttons-right {
float: right;
width: auto; }
.trumbowyg-button-pane .trumbowyg-buttons-right button {
float: left; }
.trumbowyg-button-pane .trumbowyg-open-dropdown.trumbowyg-textual-button {
padding-left: 10px !important;
padding-right: 18px !important; }
.trumbowyg-button-pane .trumbowyg-open-dropdown.trumbowyg-textual-button::after {
top: 17px;
right: 7px; }
.trumbowyg-button-pane .trumbowyg-right {
margin-left: auto; }
.trumbowyg-button-pane .trumbowyg-right::before {
display: none !important; }
.trumbowyg-dropdown {
width: 200px;
@ -150,24 +208,29 @@
line-height: 35px;
text-decoration: none;
background: #FFF;
padding: 0 14px;
padding: 0 10px;
color: #333 !important;
border: none;
cursor: pointer;
text-align: left;
font-size: 15px;
-webkit-transition: all .15s;
transition: all .15s; }
-webkit-transition: all 150ms;
transition: all 150ms; }
.trumbowyg-dropdown button:hover, .trumbowyg-dropdown button:focus {
background: #ecf0f1; }
.trumbowyg-dropdown button svg {
float: left;
margin-right: 14px; }
/* Modal box */
.trumbowyg-modal {
position: absolute;
top: 0;
left: 50%;
margin-left: -260px;
width: 520px;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
max-width: 520px;
width: 100%;
height: 350px;
z-index: 11;
overflow: hidden;
@ -178,8 +241,10 @@
position: absolute;
top: 0;
left: 50%;
margin-left: -250px;
width: 500px;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
max-width: 500px;
width: calc(100% - 20px);
padding-bottom: 45px;
z-index: 1;
background-color: #FFF;
@ -199,36 +264,35 @@
background: #fbfcfc; }
.trumbowyg-modal-box .trumbowyg-progress {
width: 100%;
background: #F00;
height: 3px;
position: absolute;
top: 58px; }
.trumbowyg-modal-box .trumbowyg-progress .trumbowyg-progress-bar {
background: #2BC06A;
height: 100%;
-webkit-transition: width .15s linear;
transition: width .15s linear; }
-webkit-transition: width 150ms linear;
transition: width 150ms linear; }
.trumbowyg-modal-box label {
display: block;
position: relative;
margin: 15px 12px;
height: 27px;
line-height: 27px;
height: 29px;
line-height: 29px;
overflow: hidden; }
.trumbowyg-modal-box label .trumbowyg-input-infos {
display: block;
text-align: left;
height: 25px;
line-height: 25px;
-webkit-transition: all .15;
transition: all .15; }
-webkit-transition: all 150ms;
transition: all 150ms; }
.trumbowyg-modal-box label .trumbowyg-input-infos span {
display: block;
color: #69878e;
color: #69878f;
background-color: #fbfcfc;
border: 1px solid #DEDEDE;
padding: 0 7px;
width: 137px; }
width: 150px; }
.trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error {
color: #e74c3c; }
.trumbowyg-modal-box label.trumbowyg-input-error input,
@ -243,17 +307,18 @@
height: 27px;
line-height: 27px;
border: 1px solid #DEDEDE;
background: transparent;
background: #fff;
font-size: 14px;
width: 340px;
max-width: 330px;
width: 70%;
padding: 0 7px;
-webkit-transition: all .15s;
transition: all .15s; }
-webkit-transition: all 150ms;
transition: all 150ms; }
.trumbowyg-modal-box label input:hover, .trumbowyg-modal-box label input:focus {
outline: none;
border: 1px solid #95a5a6; }
.trumbowyg-modal-box label input:focus {
background: rgba(230, 230, 255, 0.1); }
background: #fbfcfc; }
.trumbowyg-modal-box .error {
margin-top: 25px;
display: block;
@ -274,8 +339,8 @@
cursor: pointer;
font-family: "Trebuchet MS", Helvetica, Verdana, sans-serif;
font-size: 16px;
-webkit-transition: all .15s;
transition: all .15s; }
-webkit-transition: all 150ms;
transition: all 150ms; }
.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit {
right: 110px;
background: #2bc06a; }
@ -291,7 +356,7 @@
background: #fbfbfb;
outline: none; }
.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active {
background: #d4d4d4; }
background: #d5d5d5; }
.trumbowyg-overlay {
position: absolute;
@ -322,14 +387,16 @@ body.trumbowyg-body-fullscreen {
.trumbowyg-fullscreen .trumbowyg-editor,
.trumbowyg-fullscreen .trumbowyg-textarea {
height: calc(100% - 37px) !important;
overflow: auto;
margin-top: 37px; }
overflow: auto; }
.trumbowyg-fullscreen .trumbowyg-overlay {
height: 100% !important; }
.trumbowyg-fullscreen .trumbowyg-button-group .trumbowyg-fullscreen-button svg {
color: #222;
fill: transparent; }
.trumbowyg-editor {
/*
* Reset for resetCss option
* lset for resetCss option
*/ }
.trumbowyg-editor object,
.trumbowyg-editor embed,
@ -415,291 +482,103 @@ body.trumbowyg-body-fullscreen {
margin-bottom: 7px !important; }
/*
* Black theme
* Dark theme
*/
.trumbowyg-black .trumbowyg-button-pane {
.trumbowyg-dark .trumbowyg-textarea {
background: #111;
color: #ddd; }
.trumbowyg-dark .trumbowyg-box {
border: 1px solid #343434; }
.trumbowyg-dark .trumbowyg-box.trumbowyg-fullscreen {
background: #111; }
.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before {
text-shadow: 0 0 7px #ccc; }
@media screen and (min-width: 0 \0 ) {
.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before {
color: rgba(20, 20, 20, 0.6) !important; } }
@supports (-ms-accelerator: true) {
.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before {
color: rgba(20, 20, 20, 0.6) !important; } }
.trumbowyg-dark .trumbowyg-box svg {
fill: #ecf0f1;
color: #ecf0f1; }
.trumbowyg-dark .trumbowyg-button-pane {
background-color: #222;
border-bottom-color: #343434; }
.trumbowyg-black .trumbowyg-button-pane li.trumbowyg-separator {
.trumbowyg-dark .trumbowyg-button-pane::after {
background: #343434; }
.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty)::before {
background-color: #343434; }
.trumbowyg-black .trumbowyg-button-pane.trumbowyg-disable li.trumbowyg-separator {
.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty) .trumbowyg-fullscreen-button svg {
color: transparent; }
.trumbowyg-dark .trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::before {
background-color: #2a2a2a; }
.trumbowyg-black .trumbowyg-button-pane:not(.trumbowyg-disable) li button:hover,
.trumbowyg-black .trumbowyg-button-pane:not(.trumbowyg-disable) li button:focus,
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-active,
.trumbowyg-black .trumbowyg-button-pane li.trumbowyg-not-disable button:hover,
.trumbowyg-black .trumbowyg-button-pane li.trumbowyg-not-disable button:focus {
background-color: #555; }
.trumbowyg-black .trumbowyg-button-pane li .trumbowyg-open-dropdown:after {
.trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):hover,
.trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):focus,
.trumbowyg-dark .trumbowyg-button-pane button.trumbowyg-active {
background-color: #333; }
.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-open-dropdown::after {
border-top-color: #fff; }
.trumbowyg-black .trumbowyg-dropdown {
border-color: #222;
background: #222; }
.trumbowyg-black .trumbowyg-dropdown button {
background: #222;
color: #fff !important; }
.trumbowyg-black .trumbowyg-dropdown button:hover, .trumbowyg-black .trumbowyg-dropdown button:focus {
background: #555; }
.trumbowyg-dark .trumbowyg-fullscreen .trumbowyg-button-group .trumbowyg-fullscreen-button svg {
color: #ecf0f1;
fill: transparent; }
.trumbowyg-black .trumbowyg-modal-box {
.trumbowyg-dark .trumbowyg-dropdown {
border-color: #222;
background: #333;
box-shadow: rgba(0, 0, 0, 0.3) 0 2px 3px; }
.trumbowyg-dark .trumbowyg-dropdown button {
background: #333;
color: #fff !important; }
.trumbowyg-dark .trumbowyg-dropdown button:hover, .trumbowyg-dark .trumbowyg-dropdown button:focus {
background: #222; }
.trumbowyg-dark .trumbowyg-modal-box {
background-color: #222; }
.trumbowyg-black .trumbowyg-modal-box .trumbowyg-modal-title {
.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-title {
border-bottom: 1px solid #555;
color: #fff;
background: #3c3c3c; }
.trumbowyg-black .trumbowyg-modal-box label {
.trumbowyg-dark .trumbowyg-modal-box label {
display: block;
position: relative;
margin: 15px 12px;
height: 27px;
line-height: 27px;
overflow: hidden; }
.trumbowyg-black .trumbowyg-modal-box label .trumbowyg-input-infos span {
.trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span {
color: #eee;
background-color: #2f2f2f;
border-color: #222; }
.trumbowyg-black .trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error {
.trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error {
color: #e74c3c; }
.trumbowyg-black .trumbowyg-modal-box label.trumbowyg-input-error input,
.trumbowyg-black .trumbowyg-modal-box label.trumbowyg-input-error textarea {
.trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error input,
.trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error textarea {
border-color: #e74c3c; }
.trumbowyg-black .trumbowyg-modal-box label input {
.trumbowyg-dark .trumbowyg-modal-box label input {
border-color: #222;
color: #eee;
background: #333; }
.trumbowyg-black .trumbowyg-modal-box label input:hover, .trumbowyg-black .trumbowyg-modal-box label input:focus {
border-color: #95a5a6; }
.trumbowyg-black .trumbowyg-modal-box label input:focus {
background-color: rgba(230, 230, 255, 0.1); }
.trumbowyg-dark .trumbowyg-modal-box label input:hover, .trumbowyg-dark .trumbowyg-modal-box label input:focus {
border-color: #626262; }
.trumbowyg-dark .trumbowyg-modal-box label input:focus {
background-color: #2f2f2f; }
.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit {
background: #1b7943; }
.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover, .trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus {
background: #25a25a; }
.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active {
background: #176437; }
.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset {
background: #333;
color: #ccc; }
.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover, .trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus {
background: #444; }
.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active {
background: #111; }
.trumbowyg-black .trumbowyg-overlay {
background-color: rgba(0, 0, 0, 0.5); }
/*
* Buttons icons
*/
.trumbowyg-button-pane li button {
display: block;
position: relative;
text-indent: -9999px;
width: 35px;
height: 35px;
overflow: hidden;
background: transparent url("./images/icons-black.png") no-repeat;
border: none;
cursor: pointer;
-webkit-transition: background-color .15s, background-image .15s, opacity .15s;
transition: background-color .15s, background-image .15s, opacity .15s;
/* English and others */ }
.trumbowyg-button-pane li button.trumbowyg-viewHTML-button {
background-position: -70px -95px; }
.trumbowyg-button-pane li button.trumbowyg-formatting-button {
background-position: -45px -20px; }
.trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-button-pane li button.trumbowyg-strong-button {
background-position: 5px -20px; }
.trumbowyg-button-pane li button.trumbowyg-italic-button, .trumbowyg-button-pane li button.trumbowyg-em-button {
background-position: -70px -45px; }
.trumbowyg-button-pane li button.trumbowyg-underline-button {
background-position: 5px -95px; }
.trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-button-pane li button.trumbowyg-del-button {
background-position: -95px -70px; }
.trumbowyg-button-pane li button.trumbowyg-link-button {
background-position: -45px -70px; }
.trumbowyg-button-pane li button.trumbowyg-insertImage-button {
background-position: -70px -20px; }
.trumbowyg-button-pane li button.trumbowyg-justifyLeft-button {
background-position: -20px -70px; }
.trumbowyg-button-pane li button.trumbowyg-justifyCenter-button {
background-position: -20px -20px; }
.trumbowyg-button-pane li button.trumbowyg-justifyRight-button {
background-position: -95px -20px; }
.trumbowyg-button-pane li button.trumbowyg-justifyFull-button {
background-position: 5px 5px; }
.trumbowyg-button-pane li button.trumbowyg-unorderedList-button {
background-position: -20px -95px; }
.trumbowyg-button-pane li button.trumbowyg-orderedList-button {
background-position: -70px -70px; }
.trumbowyg-button-pane li button.trumbowyg-horizontalRule-button {
background-position: -70px 5px; }
.trumbowyg-button-pane li button.trumbowyg-removeformat-button {
background-position: -95px 5px; }
.trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
background-position: -20px -45px; }
.trumbowyg-button-pane li button.trumbowyg-close-button {
background-position: -45px 5px; }
.trumbowyg-fullscreen .trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
background-position: 5px -45px; }
.trumbowyg-button-pane li:first-child button {
margin-left: 6px; }
.trumbowyg-button-pane li:last-child button {
margin-right: 6px; }
/* French */
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strong-button {
background-position: -45px -45px; }
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-underline-button {
background-position: -95px -45px; }
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-del-button {
background-position: 5px -70px; }
.trumbowyg-black {
/* French */ }
.trumbowyg-black .trumbowyg-button-pane li button {
background-image: url("./images/icons-white.png");
/* English and others */ }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-viewHTML-button {
background-position: -70px -95px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-formatting-button {
background-position: -45px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-strong-button {
background-position: 5px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-italic-button, .trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-em-button {
background-position: -70px -45px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-underline-button {
background-position: 5px -95px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-del-button {
background-position: -95px -70px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-link-button {
background-position: -45px -70px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-insertImage-button {
background-position: -70px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-justifyLeft-button {
background-position: -20px -70px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-justifyCenter-button {
background-position: -20px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-justifyRight-button {
background-position: -95px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-justifyFull-button {
background-position: 5px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-unorderedList-button {
background-position: -20px -95px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-orderedList-button {
background-position: -70px -70px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-horizontalRule-button {
background-position: -70px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-removeformat-button {
background-position: -95px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
background-position: -20px -45px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-close-button {
background-position: -45px 5px; }
.trumbowyg-black .trumbowyg-fullscreen .trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
background-position: 5px -45px; }
.trumbowyg-black .trumbowyg-button-pane li:first-child button {
margin-left: 6px; }
.trumbowyg-black .trumbowyg-button-pane li:last-child button {
margin-right: 6px; }
.trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strong-button {
background-position: -45px -45px; }
.trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-underline-button {
background-position: -95px -45px; }
.trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-del-button {
background-position: 5px -70px; }
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
.trumbowyg-button-pane li button {
background-size: 125px 125px !important;
background-image: url("./images/icons-black-2x.png") !important;
/* English and others */ }
.trumbowyg-button-pane li button.trumbowyg-viewHTML-button {
background-position: -70px -95px; }
.trumbowyg-button-pane li button.trumbowyg-formatting-button {
background-position: -45px -20px; }
.trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-button-pane li button.trumbowyg-strong-button {
background-position: 5px -20px; }
.trumbowyg-button-pane li button.trumbowyg-italic-button, .trumbowyg-button-pane li button.trumbowyg-em-button {
background-position: -70px -45px; }
.trumbowyg-button-pane li button.trumbowyg-underline-button {
background-position: 5px -95px; }
.trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-button-pane li button.trumbowyg-del-button {
background-position: -95px -70px; }
.trumbowyg-button-pane li button.trumbowyg-link-button {
background-position: -45px -70px; }
.trumbowyg-button-pane li button.trumbowyg-insertImage-button {
background-position: -70px -20px; }
.trumbowyg-button-pane li button.trumbowyg-justifyLeft-button {
background-position: -20px -70px; }
.trumbowyg-button-pane li button.trumbowyg-justifyCenter-button {
background-position: -20px -20px; }
.trumbowyg-button-pane li button.trumbowyg-justifyRight-button {
background-position: -95px -20px; }
.trumbowyg-button-pane li button.trumbowyg-justifyFull-button {
background-position: 5px 5px; }
.trumbowyg-button-pane li button.trumbowyg-unorderedList-button {
background-position: -20px -95px; }
.trumbowyg-button-pane li button.trumbowyg-orderedList-button {
background-position: -70px -70px; }
.trumbowyg-button-pane li button.trumbowyg-horizontalRule-button {
background-position: -70px 5px; }
.trumbowyg-button-pane li button.trumbowyg-removeformat-button {
background-position: -95px 5px; }
.trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
background-position: -20px -45px; }
.trumbowyg-button-pane li button.trumbowyg-close-button {
background-position: -45px 5px; }
.trumbowyg-fullscreen .trumbowyg-button-pane li a.trumbowyg-fullscreen-button {
background-position: 5px -45px; }
/* French */
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strong-button {
background-position: -45px -45px; }
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-underline-button {
background-position: -95px -45px; }
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-del-button {
background-position: 5px -70px; }
/* Black theme */
.trumbowyg-black {
/* French */ }
.trumbowyg-black .trumbowyg-button-pane li button {
background-size: 125px 125px !important;
background-image: url("./images/icons-white-2x.png") !important;
/* English and others */ }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-viewHTML-button {
background-position: -70px -95px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-formatting-button {
background-position: -45px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-strong-button {
background-position: 5px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-italic-button, .trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-em-button {
background-position: -70px -45px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-underline-button {
background-position: 5px -95px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-del-button {
background-position: -95px -70px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-link-button {
background-position: -45px -70px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-insertImage-button {
background-position: -70px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-justifyLeft-button {
background-position: -20px -70px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-justifyCenter-button {
background-position: -20px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-justifyRight-button {
background-position: -95px -20px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-justifyFull-button {
background-position: 5px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-unorderedList-button {
background-position: -20px -95px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-orderedList-button {
background-position: -70px -70px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-horizontalRule-button {
background-position: -70px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-removeformat-button {
background-position: -95px 5px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
background-position: -20px -45px; }
.trumbowyg-black .trumbowyg-button-pane li button.trumbowyg-close-button {
background-position: -45px 5px; }
.trumbowyg-black .trumbowyg-fullscreen .trumbowyg-button-pane li a.trumbowyg-fullscreen-button {
background-position: 5px -45px; }
.trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strong-button {
background-position: -45px -45px; }
.trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-underline-button {
background-position: -95px -45px; }
.trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-black .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-del-button {
background-position: 5px -70px; } }
.trumbowyg-dark .trumbowyg-overlay {
background-color: rgba(15, 15, 15, 0.6); }

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,15 @@
@using BuildFeed.Model
@using BuildFeed.Controllers
@using BuildFeed.Model
@model BuildFeed.Model.Build
@{
ViewBag.Title = (string)ViewContext.RouteData.Values["action"] == "addBuild"
ViewBag.Title = (string)ViewContext.RouteData.Values["action"] == nameof(FrontController.AddBuild)
? $"{VariantTerms.Common_AddBuild} | {InvariantTerms.SiteName}"
: $"{VariantTerms.Front_EditBuild} {Model.FullBuildString} | {InvariantTerms.SiteName}";
Html.EnableClientValidation();
Html.EnableUnobtrusiveJavaScript();
}
@if ((string)ViewContext.RouteData.Values["action"] == "addBuild")
@if ((string)ViewContext.RouteData.Values["action"] == nameof(FrontController.AddBuild))
{
<h1>@VariantTerms.Common_AddBuild</h1>
}
@ -154,40 +155,33 @@ else
$(function()
{
var btnsGrps = $.trumbowyg.btnsGrps;
$("#@Html.IdFor(model => model.SourceDetails)")
.trumbowyg({
semantic: true,
autogrow: true,
btns: [
'viewHTML',
'|', 'strong', 'em',
[ 'strong', 'em' ],
'|', 'link',
'|', btnsGrps.justify,
'|', btnsGrps.lists
'|', 'btnGrp-lists',
'|', 'btnGrp-justify',
'|', 'viewHTML',
'|'
]
});
$(".trumbowyg").addClass("trumbowyg-black");
$("#quickpaste")
.change(function()
{
var regex = /(([\d]{1,2})\.([\d]{1,2})\.)?([\d]{4,5})(\.([\d]{1,5}))?\.([a-zA-Z0-9._\(\)-]+?)\.(\d\d\d\d\d\d-\d\d\d\d)/;
.change(function() {
var regex = /(([\d]{1,2})\.([\d]{1,2})\.)?([\d]{4,5})(\.([\d]{1,5}))?(\.| \()([a-zA-Z][a-zA-Z0-9._\(\)-]+?)\.(\d\d\d\d\d\d-\d\d\d\d)\)?/;
var result = regex.exec($("#quickpaste").val());
if (result === null)
{
regex = /(([\d]{1,2})\.([\d]{1,2})\.)?([\d]{4,5})(\.([\d]{1,5}))?\s+\(([a-zA-Z0-9._\(\)-]+?)\.(\d\d\d\d\d\d-\d\d\d\d)\)/;
result = regex.exec($("#quickpaste").val());
}
$("#MajorVersion").val(result[2]);
$("#MinorVersion").val(result[3]);
$("#Number").val(result[4]);
$("#Revision").val(result[6]);
$("#Lab").val(result[7]);
$("#BuildTime").val(result[8]);
$("#Lab").val(result[8]);
$("#BuildTime").val(result[9]);
});
});
</script>

View File

@ -1,72 +1,80 @@
@using BuildFeed.Code
@using BuildFeed.Controllers
@using BuildFeed.Model
@using Humanizer
@model Tuple<BuildGroup, List<Build>>
@model Tuple<BuildFeed.Model.BuildGroup, List<BuildFeed.Model.Build>>
@{
ViewBag.Title = $"{Model.Item1} | {InvariantTerms.SiteName}";
ViewBag.Title = $"{Model.Item1} | {InvariantTerms.SiteName}";
}
<h1>@Model.Item1.ToString()</h1>
<h3>@VariantTerms.Front_Listing</h3>
<div class="build-group-listing">
@foreach (Build build in Model.Item2)
{
<div class="build-group">
<h3 class="build-group-title no-wrapping" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@(string.IsNullOrEmpty(build.Lab)
? "{Unknown}"
: build.Lab)
</a>
</h3>
@if (User.Identity.IsAuthenticated)
{
<p>
<a href="@Url.Action("EditBuild", new
{
id = build.Id
})" class="btn btn-primary btn-xs">
@VariantTerms.Front_Edit</a>
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action("DeleteBuild", new
{
id = build.Id
})" class="btn btn-danger btn-xs">
@VariantTerms.Front_Delete</a>
}
</p>
}
@if (build.BuildTime.HasValue)
{
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()</span>
</p>
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()</span>
</p>
}
@if (build.IsLeaked)
{
<p class="build-group-p">
<span class="label label-success label-build-status">@VariantTerms.Front_Public</span>
</p>
}
else
{
<p class="build-group-p">
<span class="label label-danger label-build-status">@VariantTerms.Front_Private</span>
</p>
}
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
@foreach (Build build in Model.Item2)
{
<div class="build-group">
<h3 class="build-group-title no-wrapping" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@(string.IsNullOrEmpty(build.Lab)
? "{Unknown}"
: build.Lab)
</a>
</h3>
@if (build.BuildTime.HasValue)
{
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()</span>
</p>
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()</span>
</p>
}
@if (build.IsLeaked)
{
<p class="build-group-p">
<span>
<i class="fa fa-unlock-alt fa-fw"></i> @VariantTerms.Front_Public</span>
</p>
}
else
{
<p class="build-group-p">
<span>
<i class="fa fa-lock fa-fw"></i> @VariantTerms.Front_Private</span>
</p>
}
@if (User.Identity.IsAuthenticated)
{
<p>
<a href="@Url.Action(nameof(FrontController.EditBuild), new
{
id = build.Id
})" class="button edit-button">
@VariantTerms.Front_Edit
</a>
&nbsp;
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action(nameof(FrontController.DeleteBuild), new
{
id = build.Id
})" class="button delete-button">
@VariantTerms.Front_Delete
</a>
}
</p>
}
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
</div>

View File

@ -1,98 +1,110 @@
@using BuildFeed.Code
@using BuildFeed.Controllers
@using BuildFeed.Model
@using Humanizer
@model IEnumerable<BuildFeed.Model.Build>
@{
ViewBag.Title = string.Format("{0}{1} | {2}", string.Format(VariantTerms.Front_BuildsFrom, ViewBag.ItemId), ViewBag.PageNumber == 1
? ""
: string.Format(VariantTerms.Common_TitlePage, ViewBag.PageNumber), InvariantTerms.SiteName);
ViewBag.Title = string.Format("{0}{1} | {2}", string.Format(VariantTerms.Front_BuildsFrom, ViewBag.ItemId), ViewBag.PageNumber == 1
? ""
: string.Format(VariantTerms.Common_TitlePage, ViewBag.PageNumber), InvariantTerms.SiteName);
}
@section head
{
@if (ViewBag.MetaItem != null)
{
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
}
else
{
string metaDesc = string.Format(VariantTerms.Meta_LabGeneric, ViewBag.ItemId);
<meta name="description" content="@metaDesc" />
<meta property="og:description" content="@metaDesc" />
}
@if (ViewBag.MetaItem != null)
{
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
}
else
{
string metaDesc = string.Format(VariantTerms.Meta_LabGeneric, ViewBag.ItemId);
<meta name="description" content="@metaDesc" />
<meta property="og:description" content="@metaDesc" />
}
@if (ViewBag.PageNumber != 1)
{
<meta name="robots" content="noindex, follow" />
}
@if (ViewBag.PageNumber != 1)
{
<meta name="robots" content="noindex, follow" />
}
}
<h1 class="eager-wrapping">@string.Format(VariantTerms.Front_BuildsFrom, ViewBag.ItemId)</h1>
@if ((ViewBag.MetaItem != null) && !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
@if (ViewBag.MetaItem != null && !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
{
<h3>@VariantTerms.Front_About</h3>
@Html.Raw(ViewBag.MetaItem.PageContent)
<h3>@VariantTerms.Front_About</h3>
@Html.Raw(ViewBag.MetaItem.PageContent)
}
<h3>@VariantTerms.Front_Share</h3>
<div class="addthis_sharing_toolbox"></div>
<br />
<h3>@VariantTerms.Front_Listing</h3>
<div class="build-group-listing">
@foreach (Build build in Model)
{
<div class="build-group">
<h3 class="build-group-title" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@($"{build.MajorVersion}.{build.MinorVersion}.{build.Number}.{build.Revision}")
</a>
</h3>
@if (User.Identity.IsAuthenticated)
{
<p>
<a href="@Url.Action("editBuild", new
{
id = build.Id
})" class="btn btn-primary btn-xs">
@VariantTerms.Front_Edit</a>
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action("DeleteBuild", new
{
id = build.Id
})" class="btn btn-danger btn-xs">
@VariantTerms.Front_Delete</a>
}
</p>
}
<p class="build-group-p">
@foreach (Build build in Model)
{
<div class="build-group">
<h3 class="build-group-title" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@($"{build.MajorVersion}.{build.MinorVersion}.{build.Number}.{build.Revision}")
</a>
</h3>
@if (build.BuildTime.HasValue)
{
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()</span>
<br />
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()</span>
<br />
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()
</span>
</p>
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()
</span>
</p>
}
</p>
<p class="build-group-p">
@if (build.IsLeaked)
{
<span class="label label-success label-build-status">@VariantTerms.Front_Public</span>
<p class="build-group-p">
<span>
<i class="fa fa-unlock-alt fa-fw"></i> @VariantTerms.Front_Public</span>
</p>
}
else
{
<span class="label label-danger label-build-status">@VariantTerms.Front_Private</span>
<p class="build-group-p">
<span>
<i class="fa fa-lock fa-fw"></i> @VariantTerms.Front_Private</span>
</p>
}
</p>
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
@if (User.Identity.IsAuthenticated)
{
<p>
<a href="@Url.Action(nameof(FrontController.EditBuild), new
{
id = build.Id
})" class="button edit-button">
@VariantTerms.Front_Edit
</a>
&nbsp;
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action(nameof(FrontController.DeleteBuild), new
{
id = build.Id
})" class="button delete-button">
@VariantTerms.Front_Delete
</a>
}
</p>
}
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
</div>
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewLab", ViewContext.RouteData.Values)

View File

@ -1,97 +1,107 @@
@using BuildFeed.Code
@using BuildFeed.Controllers
@using BuildFeed.Model
@using Humanizer
@model IEnumerable<BuildFeed.Model.Build>
@{
ViewBag.Title = string.Format("{0}{1} | {2}", ViewBag.ItemId, ViewBag.PageNumber == 1
? ""
: string.Format(VariantTerms.Common_TitlePage, ViewBag.PageNumber), InvariantTerms.SiteName);
ViewBag.Title = string.Format("{0}{1} | {2}", ViewBag.ItemId, ViewBag.PageNumber == 1
? ""
: string.Format(VariantTerms.Common_TitlePage, ViewBag.PageNumber), InvariantTerms.SiteName);
}
@section head
{
@if (ViewBag.MetaItem != null)
{
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
}
@if (ViewBag.MetaItem != null)
{
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
}
@if (ViewBag.PageNumber != 1)
{
<meta name="robots" content="noindex, follow" />
}
@if (ViewBag.PageNumber != 1)
{
<meta name="robots" content="noindex, follow" />
}
}
<h1>@ViewBag.ItemId</h1>
@if ((ViewBag.MetaItem != null) && !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
@if (ViewBag.MetaItem != null && !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
{
<h3>@VariantTerms.Front_About</h3>
@Html.Raw(ViewBag.MetaItem.PageContent)
<h3>@VariantTerms.Front_About</h3>
@Html.Raw(ViewBag.MetaItem.PageContent)
}
<h3>@VariantTerms.Front_Share</h3>
<div class="addthis_sharing_toolbox"></div>
<br />
<h3>@VariantTerms.Front_Listing</h3>
<div class="build-group-listing">
@foreach (Build build in Model)
{
<div class="build-group">
<h3 class="build-group-title" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@($"{build.MajorVersion}.{build.MinorVersion}.{build.Number}.{build.Revision}")
</a>
</h3>
@if (User.Identity.IsAuthenticated)
{
<p>
<a href="@Url.Action("editBuild", new
{
id = build.Id
})" class="btn btn-primary btn-xs">
@VariantTerms.Front_Edit</a>
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action("DeleteBuild", new
{
id = build.Id
})" class="btn btn-danger btn-xs">
@VariantTerms.Front_Delete</a>
}
</p>
}
@if (!string.IsNullOrEmpty(build.Lab))
{
<p class="no-wrapping build-group-p" title="@build.Lab">
<i class="fa fa-code-fork fa-fw"></i> @build.Lab</p>
}
@if (build.BuildTime.HasValue)
{
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()</span>
</p>
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()</span>
</p>
}
<p class="build-group-p">
@foreach (Build build in Model)
{
<div class="build-group">
<h3 class="build-group-title" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@($"{build.MajorVersion}.{build.MinorVersion}.{build.Number}.{build.Revision}")
</a>
</h3>
@if (!string.IsNullOrEmpty(build.Lab))
{
<p class="no-wrapping build-group-p" title="@build.Lab">
<i class="fa fa-code-fork fa-fw"></i> @build.Lab</p>
}
@if (build.BuildTime.HasValue)
{
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()</span>
</p>
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()</span>
</p>
}
@if (build.IsLeaked)
{
<span class="label label-success label-build-status">@VariantTerms.Front_Public</span>
<p class="build-group-p">
<span>
<i class="fa fa-unlock-alt fa-fw"></i> @VariantTerms.Front_Public</span>
</p>
}
else
{
<span class="label label-danger label-build-status">@VariantTerms.Front_Private</span>
<p class="build-group-p">
<span>
<i class="fa fa-lock fa-fw"></i> @VariantTerms.Front_Private</span>
</p>
}
</p>
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
@if (User.Identity.IsAuthenticated)
{
<p>
<a href="@Url.Action(nameof(FrontController.EditBuild), new
{
id = build.Id
})" class="button edit-button">
@VariantTerms.Front_Edit
</a>
&nbsp;
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action(nameof(FrontController.DeleteBuild), new
{
id = build.Id
})" class="button delete-button">
@VariantTerms.Front_Delete
</a>
}
</p>
}
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
</div>
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewSource", ViewContext.RouteData.Values)

View File

@ -1,98 +1,106 @@
@using BuildFeed.Code
@using BuildFeed.Controllers
@using BuildFeed.Model
@using Humanizer
@model IEnumerable<BuildFeed.Model.Build>
@{
ViewBag.Title = $"{InvariantTerms.ProductName} {ViewBag.ItemId} {(ViewBag.PageNumber == 1 ? "" : string.Format(VariantTerms.Common_TitlePage, ViewBag.PageNumber))} | {InvariantTerms.SiteName}";
ViewBag.Title = $"{InvariantTerms.ProductName} {ViewBag.ItemId} {(ViewBag.PageNumber == 1 ? "" : string.Format(VariantTerms.Common_TitlePage, ViewBag.PageNumber))} | {InvariantTerms.SiteName}";
}
@section head
{
@if (ViewBag.MetaItem != null)
{
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
}
@if (ViewBag.MetaItem != null)
{
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
}
@if (ViewBag.PageNumber != 1)
{
<meta name="robots" content="noindex, follow" />
}
@if (ViewBag.PageNumber != 1)
{
<meta name="robots" content="noindex, follow" />
}
}
<h1>@string.Format("{0} {1}", InvariantTerms.ProductName, ViewBag.ItemId)</h1>
@if ((ViewBag.MetaItem != null)
&& !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
@if (ViewBag.MetaItem != null
&& !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
{
<h3>@VariantTerms.Front_About</h3>
@Html.Raw(ViewBag.MetaItem.PageContent)
<h3>@VariantTerms.Front_About</h3>
@Html.Raw(ViewBag.MetaItem.PageContent)
}
<h3>@VariantTerms.Front_Share</h3>
<div class="addthis_sharing_toolbox"></div>
<h3>@VariantTerms.Front_Listing</h3>
<div class="build-group-listing">
@foreach (Build build in Model)
{
<div class="build-group">
<h3 class="build-group-title no-wrapping" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@($"{build.MajorVersion}.{build.MinorVersion}.{build.Number}.{build.Revision}")
</a>
</h3>
@if (User.Identity.IsAuthenticated)
{
<p>
<a href="@Url.Action("editBuild", new
{
id = build.Id
})" class="btn btn-primary btn-xs">
@VariantTerms.Front_Edit
</a>
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action("DeleteBuild", new
{
id = build.Id
})" class="btn btn-danger btn-xs">
@VariantTerms.Front_Delete
</a>
}
</p>
}
@if (!string.IsNullOrEmpty(build.Lab))
{
<p class="build-group-p no-wrapping" title="@build.Lab">
<i class="fa fa-code-fork fa-fw"></i> @build.Lab
</p>
}
@if (build.BuildTime.HasValue)
{
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()</span>
</p>
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()</span>
</p>
}
<p>
@foreach (Build build in Model)
{
<div class="build-group">
<h3 class="build-group-title no-wrapping" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@($"{build.MajorVersion}.{build.MinorVersion}.{build.Number}.{build.Revision}")
</a>
</h3>
@if (!string.IsNullOrEmpty(build.Lab))
{
<p class="build-group-p no-wrapping" title="@build.Lab">
<i class="fa fa-code-fork fa-fw"></i> @build.Lab
</p>
}
@if (build.BuildTime.HasValue)
{
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()</span>
</p>
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()</span>
</p>
}
@if (build.IsLeaked)
{
<span class="label label-success label-build-status">@VariantTerms.Front_Public</span>
<p class="build-group-p">
<span>
<i class="fa fa-unlock-alt fa-fw"></i> @VariantTerms.Front_Public</span>
</p>
}
else
{
<span class="label label-danger label-build-status">@VariantTerms.Front_Private</span>
<p class="build-group-p">
<span>
<i class="fa fa-lock fa-fw"></i> @VariantTerms.Front_Private</span>
</p>
}
</p>
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
@if (User.Identity.IsAuthenticated)
{
<p>
<a href="@Url.Action(nameof(FrontController.EditBuild), new
{
id = build.Id
})" class="button edit-button">
@VariantTerms.Front_Edit
</a>
&nbsp;
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action(nameof(FrontController.DeleteBuild), new
{
id = build.Id
})" class="button delete-button">
@VariantTerms.Front_Delete
</a>
}
</p>
}
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
</div>
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewVersion", ViewContext.RouteData.Values)

View File

@ -1,103 +1,116 @@
@using BuildFeed.Code
@using BuildFeed.Controllers
@using BuildFeed.Model
@using Humanizer
@model IEnumerable<BuildFeed.Model.Build>
@{
ViewBag.Title = string.Format("{0}{1} | {2}", string.Format(VariantTerms.Front_BuildsFrom, ViewBag.ItemId), ViewBag.PageNumber == 1
? ""
: string.Format(VariantTerms.Common_TitlePage, ViewBag.PageNumber), InvariantTerms.SiteName);
ViewBag.Title = string.Format("{0}{1} | {2}", string.Format(VariantTerms.Front_BuildsFrom, ViewBag.ItemId), ViewBag.PageNumber == 1
? ""
: string.Format(VariantTerms.Common_TitlePage, ViewBag.PageNumber), InvariantTerms.SiteName);
}
@section head
{
@if (ViewBag.MetaItem != null)
{
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
}
else
{
string metaDesc = string.Format(VariantTerms.Meta_YearGeneric, ViewBag.ItemId);
<meta name="description" content="@metaDesc" />
<meta property="og:description" content="@metaDesc" />
}
@if (ViewBag.MetaItem != null)
{
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
}
else
{
string metaDesc = string.Format(VariantTerms.Meta_YearGeneric, ViewBag.ItemId);
<meta name="description" content="@metaDesc" />
<meta property="og:description" content="@metaDesc" />
}
@if (ViewBag.PageNumber != 1)
{
<meta name="robots" content="noindex, follow" />
}
@if (ViewBag.PageNumber != 1)
{
<meta name="robots" content="noindex, follow" />
}
}
<h1>@string.Format(VariantTerms.Front_BuildsFrom, ViewBag.ItemId)</h1>
@if ((ViewBag.MetaItem != null) && !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
@if (ViewBag.MetaItem != null && !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
{
<h3>@VariantTerms.Front_About</h3>
@Html.Raw(ViewBag.MetaItem.PageContent)
<h3>@VariantTerms.Front_About</h3>
@Html.Raw(ViewBag.MetaItem.PageContent)
}
<h3>@VariantTerms.Front_Share</h3>
<div class="addthis_sharing_toolbox"></div>
<br />
<h3>@VariantTerms.Front_Listing</h3>
<div class="build-group-listing">
@foreach (Build build in Model)
{
<div class="build-group">
<h3 class="build-group-title" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@($"{build.MajorVersion}.{build.MinorVersion}.{build.Number}.{build.Revision}")
</a>
</h3>
@if (User.Identity.IsAuthenticated)
{
<p class="build-group-p">
<a href="@Url.Action("EditBuild", new
{
id = build.Id
})" class="btn btn-primary btn-xs">
@VariantTerms.Front_Edit</a>
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action("DeleteBuild", new
{
id = build.Id
})" class="btn btn-danger btn-xs">
@VariantTerms.Front_Delete</a>
}
</p>
}
<p class="build-group-p">
@foreach (Build build in Model)
{
<div class="build-group">
<h3 class="build-group-title" title="@build.AlternateBuildString">
<a href="@Url.Action("ViewBuild", new
{
id = build.Id
})">
@($"{build.MajorVersion}.{build.MinorVersion}.{build.Number}.{build.Revision}")
</a>
</h3>
@if (!string.IsNullOrEmpty(build.Lab))
{
<div class="no-wrapping" title="@build.Lab">
<i class="fa fa-code-fork fa-fw"></i> @build.Lab</div>
<p class="build-group-p no-wrapping" title="@build.Lab">
<i class="fa fa-code-fork fa-fw"></i> @build.Lab
</p>
}
@if (build.BuildTime.HasValue)
{
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()</span>
<br />
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()</span>
<br />
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()
</span>
</p>
<p class="build-group-p">
<span title="@build.BuildTime.Value.Humanize()">
<i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()
</span>
</p>
}
</p>
<p class="build-group-p">
@if (build.IsLeaked)
{
<span class="label label-success label-build-status">@VariantTerms.Front_Public</span>
<p class="build-group-p">
<span>
<i class="fa fa-unlock-alt fa-fw"></i> @VariantTerms.Front_Public</span>
</p>
}
else
{
<span class="label label-danger label-build-status">@VariantTerms.Front_Private</span>
<p class="build-group-p">
<span>
<i class="fa fa-lock fa-fw"></i> @VariantTerms.Front_Private</span>
</p>
}
</p>
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
@if (User.Identity.IsAuthenticated)
{
<p>
<a href="@Url.Action(nameof(FrontController.EditBuild), new
{
id = build.Id
})" class="button edit-button">
@VariantTerms.Front_Edit
</a>
&nbsp;
@if (Roles.IsUserInRole("Administrators"))
{
<a href="@Url.Action(nameof(FrontController.DeleteBuild), new
{
id = build.Id
})" class="button delete-button">
@VariantTerms.Front_Delete
</a>
}
</p>
}
</div>
}
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
<div class="build-group-empty"></div>
</div>
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewYear", ViewContext.RouteData.Values)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -556,8 +556,9 @@ article
width: auto;
}
input[type=submit],
button
> input[type=submit],
> button,
.group-input-button > button
{
display: inline-block;
vertical-align: middle;