this._super(options, element);
/* Member variables */
- this.options = options;
- this.canvas_id = 'leases_area-' + options.plugin_uuid;
+ this.canvas_id = this.id('leases_area');
this.query_uuid = options.query_uuid;
this.rows = null;
* Implement an action of filtering while typing
* filter what correspond to the user choice
*
- */
$(function() {
var availableTags = ['omf','nitos','ple', s.nodelabel];
$( "#search" ).autocomplete({
source: availableTags
});
});
+ */
this.init_axisx('');
this.draw();
});
this.draw(this.canvas_id);
- }
+ },
- this.set_leases = function(leases) {
+ set_leases: function(leases)
+ {
this.initial_leases=leases;
this.draw(this.canvas_id);
- }
+ },
- this.update_resources = function(resources) {
+ update_resources: function(resources)
+ {
//
- }
+ },
- this.update_leases = function(leases) {
+ update_leases: function(leases)
+ {
//
- }
+ },
/* RECORD HANDLERS */
paper.path(half_daymarker_path).attr({'translation':left+','+top}).attr(attr_daymarker);
}
left += this.options.leases_w;
- },
+ }
////////// the row with the timeslot buttons (the one labeled 'All nodes')
this.granularity= this.min_granularity; // XXX axisx[1][0]-axisx[0][0];
var allnodes = paper.text (o.x_nodelabel-o.x_sep,top+o.y_node/2,"All nodes").attr(txt_allnodes)
.attr ({"font-size":o.y_node, "text-anchor":"end","baseline":"bottom"});
allnodes.scheduler=this;
- allnodes.click(allnodes_methods.click);
+ allnodes.click(this.allnodes_methods.click);
// timeslot buttons [it's the triangles above the slots]
for (var i=0, len=axisx.length; i < len; ++i) {
var timebutton=paper.path(this.timebutton_path).attr({'translation':left+','+top}).attr(attr_timebutton);
timebutton.from_time=axisx[i][0];
timebutton.scheduler=this;
- timebutton.click(timebutton_methods.click);
+ timebutton.click(this.timebutton_methods.click);
left+=(this.options.leases_w);
}
var nodelabel = paper.text(o.x_nodelabel-o.x_sep,top+o.y_node/3,nodename).attr(txt_nodelabel)
.attr ({"font-size":"12px", "text-anchor":"end","baseline":"bottom"});
//console.log(nodelabel);
- nodelabel_methods.selected(nodelabel,1);
+ this.nodelabel_methods.selected(nodelabel,1);
//nodelabel_methods.selected( this, ! this.selected );
- nodelabel.click(nodelabel_methods.click); //click action works here
+ nodelabel.click(this.nodelabel_methods.click); //click action works here
//timebutton.click(timebutton_methods.click);
// lease_methods.init_free(nodelabel.click, lease_methods.click_mine);
/* if at least one is not selected : select all */
var new_state = (unselected >0) ? 1 : 0;
for (var i=0, len=scheduler.nodelabels.length; i<len; ++i)
- nodelabel_methods.selected(scheduler.nodelabels[i],new_state);
+ this.nodelabel_methods.selected(scheduler.nodelabels[i],new_state);
}
},
-define('DEFAULT_LEASES_OFFSET', 0);
-define('DEFAULT_LEASES_SLOTS', 36);
-define('DEFAULT_LEASES_W', 180);
-define('DEFAULT_LEASES_GRANULARITY', 3600);
-
<div id="{{domid}}--scheduler" class='plugin scrollx scrolly'>
<!--
<p>
</div>
-->
- <p>Date: <input type='text' id='datepicker' value='".date('Y-m-d')."' /></p>
+ <p>Date: <input type='text' id='datepicker' value='2013-01-01' /></p>
<p>Search: <input type='text' id='search' name='search' /></p>
<!-- <div id='date_refresh'>Submit</div> -->
<table id='leases_data' class='hidden'></table>
<!-- The general layout for the scheduler -->
- <div id='leases_area-$uuid'></div>
+ <div id='{{domid}}__leases_area'></div>
<!--
<div id='leases_area'></div>