@@ -419,7 +419,14 @@ bfe.define('src/bfe', ['require', 'exports', 'module', 'src/bfestore', 'src/bfel
419419 "paging" : true ,
420420 "ajax" : {
421421 "url" : config . url + "/verso/api/bfs" ,
422- "dataSrc" : ""
422+ "dataSrc" : "" ,
423+ "headers" : {
424+ 'Access-Control-Allow-Origin' : '*' ,
425+ 'Content-Type' :'application/json' ,
426+ 'Access-Control-Allow-Methods' : 'DELETE, HEAD, GET, OPTIONS, POST, PUT' ,
427+ 'Access-Control-Allow-Headers' : 'Content-Type, Content-Range, Content-Disposition, Content-Description' ,
428+ 'Access-Control-Max-Age' : '1728000'
429+ }
423430 } ,
424431 "columns" : [ {
425432 "data" : "id"
@@ -835,7 +842,9 @@ bfe.define('src/bfe', ['require', 'exports', 'module', 'src/bfestore', 'src/bfel
835842 } ) ;
836843
837844 //eliminate itemOf
838- bfeditor . bfestore . store = _ . reject ( bfeditor . bfestore . store , _ . find ( bfeditor . bfestore . store , { "p" :"http://id.loc.gov/ontologies/bflc/itemOf" } ) ) ;
845+ if ( _ . some ( bfeditor . bfestore . store , { "p" :"http://id.loc.gov/ontologies/bflc/itemOf" } ) ) {
846+ bfeditor . bfestore . store = _ . reject ( bfeditor . bfestore . store , _ . find ( bfeditor . bfestore . store , { "p" :"http://id.loc.gov/ontologies/bflc/itemOf" } ) ) ;
847+ }
839848
840849// _.each(_.where(bfeditor.bfestore.store, {"p":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}), function(triple) {
841850// _.each(_.where(bfeditor.bfestore.store, {"s":triple.s, "p":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}), function (typeTriple){
0 commit comments