|
|
@@ -964,9 +964,17 @@ jQuery(document).ready(function() {
|
|
|
(function (global) {
|
|
|
if (!global.p5UI__MenuStore) throw 'Missing global.p5UI__MenuStore'
|
|
|
|
|
|
+ function _changeIconStarToLoading(node) {
|
|
|
+ if (!node.classList.contains('glyphicon-star') && !node.classList.contains('glyphicon-star-empty')) return;
|
|
|
+ node.classList.remove('glyphicon-star', 'glyphicon-star-empty')
|
|
|
+ node.classList.add('glyphicon-refresh')
|
|
|
+ }
|
|
|
+
|
|
|
function p5BookmarksAdd(e, id) {
|
|
|
e.preventDefault()
|
|
|
e.stopPropagation()
|
|
|
+ if (e.target.classList.contains('glyphicon-refresh')) return;
|
|
|
+ _changeIconStarToLoading(e.target)
|
|
|
global.p5UI__MenuStore.remoteUpdate({
|
|
|
'_postTask': 'addBookmark',
|
|
|
'_zasobID': id,
|
|
|
@@ -975,6 +983,8 @@ jQuery(document).ready(function() {
|
|
|
function p5BookmarksRemove(e, id) {
|
|
|
e.preventDefault()
|
|
|
e.stopPropagation()
|
|
|
+ if (e.target.classList.contains('glyphicon-refresh')) return;
|
|
|
+ _changeIconStarToLoading(e.target)
|
|
|
global.p5UI__MenuStore.remoteUpdate({
|
|
|
'_postTask': 'removeBookmark',
|
|
|
'_zasobID': id,
|
|
|
@@ -987,7 +997,7 @@ jQuery(document).ready(function() {
|
|
|
");
|
|
|
|
|
|
UI::inlineCSS(APP_PATH_WWW . '/static/p5UI/initP5MainMenuDropdown.css');
|
|
|
- UI::inlineJS(APP_PATH_WWW . '/static/p5UI/initP5MainMenuDropdown.js');
|
|
|
+ UI::inlineJS(APP_PATH_WWW . '/static/p5UI/initP5MainMenuDropdown.js', [ 'DBG' => 0 ]);
|
|
|
|
|
|
echo UI::h('script', [], "
|
|
|
(function (global) {
|