[ADD] base modules

This commit is contained in:
Muhammad
2024-04-07 12:43:39 +05:00
parent 311598a929
commit fa3d921e2d
276 changed files with 51186 additions and 0 deletions

10037
kk_odoo_saas/static/src/css/bootstrap.css vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,171 @@
.col-lg-12{
flex: 0 0 100%;
max-width: 100%;
}
#price{
display: inline;
}
.pricing-card-title{
font-size: 32px;
}
.users-qty-change-buttons{
max-width: 30px;
max-height: 30px;
opacity: 0.5;
cursor: pointer;
}
.loader{
position: fixed;
z-index: 99;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: white;
display: flex;
justify-content: center;
align-items: center;
opacity: 0.5;
}
.status{
font-size: 26px;
color: black;
position: fixed;
margin-top: -70px;
}
.loader > img {
width: 100px;
opacity: 0.6;
transform: rotate(-30deg);
}
.transition {
transition: 0.3s;
}
.app, .package{
max-height: 95px;
display: flex;
margin-bottom: 10px;
min-width: 174px;
cursor: pointer;
}
.app-data{
margin-left: 5%;
}
.price-value{
display: inline;
}
.period{
display: inline;
}
.green-border{
border: 2px solid green;
}
.normal-border{
border: 2px solid #FFFFFF;
}
.hid{
display: none;
}
.fnt-24{
font-size: 24px;
}
.leftstr, .rightstr {
float: left;
width: 50%;
}
.rightstr {
text-align: right;
}
.fnt-larger{
font-size: larger;
}
@media (min-width: 1400px) {
#price-window
{
position: fixed;
right: 30%;
top: 20%;
width: 15%;
min-width: 20%;
z-index: 1;
}
.page-alignment{
min-width: 640px;
}
.main-column{
margin-right: auto;
margin-left: 10%;
max-width: 50%;
}
}
@media (min-width: 999px) {
#price-window
{
position: fixed;
right: 15%;
top: 15%;
width: 20%;
z-index: 1;
}
.main-column{
margin-right: auto;
margin-left: 10%;
max-width: 50%;
}
.page-alignment{
min-width: 640px;
}
.app, .package{
margin-left: 7px;
max-width: 31%;
}
}
@media (max-width: 799px) {
#price-window
{
position: fixed;
right: 0;
bottom: -6%;
width: 100%;
z-index: 1;
}
.container{
margin-left: auto !important;
}
.main-column{
margin-right: auto;
margin-left: 10%;
max-width: 80%;
}
}
.col-lg-9{
padding-left: 0px;
}

2338
kk_odoo_saas/static/src/css/font-awesome.css vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,71 @@
html, body {
height: 100%;
}
.o-logs-container{
height: auto;
}
.o-logs{
word-wrap: break-word;
font-family: monospace;
font-size: 13px;
line-height: normal;
margin: 0;
padding-top:80px;
}
.header{
position: fixed;
top: 0;
width: 100%;
background: #f9f9f9;
border-bottom: 1px solid #d3d3d3;
padding: 6px 15px;
box-shadow: 0 0 6px #ddd;
}
.status-bar {
text-align: right;
padding-right: 15px;
}
.button-pause{
position: relative;
color: #555;
font-size: 16px;
padding: 0;
margin-right: 10px;
}
.button-pause i{
margin-left: 9px;
margin-right: 5px;
}
.loader{
position: absolute;
top: -4px;
border: 2px solid #f3f3f3;
border-top: 2px solid #555;
border-radius: 50%;
width: 30px;
height: 30px;
z-index: -1;
}
.loader.loading{
-webkit-animation: spin 1s linear infinite;
animation: spin 1s linear infinite;
}
.form-inline .form-group {
margin-bottom: 0;
vertical-align: middle;
display: inline-block;
}
.form-inline .form-group input {
display: inline-block;
width: auto;
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

10364
kk_odoo_saas/static/src/js/jquery.js vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,169 @@
'use strict';
var FETCH_SIZE = 10000;
var FETCH_INTERVAL_TIME = 5000;
var AUTO_PAUSE_TIME = 1000 * 60 * 5;
function fetch_logs(begin, end) {
return $.ajax({
dataType: "text",
cache: false,
headers: {Range: 'bytes=' + (begin === false ? '' : begin) + '-' + (end === false ? '' : end)},
}).then(function (data, s, xhr) {
data = data.replace(/^\n/, "");
data = data.replace(/\n$/, "");
var content_range = xhr.getResponseHeader("Content-Range");
var bytes = content_range ? /bytes ([0-9]*)-([0-9]*)\/([0-9]*)/.exec(content_range) : undefined;
var begin = bytes ? parseInt(bytes[1]) : 0;
var end = bytes ? parseInt(bytes[2]) : data.length;
var size = bytes ? parseInt(bytes[3]) : data.length + 1;
return {
data: data,
begin: begin,
end: end,
size: size,
};
});
}
$(document).ready(function () {
var fetch_interval;
var min;
var max;
var auto_scroll = true;
var def_top;
var def_bottom;
function init() {
$('.o-logs span').remove();
return fetch_logs(false, 1).then(function (result) {
min = max = Math.max(0, result.size - FETCH_SIZE);
def_bottom = def_top = undefined;
});
}
// borrowed from https://github.com/janl/mustache.js/blob/master/mustache.js
function _escapeHTML(string) {
var entityMap = {
'&': '&',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
'/': '&#x2F;',
'`': '&#x60;',
'=': '&#x3D;'
};
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap(s) {
return entityMap[s];
});
}
function _prepare_line(line) {
var result = '<span class="o-log-line">'
line.split('\n').forEach(function (l) {
result += '<span style="white-space: pre;">' + _escapeHTML(l) + '</span><br/>';
});
result += '</span>'
result = $(result);
filter(result);
return result;
}
function append_logs() {
if (!def_bottom || def_bottom.state() !== 'pending') {
def_bottom = fetch_logs(max, false).then(function (result) {
if (max !== result.end) {
max = result.end;
var splits = result.data.split(/\s+(?=[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3})/)
splits.forEach(function (line) {
$('.o-logs').append(_prepare_line(line));
});
if (auto_scroll) {
window.scrollTo(0, document.body.scrollHeight);
}
}
}).fail(function (xhr) {
if (xhr.status === 416) {
return init();
}
});
}
return def_bottom;
}
function prepend_logs() {
if (min > 0 && (!def_top || def_top.state() !== 'pending')) {
def_top = fetch_logs(Math.max(0, min - FETCH_SIZE), min).then(function (result) {
min = result.begin;
var lines = result.data.split('\n');
var first_line = lines.pop();
if (first_line) {
$('.o-logs span').first().prepend(_escapeHTML(first_line));
}
lines.reverse();
lines.forEach(function (line) {
$('.o-logs').prepend(_prepare_line(line));
});
window.scrollTo(0, 20);
}).fail(function (xhr) {
if (xhr.status === 416) {
return init();
}
});
}
return def_top;
}
function toggle_pause() {
$('i').toggle();
$('.loader').toggleClass('loading');
if (fetch_interval) {
clearInterval(fetch_interval);
fetch_interval = undefined;
} else {
fetch_interval = setInterval(append_logs, FETCH_INTERVAL_TIME);
setTimeout(toggle_pause, AUTO_PAUSE_TIME);
}
}
function filter(elements) {
var filter = $('#filter').val();
elements.filter(':contains(' + filter + ')').show();
elements.filter(':not(:contains(' + filter + '))').hide();
}
$(window).scroll(function () {
if ($(window).scrollTop() + $(window).height() === $(document).height()) {
auto_scroll = true;
} else {
auto_scroll = false;
}
if ($(window).scrollTop() === 0) {
prepend_logs();
}
});
function fill_page() {
if (!def_bottom) {
append_logs().then(fill_page);
} else if ($(window).height() === $(document).height() && min != 0 && (!def_top || def_top.state() !== 'pending')) {
prepend_logs().then(fill_page);
} else {
$(window).scrollTop($(document).height());
}
}
init().then(function () {
fill_page();
toggle_pause();
});
$('.button-pause').click(toggle_pause);
$('#filter').on('input', function () {
filter($('.o-logs .o-log-line'));
});
$('#filter').keypress(function (event) {
if (event.keyCode === 10 || event.keyCode === 13) {
event.preventDefault();
}
});
});

View File

@@ -0,0 +1,29 @@
odoo.define('saas_apps.filter_button', function (require) {
"use strict";
var core = require('web.core');
var session = require('web.session');
var ListController = require('web.ListController');
ListController.include({
renderButtons: function($node) {
this._super.apply(this, arguments);
if (this.$buttons) {
var refresh_apps_button = this.$buttons.find('.refresh_apps_button');
if (refresh_apps_button.length) {
refresh_apps_button.on("click", this.proxy('refresh_apps_button'));
}
}
},
refresh_apps_button: function () {
// Loading all modules in saas.line from ir.module.module
this._rpc({
"model": "saas.app",
"method": "action_make_applist_from_local_instance",
"args": [],
}).then(function (result) {
window.location.reload()
});
}
});
});

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<template xml:space="preserve">
<t t-extend="ListView.buttons">
<t t-jquery="button.o_list_button_add" t-operation="after">
<button t-if="widget.modelName == 'saas.app'" type="button" class="btn btn-primary refresh_apps_button" accesskey="f">
Refresh
</button>
</t>
</t>
</template>