Commit 1ca9a020 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web: Upgrade file for the new bt5 format.

parent 7f6fca91
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
......@@ -26,71 +26,6 @@
<dictionary/>
</value>
</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>
<key> <string>title</string> </key>
<value> <string></string> </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