Commit 62792e08 authored by Thonier Florian's avatar Thonier Florian

list.js; split show/hide cluster fcts in 2 function.

Can be called now directly by the cloneID
Link to #3951
parent af5c6880
......@@ -795,30 +795,58 @@ List.prototype = {
/**
* toggle on the display for a given clone of all clones merged with it
* @param {integer} cloneID -
* Action by direct click on the show button of the list element
* @param {String} div - div name of the show button
* */
showCluster: function (div) {
var cloneID = div.getAttribute("cloneID");
var self = this
this.m.clone(cloneID).split = true
this.showClusterContent(cloneID, true)
},
/**
* toggle on the display for a given clone of all clones merged with it
* @param {integer} cloneID -
* */
showClusterContent: function(cloneID, update){
var self = this
var fct;
if (update == true || update == undefined) {
fct = function () { self.m.updateElem([cloneID]) }
} else if (update == false) {
fct = function(){}
}
$("#cluster" + cloneID)
.show(50, function () {
self.m.updateElem([cloneID])
});
.show(50, fct );
},
/**
* toggle off the display for a given clone of all clones merged with it
* @param {integer} cloneID -
* Action by direct click on the hide button of the list element
* @param {String} div - div name of the hide button
* */
hideCluster: function (div) {
var cloneID = div.getAttribute("cloneID");
var self = this
this.m.clone(cloneID).split = false
this.hideClusterContent(cloneID, true)
},
/**
* toggle off the display for a given clone of all clones merged with it
* @param {integer} cloneID -
* */
hideClusterContent: function(cloneID, update){
var self = this
var fct;
if (update == true || update == undefined) {
fct = function () { self.m.updateElem([cloneID]) }
} else if (update == false) {
fct = function(){}
}
$("#cluster" + cloneID)
.hide(50, function () {
self.m.updateElem([cloneID])
});
.hide(50, fct );
},
/**
......
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