Commit cb74ecf2 authored by Lukasz Waskiewicz's avatar Lukasz Waskiewicz
Browse files

refs #1444 przechodzenie do wyników, ograniczanie logowania JS

parent 5f15ea2c
......@@ -6,7 +6,6 @@ $(document).ready(function() {
function initBootstrapJSFeatures() {
console.debug('initBootstrapJSFeatures')
/* Bootstrap Tooltip enabled */
$('[data-toggle="tooltip"]').tooltip();
......
......@@ -22,7 +22,6 @@ PaginationActions.prototype = {
bindUI : function() {
var $this = this;
console.debug("PaginationActions bindUi");
this.settings.eventDelegator.find('table.pickable').on('click', 'tr.manageableElement', function(e) {
var evt = e || window.event
if(evt.ctrlKey){
......
......@@ -15,8 +15,6 @@ ConfigurationEditWidget = {
var mode = settings['mode'];
var target = settings['target'];
console.debug("editorInit "+ mode)
ConfigurationEditWidget.setPreviewVisibility(mode);
if("HTML" == mode){
$(target).show();
......@@ -89,7 +87,6 @@ ConfigurationEditWidget = {
},
changeMode : function (mode){
console.debug("change mode "+mode);
if(settings['mode'] != mode){
if( settings['mode']=='JSON'){
window.editor.destroy();
......@@ -108,7 +105,6 @@ ConfigurationEditWidget = {
},
setPreviewVisibility : function (mode){
console.debug("visibility "+mode);
if(mode === 'HTML'){
$("#htmlPreview").removeClass('disabled')
} else {
......
......@@ -62,13 +62,11 @@ var QueryOperations = {
},
bindRemoveActionOnElement : function(el) {
console.debug("QueryOperations bindRemoveActionOnElement");
this.bindSingleButton(el.find(".removeQuery"));
},
bindRemoveAction : function() {
var $this = this;
console.debug("QueryOperations bindRemoveAction");
QueryOperations.settings.eventDelegator.find(".removeQuery").each(function() {$this.bindSingleButton($(this))});
......@@ -78,7 +76,6 @@ var QueryOperations = {
QueryOperations.settings.eventDelegator.find("tr.picked").each(function(){
queryIds.push(Number($(this).data("queryid")));
})
console.debug(queryIds)
$.ajax({
method: "POST",
url: QueryOperations.settings.queryRemoveUrl+'Many',
......
......@@ -69,6 +69,8 @@ QueryResultsWidget.prototype.handleQueryCompleted = function(message) {
resultsTab.removeClass('disabled');
if ($('#queriesResults').hasClass('active')) {
QueryResultsDataWidget.loadResults(message.query.id, 1);
} else {
this.switchToResultsTab();
}
}
}
......@@ -84,7 +86,6 @@ QueryResultsWidget.prototype.loadQueryContext = function(queryId, query, complet
query = typeof query !== 'undefined' ? query : queryRow.find(".queryContent > div").text();
$('#resultsNavigation a[href="#queriesResults"]').data('queryid', queryId)
console.debug("load context: " + queryId);
if (window.editor) {
window.editor.setValue(query);
} else {
......@@ -117,7 +118,6 @@ QueryResultsWidget.prototype.initView = function() {
// load context if queryId in url on documentLoad
if (queryId != null && $("tr.resultElement[data-queryid='" + queryId + "']").size() > 0) {
this.loadQueryContext(queryId);
console.debug('showResults ' + showResults);
if (showResults) {
this.switchToResultsTab()
}
......
......@@ -41,7 +41,7 @@ QueryTable.prototype.complete = function() {
this.handleQueryCompleted(query);
} else {
this.waitingMessages = [];
console.info("refresh all waiting");
// console.info("refresh all waiting");
this.table.changePage(fetchCurrentPage(this.settings.paginationWrapperId), false);
}
}
......@@ -52,14 +52,14 @@ QueryTable.prototype.customSuccessOperation = function (){}
QueryTable.prototype.handleQueryCompleted = function(message) {
if (this.ajaxPageRefreshPending) {
this.waitingMessages.push(message);
console.debug("waiting "+message.query.id + " " + message.query.status)
// console.debug("waiting "+message.query.id + " " + message.query.status)
return;
}
if (this.mayOnlyOneRowBeRefreshed(message)) {
console.debug("refresh one "+message.query.id +" "+message.query.status);
// console.debug("refresh one "+message.query.id +" "+message.query.status);
this.changeOneRow(message);
} else {
console.debug("refresh all trigeredBy "+message.query.id );
// console.debug("refresh all trigeredBy "+message.query.id );
this.table.changePage(fetchCurrentPage(this.settings.paginationWrapperId), false);
}
......@@ -72,7 +72,7 @@ QueryTable.prototype.changeOneRow = function(message) {
if (property == 'status') {
var icon = target.find("td[data-field='" + property + "'] .statusIcon");
if(statuses.indexOf(icon.data("status")) > statuses.indexOf(query.status)){
console.warn("New status before old"+ icon.data("status")+" -> "+query.status);
// console.warn("New status before old"+ icon.data("status")+" -> "+query.status);
}
icon.removeClass(icon.data("status"));
icon.addClass(query.status);
......@@ -125,7 +125,7 @@ QueryTable.prototype.mayOnlyOneRowBeRefreshed = function(message){
QueryTable.prototype.bindUiActions = function() {
this.tableWrapper.find(".resultElement").on("click", function(e) {
query = $(this).data('query');
console.debug(query);
// console.debug(query);
if (window.editor) {
window.editor.setValue(query);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment