some work towards making places and events editable from annotations panel (#561)

This commit is contained in:
rolux 2012-02-21 10:11:01 +00:00
parent 4629d64361
commit b77045f375
6 changed files with 11 additions and 4 deletions

View file

@ -66,6 +66,7 @@ pandora.URL = (function() {
if (Ox.isEmpty(state)) {
if (pandora.user.ui.showHome) {
Ox.print('*** showScreen via URL')
pandora.$ui.home = pandora.ui.home().showScreen();
}
callback && callback();

View file

@ -49,6 +49,7 @@ pandora.ui.appPanel = function() {
}
} else if (page == 'home') {
// if we're on page load, show screen immediately
Ox.print('*** ' + (!pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen') + ' via appPanel')
pandora.$ui.home = pandora.ui.home()[
!pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen'
]();

View file

@ -2,7 +2,8 @@
'use strict';
pandora.ui.eventsDialog = function() {
pandora.ui.eventsDialog = function(options) {
// options can be {id: '...'} or {name: '...'}
var height = Math.round((window.innerHeight - 48) * 0.9),
width = Math.round(window.innerWidth * 0.9),
that = Ox.Dialog({
@ -93,6 +94,7 @@ pandora.ui.eventsDialog = function() {
callback(result);
});
},
selected: options ? options.id : '',
showControls: pandora.user.ui.showCalendarControls,
width: width
})

View file

@ -585,7 +585,7 @@ pandora.ui.home = function() {
return that;
};
that.showScreen = function() {
that.showScreen = function(callback) {
that.css({opacity: 1}).appendTo(Ox.UI.$body);
$box.css({marginTop: '80px'});
that.find('*').css({opacity: 1});
@ -600,6 +600,7 @@ pandora.ui.home = function() {
});
}, 250);
*/
callback && callback();
return that;
};

View file

@ -339,8 +339,9 @@ pandora.ui.item = function() {
pandora.UI.set({annotationsSort: data.sort});
},
define: function(data) {
pandora.$ui.placesDialog && pandora.$ui.placesDialog.remove();
pandora.$ui.placesDialog = pandora.ui.placesDialog(data).open();
var dialog = data.type + 'sDialog';
pandora.$ui[dialog] && pandora.$ui[dialog].remove();
pandora.$ui[dialog] = pandora.ui[dialog](data).open();
},
downloadvideo: function(data) {
document.location.href = '/' + pandora.user.ui.item + '/torrent/';

View file

@ -4,6 +4,7 @@
pandora.ui.placesDialog = function(options) {
// options can be {id: '...'} or {name: '...'}
Ox.print('placesDialog', options);
var height = Math.round((window.innerHeight - 48) * 0.9),
width = Math.round(window.innerWidth * 0.9),
$content = Ox.ListMap({