New modal for setDropboxKey
This commit is contained in:
parent
0d3593fe58
commit
206f3ba28d
@ -304,14 +304,20 @@ settings.setSorting = function() {
|
||||
|
||||
settings.setDropboxKey = function(callback) {
|
||||
|
||||
var buttons,
|
||||
params,
|
||||
key;
|
||||
var action,
|
||||
msg = "";
|
||||
|
||||
buttons = [
|
||||
['Set Key', function() {
|
||||
action = function(data) {
|
||||
|
||||
key = $('.message input.text#key').val();
|
||||
var params,
|
||||
key = data.key;
|
||||
|
||||
if (data.key.length<1) {
|
||||
basicModal.error('key');
|
||||
return false;
|
||||
}
|
||||
|
||||
basicModal.close();
|
||||
|
||||
params = 'setDropboxKey&key=' + key;
|
||||
lychee.api(params, function(data) {
|
||||
@ -323,10 +329,25 @@ settings.setDropboxKey = function(callback) {
|
||||
|
||||
});
|
||||
|
||||
}],
|
||||
['Cancel', function() {}]
|
||||
];
|
||||
}
|
||||
|
||||
modal.show('Set Dropbox Key', "In order to import photos from your Dropbox, you need a valid drop-ins app key from <a href='https://www.dropbox.com/developers/apps/create'>their website</a>. Generate yourself a personal key and enter it below: <input id='key' class='text' type='text' placeholder='Dropbox API Key' value='" + lychee.dropboxKey + "'>", buttons);
|
||||
msg += "<p>";
|
||||
msg += "In order to import photos from your Dropbox, you need a valid drop-ins app key from <a href='https://www.dropbox.com/developers/apps/create'>their website</a>. Generate yourself a personal key and enter it below:";
|
||||
msg += "<input class='text' data-name='key' type='text' placeholder='Dropbox API Key' value='" + lychee.dropboxKey + "'>";
|
||||
msg += "</p>";
|
||||
|
||||
basicModal.show({
|
||||
body: msg,
|
||||
buttons: {
|
||||
action: {
|
||||
title: 'Set Dropbox Key',
|
||||
fn: action
|
||||
},
|
||||
cancel: {
|
||||
title: 'Cancel',
|
||||
fn: basicModal.close
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user