From ce2fa41d7d706ddbe1df31cd3d8addb8400200e2 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 1 Jun 2016 09:12:18 +0200 Subject: [PATCH] replace css slidedown by jquery --- app/coffee/modules/admin/third-parties.coffee | 11 +++++++++-- app/partials/admin/admin-third-parties-webhooks.jade | 2 +- .../modules/admin/admin-third-parties-webhooks.scss | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/coffee/modules/admin/third-parties.coffee b/app/coffee/modules/admin/third-parties.coffee index 2d4ea15c..076bf552 100644 --- a/app/coffee/modules/admin/third-parties.coffee +++ b/app/coffee/modules/admin/third-parties.coffee @@ -194,15 +194,22 @@ WebhookDirective = ($rs, $repo, $confirm, $loading, $translate) -> $el.on "click", ".toggle-history", (event) -> target = angular.element(event.currentTarget) + if not webhook.logs? or webhook.logs.length == 0 updateLogs().then -> #Waiting for ng-repeat to finish timeout 0, -> - $el.find(".webhooks-history").toggleClass("open") + $el.find(".webhooks-history") + .toggleClass("open") + .slideToggle() + updateShowHideHistoryText() else - $el.find(".webhooks-history").toggleClass("open") + $el.find(".webhooks-history") + .toggleClass("open") + .slideToggle() + $scope.$apply () -> updateShowHideHistoryText() diff --git a/app/partials/admin/admin-third-parties-webhooks.jade b/app/partials/admin/admin-third-parties-webhooks.jade index 0246727f..98d68e50 100644 --- a/app/partials/admin/admin-third-parties-webhooks.jade +++ b/app/partials/admin/admin-third-parties-webhooks.jade @@ -91,7 +91,7 @@ div.wrapper.roles(ng-controller="WebhooksController as ctrl", a.delete-webhook(href="", title="{{'ADMIN.WEBHOOKS.DELETE' | translate}}") tg-svg(svg-icon="icon-trash") - div.webhooks-history(ng-show="webhook.logs") + div.webhooks-history div.history-single-wrapper(ng-repeat="log in webhook.logs") div.history-single div diff --git a/app/styles/modules/admin/admin-third-parties-webhooks.scss b/app/styles/modules/admin/admin-third-parties-webhooks.scss index 1cca310e..8ddaf331 100644 --- a/app/styles/modules/admin/admin-third-parties-webhooks.scss +++ b/app/styles/modules/admin/admin-third-parties-webhooks.scss @@ -82,7 +82,7 @@ } .webhooks-history { - @include slide(1000px, hidden, $min: 0); + display: none; } .history-single-wrapper {