Project initialize
This commit is contained in:
3
app/assets/config/manifest.js
Normal file
3
app/assets/config/manifest.js
Normal file
@@ -0,0 +1,3 @@
|
||||
//= link_tree ../images
|
||||
//= link_directory ../javascripts .js
|
||||
//= link_directory ../stylesheets .css
|
||||
0
app/assets/images/.keep
Normal file
0
app/assets/images/.keep
Normal file
15
app/assets/javascripts/application.js
Normal file
15
app/assets/javascripts/application.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// 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, 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. JavaScript code in this file should be added after the last require_* statement.
|
||||
//
|
||||
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
||||
// about supported directives.
|
||||
//
|
||||
//= require rails-ujs
|
||||
//= require turbolinks
|
||||
//= require_tree .
|
||||
13
app/assets/javascripts/cable.js
Normal file
13
app/assets/javascripts/cable.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// Action Cable provides the framework to deal with WebSockets in Rails.
|
||||
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
||||
//
|
||||
//= require action_cable
|
||||
//= require_self
|
||||
//= require_tree ./channels
|
||||
|
||||
(function() {
|
||||
this.App || (this.App = {});
|
||||
|
||||
App.cable = ActionCable.createConsumer();
|
||||
|
||||
}).call(this);
|
||||
0
app/assets/javascripts/channels/.keep
Normal file
0
app/assets/javascripts/channels/.keep
Normal file
3
app/assets/javascripts/departments.coffee
Normal file
3
app/assets/javascripts/departments.coffee
Normal file
@@ -0,0 +1,3 @@
|
||||
# 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/
|
||||
25
app/assets/javascripts/tasks.coffee
Normal file
25
app/assets/javascripts/tasks.coffee
Normal file
@@ -0,0 +1,25 @@
|
||||
# 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/
|
||||
|
||||
# Toggle description field visibility
|
||||
@toggleDescription = ->
|
||||
descriptionField = document.getElementById('description-field')
|
||||
toggleText = document.getElementById('toggle-text')
|
||||
|
||||
if descriptionField.style.display == 'none'
|
||||
descriptionField.style.display = 'block'
|
||||
toggleText.textContent = '- Hide Description'
|
||||
else
|
||||
descriptionField.style.display = 'none'
|
||||
toggleText.textContent = '+ Add Description'
|
||||
|
||||
# Show description field if it has content on edit pages
|
||||
document.addEventListener 'turbolinks:load', ->
|
||||
descriptionField = document.getElementById('description-field')
|
||||
toggleText = document.getElementById('toggle-text')
|
||||
descriptionTextarea = document.querySelector('.description-textarea')
|
||||
|
||||
if descriptionTextarea && descriptionTextarea.value.trim() != ''
|
||||
descriptionField.style.display = 'block'
|
||||
toggleText.textContent = '- Hide Description' if toggleText
|
||||
1101
app/assets/stylesheets/application.css
Normal file
1101
app/assets/stylesheets/application.css
Normal file
File diff suppressed because it is too large
Load Diff
3
app/assets/stylesheets/departments.scss
Normal file
3
app/assets/stylesheets/departments.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the Departments controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
3
app/assets/stylesheets/tasks.scss
Normal file
3
app/assets/stylesheets/tasks.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the Tasks controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
Reference in New Issue
Block a user