MDL-23477, flickr_public repository plugin, click search button go back to search screen

This commit is contained in:
Dongsheng Cai
2010-08-06 08:49:01 +00:00
parent 1112c9ed4e
commit fdfb9cbe1a
3 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -697,6 +697,7 @@ M.core_filepicker.init = function(Y, options) {
this.active_repo.nosearch = data.nosearch?true:false;
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.help = data.help?data.help:null;
this.active_repo.manage = data.manage?data.manage:null;
},
@@ -1174,7 +1175,8 @@ M.core_filepicker.init = function(Y, options) {
toolbar.appendChild(refresh);
}
if(!r.nologin) {
var html = '<a href="###"><img src="'+M.util.image_url('a/logout')+'" /> '+M.str.repository.logout+'</a>';
var label = r.logouttext?r.logouttext:M.str.repository.logout;
var html = '<a href="###"><img src="'+M.util.image_url('a/logout')+'" /> '+label+'</a>';
var logout = Y.Node.create(html);
logout.on('click', function() {
this.request({
@@ -25,6 +25,7 @@
$string['all'] = 'All';
$string['apikey'] = 'API key';
$string['backtosearch'] = 'Back to search screen';
$string['by'] = 'Attribution License';
$string['by-nc'] = 'Attribution-NonCommercial License';
$string['by-nc-nd'] = 'Attribution-NonCommercial-NoDerivs License';
+3
View File
@@ -332,6 +332,9 @@ class repository_flickr_public extends repository {
$ret['manage'] = $photos_url;
}
$ret['list'] = array();
$ret['nosearch'] = true;
$ret['norefresh'] = true;
$ret['logouttext'] = get_string('backtosearch', 'repository_flickr_public');
$ret['pages'] = $photos['pages'];
if (is_int($page) && $page <= $ret['pages']) {
$ret['page'] = $page;