Skip to content

Instantly share code, notes, and snippets.

@theredpea
Created May 21, 2018 21:32
Show Gist options
  • Save theredpea/1366b60d5bae9b5e30a2f36304aad0a0 to your computer and use it in GitHub Desktop.
Save theredpea/1366b60d5bae9b5e30a2f36304aad0a0 to your computer and use it in GitHub Desktop.
define("extensions.qliktech/filterpane/filterpane", ["jquery", "qvangular", "util", "core.utils/deferred", "objects.backend-api/field-api", "extensions.qliktech/filterpane/filterpane-properties", "extensions.qliktech/filterpane/filterpane-handler", "objects.utils/data-properties/listobject-util", "client.utils/property-mapper", "text!./filterpane.ng.html", "objects.extension/base-controller", "objects.extension/export-format", "objects.extension/object-conversion", "extensions.qliktech/filterpane/filterpane-layout", "extensions.qliktech/filterpane/directives/collapsed-listbox/collapsed"], function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
"use strict";
function n() {
return "filterpane-" + ++p
}
function o(a) {
return a.columns.some(function(a) {
return a.items.some(function(a) {
return a.expand && (!a.object || 1 !== a.object.renderState)
})
})
}
var p = 0
, q = k.extend({
size: {},
columns: [],
expandable: !1,
init: function(b, c, d, e) {
this.$scope = b,
this.$element = c,
this.$timeout = d,
this.filterpaneLayout = e,
this.updateDeferred,
b.object.throbberApi.off(),
this.showThrobberTimeout = d(function() {
b.object.throbberApi.show()
}, 1e3),
b.outsideIgnoreName = n(),
b.columns = [],
b.ext.expandable = function() {
return this.expandable
}
.bind(this),
b.options || (b.options = {}),
b.triggerFullScreen = function() {
b.object.inAnalysisState() && (a(".embedded-sheet-toolbar").length > 0 && a(".embedded-sheet-toolbar").css("display", "none"),
b.$emit("zoomOnCell"))
}
,
b.$on("objectRenderStateChange", function(a, c) {
a.stopPropagation(),
c && !o(b) && this.renderStateDfd.resolve()
}
.bind(this))
},
onPaint: function() {
return this.renderStateDfd = d(),
this.update(this.$scope.layout).then(function() {
o(this.$scope) || this.renderStateDfd.resolve()
}
.bind(this)),
this.renderStateDfd.promise
},
onResize: function() {
return this.renderStateDfd = d(),
this.update(this.$scope.layout).then(function() {
o(this.$scope) || this.renderStateDfd.resolve()
}
.bind(this)),
this.renderStateDfd.promise
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment