git.ithinksw.org
/
philo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7902f12
)
Made the embed widget automatically generate URLs based on the ADMIN_URL global,...
author
Harris Lapiroff
<hlapirof@oberlin.edu>
Mon, 13 Jun 2011 18:40:06 +0000
(14:40 -0400)
committer
Harris Lapiroff
<hlapirof@oberlin.edu>
Mon, 13 Jun 2011 18:40:06 +0000
(14:40 -0400)
philo/static/philo/js/EmbedWidget.js
patch
|
blob
|
history
diff --git
a/philo/static/philo/js/EmbedWidget.js
b/philo/static/philo/js/EmbedWidget.js
index
0f972e4
..
bcb9f5f
100644
(file)
--- a/
philo/static/philo/js/EmbedWidget.js
+++ b/
philo/static/philo/js/EmbedWidget.js
@@
-94,8
+94,8
@@
object_name = val.split('.')[1];
// generate the url
object_name = val.split('.')[1];
// generate the url
- // TODO:
abstract this so it can calculate the admin url dynamically
- href=[
"/admin", app_label, object_name, '?pop=1'].join('/
');
+ // TODO:
Find a better way to get ADMIN_URL. Currently this only works with grappelli, which provides the javascript global ADMIN_URL
+ href=[
ADMIN_URL, app_label, '/', object_name, '/?pop=1'].join('
');
// this is a bit hackish. let's walk through it.
// TODO: best to write our own template for this in the future
// this is a bit hackish. let's walk through it.
// TODO: best to write our own template for this in the future