...
 
Commits (71)
public/plans/*.jpg
config/database.yml
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep
# Ignore uploaded files in development
/storage/*
!/storage/.keep
/node_modules
/yarn-error.log
/public/assets
.byebug_history
# Ignore master key for decrypting credentials and more.
/config/master.key
ruby-2.6.1
\ No newline at end of file
source "https://rubygems.org"
gem "sinatra"
gem "sinatra-activerecord"
gem 'pg'
gem 'haml'
gem 'barista'
gem 'bcrypt'
gem 'rake'
gem 'chartkick'
gem 'groupdate'
gem 'therubyracer'
gem 'libv8'
# Copyright (c) 2019 Kevin Bloomfield <kevin.bloomfield9@outlook.fr>, Jean-Noël Rouchon <jnoel@mithril.re>
#
# This file is part of Posao.
# Posao is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Posao is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Posao. If not, see <http://www.gnu.org/licenses/>.
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
gem 'gentelella-rails'
gem 'mini_magick'
gem 'devise'
gem 'devise-i18n'
gem "ihover-rails"
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
GEM
remote: https://rubygems.org/
specs:
activemodel (4.2.0)
activesupport (= 4.2.0)
actioncable (5.2.2)
actionpack (= 5.2.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.2)
actionpack (= 5.2.2)
actionview (= 5.2.2)
activejob (= 5.2.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.2)
actionview (= 5.2.2)
activesupport (= 5.2.2)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.2)
activesupport (= 5.2.2)
builder (~> 3.1)
activerecord (4.2.0)
activemodel (= 4.2.0)
activesupport (= 4.2.0)
arel (~> 6.0)
activesupport (4.2.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.2)
activesupport (= 5.2.2)
globalid (>= 0.3.6)
activemodel (5.2.2)
activesupport (= 5.2.2)
activerecord (5.2.2)
activemodel (= 5.2.2)
activesupport (= 5.2.2)
arel (>= 9.0)
activestorage (5.2.2)
actionpack (= 5.2.2)
activerecord (= 5.2.2)
marcel (~> 0.3.1)
activesupport (5.2.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.0)
barista (1.3.0)
coffee-script (~> 2.2)
bcrypt (3.1.7)
builder (3.2.2)
chartkick (1.3.2)
coffee-script (2.3.0)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
archive-zip (0.11.0)
io-like (~> 0.3.0)
arel (9.0.0)
autoprefixer-rails (9.4.4)
execjs
bcrypt (3.1.12)
bindex (0.5.0)
bootsnap (1.3.2)
msgpack (~> 1.0)
bootstrap-daterangepicker-rails (3.0.3)
railties (>= 4.0, < 5.3)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
builder (3.2.3)
byebug (10.0.2)
capybara (3.12.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.2)
xpath (~> 3.2)
chart-js-rails (0.1.6)
railties (> 3.1)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
chromedriver-helper (2.1.0)
archive-zip (~> 0.10)
nokogiri (~> 1.8)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.9.0)
execjs (2.2.2)
groupdate (2.4.0)
activesupport (>= 3)
haml (4.0.6)
tilt
i18n (0.7.0)
json (1.8.2)
libv8 (3.16.14.7)
minitest (5.5.1)
pg (0.18.1)
rack (1.5.2)
rack-protection (1.5.3)
rack
rake (10.3.2)
ref (1.0.5)
sinatra (1.4.5)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
sinatra-activerecord (2.0.2)
activerecord (>= 3.2)
sinatra (~> 1.0)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
thread_safe (0.3.4)
tilt (1.4.1)
tzinfo (1.2.2)
coffee-script-source (1.12.2)
concurrent-ruby (1.1.4)
crass (1.0.4)
devise (4.5.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 6.0)
responders
warden (~> 1.2.3)
devise-i18n (1.7.0)
devise (>= 4.5)
erubi (1.8.0)
execjs (2.7.0)
fastclick-rails (1.0.1)
ffi (1.9.25)
flot-rails (0.0.7)
jquery-rails
font-awesome-sass (4.7.0)
sass (>= 3.2)
gentelella-rails (0.1.11)
bootstrap-daterangepicker-rails (>= 0.1.7)
bootstrap-sass (~> 3.3.6)
chart-js-rails
coffee-rails
fastclick-rails
flot-rails
font-awesome-sass (~> 4.7.0)
icheck-rails
jquery-rails
momentjs-rails
nprogress-rails
parsley-rails
railties (>= 4.0)
sass-rails (>= 5.0)
select2-rails
switchery-rails
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (1.4.0)
concurrent-ruby (~> 1.0)
icheck-rails (1.0.2.2)
jquery-rails
rails (>= 3.1.0)
sass-rails
ihover-rails (1.0.0)
io-like (0.3.0)
jbuilder (2.8.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mimemagic (0.3.3)
mini_magick (4.9.2)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
momentjs-rails (2.20.1)
railties (>= 3.1)
msgpack (1.2.4)
multi_json (1.13.1)
nio4r (2.3.1)
nokogiri (1.10.0)
mini_portile2 (~> 2.4.0)
nprogress-rails (0.2.0.2)
orm_adapter (0.5.0)
parsley-rails (2.8.1.0)
railties (>= 3.0.0)
public_suffix (3.0.3)
puma (3.12.0)
rack (2.0.6)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.2)
actioncable (= 5.2.2)
actionmailer (= 5.2.2)
actionpack (= 5.2.2)
actionview (= 5.2.2)
activejob (= 5.2.2)
activemodel (= 5.2.2)
activerecord (= 5.2.2)
activestorage (= 5.2.2)
activesupport (= 5.2.2)
bundler (>= 1.3.0)
railties (= 5.2.2)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.2)
actionpack (= 5.2.2)
activesupport (= 5.2.2)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
regexp_parser (1.3.0)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
ruby_dep (1.5.0)
rubyzip (1.2.2)
sass (3.7.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
select2-rails (4.0.3)
thor (~> 0.14)
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
spring (2.0.2)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
switchery-rails (0.8.1.1)
railties (>= 3.2, < 6.0)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.9)
turbolinks (5.2.0)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
warden (1.2.8)
rack (>= 2.0.6)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
barista
bcrypt
chartkick
groupdate
haml
libv8
pg
rake
sinatra
sinatra-activerecord
therubyracer
bootsnap (>= 1.1.0)
byebug
capybara (>= 2.15)
chromedriver-helper
coffee-rails (~> 4.2)
devise
devise-i18n
gentelella-rails
ihover-rails
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
mini_magick
puma (~> 3.11)
rails (~> 5.2.2)
sass-rails (~> 5.0)
selenium-webdriver
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
RUBY VERSION
ruby 2.6.1p33
BUNDLED WITH
1.17.2
This diff is collapsed.
POSAO
====
# README
Logiciel de suivi des travaux sur plusieurs sites, par plusieurs techniciens.
This README would normally document whatever steps are necessary to get the
application up and running.
Licence
===
Things you may want to cover:
GPLv3 ou supérieur
* Ruby version
* System dependencies
* Configuration
* Database creation
* Database initialization
* How to run the test suite
* Services (job queues, cache servers, search engines, etc.)
* Deployment instructions
* ...
# Rakefile
# Copyright (c) 2015 Jean-Noël Rouchon <mail@mithrilre>
#
# This file is part of Posao.
# Copyright (c) 2019 Kevin Bloomfield <kevin.bloomfield9@outlook.fr>, Jean-Noël Rouchon <jnoel@mithril.re>
#
# Posao is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Posao is distributed in the hope that it will be useful,
# This file is part of Posao.
# Posao is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Posao is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
......@@ -17,10 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with Posao. If not, see <http://www.gnu.org/licenses/>.
require "sinatra/activerecord/rake"
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require_relative 'config/application'
namespace :db do
task :load_config do
require "./posao"
end
end
Rails.application.load_tasks
/*
Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
This file is part of Posao.
Posao is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Posao is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Posao. If not, see <http://www.gnu.org/licenses/>.
*/
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
This diff is collapsed.
This diff is collapsed.
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with Posao.
// If not, see <http://www.gnu.org/licenses/>.
// 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 activestorage
//= turbolink
//= require gentelella
//= require gentelella-custom
//= require activestorage
//= require_tree .
$( window ).load(function() {
console.log( "** jquery ready **" );
var url = window.location.pathname;
if (url.search("/tasks") >= 0) {
console.log( "** jquery tasks **" );
Tasks_init();
} else if (url.search("/maps") >= 0) {
console.log( "** jquery maps **" );
Maps_init();
} else if (url.search("/dots") >= 0) {
console.log( "** jquery dots **" );
Dots_init();
Maps_init();
}
});
\ No newline at end of file
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
//
// 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);
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
function Dots_init(){
$("#imagePlan").on("click", function (e) {
var offset = $(this).offset();
var x = e.clientX - offset.left + $(window).scrollLeft();
var y = e.clientY - offset.top + $(window).scrollTop();
var width = this.clientWidth;
var height = this.clientHeight;
console.log(width + " " + height);
$('#dot_x').val(x/width);
$('#dot_y').val(y/height);
$("#imagePoint").css({'top': $('#dot_y').val()*height-20+'px', 'left': $('#dot_x').val()*width-5+'px'});
console.log(x + " " + y);
});
setTimeout(function() {
setDotPosition();
}, 1000);
$(window).resize(function() {
setDotPosition();
});
function setDotPosition() {
console.log("setDotPosition");
var image = document.getElementById("imagePlan");
var width = image.clientWidth;
var height = image.clientHeight;
var x = $('#dot_x').val() * width - 5;
var y = $('#dot_y').val() * height - 20;
$("#imagePoint").css({ 'top': y + 'px', 'left': x + 'px' });
}
};
This diff is collapsed.
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
function Maps_init(){
setTimeout(function() {
setDotsPosition();
}, 1000);
$(window).resize(function() {
setDotsPosition();
});
function setDotsPosition() {
console.log("setDotsPosition");
var image = document.getElementById("imagePlan");
var width = image.clientWidth;
var height = image.clientHeight;
$(".dots").each(function() {
console.log($(this).width);
var x = $(this).data("x") * width - 5;
var y = $(this).data("y") * height - 20;
$(this).css({ 'top': y + 'px', 'left': x + 'px' });
});
}
};
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
# Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
#
# This file is part of Posao.
#
# Posao is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Posao is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Posao. If not, see <http://www.gnu.org/licenses/>.
# 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/
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
function Tasks_init(){
$(".category-option").on("click", function (e) {
$('#category_id').val($(this).data("id"));
});
};
\ No newline at end of file
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>, Kevin Bloomfield <kevin.bloomfield9@outlook.fr>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
@import "gentelella";
@import "gentelella-custom";
@import "user";
@import "dots";
@import "tasks";
@import "ihover";
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
// Place all the styles related to the Categories controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
// Copyright (c) 2019 Jean-Noël Rouchon <jnoel@mithril.re>
//
// This file is part of Posao.
//
// Posao is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Posao is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Posao. If not, see <http://www.gnu.org/licenses/>.
// Place all the styles related to the Companies controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/