Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-29872_c_m22' of git://github.com/rwijaya/moodle int…

…o MOODLE_22_STABLE
  • Loading branch information...
commit 0686d3dc4c1ef1e1207b75255e7cd2c67eb4e68d 2 parents 7f2d81c + 8eb614d
@samhemelryk samhemelryk authored
View
1  repository/dropbox/lang/en/repository_dropbox.php
@@ -32,3 +32,4 @@
$string['secret'] = 'Dropbox secret';
$string['instruction'] = 'You can get your API Key and secret from <a href="http://www.dropbox.com/developers/apps">Dropbox developers</a>. When setting up your key please select "Full Dropbox" as the "Access level".';
$string['dropbox:view'] = 'View a Dropbox folder';
+$string['logoutdesc'] = '(Logout when you finish using Dropbox)';
View
2  repository/dropbox/lib.php
@@ -132,6 +132,8 @@ public function get_listing($path = '', $page = '1') {
$list['manage'] = false;
$list['dynload'] = true;
$list['nosearch'] = true;
+ $list['logouturl'] = 'https://www.dropbox.com/logout';
+ $list['message'] = get_string('logoutdesc', 'repository_dropbox');
// process breadcrumb trail
$list['path'] = array(
array('name'=>get_string('dropbox', 'repository_dropbox'), 'path'=>'/')
View
10 repository/filepicker.js
@@ -844,6 +844,8 @@ M.core_filepicker.init = function(Y, options) {
this.active_repo.norefresh = data.norefresh?true:false;
this.active_repo.nologin = data.nologin?true:false;
this.active_repo.logouttext = data.logouttext?data.logouttext:null;
+ this.active_repo.logouturl = (data.logouturl || '');
+ this.active_repo.message = (data.message || '');
this.active_repo.help = data.help?data.help:null;
this.active_repo.manage = data.manage?data.manage:null;
},
@@ -1344,6 +1346,9 @@ M.core_filepicker.init = function(Y, options) {
scope.print_login(obj);
}
}, true);
+ if (this.active_repo.logouturl) {
+ window.open(this.active_repo.logouturl, 'repo_auth', 'location=0,status=0,width=500,height=300,scrollbars=yes');
+ }
}, this);
toolbar.appendChild(logout);
}
@@ -1362,6 +1367,11 @@ M.core_filepicker.init = function(Y, options) {
help.innerHTML = '<img src="'+M.util.image_url('a/help')+'" /> '+M.str.repository.help;
toolbar.appendChild(help);
}
+ if(r.message) {
+ var msg = document.createElement('div');
+ msg.innerHTML = r.message;
+ toolbar.appendChild(msg);
+ }
this.print_path();
},
Please sign in to comment.
Something went wrong with that request. Please try again.