Commit 1ad21cde authored by Gaurav Mishra's avatar Gaurav Mishra 🐼

Merge branch 'feat/libjs/use-debian-packages' into 'master'

feat(libjs): Use libjs- packages

See merge request !26
parents 9ed33fd0 f6dc70b9
Pipeline #50381 passed with stages
in 29 minutes and 58 seconds
......@@ -8,7 +8,7 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.editable.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.select.js" type="text/javascript"></script>
<script src="scripts/jquery.jeditable.js" type="text/javascript"></script>
......
......@@ -46,7 +46,7 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.editable.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.select.js" type="text/javascript"></script>
<script src="scripts/jquery.jeditable.js" type="text/javascript"></script>
......
......@@ -354,8 +354,8 @@ abstract class DefaultPlugin implements Plugin
$vars[self::TITLE] = htmlentities($this->title);
}
$styles = "<link rel='stylesheet' href='css/jquery-ui.css'>\n";
$styles .= "<link rel='stylesheet' href='css/select2.min.css'>\n";
$styles = "<link rel='stylesheet' href='/javascript/jquery-ui/themes/base/jquery-ui.css'>\n";
$styles .= "<link rel='stylesheet' href='/javascript/select2.js/select2.css'>\n";
$styles .= "<link rel='stylesheet' href='css/jquery.dataTables.css'>\n";
$styles .= "<link rel='stylesheet' href='css/fossology.css'>\n";
$styles .= "<link rel='icon' type='image/x-icon' href='favicon.ico'>\n";
......
......@@ -331,8 +331,8 @@ class FO_Plugin implements Plugin
$this->vars['title'] = htmlentities($this->Title);
}
$styles = "<link rel='stylesheet' href='css/jquery-ui.css'>\n";
$styles .= "<link rel='stylesheet' href='css/select2.min.css'>\n";
$styles = "<link rel='stylesheet' href='/javascript/jquery-ui/themes/base/jquery-ui.css'>\n";
$styles .= "<link rel='stylesheet' href='/javascript/select2.js/select2.css'>\n";
$styles .= "<link rel='stylesheet' href='css/jquery.dataTables.css'>\n";
$styles .= "<link rel='stylesheet' href='css/fossology.css'>\n";
$styles .= "<link rel='icon' type='image/x-icon' href='favicon.ico'>\n";
......
......@@ -337,7 +337,7 @@ class admin_obligation_file extends FO_Plugin
$vars['candidateSelectorName'] = 'candidateSelector[]';
$vars['candidateSelectorId'] = 'candidateSelectorId';
$scripts = "<script src='scripts/tools.js' type='text/javascript'></script>
<script src='scripts/select2.full.min.js'></script>
<script src='/javascript/select2.js/select2.min.js'></script>
<script type='text/javascript'>
$('#licenseSelectorId').select2({'placeholder': 'Select licenses associated with this obligation'});
</script>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* jQuery Cookie Plugin v1.4.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2013 Klaus Hartl
* Released under the MIT license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// CommonJS
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var pluses = /\+/g;
function encode(s) {
return config.raw ? s : encodeURIComponent(s);
}
function decode(s) {
return config.raw ? s : decodeURIComponent(s);
}
function stringifyCookieValue(value) {
return encode(config.json ? JSON.stringify(value) : String(value));
}
function parseCookieValue(s) {
if (s.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape...
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}
try {
// Replace server-side written pluses with spaces.
// If we can't decode the cookie, ignore it, it's unusable.
// If we can't parse the cookie, ignore it, it's unusable.
s = decodeURIComponent(s.replace(pluses, ' '));
return config.json ? JSON.parse(s) : s;
} catch(e) {}
}
function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value;
}
var config = $.cookie = function (key, value, options) {
// Write
if (value !== undefined && !$.isFunction(value)) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setTime(+t + days * 864e+5);
}
return (document.cookie = [
encode(key), '=', stringifyCookieValue(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// Read
var result = key ? undefined : {};
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling $.cookie().
var cookies = document.cookie ? document.cookie.split('; ') : [];
for (var i = 0, l = cookies.length; i < l; i++) {
var parts = cookies[i].split('=');
var name = decode(parts.shift());
var cookie = parts.join('=');
if (key && key === name) {
// If second argument (value) is a function it's a converter...
result = read(cookie, value);
break;
}
// Prevent storing a cookie that we couldn't decode.
if (!key && (cookie = read(cookie)) !== undefined) {
result[name] = cookie;
}
}
return result;
};
config.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key) === undefined) {
return false;
}
// Must not alter options, thus extending a fresh object...
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
return !$.cookie(key);
};
}));
This diff is collapsed.
This diff is collapsed.
......@@ -8,7 +8,7 @@
{% block styles %}
{{ parent() }}
<link rel="stylesheet" href="css/jquery.treeview.css"/>
<link rel="stylesheet" href="css/select2.min.css"/>
<link rel="stylesheet" href="/javascript/select2.js/select2.css"/>
{% endblock %}
{% block content %}
......@@ -48,7 +48,7 @@
{{ parent() }}
<script src="scripts/tools.js" type="text/javascript"></script>
<script src="scripts/jquery.treeview.js" type="text/javascript"></script>
<script src="scripts/select2.full.min.js" type="text/javascript"></script>
<script src="/javascript/select2.js/select2.min.js" type="text/javascript"></script>
<script>
$(document).ready(function () {
$('#toFolder').select2({
......
......@@ -23,9 +23,9 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.select.js" type="text/javascript"></script>
<script src="scripts/jquery-ui.js" type="text/javascript"></script>
<script src="/javascript/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript">
function createBrowseTable() {
......
......@@ -29,7 +29,7 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.select.js" type="text/javascript"></script>
{% if data %}
<script type="text/javascript"> {% include 'admin_license_file.js.twig' %}</script>
......
......@@ -29,7 +29,7 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.select.js" type="text/javascript"></script>
<script type="text/javascript">
function createBrowseTable() {
......
......@@ -70,7 +70,7 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.select.js" type="text/javascript"></script>
<script src="scripts/jquery.plainmodal.min.js" type="text/javascript"></script>
<script src="scripts/job-queue-poll.js" type="text/javascript"></script>
......
......@@ -17,7 +17,7 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.plainmodal.min.js" type="text/javascript"></script>
<script src="scripts/job-queue-poll.js" type="text/javascript"></script>
<script src="scripts/change-license-common.js" type="text/javascript"></script>
......
......@@ -40,7 +40,7 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.select.js" type="text/javascript"></script>
<script src="scripts/jquery.plainmodal.min.js" type="text/javascript"></script>
<script src="scripts/job-queue-poll.js" type="text/javascript"></script>
......
......@@ -4,9 +4,9 @@
are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
This file is offered as-is, without any warranty.
#}
<script src="scripts/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="scripts/jquery-ui.js" type="text/javascript"></script>
<script src="scripts/select2.full.min.js" type="text/javascript"></script>
<script src="/javascript/jquery/jquery.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="/javascript/select2.js/select2.min.js" type="text/javascript"></script>
<script type="text/javascript">
function renderSelect2() {
if(!$('.ui-render-select2').attr("size") > 0) {
......
......@@ -7,7 +7,7 @@
{% extends "include/base.html.twig" %}
{% block styles %}
{{ parent() }}
<link rel="stylesheet" type="text/css" href="css/select2.min.css"/>
<link rel="stylesheet" type="text/css" href="/javascript/select2.js/select2.css"/>
{% endblock %}
{% block content %}
<p>
......
......@@ -85,12 +85,12 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.select.js" type="text/javascript"></script>
<script src="scripts/browse.js" type="text/javascript"></script>
<script src="scripts/jquery.plainmodal.min.js" type="text/javascript"></script>
<script src="scripts/tools.js" type="text/javascript"></script>
<script src="scripts/jquery.treeview.js" type="text/javascript"></script>
<script src="scripts/jquery.cookie.js" type="text/javascript"></script>
<script src="/javascript/jquery-cookie/jquery.cookie.min.js" type="text/javascript"></script>
<script type="text/javascript"> {% include 'ui-browse.js.twig' %}</script>
{% endblock %}
......@@ -46,7 +46,7 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.editable.js" type="text/javascript"></script>
<script src="scripts/jquery.jeditable.js" type="text/javascript"></script>
<script src="scripts/jquery.validate.js" type="text/javascript"></script>
......
......@@ -28,7 +28,7 @@
{% endblock %}
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/tools.js" type="text/javascript"></script>
<script type="text/javascript">{% include "ui-job-show.js.twig" %}</script>
{% endblock %}
......@@ -74,7 +74,7 @@
{% block foot %}
{{ parent() }}
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.select.js" type="text/javascript"></script>
<script type="text/javascript">
dataTableConfig = {
......
......@@ -162,7 +162,8 @@ if [[ $RUNTIME ]]; then
poppler-utils upx-ucl \
unrar-free unzip p7zip-full p7zip wget \
subversion git \
dpkg-dev
dpkg-dev \
libjs-jquery libjs-jquery-cookie libjs-jquery-datatables libjs-jquery-ui libjs-select2.js
case "$CODENAME" in
jessie)
apt-get $YesOpt install postgresql-9.4 libapache2-mod-php5 php5 php5-pgsql php5-cli php5-curl heirloom-mailx libboost-program-options1.55.0 libboost-regex1.55.0;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment