X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fresources_selected%2Fstatic%2Fjs%2Fresources_selected.js;h=9a064476fbe718c3ca25a0ba52498b3e8ff948e0;hb=a2069daeaa50cf7328f838d4c3f2ca2da0727bbc;hp=a78428887bbb590c3e8d47c6404c3edf607fa640;hpb=17adeda45d99976cc0b7acecf80a4f147efcdc1f;p=myslice.git diff --git a/plugins/resources_selected/static/js/resources_selected.js b/plugins/resources_selected/static/js/resources_selected.js index a7842888..9a064476 100644 --- a/plugins/resources_selected/static/js/resources_selected.js +++ b/plugins/resources_selected/static/js/resources_selected.js @@ -31,11 +31,15 @@ var self = this; this.table = this.elmt('table').dataTable({ - sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t<'row'<'col-xs-5'i><'col-xs-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 @@ -68,6 +72,7 @@ manifold.raise_event(self.options.query_uuid, RUN_UPDATE); }, + // related buttons are also disabled in the html template do_refresh: function(e) { throw 'resource_selected.do_refresh Not implemented'; @@ -148,7 +153,7 @@ switch(data.status) { case FIELD_REQUEST_PENDING: msg = 'PENDING'; - button = ""; + button = ""; break; case FIELD_REQUEST_SUCCESS: msg = 'SUCCESS'; @@ -309,9 +314,11 @@ // - Key and confirmation could be sufficient, or key and record state // XXX move record state to the manifold plugin API - on_field_state_changed: function(request, key, value, status) + on_field_state_changed: function(result) { - this.set_state(request, key, value, status); + console.log(result) + /* this.set_state(result.request, result.key, result.value, result.status); */ + this.set_state(result); }, // XXX we will have the requests for change @@ -335,7 +342,7 @@ 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]); }, @@ -389,7 +396,7 @@ var urn = r.urn; time = r.timeslot; - var SPAN = ""; + var SPAN = ""; var slot = "" + time + ""; //ioi // ioi var newline=Array(); @@ -406,7 +413,7 @@ var node = r.urn; time = r.timeslot; - var SPAN = ""; + var SPAN = ""; var slot = "" + time + ""; //ioi // ioi var newline=Array(); @@ -421,7 +428,7 @@ var node = r.urn; var time = r.timeslot; - var SPAN = ""; + var SPAN = ""; var slot = "" + time + ""; // ioi var newline=Array();