Merge remote-tracking branch 'origin/master' into statistics

This commit is contained in:
Maximilian Grundke
2015-12-16 16:21:40 +01:00
60 changed files with 1014 additions and 25 deletions

View File

@ -419,7 +419,7 @@ $(function() {
session.setUseWrapMode(true);
var file_id = $(element).data('id');
setAnnotations(editor, file_id);
//setAnnotations(editor, file_id);
session.on('annotationRemoval', handleAnnotationRemoval);
session.on('annotationChange', handleAnnotationChange);
@ -1118,7 +1118,10 @@ $(function() {
};
var initWebsocketConnection = function(url) {
websocket = new WebSocket('wss://' + window.location.hostname + ':' + window.location.port + url);
//TODO: get the protocol from config file dependent on environment. (dev: ws, prod: wss)
//causes: Puma::HttpParserError: Invalid HTTP format, parsing fails.
//TODO: make sure that this gets cached.
websocket = new WebSocket('<%= DockerClient.config['ws_client_protocol'] %>' + window.location.hostname + ':' + window.location.port + url);
websocket.onopen = function(evt) { resetOutputTab(); }; // todo show some kind of indicator for established connection
websocket.onclose = function(evt) { /* expected at some point */ };
websocket.onmessage = function(evt) { parseCanvasMessage(evt.data, true); };

View File

@ -1,6 +1,6 @@
- content_for :head do
= javascript_include_tag('//cdnjs.cloudflare.com/ajax/libs/vis/3.10.0/vis.min.js')
= stylesheet_link_tag('//cdnjs.cloudflare.com/ajax/libs/vis/3.10.0/vis.min.css')
= javascript_include_tag(asset_path('vis.min.js', type: :javascript))
= stylesheet_link_tag(asset_path('vis.min.css', type: :stylesheet))
h1 = t('breadcrumbs.dashboard.show')

View File

@ -5,12 +5,12 @@ html lang='en'
meta name='viewport' content='width=device-width, initial-scale=1'
title = application_name
link href=asset_path('favicon.png') rel='icon' type='image/png'
= stylesheet_link_tag('//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/yeti/bootstrap.min.css')
= stylesheet_link_tag('//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css')
= stylesheet_link_tag(asset_path('bootstrap.min.css', type: :stylesheet))
= stylesheet_link_tag(asset_path('font-awesome.min.css', type: :stylesheet))
= stylesheet_link_tag('application', media: 'all', 'data-turbolinks-track' => true)
= javascript_include_tag('application', 'data-turbolinks-track' => true)
= javascript_include_tag('//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js')
= javascript_include_tag('//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js')
= javascript_include_tag(asset_path('underscore-min.js', type: :javascript))
= javascript_include_tag(asset_path('bootstrap.min.js', type: :javascript))
= yield(:head)
= csrf_meta_tags
body