Initial commit
This commit is contained in:
parent
c04b041d10
commit
0d9f12f159
|
@ -0,0 +1,19 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 Onestein (<http://www.onestein.nl>).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program 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 Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
|
@ -0,0 +1,42 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 Onestein (<http://www.onestein.nl>).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program 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 Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': "Web Calendar Year",
|
||||||
|
'images': ['static/description/main_screenshot.png'],
|
||||||
|
'summary': """Year view on Odoo calendar""",
|
||||||
|
'description': """
|
||||||
|
Year calendar view
|
||||||
|
==================
|
||||||
|
Extends the default calendar widget with a year view.
|
||||||
|
""",
|
||||||
|
'author': "Onestein",
|
||||||
|
'website': "http://www.onestein.eu",
|
||||||
|
'category': 'Extra Tools',
|
||||||
|
'version': '1.0',
|
||||||
|
'depends': ['web_calendar'],
|
||||||
|
'data': [
|
||||||
|
'views/web_calendar_year.xml',
|
||||||
|
],
|
||||||
|
'demo': [],
|
||||||
|
'installable': True,
|
||||||
|
'auto_install': False,
|
||||||
|
'application': False,
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
This module adds a year view to all Odoo calendar views for all users.
|
||||||
|
|
||||||
|
No configuration is needed.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
**Contact us:**
|
||||||
|
|
||||||
|
When you have any remark about this module, please let us know on http://www.onestein.eu/feedback
|
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
|
@ -0,0 +1,19 @@
|
||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">Year calendar</h2>
|
||||||
|
<h3 class="oe_slogan">Overview throughout the year</h3>
|
||||||
|
<div class="oe_span12">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
For several planning tasks the month scope is too short. The year overview will give you optimal insight for planning purposes.
|
||||||
|
This is especially useful for leave requests, appraisal planning and project task planning.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="oe_span12">
|
||||||
|
<div class="oe_demo oe_picture oe_screenshot">
|
||||||
|
<img src="Web_year_cal_1.png" alt="Year calendar">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
Binary file not shown.
After Width: | Height: | Size: 142 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,39 @@
|
||||||
|
openerp.web_calendar_year = function(instance) {
|
||||||
|
|
||||||
|
instance.web_calendar.CalendarView = instance.web_calendar.CalendarView.extend({
|
||||||
|
get_fc_init_options: function() {
|
||||||
|
var options = this._super();
|
||||||
|
options.buttonText.year = instance.web._t("Year");
|
||||||
|
options.header.right = "year,month,agendaWeek,agendaDay";
|
||||||
|
options.eventAfterAllRender = function() {
|
||||||
|
console.log("eventAfterAllRender");
|
||||||
|
var tableBody = $('.oe_view_manager_body');
|
||||||
|
tableBody.find('.fake-thead').remove();
|
||||||
|
tableBody.scroll();
|
||||||
|
}
|
||||||
|
return options;
|
||||||
|
},
|
||||||
|
init_calendar: function() {
|
||||||
|
console.log("Init calendar");
|
||||||
|
$('.oe_view_manager_body').scroll(function(e, handler) {
|
||||||
|
if($(this).scrollTop() > 43) {
|
||||||
|
var theads = $(this).find('.fake-thead');
|
||||||
|
if(theads.length == 0) {
|
||||||
|
var original = $(this).find(".fc-skeleton");
|
||||||
|
var headClone = original.clone();
|
||||||
|
headClone.find("tbody").remove();
|
||||||
|
headClone.css({ 'position': 'absolute', 'left': 0, 'top': $(this).scrollTop(), 'margin-left': '5px', 'z-index': 10, 'width': (original.css("width") == "100%") ? original.width() + 'px' : original.css("width") });
|
||||||
|
headClone.find("th").css({'text-align': 'center'});
|
||||||
|
headClone.addClass('fake-thead');
|
||||||
|
$(this).append(headClone);
|
||||||
|
} else {
|
||||||
|
theads.css({ 'top': $(this).scrollTop() });
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$(this).find('.fake-thead').remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return this._super.apply(this, arguments);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
<template id="assets_backend" name="web_calendar_year assets" inherit_id="web.assets_backend">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
<script type="text/javascript" src="/web_calendar_year/static/src/js/fullcalendar.js"></script>
|
||||||
|
<script type="text/javascript" src="/web_calendar_year/static/src/js/web_calendar_year.js"></script>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
</data>
|
||||||
|
</openerp>
|
Loading…
Reference in New Issue