nacelle 0.2.3 → 0.2.4
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 +4 -4
- data/app/assets/javascripts/ckeditor/plugins/cells/dialogs/cells.js +33 -0
- data/app/assets/javascripts/ckeditor/plugins/cells/plugin.js +19 -0
- data/gemfiles/rails_5.1.gemfile.lock +1 -1
- data/gemfiles/rails_5.2.gemfile.lock +1 -1
- data/gemfiles/rails_6.0.gemfile.lock +1 -1
- data/gemfiles/rails_6.1.gemfile.lock +1 -1
- data/gemfiles/rails_7.0.gemfile.lock +1 -1
- data/lib/nacelle/version.rb +1 -1
- metadata +4 -4
- data/app/assets/javascripts/ckeditor/plugins/cells/dialogs/cells.js.coffee +0 -25
- data/app/assets/javascripts/ckeditor/plugins/cells/plugin.js.coffee +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d7035f40e729ef5fa97ced962dc7ac7639f819bba417d3ae2975fc833fb421c
|
4
|
+
data.tar.gz: 7ec87e13a44a1e4fd04d5b5416de4326526f7f2cf78beb403aab196a19b3455f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae74269f5fb6d91f1b48d3ac20ed962fa125ebd10f19e1189f231d332a9f0ade5c177af92d37f972fae4e201070bcab273b1dc88ed1a407ae96eda8bf2f94aa9
|
7
|
+
data.tar.gz: fa4516095ab9bce90c3b43da95f4f291872558382c33829e571e4ff17e9ee79555d708f4b11f0a4dcac0182c737e283f92992b51d0e3df2dd62d33d866532cde
|
@@ -0,0 +1,33 @@
|
|
1
|
+
CKEDITOR.dialog.add("cellDialog", function(editor) {
|
2
|
+
return {
|
3
|
+
title: "Insert Cell",
|
4
|
+
minWidth: 400,
|
5
|
+
minHeight: 200,
|
6
|
+
contents: [{
|
7
|
+
id: "main",
|
8
|
+
elements: [{
|
9
|
+
type: "select",
|
10
|
+
id: "cellName",
|
11
|
+
label: "Select Cell",
|
12
|
+
items: [],
|
13
|
+
}],
|
14
|
+
}],
|
15
|
+
|
16
|
+
onShow: function() {
|
17
|
+
fetch("/nacelle/cells.json").then(r => r.json()).then(data => {
|
18
|
+
var select = this.getContentElement("main", "cellName");
|
19
|
+
for(var i=0; i < data.cells.length; i++) {
|
20
|
+
var item = data.cells[i];
|
21
|
+
select.add(item.name, item.id);
|
22
|
+
}
|
23
|
+
});
|
24
|
+
},
|
25
|
+
|
26
|
+
onOk: function() {
|
27
|
+
var cell = editor.document.createElement("cell");
|
28
|
+
cell.setAttribute("name", this.getValueOf("main", "cellName"));
|
29
|
+
editor.insertElement(cell)
|
30
|
+
},
|
31
|
+
};
|
32
|
+
});
|
33
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
CKEDITOR.plugins.add("cells", {
|
2
|
+
icons: "insertcell",
|
3
|
+
init: function(editor) {
|
4
|
+
editor.addCommand("insertCellDialog", new CKEDITOR.dialogCommand("cellDialog"));
|
5
|
+
|
6
|
+
CKEDITOR.dialog.add("cellDialog", "/assets/ckeditor/plugins/cells/dialogs/cells.js");
|
7
|
+
|
8
|
+
editor.ui.addButton("InsertCell", {
|
9
|
+
label: "Insert Cell",
|
10
|
+
command: "insertCellDialog",
|
11
|
+
icon: "/assets/ckeditor/plugins/cells/icons/insertcell.png",
|
12
|
+
});
|
13
|
+
},
|
14
|
+
});
|
15
|
+
|
16
|
+
CKEDITOR.dtd.$empty.cell = 1;
|
17
|
+
CKEDITOR.dtd.$nonEditable.cell = 1;
|
18
|
+
CKEDITOR.dtd.$object.cell = 1;
|
19
|
+
|
data/lib/nacelle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nacelle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -152,9 +152,9 @@ files:
|
|
152
152
|
- README.md
|
153
153
|
- Rakefile
|
154
154
|
- app/assets/javascripts/ckeditor/plugins/cells.js
|
155
|
-
- app/assets/javascripts/ckeditor/plugins/cells/dialogs/cells.js
|
155
|
+
- app/assets/javascripts/ckeditor/plugins/cells/dialogs/cells.js
|
156
156
|
- app/assets/javascripts/ckeditor/plugins/cells/icons/insertcell.png
|
157
|
-
- app/assets/javascripts/ckeditor/plugins/cells/plugin.js
|
157
|
+
- app/assets/javascripts/ckeditor/plugins/cells/plugin.js
|
158
158
|
- app/assets/javascripts/nacelle/ckeditor.js
|
159
159
|
- app/controllers/nacelle/cells_controller.rb
|
160
160
|
- bin/console
|
@@ -1,25 +0,0 @@
|
|
1
|
-
CKEDITOR.dialog.add "cellDialog", (editor) ->
|
2
|
-
title: "Insert Cell"
|
3
|
-
minWidth: 400
|
4
|
-
minHeight: 200
|
5
|
-
contents: [
|
6
|
-
id: "main"
|
7
|
-
elements: [
|
8
|
-
type: "select"
|
9
|
-
id: "cellName"
|
10
|
-
label: "Select Cell"
|
11
|
-
items: []
|
12
|
-
]
|
13
|
-
]
|
14
|
-
|
15
|
-
onShow: ->
|
16
|
-
$.getJSON "/nacelle/cells.json", (data) =>
|
17
|
-
select = @getContentElement("main", "cellName")
|
18
|
-
for item in data.cells
|
19
|
-
select.add item.name, item.id
|
20
|
-
|
21
|
-
onOk: ->
|
22
|
-
cell = editor.document.createElement("cell")
|
23
|
-
cell.setAttribute "name", @getValueOf("main", "cellName")
|
24
|
-
editor.insertElement cell
|
25
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
CKEDITOR.plugins.add "cells",
|
2
|
-
icons: "insertcell"
|
3
|
-
init: (editor) ->
|
4
|
-
editor.addCommand "insertCellDialog", new CKEDITOR.dialogCommand("cellDialog")
|
5
|
-
|
6
|
-
CKEDITOR.dialog.add "cellDialog", "/assets/ckeditor/plugins/cells/dialogs/cells.js"
|
7
|
-
|
8
|
-
editor.ui.addButton "InsertCell",
|
9
|
-
label: "Insert Cell"
|
10
|
-
command: "insertCellDialog"
|
11
|
-
icon: "/assets/ckeditor/plugins/cells/icons/insertcell.png"
|
12
|
-
|
13
|
-
CKEDITOR.dtd.$empty.cell = 1
|
14
|
-
CKEDITOR.dtd.$nonEditable.cell = 1
|
15
|
-
CKEDITOR.dtd.$object.cell = 1
|
16
|
-
|