summaryrefslogtreecommitdiff
path: root/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multiselect.js
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2012-10-24 15:48:59 +0200
committerFabien Meghazi <fme@openerp.com>2012-10-24 15:48:59 +0200
commitb79406cb896e6f6003cb7ca6adc71f3f2da82d80 (patch)
tree33a733321b42d623c9bf3b30fc6d2fa17359b95a /addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multiselect.js
parent81e7d9ba3defa0dbaed1e244710fce29827bc1d6 (diff)
[WIP] Updated dhtmlx calendar
bzr revid: fme@openerp.com-20121024134859-pru7zenpiz0la8mq
Diffstat (limited to 'addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multiselect.js')
-rw-r--r--addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multiselect.js67
1 files changed, 0 insertions, 67 deletions
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multiselect.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multiselect.js
deleted file mode 100644
index 2890d0180a6..00000000000
--- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multiselect.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
-to use it in not GPL project. Please contact sales@dhtmlx.com for details
-*/
-scheduler.form_blocks["multiselect"]={
- render:function(sns) {
- var _result = "<div class='dhx_multi_select_"+sns.name+"' style='overflow: auto; height: "+sns.height+"px; position: relative;' >";
- for (var i=0; i<sns.options.length; i++) {
- _result += "<label><input type='checkbox' value='"+sns.options[i].key+"'/>"+sns.options[i].label+"</label>";
- if(convertStringToBoolean(sns.vertical)) _result += '<br/>';
- }
- _result += "</div>";
- return _result;
- },
- set_value:function(node,value,ev,config){
-
- var _children = node.getElementsByTagName('input');
- for(var i=0;i<_children.length;i++) {
- _children[i].checked = false; //unchecking all inputs on the form
- }
-
- function _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true ... ]
- var _children = node.getElementsByTagName('input');
- for(var i=0;i<_children.length; i++) {
- _children[i].checked = !! ids[_children[i].value];
- }
- }
-
- if(!scheduler._new_event) { // if it is a new event - new to get saved options
- var _ids = [];
- if(ev[config.map_to]) {
- var results = ev[config.map_to].split(',');
- for(var i=0;i<results.length;i++){
- _ids[results[i]] = true;
- }
- _mark_inputs(_ids);
- }
- else {
- var divLoading = document.createElement('div');
- divLoading.className='dhx_loading';
- divLoading.style.cssText = "position: absolute; top: 40%; left: 40%;";
- node.appendChild(divLoading);
- dhtmlxAjax.get(config.script_url+'?dhx_crosslink_'+config.map_to+'='+ev.id+'&uid='+scheduler.uid(), function(loader) {
- var _result = loader.doXPath("//data/item");
- var _ids = [];
- for(var i=0;i<_result.length;i++){
- _ids[_result[i].getAttribute(config.map_to)] = true;
- }
- _mark_inputs(_ids);
- node.removeChild(divLoading);
- });
- }
- }
- },
- get_value:function(node,ev,config){
- var _result = [];
- var _children = node.getElementsByTagName("input");
- for(var i=0;i<_children.length;i++) {
- if(_children[i].checked)
- _result.push(_children[i].value);
- }
- return _result.join(',');
- },
-
- focus:function(node){
- }
-}; \ No newline at end of file