dante-editor-seo 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dist/js/dante-editor.js +85 -85
- data/lib/dante-editor/version.rb +1 -1
- metadata +1 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f30090db036c0c45cf6746eb97e98da59c0c02e
|
4
|
+
data.tar.gz: d7763bca600326713eac60e665f36bfc0144747c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e17d71839794948a85d03f03a4febcf93ec7d4003081cd63f7449171dc939f4e8825092c80a8b19b4d8f64ab29fb1194070bd43d98b94837be82a2dafbae44d2
|
7
|
+
data.tar.gz: 459fcbedab34997a4885138f72e0e5261ba6380450d04cc77883260a6df0659c82b7b0de3bf88098c84d8a62c1af652993b1e3d40cd20d7e45edd7497e0dbb0b
|
data/dist/js/dante-editor.js
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
defaults: {
|
9
9
|
image_placeholder: '../images/dante/media-loading-placeholder.png'
|
10
10
|
},
|
11
|
-
version: "0.0.
|
11
|
+
version: "0.0.14"
|
12
12
|
};
|
13
13
|
|
14
14
|
}).call(this);
|
@@ -425,32 +425,32 @@
|
|
425
425
|
}).call(this);
|
426
426
|
(function() {
|
427
427
|
var utils,
|
428
|
-
|
429
|
-
|
430
|
-
|
428
|
+
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
429
|
+
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
430
|
+
hasProp = {}.hasOwnProperty;
|
431
431
|
|
432
432
|
utils = Dante.utils;
|
433
433
|
|
434
|
-
Dante.Editor = (function(
|
434
|
+
Dante.Editor = (function(superClass) {
|
435
435
|
var BACKSPACE, DOWNARROW, ENTER, LEFTARROW, RIGHTARROW, SPACEBAR, TAB, UPARROW;
|
436
436
|
|
437
|
-
|
437
|
+
extend(Editor, superClass);
|
438
438
|
|
439
439
|
function Editor() {
|
440
|
-
this.setupFirstAndLast =
|
441
|
-
this.addClassesToElement =
|
442
|
-
this.handlePaste =
|
443
|
-
this.handleArrowForKeyDown =
|
444
|
-
this.handleArrow =
|
445
|
-
this.handleMouseUp =
|
446
|
-
this.selection =
|
447
|
-
this.render =
|
448
|
-
this.restart =
|
449
|
-
this.start =
|
450
|
-
this.appendInitialContent =
|
451
|
-
this.appendMenus =
|
452
|
-
this.template =
|
453
|
-
this.initialize =
|
440
|
+
this.setupFirstAndLast = bind(this.setupFirstAndLast, this);
|
441
|
+
this.addClassesToElement = bind(this.addClassesToElement, this);
|
442
|
+
this.handlePaste = bind(this.handlePaste, this);
|
443
|
+
this.handleArrowForKeyDown = bind(this.handleArrowForKeyDown, this);
|
444
|
+
this.handleArrow = bind(this.handleArrow, this);
|
445
|
+
this.handleMouseUp = bind(this.handleMouseUp, this);
|
446
|
+
this.selection = bind(this.selection, this);
|
447
|
+
this.render = bind(this.render, this);
|
448
|
+
this.restart = bind(this.restart, this);
|
449
|
+
this.start = bind(this.start, this);
|
450
|
+
this.appendInitialContent = bind(this.appendInitialContent, this);
|
451
|
+
this.appendMenus = bind(this.appendMenus, this);
|
452
|
+
this.template = bind(this.template, this);
|
453
|
+
this.initialize = bind(this.initialize, this);
|
454
454
|
return Editor.__super__.constructor.apply(this, arguments);
|
455
455
|
}
|
456
456
|
|
@@ -1853,10 +1853,10 @@
|
|
1853
1853
|
};
|
1854
1854
|
|
1855
1855
|
Editor.prototype.removeSpanTag = function($item) {
|
1856
|
-
var $spans,
|
1856
|
+
var $spans, i, len, span;
|
1857
1857
|
$spans = $item.find("span");
|
1858
|
-
for (
|
1859
|
-
span = $spans[
|
1858
|
+
for (i = 0, len = $spans.length; i < len; i++) {
|
1859
|
+
span = $spans[i];
|
1860
1860
|
if (!$(span).hasClass("defaultValue")) {
|
1861
1861
|
$(span).replaceWith($(span).html());
|
1862
1862
|
}
|
@@ -1870,15 +1870,15 @@
|
|
1870
1870
|
|
1871
1871
|
}).call(this);
|
1872
1872
|
(function() {
|
1873
|
-
var
|
1874
|
-
|
1875
|
-
|
1873
|
+
var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
1874
|
+
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
1875
|
+
hasProp = {}.hasOwnProperty;
|
1876
1876
|
|
1877
|
-
Dante.View.TooltipWidget = (function(
|
1878
|
-
|
1877
|
+
Dante.View.TooltipWidget = (function(superClass) {
|
1878
|
+
extend(TooltipWidget, superClass);
|
1879
1879
|
|
1880
1880
|
function TooltipWidget() {
|
1881
|
-
this.hide =
|
1881
|
+
this.hide = bind(this.hide, this);
|
1882
1882
|
return TooltipWidget.__super__.constructor.apply(this, arguments);
|
1883
1883
|
}
|
1884
1884
|
|
@@ -1902,21 +1902,21 @@
|
|
1902
1902
|
}).call(this);
|
1903
1903
|
(function() {
|
1904
1904
|
var utils,
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1905
|
+
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
1906
|
+
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
1907
|
+
hasProp = {}.hasOwnProperty;
|
1908
1908
|
|
1909
1909
|
utils = Dante.utils;
|
1910
1910
|
|
1911
|
-
Dante.View.TooltipWidget.Uploader = (function(
|
1912
|
-
|
1911
|
+
Dante.View.TooltipWidget.Uploader = (function(superClass) {
|
1912
|
+
extend(Uploader, superClass);
|
1913
1913
|
|
1914
1914
|
function Uploader() {
|
1915
|
-
this.handleBackspaceKey =
|
1916
|
-
this.uploadCompleted =
|
1917
|
-
this.updateProgressBar =
|
1918
|
-
this.uploadFile =
|
1919
|
-
this.uploadFiles =
|
1915
|
+
this.handleBackspaceKey = bind(this.handleBackspaceKey, this);
|
1916
|
+
this.uploadCompleted = bind(this.uploadCompleted, this);
|
1917
|
+
this.updateProgressBar = bind(this.updateProgressBar, this);
|
1918
|
+
this.uploadFile = bind(this.uploadFile, this);
|
1919
|
+
this.uploadFiles = bind(this.uploadFiles, this);
|
1920
1920
|
return Uploader.__super__.constructor.apply(this, arguments);
|
1921
1921
|
}
|
1922
1922
|
|
@@ -1939,7 +1939,7 @@
|
|
1939
1939
|
};
|
1940
1940
|
|
1941
1941
|
Uploader.prototype.uploadExistentImage = function(image_element, opts) {
|
1942
|
-
var i, img, n, node,
|
1942
|
+
var i, img, j, n, node, ref, tmpl;
|
1943
1943
|
if (opts == null) {
|
1944
1944
|
opts = {};
|
1945
1945
|
}
|
@@ -1966,7 +1966,7 @@
|
|
1966
1966
|
this.replaceImg(image_element, $("[name='" + (tmpl.attr('name')) + "']"));
|
1967
1967
|
n = $("[name='" + (tmpl.attr('name')) + "']").parentsUntil(".section-inner").length;
|
1968
1968
|
if (n !== 0) {
|
1969
|
-
for (i =
|
1969
|
+
for (i = j = 0, ref = n - 1; j <= ref; i = j += 1) {
|
1970
1970
|
$("[name='" + (tmpl.attr('name')) + "']").unwrap();
|
1971
1971
|
}
|
1972
1972
|
}
|
@@ -1996,7 +1996,7 @@
|
|
1996
1996
|
"data-width": this.width
|
1997
1997
|
});
|
1998
1998
|
figure.find(".aspect-ratio-fill").css({
|
1999
|
-
"padding-bottom":
|
1999
|
+
"padding-bottom": ar.ratio + "%"
|
2000
2000
|
});
|
2001
2001
|
return figure.find("img").attr("src", image_element.src);
|
2002
2002
|
};
|
@@ -2046,7 +2046,7 @@
|
|
2046
2046
|
"data-width": this.width
|
2047
2047
|
});
|
2048
2048
|
replaced_node.find(".aspect-ratio-fill").css({
|
2049
|
-
"padding-bottom":
|
2049
|
+
"padding-bottom": ar.ratio + "%"
|
2050
2050
|
});
|
2051
2051
|
return self.uploadFile(file, replaced_node);
|
2052
2052
|
};
|
@@ -2090,23 +2090,23 @@
|
|
2090
2090
|
};
|
2091
2091
|
|
2092
2092
|
Uploader.prototype.uploadFiles = function(files) {
|
2093
|
-
var acceptedTypes, file, i,
|
2093
|
+
var acceptedTypes, file, i, results;
|
2094
2094
|
acceptedTypes = {
|
2095
2095
|
"image/png": true,
|
2096
2096
|
"image/jpeg": true,
|
2097
2097
|
"image/gif": true
|
2098
2098
|
};
|
2099
2099
|
i = 0;
|
2100
|
-
|
2100
|
+
results = [];
|
2101
2101
|
while (i < files.length) {
|
2102
2102
|
file = files[i];
|
2103
2103
|
if (acceptedTypes[file.type] === true) {
|
2104
2104
|
$(this.placeholder).append("<progress class=\"progress\" min=\"0\" max=\"100\" value=\"0\">0</progress>");
|
2105
2105
|
this.displayAndUploadImages(file);
|
2106
2106
|
}
|
2107
|
-
|
2107
|
+
results.push(i++);
|
2108
2108
|
}
|
2109
|
-
return
|
2109
|
+
return results;
|
2110
2110
|
};
|
2111
2111
|
|
2112
2112
|
Uploader.prototype.uploadFile = function(file, node) {
|
@@ -2169,10 +2169,10 @@
|
|
2169
2169
|
|
2170
2170
|
/*
|
2171
2171
|
* Handles the behavior of deleting images when using the backspace key
|
2172
|
-
|
2172
|
+
#
|
2173
2173
|
* @param {Event} e - The backspace event that is being handled
|
2174
2174
|
* @param {Node} node - The node the backspace was used in, assumed to be from te editor's getNode() function
|
2175
|
-
|
2175
|
+
#
|
2176
2176
|
* @return {Boolean} true if this function handled the backspace event, otherwise false
|
2177
2177
|
*/
|
2178
2178
|
|
@@ -2194,17 +2194,17 @@
|
|
2194
2194
|
}).call(this);
|
2195
2195
|
(function() {
|
2196
2196
|
var utils,
|
2197
|
-
|
2198
|
-
|
2199
|
-
|
2197
|
+
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
2198
|
+
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
2199
|
+
hasProp = {}.hasOwnProperty;
|
2200
2200
|
|
2201
2201
|
utils = Dante.utils;
|
2202
2202
|
|
2203
|
-
Dante.View.TooltipWidget.Embed = (function(
|
2204
|
-
|
2203
|
+
Dante.View.TooltipWidget.Embed = (function(superClass) {
|
2204
|
+
extend(Embed, superClass);
|
2205
2205
|
|
2206
2206
|
function Embed() {
|
2207
|
-
this.getEmbedFromNode =
|
2207
|
+
this.getEmbedFromNode = bind(this.getEmbedFromNode, this);
|
2208
2208
|
return Embed.__super__.constructor.apply(this, arguments);
|
2209
2209
|
}
|
2210
2210
|
|
@@ -2275,18 +2275,18 @@
|
|
2275
2275
|
}).call(this);
|
2276
2276
|
(function() {
|
2277
2277
|
var utils,
|
2278
|
-
|
2279
|
-
|
2280
|
-
|
2278
|
+
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
2279
|
+
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
2280
|
+
hasProp = {}.hasOwnProperty;
|
2281
2281
|
|
2282
2282
|
utils = Dante.utils;
|
2283
2283
|
|
2284
|
-
Dante.View.TooltipWidget.EmbedExtract = (function(
|
2285
|
-
|
2284
|
+
Dante.View.TooltipWidget.EmbedExtract = (function(superClass) {
|
2285
|
+
extend(EmbedExtract, superClass);
|
2286
2286
|
|
2287
2287
|
function EmbedExtract() {
|
2288
|
-
this.getExtract =
|
2289
|
-
this.getExtractFromNode =
|
2288
|
+
this.getExtract = bind(this.getExtract, this);
|
2289
|
+
this.getExtractFromNode = bind(this.getExtractFromNode, this);
|
2290
2290
|
return EmbedExtract.__super__.constructor.apply(this, arguments);
|
2291
2291
|
}
|
2292
2292
|
|
@@ -2368,20 +2368,20 @@
|
|
2368
2368
|
}).call(this);
|
2369
2369
|
(function() {
|
2370
2370
|
var utils,
|
2371
|
-
|
2372
|
-
|
2373
|
-
|
2371
|
+
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
2372
|
+
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
2373
|
+
hasProp = {}.hasOwnProperty;
|
2374
2374
|
|
2375
2375
|
utils = Dante.utils;
|
2376
2376
|
|
2377
|
-
Dante.Editor.Tooltip = (function(
|
2378
|
-
|
2377
|
+
Dante.Editor.Tooltip = (function(superClass) {
|
2378
|
+
extend(Tooltip, superClass);
|
2379
2379
|
|
2380
2380
|
function Tooltip() {
|
2381
|
-
this.hide =
|
2382
|
-
this.toggleOptions =
|
2383
|
-
this.render =
|
2384
|
-
this.initialize =
|
2381
|
+
this.hide = bind(this.hide, this);
|
2382
|
+
this.toggleOptions = bind(this.toggleOptions, this);
|
2383
|
+
this.render = bind(this.render, this);
|
2384
|
+
this.initialize = bind(this.initialize, this);
|
2385
2385
|
return Tooltip.__super__.constructor.apply(this, arguments);
|
2386
2386
|
}
|
2387
2387
|
|
@@ -2482,13 +2482,13 @@
|
|
2482
2482
|
}).call(this);
|
2483
2483
|
(function() {
|
2484
2484
|
var utils,
|
2485
|
-
|
2486
|
-
|
2485
|
+
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
2486
|
+
hasProp = {}.hasOwnProperty;
|
2487
2487
|
|
2488
2488
|
utils = Dante.utils;
|
2489
2489
|
|
2490
|
-
Dante.Editor.PopOver = (function(
|
2491
|
-
|
2490
|
+
Dante.Editor.PopOver = (function(superClass) {
|
2491
|
+
extend(PopOver, superClass);
|
2492
2492
|
|
2493
2493
|
function PopOver() {
|
2494
2494
|
return PopOver.__super__.constructor.apply(this, arguments);
|
@@ -2582,21 +2582,21 @@
|
|
2582
2582
|
}).call(this);
|
2583
2583
|
(function() {
|
2584
2584
|
var utils,
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
2585
|
+
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
2586
|
+
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
2587
|
+
hasProp = {}.hasOwnProperty;
|
2588
2588
|
|
2589
2589
|
utils = Dante.utils;
|
2590
2590
|
|
2591
|
-
Dante.Editor.Menu = (function(
|
2592
|
-
|
2591
|
+
Dante.Editor.Menu = (function(superClass) {
|
2592
|
+
extend(Menu, superClass);
|
2593
2593
|
|
2594
2594
|
function Menu() {
|
2595
|
-
this.createlink =
|
2596
|
-
this.handleInputEnter =
|
2597
|
-
this.render =
|
2598
|
-
this.template =
|
2599
|
-
this.initialize =
|
2595
|
+
this.createlink = bind(this.createlink, this);
|
2596
|
+
this.handleInputEnter = bind(this.handleInputEnter, this);
|
2597
|
+
this.render = bind(this.render, this);
|
2598
|
+
this.template = bind(this.template, this);
|
2599
|
+
this.initialize = bind(this.initialize, this);
|
2600
2600
|
return Menu.__super__.constructor.apply(this, arguments);
|
2601
2601
|
}
|
2602
2602
|
|
data/lib/dante-editor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dante-editor-seo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Michelson
|
@@ -25,7 +25,6 @@ files:
|
|
25
25
|
- ".ruby-version"
|
26
26
|
- ".travis.yml"
|
27
27
|
- Gemfile
|
28
|
-
- Gemfile.lock
|
29
28
|
- Procfile
|
30
29
|
- README.md
|
31
30
|
- ROADMAP.md
|
@@ -148,4 +147,3 @@ signing_key:
|
|
148
147
|
specification_version: 4
|
149
148
|
summary: dante-editor yet another Medium editor clone.
|
150
149
|
test_files: []
|
151
|
-
has_rdoc:
|