diff --git a/static/js/annotationDialog.js b/static/js/annotationDialog.js index 6f9d1f226..cdede80fd 100644 --- a/static/js/annotationDialog.js +++ b/static/js/annotationDialog.js @@ -35,7 +35,7 @@ pandora.ui.annotationDialog = function(layer) { }) ] ), - text: Ox._('To add or edit {0}, ' + ( + content: Ox._('To add or edit {0}, ' + ( isEditor ? 'please sign up or sign in.' : 'just switch to the editor.' diff --git a/static/js/contactForm.js b/static/js/contactForm.js index fc3bfd9fa..57afb94de 100644 --- a/static/js/contactForm.js +++ b/static/js/contactForm.js @@ -121,8 +121,8 @@ pandora.ui.contactForm = function() { } }) ], + content: Ox._('Thanks for your message!

We will get back to you as soon as possible.'), keys: {enter: 'close', escape: 'close'}, - text: Ox._('Thanks for your message!

We will get back to you as soon as possible.'), title: Ox._('Message Sent') }) .open(); diff --git a/static/js/deleteDocumentDialog.js b/static/js/deleteDocumentDialog.js index 07eec4e9f..482482f40 100644 --- a/static/js/deleteDocumentDialog.js +++ b/static/js/deleteDocumentDialog.js @@ -25,8 +25,8 @@ pandora.ui.deleteDocumentDialog = function(file, callback) { } }) ], + content: Ox._('Are you sure you want to delete the document "{0}"?', [file]), keys: {enter: 'delete', escape: 'keep'}, - text: Ox._('Are you sure you want to delete the document "{0}"?', [file]), title: Ox._('Delete Document') }); diff --git a/static/js/deleteItemDialog.js b/static/js/deleteItemDialog.js index cf2d45951..65d7ccdfe 100644 --- a/static/js/deleteItemDialog.js +++ b/static/js/deleteItemDialog.js @@ -28,10 +28,10 @@ pandora.ui.deleteItemDialog = function(item) { } }) ], - keys: {enter: 'delete', escape: 'keep'}, - text: Ox._('Are you sure you want to delete the {0} "{1}"?' + content: Ox._('Are you sure you want to delete the {0} "{1}"?' + '

All data will be removed.', [Ox._(pandora.site.itemName.singular), item.title]), + keys: {enter: 'delete', escape: 'keep'}, title: Ox._('Delete {0}', [Ox._(pandora.site.itemName.singular)]) }); diff --git a/static/js/deleteListDialog.js b/static/js/deleteListDialog.js index f5451989b..cd7b631db 100644 --- a/static/js/deleteListDialog.js +++ b/static/js/deleteListDialog.js @@ -50,9 +50,9 @@ pandora.ui.deleteListDialog = function(list) { } }) ], - keys: {enter: 'delete', escape: 'keep'}, - text: Ox._('Are you sure you want to delete the {0} "{1}"?', + content: Ox._('Are you sure you want to delete the {0} "{1}"?', [folderItem.toLowerCase(), listData.name]), + keys: {enter: 'delete', escape: 'keep'}, title: Ox._('Delete {0}', [folderItem]) }); diff --git a/static/js/errorDialog.js b/static/js/errorDialog.js index eb659fb43..019ec83d7 100644 --- a/static/js/errorDialog.js +++ b/static/js/errorDialog.js @@ -24,8 +24,8 @@ pandora.ui.errorDialog = function(data) { } }) ], + content: Ox._('Sorry, you have made an unauthorized request.'), keys: {enter: 'close', escape: 'close'}, - text: Ox._('Sorry, you have made an unauthorized request.'), title: Ox.toTitleCase(data.status.text) }) .addClass('OxErrorDialog') @@ -62,12 +62,12 @@ pandora.ui.errorDialog = function(data) { } }) ]), - keys: {enter: 'close', escape: 'close'}, - text: Ox._('Sorry, a server {0}' + content: Ox._('Sorry, a server {0}' + ' occured while handling your request.' + ' To help us find out what went wrong,' + ' you may want to report this error to an administrator.' + ' Otherwise, please try again later.', [error]), + keys: {enter: 'close', escape: 'close'}, title: Ox._('Server {0}', [Ox.toTitleCase(error)]) }) .addClass('OxErrorDialog') diff --git a/static/js/folders.js b/static/js/folders.js index 600a08194..d928368a3 100644 --- a/static/js/folders.js +++ b/static/js/folders.js @@ -371,7 +371,7 @@ pandora.ui.folders = function(section) { } }) ], - text: text, + content: text, title: title }).open(); } diff --git a/static/js/iconDialog.js b/static/js/iconDialog.js index d02d6689b..8a8728dfc 100644 --- a/static/js/iconDialog.js +++ b/static/js/iconDialog.js @@ -4,9 +4,9 @@ pandora.ui.iconDialog = function(options) { var options = Ox.extend({ closeButton: false, + content: '', height: 128, keys: null, - text: '', title: '', width: 368, }, options), @@ -21,10 +21,13 @@ pandora.ui.iconDialog = function(options) { .css({position: 'absolute', left: '16px', top: '16px', width: '64px', height: '64px'}) ) .append( - $('
') + Ox.isObject(options.content) + ? options.content + .css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'}) + : $('
') .addClass('OxTextPage') .css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'}) - .html(options.text) + .html(options.content) ), fixedSize: true, height: options.height, diff --git a/static/js/makeListPrivateDialog.js b/static/js/makeListPrivateDialog.js index 30f938eef..5023484d7 100644 --- a/static/js/makeListPrivateDialog.js +++ b/static/js/makeListPrivateDialog.js @@ -23,9 +23,9 @@ pandora.ui.makeListPrivateDialog = function(name, subscribers, callback) { } }) ], - keys: {enter: 'make', escape: 'keep'}, - text: Ox._('Are you sure you want to make the list "{0}" private and lose its {1}?', + content: Ox._('Are you sure you want to make the list "{0}" private and lose its {1}?', [name, subscribers == 1 ? Ox._('subscriber') : Ox._('{0} subscribers', [subscribers])]), + keys: {enter: 'make', escape: 'keep'}, title: Ox._('Make List Private') }); diff --git a/static/js/metadataDialog.js b/static/js/metadataDialog.js index 9e7885271..18e9ec9bc 100644 --- a/static/js/metadataDialog.js +++ b/static/js/metadataDialog.js @@ -50,9 +50,11 @@ pandora.ui.metadataDialog = function(data) { } }) ], + content: Ox._( + 'To update the metadata for this {0}, please enter its IMDb ID.', + [pandora.site.itemName.singular.toLowerCase()] + ), keyboard: {enter: 'update', escape: 'close'}, - text: Ox._('To update the metadata for this {0}, please enter its IMDb ID.', - [pandora.site.itemName.singular.toLowerCase()]), title: Ox._('Update Metadata') }); } @@ -130,9 +132,7 @@ pandora.ui.metadataDialog = function(data) { } }) ], - height: 192, - keyboard: {enter: 'update', escape: 'cancel'}, - text: Ox._('Are you sure you want to update the value' + content: Ox._('Are you sure you want to update the value' + (updateKeys.length == 1 ? '' : 's') + ' for {0}?', [updateKeys.map(function(key, index) { return ( @@ -140,7 +140,10 @@ pandora.ui.metadataDialog = function(data) { : index < updateKeys.length - 1 ? ', ' : ' ' + Ox._('and') + ' ' ) + getTitle(key) - }).join('')]), + }).join('')] + ), + height: 192, + keyboard: {enter: 'update', escape: 'cancel'}, title: Ox._('Update Metadata') }); } diff --git a/static/js/resetUIDialog.js b/static/js/resetUIDialog.js index 2a387ea0f..a31a4da78 100644 --- a/static/js/resetUIDialog.js +++ b/static/js/resetUIDialog.js @@ -26,8 +26,8 @@ pandora.ui.resetUIDialog = function(data) { } }) ], + content: Ox._('Are you sure you want to reset all UI settings?'), keys: {enter: 'reset', escape: 'cancel'}, - text: Ox._('Are you sure you want to reset all UI settings?'), title: Ox._('Reset UI Settings') }); diff --git a/static/js/uploadDocumentDialog.js b/static/js/uploadDocumentDialog.js index f52aa178d..18d910c90 100644 --- a/static/js/uploadDocumentDialog.js +++ b/static/js/uploadDocumentDialog.js @@ -124,8 +124,8 @@ pandora.ui.uploadDocumentDialog = function(file, callback) { } }) ], - title: Ox._('Upload File'), - text: text + content: text, + title: Ox._('Upload File') }); } diff --git a/static/js/usersDialog.js b/static/js/usersDialog.js index 10daf1a9b..138ec0ac7 100644 --- a/static/js/usersDialog.js +++ b/static/js/usersDialog.js @@ -897,10 +897,10 @@ pandora.ui.usersDialog = function() { } }) ], - keys: {enter: 'close', escape: 'close'}, - text: result.status.code == 200 + content: result.status.code == 200 ? Ox._('Your message has been sent.') : Ox._('Your message could not be sent. Please try again.'), + keys: {enter: 'close', escape: 'close'}, title: result.status.code == 200 ? Ox._('Message Sent') : Ox._('Application Error')