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
Klaus Wölfel
slapos.core
Commits
1ca9a020
Commit
1ca9a020
authored
Feb 21, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_web: Upgrade file for the new bt5 format.
parent
7f6fca91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
65 deletions
+62
-65
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_js/vifib_hosting.js.js
.../vifib_hosting_theme/vifib_hosting_js/vifib_hosting.js.js
+62
-0
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_js/vifib_hosting.js.xml
...vifib_hosting_theme/vifib_hosting_js/vifib_hosting.js.xml
+0
-65
No files found.
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_js/vifib_hosting.js.js
0 → 100644
View file @
1ca9a020
function
selectCell
(
uid
,
additionnalClass
,
baseClass
,
listbox_id
){
var
checkbox
=
$
(
"
#
"
+
listbox_id
+
"
_cb_
"
+
uid
);
var
isChecked
=
checkbox
.
is
(
"
:checked
"
);
//Uncheck all
$
(
"
.
"
+
listbox_id
+
"
-table :checked
"
).
attr
(
"
checked
"
,
false
);
$
(
"
.
"
+
listbox_id
+
"
-table .
"
+
baseClass
).
removeClass
(
additionnalClass
);
if
(
isChecked
==
false
){
//check the box which call the function
var
cell
=
$
(
"
#
"
+
listbox_id
+
"
_cell_
"
+
uid
);
cell
.
addClass
(
additionnalClass
);
checkbox
.
attr
(
"
checked
"
,
true
)
}
return
isChecked
==
false
;
}
function
selectSoftwareProduct
(
uid
,
additionnalClass
,
baseClass
,
listbox_id
,
product_url
,
from
){
var
isCallingBoxChecked
=
selectCell
(
uid
,
additionnalClass
,
baseClass
,
listbox_id
);
if
(
isCallingBoxChecked
==
true
){
release_listbox_url
=
product_url
+
"
/SoftwareProduct_viewAsWeb/release_listbox?came_from=
"
+
from
;
$
(
"
#release_listbox_container
"
).
load
(
release_listbox_url
);
}
}
String
.
prototype
.
startsWith
=
function
(
str
)
{
return
(
this
.
match
(
"
^
"
+
str
)
==
str
)}
function
initCellSelction
(
additionnalClass
,
listbox_id
)
{
$
(
"
.
"
+
listbox_id
+
"
-table :checked
"
).
each
(
function
(){
var
id
=
$
(
this
).
attr
(
"
id
"
);
var
id_prefix
=
listbox_id
+
"
_cb_
"
;
if
(
id
.
startsWith
(
id_prefix
))
{
uid
=
id
.
substring
(
id_prefix
.
length
,
id
.
length
);
//set the addtional css class
$
(
"
#listbox_cell_
"
+
uid
).
addClass
(
additionnalClass
);
}
});
}
function
initSoftwareProductList
(
product_additionnal_class
,
product_listbox_id
){
//Select items
initCellSelction
(
product_additionnal_class
,
product_listbox_id
)
//Show release selection
$
(
"
.
"
+
product_additionnal_class
+
"
:last
"
).
click
()
}
function
clearField
(
selector
,
default_value
)
{
var
field
=
$
(
selector
)
if
(
field
.
val
()
==
default_value
){
field
.
val
(
''
);
}
}
\ No newline at end of file
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/vifib_hosting_js/vifib_hosting.js.xml
View file @
1ca9a020
...
@@ -26,71 +26,6 @@
...
@@ -26,71 +26,6 @@
<dictionary/>
<dictionary/>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
raw
</string>
</key>
<value>
<string>
function selectCell(uid,additionnalClass,baseClass,listbox_id){\n
\n
var checkbox = $("#"+listbox_id+"_cb_"+uid);\n
var isChecked = checkbox.is(":checked");\n
//Uncheck all\n
$("."+listbox_id+"-table :checked").attr("checked", false);\n
$("."+listbox_id+"-table ."+baseClass).removeClass(additionnalClass);\n
\n
if (isChecked == false){\n
//check the box which call the function\n
var cell = $("#"+listbox_id+"_cell_"+uid);\n
cell.addClass(additionnalClass);\n
checkbox.attr("checked", true)\n
\n
}\n
return isChecked == false;\n
\n
}\n
\n
function selectSoftwareProduct(uid,additionnalClass,baseClass,listbox_id,product_url,from){\n
var isCallingBoxChecked = selectCell(uid,additionnalClass,baseClass,listbox_id);\n
if (isCallingBoxChecked == true){\n
release_listbox_url = product_url + "/SoftwareProduct_viewAsWeb/release_listbox?came_from=" + from ;\n
\n
$("#release_listbox_container").load(release_listbox_url);\n
}\n
\n
}\n
\n
String.prototype.startsWith = function(str)\n
{return (this.match("^"+str)==str)}\n
\n
function initCellSelction(additionnalClass,listbox_id)\n
{\n
$("."+listbox_id+"-table :checked").each(function(){\n
var id = $(this).attr("id");\n
var id_prefix = listbox_id+"_cb_";\n
if (id.startsWith(id_prefix))\n
{\n
uid = id.substring(id_prefix.length,id.length);\n
//set the addtional css class\n
$("#listbox_cell_"+uid).addClass(additionnalClass);\n
\n
}\n
});\n
}\n
\n
function initSoftwareProductList(product_additionnal_class, product_listbox_id){\n
\n
//Select items\n
initCellSelction(product_additionnal_class,product_listbox_id)\n
//Show release selection\n
$("."+product_additionnal_class+":last").click()\n
}\n
\n
function clearField(selector,default_value)\n
{\n
var field = $(selector)\n
if (field.val() == default_value){\n
field.val(\'\');\n
}\n
}
</string>
</value>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
...
...
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