Merge pull request #4 from jonatkins/master

updating fork
This commit is contained in:
reckter
2015-11-17 10:28:44 +01:00
45 changed files with 1072 additions and 1002 deletions

View File

@ -295,26 +295,36 @@
}
// Append a 'star' flag in sidebar.
window.plugin.bookmarks.onPortalSelectedPending = false;
window.plugin.bookmarks.onPortalSelected = function() {
$('.bkmrksStar').remove();
if(window.selectedPortal == null) return;
setTimeout(function() { // the sidebar is constructed after firing the hook
if(typeof(Storage) === "undefined") {
$('#portaldetails > .imgpreview').after(plugin.bookmarks.htmlDisabledMessage);
return;
}
if (!window.plugin.bookmarks.onPortalSelectedPending) {
window.plugin.bookmarks.onPortalSelectedPending = true;
// Prepend a star to mobile status-bar
if(window.plugin.bookmarks.isSmart) {
$('#updatestatus').prepend(plugin.bookmarks.htmlStar);
$('#updatestatus .bkmrksStar').attr('title', '');
}
setTimeout(function() { // the sidebar is constructed after firing the hook
window.plugin.bookmarks.onPortalSelectedPending = false;
$('.bkmrksStar').remove();
if(typeof(Storage) === "undefined") {
$('#portaldetails > .imgpreview').after(plugin.bookmarks.htmlDisabledMessage);
return;
}
// Prepend a star to mobile status-bar
if(window.plugin.bookmarks.isSmart) {
$('#updatestatus').prepend(plugin.bookmarks.htmlStar);
$('#updatestatus .bkmrksStar').attr('title', '');
}
$('#portaldetails > h3.title').before(plugin.bookmarks.htmlStar);
window.plugin.bookmarks.updateStarPortal();
}, 0);
}
$('#portaldetails > h3.title').before(plugin.bookmarks.htmlStar);
window.plugin.bookmarks.updateStarPortal();
}, 0);
}
// Update the status of the star (when a portal is selected from the map/bookmarks-list)