Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
Carlos Ramos Carreño
slapos.core
Commits
33f3ad66
Commit
33f3ad66
authored
Jun 05, 2012
by
Thomas Lechauve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added redirect method and set the default page
parent
4b8c8371
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
jquery.urlJS/src/jquery.urljs.js
jquery.urlJS/src/jquery.urljs.js
+5
-0
vifib/static/js/core.js
vifib/static/js/core.js
+3
-0
vifib/static/js/jquery.urljs.js
vifib/static/js/jquery.urljs.js
+5
-0
No files found.
jquery.urlJS/src/jquery.urljs.js
View file @
33f3ad66
...
...
@@ -91,6 +91,11 @@ $.extend({
}
},
redirect
:
function
(
hash
)
{
var
hashInfo
=
this
.
parseHash
(
hash
);
this
.
routes
.
search
(
hashInfo
);
},
extractKeys
:
function
(
regex
)
{
var
re_key
=
new
RegExp
(
/:
(\w
+
)
/
),
keys
=
[],
...
...
vifib/static/js/core.js
View file @
33f3ad66
...
...
@@ -96,6 +96,9 @@
$
.
router
.
routes
.
add
(
'
/catalog
'
,
nextLevel
,
methods
.
showCatalog
,
$
(
"
#main
"
));
$
.
router
.
routes
.
add
(
'
/dashboard
'
,
nextLevel
,
methods
.
showDashboard
,
$
(
"
#main
"
));
// default page
if
(
params
.
route
===
'
/
'
)
{
$
.
router
.
redirect
(
'
/dashboard
'
);
}
$
.
router
.
start
(
params
.
route
,
nextLevel
);
},
...
...
vifib/static/js/jquery.urljs.js
View file @
33f3ad66
...
...
@@ -91,6 +91,11 @@ $.extend({
}
},
redirect
:
function
(
hash
)
{
var
hashInfo
=
this
.
parseHash
(
hash
);
this
.
routes
.
search
(
hashInfo
);
},
extractKeys
:
function
(
regex
)
{
var
re_key
=
new
RegExp
(
/:
(\w
+
)
/
),
keys
=
[],
...
...
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