mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Removing dialogOptions library, not required anymore
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
//= require jquery_ujs
|
||||
//= require jquery-ui
|
||||
//= require shared/jquery-ui-timepicker-addon
|
||||
//= require shared/jquery.dialogOptions
|
||||
//= require angular
|
||||
//= require angular-resource
|
||||
//= require angular-animate
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.tagRules").directive 'newTagRuleDialog', ($compile, $templateCache) ->
|
||||
angular.module("admin.tagRules").directive 'newTagRuleDialog', ($compile, $templateCache, $window) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, element, attr) ->
|
||||
@@ -14,12 +14,15 @@ angular.module("admin.tagRules").directive 'newTagRuleDialog', ($compile, $templ
|
||||
|
||||
# Set Dialog options
|
||||
template.dialog
|
||||
show: { effect: "fade", duration: 400 }
|
||||
hide: { effect: "fade", duration: 300 }
|
||||
autoOpen: false
|
||||
resizable: false
|
||||
width: 'auto'
|
||||
scaleW: 0.4
|
||||
width: $window.innerWidth * 0.4;
|
||||
modal: true
|
||||
clickOut: true
|
||||
open: (event, ui) ->
|
||||
$('.ui-widget-overlay').bind 'click', ->
|
||||
$(this).siblings('.ui-dialog').find('.ui-dialog-content').dialog('close')
|
||||
|
||||
# Link opening of dialog to click event on element
|
||||
element.bind 'click', (e) ->
|
||||
|
||||
Reference in New Issue
Block a user