locomotive-aloha-rails 0.20.1.2 → 0.20.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/aloha/rails/version.rb +2 -2
- data/vendor/assets/javascripts/aloha/css/aloha.css +3 -0
- data/vendor/assets/javascripts/aloha/css/ext-aloha.css +3 -0
- data/vendor/assets/javascripts/aloha/lib/aloha-bootstrap.js +4565 -3934
- data/vendor/assets/javascripts/aloha/lib/aloha.js +1357 -702
- data/vendor/assets/javascripts/aloha/lib/aloha/command.js +16 -13
- data/vendor/assets/javascripts/aloha/lib/aloha/core.js +23 -3
- data/vendor/assets/javascripts/aloha/lib/aloha/ecma5shims.js +23 -7
- data/vendor/assets/javascripts/aloha/lib/aloha/editable.js +57 -14
- data/vendor/assets/javascripts/aloha/lib/aloha/engine.js +9 -5
- data/vendor/assets/javascripts/aloha/lib/aloha/floatingmenu.js +288 -96
- data/vendor/assets/javascripts/aloha/lib/aloha/jquery.js +11 -1
- data/vendor/assets/javascripts/aloha/lib/aloha/markup.js +318 -40
- data/vendor/assets/javascripts/aloha/lib/aloha/repositorymanager.js +11 -10
- data/vendor/assets/javascripts/aloha/lib/aloha/selection.js +20 -1
- data/vendor/assets/javascripts/aloha/lib/aloha/sidebar.js +11 -1
- data/vendor/assets/javascripts/aloha/lib/jquery-plugin.js +10 -7
- data/vendor/assets/javascripts/aloha/lib/util/dom.js +18 -6
- data/vendor/assets/javascripts/aloha/lib/util/range.js +6 -6
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/ext-all-debug.js +26 -2
- data/vendor/assets/javascripts/aloha/lib/vendor/jquery.store.js +39 -15
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/lib/abbr-plugin.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/lib/align-plugin.js +344 -334
- data/vendor/assets/javascripts/aloha/plugins/common/block/css/block.css +65 -12
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block-plugin.js +12 -15
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block.js +796 -180
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockcontenthandler.js +54 -13
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockmanager.js +315 -78
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editor.js +111 -8
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editormanager.js +2 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/jquery-ui-1.8.16.custom.min.js +198 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/sidebarattributeeditor.js +7 -20
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/lib/characterpicker-plugin.js +15 -3
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/sanitizecontenthandler.js +3 -2
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/wordcontenthandler.js +111 -5
- data/vendor/assets/javascripts/aloha/plugins/common/dom-to-xhtml/lib/dom-to-xhtml-plugin.js +29 -0
- data/vendor/assets/javascripts/aloha/plugins/common/dom-to-xhtml/lib/dom-to-xhtml.js +306 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/lib/format-plugin.js +59 -5
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/i18n.js +1 -1
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/lib/horizontalruler-plugin.js +18 -3
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/crop-buttons.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-plugin.js +1629 -1601
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.css +11 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/extra/linklist.js +8 -6
- data/vendor/assets/javascripts/aloha/plugins/common/link/lib/link-plugin.js +26 -10
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/de/i18n.js +5 -1
- data/vendor/assets/javascripts/aloha/plugins/common/paste/lib/paste-plugin.js +3 -4
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-cell.js +13 -12
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin.js +108 -61
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-selection.js +61 -1
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/de/i18n.js +28 -1
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/i18n.js +36 -10
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/browser.jqgrid.css +292 -292
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/browser.js +28 -5
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/locale.js +2 -2
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/grid.locale.de.js +6 -1
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/grid.locale.en.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.jqGrid.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.jstree.js +6 -1
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.ui.js +6 -1
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/ui-layout.js +6 -1
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/lib/cite-plugin.js +18 -4
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesspaste-plugin.js +1 -1
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/lib/linkbrowser-plugin.js +14 -2
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/demo/js/aloha-config.js +2 -2
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/lib/toc-plugin.js +382 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/de/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/i18n.js +4 -0
- metadata +15 -11
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/i18n/de.json +0 -1
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/i18n/en.json +0 -1
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/src/toc.js +0 -350
@@ -25,7 +25,7 @@ function(Aloha, Plugin, jQuery, FloatingMenu, i18n, i18nCore) {
|
|
25
25
|
/**
|
26
26
|
* default button configuration
|
27
27
|
*/
|
28
|
-
config: [ 'strong', 'em', 'b', 'i','
|
28
|
+
config: [ 'strong', 'em', 'b', 'i','s','sub','sup', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pre', 'removeFormat'],
|
29
29
|
|
30
30
|
/**
|
31
31
|
* Initialize the plugin and set initialize flag on true
|
@@ -38,7 +38,6 @@ function(Aloha, Plugin, jQuery, FloatingMenu, i18n, i18nCore) {
|
|
38
38
|
|
39
39
|
// apply specific configuration if an editable has been activated
|
40
40
|
Aloha.bind('aloha-editable-activated',function (e, params) {
|
41
|
-
//debugger;
|
42
41
|
me.applyButtonConfig(params.editable.obj);
|
43
42
|
});
|
44
43
|
|
@@ -60,7 +59,6 @@ function(Aloha, Plugin, jQuery, FloatingMenu, i18n, i18nCore) {
|
|
60
59
|
|
61
60
|
var config = this.getEditableConfig(obj),
|
62
61
|
button, i, len;
|
63
|
-
|
64
62
|
// now iterate all buttons and show/hide them according to the config
|
65
63
|
for ( button in this.buttons) {
|
66
64
|
if (jQuery.inArray(button, config) != -1) {
|
@@ -102,6 +100,7 @@ function(Aloha, Plugin, jQuery, FloatingMenu, i18n, i18nCore) {
|
|
102
100
|
jQuery.each(this.config, function(j, button) {
|
103
101
|
switch( button ) {
|
104
102
|
// text level semantics:
|
103
|
+
case 'u':
|
105
104
|
case 'em':
|
106
105
|
case 'strong':
|
107
106
|
case 'b':
|
@@ -111,6 +110,7 @@ function(Aloha, Plugin, jQuery, FloatingMenu, i18n, i18nCore) {
|
|
111
110
|
case 'code':
|
112
111
|
case 'abbr':
|
113
112
|
case 'del':
|
113
|
+
case 's':
|
114
114
|
case 'sub':
|
115
115
|
case 'sup':
|
116
116
|
that.buttons[button] = {'button' : new Aloha.ui.Button({
|
@@ -121,14 +121,41 @@ function(Aloha, Plugin, jQuery, FloatingMenu, i18n, i18nCore) {
|
|
121
121
|
var
|
122
122
|
markup = jQuery('<'+button+'></'+button+'>'),
|
123
123
|
rangeObject = Aloha.Selection.rangeObject,
|
124
|
-
foundMarkup
|
124
|
+
foundMarkup,
|
125
|
+
selectedCells = jQuery('.aloha-cell-selected');
|
126
|
+
|
127
|
+
// formating workaround for table plugin
|
128
|
+
if ( selectedCells.length > 0 ) {
|
129
|
+
var cellMarkupCounter = 0;
|
130
|
+
selectedCells.each( function () {
|
131
|
+
var cellContent = jQuery(this).find('div'),
|
132
|
+
cellMarkup = cellContent.find(button);
|
133
|
+
|
134
|
+
if ( cellMarkup.length > 0 ) {
|
135
|
+
// unwrap all found markup text
|
136
|
+
// <td><b>text</b> foo <b>bar</b></td>
|
137
|
+
// and wrap the whole contents of the <td> into <b> tags
|
138
|
+
// <td><b>text foo bar</b></td>
|
139
|
+
cellMarkup.contents().unwrap();
|
140
|
+
cellMarkupCounter++;
|
141
|
+
}
|
142
|
+
cellContent.contents().wrap('<'+button+'></'+button+'>');
|
143
|
+
});
|
144
|
+
|
145
|
+
// remove all markup if all cells have markup
|
146
|
+
if ( cellMarkupCounter == selectedCells.length ) {
|
147
|
+
selectedCells.find(button).contents().unwrap();
|
148
|
+
}
|
149
|
+
return false;
|
150
|
+
}
|
151
|
+
// formating workaround for table plugin
|
125
152
|
|
126
153
|
// check whether the markup is found in the range (at the start of the range)
|
127
154
|
foundMarkup = rangeObject.findMarkup(function() {
|
128
155
|
return this.nodeName.toLowerCase() == markup.get(0).nodeName.toLowerCase();
|
129
156
|
}, Aloha.activeEditable.obj);
|
130
157
|
|
131
|
-
if (foundMarkup) {
|
158
|
+
if ( foundMarkup ) {
|
132
159
|
// remove the markup
|
133
160
|
if (rangeObject.isCollapsed()) {
|
134
161
|
// when the range is collapsed, we remove exactly the one DOM element
|
@@ -176,6 +203,33 @@ function(Aloha, Plugin, jQuery, FloatingMenu, i18n, i18nCore) {
|
|
176
203
|
'iconClass' : 'aloha-button ' + i18n.t('aloha-button-' + button),
|
177
204
|
'markup' : jQuery('<'+button+'></'+button+'>'),
|
178
205
|
'click' : function() {
|
206
|
+
var selectedCells = jQuery('.aloha-cell-selected');
|
207
|
+
// formating workaround for table plugin
|
208
|
+
if ( selectedCells.length > 0 ) {
|
209
|
+
var cellMarkupCounter = 0;
|
210
|
+
selectedCells.each( function () {
|
211
|
+
var cellContent = jQuery(this).find('div'),
|
212
|
+
cellMarkup = cellContent.find(button);
|
213
|
+
|
214
|
+
if ( cellMarkup.length > 0 ) {
|
215
|
+
// unwrap all found markup text
|
216
|
+
// <td><b>text</b> foo <b>bar</b></td>
|
217
|
+
// and wrap the whole contents of the <td> into <b> tags
|
218
|
+
// <td><b>text foo bar</b></td>
|
219
|
+
cellMarkup.contents().unwrap();
|
220
|
+
cellMarkupCounter++;
|
221
|
+
}
|
222
|
+
cellContent.contents().wrap('<'+button+'></'+button+'>');
|
223
|
+
});
|
224
|
+
|
225
|
+
// remove all markup if all cells have markup
|
226
|
+
if ( cellMarkupCounter == selectedCells.length ) {
|
227
|
+
selectedCells.find(button).contents().unwrap();
|
228
|
+
}
|
229
|
+
return false;
|
230
|
+
}
|
231
|
+
// formating workaround for table plugin
|
232
|
+
|
179
233
|
Aloha.Selection.changeMarkupOnSelection(jQuery('<' + button + '></' + button + '>'));
|
180
234
|
}
|
181
235
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
define({
|
2
|
-
root: {"button.strong.tooltip":"Strong","button.em.tooltip":"Emphasize","button.b.tooltip":"Bold","button.i.tooltip":"Italic","button.u.tooltip":"Underline","button.cite.tooltip":"Cite","button.q.tooltip":"","button.code.tooltip":"Code","button.abbr.tooltip":"Abbreviation","button.
|
2
|
+
root: {"button.strong.tooltip":"Strong","button.em.tooltip":"Emphasize","button.b.tooltip":"Bold","button.i.tooltip":"Italic","button.u.tooltip":"Underline","button.cite.tooltip":"Cite","button.q.tooltip":"","button.code.tooltip":"Code","button.abbr.tooltip":"Abbreviation","button.s.tooltip":"Strikethrough","button.del.tooltip":"Deleted","button.sub.tooltip":"Subscript","button.sup.tooltip":"Superscript","button.p.tooltip":"Paragraph","button.h1.tooltip":"Heading 1","button.h2.tooltip":"Heading 2","button.h3.tooltip":"Heading 3","button.h4.tooltip":"Heading 4","button.h5.tooltip":"Heading 5","button.h6.tooltip":"Heading 6","button.pre.tooltip":"Pre formated text","button.title.tooltip":"Title","button.removeFormat.tooltip":"Remove formatting","button.removeFormat.text":"Remove formatting","GENTICS_button_p":"GENTICS_button_p","GENTICS_button_h1":"GENTICS_button_h1","GENTICS_button_h2":"GENTICS_button_h2","GENTICS_button_h3":"GENTICS_button_h3","GENTICS_button_h4":"GENTICS_button_h4","GENTICS_button_h5":"GENTICS_button_h5","GENTICS_button_h6":"GENTICS_button_h6","GENTICS_button_pre":"GENTICS_button_pre","GENTICS_button_title":"GENTICS_button_title"}
|
3
3
|
, "de":true,
|
4
4
|
"eo":true,
|
5
5
|
"fi":true,
|
data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/lib/horizontalruler-plugin.js
CHANGED
@@ -17,9 +17,11 @@ function(Aloha, jQuery, Plugin, FloatingMenu, i18n, i18nCore) {
|
|
17
17
|
this._super('horizontalruler');
|
18
18
|
},
|
19
19
|
languages: ['en'],
|
20
|
+
config: ['hr'],
|
20
21
|
init: function() {
|
21
22
|
var that = this;
|
22
|
-
|
23
|
+
|
24
|
+
this.insertButton = new Aloha.ui.Button({
|
23
25
|
'name': 'hr',
|
24
26
|
'iconClass': 'aloha-button-horizontalruler',
|
25
27
|
'size': 'small',
|
@@ -29,11 +31,24 @@ function(Aloha, jQuery, Plugin, FloatingMenu, i18n, i18nCore) {
|
|
29
31
|
});
|
30
32
|
FloatingMenu.addButton(
|
31
33
|
'Aloha.continuoustext',
|
32
|
-
insertButton,
|
34
|
+
this.insertButton,
|
33
35
|
i18nCore.t('floatingmenu.tab.insert'),
|
34
36
|
1
|
35
37
|
);
|
36
|
-
|
38
|
+
|
39
|
+
Aloha.bind( 'aloha-editable-activated', function ( event, rangeObject ) {
|
40
|
+
if (Aloha.activeEditable) {
|
41
|
+
that.cfg = that.getEditableConfig( Aloha.activeEditable.obj );
|
42
|
+
|
43
|
+
if ( jQuery.inArray( 'hr', that.cfg ) != -1 ) {
|
44
|
+
that.insertButton.show();
|
45
|
+
} else {
|
46
|
+
that.insertButton.hide();
|
47
|
+
return;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
});
|
51
|
+
|
37
52
|
},
|
38
53
|
insertHR: function(character) {
|
39
54
|
var self = this;
|
@@ -1,1615 +1,1643 @@
|
|
1
1
|
/*
|
2
2
|
* Aloha Image Plugin - Allow image manipulation in Aloha Editor
|
3
|
-
*
|
3
|
+
*
|
4
4
|
* Author & Copyright (c) 2011 Gentics Software GmbH
|
5
5
|
* aloha-sales@gentics.com
|
6
|
-
* Contributors
|
6
|
+
* Contributors
|
7
7
|
* Johannes Schüth - http://jotschi.de
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
8
|
+
* Nicolas karageuzian - http://nka.me/
|
9
|
+
* Benjamin Athur Lupton - http://www.balupton.com/
|
10
|
+
* Thomas Lete
|
11
|
+
* Nils Dehl
|
12
|
+
* Christopher Hlubek
|
13
|
+
* Edward Tsech
|
14
|
+
* Haymo Meran
|
15
15
|
*
|
16
16
|
* Licensed under the terms of http://www.aloha-editor.com/license.html
|
17
17
|
*/
|
18
18
|
|
19
19
|
define([
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
20
|
+
// js
|
21
|
+
'aloha/jquery',
|
22
|
+
'aloha/plugin',
|
23
|
+
'aloha/floatingmenu',
|
24
|
+
'i18n!aloha/nls/i18n',
|
25
|
+
'i18n!image/nls/i18n',
|
26
|
+
'jquery-plugin!image/vendor/ui/jquery-ui-1.8.10.custom.min',
|
27
|
+
'jquery-plugin!image/vendor/jcrop/jquery.jcrop.min',
|
28
|
+
'jquery-plugin!image/vendor/mousewheel/mousewheel',
|
29
|
+
// css
|
30
|
+
'css!image/css/image.css',
|
31
|
+
'css!image/vendor/ui/ui-lightness/jquery-ui-1.8.10.cropnresize.css',
|
32
|
+
'css!image/vendor/jcrop/jquery.jcrop.css'
|
33
33
|
],
|
34
34
|
function AlohaImagePlugin ( aQuery, Plugin, FloatingMenu, i18nCore, i18n ) {
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
//
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
var jQuery = aQuery;
|
39
|
+
var $ = aQuery;
|
40
|
+
var GENTICS = window.GENTICS;
|
41
|
+
var Aloha = window.Aloha;
|
42
|
+
|
43
|
+
// Attributes manipulation utilities
|
44
|
+
// Aloha team may want to factorize, it could be useful for other plugins
|
45
|
+
// Prototypes
|
46
|
+
String.prototype.toInteger = String.prototype.toInteger || function() {
|
47
|
+
return parseInt(String(this).replace(/px$/,'')||0,10);
|
48
|
+
};
|
49
|
+
String.prototype.toFloat = String.prototype.toInteger || function() {
|
50
|
+
return parseFloat(String(this).replace(/px$/,'')||0,10);
|
51
|
+
};
|
52
|
+
Number.prototype.toInteger = Number.prototype.toInteger || String.prototype.toInteger;
|
53
|
+
Number.prototype.toFloat = Number.prototype.toFloat || String.prototype.toFloat;
|
54
|
+
|
55
|
+
// Insert jQuery Prototypes
|
56
|
+
jQuery.extend(true, jQuery.fn, {
|
57
|
+
increase: jQuery.fn.increase || function(attr) {
|
58
|
+
var obj = jQuery(this), value, newValue;
|
59
|
+
// Check
|
60
|
+
if ( !obj.length ) {
|
61
|
+
return obj;
|
62
|
+
}
|
63
|
+
// Calculate
|
64
|
+
value = obj.css(attr).toFloat();
|
65
|
+
newValue = Math.round((value||1)*1.2);
|
66
|
+
// Apply
|
67
|
+
if (value == newValue) { // when value is 2, won't increase
|
68
|
+
newValue++;
|
69
|
+
}
|
70
|
+
// Apply
|
71
|
+
obj.css(attr,newValue);
|
72
|
+
// Chain
|
73
|
+
return obj;
|
74
|
+
},
|
75
|
+
decrease: jQuery.fn.decrease || function(attr) {
|
76
|
+
var obj = jQuery(this), value, newValue;
|
77
|
+
// Check
|
78
|
+
if ( !obj.length ) {
|
79
|
+
return obj;
|
80
|
+
}
|
81
|
+
// Calculate
|
82
|
+
value = obj.css(attr).toFloat();
|
83
|
+
newValue = Math.round((value||0)*0.8);
|
84
|
+
// Apply
|
85
|
+
if (value == newValue && newValue >0) { // when value is 2, won't increase
|
86
|
+
newValue--;
|
87
|
+
}
|
88
|
+
obj.css(attr,newValue);
|
89
|
+
// Chain
|
90
|
+
return obj;
|
91
|
+
}
|
92
|
+
});
|
93
|
+
|
94
|
+
// Create and register Image Plugin
|
95
|
+
return Plugin.create('image', {
|
96
|
+
|
97
|
+
languages: ['en', 'fr', 'de', 'ru', 'cz'],
|
98
|
+
|
99
|
+
defaultSettings: {
|
100
|
+
'maxWidth': 1600,
|
101
|
+
'minWidth': 3,
|
102
|
+
'maxHeight': 1200,
|
103
|
+
'minHeight': 3,
|
104
|
+
// This setting will correct manually values that are out of bounds
|
105
|
+
'autoCorrectManualInput': true,
|
106
|
+
// This setting will define a fixed aspect ratio for all resize actions
|
107
|
+
'fixedAspectRatio' : false,
|
108
|
+
// When enabled this setting will order the plugin to automatically resize images to given bounds
|
109
|
+
'autoResize': false,
|
110
|
+
//Image manipulation options - ONLY in default config section
|
111
|
+
ui: {
|
112
|
+
oneTab : false, //Place all ui components within one tab
|
113
|
+
insert : true,
|
114
|
+
reset : true,
|
115
|
+
aspectRatioToggle: true, // Toggle button for the aspect ratio
|
116
|
+
align : true, // Menu elements to show/hide in menu
|
117
|
+
resize : true, // Resize buttons
|
118
|
+
meta : true,
|
119
|
+
margin : true,
|
120
|
+
crop : true,
|
121
|
+
resizable : true, // Resizable ui-drag image
|
122
|
+
handles : 'ne, se, sw, nw'
|
123
|
+
},
|
124
|
+
|
125
|
+
/**
|
126
|
+
* Crop callback is triggered after the user clicked accept to accept his crop
|
127
|
+
* @param image jquery image object reference
|
128
|
+
* @param props cropping properties
|
129
|
+
*/
|
130
|
+
onCropped: function ($image, props) {
|
131
|
+
Aloha.Log.info('Default onCropped invoked', $image, props);
|
132
|
+
},
|
133
|
+
|
134
|
+
/**
|
135
|
+
* Reset callback is triggered before the internal reset procedure is applied
|
136
|
+
* if this function returns true, then the reset has been handled by the callback
|
137
|
+
* which means that no other reset will be applied
|
138
|
+
* if false is returned the internal reset procedure will be applied
|
139
|
+
* @param image jquery image object reference
|
140
|
+
* @return true if a reset has been applied, false otherwise
|
141
|
+
*/
|
142
|
+
onReset: function ($image) {
|
143
|
+
Aloha.Log.info('Default onReset invoked', $image);
|
144
|
+
return false;
|
145
|
+
},
|
146
|
+
|
147
|
+
/**
|
148
|
+
* Example callback method which gets called while the resize process is beeing executed.
|
149
|
+
*/
|
150
|
+
onResize: function ($image) {
|
151
|
+
Aloha.Log.info('Default onResize invoked', $image);
|
152
|
+
},
|
153
|
+
|
154
|
+
/**
|
155
|
+
* Resize callback is triggered after the internal resize procedure is applied.
|
156
|
+
*/
|
157
|
+
onResized: function ($image) {
|
158
|
+
Aloha.Log.info('Default onResized invoked', $image);
|
159
|
+
}
|
160
|
+
},
|
161
|
+
|
162
|
+
/**
|
163
|
+
* Internal callback hook which gets invoked when cropping has been finished
|
164
|
+
*/
|
165
|
+
_onCropped: function ($image, props) {
|
166
|
+
$('#' + this.imgResizeHeightField.id).val($image.height());
|
167
|
+
$('#' + this.imgResizeWidthField.id).val($image.width());
|
168
|
+
|
169
|
+
|
170
|
+
$('body').trigger('aloha-image-cropped', [$image, props]);
|
171
|
+
|
172
|
+
// Call the custom onCropped function
|
173
|
+
this.onCropped($image, props);
|
174
|
+
},
|
175
|
+
|
176
|
+
/**
|
177
|
+
* Internal callback hook which gets invoked when resetting images
|
178
|
+
*/
|
179
|
+
_onReset: function ($image) {
|
180
|
+
|
181
|
+
$('#' + this.imgResizeHeightField.id).val($image.height());
|
182
|
+
$('#' + this.imgResizeWidthField.id).val($image.width());
|
183
|
+
|
184
|
+
// No default behaviour defined besides event triggering
|
185
|
+
$('body').trigger('aloha-image-reset', $image);
|
186
|
+
|
187
|
+
// Call the custom resize function
|
188
|
+
return this.onReset($image);
|
189
|
+
},
|
190
|
+
|
191
|
+
/**
|
192
|
+
* Internal callback hook which gets invoked while the image is beeing resized
|
193
|
+
*/
|
194
|
+
_onResize: function ($image) {
|
195
|
+
|
196
|
+
$('#' + this.imgResizeHeightField.id).val($image.height());
|
197
|
+
$('#' + this.imgResizeWidthField.id).val($image.width());
|
198
|
+
|
199
|
+
// No default behaviour defined besides event triggering
|
200
|
+
$('body').trigger('aloha-image-resize', $image);
|
201
|
+
|
202
|
+
// Call the custom resize function
|
203
|
+
this.onResize($image);
|
204
|
+
},
|
205
|
+
|
206
|
+
/**
|
207
|
+
* Internal callback hook which gets invoked when the current resizing action has stopped
|
208
|
+
*/
|
209
|
+
_onResized: function ($image) {
|
210
|
+
|
211
|
+
$('#' + this.imgResizeHeightField.id).val($image.height());
|
212
|
+
$('#' + this.imgResizeWidthField.id).val($image.width());
|
213
|
+
|
214
|
+
$('body').trigger('aloha-image-resized', $image);
|
215
|
+
|
216
|
+
// Call the custom resize function
|
217
|
+
this.onResized($image);
|
218
|
+
},
|
219
|
+
|
220
|
+
/**
|
221
|
+
* The image that is currently edited
|
222
|
+
*/
|
223
|
+
imageObj: null,
|
224
|
+
|
225
|
+
/**
|
226
|
+
* The Jcrop API reference
|
227
|
+
* this is needed to be able to destroy the cropping frame later on
|
228
|
+
* the variable is linked to the api object whilst cropping, or set to null otherwise
|
229
|
+
* strange, but done as documented http://deepliquid.com/content/Jcrop_API.html
|
230
|
+
*/
|
231
|
+
jcAPI: null,
|
232
|
+
|
233
|
+
|
234
|
+
/**
|
235
|
+
* State variable for the aspect ratio toggle feature
|
236
|
+
*/
|
237
|
+
keepAspectRatio: false,
|
238
|
+
|
239
|
+
/**
|
240
|
+
* Variable that will hold the start aspect ratio. This ratio will be used once starResize will be called.
|
241
|
+
*/
|
242
|
+
startAspectRatio: false,
|
243
|
+
|
244
|
+
/**
|
245
|
+
* This will contain an image's original properties to be able to undo previous settings
|
246
|
+
*
|
247
|
+
* when an image is clicked for the first time, a new object will be added to the array
|
248
|
+
* {
|
249
|
+
* obj : [the image object reference],
|
250
|
+
* src : [the original src url],
|
251
|
+
* width : [initial width],
|
252
|
+
* height : [initial height]
|
253
|
+
* }
|
254
|
+
*
|
255
|
+
* when an image is clicked the second time, the array will be checked for the image object
|
256
|
+
* referenct, to prevent for double entries
|
257
|
+
*/
|
258
|
+
restoreProps: [],
|
259
|
+
|
260
|
+
objectTypeFilter: [],
|
261
|
+
|
262
|
+
/**
|
263
|
+
* Plugin initialization method
|
264
|
+
*/
|
265
|
+
init: function() {
|
266
|
+
|
267
|
+
var that = this;
|
268
|
+
|
269
|
+
var imagePluginUrl = Aloha.getPluginUrl('image');
|
270
|
+
|
271
|
+
// Extend the default settings with the custom ones (done by default)
|
272
|
+
this.startAspectRatio = this.settings.fixedAspectRatio;
|
273
|
+
this.config = this.defaultSettings;
|
274
|
+
this.settings = jQuery.extend(true, this.defaultSettings, this.settings);
|
275
|
+
|
276
|
+
that.initializeButtons();
|
277
|
+
that.bindInteractions();
|
278
|
+
that.subscribeEvents();
|
279
|
+
|
280
|
+
},
|
281
|
+
|
282
|
+
/**
|
283
|
+
* Create buttons
|
284
|
+
*/
|
285
|
+
initializeButtons: function() {
|
286
|
+
|
287
|
+
var that = this,
|
288
|
+
tabInsert = i18nCore.t('floatingmenu.tab.insert'),
|
289
|
+
tabImage = i18n.t('floatingmenu.tab.img'),
|
290
|
+
tabFormatting = i18n.t('floatingmenu.tab.formatting'),
|
291
|
+
tabCrop = i18n.t('floatingmenu.tab.crop'),
|
292
|
+
tabResize = i18n.t('floatingmenu.tab.resize');
|
293
|
+
|
294
|
+
FloatingMenu.createScope(this.name, 'Aloha.empty');
|
295
|
+
|
296
|
+
if (this.settings.ui.insert) {
|
297
|
+
var tabId = this.settings.ui.oneTab ? tabImage : tabInsert;
|
298
|
+
that._addUIInsertButton(tabId);
|
299
|
+
}
|
300
|
+
|
301
|
+
if (this.settings.ui.meta) {
|
302
|
+
var tabId = this.settings.ui.oneTab ? tabImage : tabImage;
|
303
|
+
that._addUIMetaButtons(tabId);
|
304
|
+
}
|
305
|
+
|
306
|
+
if (this.settings.ui.reset) {
|
307
|
+
var tabId = this.settings.ui.reset ? tabImage : tabImage;
|
308
|
+
that._addUIResetButton(tabId);
|
309
|
+
}
|
310
|
+
|
311
|
+
if (this.settings.ui.align) {
|
312
|
+
var tabId = this.settings.ui.oneTab ? tabImage : tabFormatting;
|
313
|
+
that._addUIAlignButtons(tabId);
|
314
|
+
}
|
315
|
+
|
316
|
+
if (this.settings.ui.margin) {
|
317
|
+
var tabId = this.settings.ui.oneTab ? tabImage : tabFormatting;
|
318
|
+
that._addUIMarginButtons(tabId);
|
319
|
+
}
|
320
|
+
|
321
|
+
if (this.settings.ui.crop) {
|
322
|
+
var tabId = this.settings.ui.oneTab ? tabImage : tabCrop;
|
323
|
+
that._addUICropButtons(tabId);
|
324
|
+
}
|
325
|
+
|
326
|
+
if (this.settings.ui.resize) {
|
327
|
+
var tabId = this.settings.ui.oneTab ? tabImage : tabResize;
|
328
|
+
that._addUIResizeButtons(tabId);
|
329
|
+
}
|
330
|
+
|
331
|
+
if (this.settings.ui.aspectRatioToggle) {
|
332
|
+
var tabId = this.settings.ui.oneTab ? tabImage : tabResize;
|
333
|
+
that.__addUIAspectRatioToggleButton(tabId);
|
334
|
+
}
|
335
|
+
|
336
|
+
// TODO fix the function and reenable this button
|
337
|
+
//that._addNaturalSizeButton();
|
338
|
+
},
|
339
|
+
|
340
|
+
|
341
|
+
/**
|
342
|
+
* Adds the aspect ratio toggle button to the floating menu
|
343
|
+
*/
|
344
|
+
__addUIAspectRatioToggleButton: function(tabId) {
|
345
|
+
var that = this;
|
346
|
+
var toggleButton = new Aloha.ui.Button({
|
347
|
+
'size' : 'small',
|
348
|
+
'tooltip' : i18n.t('button.toggle.tooltip'),
|
349
|
+
'toggle' : true,
|
350
|
+
'iconClass' : 'cnr-ratio',
|
351
|
+
'onclick' : function (btn, event) {
|
352
|
+
that.toggleKeepAspectRatio();
|
353
|
+
}
|
354
|
+
});
|
355
|
+
|
356
|
+
|
357
|
+
// If the setting has been set to a number or false we need to activate the
|
358
|
+
// toggle button to indicate that the aspect ratio will be preserved.
|
359
|
+
if (this.settings.fixedAspectRatio != false) {
|
360
|
+
toggleButton.pressed = true;
|
361
|
+
this.keepAspectRatio = true;
|
362
|
+
}
|
363
|
+
|
364
|
+
FloatingMenu.addButton(
|
365
|
+
that.name,
|
366
|
+
toggleButton,
|
367
|
+
tabId,
|
368
|
+
20
|
369
|
+
);
|
370
|
+
|
371
|
+
|
372
|
+
},
|
373
|
+
|
374
|
+
|
375
|
+
/**
|
376
|
+
* Adds the reset button to the floating menu for the given tab
|
377
|
+
*/
|
378
|
+
_addUIResetButton: function(tabId) {
|
379
|
+
var that = this;
|
380
|
+
// Reset button
|
381
|
+
var resetButton = new Aloha.ui.Button({
|
382
|
+
'size' : 'small',
|
383
|
+
'tooltip' : i18n.t('Reset'),
|
384
|
+
'toggle' : false,
|
385
|
+
'iconClass' : 'cnr-reset',
|
386
|
+
'onclick' : function (btn, event) {
|
387
|
+
that.reset();
|
388
|
+
}
|
389
|
+
});
|
390
|
+
|
391
|
+
FloatingMenu.addButton(
|
392
|
+
that.name,
|
393
|
+
resetButton,
|
394
|
+
tabId,
|
395
|
+
2
|
396
|
+
);
|
397
|
+
},
|
398
|
+
|
399
|
+
/**
|
400
|
+
* Adds the insert button to the floating menu
|
401
|
+
*/
|
402
|
+
_addUIInsertButton: function(tabId) {
|
403
|
+
var that = this;
|
404
|
+
this.insertImgButton = new Aloha.ui.Button({
|
405
|
+
'name' : 'insertimage',
|
406
|
+
'iconClass': 'aloha-button aloha-image-insert',
|
407
|
+
'size' : 'small',
|
408
|
+
'onclick' : function () { that.insertImg(); },
|
409
|
+
'tooltip' : i18n.t('button.addimg.tooltip'),
|
410
|
+
'toggle' : false
|
411
|
+
});
|
412
|
+
|
413
|
+
FloatingMenu.addButton(
|
414
|
+
'Aloha.continuoustext',
|
415
|
+
this.insertImgButton,
|
416
|
+
tabId,
|
417
|
+
1
|
418
|
+
);
|
419
|
+
},
|
420
|
+
|
421
|
+
/**
|
422
|
+
* Adds the ui meta fields (search, title) to the floating menu.
|
423
|
+
*/
|
424
|
+
_addUIMetaButtons: function(tabId) {
|
425
|
+
var that = this;
|
426
|
+
var imgSrcLabel = new Aloha.ui.Button({
|
427
|
+
'label': i18n.t('field.img.src.label'),
|
428
|
+
'tooltip': i18n.t('field.img.src.tooltip'),
|
429
|
+
'size': 'small'
|
430
|
+
});
|
431
|
+
this.imgSrcField = new Aloha.ui.AttributeField({'name' : 'imgsrc'});
|
432
|
+
this.imgSrcField.setObjectTypeFilter( this.objectTypeFilter );
|
433
|
+
|
434
|
+
// add the title field for images
|
435
|
+
var imgTitleLabel = new Aloha.ui.Button({
|
436
|
+
'label': i18n.t('field.img.title.label'),
|
437
|
+
'tooltip': i18n.t('field.img.title.tooltip'),
|
438
|
+
'size': 'small'
|
439
|
+
});
|
440
|
+
|
441
|
+
this.imgTitleField = new Aloha.ui.AttributeField();
|
442
|
+
this.imgTitleField.setObjectTypeFilter();
|
443
|
+
FloatingMenu.addButton(
|
444
|
+
this.name,
|
445
|
+
this.imgSrcField,
|
446
|
+
tabId,
|
447
|
+
1
|
448
|
+
);
|
449
|
+
|
450
|
+
},
|
451
|
+
|
452
|
+
/**
|
453
|
+
* Adds the ui align buttons to the floating menu
|
454
|
+
*/
|
455
|
+
_addUIAlignButtons: function(tabId) {
|
456
|
+
var that = this;
|
457
|
+
|
458
|
+
var alignLeftButton = new Aloha.ui.Button({
|
459
|
+
'iconClass': 'aloha-img aloha-image-align-left',
|
460
|
+
'size': 'small',
|
461
|
+
'onclick' : function() {
|
462
|
+
var el = jQuery(that.findImgMarkup());
|
463
|
+
el.add(el.parent()).css('float', 'left');
|
464
|
+
},
|
465
|
+
'tooltip': i18n.t('button.img.align.left.tooltip')
|
466
|
+
});
|
467
|
+
|
468
|
+
FloatingMenu.addButton(
|
469
|
+
that.name,
|
470
|
+
alignLeftButton,
|
471
|
+
tabId,
|
472
|
+
1
|
473
|
+
);
|
474
|
+
|
475
|
+
var alignRightButton = new Aloha.ui.Button({
|
476
|
+
'iconClass': 'aloha-img aloha-image-align-right',
|
477
|
+
'size': 'small',
|
478
|
+
'onclick' : function() {
|
479
|
+
var el = jQuery(that.findImgMarkup());
|
480
|
+
el.add(el.parent()).css('float', 'right');
|
481
|
+
},
|
482
|
+
'tooltip': i18n.t('button.img.align.right.tooltip')
|
483
|
+
});
|
484
|
+
|
485
|
+
FloatingMenu.addButton(
|
486
|
+
that.name,
|
487
|
+
alignRightButton,
|
488
|
+
tabId,
|
489
|
+
1
|
490
|
+
);
|
491
|
+
|
492
|
+
var alignNoneButton = new Aloha.ui.Button({
|
493
|
+
'iconClass': 'aloha-img aloha-image-align-none',
|
494
|
+
'size': 'small',
|
495
|
+
'onclick' : function() {
|
496
|
+
var el = jQuery(that.findImgMarkup());
|
497
|
+
el.add(el.parent()).css({
|
498
|
+
'float': 'none',
|
499
|
+
display: 'inline-block'
|
500
|
+
});
|
501
|
+
},
|
502
|
+
'tooltip': i18n.t('button.img.align.none.tooltip')
|
503
|
+
});
|
504
|
+
|
505
|
+
FloatingMenu.addButton(
|
506
|
+
that.name,
|
507
|
+
alignNoneButton,
|
508
|
+
tabId,
|
509
|
+
1
|
510
|
+
);
|
511
|
+
|
512
|
+
},
|
513
|
+
|
514
|
+
/**
|
515
|
+
* Adds the ui margin buttons to the floating menu
|
516
|
+
*/
|
517
|
+
_addUIMarginButtons: function(tabId) {
|
518
|
+
var that = this;
|
519
|
+
var incPadding = new Aloha.ui.Button({
|
520
|
+
iconClass: 'aloha-img aloha-image-padding-increase',
|
521
|
+
toggle: false,
|
522
|
+
size: 'small',
|
523
|
+
onclick: function() {
|
524
|
+
jQuery(that.findImgMarkup()).increase('padding');
|
525
|
+
},
|
526
|
+
tooltip: i18n.t('padding.increase')
|
527
|
+
});
|
528
|
+
FloatingMenu.addButton(
|
529
|
+
that.name,
|
530
|
+
incPadding,
|
531
|
+
tabId,
|
532
|
+
2
|
533
|
+
);
|
534
|
+
|
535
|
+
var decPadding = new Aloha.ui.Button({
|
536
|
+
iconClass: 'aloha-img aloha-image-padding-decrease',
|
537
|
+
toggle: false,
|
538
|
+
size: 'small',
|
539
|
+
onclick: function() {
|
540
|
+
jQuery(that.findImgMarkup()).decrease('padding');
|
541
|
+
},
|
542
|
+
tooltip: i18n.t('padding.decrease')
|
543
|
+
});
|
544
|
+
FloatingMenu.addButton(
|
545
|
+
that.name,
|
546
|
+
decPadding,
|
547
|
+
tabId,
|
548
|
+
2
|
549
|
+
);
|
550
|
+
},
|
551
|
+
|
552
|
+
/**
|
553
|
+
* Adds the crop buttons to the floating menu
|
554
|
+
*/
|
555
|
+
_addUICropButtons: function (tabId) {
|
556
|
+
var that = this;
|
557
|
+
|
558
|
+
FloatingMenu.createScope('Aloha.img', ['Aloha.global']);
|
559
|
+
|
560
|
+
this.cropButton = new Aloha.ui.Button({
|
561
|
+
'size' : 'small',
|
562
|
+
'tooltip' : i18n.t('Crop'),
|
563
|
+
'toggle' : true,
|
564
|
+
'iconClass' : 'cnr-crop',
|
565
|
|