Skip to content
Snippets Groups Projects
Commit 1040ef06 authored by iaibrys's avatar iaibrys
Browse files

Merge branch 'feature/remove-coffeescript' into 'develop'

Feature/remove coffeescript

See merge request !206
parents b7303e82 192d597c
No related branches found
No related tags found
1 merge request!206Feature/remove coffeescript
Pipeline #346 failed
Showing
with 23 additions and 356 deletions
{
"directory": "vendor/assets/components"
}
defaults
......@@ -3,3 +3,4 @@ node_modules/
deps/**/*
assets/**/*
public/**/*
/*.js
**/*{.,-}min.js
node_modules/**/*
deps/**/*
assets/**/*
public/**/*
......@@ -51,12 +51,6 @@ RUN sudo chown -R ${CHOWN} ~/.npm
RUN sudo chown -R ${CHOWN} ~/.config
RUN yarn install
# Install bower
COPY .bowerrc ${APP_ROOT}/
COPY bower.json ${APP_ROOT}/
RUN sudo npm install -g bower
RUN bower install --allow-root
# Add PDF.JS
RUN cd deps/pdfjs && \
npm install && \
......@@ -65,20 +59,6 @@ RUN cd deps/pdfjs && \
gulp generic && \
cd ${APP_ROOT}
# Copy bower scripts to public
# This bypasses the rails pipeline to ensure that the assets are available
# as-is for askbot (in the case of MathJax) and as a fallback if we decide to
# implement fallback.js if/when the CDNs fail
COPY ./vendor ${APP_ROOT}/vendor
COPY ./public ${APP_ROOT}/public
RUN sudo chown -R ${CHOWN} ${APP_ROOT}/public
RUN sudo chown -R ${CHOWN} ${APP_ROOT}/vendor
RUN mkdir -p public/vendor
RUN mkdir -p public/assets
RUN mkdir -p vendor/assets/components/socket.io
RUN cp -R node_modules/socket.io-client/dist/* vendor/assets/components/socket.io
RUN cp -R vendor/assets/components public/vendor/
# Copy application code to container
COPY ./app ${APP_ROOT}/app
COPY ./deps ${APP_ROOT}/deps
......@@ -90,7 +70,7 @@ COPY ./public-maintenance ${APP_ROOT}/public-maintenance
COPY ./scripts ${APP_ROOT}/scripts
COPY ./spec ${APP_ROOT}/spec
COPY ./test ${APP_ROOT}/test
COPY maintenance.ru config.ru .rspec Procfile Rakefile .bowerrc postcss.config.js ${APP_ROOT}/
COPY maintenance.ru config.ru .rspec Procfile Rakefile postcss.config.js ${APP_ROOT}/
RUN sudo chown -R ${CHOWN} ${APP_ROOT}/spec/files
RUN sudo chown -R ${CHOWN} ${APP_ROOT}/db
RUN sudo chown -R ${CHOWN} ${APP_ROOT}/scripts
......
//= link_tree ../images
//= link_directory ../javascripts .js
//= link application.css
//= link dtu_core_app/application.css
//= link dtu_core_app/application.js
File moved
File moved
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
// You can use CoffeeScript in this file: http://coffeescript.org/
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery-ujs
//= require jquery-readyselector
//= re qui re turbolinks
//= require underscore
//= require bootstrap
//= require bootstrap-treeview
//= require pagedown-extra/pagedown/Markdown.Converter.js
//= require pagedown-extra/pagedown/Markdown.Sanitizer.js
//= require pagedown-extra/pagedown/Markdown.Editor.js
//= require pagedown-extra/Markdown.Extra.js
//= require feedback/stable/2.0/feedback.js
//= require feedback/stable/2.0/html2canvas.js
//= require socket.io/socket.io
//= require utils
//= require admin
//= require enotes
//= require nav
//= require mathjax
//= require exercise
//= require render
//= require page-index
//= require md-page
//= require client-flash
//= require json-stringify-safe
//= require dtu_core_app/application
//= require page-load
//= require modal
//= require quiz
console.error('Moved to webpack!');
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
// You can use CoffeeScript in this file: http://coffeescript.org/
// h/t http://brandonhilkert.com/blog/page-specific-javascript-in-rails/
$(".enote").ready(function() {
const url = $(this).data('pdf-url');
return console.log(`loading PDF at URL ${url}`);
});
\ No newline at end of file
// from https://github.com/isaacs/json-stringify-safe/blob/02cfafd45f06d076ac4bf0dd28be6738a07a72f9/stringify.js#L4
// per http://stackoverflow.com/questions/11616630/json-stringify-avoid-typeerror-converting-circular-structure-to-json
// to avoid circular refs error when logging mathjax errors
function stringifySafe(obj, replacer, spaces, cycleReplacer) {
return JSON.stringify(obj, serializerSafe(replacer, cycleReplacer), spaces)
}
function serializerSafe(replacer, cycleReplacer) {
var stack = [],
keys = []
if (cycleReplacer == null) cycleReplacer = function(key, value) {
if (stack[0] === value) return "[Circular ~]"
return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
}
return function(key, value) {
if (stack.length > 0) {
var thisPos = stack.indexOf(this);
~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value);
} else stack.push(value)
return replacer == null ? value : replacer.call(this, key, value)
}
}
\ No newline at end of file
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require bootstrap
*= require_self
*= require dtu_core_app/application.css
*= require feedback/stable/2.0/feedback.css
*/
@import 'base-style.scss';
body {
font-family: $font_name;
font-size:15px;
line-height:1.45;
color:#3f3f3f;
background-color:#f6f6f6
}
.only {
display: none;
}
@import "home";
@import "agenda";
@import "enotes";
@import "nav";
@import "exercise";
@import "podcast";
@import "admin";
@import "edit";
@import "pages";
@import "quiz";
@import "chat";
@import "feedback";
@import "printable";
div.container {
text-align: left;
}
@media (min-width: 992px) {
.modal-lg {
width: 90vw;
max-height: 90vh;
}
}
$chatWidth: 10vw;
$chatHeight: 20vh;
.chat-modal {
position: fixed;
z-index: 10;
max-height: calc(100% - 40px);
max-width: calc(100% - 40px);
-webkit-transition: .2s linear;
transition: .2s linear;
-webkit-transition-property: visibility,opacity;
transition-property: visibility,opacity;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
width: auto;
height: auto;
min-height: 0;
min-width: 0;
display: flex;
flex-direction: column;
-webkit-box-sizing: content-box;
box-sizing: content-box;
padding: 0;
margin: 0;
bottom: 2vh;
right: 2vw;
}
.chat-widget-element {
filter: drop-shadow(0 0 0.95rem #cCcCcC);
background-color:white;
border-radius: 10px;
position: relative;
}
.chat-log-frame {
position: relative;
margin-bottom: 10px;
}
.chat-message-log {
margin: 10px;
width: 100%;
}
.chat-modal.chat-open .chat-log-frame {
height: $chatHeight;
}
.chat-log-frame div {
height: 100%;
}
.chat-modal.chat-closed .chat-log-frame .chat-message-log {
height: 0;
display: none;
}
.chat-modal.chat-closed .chat-close {
display: none;
}
.chat-message-log {
height: 100%;
margin: 0;
overflow-y: scroll;
li {
word-wrap: break-word;
max-width: $chatWidth;
}
padding: 10px 20px 10px 20px;
}
.chat-message {
width: $chatWidth;
}
.chat-modal.chat-closed .chat-log-frame .chat-message-log {
height: 0vh;
}
.chat-log-frame {
width: 100%;
}
.chat-log-frame .chat-message-log {
-webkit-transition: .2s linear;
transition: .2s linear;
}
.chat-log-input-frame {
position:relative;
display:flex;
}
.chat-log-input-frame .chat-message {
margin: 10px 20px 10px 20px;
}
.chat-close {
width: 30px;
height: 30px;
border-radius:15px;
position:relative;
float:right;
bottom: 40px;
}
.chat-close svg {
margin:8px;
}
.messages {
height: $chatHeight;
margin-top: -20px;
overflow-y: scroll;
padding: 10px 20px 10px 20px;
}
.message.typing .messageBody {
color: gray;
}
.username {
font-weight: 700;
overflow: hidden;
padding-right: 15px;
text-align: right;
}
ul.chat-message-log {
padding: 10px 20px 10px 20px;
list-style: none;
word-wrap: break-word;
position: relative;
top: -26px;
}
.chat-connection-indicator {
margin: 16px 0px 10px 20px;
height: 15px;
width: 15px;
border-radius: 50%;
background-color: indigo;
display: inline-block;
}
.chat-connection-indicator.connected {
background-color: green;
}
.chat-connection-indicator.disconnected {
background-color: darkred;
}
.chat-connection-indicator.connect-error {
background-color: black;
}
.chat-login-message {
margin: 10px 20px 10px 20px;
}
\ No newline at end of file
......@@ -21,7 +21,6 @@ module CourseUrlHelper
url = url.slice(course_url_prefix.length, url.length-course_url_prefix.length) if url.start_with? course_url_prefix
elsif ENV['RAILS_ENV'].eql? "development"
# add course if it isn't there...
Rails.logger.info "URL: #{course_url_prefix} #{url}"
url = course_url_prefix + url unless url.start_with? course_url_prefix
end
......
......@@ -2,7 +2,7 @@
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
@import 'base-style.scss';
@import 'base-style';
.valid-groups {
text-align: left;
......
File moved
@import 'dtu_core_app/tango_palette.scss';
@import '~dtu_core_assets/tango_palette';
$body-bg: #fff !global;
$font-size-base: 20px !global;
......
File moved
......@@ -108,8 +108,8 @@ li.L9 { background: #eee }
@font-face {
font-family: 'fontello';
src: url('/public/font/fontello.svg#fontello') format('svg'),
url('/public/font/fontello.woff') format('woff');
src: url('/font/fontello.svg#fontello') format('svg'),
url('/font/fontello.woff') format('woff');
font-weight: normal;
font-style: normal;
}
......@@ -118,50 +118,50 @@ li.L9 { background: #eee }
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url("/public/font/SourceSansPro-Light-webfont.woff") format('woff');
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url("/font/SourceSansPro-Light-webfont.woff") format('woff');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro'), local('SourceSansPro'), url("/public/font/SourceSansPro-Regular-webfont.woff") format('woff');
src: local('Source Sans Pro'), local('SourceSansPro'), url("/font/SourceSansPro-Regular-webfont.woff") format('woff');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url("/public/font/SourceSansPro-Bold-webfont.woff") format('woff');
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url("/font/SourceSansPro-Bold-webfont.woff") format('woff');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 300;
src: local('Source Sans Pro Light Italic'), local('SourceSansProLight-Italic'), url("/public/font/SourceSansPro-LightItalic-webfont.woff") format('woff');
src: local('Source Sans Pro Light Italic'), local('SourceSansProLight-Italic'), url("/font/SourceSansPro-LightItalic-webfont.woff") format('woff');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url("/public/font/SourceSansPro-Italic-webfont.woff") format('woff');
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url("/font/SourceSansPro-Italic-webfont.woff") format('woff');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 700;
src: local('Source Sans Pro Bold Italic'), local('SourceSansPro-BoldItalic'), url("/public/font/SourceSansPro-BoldItalic-webfont.woff") format('woff');
src: local('Source Sans Pro Bold Italic'), local('SourceSansPro-BoldItalic'), url("/font/SourceSansPro-BoldItalic-webfont.woff") format('woff');
}
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 400;
src: local('Source Code Pro'), local('SourceCodePro-Regular'), url("/public/font/SourceCodePro-Regular-webfont.woff") format('woff');
src: local('Source Code Pro'), local('SourceCodePro-Regular'), url("/font/SourceCodePro-Regular-webfont.woff") format('woff');
}
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 700;
src: local('Source Code Pro Bold'), local('SourceCodePro-Bold'), url("/public/font/SourceCodePro-Bold-webfont.woff") format('woff');
src: local('Source Code Pro Bold'), local('SourceCodePro-Bold'), url("/font/SourceCodePro-Bold-webfont.woff") format('woff');
}
@font-family-sans-serif: "Source Sans Pro", sans-serif;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment