views/engine2actions.coffee in engine2-1.0.1 vs views/engine2actions.coffee in engine2-1.0.2

- old
+ new

@@ -126,13 +126,15 @@ _.reduce(action_names, ((pr, nm) -> pr.then (act) -> act.create_action(nm)), $q.when(@)).then (act) -> act.create_action(last_name, sc, elem).then (act) -> sc.action = act pre_invoke: -> @parent().action_pending = true + @action_pending = true # @parent().parent().action_pending = true if @parent().parent() post_invoke: -> delete @parent().action_pending # = false + delete @action_pending # @parent().parent().action_pending = false if @parent().parent() invoke: -> args = arguments @pre_invoke(args...) @perform_invoke(args...).then (response) => @@ -280,11 +282,11 @@ regexp: new RegExp("^#{name}/$") keys: [] traverse: (routes) -> menu_tmpl = _.template("<li><a href='{{href}}'>{{icon}}{{aicon}} {{loc}}</a></li>") - menu_sub_tmpl = _.template("<li e2-drop-down='{{dropdown}}'><a href='javascript://'>{{icon}}{{aicon}}{{loc}}<span class='caret'></span></a></li>") + menu_sub_tmpl = _.template("<li e2-drop-down='{{dropdown}}'><a href='javascript://'>{{icon}}{{aicon}} {{loc}}<span class='caret'></span></a></li>") out = routes.map (route, i) -> if route.menu menu_sub_tmpl icon: route.menu.icon && E2.icon(route.menu.icon) || "" aicon: route.menu.aicon && E2.aicon(route.menu.aicon) || "" @@ -563,9 +565,10 @@ decode_action: class DecodeAction extends Action initialize: -> super() @decode_field = @scope().f @dinfo = @parentp().meta.info[@decode_field] + throw "Primary and foreign key list lengths dont match: [#{@meta.primary_fields}] and [#{@dinfo.fields}]" unless @meta.primary_fields.length == @dinfo.fields.length @scope().$on "search_reset", => @clean() if_fk_values: (f) -> fk_values = @dinfo.fields.map((f) => @record()[f]) f(fk_values) if _(fk_values).every((f) -> f?) # null_value