From cd1f4c93ee37fb1483aa5f028fa303b4403eac4b Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 1 Feb 2012 18:08:03 +0000 Subject: [PATCH] add annotationDialog --- static/js/pandora/annotationDialog.js | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 static/js/pandora/annotationDialog.js diff --git a/static/js/pandora/annotationDialog.js b/static/js/pandora/annotationDialog.js new file mode 100644 index 00000000..135a7f9e --- /dev/null +++ b/static/js/pandora/annotationDialog.js @@ -0,0 +1,43 @@ +// vim: et:ts=4:sw=4:sts=4:ft=javascript + +pandora.ui.annotationDialog = function(layer) { + var $dialog = Ox.Dialog({ + buttons: [ + Ox.Button({title: 'Sign Up...'}).bindEvent({ + click: function() { + $dialog.close(); + pandora.$ui.accountDialog = pandora.ui.accountDialog('signup').open(); + } + }), + Ox.Button({title: 'Sign In...'}).bindEvent({ + click: function() { + $dialog.close(); + pandora.$ui.accountDialog = pandora.ui.accountDialog('signin').open(); + } + }), + {}, + Ox.Button({title: 'Not Now'}).bindEvent({ + click: function() { + $dialog.close(); + } + }) + ], + content: Ox.Element() + .append( + $('') + .attr({src: '/static/png/icon64.png'}) + .css({position: 'absolute', left: '16px', top: '16px', width: '64px', height: '64px'}) + ) + .append( + $('
') + .css({position: 'absolute', left: '96px', top: '16px', width: '192px'}) + .html('To add or edit ' + layer + ', please sign up or sign in.') + ), + fixedSize: true, + height: 128, + removeOnClose: true, + width: 304, + title: Ox.toTitleCase(layer) + }); + return $dialog; +}; \ No newline at end of file