Commit 906ac729 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Tomáš Peterka

slapos_web: Minor changes to make JSL happy.

parent f7429ef0
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){
if (isChecked === false) {
//check the box which call the function
var cell = $("#"+listbox_id+"_cell_"+uid);
cell.addClass(additionnalClass);
checkbox.attr("checked", true)
checkbox.attr("checked", true);
}
return isChecked == false;
return isChecked === false;
}
function selectSoftwareProduct(uid,additionnalClass,baseClass,listbox_id,product_url,from){
var isCallingBoxChecked = selectCell(uid,additionnalClass,baseClass,listbox_id);
if (isCallingBoxChecked == true){
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)}
String.prototype.startsWith = function(str){
return (this.match("^"+str)==str);
};
function initCellSelction(additionnalClass,listbox_id)
{
......@@ -40,22 +40,20 @@ function initCellSelction(additionnalClass,listbox_id)
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)
initCellSelction(product_additionnal_class,product_listbox_id);
//Show release selection
$("."+product_additionnal_class+":last").click()
$("."+product_additionnal_class+":last").click();
}
function clearField(selector,default_value)
{
var field = $(selector)
var field = $(selector);
if (field.val() == default_value){
field.val('');
}
......
......@@ -104,7 +104,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// $(this).attr("class", "monitoring_failed");
var context = $(this);
if (jqXHR.status === 404) {
context.remove()
context.remove();
} else {
$(this).attr("class", "monitoring_failed")
.attr("title", "Unable to fetch content");
......
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