Commit c55077e4 authored by Łukasz Nowak's avatar Łukasz Nowak

Add nice styles to first page of ordering.

parent 6b2f1ab4
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts21543793.16</string> </value> <value> <string>ts21634272.59</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -26,25 +26,37 @@ function drawSoftwareReleaseList(data) {\n ...@@ -26,25 +26,37 @@ function drawSoftwareReleaseList(data) {\n
$(\'#software_release_container\').empty()\n $(\'#software_release_container\').empty()\n
var ul = $(\'<ul>\');\n var ul = $(\'<ul>\');\n
$.each(data[\'software_release_list\'], function(i,item){\n $.each(data[\'software_release_list\'], function(i,item){\n
li = $(\'<li>\').appendTo(ul);\n var li = $(\'<li>\').appendTo(ul);\n
var a = $(\'<a>\');\n li.addClass(\'software_release_entry\');\n
a.attr({\n li.click(function() {window.location.hash=\'#!software_release/\' + item.uid});\n
\'href\': \'#!software_release/\' + item.uid });\n
var img = $(\'<img>\');\n var img = $(\'<img>\');\n
img.attr({\n img.attr({\n
\'src\': item.image,\n \'src\': item.image,\n
\'alt\': item.title,\n \'alt\': item.title,\n
\'title\': item.title\n \'title\': item.title\n
});\n });\n
img.addClass(\'software_release_icon\')\n img.addClass(\'software_release_icon\');\n
a.append(img);\n img_div = $(\'<div>\');\n
a.html(a.html() + item.title + \' (\' + item.description + \')\');\n img_div.addClass(\'software_release_icon\');\n
a.appendTo(li);\n img_div.append(img);\n
var title = $(\'<div>\');\n
title.addClass(\'software_release_title\');\n
title.html(item.title);\n
var description = $(\'<div>\');\n
description.addClass(\'software_release_description\');\n
description.html(item.description)\n
var entry_div = $(\'<div>\');\n
entry_div.addClass(\'software_release_entry\');\n
entry_div.append(img_div);\n
entry_div.append(title);\n
entry_div.append(description);\n
li.append(entry_div);\n
});\n });\n
$("#software_release_container").append(ul);\n $("#software_release_container").append(ul);\n
}\n }\n
\n \n
function updateSoftwareReleaseList() {\n function updateSoftwareReleaseList(event) {\n
event.preventDefault();\n
q = $(\'#software_release_query\')[0][\'value\']\n q = $(\'#software_release_query\')[0][\'value\']\n
$.getJSON(\n $.getJSON(\n
vifib[\'site_url\'] + "/ERP5Site_getSoftwareReleaseListAsJSON",\n vifib[\'site_url\'] + "/ERP5Site_getSoftwareReleaseListAsJSON",\n
...@@ -60,16 +72,17 @@ function softwareReleaseController() {\n ...@@ -60,16 +72,17 @@ function softwareReleaseController() {\n
js_container.empty();\n js_container.empty();\n
var input = $(\'<input type="text">\');\n var input = $(\'<input type="text">\');\n
input.attr(\'id\', "software_release_query");\n input.attr(\'id\', "software_release_query");\n
input.addClass("software_release_search");\n
js_container.append(input);\n js_container.append(input);\n
\n \n
var refresh = $(\'<input type="button">\');\n var search = $(\'<button>\');\n
refresh.attr(\'value\', \'Refresh...\');\n search.addClass(\'software_release_search\');\n
refresh.addClass(\'bt-med dialog_submit_button\');\n search.append($(\'<span>\').html(\'Search...\'));\n
input.after(refresh);\n input.after(search);\n
software_release_container = $(\'<div>\');\n software_release_container = $(\'<div>\');\n
software_release_container.attr(\'id\', \'software_release_container\');\n software_release_container.attr(\'id\', \'software_release_container\');\n
refresh.after(software_release_container);\n search.after(software_release_container);\n
refresh.click(updateSoftwareReleaseList);\n search.click(updateSoftwareReleaseList);\n
$.getJSON(\n $.getJSON(\n
vifib[\'site_url\'] + "/ERP5Site_getSoftwareReleaseListAsJSON",\n vifib[\'site_url\'] + "/ERP5Site_getSoftwareReleaseListAsJSON",\n
drawSoftwareReleaseList);\n drawSoftwareReleaseList);\n
...@@ -105,21 +118,20 @@ function drawRequest(data) {\n ...@@ -105,21 +118,20 @@ function drawRequest(data) {\n
js_container.append(title_q);\n js_container.append(title_q);\n
title_a = $(\'<input type="text">\');\n title_a = $(\'<input type="text">\');\n
title_a.attr(\'id\', \'software_instance_title\');\n title_a.attr(\'id\', \'software_instance_title\');\n
js_container.append(title_a);\n title_q.append(title_a);\n
js_container.append($(\'<br>\'));\n
\n \n
xml_q = $(\'<div>\');\n xml_q = $(\'<div>\');\n
xml_q.html(\'Parameter XML:\');\n xml_q.html(\'Parameter XML:\');\n
js_container.append(xml_q);\n js_container.append(xml_q);\n
xml_a = $(\'<textarea>\');\n xml_a = $(\'<textarea>\');\n
xml_a.attr(\'id\', \'software_instance_xml\');\n xml_a.attr(\'id\', \'software_instance_xml\');\n
js_container.append(xml_a)\n xml_q.append(xml_a)\n
computer_q = $(\'<div>\');\n computer_q = $(\'<div>\');\n
computer_q.html(\'Computer:\');\n computer_q.html(\'Computer:\');\n
js_container.append(computer_q);\n js_container.append(computer_q);\n
computer_a = $(\'<select>\');\n computer_a = $(\'<select>\');\n
computer_a.attr({\'name\': \'computer\', \'id\': \'computer\'});\n computer_a.attr({\'name\': \'computer\', \'id\': \'computer\'});\n
js_container.append(computer_a)\n computer_q.append(computer_a)\n
$.getJSON(vifib[\'site_url\'] + "/ERP5Site_getComputerListAsJSON", function(data) {\n $.getJSON(vifib[\'site_url\'] + "/ERP5Site_getComputerListAsJSON", function(data) {\n
option = $(\'<option>\');\n option = $(\'<option>\');\n
option.attr(\'value\', \'\');\n option.attr(\'value\', \'\');\n
...@@ -133,7 +145,12 @@ function drawRequest(data) {\n ...@@ -133,7 +145,12 @@ function drawRequest(data) {\n
});\n });\n
});\n });\n
summary = $(\'<div>\');\n summary = $(\'<div>\');\n
summary.html(\'Software Release: \' + data.title + \' (\' + data.description + \'), url: \' + data.url);\n html = \'Software Release: \' + data.title;\n
if (data.description.length>0) {\n
html += \' (\' + data.description + \')\';\n
}\n
html += \' url: \' + data.url;\n
summary.html(html)\n
js_container.append(summary);\n js_container.append(summary);\n
request = $(\'<input type="button">\');\n request = $(\'<input type="button">\');\n
request.attr(\'value\', \'Request\');\n request.attr(\'value\', \'Request\');\n
...@@ -196,7 +213,7 @@ function hashController ()\n ...@@ -196,7 +213,7 @@ function hashController ()\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>4656</int> </value> <value> <int>5244</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -197,10 +197,31 @@ background:url(<tal:block tal:replace="images_path"/>user.png) no-repeat scroll ...@@ -197,10 +197,31 @@ background:url(<tal:block tal:replace="images_path"/>user.png) no-repeat scroll
#footer a{text-decoration:none;color:#e1fbff}\n #footer a{text-decoration:none;color:#e1fbff}\n
\n \n
/**********************/\n /**********************/\n
/* Additional Styles */\n /* Shop Styles */\n
/**********************/\n /**********************/\n
\n \n
.software_release_icon {height: 50px}\n \n
.software_release_entry {text-decoration: none; list-style: none; cursor: default}\n
div.software_release_entry {position:relative, width:100%;cursor: pointer}\n
li.software_release_entry:hover {background-color: #D2E7F4;}\n
\n
.software_release_title {font-size:20px; color: #FF9522}\n
div.software_release_title {float:right;}\n
.software_release_icon {height: 70px}\n
div.software_release_icon {float: left}\n
.software_release_description {font-size:16px}\n
div.software_release_description {clear:both}\n
input.software_release_search {height: 30px}\n
.software_release_search {\n
color: #BAE2E9;\n
background-color: #2d909c;\n
border: medium none;\n
border-radius: 10px 10px 10px 10px;\n
font-size: 11px;\n
font-weight: bold;\n
height: 30px;\n
padding: 0 0 0 0;}\n
button.software_release_search {cursor: pointer;}\n
</tal:block> </tal:block>
]]></unicode> </value> ]]></unicode> </value>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment