Skip to content

Commit

Permalink
[hotfix] saving as new bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Mar 1, 2016
1 parent 8b0f2af commit eccf9c2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
26 changes: 24 additions & 2 deletions panoramix/assets/javascripts/explore.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,35 @@ require('../vendor/pygments.css');
require('../node_modules/bootstrap-toggle/css/bootstrap-toggle.min.css');

var slice;
function prepForm(){
var i = 1;
// Assigning the right id to form elements in filters
$("#filters > div").each(function() {
$(this).attr("id", function() {return "flt_" + i;})
$(this).find("#flt_col_0")
.attr("id", function() {return "flt_col_" + i;})
.attr("name", function() {return "flt_col_" + i;});
$(this).find("#flt_op_0")
.attr("id", function() {return "flt_op_" + i;})
.attr("name", function() {return "flt_op_" + i;});
$(this).find("#flt_eq_0")
.attr("id", function() {return "flt_eq_" + i;})
.attr("name", function() {return "flt_eq_" + i;});
i++;
});
}

function renderSlice(){
prepForm();
slice.render();
}

function initExploreView() {

function druidify(){
$('div.alert').remove();
history.pushState({}, document.title, slice.querystring());
px.renderSlice();
renderSlice();
}

function get_collapsed_fieldsets(){
Expand Down Expand Up @@ -227,7 +249,7 @@ $(document).ready(function() {
$('.slice').data('slice', slice);

// call vis render method, which issues ajax
px.renderSlice();
renderSlice();

// make checkbox inputs display as toggles
$(':checkbox')
Expand Down
22 changes: 0 additions & 22 deletions panoramix/assets/javascripts/modules/panoramix.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,27 +240,6 @@ var px = (function() {
console.error("require(", visType, ") failed.");
}
}
function prepForm(){
var i = 1;
// Assigning the right id to form elements in filters
$("#filters > div").each(function() {
$(this).attr("id", function() {return "flt_" + i;})
$(this).find("#flt_col_0")
.attr("id", function() {return "flt_col_" + i;})
.attr("name", function() {return "flt_col_" + i;});
$(this).find("#flt_op_0")
.attr("id", function() {return "flt_op_" + i;})
.attr("name", function() {return "flt_op_" + i;});
$(this).find("#flt_eq_0")
.attr("id", function() {return "flt_eq_" + i;})
.attr("name", function() {return "flt_eq_" + i;});
i++;
});
}
function renderSlice(){
prepForm();
slice.render();
}

// Export public functions
return {
Expand All @@ -269,7 +248,6 @@ var px = (function() {
formatDate: formatDate,
timeFormatFactory: timeFormatFactory,
color: color(),
renderSlice: renderSlice,
getParam: getParam,
}
})();
Expand Down

0 comments on commit eccf9c2

Please sign in to comment.