Drupal 8 stable release

This commit is contained in:
Mevaser of Yehudah
2023-12-14 11:32:04 -06:00
commit 69ad5c7e2e
30 changed files with 2969 additions and 0 deletions

17
js/3dflipbook.min.js vendored Normal file

File diff suppressed because one or more lines are too long

7
js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

94
js/default-book-view.js Normal file
View File

@@ -0,0 +1,94 @@
function init(container) {
var instance;
if(window.jQuery) {
var $ = window.jQuery;
instance = {
floatWnd: container.find('.float-wnd'),
binds: {
showDropMenu: function(e) {
e.preventDefault();
var el = $(e.target);
while(!el.hasClass('toggle')) {
el = $(el[0].parentNode);
}
var menu = el.find('.menu');
if(menu.hasClass('hidden')) {
container.find('.ctrl .fnavbar .menu').addClass('hidden');
menu.removeClass('hidden');
e.stopPropagation();
}
},
hideDropMenu: function() {
container.find('.ctrl .fnavbar .menu').addClass('hidden');
},
pickFloatWnd: function(e) {
if(instance.pos) {
instance.binds.dropFloatWnd();
}
else {
instance.pos = {
x: e.pageX,
y: e.pageY
};
}
},
moveFloatWnd: function(e) {
if(instance.pos) {
var dv = {
x: e.pageX-instance.pos.x,
y: e.pageY-instance.pos.y
}, old = {
x: parseInt(instance.floatWnd.css('left')),
y: parseInt(instance.floatWnd.css('top'))
};
instance.floatWnd.css('left', old.x+dv.x+'px').css('top', old.y+dv.y+'px');
instance.pos = {
x: e.pageX,
y: e.pageY
};
}
},
dropFloatWnd: function() {
delete instance.pos;
},
jsCenter: function() {
var ns = container.find('.js-center');
for(var i=0; i<ns.length; ++i) {
var n = $(ns[i]), parentWidth = $(ns[i].parentNode).width(), width = n.width();
n.css('left', 0.5*(parentWidth-width)+'px');
}
}
},
appLoaded: function() {
instance.binds.jsCenter();
},
dispose: function() {
container.find('.ctrl .fnavbar .fnav .toggle').off('click', instance.binds.showDropMenu);
$(container[0].ownerDocument).off('click', instance.binds.hideDropMenu);
$(container[0].ownerDocument).off('mousemove', instance.binds.moveFloatWnd);
$(container[0].ownerDocument).off('mouseup', instance.binds.dropFloatWnd);
instance.floatWnd.find('.header').off('mousedown', instance.binds.pickFloatWnd);
$(container[0].ownerDocument.defaultView).off('resize', instance.binds.jsCenter);
}
};
container.find('.ctrl .fnavbar .fnav .toggle').on('click', instance.binds.showDropMenu);
$(container[0].ownerDocument).on('click', instance.binds.hideDropMenu);
$(container[0].ownerDocument).on('mousemove', instance.binds.moveFloatWnd);
$(container[0].ownerDocument).on('mouseup', instance.binds.dropFloatWnd);
instance.floatWnd.find('.header').on('mousedown', instance.binds.pickFloatWnd);
$(container[0].ownerDocument.defaultView).on('resize', instance.binds.jsCenter);
instance.binds.jsCenter();
}
else {
instance = {
dispose: function() {
}
};
console.error('jQuery is not found');
}
return instance;
} init

47
js/freepaper-actions.js Normal file
View File

@@ -0,0 +1,47 @@
$('[data-action="freepaper-flipbook"]').on('click',function(){
var button = $(this);
// Try to load the related receiver and title. If we are from the view, it will find a container
var container = button.parents(".pub__container"); // freepaper container
if (container.length!=0) {
var receiver = container.children(".receiver");
var title = container.children("h4").text();
} else {
// Otherwise, we are in the publication page and there's only one receiver.
var receiver = $('#receiver');
var title = $('.pub-title').text();
}
var path = drupalSettings.host + "/" + drupalSettings.modulepath;
var pdf=button.data('pdf');
var template = {
html: path + '/templates/default-book-view.html',
pdf: pdf,
controlsProps: {
downloadURL: pdf,
},
links: [{
rel: 'stylesheet',
href: path + '/css/font-awesome.min.css'
}],
styles: [
path + '/css/short-black-book-view.css'
],
script: path + '/js/default-book-view.js',
};
receiver.load(path + '/templates/flipbook-modal.html', function () {
$('#flipbookModalLabel').text(title);
$('#flipbook-modal').on('hidden.bs.modal', function() {
book.dispose();
receiver.text("");
});
$('#flipbook-modal').modal('show');
var book = $('#flipbook').FlipBook({
pdf: pdf,
template: template
});
});
});

1053
js/granim.js Normal file

File diff suppressed because it is too large Load Diff

2
js/granim.min.js vendored Normal file

File diff suppressed because one or more lines are too long

8
js/html2canvas.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
js/pdf.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
js/pdf.worker.js vendored Normal file

File diff suppressed because one or more lines are too long

831
js/three.min.js vendored Normal file

File diff suppressed because one or more lines are too long