diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-07-31 14:17:28 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-07-31 14:17:28 +0200 |
commit | fb14cb87bdbdb46dcac2fe4e8054078a0ef8e8ee (patch) | |
tree | 3430e5da1b9950b056b70547a3986b43d2b161ac /core | |
parent | 084866cb1e69e731a6aca06e1e287a700da134fd (diff) | |
download | nextcloud-server-fb14cb87bdbdb46dcac2fe4e8054078a0ef8e8ee.tar.gz nextcloud-server-fb14cb87bdbdb46dcac2fe4e8054078a0ef8e8ee.zip |
Made the parameter for OC.appSettings() an object to be able to extend it.
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js index 7bbf70991a2..f1d7e864a1a 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -156,14 +156,17 @@ OC={ var ret = date.getDate()+'.'+(date.getMonth()+1)+'.'+date.getFullYear()+', '+date.getHours()+':'+date.getMinutes(); return ret; }, - appSettings:function(app) { + appSettings:function(args) { + if(typeof args === 'undefined' || typeof args.appid === 'undefined') { + throw { name: 'MissingParameter', message: 'The parameter appid is missing' } + } var settings = $('#appsettings'); if(settings.is(':visible')) { settings.hide().find('.arrow').hide(); } else { if($('#journal.settings').length == 0) { var arrowclass = settings.hasClass('topright') ? 'up' : 'left'; - var jqxhr = $.get(OC.linkTo(app, 'settings.php'), function(data) { + var jqxhr = $.get(OC.linkTo(args.appid, 'settings.php'), function(data) { $('#appsettings').html(data).ready(function() { settings.prepend('<span class="arrow '+arrowclass+'"></span><h2>'+t('core', 'Settings')+'</h2><a class="close svg"></a>').show(); settings.find('.close').bind('click', function() { |