alchemy-custom-model 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e6c70590f98f7fe1059a6473d7040a66c9db41c
4
- data.tar.gz: 18f20f4575cafc620bddda500c480fdc625ea86d
3
+ metadata.gz: 0ab27b4d864cd653d9bf7f00b54a22885d4cdc3e
4
+ data.tar.gz: 498f01664986beed1884385530e1fb1e1b6406e4
5
5
  SHA512:
6
- metadata.gz: 51728d319fc807d859f16377af2b92184f6ade99a46371f55c7677488d078c029c24ba192f2de4a5431443418d968a503aa20887ac1e07b2d3ea60ff16f42fde
7
- data.tar.gz: b78843f5e537763eef6dc5e75e0bffcb66ed99a7395ce9ff3a404a9e3f31a74699557ec13dd2c7d791df309be61c31c786eaf86e90b182535d6cad7b1f5c5593
6
+ metadata.gz: d8db2107bcb63cb00c45849c39af4d240a6d77c988e1a273fccf67319cc7acb4ebbca22fdc4fe59ed540bae7af94ba5372964af314c3916d93bae4e5baab35cb
7
+ data.tar.gz: 8c1868a50000986ed8aaedc6fb377cc0e9a683326ff08dc1e58db3701ddf85942682b83ac3a236e3933346b8a02497e1de2b91d51b842bab18e5c8714d7d722d
@@ -1,7 +1,7 @@
1
1
  module Alchemy
2
2
  module Custom
3
3
  module Model
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,261 @@
1
+ tinymce.addI18n('it',{
2
+ "Redo": "Ripeti",
3
+ "Undo": "Indietro",
4
+ "Cut": "Taglia",
5
+ "Copy": "Copia",
6
+ "Paste": "Incolla",
7
+ "Select all": "Seleziona Tutto",
8
+ "New document": "Nuovo Documento",
9
+ "Ok": "Ok",
10
+ "Cancel": "Annulla",
11
+ "Visual aids": "Elementi Visivi",
12
+ "Bold": "Grassetto",
13
+ "Italic": "Corsivo",
14
+ "Underline": "Sottolineato",
15
+ "Strikethrough": "Barrato",
16
+ "Superscript": "Apice",
17
+ "Subscript": "Pedice",
18
+ "Clear formatting": "Cancella Formattazione",
19
+ "Align left": "Allinea a Sinistra",
20
+ "Align center": "Allinea al Cento",
21
+ "Align right": "Allinea a Destra",
22
+ "Justify": "Giustifica",
23
+ "Bullet list": "Elenchi Puntati",
24
+ "Numbered list": "Elenchi Numerati",
25
+ "Decrease indent": "Riduci Rientro",
26
+ "Increase indent": "Aumenta Rientro",
27
+ "Close": "Chiudi",
28
+ "Formats": "Formattazioni",
29
+ "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Il tuo browser non supporta l'accesso diretto negli Appunti. Per favore usa i tasti di scelta rapida Ctrl+X\/C\/V.",
30
+ "Headers": "Intestazioni",
31
+ "Header 1": "Intestazione 1",
32
+ "Header 2": "Header 2",
33
+ "Header 3": "Intestazione 3",
34
+ "Header 4": "Intestazione 4",
35
+ "Header 5": "Intestazione 5",
36
+ "Header 6": "Intestazione 6",
37
+ "Headings": "Intestazioni",
38
+ "Heading 1": "Intestazione 1",
39
+ "Heading 2": "Intestazione 2",
40
+ "Heading 3": "Intestazione 3",
41
+ "Heading 4": "Intestazione 4",
42
+ "Heading 5": "Intestazione 5",
43
+ "Heading 6": "Intestazione 6",
44
+ "Preformatted": "Preformattato",
45
+ "Div": "Div",
46
+ "Pre": "Pre",
47
+ "Code": "Codice",
48
+ "Paragraph": "Paragrafo",
49
+ "Blockquote": "Blockquote",
50
+ "Inline": "Inlinea",
51
+ "Blocks": "Blocchi",
52
+ "Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Incolla \u00e8 in modalit\u00e0 testo normale. I contenuti sono incollati come testo normale se non disattivi l'opzione.",
53
+ "Font Family": "Famiglia font",
54
+ "Font Sizes": "Dimensioni font",
55
+ "Class": "Classe",
56
+ "Browse for an image": "Scegli un'immagine",
57
+ "OR": "o",
58
+ "Drop an image here": "Incolla un'immagine qui",
59
+ "Upload": "Carica",
60
+ "Block": "Blocco",
61
+ "Align": "Allinea",
62
+ "Default": "Default",
63
+ "Circle": "Cerchio",
64
+ "Disc": "Disco",
65
+ "Square": "Quadrato",
66
+ "Lower Alpha": "Alpha Minore",
67
+ "Lower Greek": "Greek Minore",
68
+ "Lower Roman": "Roman Minore",
69
+ "Upper Alpha": "Alpha Superiore",
70
+ "Upper Roman": "Roman Superiore",
71
+ "Anchor": "Fissa",
72
+ "Name": "Nome",
73
+ "Id": "Id",
74
+ "Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "L'id dovrebbe cominciare con una lettera, seguito solo da lettere, numeri, linee, punti, virgole.",
75
+ "You have unsaved changes are you sure you want to navigate away?": "Non hai salvato delle modifiche, sei sicuro di andartene?",
76
+ "Restore last draft": "Ripristina l'ultima bozza.",
77
+ "Special character": "Carattere Speciale",
78
+ "Source code": "Codice Sorgente",
79
+ "Insert\/Edit code sample": "Inserisci\/Modifica esempio di codice",
80
+ "Language": "Lingua",
81
+ "Code sample": "Esempio di codice",
82
+ "Color": "Colore",
83
+ "R": "R",
84
+ "G": "G",
85
+ "B": "B",
86
+ "Left to right": "Da Sinistra a Destra",
87
+ "Right to left": "Da Destra a Sinistra",
88
+ "Emoticons": "Emoction",
89
+ "Document properties": "Propriet\u00e0 Documento",
90
+ "Title": "Titolo",
91
+ "Keywords": "Parola Chiave",
92
+ "Description": "Descrizione",
93
+ "Robots": "Robot",
94
+ "Author": "Autore",
95
+ "Encoding": "Codifica",
96
+ "Fullscreen": "Schermo Intero",
97
+ "Action": "Azione",
98
+ "Shortcut": "Scorciatoia",
99
+ "Help": "Aiuto",
100
+ "Address": "Indirizzo",
101
+ "Focus to menubar": "Focus sulla barra del menu",
102
+ "Focus to toolbar": "Focus sulla barra degli strumenti",
103
+ "Focus to element path": "Focus sul percorso dell'elemento",
104
+ "Focus to contextual toolbar": "Focus sulla barra degli strumenti contestuale",
105
+ "Insert link (if link plugin activated)": "Inserisci link (se il plugin link \u00e8 attivato)",
106
+ "Save (if save plugin activated)": "Salva (se il plugin save \u00e8 attivato)",
107
+ "Find (if searchreplace plugin activated)": "Trova (se il plugin searchreplace \u00e8 attivato)",
108
+ "Plugins installed ({0}):": "Plugin installati ({0}):",
109
+ "Premium plugins:": "Plugin Premium:",
110
+ "Learn more...": "Per saperne di pi\u00f9...",
111
+ "You are using {0}": "Stai usando {0}",
112
+ "Plugins": "Plugin",
113
+ "Handy Shortcuts": "Scorciatoia pratica",
114
+ "Horizontal line": "Linea Orizzontale",
115
+ "Insert\/edit image": "Aggiungi\/Modifica Immagine",
116
+ "Image description": "Descrizione Immagine",
117
+ "Source": "Fonte",
118
+ "Dimensions": "Dimenzioni",
119
+ "Constrain proportions": "Mantieni Proporzioni",
120
+ "General": "Generale",
121
+ "Advanced": "Avanzato",
122
+ "Style": "Stile",
123
+ "Vertical space": "Spazio Verticale",
124
+ "Horizontal space": "Spazio Orizzontale",
125
+ "Border": "Bordo",
126
+ "Insert image": "Inserisci immagine",
127
+ "Image": "Immagine",
128
+ "Image list": "Elenco immagini",
129
+ "Rotate counterclockwise": "Ruota in senso antiorario",
130
+ "Rotate clockwise": "Ruota in senso orario",
131
+ "Flip vertically": "Rifletti verticalmente",
132
+ "Flip horizontally": "Rifletti orizzontalmente",
133
+ "Edit image": "Modifica immagine",
134
+ "Image options": "Opzioni immagine",
135
+ "Zoom in": "Ingrandisci",
136
+ "Zoom out": "Rimpicciolisci",
137
+ "Crop": "Taglia",
138
+ "Resize": "Ridimensiona",
139
+ "Orientation": "Orientamento",
140
+ "Brightness": "Luminosit\u00e0",
141
+ "Sharpen": "Contrasta",
142
+ "Contrast": "Contrasto",
143
+ "Color levels": "Livelli colore",
144
+ "Gamma": "Gamma",
145
+ "Invert": "Inverti",
146
+ "Apply": "Applica",
147
+ "Back": "Indietro",
148
+ "Insert date\/time": "Inserisci Data\/Ora",
149
+ "Date\/time": "Data\/Ora",
150
+ "Insert link": "Inserisci il Link",
151
+ "Insert\/edit link": "Inserisci\/Modifica Link",
152
+ "Text to display": "Testo da Visualizzare",
153
+ "Url": "Url",
154
+ "Target": "Target",
155
+ "None": "No",
156
+ "New window": "Nuova Finestra",
157
+ "Remove link": "Rimuovi link",
158
+ "Anchors": "Anchors",
159
+ "Link": "Collegamento",
160
+ "Paste or type a link": "Incolla o digita un collegamento",
161
+ "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL inserito sembra essere un indirizzo email. Vuoi aggiungere il prefisso necessario mailto:?",
162
+ "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL inserito sembra essere un collegamento esterno. Vuoi aggiungere il prefisso necessario http:\/\/?",
163
+ "Link list": "Elenco link",
164
+ "Insert video": "Inserisci Video",
165
+ "Insert\/edit video": "Inserisci\/Modifica Video",
166
+ "Insert\/edit media": "Inserisci\/Modifica Media",
167
+ "Alternative source": "Alternativo",
168
+ "Poster": "Anteprima",
169
+ "Paste your embed code below:": "Incolla il codice d'incorporamento qui:",
170
+ "Embed": "Incorporare",
171
+ "Media": "Media",
172
+ "Nonbreaking space": "Spazio unificatore",
173
+ "Page break": "Interruzione di pagina",
174
+ "Paste as text": "incolla come testo",
175
+ "Preview": "Anteprima",
176
+ "Print": "Stampa",
177
+ "Save": "Salva",
178
+ "Find": "Trova",
179
+ "Replace with": "Sostituisci Con",
180
+ "Replace": "Sostituisci",
181
+ "Replace all": "Sostituisci Tutto",
182
+ "Prev": "Precedente",
183
+ "Next": "Successivo",
184
+ "Find and replace": "Trova e Sostituisci",
185
+ "Could not find the specified string.": "Impossibile trovare la parola specifica.",
186
+ "Match case": "Maiuscole\/Minuscole ",
187
+ "Whole words": "Parole Sbagliate",
188
+ "Spellcheck": "Controllo ortografico",
189
+ "Ignore": "Ignora",
190
+ "Ignore all": "Ignora Tutto",
191
+ "Finish": "Termina",
192
+ "Add to Dictionary": "Aggiungi al Dizionario",
193
+ "Insert table": "Inserisci Tabella",
194
+ "Table properties": "Propiet\u00e0 della Tabella",
195
+ "Delete table": "Cancella Tabella",
196
+ "Cell": "Cella",
197
+ "Row": "Riga",
198
+ "Column": "Colonna",
199
+ "Cell properties": "Propiet\u00e0 della Cella",
200
+ "Merge cells": "Unisci Cella",
201
+ "Split cell": "Dividi Cella",
202
+ "Insert row before": "Inserisci una Riga Prima",
203
+ "Insert row after": "Inserisci una Riga Dopo",
204
+ "Delete row": "Cancella Riga",
205
+ "Row properties": "Propriet\u00e0 della Riga",
206
+ "Cut row": "Taglia Riga",
207
+ "Copy row": "Copia Riga",
208
+ "Paste row before": "Incolla una Riga Prima",
209
+ "Paste row after": "Incolla una Riga Dopo",
210
+ "Insert column before": "Inserisci una Colonna Prima",
211
+ "Insert column after": "Inserisci una Colonna Dopo",
212
+ "Delete column": "Cancella Colonna",
213
+ "Cols": "Colonne",
214
+ "Rows": "Righe",
215
+ "Width": "Larghezza",
216
+ "Height": "Altezza",
217
+ "Cell spacing": "Spaziatura della Cella",
218
+ "Cell padding": "Padding della Cella",
219
+ "Caption": "Didascalia",
220
+ "Left": "Sinistra",
221
+ "Center": "Centro",
222
+ "Right": "Destra",
223
+ "Cell type": "Tipo di Cella",
224
+ "Scope": "Campo",
225
+ "Alignment": "Allineamento",
226
+ "H Align": "Allineamento H",
227
+ "V Align": "Allineamento V",
228
+ "Top": "In alto",
229
+ "Middle": "In mezzo",
230
+ "Bottom": "In fondo",
231
+ "Header cell": "cella d'intestazione",
232
+ "Row group": "Gruppo di Righe",
233
+ "Column group": "Gruppo di Colonne",
234
+ "Row type": "Tipo di Riga",
235
+ "Header": "Header",
236
+ "Body": "Body",
237
+ "Footer": "Footer",
238
+ "Border color": "Colore bordo",
239
+ "Insert template": "Inserisci Template",
240
+ "Templates": "Template",
241
+ "Template": "Modello",
242
+ "Text color": "Colore Testo",
243
+ "Background color": "Colore Background",
244
+ "Custom...": "Personalizzato...",
245
+ "Custom color": "Colore personalizzato",
246
+ "No color": "Nessun colore",
247
+ "Table of Contents": "Tabella dei contenuti",
248
+ "Show blocks": "Mostra Blocchi",
249
+ "Show invisible characters": "Mostra Caratteri Invisibili",
250
+ "Words: {0}": "Parole: {0}",
251
+ "{0} words": "{0} parole",
252
+ "File": "File",
253
+ "Edit": "Modifica",
254
+ "Insert": "Inserisci",
255
+ "View": "Visualiza",
256
+ "Format": "Formato",
257
+ "Table": "Tabella",
258
+ "Tools": "Strumenti",
259
+ "Powered by {0}": "Fornito da {0}",
260
+ "Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Premi ALT-F9 per il men\u00f9. Premi ALT-F10 per la barra degli strumenti. Premi ALT-0 per l'aiuto."
261
+ });
@@ -0,0 +1 @@
1
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(e){return!1!==e.settings.image_dimensions},i=function(e){return!0===e.settings.image_advtab},g=function(e){return e.getParam("image_prepend_url","")},n=function(e){return e.getParam("image_class_list")},r=function(e){return!1!==e.settings.image_description},a=function(e){return!0===e.settings.image_title},o=function(e){return!0===e.settings.image_caption},l=function(e){return e.getParam("image_list",!1)},u=function(e){return e.getParam("images_upload_url",!1)},c=function(e){return e.getParam("images_upload_handler",!1)},s=function(e){return e.getParam("images_upload_url")},m=function(e){return e.getParam("images_upload_handler")},f=function(e){return e.getParam("images_upload_base_path")},p=function(e){return e.getParam("images_upload_credentials")},h="undefined"!=typeof window?window:Function("return this;")(),v=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:h,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},t={getOrDie:function(e,t){var n=v(e,t);if(n===undefined||null===n)throw e+" not available on this browser";return n}};function b(){return new(t.getOrDie("FileReader"))}var y,x=tinymce.util.Tools.resolve("tinymce.util.Promise"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),C=tinymce.util.Tools.resolve("tinymce.util.XHR"),S=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},N=function(e,n){var r=document.createElement("img");function t(e,t){r.parentNode&&r.parentNode.removeChild(r),n({width:e,height:t})}r.onload=function(){t(S(r.width,r.clientWidth),S(r.height,r.clientHeight))},r.onerror=function(){t(0,0)};var a=r.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left="0px",a.width=a.height="auto",document.body.appendChild(r),r.src=e},_=function(e,a,t){return function n(e,r){return r=r||[],w.each(e,function(e){var t={text:e.text||e.title};e.menu?t.menu=n(e.menu):(t.value=e.value,a(t)),r.push(t)}),r}(e,t||[])},A=function(e){return e&&(e=e.replace(/px$/,"")),e},T=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},R=function(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},I=function(e,t){var n=l(e);"string"==typeof n?C.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeof n?n(t):t(n)},O=function(e,t,n){function r(){n.onload=n.onerror=null,e.selection&&(e.selection.select(n),e.nodeChanged())}n.onload=function(){t.width||t.height||!d(e)||e.dom.setAttribs(n,{width:n.clientWidth,height:n.clientHeight}),r()},n.onerror=r},L=function(r){return new x(function(e,t){var n=new b;n.onload=function(){e(n.result)},n.onerror=function(){t(b.error.message)},n.readAsDataURL(r)})},P=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),U=Object.prototype.hasOwnProperty,E=(y=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var a=e[r];for(var o in a)U.call(a,o)&&(n[o]=y(n[o],a[o]))}return n}),k=P.DOM,M=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?A(e.style.marginLeft):""},D=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?A(e.style.marginTop):""},z=function(e){return e.style.borderWidth?A(e.style.borderWidth):""},B=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},H=function(e,t){return e.style[t]?e.style[t]:""},j=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},F=function(e,t,n){e.setAttribute(t,n)},W=function(e){var t,n,r,a;j(e)?(a=(r=e).parentNode,k.insertAfter(r,a),k.remove(a)):(t=e,n=k.create("figure",{"class":"image"}),k.insertAfter(n,t),n.appendChild(t),n.appendChild(k.create("figcaption",{contentEditable:!0},"Caption")),n.contentEditable="false")},J=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},V=function(e,r){return function(e,t,n){e.style[t]?(e.style[t]=T(n),J(e,r)):F(e,t,n)}},G=function(e,t){return e.style[t]?A(e.style[t]):B(e,t)},$=function(e,t){var n=T(t);e.style.marginLeft=n,e.style.marginRight=n},X=function(e,t){var n=T(t);e.style.marginTop=n,e.style.marginBottom=n},q=function(e,t){var n=T(t);e.style.borderWidth=n},K=function(e,t){e.style.borderStyle=t},Q=function(e){return"FIGURE"===e.nodeName},Y=function(e,t){var n=document.createElement("img");return F(n,"style",t.style),(M(n)||""!==t.hspace)&&$(n,t.hspace),(D(n)||""!==t.vspace)&&X(n,t.vspace),(z(n)||""!==t.border)&&q(n,t.border),(H(n,"borderStyle")||""!==t.borderStyle)&&K(n,t.borderStyle),e(n.getAttribute("style"))},Z=function(e,t){return{src:B(t,"src"),alt:B(t,"alt"),title:B(t,"title"),width:G(t,"width"),height:G(t,"height"),"class":B(t,"class"),style:e(B(t,"style")),caption:j(t),hspace:M(t),vspace:D(t),border:z(t),borderStyle:H(t,"borderStyle")}},ee=function(e,t,n,r,a){n[r]!==t[r]&&a(e,r,n[r])},te=function(r,a){return function(e,t,n){r(e,n),J(e,a)}},ne=function(e,t,n){var r=Z(e,n);ee(n,r,t,"caption",function(e,t,n){return W(e)}),ee(n,r,t,"src",F),ee(n,r,t,"alt",F),ee(n,r,t,"title",F),ee(n,r,t,"width",V(0,e)),ee(n,r,t,"height",V(0,e)),ee(n,r,t,"class",F),ee(n,r,t,"style",te(function(e,t){return F(e,"style",t)},e)),ee(n,r,t,"hspace",te($,e)),ee(n,r,t,"vspace",te(X,e)),ee(n,r,t,"border",te(q,e)),ee(n,r,t,"borderStyle",te(K,e))},re=function(e,t){var n=e.dom.styles.parse(t),r=R(n),a=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(a)},ae=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||t.getAttribute("data-mce-object")||t.getAttribute("data-mce-placeholder"))?null:t},oe=function(t,e){var n=t.dom,r=n.getParent(e.parentNode,function(e){return t.schema.getTextBlockElements()[e.nodeName]});return r?n.split(r,e):e},ie=function(t){var e=ae(t);return e?Z(function(e){return re(t,e)},e):{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""}},le=function(t,e){var n=function(e,t){var n=document.createElement("img");if(ne(e,E(t,{caption:!1}),n),F(n,"alt",t.alt),t.caption){var r=k.create("figure",{"class":"image"});return r.appendChild(n),r.appendChild(k.create("figcaption",{contentEditable:!0},"Caption")),r.contentEditable="false",r}return n}(function(e){return re(t,e)},e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),Q(r)){var a=oe(t,r);t.selection.select(a)}else t.selection.select(r)},ue=function(e,t){var n=ae(e);n?t.src?function(t,e){var n,r=ae(t);if(ne(function(e){return re(t,e)},e,r),n=r,t.dom.setAttrib(n,"src",n.getAttribute("src")),Q(r.parentNode)){var a=r.parentNode;oe(t,a),t.selection.select(r.parentNode)}else t.selection.select(r),O(t,e,r)}(e,t):function(e,t){if(t){var n=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(n),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}}(e,n):t.src&&le(e,t)},ce=function(n,r){r.find("#style").each(function(e){var t=Y(function(e){return re(n,e)},E({src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""},r.toJSON()));e.value(t)})},se=function(t){return{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:(o=t,function(e){var t=o.dom,n=e.control.rootControl;if(i(o)){var r=n.toJSON(),a=t.parseStyle(r.style);n.find("#vspace").value(""),n.find("#hspace").value(""),((a=R(a))["margin-top"]&&a["margin-bottom"]||a["margin-right"]&&a["margin-left"])&&(a["margin-top"]===a["margin-bottom"]?n.find("#vspace").value(A(a["margin-top"])):n.find("#vspace").value(""),a["margin-right"]===a["margin-left"]?n.find("#hspace").value(A(a["margin-right"])):n.find("#hspace").value("")),a["border-width"]?n.find("#border").value(A(a["border-width"])):n.find("#border").value(""),a["border-style"]?n.find("#borderStyle").value(a["border-style"]):n.find("#borderStyle").value(""),n.find("#style").value(t.serializeStyle(t.parseStyle(t.serializeStyle(a))))}})},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,defaults:{type:"textbox",maxWidth:50,onchange:function(e){ce(t,e.control.rootControl)}},items:[{label:"Vertical space",name:"vspace"},{label:"Border width",name:"border"},{label:"Horizontal space",name:"hspace"},{label:"Border style",type:"listbox",name:"borderStyle",width:90,maxWidth:90,onselect:function(e){ce(t,e.control.rootControl)},values:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]};var o},de=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},ge=function(e,t){var n=e.find("#width")[0],r=e.find("#height")[0],a=e.find("#constrain")[0];n&&r&&a&&t(n,r,a.checked())},me=function(e,t,n){var r=e.state.get("oldVal"),a=t.state.get("oldVal"),o=e.value(),i=t.value();n&&r&&a&&o&&i&&(o!==r?(i=Math.round(o/r*i),isNaN(i)||t.value(i)):(o=Math.round(i/a*o),isNaN(o)||e.value(o))),de(e,t)},fe=function(e){ge(e,me)},pe=function(){var e=function(e){fe(e.control.rootControl)};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},he=function(e){ge(e,de)},ve=fe,be=function(e){e.meta=e.control.rootControl.toJSON()},ye=function(s,e){var t=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:function(e){var t,n,r,a,o,i,l,u,c;n=s,i=(t=e).meta||{},l=t.control,u=l.rootControl,(c=u.find("#image-list")[0])&&c.value(n.convertURL(l.value(),"src")),w.each(i,function(e,t){u.find("#"+t).value(e)}),i.width||i.height||(r=n.convertURL(l.value(),"src"),a=g(n),o=new RegExp("^(?:[a-z]+:)?//","i"),a&&!o.test(r)&&r.substring(0,a.length)!==a&&(r=a+r),l.value(r),N(n.documentBaseURI.toAbsolute(l.value()),function(e){e.width&&e.height&&d(n)&&(u.find("#width").value(e.width),u.find("#height").value(e.height),he(u))}))},onbeforecall:be},e];return r(s)&&t.push({name:"alt",type:"textbox",label:"Image description"}),a(s)&&t.push({name:"title",type:"textbox",label:"Image Title"}),d(s)&&t.push(pe()),n(s)&&t.push({name:"class",type:"listbox",label:"Class",values:_(n(s),function(e){e.value&&(e.textStyle=function(){return s.formatter.getCssText({inline:"img",classes:[e.value]})})})}),o(s)&&t.push({name:"caption",type:"checkbox",label:"Caption"}),t},xe=function(e,t){return{title:"General",type:"form",items:ye(e,t)}},we=ye,Ce=function(){return t.getOrDie("URL")},Se=function(e){return Ce().createObjectURL(e)},Ne=function(e){Ce().revokeObjectURL(e)},_e=tinymce.util.Tools.resolve("tinymce.ui.Factory");function Ae(){return new(t.getOrDie("XMLHttpRequest"))}var Te=function(){};function Re(i){var t=function(e,r,a,t){var o,n;(o=new Ae).open("POST",i.url),o.withCredentials=i.credentials,o.upload.onprogress=function(e){t(e.loaded/e.total*100)},o.onerror=function(){a("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){var e,t,n;o.status<200||300<=o.status?a("HTTP Error: "+o.status):(e=JSON.parse(o.responseText))&&"string"==typeof e.location?r((t=i.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):a("Invalid JSON: "+o.responseText)},(n=new FormData).append("file",e.blob(),e.filename()),o.send(n)};return i=w.extend({credentials:!1,handler:t},i),{upload:function(e){return i.url||i.handler!==t?(r=e,a=i.handler,new x(function(e,t){try{a(r,e,t,Te)}catch(n){t(n.message)}})):x.reject("Upload url missing from the settings.");var r,a}}}var Ie=function(u){return function(e){var t=_e.get("Throbber"),n=e.control.rootControl,r=new t(n.getEl()),a=e.control.value(),o=Se(a),i=Re({url:s(u),basePath:f(u),credentials:p(u),handler:m(u)}),l=function(){r.hide(),Ne(o)};return r.show(),L(a).then(function(e){var t=u.editorUpload.blobCache.create({blob:a,blobUri:o,name:a.name?a.name.replace(/\.[^\.]+$/,""):null,base64:e.split(",")[1]});return i.upload(t).then(function(e){var t=n.find("#src");return t.value(e),n.find("tabpanel")[0].activateTab(0),t.fire("change"),l(),e})})["catch"](function(e){u.windowManager.alert(e),l()})}},Oe=".jpg,.jpeg,.png,.gif",Le=function(e){return{title:"Upload",type:"form",layout:"flex",direction:"column",align:"stretch",padding:"20 20 20 20",items:[{type:"container",layout:"flex",direction:"column",align:"center",spacing:10,items:[{text:"Browse for an image",type:"browsebutton",accept:Oe,onchange:Ie(e)},{text:"OR",type:"label"}]},{text:"Drop an image here",type:"dropzone",accept:Oe,height:100,onchange:Ie(e)}]}},Pe=function(o){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var i=new Array(arguments.length-1),n=1;n<arguments.length;n++)i[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var a=i.concat(n);return o.apply(null,a)}},Ue=function(t,e){var n=e.control.getRoot();ve(n),t.undoManager.transact(function(){var e=E(ie(t),n.toJSON());ue(t,e)}),t.editorUpload.uploadImagesAuto()};function Ee(o){function e(e){var n,t,r=ie(o);if(e&&(t={type:"listbox",label:"Image list",name:"image-list",values:_(e,function(e){e.value=o.convertURL(e.value||e.url,"src")},[{text:"None",value:""}]),value:r.src&&o.convertURL(r.src,"src"),onselect:function(e){var t=n.find("#alt");(!t.value()||e.lastControl&&t.value()===e.lastControl.text())&&t.value(e.control.text()),n.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){t=this}}),i(o)||u(o)||c(o)){var a=[xe(o,t)];i(o)&&a.push(se(o)),(u(o)||c(o))&&a.push(Le(o)),n=o.windowManager.open({title:"Insert/edit image",data:r,bodyType:"tabpanel",body:a,onSubmit:Pe(Ue,o)})}else n=o.windowManager.open({title:"Insert/edit image",data:r,body:we(o,t),onSubmit:Pe(Ue,o)});he(n)}return{open:function(){I(o,e)}}}var ke=function(e){e.addCommand("mceImage",Ee(e).open)},Me=function(o){return function(e){for(var t,n,r=e.length,a=function(e){e.attr("contenteditable",o?"true":null)};r--;)t=e[r],(n=t.attr("class"))&&/\bimage\b/.test(n)&&(t.attr("contenteditable",o?"false":null),w.each(t.getAll("figcaption"),a))}},De=function(e){e.on("preInit",function(){e.parser.addNodeFilter("figure",Me(!0)),e.serializer.addNodeFilter("figure",Me(!1))})},ze=function(e){e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:Ee(e).open,stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),e.addMenuItem("image",{icon:"image",text:"Image",onclick:Ee(e).open,context:"insert",prependToContext:!0})};e.add("image",function(e){De(e),ze(e),ke(e)})}();
@@ -0,0 +1,7 @@
1
+ //= require elfinder/css/elfinder.min
2
+ //= require elfinder/css/theme
3
+
4
+
5
+
6
+
7
+
@@ -0,0 +1,5 @@
1
+ /*
2
+ *= require jquery-ui
3
+ *= require elFinder
4
+ */
5
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-custom-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Baccanelli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-12-18 00:00:00.000000000 Z
12
+ date: 2019-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: alchemy_cms
@@ -162,6 +162,10 @@ files:
162
162
  - lib/alchemy/custom/model/version.rb
163
163
  - lib/alchemy/touching_decorator.rb
164
164
  - lib/tasks/alchemy_custom_model_tasks.rake
165
+ - vendor/assets/javascripts/tinymce/langs/it.js
166
+ - vendor/assets/javascripts/tinymce/plugins/image/plugin.min.js
167
+ - vendor/assets/stylesheets/elFinder.scss
168
+ - vendor/assets/stylesheets/vendor.css.scss
165
169
  - vendor/elfinder/css/elfinder.full.css
166
170
  - vendor/elfinder/css/elfinder.min.css
167
171
  - vendor/elfinder/css/theme.css