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
Xiaowu Zhang
slapos.core
Commits
878efaac
Commit
878efaac
authored
Nov 15, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: Working list of Software Products in JS.
parent
b110cab3
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
698 additions
and
5 deletions
+698
-5
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/ERP5Site_getSoftwareProductListAsJSON.xml
...s/vifib_hosting/ERP5Site_getSoftwareProductListAsJSON.xml
+80
-0
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewSoftwareRender.xml
...tal_skins/vifib_hosting/WebSection_viewSoftwareRender.xml
+84
-0
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/ERP5Site_getJavaScriptRelativeUrlList.xml
...b_hosting_theme/ERP5Site_getJavaScriptRelativeUrlList.xml
+4
-1
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_image/software.png.xml
.../vifib_hosting_theme/vifib_hosting_image/software.png.xml
+191
-0
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_image/software_active.png.xml
...hosting_theme/vifib_hosting_image/software_active.png.xml
+208
-0
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_js/slap.js.xml
...al_skins/vifib_hosting_theme/vifib_hosting_js/slap.js.xml
+41
-0
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_js/vifib.js.xml
...l_skins/vifib_hosting_theme/vifib_hosting_js/vifib.js.xml
+86
-0
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_jauks_widget_library/WebSection_viewMySpaceWidget.xml
...fib_jauks_widget_library/WebSection_viewMySpaceWidget.xml
+3
-3
master/bt5/vifib_web/bt/revision
master/bt5/vifib_web/bt/revision
+1
-1
No files found.
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/ERP5Site_getSoftwareProductListAsJSON.xml
0 → 100644
View file @
878efaac
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
response = []\n
\n
kw = {}\n
kw.update(\n
portal_type=\'Software Product\',\n
validation_state=\'published\',\n
limit=10,\n
title=title,\n
)\n
if title:\n
for software_product in context.getPortalObject().portal_catalog(**kw\n
):\n
response.append({\'title\': software_product.getTitle(), \'image\': software_product.getDefaultImageAbsoluteUrl() + \'/Base_download\', \'uid\': str(software_product.getUid())})\n
return context.asJSON(response)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
title
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_getSoftwareProductListAsJSON
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_viewSoftwareRender.xml
0 → 100644
View file @
878efaac
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<unicode
encoding=
"cdata"
>
<![CDATA[
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
\n
<tal:block
tal:define=
"form_action string:logged_in;\n
global form_id string:login_form;\n
js_list python: [\'%s/login_form.js\' % (here.portal_url(), ), \'%s/erp5.js\' % (here.portal_url(), )]"
>
\n
<tal:block
metal:use-macro=
"here/main_template/macros/master"
>
\n
<tal:block
metal:fill-slot=
"main"
>
\n
<div
class=
"content"
>
\n
<h1
i18n:translate=
""
i18n:domain=
"ui"
>
Request a Software Instance
</h1>
\n
<input
type=
"hidden"
name=
"js_entry"
id=
"js_entry"
>
\n
<script
type=
"text/javascript"
>
\n
$(document).ready(mainController());\n
</script>
\n
</div>
\n
</tal:block>
\n
</tal:block>
\n
</tal:block>
\n
</tal:block>
]]>
</unicode>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebSection_viewSoftwareRender
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/ERP5Site_getJavaScriptRelativeUrlList.xml
View file @
878efaac
...
@@ -53,7 +53,10 @@
...
@@ -53,7 +53,10 @@
<value>
<string>
# This script returns an iterable of the paths to standard JavaScript objects.\n
<value>
<string>
# This script returns an iterable of the paths to standard JavaScript objects.\n
\n
\n
return (\'jquery/core/jquery.js\',\n
return (\'jquery/core/jquery.js\',\n
\'vifib_hosting_js/vifib_hosting.js\',)\n
\'vifib_hosting_js/vifib_hosting.js\',\n
\'vifib_hosting_js/slap.js\',\n
\'vifib_hosting_js/vifib.js\',\n
)\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_image/software.png.xml
0 → 100644
View file @
878efaac
This diff is collapsed.
Click to expand it.
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_image/software_active.png.xml
0 → 100644
View file @
878efaac
This diff is collapsed.
Click to expand it.
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_js/slap.js.xml
0 → 100644
View file @
878efaac
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts21350751.9
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
slap.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/javascript
</string>
</value>
</item>
<item>
<key>
<string>
data
</string>
</key>
<value>
<string>
slap = {\n
}
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
10
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_js/vifib.js.xml
0 → 100644
View file @
878efaac
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts21351032.04
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
vifib.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/javascript
</string>
</value>
</item>
<item>
<key>
<string>
data
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
function drawSoftwareProductList(data) {\n
$(\'#software_product_list\').remove()\n
var ul = $(\'<ul>
\');\n
ul.attr(\'id\', \'software_product_list\')\n
$.each(data, function(i,item){\n
sp_id = \'software_product_\' + \'\'+item.uid;\n
li = $(\'
<li>
\').appendTo(ul);\n
var newElem = $(\'
<img>
\');\n
newElem.attr(\'alt\', item.title);\n
newElem.attr(\'src\', item.image);\n
newElem.attr(\'id\', sp_id);\n
newElem.appendTo(li)\n
$(\'#\' + sp_id).click(function() {\n
alert(\'Clicked on \' + $(this)[0][\'alt\']);\n
});\n
});\n
$("#js_entry").before(ul);\n
}\n
\n
function updateSoftwareProductList() {\n
q = $(\'#software_product_query\')[0][\'value\']\n
$.getJSON(\n
"http://t228:18080/erp5/web_site_module/hosting/myspace/software/ERP5Site_getSoftwareProductListAsJSON",\n
{"title":q},\n
drawSoftwareProductList);\n
}\n
\n
function mainController() {\n
$.ajaxSetup ({ \n
cache: false \n
});\n
\n
var newElem = $(\'
<input
type=
"text"
>
\');\n
newElem.attr(\'id\', "software_product_query");\n
$("#js_entry").before(newElem);\n
\n
var newElem = $(\'
<input
type=
"button"
>
\')\n
newElem.attr(\'value\', \'Refresh...\')\n
$("#js_entry").before(newElem);\n
\n
newElem.click(updateSoftwareProductList)\n
\n
}
]]>
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
1189
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_jauks_widget_library/WebSection_viewMySpaceWidget.xml
View file @
878efaac
...
@@ -47,9 +47,9 @@
...
@@ -47,9 +47,9 @@
</div>
\n
</div>
\n
\n
\n
<div
class=
"available_menu_option"
>
\n
<div
class=
"available_menu_option"
>
\n
<a
tal:attributes=
"href string:${website_url}/myspace/
help
"
>
\n
<a
tal:attributes=
"href string:${website_url}/myspace/
software
"
>
\n
<img
tal:attributes=
"src string:${base_url}
help_active.png"
alt=
"Help
"
/>
\n
<img
tal:attributes=
"src string:${base_url}
software_active.png"
alt=
"Software
"
/>
\n
<br
/><span
i18n:translate=
""
>
Help
</span>
\n
<br
/><span
i18n:translate=
""
>
Software
</span>
\n
</a>
\n
</a>
\n
</div>
\n
</div>
\n
\n
\n
...
...
master/bt5/vifib_web/bt/revision
View file @
878efaac
315
316
\ No newline at end of file
\ No newline at end of file
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