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
Guillaume Hervier
slapos.core
Commits
0c646894
Commit
0c646894
authored
May 28, 2012
by
Thomas Lechauve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new pages about softwares catalog
parent
47c02662
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
21 deletions
+111
-21
vifib/index.html
vifib/index.html
+64
-7
vifib/static/js/core.js
vifib/static/js/core.js
+47
-14
No files found.
vifib/index.html
View file @
0c646894
...
...
@@ -6,6 +6,34 @@
<style
type=
"text/css"
media=
"screen"
>
[
class
*=
"span"
]
h3
{
text-align
:
center
;
}
.dashboard
{
text-align
:
center
;
}
.catalog-item
{
display
:
inline-block
;
padding
:
20px
30px
20px
30px
;
}
.catalog-item
img
{
max-width
:
150px
;
}
.buy-btn
{
display
:
inline-block
;
padding
:
2px
0px
2px
0px
;
text-align
:
center
;
width
:
100%
;
opacity
:
0.6
;
background-color
:
rgba
(
0
,
175
,
219
,
1
);
color
:
white
;
-webkit-transition
:
opacity
.2s
ease-in-out
;
-moz-transition
:
opacity
.2s
ease-in-out
;
-ms-transition
:
opacity
.2s
ease-in-out
;
-o-transition
:
opacity
.2s
ease-in-out
;
transition
:
opacity
.2s
ease-in-out
;
box-shadow
:
0px
0px
7px
1px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
2px
;
}
.buy-btn
:hover
{
text-decoration
:
none
;
color
:
white
;
opacity
:
1
;
}
</style>
<script
id=
"dashboard"
type=
"text/html"
>
...
...
@@ -41,6 +69,37 @@
<
/div
>
</script>
<script
id=
"catalog.preview"
type=
"text/html"
>
<
h2
>
Brand
new
softwares
<
/h2
>
<
ul
id
=
"
catalog-new
"
><
/ul
>
<
h2
>
Most
downloads
<
/h2
>
<
ul
id
=
"
catalog-most
"
><
/ul
>
<
h2
>
Categories
<
/h2
>
<
ul
id
=
"
catalog-categories
"
><
/ul
>
</script>
<script
id=
"catalog.all"
type=
"text/html"
>
<
h2
>
All
available
softwares
<
/h2
>
<
ul
id
=
"
catalog-all
"
><
/ul
>
</script>
<script
id=
"catalog.item"
type=
"text/html"
>
<
li
class
=
"
catalog-item
"
>
<
div
>
<
img
src
=
"
http://www.afpy.org/Members/nexedi/Dev%20ERP5/logo_medium
"
>
<
h4
>
Name
<
/h4
>
<
h6
>
Categories
<
/h6
>
<
a
href
=
"
#/buy
"
class
=
"
buy-btn
"
>
1
€
Buy
<
/a
>
<
/div
>
<
/li
>
</script>
<script
id=
"catalog.categorie"
type=
"text/html"
>
<
li
class
=
"
catalog-item
"
>
<
a
href
=
"
#
"
><
h4
>
Categorie
<
/h4></
a
>
<
/li
>
</script>
<script
id=
"server.list"
type=
"text/html"
>
<
article
>
<
table
class
=
"
table table-condensed
"
>
...
...
@@ -249,10 +308,13 @@
<div
class=
"container-fluid"
>
<div
class=
"row-fluid"
>
<div
class=
"span3"
>
<div
class=
"well"
>
<div
class=
"well"
style=
"padding:0"
>
<ul
class=
"nav nav-list"
>
<li
class=
"nav-header"
>
Softwares
</li>
<li><a
href=
"#/catalog"
><i
class=
"icon-"
></i>
Browse catalog
</a></li>
<li><a
href=
"#/catalog/all"
><i
class=
"icon-"
></i>
Softwares availables
</a></li>
<li
class=
"nav-header"
>
Servers
</li>
<li
autofocus=
"autofocus"
><a
href=
"#/computers"
><i
class=
"icon-list"
></i>
List all servers
</a></li>
<li><a
href=
"#/computers"
><i
class=
"icon-list"
></i>
List all servers
</a></li>
<li><a
href=
"#/computer"
><i
class=
"icon-plus-sign"
></i>
Add new server
</a></li>
<li
class=
"nav-header"
>
Services
</li>
<li><a
href=
"#/instances"
><i
class=
"icon-list"
></i>
List all instances
</a></li>
...
...
@@ -260,11 +322,6 @@
<li
class=
"nav-header"
>
Account
</li>
<li><a
href=
"#/invoices"
><i
class=
"icon-inbox"
></i>
Invoices
</a></li>
<li><a
href=
"#/settings"
><i
class=
"icon-cog"
></i>
Settings
</a></li>
<!--<li class="nav-header">Quick search</li>-->
<!--<li><form class="form-search">
<i class="icon-search"></i>
<input type="text" class="input-mini search-query">
</form></li>-->
</ul>
</div>
</div>
...
...
vifib/static/js/core.js
View file @
0c646894
...
...
@@ -6,13 +6,15 @@
(
function
(
$
)
{
'
use strict
'
;
var
routes
=
{
'
/catalog
'
:
'
showCatalog
'
,
'
/catalog/all
'
:
'
showCatalogAll
'
,
'
/instance
'
:
'
requestInstance
'
,
'
/instance/:url
'
:
'
showInstance
'
,
'
/instance/:url/bang
'
:
'
showBangInstance
'
,
'
/computers
'
:
'
listComputers
'
,
'
/instances
'
:
'
listInstances
'
,
'
/invoices
'
:
'
listInvoices
'
,
'
/dashboard
'
:
'
showDashboard
'
'
/dashboard
'
:
'
showDashboard
'
},
router
=
function
(
e
,
d
)
{
var
$this
=
$
(
this
);
...
...
@@ -141,12 +143,43 @@
});
},
showDashboard
:
function
()
{
return
this
.
each
(
function
()
{
$
(
this
).
vifib
(
'
render
'
,
'
dashboard
'
);
$
(
this
).
find
(
"
#carousel
"
).
carousel
();
});
},
showDashboard
:
function
()
{
return
this
.
each
(
function
()
{
$
(
this
).
vifib
(
'
render
'
,
'
dashboard
'
);
$
(
this
).
find
(
"
#carousel
"
).
carousel
();
});
},
showCatalogAll
:
function
()
{
return
this
.
each
(
function
()
{
var
i
,
item
;
$
(
this
).
vifib
(
'
render
'
,
'
catalog.all
'
);
for
(
i
=
0
;
i
<
14
;
i
++
)
{
item
=
$
(
this
).
vifib
(
'
getRender
'
,
'
catalog.item
'
);
console
.
log
(
item
)
$
(
"
#catalog-all
"
).
append
(
item
);
}
});
},
showCatalog
:
function
()
{
return
this
.
each
(
function
()
{
var
i
,
item
;
$
(
this
).
vifib
(
'
render
'
,
'
catalog.preview
'
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
item
=
$
(
this
).
vifib
(
'
getRender
'
,
'
catalog.item
'
);
$
(
"
#catalog-new
"
).
append
(
item
);
}
for
(
i
=
0
;
i
<
4
;
i
++
)
{
item
=
$
(
this
).
vifib
(
'
getRender
'
,
'
catalog.item
'
);
$
(
"
#catalog-most
"
).
append
(
item
);
}
for
(
i
=
0
;
i
<
6
;
i
++
)
{
item
=
$
(
this
).
vifib
(
'
getRender
'
,
'
catalog.categorie
'
);
$
(
"
#catalog-categories
"
).
append
(
item
);
}
});
},
showInstance
:
function
(
uri
)
{
var
statusCode
=
{
...
...
@@ -427,13 +460,13 @@
*/
$
.
fn
.
serializeObject
=
function
()
{
var
obj
=
{};
$
.
each
(
this
.
serializeArray
(),
function
(
i
,
o
)
{
var
n
=
o
.
name
,
v
=
o
.
value
;
obj
[
n
]
=
obj
[
n
]
===
undefined
?
v
:
$
.
isArray
(
obj
[
n
])
?
obj
[
n
].
concat
(
v
)
:
[
obj
[
n
],
v
];
});
$
.
each
(
this
.
serializeArray
(),
function
(
i
,
o
)
{
var
n
=
o
.
name
,
v
=
o
.
value
;
obj
[
n
]
=
obj
[
n
]
===
undefined
?
v
:
$
.
isArray
(
obj
[
n
])
?
obj
[
n
].
concat
(
v
)
:
[
obj
[
n
],
v
];
});
return
obj
;
};
}(
jQuery
));
...
...
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