var self = this;
this.table = this.elmt('table').dataTable({
-// sDom: "<'row'<'col-md-5'l><'col-md-1'r><'col-md-6'f>>t<'row'<'col-md-5'i><'col-md-7'p>>",
- sPaginationType: 'full_numbers',
+// the original hazelnut layout was
+// sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t<'row'<'col-xs-5'i><'col-xs-7'p>>",
+// however the bottom line with 'showing blabla...' and the navigation widget are not really helpful
+ sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t>",
+// so this does not matter anymore now that the pagination area is turned off
+// sPaginationType: 'bootstrap',
bAutoWidth: true,
- //bJQueryUI : true,
- //bRetrieve : true,
+// bJQueryUI : true,
+// bRetrieve : true,
// sScrollX : '100%', // Horizontal scrolling
// bSortClasses : false, // Disable style for the sorted column
// aaSorting : [[ 0, 'asc' ]], // Default sorting on URN
});
// XXX This should not be done at init...
- console.log("elmt(update) is " + this.elmt('update'));
-
this.elmt('update').click(this, this.do_update);
this.elmt('refresh').click(this, this.do_refresh);
this.elmt('reset').click(this, this.do_reset);
do_update: function(e)
{
- console.log ("in do_update");
var self = e.data;
// XXX check that the query is not disabled
manifold.raise_event(self.options.query_uuid, RUN_UPDATE);
},
+ // related buttons are also disabled in the html template
do_refresh: function(e)
{
- throw 'Not implemented';
+ throw 'resource_selected.do_refresh Not implemented';
},
do_reset: function(e)
{
- throw 'Not implemented';
+ throw 'resources_selected.do_reset Not implemented';
},
do_clear_annotations: function(e)
{
- throw 'Not implemented';
+ throw 'resources_selected.do_clear_annotations Not implemented';
},
/************************** GUI MANIPULATION **************************/
var button = '';
var row;
-
+
+ // make sure the change is visible : toggle on the whole plugin
+ // this might hae to be made an 'auto-toggle' option of this plugin..
+ // also it might be needed to be a little finer-grained here
+ this.toggle_on();
+
switch(data.request) {
case FIELD_REQUEST_ADD_RESET:
case FIELD_REQUEST_REMOVE_RESET:
switch(data.status) {
case FIELD_REQUEST_PENDING:
msg = 'PENDING';
- button = "<span class='ui-icon ui-icon-close ResourceSelectedClose' id='" + data.key + "'/>";
+ button = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='" + data.key + "'/>";
break;
case FIELD_REQUEST_SUCCESS:
msg = 'SUCCESS';
var remove_urn = this.id;
var current_resources = event.data.instance.current_resources;
var list_resources = $.grep(current_resources, function(x) {return x.urn != remove_urn});
- //jQuery.publish('selected', 'cancel/'+this.id+'/'+get_value(firstCellVal));
+ //jQuery.publish('selected', 'cancel/'+this.id+'/'+unfold.get_value(firstCellVal));
$.publish('/update-set/' + event.data.instance.options.resource_query_uuid, [list_resources, true]);
},
var urn = r.urn;
time = r.timeslot;
- var SPAN = "<span class='ui-icon ui-icon-close ResourceSelectedClose' id='"+urn+"'/>";
+ var SPAN = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='"+urn+"'/>";
var slot = "<span id='resource_"+urn+"'>" + time + "</span>"; //ioi
// ioi
var newline=Array();
var node = r.urn;
time = r.timeslot;
- var SPAN = "<span class='ui-icon ui-icon-close ResourceSelectedClose' id='"+node+"'/>";
+ var SPAN = "<span class='glyphicon glyphicon-renomve ResourceSelectedClose' id='"+node+"'/>";
var slot = "<span id='resource_"+node+"'>" + time + "</span>"; //ioi
// ioi
var newline=Array();
var node = r.urn;
var time = r.timeslot;
- var SPAN = "<span class='ui-icon ui-icon-close ResourceSelectedClose' id='"+node+"'/>";
+ var SPAN = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='"+node+"'/>";
var slot = "<span id='resource_"+node+"'>" + time + "</span>";
// ioi
var newline=Array();