flammarion 0.1.10pre2 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.md +9 -1
- data/electron/main.coffee +1 -0
- data/electron/main.js +2 -1
- data/electron/preload.js +6 -6
- data/lib/flammarion/engraving.rb +16 -0
- data/lib/flammarion/revelator.rb +1 -1
- data/lib/flammarion/version.rb +1 -1
- data/lib/html/build/javascripts/actions.js +15 -10
- data/lib/html/build/javascripts/all.js +35 -13
- data/lib/html/build/javascripts/electron_extensions.js +267 -0
- data/lib/html/build/javascripts/input.js +15 -13
- data/lib/html/build/javascripts/map.js +15 -10
- data/lib/html/build/javascripts/status.js +1 -3
- data/lib/html/build/javascripts/websocket.js +15 -10
- data/lib/html/build/stylesheets/all.css +1 -0
- data/lib/html/build/stylesheets/scrollbar.css +1 -0
- data/lib/html/source/javascripts/electron_extensions.coffee +12 -0
- data/lib/html/source/javascripts/input.coffee +0 -3
- data/lib/html/source/javascripts/status.coffee +0 -2
- data/lib/html/source/javascripts/websocket.coffee +12 -6
- data/lib/html/source/stylesheets/scrollbar.styl +1 -0
- metadata +7 -5
@@ -16,7 +16,6 @@ void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?voi
|
|
16
16
|
function StatusDisplay(ws, target) {
|
17
17
|
this.ws = ws;
|
18
18
|
this.target = target;
|
19
|
-
console.log("Setting up status bar at " + this.target);
|
20
19
|
this.target.click((function(_this) {
|
21
20
|
return function() {
|
22
21
|
return _this.show_history();
|
@@ -26,8 +25,7 @@ void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?voi
|
|
26
25
|
|
27
26
|
StatusDisplay.prototype.show_status = function(data) {
|
28
27
|
this.target.html(this.ws.escape(data.text, data));
|
29
|
-
this.status_history.push(data);
|
30
|
-
return console.log(this.status_history);
|
28
|
+
return this.status_history.push(data);
|
31
29
|
};
|
32
30
|
|
33
31
|
StatusDisplay.prototype.show_history = function() {
|
@@ -88,13 +86,20 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
88
86
|
};
|
89
87
|
this.ws.onmessage = (function(_this) {
|
90
88
|
return function(msg) {
|
91
|
-
var data;
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
89
|
+
var data, error;
|
90
|
+
_this.lastMessage = msg;
|
91
|
+
try {
|
92
|
+
data = $.parseJSON(msg.data);
|
93
|
+
if (_this.actions[data.action]) {
|
94
|
+
return _this.actions[data.action](data);
|
95
|
+
} else {
|
96
|
+
console.log(msg);
|
97
|
+
return console.error("No such action: " + data.action);
|
98
|
+
}
|
99
|
+
} catch (_error) {
|
100
|
+
error = _error;
|
101
|
+
console.log(msg);
|
102
|
+
return console.error(error);
|
98
103
|
}
|
99
104
|
};
|
100
105
|
})(this);
|
@@ -251,7 +256,6 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
251
256
|
if (data.left_icon) {
|
252
257
|
if ((":" + data.left_icon + ":") in emojione.emojioneList) {
|
253
258
|
left_icon = "<i class='label-icon-left'>" + emojione.shortnameToImage(":" + data.left_icon + ":") + "</i>";
|
254
|
-
console.log(left_icon);
|
255
259
|
} else {
|
256
260
|
left_icon = "<i class='fa fa-" + data.left_icon + " label-icon-left'></i>";
|
257
261
|
}
|
@@ -390,7 +394,6 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
390
394
|
all_boxes = $('.inline-checkbox');
|
391
395
|
start = all_boxes.index(_this.__lastChecked);
|
392
396
|
stop = all_boxes.index(element);
|
393
|
-
console.log(start, stop);
|
394
397
|
all_boxes.slice(Math.min(start, stop), Math.max(start, stop) + 1).find('input').prop("checked", _this.__lastChecked.find('input').prop("checked"));
|
395
398
|
return all_boxes.change();
|
396
399
|
} else {
|
@@ -404,7 +407,6 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
404
407
|
var element, item, j, k, len, option, ref, ref1, target, v;
|
405
408
|
target = this.__parent.check_target(data);
|
406
409
|
element = $("<select class='inline-dropdown' name='" + data.id + "'></select>");
|
407
|
-
console.log(data.options);
|
408
410
|
if (data.options instanceof Array) {
|
409
411
|
ref = data.options;
|
410
412
|
for (j = 0, len = ref.length; j < len; j++) {
|
@@ -16,7 +16,6 @@ void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?voi
|
|
16
16
|
function StatusDisplay(ws, target) {
|
17
17
|
this.ws = ws;
|
18
18
|
this.target = target;
|
19
|
-
console.log("Setting up status bar at " + this.target);
|
20
19
|
this.target.click((function(_this) {
|
21
20
|
return function() {
|
22
21
|
return _this.show_history();
|
@@ -26,8 +25,7 @@ void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?voi
|
|
26
25
|
|
27
26
|
StatusDisplay.prototype.show_status = function(data) {
|
28
27
|
this.target.html(this.ws.escape(data.text, data));
|
29
|
-
this.status_history.push(data);
|
30
|
-
return console.log(this.status_history);
|
28
|
+
return this.status_history.push(data);
|
31
29
|
};
|
32
30
|
|
33
31
|
StatusDisplay.prototype.show_history = function() {
|
@@ -88,13 +86,20 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
88
86
|
};
|
89
87
|
this.ws.onmessage = (function(_this) {
|
90
88
|
return function(msg) {
|
91
|
-
var data;
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
89
|
+
var data, error;
|
90
|
+
_this.lastMessage = msg;
|
91
|
+
try {
|
92
|
+
data = $.parseJSON(msg.data);
|
93
|
+
if (_this.actions[data.action]) {
|
94
|
+
return _this.actions[data.action](data);
|
95
|
+
} else {
|
96
|
+
console.log(msg);
|
97
|
+
return console.error("No such action: " + data.action);
|
98
|
+
}
|
99
|
+
} catch (_error) {
|
100
|
+
error = _error;
|
101
|
+
console.log(msg);
|
102
|
+
return console.error(error);
|
98
103
|
}
|
99
104
|
};
|
100
105
|
})(this);
|
@@ -11,7 +11,6 @@
|
|
11
11
|
function StatusDisplay(ws, target) {
|
12
12
|
this.ws = ws;
|
13
13
|
this.target = target;
|
14
|
-
console.log("Setting up status bar at " + this.target);
|
15
14
|
this.target.click((function(_this) {
|
16
15
|
return function() {
|
17
16
|
return _this.show_history();
|
@@ -21,8 +20,7 @@
|
|
21
20
|
|
22
21
|
StatusDisplay.prototype.show_status = function(data) {
|
23
22
|
this.target.html(this.ws.escape(data.text, data));
|
24
|
-
this.status_history.push(data);
|
25
|
-
return console.log(this.status_history);
|
23
|
+
return this.status_history.push(data);
|
26
24
|
};
|
27
25
|
|
28
26
|
StatusDisplay.prototype.show_history = function() {
|
@@ -16,7 +16,6 @@ void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?voi
|
|
16
16
|
function StatusDisplay(ws, target) {
|
17
17
|
this.ws = ws;
|
18
18
|
this.target = target;
|
19
|
-
console.log("Setting up status bar at " + this.target);
|
20
19
|
this.target.click((function(_this) {
|
21
20
|
return function() {
|
22
21
|
return _this.show_history();
|
@@ -26,8 +25,7 @@ void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?voi
|
|
26
25
|
|
27
26
|
StatusDisplay.prototype.show_status = function(data) {
|
28
27
|
this.target.html(this.ws.escape(data.text, data));
|
29
|
-
this.status_history.push(data);
|
30
|
-
return console.log(this.status_history);
|
28
|
+
return this.status_history.push(data);
|
31
29
|
};
|
32
30
|
|
33
31
|
StatusDisplay.prototype.show_history = function() {
|
@@ -88,13 +86,20 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
88
86
|
};
|
89
87
|
this.ws.onmessage = (function(_this) {
|
90
88
|
return function(msg) {
|
91
|
-
var data;
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
89
|
+
var data, error;
|
90
|
+
_this.lastMessage = msg;
|
91
|
+
try {
|
92
|
+
data = $.parseJSON(msg.data);
|
93
|
+
if (_this.actions[data.action]) {
|
94
|
+
return _this.actions[data.action](data);
|
95
|
+
} else {
|
96
|
+
console.log(msg);
|
97
|
+
return console.error("No such action: " + data.action);
|
98
|
+
}
|
99
|
+
} catch (_error) {
|
100
|
+
error = _error;
|
101
|
+
console.log(msg);
|
102
|
+
return console.error(error);
|
98
103
|
}
|
99
104
|
};
|
100
105
|
})(this);
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#= require websocket.coffee
|
2
|
+
if window.$remote
|
3
|
+
$.extend WSClient.prototype.actions,
|
4
|
+
snapshot: (data) ->
|
5
|
+
window.$remote.getCurrentWindow().capturePage (image) =>
|
6
|
+
@__parent.send({
|
7
|
+
id:data.id
|
8
|
+
action:'callback'
|
9
|
+
source:'snapshot'
|
10
|
+
data: image.toPNG()
|
11
|
+
original_msg:data
|
12
|
+
})
|
@@ -8,7 +8,6 @@ $.extend WSClient.prototype.actions,
|
|
8
8
|
if data.left_icon
|
9
9
|
if ":#{data.left_icon}:" of emojione.emojioneList
|
10
10
|
left_icon = "<i class='label-icon-left'>" + emojione.shortnameToImage(":#{data.left_icon}:") + "</i>"
|
11
|
-
console.log left_icon
|
12
11
|
else
|
13
12
|
left_icon = "<i class='fa fa-#{data.left_icon} label-icon-left'></i>"
|
14
13
|
|
@@ -110,7 +109,6 @@ $.extend WSClient.prototype.actions,
|
|
110
109
|
all_boxes = $('.inline-checkbox')
|
111
110
|
start = all_boxes.index(@__lastChecked)
|
112
111
|
stop = all_boxes.index(element)
|
113
|
-
console.log start, stop
|
114
112
|
|
115
113
|
all_boxes.slice(Math.min(start, stop), Math.max(start, stop) + 1).find('input').prop("checked", @__lastChecked.find('input').prop("checked"))
|
116
114
|
all_boxes.change()
|
@@ -121,7 +119,6 @@ $.extend WSClient.prototype.actions,
|
|
121
119
|
dropdown: (data) ->
|
122
120
|
target = @__parent.check_target(data)
|
123
121
|
element = $("<select class='inline-dropdown' name='#{data.id}'></select>")
|
124
|
-
console.log data.options
|
125
122
|
if data.options instanceof Array
|
126
123
|
element.append($("<option>#{item}</option>")) for item in data.options
|
127
124
|
else
|
@@ -3,14 +3,12 @@ class StatusDisplay
|
|
3
3
|
waiting_statuses: []
|
4
4
|
max_statuses: 10
|
5
5
|
constructor: (@ws, @target) ->
|
6
|
-
console.log("Setting up status bar at #{@target}")
|
7
6
|
@target.click =>
|
8
7
|
@show_history()
|
9
8
|
|
10
9
|
show_status: (data) ->
|
11
10
|
@target.html(@ws.escape(data.text, data))
|
12
11
|
@status_history.push data
|
13
|
-
console.log(@status_history)
|
14
12
|
|
15
13
|
show_history: ->
|
16
14
|
console.log(@status_history)
|
@@ -19,12 +19,18 @@ class WSClient
|
|
19
19
|
$('body').removeClass("connected")
|
20
20
|
|
21
21
|
@ws.onmessage = (msg) =>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
# Just keeping this around for debug purposes
|
23
|
+
@lastMessage = msg
|
24
|
+
try
|
25
|
+
data = $.parseJSON(msg.data)
|
26
|
+
if @actions[data.action]
|
27
|
+
@actions[data.action](data)
|
28
|
+
else
|
29
|
+
console.log msg
|
30
|
+
console.error("No such action: #{data.action}")
|
31
|
+
catch error
|
32
|
+
console.log msg
|
33
|
+
console.error error
|
28
34
|
|
29
35
|
@status = new StatusDisplay(this, $('#status > .right'))
|
30
36
|
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flammarion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.11
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Zach Capalbo
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-08-
|
12
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubame
|
@@ -1991,6 +1991,7 @@ files:
|
|
1991
1991
|
- lib/html/source/javascripts/vendor/highlight.pack.js
|
1992
1992
|
- lib/html/source/javascripts/vendor/plotly.min.js
|
1993
1993
|
- lib/html/source/javascripts/websocket.coffee
|
1994
|
+
- lib/html/source/javascripts/electron_extensions.coffee
|
1994
1995
|
- lib/html/source/javascripts/plot.coffee
|
1995
1996
|
- lib/html/source/javascripts/searchbar.coffee
|
1996
1997
|
- lib/html/source/javascripts/input.coffee
|
@@ -3774,6 +3775,7 @@ files:
|
|
3774
3775
|
- lib/html/build/javascripts/plot.js
|
3775
3776
|
- lib/html/build/javascripts/websocket.js
|
3776
3777
|
- lib/html/build/javascripts/all.js
|
3778
|
+
- lib/html/build/javascripts/electron_extensions.js
|
3777
3779
|
- lib/html/build/javascripts/vendor/l.control.geosearch.js
|
3778
3780
|
- lib/html/build/javascripts/vendor/emojione.js
|
3779
3781
|
- lib/html/build/javascripts/vendor/l.geosearch.provider.openstreetmap.js
|
@@ -3850,9 +3852,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
3850
3852
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
3851
3853
|
none: false
|
3852
3854
|
requirements:
|
3853
|
-
- - ! '
|
3855
|
+
- - ! '>='
|
3854
3856
|
- !ruby/object:Gem::Version
|
3855
|
-
version:
|
3857
|
+
version: '0'
|
3856
3858
|
requirements: []
|
3857
3859
|
rubyforge_project:
|
3858
3860
|
rubygems_version: 1.8.23
|