Use correct name for function state for addScript/addStyle in js

This commit is contained in:
Bart Visscher 2011-09-26 21:18:56 +02:00
parent 2d3c1a3f00
commit 3fcc7b5949

View file

@ -83,8 +83,8 @@ OC={
*/
addScript:function(app,script,ready){
var path=OC.filePath(app,'js',script+'.js');
if(OC.addStyle.loaded.indexOf(path)==-1){
OC.addStyle.loaded.push(path);
if(OC.addScript.loaded.indexOf(path)==-1){
OC.addScript.loaded.push(path);
if(ready){
$.getScript(path,ready);
}else{
@ -103,8 +103,8 @@ OC={
*/
addStyle:function(app,style){
var path=OC.filePath(app,'css',style+'.css');
if(OC.addScript.loaded.indexOf(path)==-1){
OC.addScript.loaded.push(path);
if(OC.addStyle.loaded.indexOf(path)==-1){
OC.addStyle.loaded.push(path);
var style=$('<link rel="stylesheet" type="text/css" href="'+path+'"/>');
$('head').append(style);
}