fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gitignore fix
[wolnelektury.git]
/
apps
/
wolnelektury_core
/
static
/
js
/
base.js
diff --git
a/apps/wolnelektury_core/static/js/base.js
b/apps/wolnelektury_core/static/js/base.js
index
77315e6
..
7db29ab
100755
(executable)
--- a/
apps/wolnelektury_core/static/js/base.js
+++ b/
apps/wolnelektury_core/static/js/base.js
@@
-59,6
+59,7
@@
(function() {
var $current = null;
(function() {
var $current = null;
+ var menu_loaded = false;
$('.hidden-box-wrapper').each(function() {
var $hidden = $('.hidden-box', this);
$('.hidden-box-trigger', this).click(function(event) {
$('.hidden-box-wrapper').each(function() {
var $hidden = $('.hidden-box', this);
$('.hidden-box-trigger', this).click(function(event) {
@@
-70,6
+71,17
@@
$current && $current.hide('fast');
$hidden.show('fast');
$current = $hidden;
$current && $current.hide('fast');
$hidden.show('fast');
$current = $hidden;
+ if ($(this).hasClass('load-menu') && !menu_loaded) {
+ $.ajax({
+ url: '/katalog/',
+ dataType: "json",
+ }).done(function(data) {
+ $.each(data, function(index, value) {
+ $('#menu-' + index).html(value);
+ });
+ menu_loaded = true;
+ });
+ }
}
});
});
}
});
});
@@
-89,20
+101,19
@@
})();
})();
-
-
-$('#themes-list-toggle').click(function(event) {
+$('#show-menu').click(function(event) {
event.preventDefault();
event.preventDefault();
- $('#themes-list').toggle('slow');
+ $('#menu').toggle('slow');
+});
+$('#book-list-nav h2').click(function(event) {
+ event.preventDefault();
+ $('#book-list-nav-index').toggle();
});
});
-$('
.open-player
').click(function(event) {
+$('
#themes-list-toggle
').click(function(event) {
event.preventDefault();
event.preventDefault();
- window.open($(this).attr('href'),
- 'player',
- 'width=422, height=500'
- );
+ $('#themes-list').toggle('slow');
});
});