Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery-listentryinfo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kjetil Thuen
jquery-listentryinfo
Commits
813d65f4
Commit
813d65f4
authored
Apr 09, 2013
by
Ricco Førgaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed how the config is handled.
parent
304224c8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
21 deletions
+21
-21
.gitignore
.gitignore
+0
-1
README.md
README.md
+4
-7
config/config.js
config/config.js
+8
-0
index.html
index.html
+5
-10
js/_RestMixin.js
js/_RestMixin.js
+4
-3
No files found.
.gitignore
View file @
813d65f4
...
...
@@ -5,7 +5,6 @@ components
.classpath
.project
tags
config.js
*.swp
*.iml
*.sublime-project
...
...
README.md
View file @
813d65f4
...
...
@@ -4,10 +4,7 @@ To get up and running:
$ bower install
$ open index.html
If your REST server expects anything on the URL path (such as
`/api/study/list`
instead of
`/study/list`
), add a
`config.js`
on the project root:
$ var config = {
$ 'baseUrl': '/my-prefix/'
$ };
You can set
`baseUrl`
to a URL if you wish.
If your REST server expects a namespace on the URL path (such as
`/api/study/list`
instead of
`/study/list`
), add it to the
`config/config.js`
file. You can specify either a namespace (
`/api/`
) or a URL
(
`http://my-host:8080/api`
).
config/config.js
0 → 100644
View file @
813d65f4
define
([
'
dojo/_base/declare
'
],
function
(
declare
)
{
return
declare
(
'
nesstarconfig.config
'
,
null
,
{
/* API URL namespace */
baseUrl
:
'
/api/
'
});
});
\ No newline at end of file
index.html
View file @
813d65f4
...
...
@@ -9,15 +9,7 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/overlay.css"
></link>
<link
rel=
"apple-touch-icon"
href=
"images/apple-touch-icon.png"
>
<link
rel=
"apple-touch-icon-precomposed"
href=
"images/apple-touch-icon.png"
>
<script
type=
"text/javascript"
src=
"config.js"
></script>
<script
type=
"text/javascript"
>
if
(
!
window
.
nesstartouch
)
{
window
.
nesstartouch
=
{};
}
if
(
config
)
{
window
.
nesstartouch
.
config
=
config
;
}
</script>
</head>
...
...
@@ -35,6 +27,10 @@
{
name
:
'
nesstartouch
'
,
location
:
base
+
'
/js/
'
},
{
name
:
'
nesstarconfig
'
,
location
:
base
+
'
/config/
'
}
]
};
...
...
@@ -42,7 +38,6 @@
</script>
<script
src=
"components/dojo/dojo.js"
data-dojo-config=
"async: true"
></script>
<script>
var
splash
;
require
([
'
dojo/_base/declare
'
,
'
dojo/dom
'
,
'
dojo/dom-style
'
,
'
dojo/_base/fx
'
],
...
...
js/_RestMixin.js
View file @
813d65f4
define
([
'
dojo/_base/declare
'
,
'
dojo/_base/lang
'
,
'
dojo/request
'
,],
function
(
declare
,
lang
,
request
)
{
'
dojo/request
'
,
'
nesstarconfig/config
'
],
function
(
declare
,
lang
,
request
,
config
)
{
return
declare
(
'
nesstartouch._RestMixin
'
,
null
,
{
defaultOptions
:
{
method
:
'
GET
'
,
...
...
@@ -39,8 +40,8 @@ define(['dojo/_base/declare',
},
addBaseUrl
:
function
(
originalUrl
)
{
if
(
window
.
nesstartouch
.
config
.
baseUrl
)
{
return
window
.
nesstartouch
.
config
.
baseUrl
+
originalUrl
;
if
(
config
)
{
return
config
.
baseUrl
+
originalUrl
;
}
return
originalUrl
;
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment