@@ -0,0 +1,36 | |||
|
1 | # encoding: utf-8 | |
|
2 | # | |
|
3 | # Redmine - project management software | |
|
4 | # Copyright (C) 2006-2012 Jean-Philippe Lang | |
|
5 | # | |
|
6 | # This program is free software; you can redistribute it and/or | |
|
7 | # modify it under the terms of the GNU General Public License | |
|
8 | # as published by the Free Software Foundation; either version 2 | |
|
9 | # of the License, or (at your option) any later version. | |
|
10 | # | |
|
11 | # This program is distributed in the hope that it will be useful, | |
|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
14 | # GNU General Public License for more details. | |
|
15 | # | |
|
16 | # You should have received a copy of the GNU General Public License | |
|
17 | # along with this program; if not, write to the Free Software | |
|
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
|
19 | ||
|
20 | module ContextMenusHelper | |
|
21 | def context_menu_link(name, url, options={}) | |
|
22 | options[:class] ||= '' | |
|
23 | if options.delete(:selected) | |
|
24 | options[:class] << ' icon-checked disabled' | |
|
25 | options[:disabled] = true | |
|
26 | end | |
|
27 | if options.delete(:disabled) | |
|
28 | options.delete(:method) | |
|
29 | options.delete(:confirm) | |
|
30 | options.delete(:onclick) | |
|
31 | options[:class] << ' disabled' | |
|
32 | url = '#' | |
|
33 | end | |
|
34 | link_to h(name), url, options | |
|
35 | end | |
|
36 | end |
@@ -978,22 +978,6 module ApplicationHelper | |||
|
978 | 978 | javascript_tag "new ContextMenu('#{ url_for(url) }')" |
|
979 | 979 | end |
|
980 | 980 | |
|
981 | def context_menu_link(name, url, options={}) | |
|
982 | options[:class] ||= '' | |
|
983 | if options.delete(:selected) | |
|
984 | options[:class] << ' icon-checked disabled' | |
|
985 | options[:disabled] = true | |
|
986 | end | |
|
987 | if options.delete(:disabled) | |
|
988 | options.delete(:method) | |
|
989 | options.delete(:confirm) | |
|
990 | options.delete(:onclick) | |
|
991 | options[:class] << ' disabled' | |
|
992 | url = '#' | |
|
993 | end | |
|
994 | link_to h(name), url, options | |
|
995 | end | |
|
996 | ||
|
997 | 981 | def calendar_for(field_id) |
|
998 | 982 | include_calendar_headers_tags |
|
999 | 983 | image_tag("calendar.png", {:id => "#{field_id}_trigger",:class => "calendar-trigger"}) + |
General Comments 0
You need to be logged in to leave comments.
Login now