Skip to content

Commit

Permalink
MDL-23477, flickr_public repository plugin, click search button go ba…
Browse files Browse the repository at this point in the history
…ck to search screen
  • Loading branch information
Dongsheng Cai committed Aug 6, 2010
1 parent 1112c9e commit fdfb9cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion repository/filepicker.js
Expand Up @@ -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;
},
Expand Down Expand Up @@ -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({
Expand Down
Expand Up @@ -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';
Expand Down
3 changes: 3 additions & 0 deletions repository/flickr_public/lib.php
Expand Up @@ -332,6 +332,9 @@ private function build_list($photos, $page = 1, &$ret) {
$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;
Expand Down

0 comments on commit fdfb9cb

Please sign in to comment.