From c4e6715797d138115b9af240161fa2a8e1cb4011 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Tue, 16 Sep 2014 10:15:57 +0200 Subject: [PATCH] style modals --- app/assets/images/sprite.svg | 1 + .../_application_controller.js.coffee | 23 +++-- .../app/views/agent_ticket_customer.jst.eco | 13 ++- .../app/views/agent_ticket_merge.jst.eco | 11 ++- .../app/views/agent_user_create.jst.eco | 14 +-- .../views/dashboard/ticket_settings.jst.eco | 14 +-- .../app/views/generic/admin/edit.jst.eco | 15 +-- .../app/views/generic/admin/new.jst.eco | 14 +-- .../app/views/generic/history.jst.eco | 6 +- .../javascripts/app/views/link/add.jst.eco | 13 ++- .../javascripts/app/views/maintenance.jst.eco | 2 +- .../javascripts/app/views/modal.jst.eco | 18 ++-- app/assets/stylesheets/zzz.css.erb | 93 ++++++++++--------- 13 files changed, 132 insertions(+), 105 deletions(-) diff --git a/app/assets/images/sprite.svg b/app/assets/images/sprite.svg index e075ec9e7..36e1ac136 100644 --- a/app/assets/images/sprite.svg +++ b/app/assets/images/sprite.svg @@ -197,5 +197,6 @@ + \ No newline at end of file diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index 88016e430..fc2b5c133 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -438,14 +438,13 @@ class App.ControllerContent extends App.Controller @navShow() class App.ControllerModal extends App.Controller - className: 'modal fade', - tag: 'div', + className: 'modal fade' events: - 'submit form': 'submit', - 'click .submit': 'submit', - 'click .cancel': 'modalHide', - 'click .close': 'modalHide', + 'submit form': 'submit' + 'click .js-submit': 'submit' + 'click .js-cancel': 'modalHide' + 'click .js-close': 'modalHide' constructor: (options) -> @@ -466,21 +465,21 @@ class App.ControllerModal extends App.Controller render: -> @html App.view('modal')( - title: @title, + title: @title message: @message detail: @detail close: @close ) @modalShow( - backdrop: @backdrop, - keyboard: @keyboard, + backdrop: @backdrop + keyboard: @keyboard ) modalShow: (params) -> defaults = { - backdrop: true, - keyboard: true, - show: true, + backdrop: true + keyboard: true + show: true } data = $.extend({}, defaults, params) @el.modal(data) diff --git a/app/assets/javascripts/app/views/agent_ticket_customer.jst.eco b/app/assets/javascripts/app/views/agent_ticket_customer.jst.eco index 5a09dd410..ef00f83c3 100644 --- a/app/assets/javascripts/app/views/agent_ticket_customer.jst.eco +++ b/app/assets/javascripts/app/views/agent_ticket_customer.jst.eco @@ -1,13 +1,16 @@ -
+