in icon dialog, allow for passing an element (not just text), and rename the option to 'content'
This commit is contained in:
parent
6934162893
commit
00739a024c
13 changed files with 33 additions and 27 deletions
|
@ -35,7 +35,7 @@ pandora.ui.annotationDialog = function(layer) {
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
text: Ox._('To add or edit {0}, ' + (
|
content: Ox._('To add or edit {0}, ' + (
|
||||||
isEditor
|
isEditor
|
||||||
? 'please sign up or sign in.'
|
? 'please sign up or sign in.'
|
||||||
: 'just switch to the editor.'
|
: 'just switch to the editor.'
|
||||||
|
|
|
@ -121,8 +121,8 @@ pandora.ui.contactForm = function() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
content: Ox._('Thanks for your message!<br/><br/>We will get back to you as soon as possible.'),
|
||||||
keys: {enter: 'close', escape: 'close'},
|
keys: {enter: 'close', escape: 'close'},
|
||||||
text: Ox._('Thanks for your message!<br/><br/>We will get back to you as soon as possible.'),
|
|
||||||
title: Ox._('Message Sent')
|
title: Ox._('Message Sent')
|
||||||
})
|
})
|
||||||
.open();
|
.open();
|
||||||
|
|
|
@ -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'},
|
keys: {enter: 'delete', escape: 'keep'},
|
||||||
text: Ox._('Are you sure you want to delete the document "{0}"?', [file]),
|
|
||||||
title: Ox._('Delete Document')
|
title: Ox._('Delete Document')
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,10 @@ pandora.ui.deleteItemDialog = function(item) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
keys: {enter: 'delete', escape: 'keep'},
|
content: Ox._('Are you sure you want to delete the {0} "{1}"?'
|
||||||
text: Ox._('Are you sure you want to delete the {0} "{1}"?'
|
|
||||||
+ '<br><br>All data will be removed.',
|
+ '<br><br>All data will be removed.',
|
||||||
[Ox._(pandora.site.itemName.singular), item.title]),
|
[Ox._(pandora.site.itemName.singular), item.title]),
|
||||||
|
keys: {enter: 'delete', escape: 'keep'},
|
||||||
title: Ox._('Delete {0}', [Ox._(pandora.site.itemName.singular)])
|
title: Ox._('Delete {0}', [Ox._(pandora.site.itemName.singular)])
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,9 @@ pandora.ui.deleteListDialog = function(list) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
keys: {enter: 'delete', escape: 'keep'},
|
content: Ox._('Are you sure you want to delete the {0} "{1}"?',
|
||||||
text: Ox._('Are you sure you want to delete the {0} "{1}"?',
|
|
||||||
[folderItem.toLowerCase(), listData.name]),
|
[folderItem.toLowerCase(), listData.name]),
|
||||||
|
keys: {enter: 'delete', escape: 'keep'},
|
||||||
title: Ox._('Delete {0}', [folderItem])
|
title: Ox._('Delete {0}', [folderItem])
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ pandora.ui.errorDialog = function(data) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
content: Ox._('Sorry, you have made an unauthorized request.'),
|
||||||
keys: {enter: 'close', escape: 'close'},
|
keys: {enter: 'close', escape: 'close'},
|
||||||
text: Ox._('Sorry, you have made an unauthorized request.'),
|
|
||||||
title: Ox.toTitleCase(data.status.text)
|
title: Ox.toTitleCase(data.status.text)
|
||||||
})
|
})
|
||||||
.addClass('OxErrorDialog')
|
.addClass('OxErrorDialog')
|
||||||
|
@ -62,12 +62,12 @@ pandora.ui.errorDialog = function(data) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
]),
|
]),
|
||||||
keys: {enter: 'close', escape: 'close'},
|
content: Ox._('Sorry, a server {0}'
|
||||||
text: Ox._('Sorry, a server {0}'
|
|
||||||
+ ' occured while handling your request.'
|
+ ' occured while handling your request.'
|
||||||
+ ' To help us find out what went wrong,'
|
+ ' To help us find out what went wrong,'
|
||||||
+ ' you may want to report this error to an administrator.'
|
+ ' you may want to report this error to an administrator.'
|
||||||
+ ' Otherwise, please try again later.', [error]),
|
+ ' Otherwise, please try again later.', [error]),
|
||||||
|
keys: {enter: 'close', escape: 'close'},
|
||||||
title: Ox._('Server {0}', [Ox.toTitleCase(error)])
|
title: Ox._('Server {0}', [Ox.toTitleCase(error)])
|
||||||
})
|
})
|
||||||
.addClass('OxErrorDialog')
|
.addClass('OxErrorDialog')
|
||||||
|
|
|
@ -371,7 +371,7 @@ pandora.ui.folders = function(section) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
text: text,
|
content: text,
|
||||||
title: title
|
title: title
|
||||||
}).open();
|
}).open();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@ pandora.ui.iconDialog = function(options) {
|
||||||
|
|
||||||
var options = Ox.extend({
|
var options = Ox.extend({
|
||||||
closeButton: false,
|
closeButton: false,
|
||||||
|
content: '',
|
||||||
height: 128,
|
height: 128,
|
||||||
keys: null,
|
keys: null,
|
||||||
text: '',
|
|
||||||
title: '',
|
title: '',
|
||||||
width: 368,
|
width: 368,
|
||||||
}, options),
|
}, options),
|
||||||
|
@ -21,10 +21,13 @@ pandora.ui.iconDialog = function(options) {
|
||||||
.css({position: 'absolute', left: '16px', top: '16px', width: '64px', height: '64px'})
|
.css({position: 'absolute', left: '16px', top: '16px', width: '64px', height: '64px'})
|
||||||
)
|
)
|
||||||
.append(
|
.append(
|
||||||
$('<div>')
|
Ox.isObject(options.content)
|
||||||
|
? options.content
|
||||||
|
.css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'})
|
||||||
|
: $('<div>')
|
||||||
.addClass('OxTextPage')
|
.addClass('OxTextPage')
|
||||||
.css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'})
|
.css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'})
|
||||||
.html(options.text)
|
.html(options.content)
|
||||||
),
|
),
|
||||||
fixedSize: true,
|
fixedSize: true,
|
||||||
height: options.height,
|
height: options.height,
|
||||||
|
|
|
@ -23,9 +23,9 @@ pandora.ui.makeListPrivateDialog = function(name, subscribers, callback) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
keys: {enter: 'make', escape: 'keep'},
|
content: Ox._('Are you sure you want to make the list "{0}" private and lose its {1}?',
|
||||||
text: 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])]),
|
[name, subscribers == 1 ? Ox._('subscriber') : Ox._('{0} subscribers', [subscribers])]),
|
||||||
|
keys: {enter: 'make', escape: 'keep'},
|
||||||
title: Ox._('Make List Private')
|
title: Ox._('Make List Private')
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -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'},
|
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')
|
title: Ox._('Update Metadata')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -130,9 +132,7 @@ pandora.ui.metadataDialog = function(data) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
height: 192,
|
content: Ox._('Are you sure you want to update the value'
|
||||||
keyboard: {enter: 'update', escape: 'cancel'},
|
|
||||||
text: Ox._('Are you sure you want to update the value'
|
|
||||||
+ (updateKeys.length == 1 ? '' : 's')
|
+ (updateKeys.length == 1 ? '' : 's')
|
||||||
+ ' for {0}?', [updateKeys.map(function(key, index) {
|
+ ' for {0}?', [updateKeys.map(function(key, index) {
|
||||||
return (
|
return (
|
||||||
|
@ -140,7 +140,10 @@ pandora.ui.metadataDialog = function(data) {
|
||||||
: index < updateKeys.length - 1 ? ', '
|
: index < updateKeys.length - 1 ? ', '
|
||||||
: ' ' + Ox._('and') + ' '
|
: ' ' + Ox._('and') + ' '
|
||||||
) + getTitle(key)
|
) + getTitle(key)
|
||||||
}).join('')]),
|
}).join('')]
|
||||||
|
),
|
||||||
|
height: 192,
|
||||||
|
keyboard: {enter: 'update', escape: 'cancel'},
|
||||||
title: Ox._('Update Metadata')
|
title: Ox._('Update Metadata')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -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'},
|
keys: {enter: 'reset', escape: 'cancel'},
|
||||||
text: Ox._('Are you sure you want to reset all UI settings?'),
|
|
||||||
title: Ox._('Reset UI Settings')
|
title: Ox._('Reset UI Settings')
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -124,8 +124,8 @@ pandora.ui.uploadDocumentDialog = function(file, callback) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
title: Ox._('Upload File'),
|
content: text,
|
||||||
text: text
|
title: Ox._('Upload File')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -897,10 +897,10 @@ pandora.ui.usersDialog = function() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
keys: {enter: 'close', escape: 'close'},
|
content: result.status.code == 200
|
||||||
text: result.status.code == 200
|
|
||||||
? Ox._('Your message has been sent.')
|
? Ox._('Your message has been sent.')
|
||||||
: Ox._('Your message could not be sent. Please try again.'),
|
: Ox._('Your message could not be sent. Please try again.'),
|
||||||
|
keys: {enter: 'close', escape: 'close'},
|
||||||
title: result.status.code == 200
|
title: result.status.code == 200
|
||||||
? Ox._('Message Sent')
|
? Ox._('Message Sent')
|
||||||
: Ox._('Application Error')
|
: Ox._('Application Error')
|
||||||
|
|
Loading…
Reference in a new issue