Skip to content

Commit

Permalink
add AjaxSolrBasePath
Browse files Browse the repository at this point in the history
  • Loading branch information
James McKinney committed Apr 14, 2013
2 parents adf175d + 65297ce commit cfb0a54
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 13 deletions.
3 changes: 2 additions & 1 deletion core/AbstractFacetWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/AbstractWidget.js').script('core/Parameter.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/AbstractWidget.js').script(basePath + 'core/Parameter.js').wait(function () {
callback();
});
}
Expand Down
3 changes: 2 additions & 1 deletion core/AbstractManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/Core.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/Core.js').wait(function () {
callback();
});
}
Expand Down
3 changes: 2 additions & 1 deletion core/AbstractSpatialWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/AbstractWidget.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/AbstractWidget.js').wait(function () {
callback();
});
}
Expand Down
3 changes: 2 additions & 1 deletion core/AbstractSpellcheckWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/AbstractWidget.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/AbstractWidget.js').wait(function () {
callback();
});
}
Expand Down
3 changes: 2 additions & 1 deletion core/AbstractTextWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/AbstractWidget.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/AbstractWidget.js').wait(function () {
callback();
});
}
Expand Down
3 changes: 2 additions & 1 deletion core/AbstractWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/Core.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/Core.js').wait(function () {
callback();
});
}
Expand Down
3 changes: 2 additions & 1 deletion core/Parameter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/Core.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/Core.js').wait(function () {
callback();
});
}
Expand Down
3 changes: 2 additions & 1 deletion core/ParameterHashStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/ParameterStore.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/ParameterStore.js').wait(function () {
callback();
});
}
Expand Down
3 changes: 2 additions & 1 deletion core/ParameterStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/Core.js').script('core/Parameter.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/Core.js').script(basePath + 'core/Parameter.js').wait(function () {
callback();
});
}
Expand Down
4 changes: 2 additions & 2 deletions examples/reuters/js/reuters.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ var Manager;

(function ($) {

$LAB.setGlobalDefaults({BasePath: '../../'});
AjaxSolrBasePath = '../../';

$LAB.script('managers/Manager.jquery.js').script('core/ParameterStore.js').wait(function () {
$LAB.script(AjaxSolrBasePath + 'managers/Manager.jquery.js').script(AjaxSolrBasePath + 'core/ParameterStore.js').wait(function () {
$(function () {
Manager = new AjaxSolr.Manager({
solrUrl: 'http://evolvingweb.ca/solr/reuters/'
Expand Down
3 changes: 2 additions & 1 deletion managers/Manager.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/AbstractManager.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/AbstractManager.js').wait(function () {
callback();
});
}
Expand Down
3 changes: 2 additions & 1 deletion widgets/jquery/PagerWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

(function (callback) {
if (typeof $LAB === 'object') {
$LAB.script('core/AbstractWidget.js').wait(function () {
var basePath = window.AjaxSolrBasePath || '';
$LAB.script(basePath + 'core/AbstractWidget.js').wait(function () {
callback();
});
}
Expand Down

0 comments on commit cfb0a54

Please sign in to comment.