From 5c2b2fc8425e7fa52945b53058ac67f67d228409 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Wed, 6 Jun 2012 19:54:57 +0000 Subject: Change app path logic in templates --- core/js/js.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 89a20a529f3..a1ad0c77184 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -31,7 +31,7 @@ t.cache={}; OC={ webroot:oc_webroot, - appswebroot:oc_appswebroot, + appswebroots:oc_appswebroots, currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false, coreApps:['', 'admin','log','search','settings','core','3rdparty'], /** @@ -63,10 +63,8 @@ OC={ link+= file; } }else if(file.substring(file.length-3) != 'php' && !isCore){ - link=OC.appswebroot; - link+='/'; - link+='apps/'; - link+=app+'/'; + link=OC.appswebroots[app]; + link+='/'+app+'/'; if(type){ link+=type+'/'; } -- cgit v1.2.3 From df60d6d5d2e905d3df9095d244e756fd60fd8c01 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Fri, 22 Jun 2012 12:24:10 +0200 Subject: Fixes for multi app dir : Url should be given as relative path (to webroot) Correct link construction from js --- core/js/js.js | 3 +-- lib/base.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index a1ad0c77184..7a53bb75ef5 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -64,9 +64,8 @@ OC={ } }else if(file.substring(file.length-3) != 'php' && !isCore){ link=OC.appswebroots[app]; - link+='/'+app+'/'; if(type){ - link+=type+'/'; + link+= '/'+type+'/'; } link+=file; }else{ diff --git a/lib/base.php b/lib/base.php index 22dd86535a0..870550f267d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -140,9 +140,9 @@ class OC{ OC::$APPSROOTS[] = $paths; } }elseif(file_exists(OC::$SERVERROOT.'/apps')){ - OC::$APPSROOTS[] = array('path'=> OC::$SERVERROOT.'/apps', 'url' => OC::$WEBROOT.'/apps/', 'writable' => true); + OC::$APPSROOTS[] = array('path'=> OC::$SERVERROOT.'/apps', 'url' => '/apps/', 'writable' => true); }elseif(file_exists(OC::$SERVERROOT.'/../apps')){ - OC::$APPSROOTS[] = array('path'=> rtrim(dirname(OC::$SERVERROOT), '/').'/apps', 'url' => rtrim(dirname(OC::$WEBROOT), '/').'/apps/', 'writable' => true); + OC::$APPSROOTS[] = array('path'=> rtrim(dirname(OC::$SERVERROOT), '/').'/apps', 'url' => '/apps/', 'writable' => true); OC::$APPSROOT=rtrim(dirname(OC::$SERVERROOT), '/'); } -- cgit v1.2.3 From 799e34acd4a73b31a6b2f5fa8f4de3c3557763a8 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Tue, 3 Jul 2012 21:58:08 +0000 Subject: Add slash to app url if not set fix oc-1169 --- core/js/js.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 7a53bb75ef5..d6483b2c225 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -67,6 +67,8 @@ OC={ if(type){ link+= '/'+type+'/'; } + if(link.substring(link.length-1) != '/') + link+='/'; link+=file; }else{ link+='/'; -- cgit v1.2.3 From 90e4af312a68049d08d7701e069143387613545a Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Fri, 6 Jul 2012 16:38:54 -0400 Subject: Fix time formatting for minutes, prepend 0 if minutes is less than 10 --- core/js/js.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index d6483b2c225..df834157cdb 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -518,5 +518,5 @@ function formatDate(date){ } var monthNames = [ t('files','January'), t('files','February'), t('files','March'), t('files','April'), t('files','May'), t('files','June'), t('files','July'), t('files','August'), t('files','September'), t('files','October'), t('files','November'), t('files','December') ]; - return monthNames[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+', '+((date.getHours()<10)?'0':'')+date.getHours()+':'+date.getMinutes(); + return monthNames[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+', '+((date.getHours()<10)?'0':'')+date.getHours()+':'+((date.getMinutes()<10)?'0':'')+date.getMinutes(); } -- cgit v1.2.3 From 553773f2e1d2b8af7da757b7551a436ffc27a129 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Tue, 31 Jul 2012 12:21:06 +0200 Subject: Popup for app specific settings. --- core/css/styles.css | 11 +++++++++++ core/js/js.js | 53 +++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 48 insertions(+), 16 deletions(-) (limited to 'core/js/js.js') diff --git a/core/css/styles.css b/core/css/styles.css index c61d0a9a1ab..d032dcab2ea 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -157,3 +157,14 @@ a.bookmarklet { background-color: #ddd; border:1px solid #ccc; padding: 5px;padd #categorylist li { background:#f8f8f8; padding:.3em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; } #categorylist li:hover, li:active { background:#eee; } #category_addinput { width: 10em; } + +/* ---- APP SETTINGS ---- */ +.popup { background-color: white; border-radius: 10px 10px 10px 10px; box-shadow: 0 0 20px #888888; color: #333333; padding: 10px; position: absolute; z-index: 200; } +.popup.topright { top: -8px; right: 1em; } +.popup.bottomleft { bottom: 1em; left: 8px; } +.popup .close { position:absolute; top: 0.2em; right:0.2em; height: 20px; width: 20px; background:url('../img/actions/delete.svg') no-repeat center; } +.popup h2 { font-weight: bold; font-size: 1.2em; } +.arrow { border-bottom: 10px solid white; border-left: 10px solid transparent; border-right: 10px solid transparent; display: block; height: 0; position: absolute; width: 0; z-index: 201; } +.arrow.left { left: -13px; bottom: 1.2em; -webkit-transform: rotate(270deg); -moz-transform: rotate(270deg); -o-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } +.arrow.up { top: -8px; right: 2em; } +.arrow.down { -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -o-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } diff --git a/core/js/js.js b/core/js/js.js index df834157cdb..c5bbc12c0c7 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -82,7 +82,7 @@ OC={ if(type){ link+=type+'/'; } - link+=file; + link+=file; } return link; }, @@ -91,9 +91,9 @@ OC={ * @param app the app id to which the image belongs * @param file the name of the image file * @return string - * + * * if no extension is given for the image, it will automatically decide between .png and .svg based on what the browser supports - */ + */ imagePath:function(app,file){ if(file.indexOf('.')==-1){//if no extension is given, use png or svg depending on browser support file+=(SVGSupport())?'.svg':'.png'; @@ -105,7 +105,7 @@ OC={ * @param app the app id to which the script belongs * @param script the filename of the script * @param ready event handeler to be called when the script is loaded - * + * * if the script is already loaded, the event handeler will be called directly */ addScript:function(app,script,ready){ @@ -155,7 +155,28 @@ OC={ var date = new Date(1000*mtime); var ret = date.getDate()+'.'+(date.getMonth()+1)+'.'+date.getFullYear()+', '+date.getHours()+':'+date.getMinutes(); return ret; - } + }, + + appSettings:function(app) { + 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) { + $('#appsettings').html(data).ready(function() { + settings.prepend('

'+t('core', 'Settings')+'

').show(); + settings.find('.close').bind('click', function() { + settings.hide(); + }) + }); + }, 'html'); + } else { + settings.show().find('.arrow').show(); + } + } + } }; OC.search.customResults={}; OC.search.currentResult=-1; @@ -202,7 +223,7 @@ if (!Array.prototype.filter) { var len = this.length >>> 0; if (typeof fun != "function") throw new TypeError(); - + var res = []; var thisp = arguments[1]; for (var i = 0; i < len; i++) { @@ -222,14 +243,14 @@ if (!Array.prototype.indexOf){ Array.prototype.indexOf = function(elt /*, from*/) { var len = this.length; - + var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) from += len; - + for (; from < len; from++) { if (from in this && @@ -306,7 +327,7 @@ function replaceSVG(){ /** * prototypal inharitence functions - * + * * usage: * MySubObject=object(MyObject) */ @@ -352,7 +373,7 @@ $(document).ready(function(){ fillWindow($('#rightcontent')); }); $(window).trigger('resize'); - + if(!SVGSupport()){ //replace all svg images with png images for browser that dont support svg replaceSVG(); }else{ @@ -395,7 +416,7 @@ $(document).ready(function(){ } }); - // 'show password' checkbox + // 'show password' checkbox $('#pass2').showPassword(); //use infield labels @@ -462,15 +483,15 @@ $(document).ready(function(){ if (!Array.prototype.map){ Array.prototype.map = function(fun /*, thisp */){ "use strict"; - + if (this === void 0 || this === null) throw new TypeError(); - + var t = Object(this); var len = t.length >>> 0; if (typeof fun !== "function") throw new TypeError(); - + var res = new Array(len); var thisp = arguments[1]; for (var i = 0; i < len; i++){ @@ -478,7 +499,7 @@ if (!Array.prototype.map){ res[i] = fun.call(thisp, t[i], i, t); } } - + return res; }; } @@ -486,7 +507,7 @@ if (!Array.prototype.map){ /** * Filter Jquery selector by attribute value **/ -$.fn.filterAttr = function(attr_name, attr_value) { +$.fn.filterAttr = function(attr_name, attr_value) { return this.filter(function() { return $(this).attr(attr_name) === attr_value; }); }; -- cgit v1.2.3 From 084866cb1e69e731a6aca06e1e287a700da134fd Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Tue, 31 Jul 2012 14:06:44 +0200 Subject: White space --- core/js/js.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index c5bbc12c0c7..7bbf70991a2 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -150,13 +150,12 @@ OC={ } }, dialogs:OCdialogs, - mtime2date:function(mtime) { - mtime = parseInt(mtime); - var date = new Date(1000*mtime); - var ret = date.getDate()+'.'+(date.getMonth()+1)+'.'+date.getFullYear()+', '+date.getHours()+':'+date.getMinutes(); - return ret; - }, - + mtime2date:function(mtime) { + mtime = parseInt(mtime); + var date = new Date(1000*mtime); + var ret = date.getDate()+'.'+(date.getMonth()+1)+'.'+date.getFullYear()+', '+date.getHours()+':'+date.getMinutes(); + return ret; + }, appSettings:function(app) { var settings = $('#appsettings'); if(settings.is(':visible')) { -- cgit v1.2.3 From fb14cb87bdbdb46dcac2fe4e8054078a0ef8e8ee Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Tue, 31 Jul 2012 14:17:28 +0200 Subject: Made the parameter for OC.appSettings() an object to be able to extend it. --- core/js/js.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core/js/js.js') 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('

'+t('core', 'Settings')+'

').show(); settings.find('.close').bind('click', function() { -- cgit v1.2.3 From 8837576ce7de7d60cddf40b0b540d81294463043 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Tue, 31 Jul 2012 16:03:08 +0200 Subject: Added some more options to OC.appSettings(). --- core/js/js.js | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index f1d7e864a1a..006cd920503 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -156,22 +156,53 @@ OC={ var ret = date.getDate()+'.'+(date.getMonth()+1)+'.'+date.getFullYear()+', '+date.getHours()+':'+date.getMinutes(); return ret; }, + /** + * Opens a popup with the setting for an app. + * @param appid String. The ID of the app e.g. 'calendar', 'contacts' or 'files'. + * @param loadJS boolean or String. If true 'js/settings.js' is loaded. If it's a string + * it will attempt to load a script by that name in the 'js' directory. + * @param cache boolean. If true the javascript file won't be forced refreshed. Defaults to true. + * @param scriptName String. The name of the PHP file to load. Defaults to 'settings.php' in + * the root of the app directory hierarchy. + */ appSettings:function(args) { if(typeof args === 'undefined' || typeof args.appid === 'undefined') { - throw { name: 'MissingParameter', message: 'The parameter appid is missing' } + throw { name: 'MissingParameter', message: 'The parameter appid is missing' }; } + var props = {scriptName:'settings.php', cache:true}; + $.extend(props, args); var settings = $('#appsettings'); + if(settings.length == 0) { + throw { name: 'MissingDOMElement', message: 'There has be be an element with id "appsettings" for the popup to show.' }; + } 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(args.appid, 'settings.php'), function(data) { + var jqxhr = $.get(OC.filePath(props.appid, '', 'settings.php'), function(data) { $('#appsettings').html(data).ready(function() { settings.prepend('

'+t('core', 'Settings')+'

').show(); settings.find('.close').bind('click', function() { settings.hide(); }) + if(typeof props.loadJS !== 'undefined') { + var scriptname; + if(props.loadJS === true) { + scriptname = 'settings.js'; + } else if(typeof props.loadJS === 'string') { + scriptname = props.loadJS; + } else { + throw { name: 'InvalidParameter', message: 'The "loadJS" parameter must be either boolean or a string.' }; + } + if(props.cache) { + $.ajaxSetup({cache: true}); + } + $.getScript(OC.filePath(props.appid, 'js', scriptname)) + .fail(function(jqxhr, settings, exception) { + settings.append(''+t('core', 'Error loading script for the settings')+''); + }); + } }); }, 'html'); } else { -- cgit v1.2.3 From 6df95db8e85c29ef01c8cf7aaf660006a1973c54 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Tue, 31 Jul 2012 16:05:58 +0200 Subject: Forgot to also use the options I added :-P --- core/js/js.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 006cd920503..f053c97b490 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -180,7 +180,7 @@ OC={ } else { if($('#journal.settings').length == 0) { var arrowclass = settings.hasClass('topright') ? 'up' : 'left'; - var jqxhr = $.get(OC.filePath(props.appid, '', 'settings.php'), function(data) { + var jqxhr = $.get(OC.filePath(props.appid, '', props.scriptName), function(data) { $('#appsettings').html(data).ready(function() { settings.prepend('

'+t('core', 'Settings')+'

').show(); settings.find('.close').bind('click', function() { -- cgit v1.2.3 From 98f37b93f62ce01d11234dfca2abfdae7203a92e Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Wed, 1 Aug 2012 16:23:11 +0200 Subject: Propagate exceptions in OC.appSettings. --- core/js/js.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index f053c97b490..04fe5c28740 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -199,8 +199,8 @@ OC={ $.ajaxSetup({cache: true}); } $.getScript(OC.filePath(props.appid, 'js', scriptname)) - .fail(function(jqxhr, settings, exception) { - settings.append(''+t('core', 'Error loading script for the settings')+''); + .fail(function(jqxhr, settings, e) { + throw e; }); } }); -- cgit v1.2.3 From c5d5ca88a87dcad5df8af77fd4c6c9bc6ba2282e Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 3 Aug 2012 13:15:15 +0200 Subject: Show Login-Button when user+pw are autocompleted, fixes oc-1068 --- core/js/js.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 04fe5c28740..7bded8e1414 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -455,11 +455,7 @@ $(document).ready(function(){ //use infield labels $("label.infield").inFieldLabels(); - // hide log in button etc. when form fields not filled - $('#submit').hide(); - $('#remember_login').hide(); - $('#remember_login+label').hide(); - $('input#user, input#password').keyup(function() { + checkShowCredentials = function() { var empty = false; $('input#user, input#password').each(function() { if ($(this).val() == '') { @@ -475,7 +471,10 @@ $(document).ready(function(){ $('#remember_login').show(); $('#remember_login+label').fadeIn(); } - }); + } + // hide log in button etc. when form fields not filled + checkShowCredentials(); + $('input#user, input#password').keyup(checkShowCredentials); $('#settings #expand').keydown(function(event) { if (event.which == 13 || event.which == 32) { -- cgit v1.2.3 From eb516b79b6c9ab52a45998e5ebe7c0d3158f4f99 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Sun, 12 Aug 2012 18:42:54 +0200 Subject: Position appsettings fixed and load it in dynamically added element. --- core/css/styles.css | 6 ++--- core/js/js.js | 64 +++++++++++++++++++++++++++-------------------------- 2 files changed, 36 insertions(+), 34 deletions(-) (limited to 'core/js/js.js') diff --git a/core/css/styles.css b/core/css/styles.css index 7e79a66fb49..dd6f9d4675d 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -160,9 +160,9 @@ a.bookmarklet { background-color: #ddd; border:1px solid #ccc; padding: 5px;padd #category_addinput { width: 10em; } /* ---- APP SETTINGS ---- */ -.popup { background-color: white; border-radius: 10px 10px 10px 10px; box-shadow: 0 0 20px #888888; color: #333333; padding: 10px; position: absolute; z-index: 200; } -.popup.topright { top: -8px; right: 1em; } -.popup.bottomleft { bottom: 1em; left: 8px; } +.popup { background-color: white; border-radius: 10px 10px 10px 10px; box-shadow: 0 0 20px #888888; color: #333333; padding: 10px; position: fixed !important; z-index: 200; } +.popup.topright { top: 7em; right: 1em; } +.popup.bottomleft { bottom: 1em; left: 33em; } .popup .close { position:absolute; top: 0.2em; right:0.2em; height: 20px; width: 20px; background:url('../img/actions/delete.svg') no-repeat center; } .popup h2 { font-weight: bold; font-size: 1.2em; } .arrow { border-bottom: 10px solid white; border-left: 10px solid transparent; border-right: 10px solid transparent; display: block; height: 0; position: absolute; width: 0; z-index: 201; } diff --git a/core/js/js.js b/core/js/js.js index 7bded8e1414..92a2660fd9c 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -175,39 +175,41 @@ OC={ if(settings.length == 0) { throw { name: 'MissingDOMElement', message: 'There has be be an element with id "appsettings" for the popup to show.' }; } - if(settings.is(':visible')) { - settings.hide().find('.arrow').hide(); + var popup = $('#appsettings_popup'); + if(popup.length == 0) { + $('body').prepend(''); + popup = $('#appsettings_popup'); + popup.addClass(settings.hasClass('topright') ? 'topright' : 'bottomleft'); + } + if(popup.is(':visible')) { + popup.hide().remove(); } else { - if($('#journal.settings').length == 0) { - var arrowclass = settings.hasClass('topright') ? 'up' : 'left'; - var jqxhr = $.get(OC.filePath(props.appid, '', props.scriptName), function(data) { - $('#appsettings').html(data).ready(function() { - settings.prepend('

'+t('core', 'Settings')+'

').show(); - settings.find('.close').bind('click', function() { - settings.hide(); - }) - if(typeof props.loadJS !== 'undefined') { - var scriptname; - if(props.loadJS === true) { - scriptname = 'settings.js'; - } else if(typeof props.loadJS === 'string') { - scriptname = props.loadJS; - } else { - throw { name: 'InvalidParameter', message: 'The "loadJS" parameter must be either boolean or a string.' }; - } - if(props.cache) { - $.ajaxSetup({cache: true}); - } - $.getScript(OC.filePath(props.appid, 'js', scriptname)) - .fail(function(jqxhr, settings, e) { - throw e; - }); + var arrowclass = settings.hasClass('topright') ? 'up' : 'left'; + var jqxhr = $.get(OC.filePath(props.appid, '', props.scriptName), function(data) { + popup.html(data).ready(function() { + popup.prepend('

'+t('core', 'Settings')+'

').show(); + popup.find('.close').bind('click', function() { + popup.remove(); + }) + if(typeof props.loadJS !== 'undefined') { + var scriptname; + if(props.loadJS === true) { + scriptname = 'settings.js'; + } else if(typeof props.loadJS === 'string') { + scriptname = props.loadJS; + } else { + throw { name: 'InvalidParameter', message: 'The "loadJS" parameter must be either boolean or a string.' }; } - }); - }, 'html'); - } else { - settings.show().find('.arrow').show(); - } + if(props.cache) { + $.ajaxSetup({cache: true}); + } + $.getScript(OC.filePath(props.appid, 'js', scriptname)) + .fail(function(jqxhr, settings, e) { + throw e; + }); + } + }).show(); + }, 'html'); } } }; -- cgit v1.2.3 From b6a3bf154d5b16a84636a60c9db2979118427170 Mon Sep 17 00:00:00 2001 From: Anders Nor Berle Date: Thu, 16 Aug 2012 20:42:51 +0000 Subject: Comment out javascript that hides login button It has been reported problems with the javascript that hides the login button so jancborchardt okayed that I made this change. --- core/js/js.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 92a2660fd9c..499e6b7525c 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -475,8 +475,9 @@ $(document).ready(function(){ } } // hide log in button etc. when form fields not filled - checkShowCredentials(); - $('input#user, input#password').keyup(checkShowCredentials); + // commented out due to some browsers having issues with it + // checkShowCredentials(); + // $('input#user, input#password').keyup(checkShowCredentials); $('#settings #expand').keydown(function(event) { if (event.which == 13 || event.which == 32) { -- cgit v1.2.3