Skip to content

Commit

Permalink
[imp] Update Message for Extensions like the Core
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Apr 6, 2014
1 parent c7ce8b8 commit 6996aca
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion media/plg_quickicon_extensionupdate/js/extensionupdatecheck.js
Expand Up @@ -13,10 +13,18 @@ jQuery(document).ready(function() {
jQuery('#plg_quickicon_extensionupdate').find('span').html(plg_quickicon_extensionupdate_text.ERROR);
}
if (updateInfoList instanceof Array) {
if (updateInfoList.length < 1) {
if (updateInfoList.length == 0) {
// No updates
jQuery('#plg_quickicon_extensionupdate').find('span').html(plg_quickicon_extensionupdate_text.UPTODATE);
} else {
var updateString = plg_quickicon_extensionupdate_text.UPDATEFOUND_MESSAGE.replace("%s", updateInfoList.length);
jQuery('#system-message-container').prepend(
'<div class="alert alert-error alert-joomlaupdate">'
+ updateString
+ ' <button class="btn btn-primary" onclick="document.location=\'' + plg_quickicon_extensionupdate_url + '\'">'
+ plg_quickicon_extensionupdate_text.UPDATEFOUND_BUTTON + '</button>'
+ '</div>'
);
var updateString = plg_quickicon_extensionupdate_text.UPDATEFOUND.replace("%s", updateInfoList.length);
jQuery('#plg_quickicon_extensionupdate').find('span').html(updateString);
}
Expand Down

0 comments on commit 6996aca

Please sign in to comment.