fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Picture import: split theme names, more space for titles.
[wolnelektury.git]
/
apps
/
wolnelektury_core
/
static
/
js
/
picture.js
diff --git
a/apps/wolnelektury_core/static/js/picture.js
b/apps/wolnelektury_core/static/js/picture.js
index
b058967
..
2464220
100644
(file)
--- a/
apps/wolnelektury_core/static/js/picture.js
+++ b/
apps/wolnelektury_core/static/js/picture.js
@@
-54,10
+54,12
@@
}
var initial_hash = window.location.hash;
if (initial_hash) {
}
var initial_hash = window.location.hash;
if (initial_hash) {
- var mk = null;
- if (initial_hash.startsWith('#object-')) {
+ var mk = null,
+ objectPrefix = '#object-',
+ themePrefix = '#theme-';
+ if (initial_hash.substr(0, objectPrefix.length) === objectPrefix) {
$("[href=#picture-objects]").trigger('click');
$("[href=#picture-objects]").trigger('click');
- } else if (initial_hash.s
tartsWith('#theme-')
) {
+ } else if (initial_hash.s
ubstr(0, themePrefix.length) === themePrefix
) {
$("[href=#picture-themes]").trigger('click');
}
mk = $("[href=" + initial_hash + "]").eq(0);
$("[href=#picture-themes]").trigger('click');
}
mk = $("[href=" + initial_hash + "]").eq(0);