- Timestamp:
- 01/15/13 15:50:53 (12 years ago)
- Location:
- branches/OaaS/HeuristicLab.Services.Optimization.Web/Content
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/Styling.js
r9062 r9166 33 33 show: true, 34 34 placement: 'outsideGrid' 35 }, 36 highlighter: { 37 show: true, 38 sizeAdjust: 7.5 35 39 } 36 40 }); 41 } 42 43 function handleDatatableSelectionChanged(datatable, datarow) { 44 $.ajax({ 45 url: '/chart/GetDatatableContent?datatable=' + datatable + '&datarow=' + datarow, 46 47 success: function (result) { 48 var plot = generatePlot('dataTableGraph', result) 49 plot.replot({ resetAxes: true }); 50 51 var resizer = $("#dataTableGraph").closest('.resizable'); 52 $(resizer).unbind('resizestop'); 53 $(resizer).bind('resizestop', function (event, ui) { 54 var id = $(this).children('div').get(0).id; 55 $("#dataTableGraph").height($(this).height() * 0.96); 56 $("#dataTableGraph").width($(this).width() * 0.96); 57 plot.replot({ resetAxes: true }); 58 }); 59 }, 60 error: function (jqXHR, textStatus, errorThrown) { 61 alert(textStatus); 62 } 63 }); 64 } 65 66 function redrawAccordions() { 67 $(".collapsible").accordion("refresh"); 68 } 69 70 function injectDatatableAnalyzer() { 71 var datatable = null; 72 var row = null; 73 74 // crawl datatables for current run results 75 if ($("#dataTable").length > 0) { 76 $.ajax({ 77 url: '/chart/GetDatatables', 78 79 success: function (result) { 80 $("#dataTable").empty(); 81 $.each(result.Datatables, function (index, tableName) { 82 // http://stackoverflow.com/questions/1801499/how-to-change-options-of-select-with-jquery 83 $("#dataTable").append($("<option></option>").attr("value", tableName).text(tableName)); 84 }); 85 86 // select first row 87 // http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery 88 $("#dataTable").val($("#dataTable option:first").val()); 89 // fire selection changed event 90 $("#dataTable").change(); 91 }, 92 error: function (jqXHR, textStatus, errorThrown) { 93 alert(textStatus); 94 } 95 }); 96 97 $("#dataTable option:selected").each(function () { 98 datatable = $(this).text(); 99 }); 100 101 $("#dataTable").change(function () { 102 $("#dataTable option:selected").each(function () { 103 datatable = $(this).text(); 104 $.ajax({ 105 url: '/chart/GetRowNames?datatable=' + datatable, 106 107 success: function (result) { 108 $("#dataRow").empty(); 109 $.each(result.RowNames, function (index, rowName) { 110 // http://stackoverflow.com/questions/1801499/how-to-change-options-of-select-with-jquery 111 $("#dataRow").append($("<option></option>").attr("value", rowName).text(rowName)); 112 }); 113 114 // select first row 115 // http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery 116 $("#dataRow").val($("#dataRow option:first").val()); 117 // fire selection changed event 118 //$("#dataRow").change(); 119 }, 120 error: function (jqXHR, textStatus, errorThrown) { 121 alert(textStatus); 122 } 123 }); 124 }); 125 }); 126 127 $("#dataRow").change(function () { 128 $("#dataRow option:selected").each(function () { 129 row = $(this).text(); 130 handleDatatableSelectionChanged(datatable, row); 131 }); 132 }); 133 } 134 } 135 136 function injectMatrixGraph() { 137 $(".matrix-graph").each(function (i) { 138 var tabable = $(this).closest(".tabable"); 139 var id = this.id; 140 var resizerId = $(this).parent().get(0).id; 141 var indices = retrieveMatrix(id); 142 var graphCreated = false; 143 144 $(tabable).bind('tabsactivate', function (event, ui) { 145 if ($(ui.newPanel[0]).hasClass("resizable") && !graphCreated) { 146 graphCreated = true; 147 var id = $(ui.newPanel[0]).children("div")[0].id; 148 var resizerId = $("#" + id).parent().get(0).id; 149 var indices = retrieveMatrix(id); 150 151 $.ajax({ 152 url: '/Chart/GetMatrixContentForGraph?run=' + indices.runId + '¶meterOffset=' + indices.parameterOffset + "&showMarker=false", 153 154 success: function (result) { 155 var plot = generatePlot(id, result); 156 tabable.bind('tabsshow', function (event, ui) { 157 if (ui.index == 1 && plot._drawCount == 0) { 158 plot.replot(); 159 } 160 redrawAccordions(); 161 }); 162 var resizer = $("#" + id).closest('.resizable'); 163 $(resizer).bind('resizestop', function (event, ui) { 164 var id = $(this).children('div').get(0).id; 165 $("#" + id).height($(this).height() * 0.96); 166 $("#" + id).width($(this).width() * 0.96); 167 plot.replot({ resetAxes: true }); 168 }); 169 }, 170 error: function (jqXHR, textStatus, errorThrown) { 171 alert(textStatus); 172 alert(errorThrown); 173 } 174 }); 175 } 176 }); 177 }); 178 } 179 180 function injectTableModifiers() { 181 // TODO: Make row add / delete via javascript 182 var i = 10 + 20; 183 return i; 37 184 } 38 185 … … 108 255 109 256 try { 110 $(".collapsible").accordion( "resize",111 {257 $(".collapsible").accordion({ 258 heightStyle: "content", 112 259 collapsible: true, 113 260 active: false … … 131 278 $(this).resizable(); 132 279 }); 133 134 $(".matrix-graph").each(function (i) { 135 var tabable = $(this).closest(".tabable"); 136 var id = this.id; 137 var resizerId = $(this).parent().get(0).id; 138 var indices = retrieveMatrix(id); 139 140 $.ajax({ 141 url: '/Chart/GetMatrixContentForGraph?run=' + indices.runId + '¶meterOffset=' + indices.parameterOffset + "&showMarker=false", 142 143 success: function (result) { 144 var plot = generatePlot(id, result); 145 tabable.bind('tabsshow', function (event, ui) { 146 if (ui.index == 1 && plot._drawCount == 0) { 147 plot.replot(); 148 } 149 }); 150 var resizer = $("#"+id).closest('.resizable'); 151 $(resizer).bind('resizestop', function (event, ui) { 152 var id = $(this).children('div').get(0).id; 153 $("#"+id).height($(this).height() * 0.96); 154 $("#" + id).width($(this).width() * 0.96); 155 plot.replot({ resetAxes: true }); 156 }); 157 }, 158 error: function (jqXHR, textStatus, errorThrown) { 159 alert(textStatus); 160 alert(errorThrown); 161 } 162 }); 163 }); 164 } catch (e) { 165 } 280 } catch (e) { 281 } 282 283 injectMatrixGraph(); 284 injectDatatableAnalyzer(); 285 //injectTableModifiers(); 166 286 } 167 287 ); -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot
-
Property
svn:ignore
set to
extras
NDdata
examples
.hg_archival.txt
.hgignore
.hgtags
build.xml
dist.props
-
Property
svn:ignore
set to
-
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/jqplot/src
-
Property
svn:ignore
set to
changes.txt
-
Property
svn:ignore
set to
Note: See TracChangeset
for help on using the changeset viewer.