Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
renderjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
renderjs
Commits
a0a78541
Commit
a0a78541
authored
Jun 10, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed error messages of renderJs.mapUrl
parent
2c2efaf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
renderjs.js
renderjs.js
+11
-11
No files found.
renderjs.js
View file @
a0a78541
...
@@ -1029,24 +1029,24 @@
...
@@ -1029,24 +1029,24 @@
});
});
};
};
// => "global" errorHandler
priv
.
errorHandler
=
function
(
message
,
internal
)
{
return
(
internal
===
true
)
?
undefined
:
message
+
"
specified
"
,
"
405
"
,
{};
};
// ================ public API (call on renderJs and $(elem) ===========
// ================ public API (call on renderJs and $(elem) ===========
// => public API to map a URL via Ajax and run the result through a callback
// => public API to map a URL via Ajax and run the result through a callback
that
.
mapUrl
=
function
(
url
,
callback
,
internal
)
{
that
.
mapUrl
=
function
(
url
,
callback
,
internal
)
{
var
queryString
=
typeof
url
===
"
string
"
?
url
:
url
.
search
;
var
queryString
=
typeof
url
===
"
string
"
?
url
:
url
.
search
;
if
(
queryString
)
{
if
(
queryString
)
{
priv
.
mapUrlInternal
(
queryString
).
done
(
priv
.
mapUrlInternal
(
queryString
)
callback
?
callback
:
priv
.
errorHandler
(
"
no callback
"
,
internal
)
.
done
(
callback
?
callback
:
(
"
no callback specified
"
,
"
405
"
,
{}));
);
}
else
{
}
else
{
// we still need to run a callback, if only internally?
// we still need to run a callback if specified
internal
?
(
callback
?
callback
()
:
priv
.
errorHandler
(
"
no callback
"
))
:
if
(
callback
)
{
priv
.
errorHandler
(
"
no query parameter
"
)
callback
(
internal
?
undefined
:
{
"
error
"
:
"
no querystring specified
"
},
"
405
"
,
{}
);
}
else
{
return
"
no callback specified
"
,
"
405
"
,
{};
}
}
}
};
};
...
...
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