aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-10 22:05:49 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-10 22:05:49 +0000
commitadae1958a95d7e801de91d673e927cac348236d9 (patch)
treedeb60ecca44c95abc5301b0d64bcd08585e85798 /js
parentea14bfe87eda3af8e8002c64ad909cf592d7fe76 (diff)
downloadelgg-adae1958a95d7e801de91d673e927cac348236d9.tar.gz
elgg-adae1958a95d7e801de91d673e927cac348236d9.tar.bz2
Fixes #2228: Major cleanup of urls -- remove leading pg/ and trailing / from most urls in core and plugins
git-svn-id: http://code.elgg.org/elgg/trunk@8653 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'js')
-rw-r--r--js/lib/elgglib.js4
-rw-r--r--js/lib/languages.js2
-rw-r--r--js/lib/userpicker.js2
-rw-r--r--js/tests/ElggLibTest.js4
4 files changed, 6 insertions, 6 deletions
diff --git a/js/lib/elgglib.js b/js/lib/elgglib.js
index 12e89392f..3b409d134 100644
--- a/js/lib/elgglib.js
+++ b/js/lib/elgglib.js
@@ -238,7 +238,7 @@ elgg.inherit = function(Child, Parent) {
* If the url is already absolute or protocol-relative, no change is made.
*
* elgg.normalize_url(''); // 'http://my.site.com/'
- * elgg.normalize_url('pg/dashboard'); // 'http://my.site.com/pg/dashboard'
+ * elgg.normalize_url('dashboard'); // 'http://my.site.com/dashboard'
* elgg.normalize_url('http://google.com/'); // no change
* elgg.normalize_url('//google.com/'); // no change
*
@@ -272,7 +272,7 @@ elgg.normalize_url = function(url) {
return 'http://' + url;
}
- // 'pg/page/handler', 'mod/plugin/file.php'
+ // 'page/handler', 'mod/plugin/file.php'
else {
// trim off any leading / because the site URL is stored
// with a trailing /
diff --git a/js/lib/languages.js b/js/lib/languages.js
index e464fc0ff..10afa24b0 100644
--- a/js/lib/languages.js
+++ b/js/lib/languages.js
@@ -25,7 +25,7 @@ elgg.add_translation = function(lang, translations) {
*/
elgg.reload_all_translations = function(language) {
var lang = language || elgg.get_language();
- elgg.getJSON('pg/js/languages%252f' + lang + '.js', {
+ elgg.getJSON('js/languages%252f' + lang + '.js', {
data: {
'viewtype': 'default',
'lastcache': elgg.config.lastcache
diff --git a/js/lib/userpicker.js b/js/lib/userpicker.js
index 2b3d78d6b..5fc39bce3 100644
--- a/js/lib/userpicker.js
+++ b/js/lib/userpicker.js
@@ -11,7 +11,7 @@ elgg.userpicker.init = function() {
source: function(request, response) {
var params = elgg.userpicker.getSearchParams(this);
- elgg.get('pg/livesearch', {
+ elgg.get('livesearch', {
data: params,
dataType: 'json',
success: function(data) {
diff --git a/js/tests/ElggLibTest.js b/js/tests/ElggLibTest.js
index dda1ecd40..dd0267c5c 100644
--- a/js/tests/ElggLibTest.js
+++ b/js/tests/ElggLibTest.js
@@ -73,10 +73,10 @@ ElggLibTest.prototype.testNormalizeUrl = function() {
[
['', elgg.config.wwwroot],
- ['pg/test', elgg.config.wwwroot + 'pg/test'],
+ ['test', elgg.config.wwwroot + 'test'],
['http://google.com', 'http://google.com'],
['//example.com', '//example.com'],
- ['/pg/page', elgg.config.wwwroot + 'pg/page'],
+ ['/page', elgg.config.wwwroot + 'page'],
['mod/plugin/index.php', elgg.config.wwwroot + 'mod/plugin/index.php'],
].forEach(function(args) {
assertEquals(args[1], elgg.normalize_url(args[0]));